zenrouter library

Classes

ActiveRouteRestorable<T extends RouteUnique>
A RestorableValue that manages the restoration of the currently active route in the navigation stack.
ContinueRedirect<T extends RouteTarget>
Result indicating the next rule should be processed.
Coordinator<T extends RouteUnique>
The Flutter-specific implementation of navigation coordinator.
CoordinatorCore<T extends RouteUri>
The central hub for navigation state and operations in ZenRouter.
CoordinatorRestorable
A widget that enables state restoration for a Coordinator and its navigation hierarchy.
CoordinatorRouteInformationProvider
A RouteInformationProvider that derives its initial route from both the platform and a Coordinator.
CoordinatorRouteParser
Parses RouteInformation to and from Uri.
CoordinatorRouterDelegate
Router delegate that connects the Coordinator to Flutter's Router.
CoordinatorView<T extends RouteUri>
Headless coordinator host: builds coordinator.layoutBuilder without a root Router.
CupertinoSheetPage<T extends Object>
A page that presents its route as a Cupertino-style bottom sheet.
DeclarativeNavigationStack<T extends RouteTarget>
A widget that manages a navigation stack declaratively.
Delete<T>
Represents deleting an element at a specific index.
DialogPage<T>
A page that presents its route as a dialog overlay.
DiffOp<T>
Represents a diff operation between two lists.
IndexedStackPath<T extends RouteTarget>
A fixed stack path for indexed navigation (like tabs).
IndexedStackPathBuilder<T extends RouteUnique>
Widget that builds an IndexedStack from an IndexedStackPath. Ensures that the stack caches pages when rebuilding the widget tree.
Insert<T>
Represents inserting a new element at a specific index.
Keep<T>
Represents keeping an element at a specific index (no change).
A mutable stack path for standard navigation.
A RestorableValue that manages the restoration of navigation route stacks.
A widget that renders a stack of pages based on a NavigationPath.
NoTransitionPage<T>
RedirectResult<T extends RouteTarget>
Result of a redirect rule, determining the next action in the chain.
RedirectRule<T extends RouteTarget>
Base class for composable redirect logic.
RedirectTo<T extends RouteTarget>
Result indicating navigation to a different route.
RestorableConverter<T extends Object>
An abstract base class for implementing custom serialization logic for routes.
RouteModule<T extends RouteUri>
Base class for route modules that handle a subset of application routes.
RouteTarget
The base class for all navigation destinations in the application.
RouteUri
Abstract base class for routes with URI representation.
StackPath<T extends RouteTarget>
A container managing a stack of RouteTargets for navigation.
StackTransition<T extends RouteTarget>
Defines how a route should be displayed as a widget and wrapped in a page.
StopRedirect<T extends RouteTarget>
Result indicating navigation should be cancelled.

Enums

DeeplinkStrategy
Strategy that determines how CoordinatorCore handles deep links.
DefaultTransitionStrategy
Strategy for controlling page transition animations in the navigator.
RestorationStrategy
Defines the strategy used to serialize and deserialize a route for state restoration.

Mixins

CoordinatorModular<T extends RouteUri>
Mixin that enables modular route management by delegating to multiple modules.
CoordinatorNavigatorObserver<T extends RouteUnique>
Mixin that provides a list of observers for the coordinator's navigator.
CoordinatorRestoration<T extends RouteUnique>
Mixins for coordinating route state restoration.
CoordinatorTransitionStrategy<T extends RouteUnique>
RestorablePath<T extends RouteTarget, S, D>
A mixin that adds state restoration capabilities to navigation paths.
Mixin for routes that specify deep link handling behavior.
RouteGuard
Mixin for routes that can intercept and block pop operations.
RouteIdentity<T>
Mixin that provides route identification capability.
RouteLayout<T extends RouteUnique>
Mixin for routes that define a layout structure.
RouteLayoutChild
Mixin for routes that belong to a parent layout.
RouteLayoutParent<T extends RouteTarget>
Mixin for routes that act as layout parents (shell routes).
RouteQueryParameters
Mixin for routes that support query parameters.
RouteRedirect<T extends RouteTarget>
Mixin that allows routes to redirect to different destinations.
RouteRedirectRule<T extends RouteTarget>
Mixin for routes that use a list of redirect rules.
RouteRestorable<T extends RouteTarget>
A mixin that enables custom state restoration for routes that cannot be fully represented by a URI.
RouteTransition
Mixin that enables custom page transitions for routes.
RouteUnique
Base mixin for unique routes in the application.
StackMutatable<T extends RouteTarget>
Mixin for stack paths that support mutable navigation operations.
StackNavigatable<T extends RouteTarget>
Mixin for stack paths that support browser history navigation.

Extension Types

PathKey
A type-safe identifier for StackPath types.

Extensions

RouteLayoutBinding on StackPath<T>
Extension that binds a RouteLayout constructor to a StackPath.

Functions

applyDiff<T extends RouteTarget>(StackMutatable<T> path, List<DiffOp<T>> operations) → void
Apply diff operations to a NavigationPath.
kEmptyNavigatorObserverList() List<NavigatorObserver>
myersDiff<T>(List<T> oldList, List<T> newList, {bool equals(T a, T b)?}) List<DiffOp<T>>
Myers diff algorithm implementation.

Typedefs

DecodeLayoutKeyCallback = Object Function(String key)
PageCallback<T> = Page<void> Function(BuildContext context, ValueKey<T> routeKey, Widget child)
Callback that builds a Page from a route and child widget.
QuerySelectorBuilder<T> = Widget Function({required Widget builder(BuildContext context, T value), required T selector(Map<String, String> queries)})
Widget builder for query parameters.
RestorableConverterLookupFunction = RestorableConverter<Object>? Function(String key)
A function that looks up a RestorableConverter by its key.
RestoratableConverterConstructor<T extends Object> = RestorableConverter<T> Function()
Constructor function for creating a restorable value converter.
RouteLayoutBuilder<T extends RouteUnique> = Widget Function(CoordinatorCore<RouteUri> coordinator, StackPath<T> path, RouteLayout<T>? layout)
Builder function for creating a layout widget that wraps route content.
RouteLayoutConstructor<T extends RouteUnique> = RouteLayout<T> Function()
Constructor function for creating a layout instance.
RouteLayoutParentConstructor<T extends RouteTarget> = RouteLayoutParent<T>? Function(Object key)
Function signature for creating RouteLayoutParent instances.
RouteUriParserSync<T extends RouteTarget> = T Function(Uri uri)
Synchronous parser function that converts a Uri into a route instance.
StackTransitionResolver<T extends RouteTarget> = StackTransition<T> Function(T route)
Callback that maps routes to their StackTransition.