routeToAuthenticatedRoute function
dynamic
routeToAuthenticatedRoute({
- dynamic data,
- dynamic result,
- bool removeUntilPredicate(
- Route route
- PageTransitionSettings? pageTransitionSettings,
- PageTransitionType? pageTransitionType,
- dynamic onPop(
- dynamic value
Navigate to the auth route.
Implementation
routeToAuthenticatedRoute(
{dynamic data,
NavigationType navigationType = NavigationType.pushAndForgetAll,
dynamic result,
bool Function(Route<dynamic> route)? removeUntilPredicate,
PageTransitionSettings? pageTransitionSettings,
PageTransitionType? pageTransitionType,
Function(dynamic value)? onPop}) async {
NyArgument nyArgument = NyArgument(data);
String? route = NyNavigator.instance.router.getAuthRouteName();
if (route == null) {
NyLogger.debug("No authenticated route set");
return;
}
await NyNavigator.instance.router
.navigate(route,
args: nyArgument,
navigationType: navigationType,
result: result,
removeUntilPredicate: removeUntilPredicate,
pageTransitionType: pageTransitionType,
pageTransitionSettings: pageTransitionSettings)
.then((v) => onPop != null ? onPop(v) : (v) {});
}