VoyagerStack class

respresents the state of navigation

Implemented types
Annotations

Constructors

VoyagerStack(List<VoyagerStackItem> _items, {Object? scope})
default constructor
const

Properties

hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
whether or not this stack is empty
no setter
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setter

Methods

asPages(VoyagerRouter router, {List<Object>? scopes, VoyagerPageBuilder defaultPageBuilder = PagePlugin.defaultMaterial}) List<Page>
converts the state to a list that can be used by e.g. Navigator
override
contains(VoyagerPage page) bool
check if this stack contains the given page (match by VoyagerPage.path and VoyagerPage.id)
mutate(void mutation(List<VoyagerStackItem> items)) VoyagerStack
creates a new copy of VoyagerStack with applied mutation
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onRemove() → void
should be called whenever this stack is removed
removeLast() VoyagerStack
removes last item of the stack and if it's an instance of VoyagerStack calls a VoyagerStackScope.onRemove if it's registered
toPathList() List<String>
converts the stack to a list of paths
override
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

adapter VoyagerAdapter<VoyagerStack>
VoyagerStack serialization adapter
final