delegate_builders library

Provides a simple API for defining state trees using delegate functions for message and transition handlers.

Classes

DataState<D> State Trees Message Handlers Transition Handlers
A data state with associated state data of type D.
FinalDataState<D>
A final data state in a state tree, with associated state data of type D.
FinalState
A final state in a state tree.
FinalStateConfig
The construction protocol for final tree states.
InitialChild
A callable class that can select the initial child state of a parent state, when the parent state is entered.
InitialData<D>
A callable class that can produce the initial data value for a data state, when the state is entered.
MachineState
A machine state in a state tree.
State State Trees Message Handlers Transition Handlers
A state in a state tree.
StateConfig
The construction protocol for tree states.
StateTree Getting Started State Trees
Defines a state tree that can be used in conjunction with a TreeStateMachine.

Constants

defaultRootKey → const StateKey
The key identifying the root state that is implicitly added to a state tree when using the StateTree.new constructor.

Typedefs

MachineDisposedHandler = FutureOr<TransitionMessageResult> Function(MessageContext msgCtx)
Type of function that is called when the nested state machine in a MachineState is disposed.
MachineDoneHandler = FutureOr<TransitionMessageResult> Function(MessageContext msgCtx, CurrentState currentMachineState)
Type of function that is called when a nested state machine in a MachineState completes.