M3ECarouselView.weightedBuilder constructor

const M3ECarouselView.weightedBuilder({
  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. bool consumeMaxWeight = true,
  14. ValueChanged<int>? onTap,
  15. M3EHapticFeedback haptic = M3EHapticFeedback.none,
  16. bool enableSplash = true,
  17. required List<int> flexWeights,
  18. required NullableIndexedWidgetBuilder? itemBuilder,
  19. int? itemCount,
  20. ValueChanged<int>? onIndexChanged,
  21. bool infinite = false,
  22. ScrollPhysics? physics,
})

Creates a scrollable carousel with weighted items created on demand.

Implementation

const M3ECarouselView.weightedBuilder({
  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.consumeMaxWeight = true,
  this.onTap,
  this.haptic = M3EHapticFeedback.none,
  this.enableSplash = true,
  required List<int> this.flexWeights,
  required this.itemBuilder,
  this.itemCount,
  this.onIndexChanged,
  this.infinite = false,
  this.physics,
}) : itemExtent = null,
     children = const <Widget>[];