StateMachine<STATE, EVENT, SIDE_EFFECT> class

Finite State Machine implementation.

It can be in one of states defined by STATE. State transitions are triggered by events of type EVENT.

Base on the definition each transition can trigger side effect of type SIDE_EFFECT.

Constructors

StateMachine.create(BuildGraph<STATE, EVENT, SIDE_EFFECT> buildGraph)
factory

Properties

currentState → STATE
Returns current state.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state Stream<STATE>
Returns Stream of states.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
transition(EVENT event) Transition<STATE, EVENT, SIDE_EFFECT>
Perform transition by emitting event.

Operators

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