M3ECarouselView.weighted constructor

const M3ECarouselView.weighted({
  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. bool infinite = false,
  18. ScrollPhysics? physics,
  19. required List<int> flexWeights,
  20. required List<Widget> children,
  21. ValueChanged<int>? onIndexChanged,
})

Creates a scrollable list where the size of each child widget is dynamically determined by the provided flexWeights.

Implementation

const M3ECarouselView.weighted({
  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,
  this.infinite = false,
  this.physics,
  required List<int> this.flexWeights,
  required this.children,
  this.onIndexChanged,
}) : itemExtent = null,
     itemBuilder = null,
     itemCount = null;