Flutterando / modular

A smart project structure
https://pub.dev/packages/flutter_modular
Other
1.31k stars 254 forks source link

Modular Flutter clearing data passed by arguments getting lost in Flutter Web #834

Open joaovictor78 opened 1 year ago

joaovictor78 commented 1 year ago

Modular Flutter clearing data passed by arguments getting lost in Flutter Web when hot restarting or hot reloading, also happens when restarting the page.

To Reproduce

Use the following code, it is a simple contactor example. (https://github.com/joaovictor78/simple_example) Steps:

  1. Navigate to the second screen
  2. Do a hot reload in flutter Web or restart the page.
  3. OBS: The problem does not happen using flutter's native navigation resources provided by google
eduardoflorence commented 1 year ago

See https://docs.flutter.dev/development/ui/navigation#web-support

joaovictor78 commented 1 year ago

@eduardoflorence I think the problem is not yet that, in the modular flutter would there be some way to save the navigation state or is it not fully prepared for the Web? https://itnext.io/state-restoration-in-flutter-b6030b95a4d4