tree_state_machine
tree_state_machine
is a Dart package for defining and executing hierarchical state machines.
Features
- Hierarchical state trees
- Asynchronous message processing
- Stream based event notifications
- Declarative state definitions
- Nested state machines
Overview
The tree_state_machine
package provides APIs for defining a hierarchical tree of states, and
creating state machines that can manage an instance of a state tree. The state machine can be used
to dispatch messages to the current state for processing, and receive notifications as state
transitions occur.
Refer to UML state machines for further conceptual background on hierarchical state machines.
Documentation
See the API documentation for details on the following topics:
Further References
- The
tree_state_router
package, for declarative routing in Flutter apps based on aTreeStateMachine
.
Libraries
- async
- Provides utilities for asynchronous programming, such as
ValueSubject
. - build
- Provides basic infrastructure for creating state trees.
- delegate_builders
- Provides a simple API for defining state trees using delegate functions for message and transition handlers.
- tree_state_machine
- Provides support for executing hierarchical state machines.