Carousel constructor

Carousel({
  1. required List<Widget> images,
  2. Curve animationCurve = Curves.ease,
  3. Duration animationDuration = const Duration(milliseconds: 300),
  4. double dotSize = 8.0,
  5. double dotSpacing = 25.0,
  6. double dotIncreaseSize = 2.0,
  7. Color dotColor = Colors.white,
  8. Color? dotBgColor,
  9. Color dotIncreasedColor = Colors.white,
  10. bool showIndicator = true,
  11. double indicatorBgPadding = 20.0,
  12. BoxFit boxFit = BoxFit.cover,
  13. bool borderRadius = false,
  14. Radius? radius,
  15. DotPosition dotPosition = DotPosition.bottomCenter,
  16. double dotHorizontalPadding = 0.0,
  17. double dotVerticalPadding = 0.0,
  18. double moveIndicatorFromBottom = 0.0,
  19. bool noRadiusForIndicator = false,
  20. bool overlayShadow = false,
  21. Color? overlayShadowColors,
  22. double overlayShadowSize = 0.5,
  23. bool autoplay = true,
  24. Duration autoplayDuration = const Duration(seconds: 3),
  25. void onImageTap(
    1. int
    )?,
  26. void onImageChange(
    1. int,
    2. int
    )?,
  27. Widget? defaultImage,
})

Implementation

Carousel({
  required this.images,
  this.animationCurve = Curves.ease,
  this.animationDuration = const Duration(milliseconds: 300),
  this.dotSize = 8.0,
  this.dotSpacing = 25.0,
  this.dotIncreaseSize = 2.0,
  this.dotColor = Colors.white,
  this.dotBgColor,
  this.dotIncreasedColor = Colors.white,
  this.showIndicator = true,
  this.indicatorBgPadding = 20.0,
  this.boxFit = BoxFit.cover,
  this.borderRadius = false,
  this.radius,
  this.dotPosition = DotPosition.bottomCenter,
  this.dotHorizontalPadding = 0.0,
  this.dotVerticalPadding = 0.0,
  this.moveIndicatorFromBottom = 0.0,
  this.noRadiusForIndicator = false,
  this.overlayShadow = false,
  this.overlayShadowColors,
  this.overlayShadowSize = 0.5,
  this.autoplay = true,
  this.autoplayDuration = const Duration(seconds: 3),
  this.onImageTap,
  this.onImageChange,
  this.defaultImage,
});