GFCarousel constructor

const GFCarousel({
  1. Key? key,
  2. required List<Widget> items,
  3. double? pagerSize,
  4. Color? passiveIndicator,
  5. Color? activeIndicator,
  6. Border? activeDotBorder,
  7. Border? passiveDotBorder,
  8. bool? hasPagination,
  9. double? height,
  10. double aspectRatio = 16 / 9,
  11. num viewportFraction = 0.8,
  12. int initialPage = 0,
  13. bool enableInfiniteScroll = true,
  14. bool reverse = false,
  15. bool autoPlay = false,
  16. Duration autoPlayInterval = const Duration(seconds: 4),
  17. Duration autoPlayAnimationDuration = const Duration(milliseconds: 800),
  18. Curve autoPlayCurve = Curves.fastOutSlowIn,
  19. Duration? pauseAutoPlayOnTouch,
  20. bool enlargeMainPage = false,
  21. dynamic onPageChanged(
    1. int index
    )?,
  22. ScrollPhysics? scrollPhysics,
  23. Axis scrollDirection = Axis.horizontal,
})

Creates slide show of Images and Widget with animation for sliding.

Implementation

const GFCarousel({
  Key? key,
  required this.items,
  this.pagerSize,
  this.passiveIndicator,
  this.activeIndicator,
  this.activeDotBorder,
  this.passiveDotBorder,
  this.hasPagination,
  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.pauseAutoPlayOnTouch,
  this.enlargeMainPage = false,
  this.onPageChanged,
  this.scrollPhysics,
  this.scrollDirection = Axis.horizontal,
}) : super(key: key);