I have a native Splash Screen so no need to create a new one here and need to set LoginPage as default as well I have authenticated status than define which route to follow
so I set onGenerateRoute: (_) =>LoginPage.route(), and it loads twice in release and profile mode
case AuthenticationStatus.authenticated:
_navigator.pushAndRemoveUntil<void>(
HomePage.route(),
(route) => false
);
break;
case AuthenticationStatus.unauthenticated:
_navigator.pushAndRemoveUntil<void>(
LoginPage.route(),
(route) => false
);
break;
default:
break;
...
onGenerateRoute: (_) =>LoginPage.route(),
How to save the same logic but without double loading?