In this video, we create a flutter application and build a ListView to display a list of names that we retrieve from an API. We also make use of the RefreshIndicator widget in flutter to refresh the data in our list. This will fetch the latest data for our list from the API and then display that data set in our list. I show you how you can setup your list view, create a mock API with mock data, retrieve and display the API data in your flutter app and also refresh the data from the API using a refresh indicator widget, all within 15 minutes. Hope you will find this useful!

Code repo: https://gitlab.com/codebasetutorials/flutter-refresh-list
Flutter Refresh Indicator: https://api.flutter.dev/flutter/material/RefreshIndicator-class.html
Flutter ListView Builder: https://flutter.dev/docs/cookbook/lists/long-lists

Chapters:

  • 00:00 What we will build demo
  • 01:06 Removing the default flutter code
  • 02:28 Create and display a list in flutter
  • 05:49 Retrieve values for the list from an API
  • 11:25 Coding a refresh indicator to refresh the list
  • 12:53 Closing remarks

#flutter #api

Create and Refresh a list from an API in Flutter (RefreshIndicator)
12.90 GEEK