canActivate method

  1. @override
Future<bool> canActivate(
  1. String path,
  2. ModularRoute route
)

Returns a FutureOr. If true, allow the route to continue processing. If it is false, the Guard will try to redirect the route. If there is no redirect then an error will be thrown GuardedRouteException.

Implementation

@override
Future<bool> canActivate(String path, ModularRoute route) async {
  return true;

  final size = MediaQueryData.fromView(PlatformDispatcher.instance.views.first).size;

  return invert ? size < minWindowSize : size >= minWindowSize;
}