In flutter i have a simple ListView
which that contains some data into that, for example you suppose i have 5 row in it,
now for each row in ListView
i want to send request to the server to get response, you suppose again each row into this list is Instagram
pages posts, and i want to get like count from server for each row in the list. or like with Telegram
as you maybe know when we scroll posts, we can see posts seen.
could you help me how can i implementing this feature in Flutter
? sending request from each row in the list
2
Answers
If you would have more than a fixed number of 5 rows, the
ListView.builder
constructor is what you want:The ListView builder gives you the index of the list item currently being built and lets you create any widgets that are displayed as elements.
parseResponse
is a dummy function, which of course does not exist, because it has to be implemented by yourself.