Skip to content
pubscout

rolling_switch

0.0.2, released 6 years ago by an unverified publisher

Custom switch button with attractive animation and customizable colors, icons, and text content.

WASM-ready
$ flutter pub add rolling_switch
Source repository

What it does

Provides a fully customizable rolling switch widget with animations for Flutter applications. It allows developers to customize colors, icons, texts, and use custom widgets for both states, behaving similarly to the standard material switch widget.

AI-written summary of version 0.0.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a custom animated switch button instead of the standard material switch
  • You want to display custom icons, text, or widgets inside a toggle switch

Skip it when

  • You need a standard platform-native switch widget
  • You require complex form validation integrations out of the box

Strengths

  • Highly customizable colors, icons, and text indicators
  • Supports drag-to-switch interactions and custom widgets
  • Null safe implementation with proper animation controller disposal

Weaknesses

  • Very limited third-party ecosystem adoption as an initial release
  • No built-in form field wrapper documented

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
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'),
  ),
)

Alternatives

Packages that do the same job and could replace rolling_switch.