animated_switch

Last updated:

0 purchases

animated_switch Image
animated_switch Images
Add to Cart

Description:

animated switch

Customizable animated switch widget for flutter apps

Custom Switch button made to allow you to customize colors, icons, and off/on text.
Manage the widget states in the same way you do with the classical material's switch widget.


Quick Start #
Import this library into your project:
animated_switch: ^latest_version
copied to clipboard
Or do:
$ flutter pub add animated_switch
copied to clipboard
Basic Implementation #
Using the callback

AnimatedSwitch(
onChanged: (bool state) {
print('turned ${(state) ? 'on' : 'off'}');
},
),
copied to clipboard
More possibilities


Change colors
AnimatedSwitch(
...
colorOn: Colors.blue,
colorOff: Colors.grey,
indicatorColor: Colors.limeAccent,
)
copied to clipboard



Change icons
AnimatedSwitch(
...
iconOff: Icons.lock_open,
iconOn: Icons.lock,
)
copied to clipboard



Create custom text indicators
AnimatedSwitch(
...
textOn: "On",
textOff: "Off",
textStyle: TextStyle(color: Colors.white, fontSize: 20),
)
copied to clipboard



Previews #

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.