LeafNodeInfo class final

Provides a description of how a leaf node of a state tree should be built. A leaf node has a parent node, but no children.

The current state of a TreeStateMachine is always a leaf node.

Inheritance
Available extensions

Constructors

LeafNodeInfo.new(StateKey key, StateCreator createState, {required TreeNodeInfo parent, required bool isFinalState, StateDataCodec? dataCodec, List<TreeStateFilter> filters = const [], Map<String, Object> metadata = const {}})

Properties

createState StateCreator
A factory function that can create the TreeState that defines the behavior of the node when it is an active state in a state machine.
finalinherited
dataCodec StateDataCodec?
The StateDataCodec that should be used to serialize and deserialize any state data associated with this node.
finalinherited
filters List<TreeStateFilter>
An unmodifiable list of TreeStateFilters that should intercept the message and transition handlers of the tree state for this node.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
isFinalState bool
Indicates if this leaf node represents a final state.
final
key StateKey
Identifies the node to be built.
finalinherited
metadata Map<String, Object>
An unmodifiable map of application-provided metadata associated with this node.
finalinherited
parent TreeNodeInfo
The parent node of this node.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

ancestors() Iterable<TreeNodeInfo>

Available on TreeNodeInfo, provided by the TreeNodeInfoNavigationExtension extension

Lazily-computes the ancestor nodes of this node.
children() Iterable<TreeNodeInfo>

Available on TreeNodeInfo, provided by the TreeNodeInfoNavigationExtension extension

The child nodes of this node.
descendants() Iterable<TreeNodeInfo>

Available on TreeNodeInfo, provided by the TreeNodeInfoNavigationExtension extension

Lazily-computes the descendant nodes of this node, in depth first order
leaves() Iterable<LeafNodeInfo>

Available on TreeNodeInfo, provided by the TreeNodeInfoNavigationExtension extension

Lazily-computes the descendant leaf nodes of this node.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parent() TreeNodeInfo?

Available on TreeNodeInfo, provided by the TreeNodeInfoNavigationExtension extension

The parent node of this node, or null if it is a root node.
root() RootNodeInfo

Available on TreeNodeInfo, provided by the TreeNodeInfoNavigationExtension extension

Returns the root ancestor node of this node, or this node itself if it is a root node.
selfAndAncestors() Iterable<TreeNodeInfo>

Available on TreeNodeInfo, provided by the TreeNodeInfoNavigationExtension extension

Lazily-computes the self-and-ancestor nodes of this node.
selfAndDescendants() Iterable<TreeNodeInfo>

Available on TreeNodeInfo, provided by the TreeNodeInfoNavigationExtension extension

Lazily-computes the self-and-descendant nodes of this node, in depth-first order
toString() String
A string representation of this object.
inherited

Operators

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