HistoryState<T> class
Signals the engine to return to a previous configuration of active states.
When the engine enters this state, it looks up the states active when State id exited and uses those instead.
- Implemented types
-
- State<
T>
- State<
Constructors
-
HistoryState(String? id, {required Transition<
T> transition, HistoryDepth type = HistoryDepth.deep, String? description})
Properties
- containsHistoryState → bool
-
Are any of the immediate substates a history state?
no setterinherited
- depth ↔ int
-
Depth in the tree (root = 0)
latefinaloverride
- description → String?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
Unique identifier within its container (optional)
final
-
initialStates
→ Iterable<
State< T> > -
The states referenced by initialTransition.
no setterinherited
-
initialTransition
→ Transition<
T> ? -
Not applicable
no setteroverride
- isAtomic → bool
-
True if this has no substates (i.e. is a leaf node)
no setteroverride
- isCompound → bool
-
True if this has at least one substate.
no setteroverride
- isFinal → bool
-
Declares this to be a final state
finalinherited
- isParallel → bool
-
Declares this to be a "parallel" state (all children active/inactive together)
finalinherited
-
onEntry
→ Action<
T> ? -
Action to be performed when this state or container is entered
finalinherited
-
onExit
→ Action<
T> ? -
Action to be performed when this state or container is exited
finalinherited
- order ↔ int
-
Index into its parent's substates
latefinaloverride
-
parent
↔ State<
T> ? -
This node's parent (assigned late)
latefinaloverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
substateIDs
→ Iterable<
String> -
Used by toString to show IDs of substates, not the substates themselves.
no setterinherited
-
substates
→ Iterable<
State< T> > -
States contained within this one
no setteroverride
-
toIterable
→ Iterable<
State< T> > -
Walks this subtree in depth-first order.
no setterinherited
-
transition
→ Transition<
T> -
Specifies the default active states if none found in the history.
final
-
transitions
→ Iterable<
Transition< T> > -
All transitions from this state.
no setteroverride
- type → HistoryDepth
-
Whether to replace with state id (HistoryDepth.shallow) or
with the state and all its descendents (HistoryDepth.deep).
final
Methods
-
ancestors(
{State< T> ? upTo}) → Iterable<State< T> > -
Finds the ancestors of a state
inherited
-
descendsFrom(
State< T> other) → bool -
Whether this state descends from another.
inherited
-
enter(
T? context, [EngineCallback? callback]) → void -
No-op in a history state.
override
-
exit(
T? context, [EngineCallback? callback]) → void -
No-op in a history state.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Report on unimplemented methods.
override
-
resolveTransitions(
Map< String, State< stateMap) → voidT> > -
Populate
source
andtransition.targetStates
override -
toString(
) → String -
A string representation of this object.
override
-
transitionFor(
{String? event, Duration? elapsedTime, T? context, bool? ignoreContext = false}) → Transition< T> ? -
Finds the first transition matching all the criteria, or returns
null
.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited