Skip to content
pubscout

sliding_switch

1.1.0, released 4 years ago by codeapprun.io

A simple customizable switch widget with sliding animation and selection state support.

WASM-ready
$ flutter pub add sliding_switch
Source repository

What it does

Provides a sliding switch widget that can be fully customized with desired width, height, colors, text, and icons. It maintains its own selection state and handles tap, double tap, and swipe interactions.

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

Use it when

  • You need a custom animated sliding switch instead of the standard platform switches.
  • You want to support text or icon toggles within a single switch component.

Skip it when

  • You need a standard platform-native switch widget.
  • You require a complex form field wrapper out of the box.

Strengths

  • Fully customizable width, colors, text, and icons.
  • Maintains selection state easily.
  • Supports tap, double tap, and swipe events.

Weaknesses

  • Limited to a single specific sliding switch widget design.
  • Not documented for integration with standard Form validation without extra wrapping.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
SlidingSwitch(
 value: false,
 width: 250,
 onChanged: (bool value) {
   print(value);
 },
)

Alternatives

Packages that do the same job and could replace sliding_switch.