0 purchases
switch button
SwitchButton #
Usage #
bool state = false;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: SwitchButton(
value: state,
onToggle: (val) {
setState(() {
state = val;
});
},
child: Text("Switch Button"),
),
),
);
}
copied to clipboard
Installation #
Add to pubspec.yaml:
dependencies:
switch_button: ^0.0.1
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.