Codelessly / ResponsiveFramework

Easily make Flutter apps responsive. Automatically adapt UI to different screen sizes. Responsiveness made simple. Demo: https://gallery.codelessly.com/flutterwebsites/minimal/
https://codelessly.com
MIT License
1.26k stars 150 forks source link

Using Flutter Inspector > Toggle select widget mode will restart the app #115

Closed itsJoKr closed 1 year ago

itsJoKr commented 1 year ago

I've noticed in my app with ResponsiveFramework that whenever I click on Flutter Inspector > Toggle select widget mode it will route me back to the first screen. There is no error of any kind. When I remove ResponsiveFramework everything works.

I can say that problem might be in wrappers in MaterialApp build because my other wrapper behaves

I also have a few wrappers in MaterialApp builder method and noticed they work in a weird way with RespnsiveFramework. I guess inspector also works as a wrapper.

To recreate:

  1. Run the example project in Chrome
  2. Click on some button to push any page
  3. Click on Flutter Inspector > Toggle select widget mode

Expected: Toggle select widget mode is active

Actual: The screen is reset to first screen.

itsJoKr commented 1 year ago

Noticed that the probable issue is FittedBox which is inserted into the tree. I ended up rebuilding my own solution.

pppshiwen commented 1 year ago

same question