shimmer_flutter 1.0.1 copy "shimmer_flutter: ^1.0.1" to clipboard
shimmer_flutter: ^1.0.1 copied to clipboard

Shimmer Package for flutter

Shimmer

Features #

This package is for custom shimmer loader animation container which gives you a modern and elegant loading animation to your flutter apps.

Installation #

Step 1 : Add the latest version of the package to your pubspec.yaml file and run (flutter pub get) or (dart pub get)


dependencies:
    shimmer_flutter: ^1.0.1

Step 2 : Import the package and use it in your flutter app.


import 'package:shimmer_container/shimmer.dart';   

Example #

There are a number of properties that you can modify:

  • height
  • width
  • baseColor
  • animationDuration
  • cornerRadius

class XYZScreen extends StatelessWidget {
  const XYZScreen({Key? key}) : super(key: key);

  bool? isLoading;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: isLoading ? Shimmer(width: MediaQuery
            .of(context)
            .size
            .width * 0.6,
            height: 16.0,
            baseColor: Colors.grey[200],
            animationDuration: 800,
            //ms
            cornerRadius: 10.0
        )
            : Text('Some Data'),
      ),
    );
  }
}

Next Goals #

  • Add more animation or custom effects.
6
likes
120
pub points
41%
popularity

Publisher

unverified uploader

Shimmer Package for flutter

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on shimmer_flutter