State<T> class

State of the state machine.

Constructors

State(Machine machine, T identifier)
Constructs a new state with an identifier.

Properties

hashCode int
The hash code for this object.
no setterinherited
identifier → T
Object identifying this state.
final
machine Machine
The state machine holding this state.
final
name String
A human readable name of the state.
no setter
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<S>(Machine<S> 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<S>(Future<S> future, Callback1<S> callback) → void
Triggers the callback when a future yields a value.
onFutureProvider<S>(Provider<Future<S>> provider, Callback1<S> callback) → void
Triggers the callback when the Future provided by provider yields a value.
onStream<S>(Stream<S> stream, Callback1<S> callback) → void
Triggers the callback when stream triggers an event. The stream must be a broadcast stream, since it might be shared among multiple subscriptions.
onStreamProvider<S>(Provider<Stream<S>> provider, Callback1<S> callback) → void
Triggers the callback when the Stream provided by provider triggers an event.
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