process_bar_with_sine 1.2.5
process_bar_with_sine: ^1.2.5 copied to clipboard
An enhanced Flutter progress bar, featuring dynamic sine-wave animations.
1.2.5 #
- Fix: Reverted the wave path endpoint normalization introduced in 1.2.4, which caused a visible protrusion and clipping at the start of the wave.
- Fix: Changing any
SineWaveConfigproperty (e.g.amplitude,cycleCount) would recreate theAnimationControllerand reset the wave phase. Now onlyspeedchanges adjust the controller duration; other properties no longer restart the animation.
1.2.4 #
- Add:
reservedAmplitudeparameter onSineWaveConfig. When set, the component height is always calculated using the larger ofamplitudeandreservedAmplitude, preventing the bar from changing height when the actual wave amplitude is adjusted. - Fix: Sine-wave progress bar appeared slightly longer than the flat bar because the wave path endpoints were not aligned to the midline, causing stroke caps to project at an angle. The path now starts and ends at
centerYfor consistent horizontal caps.
1.2.3 #
- Refactor: Replaced the
_userIsDraggingThumbboolean flag with a nullable_dragValueoverride. When_dragValueisnull, the thumb position is always computed live fromwidget.progress, eliminating the risk of a stuck drag state permanently blocking playback tracking.
1.2.2 #
- Fix: The gesture recognizer was missing an
onCancelbinding, causing the internal drag state to be permanently locked totruewhen a drag was terminated abnormally, preventing playback progress from ever driving the thumb again.
1.2.1 #
- Fix:
_finishDragdid not recalculate_thumbValuefromwidget.progresswhen the drag ended, causing the thumb to fail to immediately follow playback progress. - Fix:
_proportionOfTotalwas missing 0–1 clamping, which could cause the thumb to exceed bar bounds when switching tracks if the previous progress exceeded the new total duration.
1.2.0 #
- Refactor: Rewrote from
LeafRenderObjectWidgetto aStatefulWidget+CustomPainterarchitecture. - Add:
ThumbShapeenum withcircleandline(vertical rounded rectangle) shapes. - Add:
lineThumbWidth,lineThumbHeight,lineThumbBorderRadiusparameters for precise control over the line thumb's dimensions and corner radius. - Add:
barBorderRadiusparameter for custom track corner radius, overriding the defaultbarCapShapebehavior. - Add:
SineWaveConfigclass andsineWaveConfigparameter to enable a sine-wave animation on the played portion of the bar. - Add:
thumbGapparameter, which splits the bar into two segments around the thumb, with both ends independently applying corner radius. - Add:
thumbBarGapparameter to control the visual gap between bar ends and the thumb. - Add: Value equality (
==/hashCode) onSineWaveConfigto prevent spurious animation controller resets when the parent rebuilds. - Change: Replaced
withOpacitywithwithValuesto resolve deprecation warnings on Flutter 3.10+.
1.1.1 #
- Update pubspec.yaml version.
1.1.0 #
- Add:
thumbWidgetparameter, allowing a custom widget to be used as the thumb in place of the built-in drawing.
1.0.1 #
- Fix: Frequent progress bar jitter during playback.
1.0.0 #
- Initial release, implementing a basic media progress bar widget.
- Support for drag-to-seek, buffered progress display.
- Support for time labels (above / below / sides / hidden).
- Support for
BarCapShape.roundandBarCapShape.squarecap styles. - Support for thumb glow effect and accessibility semantics.