NavStackController class

Mixed in types

Constructors

Properties

args String
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
history List<String>
getter/setter pair
initialPath String?
Determines what the initial path should be (if the OS has not provided one)
final
onRouteChanging → (void Function(String value)?)
Called whenever the current path has changed
final
path String
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackBuilder PathStack Function(BuildContext context, NavStackController controller)
Must return a PathStack widget
final

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
clearHistory() → void
Removes all history except the current
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).
inherited
goBack() bool
Steps back one level in the NavStack history
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
popMatching(String value, {bool exactMatch = false}) → void
Go back in history and grab the first route that does not match the provided route. Used in this demo to close all of the details pages you might have in your history stack
popUntil(String value, {bool exactMatch = false}) → void
Pop all pages until we find a match
redirect(String path, {VoidCallback? onComplete}) → void
Meant to be used from with onBeforeUpdate inside of StackRouteBuilder, Changes path in the next frame to avoid errors when building mid-build.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
replacePath(String value) → void
Changes path without creating a new entry stack
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

of(BuildContext context) NavStackController