M3ECarouselView constructor
const
M3ECarouselView({
- Key? key,
- EdgeInsets? padding,
- Color? backgroundColor,
- double? elevation,
- ShapeBorder? shape,
- Clip? itemClipBehavior,
- WidgetStateProperty<
Color?> ? overlayColor, - bool itemSnapping = false,
- double shrinkExtent = 0.0,
- M3ECarouselController? controller,
- Axis scrollDirection = Axis.horizontal,
- bool reverse = false,
- ValueChanged<
int> ? onTap, - M3EHapticFeedback haptic = M3EHapticFeedback.none,
- bool enableSplash = true,
- bool infinite = false,
- ScrollPhysics? physics,
- required double itemExtent,
- required List<
Widget> children, - ValueChanged<
int> ? onIndexChanged,
Creates a Material Design carousel.
Implementation
const M3ECarouselView({
super.key,
this.padding,
this.backgroundColor,
this.elevation,
this.shape,
this.itemClipBehavior,
this.overlayColor,
this.itemSnapping = false,
this.shrinkExtent = 0.0,
this.controller,
this.scrollDirection = Axis.horizontal,
this.reverse = false,
this.onTap,
this.haptic = M3EHapticFeedback.none,
this.enableSplash = true,
this.infinite = false,
this.physics,
required double this.itemExtent,
required this.children,
this.onIndexChanged,
}) : consumeMaxWeight = true,
flexWeights = null,
itemBuilder = null,
itemCount = null;