I am using flutter_modular to separate my app into some module, everything looks fine until I notice that each time I perform a hot reload, my application automatically jump back to login page which is also the initial one.
This is my setting:
class AppWidget extends StatelessWidget {
final GlobalKey<NavigatorState> navigatorKey = new GlobalKey<NavigatorState>();
@override
Widget build(BuildContext context) {
return MaterialApp(
initialRoute: "/",
onGenerateRoute: Modular.generateRoute,
navigatorKey: navigatorKey,
);
}
}
Obviously, this issue does not happen to flutter native routing, so why does this appear in such a high voting package?
Here the link to the dependency: https://github.com/Flutterando/modular
And the link on pub.dev: https://pub.dev/packages/flutter_modular