State class State Trees Message Handlers Transition Handlers

A state in a state tree.

The state can be a leaf or composite state, depending on which factory is used to construct the state.

Implemented types

Constructors

State.new(StateKey key, {TransitionHandler? onEnter, TransitionHandler? onExit, MessageHandler? onMessage, List<TreeStateFilter> filters = const []})
Constructs a leaf state identified by key.
factory
State.composite(StateKey key, InitialChild initialChild, {TransitionHandler? onEnter, TransitionHandler? onExit, MessageHandler? onMessage, required List<StateConfig> childStates, List<TreeStateFilter> filters = const []})
Constructs a composite state identified by key.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

nodeInfo(TreeNodeInfo parent) TreeNodeInfo
Constructs a TreeNodeInfo representing the tree state, with the specified parent node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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