CarouselSlider.builder constructor
CarouselSlider.builder({
- Key? key,
- required CarouselSlideBuilder? slideBuilder,
- SlideTransform slideTransform = const DefaultTransform(),
- SlideIndicator? slideIndicator,
- required int itemCount,
- double viewportFraction = 1,
- bool enableAutoSlider = false,
- Duration autoSliderDelay = const Duration(seconds: 5),
- Duration autoSliderTransitionTime = const Duration(seconds: 2),
- Curve autoSliderTransitionCurve = Curves.easeOutQuad,
- bool keepPage = true,
- ScrollPhysics scrollPhysics = const BouncingScrollPhysics(),
- Axis scrollDirection = Axis.horizontal,
- bool unlimitedMode = false,
- int initialPage = 0,
- ValueChanged<
int> ? onSlideChanged, - VoidCallback? onSlideStart,
- VoidCallback? onSlideEnd,
- CarouselSliderController? controller,
- Clip clipBehavior = Clip.hardEdge,
Implementation
CarouselSlider.builder({
Key? key,
required this.slideBuilder,
this.slideTransform = const DefaultTransform(),
this.slideIndicator,
required this.itemCount,
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,
}) : children = null,
super(key: key);