route_definer library

Typed Flutter routing with one guard pipeline and one title resolver.

Classes

AllowNavigation
Continue to the next check, or build the destination after the last check.
CurrentRoute
Information and cooperative cancellation for one navigation attempt.
DenyNavigation
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.
RedirectNavigation
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.
RouteFactories
Native page presets that preserve typed results and Router page settings.
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 native page 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.
RouteTableWarning
A definition that can never win declaration-order matching. Only complete coverage by one earlier pattern is reported; partial overlaps are intentional and are not warnings.

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

DefinedPageRouteFactory = PageRoute<T> Function<T>(RouteSettings settings, WidgetBuilder builder, RouteOptions options)
Creates a page route, preserving the exact supplied settings object. Prefer this contract for new integrations; legacy factories remain supported.
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.