AdeptShimmer<T> constructor

AdeptShimmer<T>({
  1. Key? key,
  2. Widget? child,
  3. Widget? shimmerChild,
  4. Color? baseColor,
  5. Color? highlightColor,
  6. Gradient? gradient,
  7. Duration period = const Duration(milliseconds: 1500),
  8. ShimmerDirection direction = ShimmerDirection.ltr,
  9. int loop = 0,
  10. bool enabled = true,
})

Implementation

AdeptShimmer({
  Key? key,
  this.child,
  this.shimmerChild,
  this.baseColor,
  this.highlightColor,
  Gradient? gradient,
  this.period = const Duration(milliseconds: 1500),
  this.direction = ShimmerDirection.ltr,
  this.loop = 0,
  this.enabled = true,
})  : _key = key,
      gradient = gradient ??
          LinearGradient(
              begin: Alignment.topLeft,
              end: Alignment.centerRight,
              colors: <Color>[
                baseColor ?? Colors.grey.shade300,
                baseColor ?? Colors.grey.shade300,
                highlightColor ?? Colors.grey.shade100,
                baseColor ?? Colors.grey.shade300,
                baseColor ?? Colors.grey.shade300,
              ],
              stops: const <double>[
                0.0,
                0.35,
                0.5,
                0.65,
                1.0
              ]);