easyShimmer method

Widget easyShimmer({
  1. required Color baseColor,
  2. required Color highlightColor,
  3. bool enabled = true,
  4. int loop = 0,
  5. Duration period = const Duration(milliseconds: 1500),
  6. ShimmerDirection shimmerDirection = ShimmerDirection.ltr,
})

this widget named easyShimmer you can use this method to convert in shimmer

Implementation

Widget easyShimmer({
  /// this is base color of your shimmer
  required Color baseColor,

  /// this is highlight color of your shimmer
  required Color highlightColor,

  /// enabled or not
  bool enabled = true,

  /// for using loop
  int loop = 0,

  /// shimmer duration
  Duration period = const Duration(milliseconds: 1500),

  /// shimmer direction
  ShimmerDirection shimmerDirection = ShimmerDirection.ltr,
}) {
  return SizedBox(
    child: Shimmer.fromColors(
      enabled: enabled,
      baseColor: baseColor,
      highlightColor: highlightColor,
      direction: shimmerDirection,
      loop: loop,
      period: period,
      child: this,
    ),
  );
}