FadeShimmerList constructor
const
FadeShimmerList({
- Key? key,
- required int itemCount,
- required double itemHeight,
- double? itemWidth,
- double spacing = 16.0,
- EdgeInsetsGeometry padding = const EdgeInsets.all(16.0),
- FadeTheme? fadeTheme,
- Color? highlightColor,
- Color? baseColor,
- double radius = 8.0,
- bool useGradient = false,
- ShimmerDirection shimmerDirection = ShimmerDirection.leftToRight,
- int animationDuration = 1200,
- bool staggered = true,
- 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.',
);