Use an OrientationBuilder to change the number of columns.

1. Build a GridView with two columns

First, create a list of items to work with.
Rather than using a normal list,
create a list that displays items in a grid.
For now, create a grid with two columns.

To learn more about working with GridViews,
see the Creating a grid list recipe.

2. Use an OrientationBuilder to change the number of columns

To determine the app’s current Orientation, use the
OrientationBuilder widget.
The OrientationBuilder calculates the current Orientation by
comparing the width and height available to the parent widget,
and rebuilds when the size of the parent changes.

Using the Orientation, build a list that displays two columns in portrait
mode, or three columns in landscape mode.