Displaying lists with ListView and GridView

  1. Objectives
  2. Setup
  3. Displaying items in a ListView
    1. the ListTile widget
  4. Displaying items in a GridView
  5. The Card widget
  6. Other Resources

Objectives

Setup

  1. Download and unzip lists_and_grids.zip. It will create a folder called lists_and_grids. Move this folder to be with your other Flutter projects.
  2. In VSCode, go to File -> Open Folder and select the lists_and_grids/ folder.
  3. In the Terminal of Visual Studio code, run:
     flutter pub get
     flutter create . --platforms=android,ios,web
    
  4. Open lib/main.dart and run the app. You should see the following:

ListView with placeholder blank

Displaying items in a ListView

ListView More coming soon.

the ListTile widget

ListTile More coming soon.

Displaying items in a GridView

GridView More coming soon.

The Card widget

Card More coming soon.

Other Resources