AntdSwiper constructor

const AntdSwiper({
  1. Key? key,
  2. AntdSwiperStyle? style,
  3. AntdStyleBuilder<AntdSwiperStyle, AntdSwiper>? styleBuilder,
  4. double? edgeThreshold,
  5. AntdOnScrollEdge? onEdgeReached,
  6. AntdSwiperController? controller,
  7. double cacheExtent = 1.5,
  8. CacheExtentStyle cacheExtentStyle = CacheExtentStyle.viewport,
  9. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  10. ScrollBehavior? scrollBehavior = const CupertinoScrollBehavior(),
  11. bool vertical = true,
  12. bool reversed = false,
  13. bool? shrinkWrap = false,
  14. bool virtual = false,
  15. required List<Widget> items,
  16. AntdScrollItemBuilder<Widget, AntdSwiperController>? itemBuilder,
  17. List<Widget>? headers,
  18. List<Widget>? footers,
  19. AntdItemPositionListener<Widget>? onItemPosition,
  20. Duration? throttle,
  21. bool allowTouchMove = true,
  22. bool autoplay = false,
  23. Duration autoplayInterval = const Duration(milliseconds: 3000),
  24. int activeIndex = 0,
  25. bool loop = false,
  26. AntdSwiperIndicatorBuilder? indicatorBuilder,
  27. 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);