Package selection guidance compiled from public package information, community data, and project usage.
Shimmer is a Flutter package that simplifies the addition of shimmer loading effects to UI components, creating a smooth, animated placeholder appearance. It's ideal for mimicking content loading states in lists, cards, or images, enhancing user experience during data fetching. The package supports all major platforms including Android, iOS, Web, macOS, Windows, and Linux, ensuring consistent behavior across devices. With minimal setup, developers can quickly implement visually appealing loading indicators without writing complex animations.
Use cases
Loading placeholders in lists
Animated card placeholders
Image loading skeletons
Improving UX during data fetch
Dynamic content previews
Key features
Simple API integration
Cross-platform support
Customizable shimmer color
Smooth animation effect
Lightweight and performant
Suitable for
UI designers seeking visual polish
Developers building dynamic content screens
Apps with frequent data loading
Prototyping interactive interfaces
Enhancing perceived performance
Considerations
Not suitable for static content
Requires proper placement within widget tree
May impact performance if overused
Limited customization beyond basic styling
Best used with transparent backgrounds
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Shimmer
A lightweight Flutter widget that paints a moving highlight over placeholder
UI. Typical uses are skeleton screens while data loads, and a sliding highlight
on a call to action.
Install
dependencies:shimmer:^4.0.0material_ui:^1.0.1
shimmer 4.0 uses Flutter's standalone material_ui package (Flutter 3.44+). Apps that still import package:flutter/material.dart can wrap those subtrees in MaterialUiCompatibilityBridge.
Shimmer.fromColors is the usual constructor. Build the child from solid
shapes (Container, Row, Column). The gradient replaces those colors;
transparent pixels stay transparent.
*Required on Shimmer(...). Shimmer.fromColors takes baseColor and
highlightColor instead.
Performance
Wrap a list of placeholders in one Shimmer, not one Shimmer per row.
Keep child simple and static. Fancy widgets (images, text with decoration,
elevation) often look wrong because the shader replaces their colors.
Toggle enabled to false when loading finishes so the ticker stops.
Example
The example/ app shows a loading list and a “slide to unlock” highlight.
From the repository root:
cd example && flutter run
How it works
Shimmer drives an AnimationController and paints a ShaderMaskLayer over
the child (BlendMode.srcIn). The highlight rectangle is three times the
child size so the band can travel fully across the widget.