Swiper.children constructor

Swiper.children({
  1. required List<Widget> children,
  2. bool autoplay = false,
  3. PageTransformer? transformer,
  4. int autoplayDelay = kDefaultAutoplayDelayMs,
  5. bool reverse = false,
  6. bool autoplayDisableOnInteraction = true,
  7. int duration = kDefaultAutoplayTransactionDuration,
  8. ValueChanged<int>? onIndexChanged,
  9. int index = 0,
  10. SwiperOnTap? onTap,
  11. bool loop = true,
  12. Curve curve = Curves.ease,
  13. Axis scrollDirection = Axis.horizontal,
  14. SwiperPlugin? pagination,
  15. SwiperPlugin? control,
  16. List<SwiperPlugin>? plugins,
  17. SwiperController? controller,
  18. Key? key,
  19. CustomLayoutOption? customLayoutOption,
  20. ScrollPhysics? physics,
  21. double? containerHeight,
  22. double? containerWidth,
  23. double viewportFraction = 1.0,
  24. double itemHeight = double.infinity,
  25. double itemWidth = double.infinity,
  26. bool outer = false,
  27. double scale = 1.0,
})

Implementation

factory Swiper.children({
  required List<Widget> children,
  bool autoplay = false,
  PageTransformer? transformer,
  int autoplayDelay = kDefaultAutoplayDelayMs,
  bool reverse = false,
  bool autoplayDisableOnInteraction = true,
  int duration = kDefaultAutoplayTransactionDuration,
  ValueChanged<int>? onIndexChanged,
  int index = 0,
  SwiperOnTap? onTap,
  bool loop = true,
  Curve curve = Curves.ease,
  Axis scrollDirection = Axis.horizontal,
  SwiperPlugin? pagination,
  SwiperPlugin? control,
  List<SwiperPlugin>? plugins,
  SwiperController? controller,
  Key? key,
  CustomLayoutOption? customLayoutOption,
  ScrollPhysics? physics,
  double? containerHeight,
  double? containerWidth,
  double viewportFraction = 1.0,
  double itemHeight = double.infinity,
  double itemWidth = double.infinity,
  bool outer = false,
  double scale = 1.0,
}) {
  return new Swiper(
      transformer: transformer,
      customLayoutOption: customLayoutOption,
      containerHeight: containerHeight,
      containerWidth: containerWidth,
      viewportFraction: viewportFraction,
      itemHeight: itemHeight,
      itemWidth: itemWidth,
      outer: outer,
      scale: scale,
      autoplay: autoplay,
      autoplayDelay: autoplayDelay,
      autoplayDisableOnInteraction: autoplayDisableOnInteraction,
      duration: duration,
      onIndexChanged: onIndexChanged,
      index: index,
      onTap: onTap,
      curve: curve,
      scrollDirection: scrollDirection,
      pagination: pagination,
      control: control,
      controller: controller,
      loop: loop,
      plugins: plugins,
      physics: physics,
      key: key,
      itemBuilder: (BuildContext context, int index) {
        return children[index];
      },
      itemCount: children.length);
}