CarouselSlider constructor

CarouselSlider({
  1. Key? key,
  2. required List<Widget> children,
  3. SlideTransform slideTransform = const DefaultTransform(),
  4. SlideIndicator? slideIndicator,
  5. double viewportFraction = 1,
  6. bool enableAutoSlider = false,
  7. Duration autoSliderDelay = const Duration(seconds: 5),
  8. Duration autoSliderTransitionTime = const Duration(seconds: 2),
  9. Curve autoSliderTransitionCurve = Curves.easeOutQuad,
  10. bool keepPage = true,
  11. ScrollPhysics scrollPhysics = const BouncingScrollPhysics(),
  12. Axis scrollDirection = Axis.horizontal,
  13. bool unlimitedMode = false,
  14. int initialPage = 0,
  15. ValueChanged<int>? onSlideChanged,
  16. VoidCallback? onSlideStart,
  17. VoidCallback? onSlideEnd,
  18. CarouselSliderController? controller,
  19. Clip clipBehavior = Clip.hardEdge,
})

Implementation

CarouselSlider({
  Key? key,
  required List<Widget> this.children,
  this.slideTransform = const DefaultTransform(),
  this.slideIndicator,
  this.viewportFraction = 1,
  this.enableAutoSlider = false,
  this.autoSliderDelay = const Duration(seconds: 5),
  this.autoSliderTransitionTime = const Duration(seconds: 2),
  this.autoSliderTransitionCurve = Curves.easeOutQuad,
  this.keepPage = true,
  this.scrollPhysics = const BouncingScrollPhysics(),
  this.scrollDirection = Axis.horizontal,
  this.unlimitedMode = false,
  this.initialPage = 0,
  this.onSlideChanged,
  this.onSlideStart,
  this.onSlideEnd,
  this.controller,
  this.clipBehavior = Clip.hardEdge,
})  : slideBuilder = null,
      itemCount = children.length,
      super(key: key);