slide_action
0.0.2, released 4 years ago by freedee.me
A highly customizable slide-to-perform-action widget for Flutter.
What it does
Provides a slide action widget allowing users to swipe or slide to execute a callback action. It supports smooth thumb movement, RTL layouts, and asynchronous operations with loading indicators.
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 slide-to-unlock or slide-to-confirm pattern in your UI.
- You want to handle asynchronous operations triggered by a sliding gesture with loading states.
Skip it when
- You need standard buttons or switches rather than a swipe gesture.
- You are looking for complex navigation or state management solutions.
Strengths
- Highly customizable track and thumb builders
- Built-in support for async operations and loading states
- RTL and multi-platform support
Weaknesses
- The disabledColorTint property does not work properly on web due to color blend mode bugs
- Very niche widget with limited scope
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
SlideAction(
trackBuilder: (context, state) {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color: Colors.white,
),
child: Center(
child: Text("Slide me"),
);
);
},
thumbBuilder: (context, state) {
return Container(
margin: const EdgeInsets.all(4),
decoration: BoxDecoration(
color: Colors.orange,
borderRadius: BorderRadius.circular(16),
),
child: const Icon(Icons.chevron_right, color: Colors.white),
);
},
action: () {
debugPrint("Action performed");
},
)Alternatives
Packages that do the same job and could replace slide_action.
- flutter_slidable
Flutter implementation of slidable list item with directional slide actions and dismissal.
97Compare - flutter_joystick
A virtual joystick widget for Flutter applications with high customization.
81Compare - kalender
A customizable calendar widget with day, multi-day, month, and schedule views.
92Compare - syncfusion_flutter_sliders
UI-rich slider, range slider, and range selector widgets with numeric and date support.
90Compare