OnEnter typedef
OnEnter =
FutureOr<OnEnterResult> Function(BuildContext context, GoRouterState currentState, GoRouterState nextState, GoRouter goRouter)
The signature for the top-level onEnter callback.
This callback receives the BuildContext, the current navigation state,
the state being navigated to, and a reference to the GoRouter instance.
It returns a FutureOr<OnEnterResult> which should resolve to Allow if navigation
is allowed, or Block to block navigation.
Implementation
typedef OnEnter =
FutureOr<OnEnterResult> Function(
BuildContext context,
GoRouterState currentState,
GoRouterState nextState,
GoRouter goRouter,
);