Skip to content
pubscout

slider_button

3.1.0, released 10 months ago by an unverified publisher

A customizable slider button widget for activating or deactivating events.

$ flutter pub add slider_button
Source repository

What it does

Provides a slider button widget that users can drag across to trigger actions like canceling transactions or screens. It offers support for circular or rectangular shapes, customizable sizes, shimmer labels, haptic vibration, and glassmorphism effects.

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

Use it when

  • You need a slide-to-confirm or slide-to-cancel UI pattern.
  • You require a highly customizable slider button with optional haptic feedback and shimmer effects.

Skip it when

  • You need standard buttons like elevated buttons or floating action buttons.
  • You require complex gesture systems outside of a linear horizontal slide track.

Strengths

  • Highly customizable with radius, sizing, colors, glass effect, and RTL support.
  • Includes optional haptic vibration and shimmer text labeling.

Weaknesses

  • Limited to a single specific UI pattern (slider button).
  • Does not document advanced non-linear slider interactions.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2
SliderButton(
  action: () async {
    return true;
  },
  label: Text(
    "Slide to cancel !",
    style: TextStyle(
        color: Color(0xff4a4a4a),
        fontWeight: FontWeight.w500,
        fontSize: 17),
  ),
  icon: Center(
      child: Icon(
    Icons.power_settings_new,
    color: Colors.white,
    size: 40.0,
  )),
  width: 230,
  radius: 10,
  buttonColor: Color(0xffd60000),
  backgroundColor: Color(0xff534bae),
  highlightedColor: Colors.white,
  baseColor: Colors.red,
);

Alternatives

Packages that do the same job and could replace slider_button.

Works with

Packages commonly used together with slider_button: ones it builds on, ones built on it, and its own family.