BetterSwiper constructor

const BetterSwiper({
  1. Key? key,
  2. required PageController controller,
  3. required List<Widget> children,
  4. double? width,
  5. required double height,
  6. bool? autoplay = true,
  7. Duration autoplayDuration = const Duration(seconds: 3),
  8. Duration duration = const Duration(milliseconds: 300),
  9. Curve curve = Curves.easeInOut,
  10. int initialIndex = 0,
  11. Color? indicatorColor = Colors.white,
  12. double? dotSize,
  13. bool? showIndicator = true,
  14. Axis scrollDirection = Axis.horizontal,
  15. bool touchable = true,
  16. bool lazyRender = false,
  17. bool loop = true,
  18. BetterSwiperIndicatorType indicatorType = BetterSwiperIndicatorType.dot,
  19. ValueChanged<int>? onChanged,
  20. Widget? indicatorWidget,
})

Implementation

const BetterSwiper({
  super.key,
  required this.controller,
  required this.children,
  this.width,
  required this.height,
  this.autoplay = true,
  this.autoplayDuration = const Duration(seconds: 3),
  this.duration = const Duration(milliseconds: 300),
  this.curve = Curves.easeInOut,
  this.initialIndex = 0,
  this.indicatorColor = Colors.white,
  this.dotSize,
  this.showIndicator = true,
  this.scrollDirection = Axis.horizontal,
  this.touchable = true,
  this.lazyRender = false,
  this.loop = true,
  this.indicatorType = BetterSwiperIndicatorType.dot,
  this.onChanged,
  this.indicatorWidget,
});