In this article, we are going to integrate flutter refreshindicator widget in flutter app to refresh listview data. You can also check out flutter listview related articles.
To implement pull to refresh functionality in flutter app, we do not need to use any third party library or package. Flutter Material Widget provides RefreshIndicator widget which is used for swipe to refresh data in flutter application. In this flutter example, we are displaying static soccer players data in listview. Whenever users pull to refresh listview, same static data will be added.
RefreshIndicator widget is used to update data in flutter listview. We can also customize this circular progress indicator. We can change color of indicator using color property of RefreshIndicator widget. We can also set background color of indicator using backgroundColor property.
We can also change width of stroke of refresh indicator using strokeWidth property. displacement property is used to set measurement of refresh indicator from top or bottom edge. onRefresh callback is used to detect when users drag refresh indicator to refresh data.