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.
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.
- lite_rolling_switch
Customizable rolling switch widget with animations, colors, and icon support.
46Compare - app_badge_plus
Flutter plugin to set numeric badges on app icons for iOS, Android, and macOS
84Compare - super_drag_and_drop
Native drag and drop for Flutter across desktop, mobile and web.
78Compare - flutter_sliding_toast
Displays customizable sliding and popup toasts with animations, queueing, and stacking modes.
71Compare