Last updated:
0 purchases
hisma extra
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])
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');
copied to clipboard
Use the machine:
Future<void> play() async {
while (true) {
await Future<void>.delayed(const Duration(seconds: 1));
await machine.toggle();
}
}
copied to clipboard
Additional information #
If you have any questions, comments please go to Hisma GitHub Discussions to start or join discussions.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.