M3ECarouselView constructor

const M3ECarouselView({
  1. Key? key,
  2. EdgeInsets? padding,
  3. Color? backgroundColor,
  4. double? elevation,
  5. ShapeBorder? shape,
  6. Clip? itemClipBehavior,
  7. WidgetStateProperty<Color?>? overlayColor,
  8. bool itemSnapping = false,
  9. double shrinkExtent = 0.0,
  10. bool scaleItems = true,
  11. M3ECarouselController? controller,
  12. Axis scrollDirection = Axis.horizontal,
  13. bool reverse = false,
  14. ValueChanged<int>? onTap,
  15. M3EHapticFeedback haptic = M3EHapticFeedback.none,
  16. bool enableSplash = true,
  17. bool infinite = false,
  18. ScrollPhysics? physics,
  19. required double itemExtent,
  20. required List<Widget> children,
  21. ValueChanged<int>? onIndexChanged,
  22. ValueChanged<M3ECarouselChangeDetails>? onChange,
  23. double leadingInset = 0,
  24. List<double>? restingExtents,
})

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.scaleItems = true,
  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,
  this.onChange,
  this.leadingInset = 0,
  this.restingExtents,
}) : consumeMaxWeight = true,
     flexWeights = null,
     itemBuilder = null,
     itemCount = null;