Closed imjeen closed 2 years ago
There are some screen page under the root of app, and they are not in tabs. Such as Login Screen.
I Try to try to navigate to these screen page by the way: Navigator.of(context).pushNamed('/login'); but it cannot.
Navigator.of(context).pushNamed('/login');
Finally, I found a way to resolve it.
Navigator.of(context, rootNavigator: true) .pushNamedAndRemoveUntil( LoginScreen.routeName, (_) => false, );
There are some screen page under the root of app,
and they are not in tabs. Such as Login Screen.
I Try to try to navigate to these screen page by the way:
Navigator.of(context).pushNamed('/login');
but it cannot.