Contain and Add Padding to Widgets Using Invisible Layout Widgets

Some widgets are not meant to add visible content to your app but instead are simply used to move other widgets inside the available space or change the shape and size of a widget in order to make the app look exactly how you want it to look.

They all operate on a child widget, and you can use them to change the shape and size of that widget or to separate the widget from other widgets.

Add Padding to a Widget

There might be cases in which a widget in your app has to (or should) be a certain distance away from all or some other widgets—for example, if the widget has to be separated from other widgets in a list or grid, or if there are multiple small widgets used for interaction ...

Get Programming Flutter now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.