Open JoergPf opened 2 years ago
physics: const NeverScrollableScrollPhysics()
itemBuilder中使用GestureDetector覆盖原本的手势即可
Swiper(
itemBuilder: (BuildContext context, int swiperIndex) {
return GestureDetector(
// 覆盖本来的滑动翻页
onPanStart: (DragStartDetails details) {},
child: Container(),
);
},
axisDirection: AxisDirection.right,
controller: states.swiperController,
itemCount: 10,
itemWidth: 300,
itemHeight: 300,
loop: false,
layout: SwiperLayout.TINDER,
)
Hi, I would like to control the swipe only by functions. So the user should not be able to swipe manually. Is this possible? Thanks!