Closed nadrolinux closed 1 year ago
It looks like this is not a big issue as I though. Just MaterialPageRoute builder is called at window resize. We can apply simple workaround for that - passing values by arguments instead of creating them inside a widget. However, maybe it will be good to avoid MPR builder recalls somehow?
I will test the effect on the desktop platform
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Hi, When you push some page/widget on the navigation stack with:
Navigator.of(context).push
and manually resize a main window on the desktop you can see that a page/widget on the top of the stack is continiously recreated from a scratch (constructor is called instead of just build method like with LayoutBuilder). Both stateful and stateless widgets are affected. This is a serious bug, especially on the desktop, makes this really good lib totally useless on the desktop platforms, because all fields like a handles to a logic components are broken after a window resize. I attached quick example. main.txtBTW. At first glance it looks like this issue is related to a combination of flutter_screenutil + MaterialPageRoute, but I'm not 100% sure (I'm really new with Flutter). If yes, is it possible to solve this issue from a library level? Best regards,