flutter_toggle_switch library

Classes

DayNightToggleSwitch
A switch that morphs between night (moon + stars) and day (sun + rays) scenery. Use it for theme switchers or contextual mode toggles where the metaphor of "on = bright" reinforces the action.
FlipCardToggleSwitch
A compact switch with a rotating card thumb and clear on/off icons.
FlutterToggle
FlutterToggleState
MagneticBlobTabBar
A pill-style tab indicator that stretches like a magnetic blob between positions during a transition, then snaps back to a normal pill shape. Use when you want a playful, energetic feel — e.g. profile filters, story categories, app onboarding.
OrbitToggleSwitch
A switch with a thumb orbit ring and satellite accent.
PowerToggleSwitch
A switch styled like a power button: a glyph-bearing thumb framed by a rotating conic glow when on. Best for "armed / disarmed" or "live / off" states where the user expects a hardware-button feel.
PrismToggleSwitch
A faceted gradient switch with a crisp prism thumb.
PulseToggleSwitch
A switch with a breathing thumb and concentric pulse rings that radiate outward while the value is on. Communicates a "live / heartbeat" state and is well suited to streaming, recording, or presence indicators.
SegmentBarToggleSwitch
A switch whose track is divided into vertical LED-bar segments that illuminate sequentially as the value turns on. Useful for level indicators (e.g. boost / turbo / brightness) where the user wants the "filling up" affordance.
StackedCardsTabBar
A row of card-style tabs where the active one lifts with a soft shadow and accent border. Inactive cards stay flat. Good for dashboards or settings pages that benefit from a tactile "selected card" affordance.
UnderlineTabBar
Minimal tab strip with a sliding animated underline (and optional indicator dot above it). Use this when you want low-chrome tabs that reduce visual weight on dense screens (e.g. inside cards, modals, drawers).
WaveToggleSwitch
A fluid switch with a wave fill that rises as the value turns on.

Enums

IconPosition
Position of the icon relative to the label text.
ToggleAnimationStyle
Animation style for the selected-tab transition.
ToggleDecorationStyle
Visual treatment for the whole track.
TogglePillStyle
Visual treatment for the selected sliding pill.
ToggleStyle
Major visual variant of the toggle component.

Typedefs

CancelToggle = Future<bool> Function(int? index)
OnToggle = void Function(int? index)
ToggleSwitch = FlutterToggle
Backward-compatibility alias.