drag_wave_slider 0.2.0
drag_wave_slider: ^0.2.0 copied to clipboard
A customizable drag slider with beautiful wave animation effect for Flutter apps. Perfect for slide-to-action interactions with animated wave trails.
0.2.0 #
Added #
- Completion animation — on success the thumb glides to the end of the track
and its icon morphs into a checkmark. Configurable via
animateCompletion,completionDuration,completionHoldDurationandcompletionIcon; setanimateCompletion: falsefor the previous instantaneous behaviour - Added
dragAnywhere(defaulttrue) — a drag may now start anywhere on the track instead of only on the thumb. Set tofalsefor the old thumb-only behaviour - Added
textStyle— fullTextStylecontrol over the label, merged over the built-in defaults. Previously onlytextColorwas configurable - Added
resetDurationandresetCurve— the snap back to the start is now animated. PassDuration.zeroto snap instantly
Fixed #
onSlideCompletecould fire many times for a single slide. The threshold was checked on every drag update with no latch, so holding the thumb past the threshold re-triggered the callback on every pointer frame — a "slide to pay" could charge repeatedly. It now fires exactly once per completed slide and re-arms only after the slider drops back below the threshold- RTL thumb icon was wrong. The default icon ternary returned
Icons.arrow_rightfor both directions; RTL now correctly showsIcons.arrow_left waveDurationchanges were ignored after the first build. AddeddidUpdateWidgetso the wave controller picks up new durations and reacts toenabledtoggles- The wave ticker ran forever. It now only animates while the wave trail is actually visible, instead of repeating on every screen using the widget
- Added an assert that
slideThresholdis> 0.0and<= 1.0. Note that values above1.0(previously usable as a "never complete" trick) now throw
Breaking #
slideThresholdvalues outside(0.0, 1.0]now assert. Use1.0if you want a slider that only completes on a full drag
0.1.0 #
- Added
onSlideChange(double value)— real-time drag progress callback (0.0–1.0) - Added
resetOnCompleteflag — control whether thumb snaps back after completion - Added
enabledflag — disable slider interaction with greyed-out visual state - Added
thumbWidget— pass any custom Widget as the thumb - Added
textWidget— pass any custom Widget as the slider label - Added
thumbGradient— gradient fill for the thumb instead of flat color - Refactored into
src/files (wave_clipper.dart,drag_wave_slider_widget.dart) - Fixed
shouldReclipbug — now correctly responds towaveAmpandisRtlchanges - Replaced deprecated
withOpacitywithwithValues(alpha:)throughout - Improved wave rendering performance using
quadraticBezierToinstead of per-pixellineToloops - Added comprehensive widget tests
0.0.1 #
- Initial release
- Drag slider with animated wave trail effect
- Full customization support (colors, text, height, wave parameters)
- RTL support
- Custom icon support
- Zero external dependencies