CarouselSlider constructor
CarouselSlider({
- Key? key,
- required List<
Widget> children, - SlideTransform slideTransform = const DefaultTransform(),
- SlideIndicator? slideIndicator,
- 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({
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);