shimmer_progress_bar 1.0.1
shimmer_progress_bar: ^1.0.1 copied to clipboard
A customizable linear progress bar with animation, shimmer effect, and percentage indicator for Flutter.
1.0.1 Fix shimmer crash and enhance disposal safety #
π Bug Fixes #
- Fixed crash when navigating away from pages using
ShimmerProgressBar
caused by calling.stop()
on a disposedAnimationController
. - Guarded
VisibilityDetector
callbacks withmounted
and.isAnimating
checks to avoid lifecycle-related crashes.
β Improvements #
- Added defensive checks in
dispose()
to safely stop shimmer animations before disposing the controller. - Ensured shimmer gracefully deactivates when widget is unmounted or visibility drops to zero.
π‘ Recommendation #
All users using VisibilityDetector
should upgrade to this version to avoid crashes in navigation-heavy or dynamic screen flows.
1.0.0 Initial release #
β¨ Features #
- Animated linear progress bar with smooth fill animation.
- Optional shimmer effect with customizable width, color, and duration.
- Configurable percentage display (centered or aligned to progress tip).
- Fully customizable via height, border radius, colors, and text styles.
- Support for accessibility via Semantics widget.
π§ Enhancements #
onProgressComplete
callback when value reaches 100%.minWidthForPercentage
to hide percentage text when space is tight.percentageBuilder
to inject a custom widget instead of plain text.respectReducedMotion
to disable shimmer for accessibility users.- Shimmer pauses automatically when offscreen using
VisibilityDetector
.
π§ͺ Stability & UX #
- Graceful handling of edge cases like 0%, 100%, and invalid constraints.
- Internal animation controllers properly managed and updated.
- Added
copyWith
extension method for quick mutations.
π§° Dev Improvements #
- Refactored codebase for maintainability and flexibility.
- Added full widget test suite with coverage for visual and accessibility edge cases.