I am using below code for the listview builder in flutter application I need to get the index of the item in the list upon scrolling. Just Like function of onPageChanged:(){} while using PageView.Builder
return ListView.builder(
itemCount: posts.length,
itemBuilder: (context, index) {
final item = posts[index];
return Post(index: index, title: 'Test', imageUrl: 'https://www.google.com',);
},
);
How can I get that?