AntdSwiper constructor
const
AntdSwiper({
- Key? key,
- AntdSwiperStyle? style,
- AntdStyleBuilder<
AntdSwiperStyle, AntdSwiper> ? styleBuilder, - double? edgeThreshold,
- AntdOnScrollEdge? onEdgeReached,
- AntdSwiperController? controller,
- double cacheExtent = 1.5,
- CacheExtentStyle cacheExtentStyle = CacheExtentStyle.viewport,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- ScrollBehavior? scrollBehavior = const CupertinoScrollBehavior(),
- bool vertical = true,
- bool reversed = false,
- bool? shrinkWrap = false,
- bool virtual = false,
- required List<
Widget> items, - AntdScrollItemBuilder<
Widget, AntdSwiperController> ? itemBuilder, - List<
Widget> ? headers, - AntdItemPositionListener<
Widget> ? onItemPosition, - Duration? throttle,
- bool allowTouchMove = true,
- bool autoplay = false,
- Duration autoplayInterval = const Duration(milliseconds: 3000),
- int activeIndex = 0,
- bool loop = false,
- AntdSwiperIndicatorBuilder? indicatorBuilder,
- AntdSwiperOnIndexChange? onChange,
Implementation
const AntdSwiper(
{super.key,
super.style,
super.styleBuilder,
super.edgeThreshold,
super.onEdgeReached,
super.controller,
super.cacheExtent = 1.5,
super.cacheExtentStyle = CacheExtentStyle.viewport,
super.dragStartBehavior = DragStartBehavior.start,
super.scrollBehavior = const CupertinoScrollBehavior(),
super.vertical = true,
super.reversed = false,
super.shrinkWrap = false,
super.virtual = false,
required super.items,
super.itemBuilder,
super.headers,
super.footers,
super.onItemPosition,
super.throttle,
this.allowTouchMove = true,
this.autoplay = false,
this.autoplayInterval = const Duration(milliseconds: 3000),
this.activeIndex = 0,
this.loop = false,
this.indicatorBuilder,
this.onChange})
: super(
fit: AntdScrollItemFit.fill,
physics: allowTouchMove
? const PageScrollPhysics()
: const NeverScrollableScrollPhysics(),
alignment: AntdEdge.center);