redirect method

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

An optional redirect function for this route.

Subclasses must override one of build, buildPage, or redirect.

Corresponds to GoRoute.redirect.

Implementation

FutureOr<String?> redirect(BuildContext context, GoRouterState state) => null;