TechnoPrashant / Sizer

A flutter plugin for Easily make Flutter apps responsive. Automatically adapt UI to different screen sizes. Responsiveness made simple.
MIT License
249 stars 76 forks source link

ResponsiveSizer re-builds all routes on open/close keyboard #86

Closed stefanmusat closed 1 week ago

stefanmusat commented 2 weeks ago

After upgrading to latest version, I've wrapped the MaterialApp.router with ResponsiveSizer and when I have a TextField or TextFormField, on opening or closing the keyboard, all build methods till that widget that contains the text fields are re called.

Jay-0th commented 1 week ago

@stefanmusat it seems to be an isse with MediaQuery. https://github.com/flutter/flutter/issues/135400#issuecomment-1734826457 based on this if you just change these two values

    final viewPadding = MediaQuery.viewPaddingOf(context);
    pixelRatio = MediaQuery.devicePixelRatioOf(context);

in util.dart file this problem is fixed

TechnoPrashant commented 1 week ago

Change ResponsiveSizer to Sizer in Version 3.0.4