web_static_screen_size 1.0.3

SDKflutter
Platformandroidioswindowslinuxmacosweb

static mediaQuery size for web

When you develop flutter web using MediaQuery and the browser height change MediaQuery get out of hand. The package Give initial static size for the website based on your screen Size and it change only if screen height more than the default value the new value will be replaced with the old Size.

alt text

Installing

dependencies:
  web_static_screen_size: ^1.0.2

Import

import 'package:web_static_screen_size/web_static_screen_size.dart';

Usage

Initialize the WebStaticScreenSize in MyApp

WebStaticScreenSize.initialize(context);

Instead of [MediaQuery.of(context).size] use this

final size = WebStaticScreenSize(context);
print(size.height);
print(size.width);

To disable resize when the new screen height more than the default value

WebStaticScreenSize.initialize(context,resize:false);