TreeStateRouter class Getting Started

Routing information that describes how to display states in a TreeStateMachine, and triggers routing navigation in response to state transitions within the state machine.

Implemented types

Constructors

TreeStateRouter({TreeStateMachine? stateMachine, StateTreeBuildProvider? stateTree, required List<StateRouteInfoBuilder> routes, DefaultScaffoldingBuilder? defaultScaffolding, DefaultPageBuilder? defaultPageBuilder, bool enableTransitions = true, bool enableDeveloperLogging = false})
Constructs a TreeStateRouter.
factory
TreeStateRouter.platformRouting({required StateTreeBuildProvider stateTree, required List<StateRouteInfoBuilder> routes, DefaultScaffoldingBuilder? defaultScaffolding, DefaultPageBuilder? defaultPageBuilder, bool enableTransitions = true, bool enableDeveloperLogging = false, bool enableStateMachineDeveloperLogging = false})
Constructs a TreeStateRouter that integrates with Navigator 2.0 APIs.
factory

Properties

backButtonDispatcher BackButtonDispatcher?
The RootBackButtonDispatcher used by TreeStateRouter.
final
defaultPageBuilder DefaultPageBuilder?
A function that can create a Page to display the content of a route.
final
defaultScaffolding DefaultScaffoldingBuilder?
A function that can adorn the content of a route page, adding common layout or scaffolding.
final
enableDeveloperLogging bool
Indicates if this router will write all log output to the Developer log. Note that an application must first set hierarchicalLoggingEnabled to true for this to take effect.
final
enablePlatformRouting bool
Indictes if the router integrates with the platform routing engine, such that web browser URLs are updated in response to route changes.
final
enableTransitions bool
Indicates if page transitions within the router should be animated.
final
hashCode int
The hash code for this object.
no setterinherited
routeInformationParser RouteInformationParser<TreeStateRoutePath>?
The RouteInformationParser used by TreeStateRouter.
latefinal
routeInformationProvider RouteInformationProvider?
The RouteInformationProvider used by TreeStateRouter.
latefinal
routeMap Map<StateKey, StateRouteInfo>
Unmodifiable map of the routes in routes, and all of their descendant routes, keyed by StateRouteInfo.stateKey.
latefinal
routerDelegate RouterDelegate<TreeStateRoutePath>
The RouterDelegate used by TreeStateRouter.
latefinal
routes List<StateRouteInfo>
The list of routes that can be materialized by this router. Each route should correspond to a state in the stateMachine.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stateMachine → TreeStateMachine
The state machine providing the tree states that are routed by this TreeStateRouter.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited