DVRouteRedirect typedef

DVRouteRedirect = FutureOr<DVRouteTarget?> Function(BuildContext context, DVRouteState state)

Where to send a visitor instead, or null to let the route activate.

A DVRouteTarget rather than a string, so a redirect to a route that was renamed is a compile error rather than a not-found page.

Implementation

typedef DVRouteRedirect =
    FutureOr<DVRouteTarget?> Function(BuildContext context, DVRouteState state);