rolling_switch 0.0.2 copy "rolling_switch: ^0.0.2" to clipboard
rolling_switch: ^0.0.2 copied to clipboard

Custom Switch button with attractive animation, made to allow you to customize colors, icons and other cosmetic content.

example/example.md

Basic use: #

Create a RollingSwitch Widget with Flutter Icons. #


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'),
  ),
)

Create a RollingSwitch Widget with custom Widget. #

RollingSwitch.widget(
  onChanged: (bool state) {
    print('turned ${(state) ? 'on' : 'off'}');
  },
  rollingInfoRight: RollingWidgetInfo(
    icon: FlutterLogo(),
    text: Text('Flutter'),
  ),
  rollingInfoLeft: RollingWidgetInfo(
    icon: FlutterLogo(
      style: FlutterLogoStyle.stacked,
    ),
    backgroundColor: Colors.grey,
    text: Text('Stacked'),
  ),
),
57
likes
150
points
458
downloads

Publisher

unverified uploader

Weekly Downloads

Custom Switch button with attractive animation, made to allow you to customize colors, icons and other cosmetic content.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on rolling_switch