toggleable 0.0.2 copy "toggleable: ^0.0.2" to clipboard
toggleable: ^0.0.2 copied to clipboard

outdated

Helps maintaining the state which can toggle. It provides various of helper methods.

Features #

Getting started #

Usage #

final mySwitch = ToggleableState();

mySwitch.on();
mySwitch.isOn; // true
mySwitch.isEnabled; // true

mySwitch.off();
mySwitch.isOff; // true
mySwitch.isDisabled; // true

mySwitch.toggle();

int someOtherState = 1;

mySwitch.addListener(turnOnCallback: () => someOtherState++);

Additional information #

  • Please improve this package by contributing!
7
likes
0
points
23
downloads

Publisher

unverified uploader

Weekly Downloads

Helps maintaining the state which can toggle. It provides various of helper methods.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

easy_debounce

More

Packages that depend on toggleable