CustomCarouselSlider constructor
const
CustomCarouselSlider({
- Key? key,
- required List<
CarouselItem> items, - double height = 200,
- double? subHeight,
- double width = 400,
- bool autoplay = true,
- Curve animationCurve = Curves.ease,
- Duration autoplayDuration = const Duration(seconds: 3),
- Duration animationDuration = const Duration(milliseconds: 300),
- BoxShape indicatorShape = BoxShape.circle,
- double dotSpacing = 5.0,
- Color selectedDotColor = Colors.white,
- double selectedDotHeight = 8,
- double selectedDotWidth = 8,
- Color unselectedDotColor = const Color(0XFFACAEBA),
- double unselectedDotHeight = 6,
- double unselectedDotWidth = 6,
- bool showIndicator = true,
- bool showSubBackground = true,
- bool showText = true,
- double boxPaddingHorizontal = 10,
- double boxPaddingVertical = 2,
Implementation
const CustomCarouselSlider({
Key? key,
required this.items,
this.height = 200,
this.subHeight,
this.width = 400,
this.autoplay = true,
this.animationCurve = Curves.ease,
this.autoplayDuration = const Duration(seconds: 3),
this.animationDuration = const Duration(milliseconds: 300),
this.indicatorShape = BoxShape.circle,
this.dotSpacing = 5.0,
this.selectedDotColor = Colors.white,
this.selectedDotHeight = 8,
this.selectedDotWidth = 8,
this.unselectedDotColor = const Color(0XFFACAEBA),
this.unselectedDotHeight = 6,
this.unselectedDotWidth = 6,
this.showIndicator = true,
this.showSubBackground = true,
this.showText = true,
this.boxPaddingHorizontal = 10,
this.boxPaddingVertical = 2,
}) : super(key: key);