State class

State of the state machine.

Constructors

State(Machine machine, String name)
Constructs a new state with an optional name.

Properties

hashCode int
The hash code for this object.
no setterinherited
machine Machine
The state machine holding this state.
final
name String
A human readable name of the state.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transitions List<Transition>
The list of transitions of this state.
final

Methods

addNested(Machine machine) → void
Adds a nested machine that gets started when this state is entered, and stopped when this state is left.
addTransition(Transition transition) → void
Adds a new transition to this state.
enter() → void
Call this method to enter this state.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onEntry(Callback0 callback) → void
Triggers the callback when the state is entered.
onExit(Callback0 callback) → void
Triggers the callback when the state is left.
onFuture<T>(Future<T> future, Callback1<T> callback) → void
Triggers the callback when future provides a value.
onStream<T>(Stream<T> stream, Callback1<T> callback) → void
Triggers the callback when stream triggers an event. The stream must be a broadcast stream.
onTimeout(Duration duration, Callback0 callback) → void
Triggers the callback when duration elapses.
toString() String
Returns a debug string of this state.
override

Operators

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