Search packages, repositories and app categories

action_slider cover
Package detailsv0.7.0

action_slider

A slider to confirm actions and provide feedback on the success of these after subsequent loading.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
24.4K
Likes
426
Pub points
150

Install package

flutter pub add action_slider

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Action Slider is a Flutter widget that enables users to confirm actions by sliding, providing visual feedback on success after a loading state. It enhances user interaction by combining gesture-based confirmation with clear success indicators, improving the experience for critical operations like deleting items or submitting forms. The slider supports multiple platforms and integrates seamlessly into existing UIs with customizable styling and behavior.

Use cases

  • Confirming destructive actions
  • Submitting forms with user intent verification
  • Enhancing UX in settings or profile management
  • Providing feedback after action execution
  • Integrating gesture-based confirmation in mobile and web apps

Key features

  • Gesture-based action confirmation
  • Visual feedback on success
  • Loading state integration
  • Cross-platform support (Android, iOS, Web, macOS, Windows, Linux)
  • Customizable appearance and behavior

Suitable for

  • Developers building interactive forms
  • Apps requiring user confirmation for sensitive actions
  • UX-focused applications
  • Multi-platform Flutter projects
  • Design systems emphasizing intuitive gestures

Considerations

  • Requires careful handling of loading states
  • May need accessibility enhancements for screen readers
  • Not ideal for simple button clicks
  • Limited to use cases needing explicit user confirmation
  • Potential performance impact with complex animations

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

pub.dev github likes downloads pub points license buy me a coffee

If you like this package, please leave a like there on pub.dev and star on GitHub.

A fully customizable slider to confirm actions and provide feedback on the success. It supports different states like loading, success and failure.

LTR and RTL are both supported.
For a switch with a similar look, you can check out animated_toggle_switch.

Examples

ActionSlider.standard() with SliderBehavior.stretch
action_slider_example_snake
action_slider_example_expanded

ActionSlider.dual()
action_slider_example_dual
action_slider_example_dual_customized

ActionSlider.standard() with TextDirection.rtl
action_slider_example_rtl

ActionSlider.standard() with SliderIconAnimation.roll
action_slider_example_rolling

ActionSlider.standard() with SliderBehavior.stretch and SliderIconAnimation.roll
action_slider_example_rolling_snake

You can build your own sliders with ActionSlider.custom()
action_slider_example_custom

Easy Usage

Easy to use and highly customizable.

ActionSlider.standard(
    child: const Text('Slide to confirm'),
    action: (controller) async {
        controller.loading(); //starts loading animation
        await Future.delayed(const Duration(seconds: 3));
        controller.success(); //starts success animation
    },
    ... //many more parameters
)

Two directions with ActionSlider.dual

ActionSlider.dual(
    child: const Text('Slide to confirm'),
    startAction: (controller) async {
        controller.success(expanded: true, side: SliderSide.start); //starts success animation with an expanded slider
    },
    endAction: (controller) async {
        controller.success(); //starts success animation
    },
    ... //many more parameters
)

Maximum customizability with ActionSlider.custom.

ActionSlider.custom(
    foregroundBuilder: (context, state, child) => ...,
    backgroundBuilder: (context, state, child) => ...,
    outerBackgroundBuilder: (context, state, child) => ...,
    action: (controller) => ...,
    ... //many more parameters
)

Categories

Source repository

Projects using this package