App Shimmer
A customizable and easy-to-use Flutter package for creating beautiful shimmer loading effects.
Perfect for showing loading states in your app with pre-built widgets for ListTiles, ListViews, Grids, and custom containers.
π₯ New in v1.0.4 β Full support for customizable shimmer gradients with directions and color control.
π Now featured on Flutter Gems β discover and integrate with confidence.
Features
β¨ Pre-built Shimmer Widgets: Ready-to-use shimmer effects for common UI patterns
π¨ Highly Customizable: Full control over colors, sizes, shapes, and now gradient animations
π¦ Lightweight: Minimal dependencies and optimized performance
π Easy Integration: Simple API that works out of the box
π― Type Safe: Built with Flutter's latest best practices
Widgets Included
AppShimmerContainerβ Single shimmer containerAppShimmerContainerListβ Horizontal or vertical list of shimmer containersAppShimmerListTileβ Shimmer effect for ListTile layoutsAppShimmerListTileListViewβ ListView of shimmer ListTilesAppShimmerGridβ Grid layout shimmer effectAppShimmerContainerExpandedβ Expanded shimmer container
Installation
Add this to your package's pubspec.yaml file:
dependencies:
app_shimmer: ^1.0.4
Then run:
flutter pub get
Usage
Basic Container
import 'package:app_shimmer/app_shimmer.dart';
AppShimmerContainer(
skeletonContainerStyle: ShimmerContainerStyle(
width: 200,
height: 100,
borderRadiusDouble: 12,
),
)
ListTile with Shimmer
AppShimmerListTile(
padding: EdgeInsets.all(16),
leadingStyle: ShimmerContainerStyle(
width: 40,
height: 40,
boxShape: BoxShape.circle,
),
titleStyle: ShimmerContainerStyle(
width: 150,
height: 16,
),
subtitleStyle: ShimmerContainerStyle(
width: 100,
height: 12,
),
trailingStyle: ShimmerContainerStyle(
width: 40,
height: 40,
boxShape: BoxShape.circle,
),
contentSpacing: 16,
verticalSpacing: 4,
hasContainer: true,
)
ListView with Shimmer
AppShimmerListTileListView(
itemCount: 5,
hasContainer: true,
titleStyle: ShimmerContainerStyle(
width: 200,
height: 16,
),
subtitleStyle: ShimmerContainerStyle(
width: 150,
height: 12,
),
leadingStyle: ShimmerContainerStyle(
width: 40,
height: 40,
boxShape: BoxShape.circle,
),
dividerWidget: SizedBox(height: 8),
)
Grid with Shimmer
AppShimmerGrid(
itemCount: 6,
containerStyle: ShimmerContainerStyle(
width: double.infinity,
height: 90,
borderRadiusDouble: 8,
customColor: Colors.grey.shade300,
),
iconContainerStyle: ShimmerContainerStyle(
width: 35,
height: 35,
boxShape: BoxShape.circle,
),
crossAxisCount: 3,
crossAxisSpacing: 8,
mainAxisSpacing: 8,
)
Custom Colors
ShimmerContainerStyle(
width: 200,
height: 100,
customColor: Color(0xFF898AC4), // Your custom color
borderRadiusDouble: 12,
)
β¨ Custom Gradients (v1.0.4+)
App Shimmer now supports fully customizable shimmer gradients through the new AppShimmerCustomGradient class.
You can control the direction, colors, stops, and tile mode of the animation for unique lighting effects.
Example
AppShimmerContainer(
customGradient: AppShimmerCustomGradient(
direction: ShimmerDirection.diagonalTopLeftToBottomRight,
colors: const [
Color(0x00FFFFFF),
Color(0x33FFFFFF),
Color(0x99FFFFFF),
Color(0x33FFFFFF),
Color(0x00FFFFFF),
],
stops: const [0.0, 0.25, 0.5, 0.75, 1.0],
),
skeletonContainerStyle: const ShimmerContainerStyle(
width: 200,
height: 100,
borderRadiusDouble: 8,
),
)
### Container List (Horizontal)
```dart
AppShimmerContainerList(
itemCount: 5,
isColumn: false, // Horizontal
skeletonContainerStyle: ShimmerContainerStyle(
width: 100,
height: 100,
borderRadiusDouble: 12,
),
)
ShimmerContainerStyle Properties
| Property | Type | Default | Description |
|---|---|---|---|
width |
double |
required | Width of the shimmer container |
height |
double? |
null | Height of the shimmer container |
borderRadiusDouble |
double |
8 | Border radius for rectangle shapes |
boxShape |
BoxShape |
BoxShape.rectangle | Shape of the container (rectangle or circle) |
customColor |
Color? |
null | Custom color for the shimmer base |
Example
Check out the example folder for a complete working example with different shimmer patterns and use cases.
Screenshots
Shimmer loading effects for ListTiles, ListViews, and Grids
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Authors
Created by Cristian Cruz
Support
If you find this package useful, please give it a β on GitHub!
For issues, feature requests, or questions, please visit our issue tracker.
Libraries
- app_shimmer
- App Shimmer - A comprehensive Flutter shimmer loading library