Let’s review what we learned about Container widgets:
- Container Widgets paint a container box around a child widget. They have properties for specifying how the container box looks: what borders it has, what color it is, and what spacing.
- They are useful when using borders, colors, and spacing to lay out our app.
- They can work with decorator objects, which can be used to tell the graphics library how to paint Widgets. For example, a Container Widget can accept a
decoratorparameter to tell it how to paint its borders, colors, etc.
- Margins are used to specify the amount of empty space around a Container.
- Padding is used to specify the amount of empty space around the child widget within a Container.
- Transformations are used to visually transform a Container and its child widget(s), adding effects like rotation or skewing. These can be used to really make our Container stand out!
Use Container widgets in the next app we make to add a creative spark!
We’ve provided an application using all sorts of container attributes. Try modifying or adding new attributes to make the content beautiful!
Take this course for free