I am trying to make an infinite loop in my listview, when index is at the end and user continue to scroll to left the next item will be the first one
ListView.builder(
controller: _controller,
scrollDirection: Axis.horizontal,
itemCount: packs.length,
itemBuilder: (context, index) {
_index = index;
print(index);
return Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
],
);
},
),
I want user can infinite swipe, how can I do ?