WidgetCarousel constructor

WidgetCarousel({
  1. required List<Widget> items,
  2. num viewportFraction = 1.0,
  3. num initialPage = 0,
  4. double aspectRatio = 16 / 9,
  5. double? height,
  6. num realPage = 10000,
  7. bool autoPlay = false,
  8. Duration interval = const Duration(seconds: 8),
  9. bool reverse = false,
  10. Curve autoPlayCurve = Curves.fastOutSlowIn,
  11. Duration autoPlayDuration = const Duration(milliseconds: 800),
  12. required Function updateCallback,
  13. bool distortion = true,
  14. IndicatorAlign align = IndicatorAlign.bottom,
  15. EdgeInsets padding = const EdgeInsets.only(bottom: 0.0),
  16. double indicatorWidth = 6,
  17. Color indicatorBackColor = Colors.white,
  18. Color indicatorColor = Colors.black,
})

Implementation

WidgetCarousel({
  required this.items,
  this.viewportFraction: 1.0,
  this.initialPage: 0,
  this.aspectRatio: 16 / 9,
  this.height,
  this.realPage: 10000,
  this.autoPlay: false,
  this.interval: const Duration(seconds: 8),
  this.reverse: false,
  this.autoPlayCurve: Curves.fastOutSlowIn,
  this.autoPlayDuration: const Duration(milliseconds: 800),
  required this.updateCallback,
  this.distortion: true,
  this.align = IndicatorAlign.bottom,
  this.padding = const EdgeInsets.only(bottom: 0.0),
  this.indicatorWidth = 6,
  this.indicatorBackColor = Colors.white,
  this.indicatorColor = Colors.black,
}) : pageController = new PageController(
        viewportFraction: viewportFraction.toDouble(),
        initialPage: realPage.toInt() + initialPage.toInt(),
      );