Skip to content
pubscout

flutter_swipe_button

2.1.3, released 2 years ago by an unverified publisher

A Flutter widget providing a swipe-to-action button to prevent accidental clicks.

WASM-ready
$ flutter pub add flutter_swipe_button
Source repository

What it does

Provides a SwipeButton widget that requires users to swipe horizontally rather than just tap, helping avoid accidental activations or triggers. Supports customization of colors, dimensions, borders, and elevation.

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

Use it when

  • You want to prevent accidental clicks on destructive actions like deleting data or confirming orders.
  • You need a standard slider-to-unlock or swipe-to-confirm UI pattern.

Skip it when

  • You need standard tap-based buttons for fast navigation or simple actions.
  • You require complex multi-step swipe gestures beyond a single horizontal confirmation track.

Strengths

  • Simple and intuitive API with multiple constructors like SwipeButton.expand.
  • Highly customizable track and thumb colors, elevations, and border radii.

Weaknesses

  • Limited to horizontal swipe-to-confirm interactions.
  • Relies entirely on standard widget styling without built-in icon packs or complex animations.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
SwipeButton(
  child: Text(
    "Swipe to ...",
    style: TextStyle(color: Colors.white),
  ),
  onSwipe: () {
    // Action here
  },
)

Alternatives

Packages that do the same job and could replace flutter_swipe_button.