CarouselView constructor

const CarouselView({
  1. Key? key,
  2. EdgeInsets? padding,
  3. Color? backgroundColor,
  4. double? elevation,
  5. ShapeBorder? shape,
  6. WidgetStateProperty<Color?>? overlayColor,
  7. bool itemSnapping = false,
  8. double shrinkExtent = 0.0,
  9. CarouselController? controller,
  10. Axis scrollDirection = Axis.horizontal,
  11. bool reverse = false,
  12. ValueChanged<int>? onTap,
  13. bool enableSplash = true,
  14. required double itemExtent,
  15. required List<Widget> children,
})

Creates a Material Design carousel.

Implementation

const CarouselView({
  super.key,
  this.padding,
  this.backgroundColor,
  this.elevation,
  this.shape,
  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;