OpenFlutter / flutter_screenutil

Flutter screen adaptation, font adaptation, get screen information
https://pub.dartlang.org/packages/flutter_screenutil
Apache License 2.0
3.88k stars 496 forks source link

PageView breaks the working logic #493

Closed gizemgizg closed 1 year ago

gizemgizg commented 1 year ago

Hello, I use keyboard actions and screen utils plugins together in my project. When the keyboard is opened, it breaks the working structure of my application. It causes my last page in Pageview to open 20 times. There is an important problem. The "Done" texts I added on the keyboard do not appear either. I set the useInheritedMediaQuery parameter in Screen Utils to "false". Can you solve it urgently?

keyboard_actions: ^4.2.0 flutter_screenutil: ^5.8.4

Mounir-Bouaiche commented 1 year ago

Hello @gizemgizg , Can you share with us a minimal code to reproduce the problem.

I would appreciate if you can test the dev version also and tell if your problem is solved. Use this to fetch dev version:

  flutter_screenutil:
    git:
      url: https://github.com/OpenFlutter/flutter_screenutil
      ref: dev
pumppmup1 commented 1 year ago

Same here

pumppmup1 commented 1 year ago

I found the similar problem. After I upgraded to 5.9.0-beta. I still found the performance issue Ex. When I open/close keyboard, I can easily see the un-smooth animation on my App.

I am not sure, As I know I think that the root-cause occure from rebuilding repeatly

Mounir-Bouaiche commented 1 year ago

I found the similar problem. After I upgraded to 5.9.0-beta. I still found the performance issue Ex. When I open/close keyboard, I can easily see the un-smooth animation on my App.

I am not sure, As I know I think that the root-cause occure from rebuilding repeatly

In 5.9.0-beta, the only widgets that will be notified to rebuild are ScreenUtilInit (that should know sizes) and every of your app class widgets, but not Flutter widgets (MaterialApp, TextField, Sizedbox, FutureBuilder,...). Also when using RebuildFactors.size rebuilding will occur only if screen size changed and not viewInsets/padding. You can run test Rebuilding yourself by cloning the repository and run flutter test.

We'll need a minimal code to reproduce this performance issue. Can you share us some of your code?

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.