pos method

  1. @override
FutureOr<Route?> pos(
  1. ModularRoute route,
  2. Request data
)

Method called as soon as route is found and after settings.

Implementation

@override
FutureOr<Route?> pos(route, data) async {
  if (await canActivate(data, route as Route)) {
    return route;
  }

  throw GuardedRouteException(route.uri.toString().trim());
}