M3ECarouselView.builder constructor

const M3ECarouselView.builder({
  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. M3ECarouselController? controller,
  11. Axis scrollDirection = Axis.horizontal,
  12. bool reverse = false,
  13. ValueChanged<int>? onTap,
  14. M3EHapticFeedback haptic = M3EHapticFeedback.none,
  15. bool enableSplash = true,
  16. required double itemExtent,
  17. required NullableIndexedWidgetBuilder? itemBuilder,
  18. int? itemCount,
  19. ValueChanged<int>? onIndexChanged,
  20. bool infinite = false,
  21. ScrollPhysics? physics,
})

Creates a scrollable carousel with fixed-sized items created on demand.

Implementation

const M3ECarouselView.builder({
  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,
  required double this.itemExtent,
  required this.itemBuilder,
  this.itemCount,
  this.onIndexChanged,
  this.infinite = false,
  this.physics,
}) : consumeMaxWeight = true,
     flexWeights = null,
     children = const <Widget>[];