check static method
The route to redirect to, or null to let the page render.
Implementation
static Future<String?> check(
Object? context,
Object? state,
String policy,
) async {
final Future<bool> Function(String, String)? answer = decide;
if (answer == null) return dvUnauthorizedRoute;
final String location = _locationOf(state);
return await answer(policy, location) ? null : dvUnauthorizedRoute;
}