drag_wave_slider 0.2.0 copy "drag_wave_slider: ^0.2.0" to clipboard
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, completionHoldDuration and completionIcon; set animateCompletion: false for the previous instantaneous behaviour
  • Added dragAnywhere (default true) — a drag may now start anywhere on the track instead of only on the thumb. Set to false for the old thumb-only behaviour
  • Added textStyle — full TextStyle control over the label, merged over the built-in defaults. Previously only textColor was configurable
  • Added resetDuration and resetCurve — the snap back to the start is now animated. Pass Duration.zero to snap instantly

Fixed #

  • onSlideComplete could 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_right for both directions; RTL now correctly shows Icons.arrow_left
  • waveDuration changes were ignored after the first build. Added didUpdateWidget so the wave controller picks up new durations and reacts to enabled toggles
  • 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 slideThreshold is > 0.0 and <= 1.0. Note that values above 1.0 (previously usable as a "never complete" trick) now throw

Breaking #

  • slideThreshold values outside (0.0, 1.0] now assert. Use 1.0 if 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 resetOnComplete flag — control whether thumb snaps back after completion
  • Added enabled flag — 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 shouldReclip bug — now correctly responds to waveAmp and isRtl changes
  • Replaced deprecated withOpacity with withValues(alpha:) throughout
  • Improved wave rendering performance using quadraticBezierTo instead of per-pixel lineTo loops
  • 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
1
likes
160
points
137
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A customizable drag slider with beautiful wave animation effect for Flutter apps. Perfect for slide-to-action interactions with animated wave trails.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on drag_wave_slider