shimmer_x 1.0.14
shimmer_x: ^1.0.14 copied to clipboard
A customizable shimmer loading effect for Flutter.
β ShimmerX #
Supports Null Safety
The ShimmerXn widget allows you to easily create elegant skeleton loaders for Flutter apps. Shimmer is widely used as a standard animation effect for loading placeholders across the development community. With a clean and customizable API, you can quickly add beautiful shimmer effects to Android, iOS, and Web apps.
This package helps you focus on building your core functionality while ensuring users experience smooth loading transitions.
π Examples #
You can find fully working usage examples in the example directory of this repository.
Additional detailed examples are available in this Examples Repository:
π https://github.com/mriyas/shimmer_x/tree/master/example
π How to Use #
Add the package to your pubspec.yaml:
dependencies:
shimmer_x: ^1.0.13
Import it in your Dart code:
import 'package:shimmer_x/shimmer_x.dart';
Wrap any widget with a Shimmer widget:
ShimmerX(
child: Container(
color: Colors.deepPurple,
),
),
π Customizable Parameters #
ShimmerX(
duration: const Duration(seconds: 3),
interval: const Duration(seconds: 5),
color: Colors.white,
colorOpacity: 0.3,
enabled: true,
direction: ShimmerDirection.leftToRight,
child: Container(
color: Colors.deepPurple,
),
),
π§© Parameter Reference #
| Parameter | Type | Description | Default |
|---|---|---|---|
| child | Widget |
The widget on which shimmer is applied | Required |
| color | Color |
Overlay shimmer color | Colors.white |
| colorOpacity | double |
Opacity of shimmer overlay | 0.3 |
| enabled | bool |
Turns shimmer animation on/off | true |
| duration | Duration |
Animation cycle duration | Duration(seconds: 3) |
| interval | Duration |
Delay before repeating animation | Duration.zero |
| direction | ShimmerDirection |
Shimmer motion direction | ShimmerDirection.fromLTRB() |
π License #
This package is available under the MIT License.
π https://github.com/mriyas/shimmer_x/blob/master/LICENSE
π¬ Feedback & Contributions #
Contributions, issue reports, and feature requests are always welcome!
If you create your own shimmer examples, feel free to share them in the examples repository.
π Quick Links #
Happy coding! π