Last updated:
0 purchases
animated switcher
Simple widget switches with animation
Usage #
class SomeWidget extends StatefulWidget {
const SomeWidget({Key? key}) : super(key: key);
@override
State<SomeWidget> createState() => _SomeWidgetState();
}
class _SomeWidgetState extends State<SomeWidget> {
bool switched = false;
@override
Widget build(BuildContext context) => Column(
children: [
animatedSwitch(Container(
width: 100,
height: 100,
color: switched ? Colors.blue : Colors.red,
), 1000),
SwitchListTile(
value: switched,
onChanged: (f) => setState(() {
switched = f;
}))
],
);
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.