I have list view and I need it scroll 360ْ I mean when last item finish the first item start.
CodePudding user response:
Lets say you have list of items
. You can do this.
ListView.builder(builder: (context, index) {
final actualIndex = index % items.size();
return YourWidget(items[actualIndex]);
},
itemCount: 9999999999,
);
CodePudding user response:
Consider using ListWheelScrollView with looping delegate.
ListWheelScrollView.useDelegate(
itemExtent: 30,
childDelegate: ListWheelChildLoopingListDelegate(
children: List<Widget>.generate(
10, (index) => Text('$index'),
),
),
)