Swiper.children constructor
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,
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);
}