Swiper constructor

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

Implementation

Swiper({
  Key? key,
  this.direction = Axis.horizontal,
  this.autoStart = true,
  this.controller,
  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);