yx_navigation library
Core building blocks for declarative navigation: immutable route trees, state management, guards, observers, and URI serialization.
Flutter widgets and route declarations live in the companion package
yx_navigation_flutter.
Classes
- ActiveRouteController
- Read and control the currently active route at the current level.
- BaseStateManager
- Base class for navigation state managers.
- ByRouteEquality
- Equality that compares RouteNodes by RouteNode.route only.
- CompositeDeeplinkHandler
- Composite handler that combines multiple DeeplinkHandlers.
- DeeplinkHandler
- Interface for deeplink handling.
- DeeplinkHandlerHandledResult
- Result indicating that the deeplink was handled without navigation.
- Result indicating that navigation is required.
- DeeplinkHandlerResult
- Result of processing a deeplink.
- DeeplinkHandlerStrategy
- Strategy for iterating through multiple deeplink handlers.
- DeepRouteNodeEquality
- Equality that recursively compares RouteNodes including their RouteNode.children.
- FifoDeeplinkHandlerStrategy
- FIFO strategy: handlers are called in registration order.
- FullRouteNodeResolver
- Resolves a RouteNode by matching both YxRoute identity and RouteNode.arguments.
- GuardConfiguration
- A composite RouteNodeGuard that runs a pipeline of guards in order.
- GuardContext
- A shared scratch space passed through the guard pipeline.
- GuardObserver
- Hooks into the lifecycle of the RouteNodeGuard pipeline.
- GuardResult
- The outcome of a RouteNodeGuard invocation.
- GuardResultCancel
- Signals that the mutation should be cancelled.
- GuardResultNext
- Signals that the mutation should continue to the next guard.
- GuardResultRedirect
- Signals that the mutation should be redirected to a different target.
- GuardSync
- A broadcast sink used to re-trigger the guard pipeline on demand.
- GuardSyncReason
- Describes why guards should re-evaluate the current navigation state.
- InitializeSchemaNodeGuard
- LateInitGuardConfiguration
- A GuardConfiguration that accepts additional guards after construction.
- LateInitRouteNodeGuard
- A RouteNodeGuard whose contributing guards are registered after construction.
- LifoDeeplinkHandlerStrategy
- LIFO strategy: handlers are called in reverse registration order.
- MutableRouteNode
- Mutable flavour of RouteNode.
- Mutation
- Describes a single transition of the navigation tree.
-
Keeps an IndexedStack parent node aligned with a fixed set of tab routes:
every declared route appears exactly once as a child, order may change
(for example when ActiveRouteController reorders tabs), and
arguments,extra, and nested child state on existing nodes are kept when nodes are added or removed. - The main entry point for reading and changing the navigation tree.
- PlatformStateSerialization
- A way to transform platform route state (URL from browser, deeplink, etc) into a RouteNode and back.
- PrettyUriStateSerialization
- Converts the given RouteNode into a Uri string and back.
- RedirectRouteNodeGuard
- A guard that detects and breaks infinite redirect loops.
- RouteAndArgumentsAndExtraEquality
- Equality that compares RouteNodes by RouteNode.route, RouteNode.arguments and RouteNode.extra.
- RouteAndArgumentsEquality
- Equality that compares RouteNodes by both RouteNode.route and RouteNode.arguments.
- RouteIDNodeResolver
- Resolves a RouteNode by matching YxRoute identity only.
- RouteMutator
- Low level interface for applying arbitrary mutations to the route tree.
- High level navigation operations over the current route tree.
- RouteNode
- A node in the navigation tree.
- RouteNodeComparator
- Comparison helpers for RouteNode instances.
- RouteNodeDiffResult
- Describes the difference between two RouteNode trees.
- RouteNodeEquality
- Strategy for comparing two RouteNode instances for equality.
- RouteNodeGuard
- A guard that is invoked on every mutation of the navigation tree.
- RouteNodeReadable
- Read-only access to the current RouteNode and its updates.
- RouteNodeResolver
- Locates a RouteNode inside a tree rooted at another node.
- RouteNodeStateManager
- The primary state manager that holds the current navigation tree and coordinates every mutation.
- RouteObserverAdapter
- SquidFragmentBasedSerializer
- Fragment-based serializer for navigation state.
- SquidPathBasedSerializer
- Path-based serializer for navigation state.
- StateManagerDiffObserver
- A StateManagerObserver that forwards each mutation to a list of YxRouteObservers along with the computed diff between the original and target trees.
- StateManagerObserver
- Hooks into the lifecycle of a BaseStateManager.
- StrictHierarchyGuard
- Validates that children of a given parent route stay within an explicit allow-list of child routes.
- UriStringStateSerialization
- Converts the given RouteNode into a Uri string and back.
- YxRoute
- Stable identity of a route within the navigation tree.
- YxRouteObserver
- Observes push, pop and update operations that affect a specific route.
Enums
- UriStrategy
- Strategy for placing serialized navigation state in URL.
Extensions
- RouteExtension on YxRoute
- Convenience helpers for turning a YxRoute into a RouteNode.
Typedefs
- InitialRouteNodeBuilder = RouteNode Function(MutableRouteNode node)
- MutateNodeCallback = RouteNode Function(MutableRouteNode routeNode)
- Callback that applies a mutation to a MutableRouteNode and returns the resulting node.
- PopRouteMutationCallback = void Function(RouteNode origin, RouteNode target)
- Signature for a callback invoked when a route is popped off the tree.
- PushRouteMutationCallback = void Function(RouteNode origin, RouteNode target)
- Signature for a callback invoked when a route is pushed onto the tree.
-
RouteNodeAction<
N extends RouteNode> = bool Function(N routeNode) - Signature for callbacks invoked during RouteNode traversal.
-
RouteNodePredicate<
N extends RouteNode> = bool Function(N routeNode) - Signature used to filter RouteNode instances during traversal and lookup operations.
- SquidSerializer = SquidFragmentBasedSerializer
- Deprecated: Use SquidFragmentBasedSerializer instead.
- UpdateRouteMutationCallback = void Function(RouteNode origin, RouteNode target)
- Signature for a callback invoked when an existing route is updated.