GFCarousel constructor
const
GFCarousel({
- Key? key,
- required List<
Widget> items, - double? pagerSize,
- Color? passiveIndicator,
- Color? activeIndicator,
- Border? activeDotBorder,
- Border? passiveDotBorder,
- bool? hasPagination,
- double? height,
- double aspectRatio = 16 / 9,
- num viewportFraction = 0.8,
- int initialPage = 0,
- bool enableInfiniteScroll = true,
- bool reverse = false,
- bool autoPlay = false,
- Duration autoPlayInterval = const Duration(seconds: 4),
- Duration autoPlayAnimationDuration = const Duration(milliseconds: 800),
- Curve autoPlayCurve = Curves.fastOutSlowIn,
- Duration? pauseAutoPlayOnTouch,
- bool enlargeMainPage = false,
- dynamic onPageChanged(
- int index
- ScrollPhysics? scrollPhysics,
- 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);