load_switch 1.1.0 copy "load_switch: ^1.1.0" to clipboard
load_switch: ^1.1.0 copied to clipboard

outdated

A highly customizable toggle switch with a loading state.

Version Version

Minimal code #

bool value = false;

Future<bool> _getFuture() async {
    await Future.delayed(const Duration(seconds: 2));
    return !value;
}

LoadSwitch(
    value: value,
    future: _getFuture,
    onChange: (v) {
        value = v;
        print('Value changed to $v');
        setState(() {});
    },
    onTap: (v) {
        print('Tapping while value is $v');
    },
)

Issues / Features #

Found a bug or want a new feature? Open an issue in the Github repository of the project.

65
likes
0
points
2.86k
downloads

Publisher

verified publisheresentis.dev

Weekly Downloads

A highly customizable toggle switch with a loading state.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on load_switch