statemachine library

Generic state machine framework.

Classes

AfterTransitionEvent<T>
Transition event emitted after a transition completed.
BeforeTransitionEvent<T>
Transition event emitted before a transition starts, can be aborted.
EntryTransition
A callback that is triggered when the state activates.
ExitTransition
A callback that is triggered when the state deactivates.
FutureTransition<T>
A transition that is triggered by a future.
Machine<T>
The state machine itself.
NestedTransition<T>
A transition that triggers a nested state machine.
State<T>
State of the state machine.
StreamTransition<T>
A transition that is triggered through a stream.
TimeoutTransition
A transition that happens automatically after a certain duration elapsed.
Transition
A transition from one state to another.
TransitionEvent<T>
Transition event.

Typedefs

Callback0 = void Function()
A callback with no argument.
Callback1<T> = void Function(T value)
A callback with one argument.
Provider<T> = T Function()
A provider of one value.

Exceptions / Errors

TransitionError<T>
Transition error thrown at the end of a failing transition.