Displaying lists with ListView and GridView
- Objectives
- Setup
- Displaying items in a ListView
- Displaying items in a GridView
- The Card widget
- Other Resources
Objectives
- To learn how to display lists using a ListView or GridView
- To introduce the ListTile and Card widgets for displaying information
Setup
- 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. - In VSCode, go to File -> Open Folder and select the
lists_and_grids/
folder. - In the Terminal of Visual Studio code, run:
flutter pub get flutter create . --platforms=android,ios,web
- Open
lib/main.dart
and run the app. You should see the following:
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.