FadeShimmerList constructor

const FadeShimmerList({
  1. Key? key,
  2. required int itemCount,
  3. required double itemHeight,
  4. double? itemWidth,
  5. double spacing = 16.0,
  6. EdgeInsetsGeometry padding = const EdgeInsets.all(16.0),
  7. FadeTheme? fadeTheme,
  8. Color? highlightColor,
  9. Color? baseColor,
  10. double radius = 8.0,
  11. bool useGradient = false,
  12. ShimmerDirection shimmerDirection = ShimmerDirection.leftToRight,
  13. int animationDuration = 1200,
  14. bool staggered = true,
  15. int staggeredDelay = 100,
})

Implementation

const FadeShimmerList({
  super.key,
  required this.itemCount,
  required this.itemHeight,
  this.itemWidth,
  this.spacing = 16.0,
  this.padding = const EdgeInsets.all(16.0),
  this.fadeTheme,
  this.highlightColor,
  this.baseColor,
  this.radius = 8.0,
  this.useGradient = false,
  this.shimmerDirection = ShimmerDirection.leftToRight,
  this.animationDuration = 1200,
  this.staggered = true,
  this.staggeredDelay = 100,
}) : assert(
       fadeTheme != null || (highlightColor != null && baseColor != null),
       'You must provide either fadeTheme or both highlightColor and baseColor.',
     );