pos method
- ModularRoute route,
- ModularArguments data
inherited
Method called as soon as route is found and after settings.
Implementation
@override
FutureOr<ParallelRoute?> pos(
ModularRoute route,
ModularArguments data,
) async {
if (await canActivate(data.uri.toString(), route as ParallelRoute)) {
return route;
} else if (redirectTo != null) {
return RedirectRoute(route.name, to: redirectTo!);
}
throw GuardedRouteException(route.uri.toString().trim());
}