multi_state_switch 1.1.0 copy "multi_state_switch: ^1.1.0" to clipboard
multi_state_switch: ^1.1.0 copied to clipboard

A Material 3 switch with any number of states (off / middle / on, ...), built on a discrete Slider so dragging, snapping and semantics come for free.

1.1.0 #

  • 2 states now look exactly like a Material 3 Switch:
    • outline around the track in the "off" position (new inactiveTrackOutlineColor), fading out towards the first position
    • default stepWidth 24 → 20, so a 2-state track is 52px wide like Switch
    • the widget takes up 4px extra on each side and 48px height (60×48 for 2 states), the same touch target as Switch

1.0.0 #

  • initial release
  • MultiStateSwitch: a switch-looking control with any number of fixed positions
  • built on a discrete Slider: dragging, snapping, tap-to-jump, keyboard and semantics included
  • track colour and thumb size animate between "off" and "on"
  • customisable track / thumb colours, step width and animation duration
0
likes
160
points
114
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Material 3 switch with any number of states (off / middle / on, ...), built on a discrete Slider so dragging, snapping and semantics come for free.

Repository (GitHub)
View/report issues

Topics

#switch #toggle #slider #material

License

MIT (license)

Dependencies

flutter, material_ui

More

Packages that depend on multi_state_switch