StateBuilder<S extends STATE, STATE, EVENT, SIDE_EFFECT> class

State builder.

Instance of this class is passed to GraphBuilder.state method.

Constructors

StateBuilder()

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

build() State<STATE, EVENT, SIDE_EFFECT>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
on<E extends EVENT>(CreateTransitionTo<S, STATE, E, EVENT, SIDE_EFFECT> createTransitionTo) → void
Sets transition that will be called when event of type E is sent to machine via StateMachine.transition method.
onEnter(void callback(S)) → void
Sets callback that will be called right after machine enters this state.
onExit(void callback(S)) → void
Sets callback that will be called right before machine exits this state.
toString() String
A string representation of this object.
inherited
transitionTo(STATE toState, [SIDE_EFFECT? sideEffect]) TransitionTo<STATE, SIDE_EFFECT>
Creates transition.

Operators

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