route_definer library
Typed Flutter routing with one guard pipeline and one title resolver.
Classes
- Continue to the next check, or build the destination after the last check.
- CurrentRoute
- Information and cooperative cancellation for one navigation attempt.
- Show the denied view without building the destination.
- JsonRouteArgumentsCodec
- The default supports JSON values and rejects unsupported payloads eagerly.
- Opt-in router diagnostics. No logger runs unless configured on the router.
- One immutable event. History is ordered oldest to newest by sequence.
- Replace the attempted destination without running its remaining guards.
- RouteArgumentsCodec
- Converts application arguments to/from JSON-compatible history state.
- RouteCancellation
- Cooperative cancellation for work started by a guard.
- RouteDecision
- The terminal result of a navigation check.
-
RouteDefiner<
T> - Immutable route definition. T is the value returned when its route is popped.
- RouteDefinerParser
- Parses full URIs and round-trips serialized navigation stacks.
- RouteDefinerRouter
- One instance-owned route table and Navigator stack.
- RouteFailure
- A failed attempt; the library never automatically logs its arguments.
- RouteLocation
- A restorable location in a Router-managed stack.
- RouteOptions
- Configuration options for customizing MaterialPageRoute behavior.
- RoutePattern
- A validated, reusable path pattern with whole-segment :parameters.
- RouteSnapshot
- A resolved, context-free snapshot of one router-managed page.
- RouteStack
- Canonical state reported to Flutter's Router and browser history.
- RouteState
- Immutable URI information for one navigation attempt.
Enums
- Observed managed-stack mutations or guard activity, not animation completion.
Functions
-
parseRouteUri(
String location) → Uri - Parses an absolute route path or external URI, rejecting invalid escapes.
Typedefs
-
DefinedRouteFactory
= Route<
T> Function<T>(RouteSettings settings, WidgetBuilder builder, RouteOptions options) - Creates the native route for a typed page. Preserve the supplied settings.
-
RouteGuard
= FutureOr<
RouteDecision> Function(CurrentRoute route) - A synchronous or asynchronous check before a route is displayed.
Exceptions / Errors
- RouteCancelled
- A cancelled navigation attempt.
- RouteRedirectException
- A redirect chain exceeded its limit or revisited a destination.