Carousel constructor

const Carousel({
  1. Key? key,
  2. required int itemCount,
  3. required Widget itemBuilder(
    1. BuildContext context,
    2. int index
    ),
  4. double height = 220,
  5. bool autoPlay = true,
  6. Duration autoPlayInterval = const Duration(seconds: 4),
  7. double viewportFraction = 1.0,
  8. bool enlargeCenterPage = false,
  9. bool showIndicators = true,
  10. bool showArrows = false,
  11. Color? indicatorColor,
  12. Color? activeIndicatorColor,
  13. double borderRadius = AppRadius.large,
  14. 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,
});