Dealing with box constraints

UI

Layout

Box constraints

Unbounded constraints

Flex

Note:
  You might be directed to this page if the
  framework detects a problem involving box constraints.

Note:
  If you are confused by how constraints, sizing,
  and positioning work in Flutter, see
  Understanding constraints.

In Flutter, widgets are rendered by their underlying
RenderBox objects. Render boxes are given
constraints by their parent, and size themselves within those
constraints. Constraints consist of minimum and maximum widths
and heights; sizes consist of a specific width and height.

Generally, there are three kinds of boxes,
in terms of how they handle their constraints:

Those that try to be as big as possible.
For example, the boxes used by Center and
ListView.