onNavigation method
clients will call resolver.next(true --> default) to continue
navigation or resolver.next(false) to abort navigation
example
Implementation
@override
void onNavigation(NavigationResolver resolver, StackRouter router) {
if (PurpiRuntime.config.externalAuthRequest != null) {
router.push(const LoginRoute());
return;
}
PrefUtils prefUtils = di.sl<PrefUtils>();
if (!prefUtils.getIsFirstTime()) {
if (prefUtils.getClient() != null && prefUtils.getToken().isNotEmpty) {
router.push(const MainAccountManagerRoute());
}else{
router.push(const LoginRoute());
}
} else {
resolver.next(true);
}
}