Skip to content
pubscout

sliding_action_button

1.0.0, released 4 months ago by an unverified publisher

A customizable Flutter slide-to-confirm button widget to reduce accidental triggers.

WASM-ready
$ flutter pub add sliding_action_button
Source repository

What it does

Provides a customizable slide-to-confirm button widget. It requires users to drag a thumb across a track to complete an action, helping prevent accidental taps on irreversible features.

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

Use it when

  • You want to prevent accidental triggers on destructive or irreversible actions like deleting or paying.
  • You need a slide-to-confirm mechanism with circle or square shapes, gradients, and async loaders.

Skip it when

  • You just need a standard button or a generic touch interaction without a sliding mechanism.

Strengths

  • Supports async loader states and completion controllers.
  • Highly customizable with shapes, colors, gradients, and haptic feedback.

Weaknesses

  • Limited to sliding action button use cases.
  • Relies entirely on custom widget rendering rather than standard platform elements.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
SlideToActionButton(
  initialSlidingActionLabel: 'Slide to confirm',
  finalSlidingActionLabel: '✓ Confirmed',
  enabledTrackDecoration: SlideTrackDecoration.fromColor(Colors.orange),
  disabledTrackDecoration: SlideTrackDecoration.fromColor(Colors.grey),
  thumbIcon: const Icon(Icons.check, color: Colors.orange),
  onSlideActionCompleted: () {
    debugPrint('Action confirmed');
  },
)

Alternatives

Packages that do the same job and could replace sliding_action_button.