Use GridView to Layout a Grid

Learn to use GridView to place widgets in a grid when the screen is wide enough.

When a ListView isn’t enough to display a collection of widgets on larger screens, we can use GridView. Using the GridView.extent constructor, we can declare the maximum cross size of all items in the grid. If the available cross space is greater than that, the GridView will place two or more children next to each other, constraining their cross size to be no more than the maximum cross size. Let’s see this in an example application that shows a collection of courses.

Get hands-on with 1200+ tech skills courses.