Reputation: 663
I am using this plugin flutter_swiper:
Swiper(
index: currentIndex,
itemCount: 12,
itemBuilder: (BuildContext context,int index){
return PhotoView(
imageProvider: AssetImage("images/c"+(index+1).toString()+".jpg"),
);
},
),
I need the swiper to not swipe from last index to first index and not from first to last only swipe between indexes. what I have is a list of images to swipe between Is it possible to do this using this plugin or I should use another one ? if so please provide another solution
Upvotes: 0
Views: 1392
Reputation: 10963
It seems to be that Swiper
has a property for that, called loop
:
/// Set to false to disable continuous loop mode. final bool loop;
So you could try:
Swiper(
loop: false,
...
Upvotes: 1