NavigationScheme class

Defines a navigation scheme of the app.

Contains a list of possible destinations to navigate in the app. Each destination can be a final, i.e. is directly rendered as a some screen, or might include a nested navigator with its own destinations.

Until the custom navigator is provided, the NavigatorScheme creates a default root navigator, that manages top level destinations.

In case of some navigation error, user will be redirected to errorDestination, if it is specified. Otherwise an exception will be thrown.

See also:

Mixed in types

Constructors

Creates navigation scheme.

Properties

config RouterConfig<Destination<DestinationParameters>>
A configuration for Router widget.
no setter
currentDestination Destination<DestinationParameters>
The current destination within the whole navigation scheme.
no setter
errorDestination Destination<DestinationParameters>?
The destination to redirect in case of error.
final
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isInitializing bool
Indicates if the NavigationScheme object is initializing.
no setter
isResolving bool
Indicates if a current destination is in resolving state.
no setter
redirectedFrom Destination<DestinationParameters>?
Stores the original destination in case of redirection.
no setter
rootNavigator NavigationController
The root navigator in the navigation scheme.
no setter
routeInformationProvider RouteInformationProvider
no setter
routeParser → TheseusRouteInformationParser
Reference to the RouteInformationParser implementation
no setter
routerDelegate → TheseusRouterDelegate
Reference to the RouterDelegate implementation
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldClose bool
Whether the app should close.
no setter
waitingOverlayBuilder → (Widget Function(BuildContext context, Destination<DestinationParameters> destination)?)
Returns a widget to display while destination is resolving.
final

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
override
findDestination(String uri) Destination<DestinationParameters>?
Find a destination in the scheme that match a given URI.
findNavigator(Destination<DestinationParameters> destination) NavigationController?
Returns a proper navigator in the navigation scheme for a given destination.
goBack() Future<void>
Return to previous destination.
goTo(Destination<DestinationParameters> destination) Future<void>
Navigates to specified destination.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
resolve() Future<void>
Resolves the current destination
toString() String
A string representation of this object.
inherited

Operators

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