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. ScrollPhysics? physics,
  13. required double? itemExtent,
  14. 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.physics,
  required this.itemExtent,
  required this.children,
})  : allowFullyExpand = true,
      layoutWeights = null;