Carousel constructor
const
Carousel({
- Key? key,
- required int itemCount,
- required Widget itemBuilder(
- BuildContext context,
- int index
- double height = 220,
- bool autoPlay = true,
- Duration autoPlayInterval = const Duration(seconds: 4),
- double viewportFraction = 1.0,
- bool enlargeCenterPage = false,
- bool showIndicators = true,
- bool showArrows = false,
- Color? indicatorColor,
- Color? activeIndicatorColor,
- double borderRadius = AppRadius.large,
- ValueChanged<
int> ? onPageChanged,
Implementation
const Carousel({
super.key,
required this.itemCount,
required this.itemBuilder,
this.height = 220,
this.autoPlay = true,
this.autoPlayInterval = const Duration(seconds: 4),
this.viewportFraction = 1.0,
this.enlargeCenterPage = false,
this.showIndicators = true,
this.showArrows = false,
this.indicatorColor,
this.activeIndicatorColor,
this.borderRadius = AppRadius.large,
this.onPageChanged,
});