Flutter: Pull To Refresh ListView (HTTP GET)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
how to load data using a pull to refresh indicator we have a list of items that we display inside a list view around the list view we wrap a refresh indicator and inside the refresh method we put the new items data to some new values with this if you pull to refresh then the refresh method is called and the new items are loaded alternatively you could use the http package to load the new items from a server if the server response is successful then we get from the response body the new items and then we replace the items by the new items let's also go to this url here you see that we get a list of data and every time we get the individual items in our case we want to access only the id of each item therefore we simply map over our items and from each item we extract the id and then we return an item with this number if we pull to refresh now the new items are loaded from the server optionally you can remove the current items before every request and while the items are cleared we show a loading indicator with this a loading indicator is displayed until the new items are loaded [Music]
Info
Channel: HeyFlutter․com
Views: 33,038
Rating: undefined out of 5
Keywords: flutter, flutter list, flutter list refresh, flutter listview, flutter listview refresh, flutter pull down to refresh, flutter pull to refresh, flutter pull to refresh example, flutter pull to refresh listview, flutter pull to refresh page, flutter pull to refresh widget, flutter pull up to refresh, flutter refresh indicator, flutter refresh listview, flutter refreshindicator, pull to refresh flutter
Id: 2h1yZARPC5U
Channel Id: undefined
Length: 1min 22sec (82 seconds)
Published: Sun Mar 13 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.