RxStateMachine<STATE, EVENT, SIDE_EFFECT> class

A finite state machine whose current state can be observed as a stream.

STATE is the base type of all states, EVENT the base type of all events and SIDE_EFFECT the type of the optional side effects attached to transitions.

Constructors

RxStateMachine.create(BuildGraph<STATE, EVENT, SIDE_EFFECT> buildGraph)
Creates a state machine from the graph described in buildGraph.
factory

Properties

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

Methods

as(BuildGraph<STATE, EVENT, SIDE_EFFECT> buildGraph) → RxStateMachine<STATE, EVENT, SIDE_EFFECT>
Creates a new state machine based on this machine's graph, modified by buildGraph (for example to start from a different initial state).
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>
Feeds event into the state machine and returns the resulting Transition.

Operators

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