xstate_dart 0.1.3
xstate_dart: ^0.1.3 copied to clipboard
XState-JSON-compatible statechart interpreter in pure Dart. Hierarchical, parallel, timed (injected clock), eventless transitions.
Changelog #
0.1.3 #
- Add a CD-player example (
example/main.dart) — the classic Harel statechart — exercising hierarchy, guarded alternative transitions, deterministicaftertimers viatick, history resume after eject, and snapshot save/restore, backed by an acceptance test suite. - Apply
dart formatacross the package.
0.1.2 #
Initial public release.
- Hierarchical (compound) and parallel states with XState-JSON-compatible
configuration loaded via
StateMachine.fromJson. - Guards, entry/exit/transition actions, and eventless (
always) transitions. - Delayed (
after) transitions driven by an explicittick(Duration)clock — noDateTime.now()orTimer, so machines stay deterministic and unit-testable;tickaccumulates microseconds so sub-millisecond durations do not truncate. - History states, external re-entry for domain-target transitions, and
strict validation of compound states without an
initial. - Snapshot save/restore (
toSnapshotJson/restoreSnapshot) with structural validation of configurations and history values at restore.