We’ve learned how to create a basic app containing text. However, we often want to organize our app’s content on the screen. We will next introduce layout widgets, which change how content inside our apps is arranged.
Layout widgets enable us to control where content is displayed: in the center, off to the side, in rows, or columns. They play a central role in making our app look nice and organized.
There are two types of layout widgets:
- Single-child layout widgets: affect the layout of a single widget. These include Center and Align.
- Multi-child layout widgets: affect the layout of multiple widgets. These include Row and Column.
When we last left off, we had one widget in our app. In the next exercise, we will start with a single-child layout widget.
Instructions
The application embedded in this exercise is designed to show off some of what we will be learning in this lesson. See if you can change how the pieces are displayed, aligned, and organized.
Click the blue Run button to see what we can do with layouts!