call abstract method

FutureOr<String?> call(
  1. BuildContext context,
  2. GoRouterState state
)

Called before a route is activated.

Returns null if access is allowed, or a string path to redirect to another location (e.g., /login) if access is denied.

Implementation

FutureOr<String?> call(BuildContext context, GoRouterState state);