DeepNavigationNode<T> class

This represents a level of subnavigation, usually representing a screen.

This is an immutable class.

Annotations

Constructors

DeepNavigationNode(T value, {int level = 0, DeepNavigationNode<T>? child})
const

Properties

child DeepNavigationNode<T>?
final
hashCode int
The hash code for this object.
no setterinherited
leaf DeepNavigationNode<T>
Returns the last descendant of this node, which can be itself if child is null.
no setter
level int
final
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 setterinherited
value → T
final

Methods

changeChildAtLevel(int changeLevel, DeepNavigationNode<T> newChild) DeepNavigationNode<T>
convertNodeToString(String converter(T)) String
createCopy({T? newValue, int? newLevel, DeepNavigationNode<T>? newChild}) DeepNavigationNode<T>
Creates a deep copy of this DeepNavigationNode with any of the newValues if provided.
getChildAtLevel(int searchLevel) DeepNavigationNode<T>
Returns the descendant of this node with searchLevel, which can be itself if searchLevel = level
getParentOfChild(DeepNavigationNode<T> child) DeepNavigationNode<T>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeLeaf() DeepNavigationNode<T>?
removes the leaf of this child.
setChild(DeepNavigationNode<T>? newChild) DeepNavigationNode<T>
Creates a copy of this DeepNavigationNode with the newChild.
setLeaf(DeepNavigationNode<T> newLeaf) DeepNavigationNode<T>
Creates a copy of this DeepNavigationNode that has newLeaf set as the child of the current leaf.
toString() String
A string representation of this object.
inherited
tryChildAtLevel(int searchLevel) DeepNavigationNode<T>?
similar to getChildAtLevel except will return null if no descendant exists at searchLevel

Operators

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