rolling_switch

Last updated:

0 purchases

rolling_switch Image
rolling_switch Images
Add to Cart

Description:

rolling switch

Full customizable rolling switch widget for flutter apps forked from this library

Custom Switch button with attractive animation,
made to allow you to customize colors, icons, custom widget and other cosmetic content.
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:
roling_switch: ^latest_version
copied to clipboard
Basic Implementation #
Using the icon constructor

RollingSwitch.icon(
onChanged: (bool state) {
print('turned ${(state) ? 'on' : 'off'}');
},
rollingInfoRight: const RollingIconInfo(
icon: Icons.flag,
text: Text('Flag'),
),
rollingInfoLeft: const RollingIconInfo(
icon: Icons.check,
backgroundColor: Colors.grey,
text: Text('Check'),
),
),
copied to clipboard
More possibilities


Create a custom widget, use:
const RollingWidgetInfo(icon: FlutterLogo())
copied to clipboard



Change color background between transactions left/right
RollingSwitch.icon(
rollingInfoRight: const RollingIconInfo(
backgroundColor: Colors.green,
),
rollingInfoLeft: const RollingIconInfo(
backgroundColor: Colors.grey,
),
)
copied to clipboard



Change Circular color
RollingSwitch.icon(
...
circularColor: (icon: FlutterLogo())
)
copied to clipboard



Create a custom text indicator
RollingSwitch.icon(
rollingInfoRight: const RollingIconInfo(
text: Text('Flag'),
),
rollingInfoLeft: const RollingIconInfo(
text: Text('Stack'),
),
)
copied to clipboard



Enable drag switch
RollingSwitch.icon(
...
enableDrag: true
)
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.