Swiper constructor

Swiper({
  1. Key? key,
  2. Axis direction = Axis.horizontal,
  3. bool autoStart = true,
  4. SwiperController? controller,
  5. Widget? mask,
  6. SwiperIndicator? indicator,
  7. int speed = 300,
  8. Duration interval = const Duration(seconds: 3),
  9. bool circular = true,
  10. bool reverse = false,
  11. AlignmentDirectional indicatorAlignment = AlignmentDirectional.bottomCenter,
  12. double viewportFraction = 1.0,
  13. ValueChanged<int>? onChanged,
  14. required List<Widget>? children,
})

Implementation

Swiper({
  Key? key,
  this.direction = Axis.horizontal,
  this.autoStart = true,
  this.controller,
  this.mask,
  this.indicator,
  this.speed = 300,
  this.interval = const Duration(seconds: 3),
  this.circular = true,
  this.reverse = false,
  this.indicatorAlignment = AlignmentDirectional.bottomCenter,
  this.viewportFraction = 1.0,
  this.onChanged,
  required this.children,
})  : childCount = children!.length,
      itemBuilder = ((context, index) => children[index]),
      super(key: key);