Swiper constructor
Swiper({
- Key? key,
- Axis direction = Axis.horizontal,
- bool autoStart = true,
- SwiperController? controller,
- Widget? mask,
- SwiperIndicator? indicator,
- int speed = 300,
- Duration interval = const Duration(seconds: 3),
- bool circular = true,
- bool reverse = false,
- AlignmentDirectional indicatorAlignment = AlignmentDirectional.bottomCenter,
- double viewportFraction = 1.0,
- ValueChanged<
int> ? onChanged, - 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);