flex_switch 1.1.1 copy "flex_switch: ^1.1.1" to clipboard
flex_switch: ^1.1.1 copied to clipboard

A multi-option segmented control for Flutter. Keyboard accessible, RTL-aware, drag-to-select, themable, and fast.

Changelog #

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.1.1 - 2025-09-29 #

Thumb and overlay gutter now match outer padding at the track edges.

1.1.0 - 2025-09-16 #

Added proportional layout, drag commit options, and per-option disabling.

Added #

  • Proportional layout: FlexSwitchLayout.proportional (segments sized to content).
  • Drag behavior controls:
    • DragCommitBehavior (immediate vs. commit on release with preview).
    • thumbDragOnly to require drags to start on the selected thumb.
  • Per-option disable: SwitchOption.enabled (dim + skip selection on drag).
  • Style: thumbPressScale, hideDividersAdjacentToThumb, dividerFadeDuration, dividerFadeCurve.

Improved #

  • Smoother label/icon transitions; avoids text reflow on weight change.
  • Divider fade near the thumb; pressed feedback and pinned-edge thumb scale.
  • Example app with new toggles and demos.

1.0.0 - 2025-09-15 #

Initial release.

Added #

  • Core FlexSwitch widget with:
    • Boolean factory: FlexSwitch.boolean
    • Enum factory: FlexSwitch.fromEnum
    • Values factory: FlexSwitch.fromValues
  • Drag-to-select across segments
  • Full keyboard support (Left/Right, Home/End, Enter/Space), RTL-aware
  • A11y with Semantics + focus ring
  • Theming via FlexSwitchStyle (colors, radii, dividers, ripple, animation)
  • Example app under example/
2
likes
160
points
202
downloads
screenshot

Publisher

verified publishertomars.tech

Weekly Downloads

A multi-option segmented control for Flutter. Keyboard accessible, RTL-aware, drag-to-select, themable, and fast.

Repository (GitHub)
View/report issues

Topics

#segmented-control #switch #toggle #cupertino #ios

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

equatable, flutter

More

Packages that depend on flex_switch