CarouselOptions constructor

CarouselOptions({
  1. double? height,
  2. double aspectRatio = 16 / 9,
  3. double viewportFraction = 0.8,
  4. int initialPage = 0,
  5. bool enableInfiniteScroll = true,
  6. bool reverse = false,
  7. bool autoPlay = false,
  8. Duration autoPlayInterval = const Duration(seconds: 4),
  9. Duration autoPlayAnimationDuration = const Duration(milliseconds: 800),
  10. Curve autoPlayCurve = Curves.fastOutSlowIn,
  11. bool? enlargeCenterPage = false,
  12. dynamic onPageChanged(
    1. int index,
    2. CarouselPageChangedReason reason
    )?,
  13. ValueChanged<double?>? onScrolled,
  14. ScrollPhysics? scrollPhysics,
  15. bool pageSnapping = true,
  16. Axis scrollDirection = Axis.horizontal,
  17. bool pauseAutoPlayOnTouch = true,
  18. bool pauseAutoPlayOnManualNavigate = true,
  19. bool pauseAutoPlayInFiniteScroll = false,
  20. PageStorageKey? pageViewKey,
  21. CenterPageEnlargeStrategy enlargeStrategy = CenterPageEnlargeStrategy.scale,
  22. bool disableCenter = false,
  23. bool padEnds = true,
  24. Clip clipBehavior = Clip.hardEdge,
})

Implementation

CarouselOptions({
  this.height,
  this.aspectRatio: 16 / 9,
  this.viewportFraction: 0.8,
  this.initialPage: 0,
  this.enableInfiniteScroll: true,
  this.reverse: false,
  this.autoPlay: false,
  this.autoPlayInterval: const Duration(seconds: 4),
  this.autoPlayAnimationDuration = const Duration(milliseconds: 800),
  this.autoPlayCurve: Curves.fastOutSlowIn,
  this.enlargeCenterPage = false,
  this.onPageChanged,
  this.onScrolled,
  this.scrollPhysics,
  this.pageSnapping = true,
  this.scrollDirection: Axis.horizontal,
  this.pauseAutoPlayOnTouch: true,
  this.pauseAutoPlayOnManualNavigate: true,
  this.pauseAutoPlayInFiniteScroll: false,
  this.pageViewKey,
  this.enlargeStrategy: CenterPageEnlargeStrategy.scale,
  this.disableCenter: false,
  this.padEnds = true,
  this.clipBehavior: Clip.hardEdge,
});