shimmer_animation_kit 0.2.1
shimmer_animation_kit: ^0.2.1 copied to clipboard
A Flutter package providing shimmer loading animations with auto shape detection, synchronized animation scope, manual widgets, theming, and full accessibility support.
0.3.0 #
- Fix: Corrected
homepage,repository, andissue_trackerURLs inpubspec.yamlto point to the valid GitHub repository.
0.2.0 #
Breaking behavior change — ShimmerScope now applies a ShaderMask over
its entire child subtree, just like the popular shimmer package. This makes
the gradient flow across every widget in the skeleton layout simultaneously
with a single paint operation and zero per-widget rebuild cost.
ShimmerScope— appliesShaderMask(BlendMode.srcATop)over its child subtree. Place skeleton content (white-filled boxes) inside it; real content should be outside.ShimmerKit— newskeletonparameter. When provided andisLoading: true, wraps the skeleton in aShimmerScopeautomatically. Omittingskeletonfalls back to the previous auto-detect mode.ShimmerBox,ShimmerCircleWidget,ShimmerTextWidget— now render solid white containers inside aShimmerScope(the parentShaderMaskhandles the gradient). When used standalone they render a static base-color placeholder. This removes per-frame rebuilds inside a scope.ShimmerScope.hasScope(context)— new helper that checks for a scope ancestor without registering a rebuild dependency.ShimmerList— skips double-wrapping when already inside a scope.
Migration #
Before (auto-detect, often incomplete on complex screens):
ShimmerScope(
child: ShimmerKit(isLoading: _loading, child: MyScreen()),
)
After (explicit skeleton, full coverage):
ShimmerKit(
isLoading: _loading,
skeleton: Column(children: [
ShimmerBox(width: double.infinity, height: 180),
ShimmerTextWidget(lines: 3, width: 240),
]),
child: MyScreen(),
)
0.1.1 #
- Fix:
ShimmerScope.of()no longer throws an assertion error when noShimmerScopeancestor is present. It now returns0.5as a safe fallback, so manual widgets (ShimmerBox,ShimmerCircleWidget, etc.) can be used without a scope — they will display a static shimmer instead of animating. - Added
ShimmerScope.maybeOf(context)→double?for callers that want to distinguish "scope present" from "no scope".
0.1.0 #
- Initial release.
ShimmerKit— auto shape detection via widget tree walking.ShimmerScope— sharedAnimationControllerfor synchronized shimmer across the widget tree.- Manual widgets:
ShimmerBox,ShimmerCircleWidget,ShimmerTextWidget,ShimmerList. ShimmerTheme—ThemeExtensionwith light and dark defaults.ShimmerDirection— 5 gradient directions:leftToRight,rightToLeft,topToBottom,bottomToTop,diagonal.- Accessibility: respects
MediaQuery.disableAnimations, exposesSemantics(label: 'Loading'). - Zero external dependencies.
- Supports Android, iOS, Web, macOS, Windows, Linux.