Open rajvarasdiya opened 2 years ago
You can use flutter_scrollview_observer to observe ScrollView
, it will tell you which items are being displayed and thus know the currentIndex from resultModel.firstChild?.index
.
ListViewObserver(
child: _buildListView(),
onObserve: (resultModel) {
print('firstChild.index -- ${resultModel.firstChild?.index}');
print('displaying -- ${resultModel.displayingChildIndexList}');
},
)
My concern is how do I get a currentIndex, while user is scrolling.
I saw on
AutoScrollController
we don't get a index, will you please tell me how can I get a current Index ??