CarouselWidget constructor

const CarouselWidget({
  1. Key? key,
  2. required List<Widget> items,
  3. double height = 220,
  4. bool autoScroll = true,
  5. Duration autoScrollInterval = const Duration(seconds: 3),
  6. double itemSpacing = 5,
  7. EdgeInsetsGeometry padding = EdgeInsets.zero,
  8. EdgeInsetsGeometry margin = EdgeInsets.zero,
  9. double borderRadius = 16,
  10. double borderWidth = 0,
  11. Color borderColor = Colors.transparent,
  12. CarouselScrollMode scrollMode = CarouselScrollMode.standard,
  13. CarouselIndicatorType indicatorType = CarouselIndicatorType.dot,
  14. bool showIndicator = true,
  15. Widget indicatorBuilder(
    1. int index,
    2. bool isActive
    )?,
  16. double indicatorSpacing = 6,
  17. double indicatorWidthFactor = 0.6,
  18. double? indicatorHeight = 4,
  19. double dotSize = 8,
  20. double? indicatorOvalBorder,
})

Implementation

const CarouselWidget({
  super.key,
  required this.items,
  this.height = 220,
  this.autoScroll = true,
  this.autoScrollInterval = const Duration(seconds: 3),
  this.itemSpacing = 5,
  this.padding = EdgeInsets.zero,
  this.margin = EdgeInsets.zero,
  this.borderRadius = 16,
  this.borderWidth = 0,
  this.borderColor = Colors.transparent,
  this.scrollMode = CarouselScrollMode.standard,
  this.indicatorType = CarouselIndicatorType.dot,
  this.showIndicator = true,
  this.indicatorBuilder,
  this.indicatorSpacing = 6,
  this.indicatorWidthFactor = 0.6,
  this.indicatorHeight = 4,
  this.dotSize = 8,
  this.indicatorOvalBorder,
});