CarouselView constructor

const CarouselView({
  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. CarouselController? controller,
  11. Axis scrollDirection = Axis.horizontal,
  12. bool reverse = false,
  13. ValueChanged<int>? onTap,
  14. bool enableSplash = true,
  15. required double itemExtent,
  16. required List<Widget> children,
})

Creates a Material Design carousel.

Implementation

const CarouselView({
  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.enableSplash = true,
  required double this.itemExtent,
  required this.children,
}) : consumeMaxWeight = true,
     flexWeights = null;