hisma_extra 0.1.1+9 copy "hisma_extra: ^0.1.1+9" to clipboard
hisma_extra: ^0.1.1+9 copied to clipboard

Extra classes on top of the Hisma hierarchical state machine implementation to simplify its usage.

Extra classes on top of Hisma to simplify Hisma usage.

This package intended to contain all classes that is built on top of hisma in order to simplify its usage.

Features #

  • toggle state machine ([ToggleStateMachine])

hisma_extra_01.gif

Getting started #

Install hisma, hisma_extra and optionally any monitors (e.g. hisma_console_monitor or hisma_visual_monitor).

Usage #

Currently the single extra that is available for Hisma is the [ToggleStateMachine] class that creates a simle two states (on and off) state machine.

Create the machine:

final machine = ToggleStateMachine(name: 'toggleMachine');

Use the machine:

Future<void> play() async {
  while (true) {
    await Future<void>.delayed(const Duration(seconds: 1));
    await machine.toggle();
  }
}

Additional information #

If you have any questions, comments please go to Hisma GitHub Discussions to start or join discussions.

0
likes
160
points
5
downloads

Publisher

unverified uploader

Weekly Downloads

Extra classes on top of the Hisma hierarchical state machine implementation to simplify its usage.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

hisma

More

Packages that depend on hisma_extra