Flutter has several specializations of this general protocol.
The most common specialization is RenderBox, which operates in
two-dimensional, cartesian coordinates. In box layout, the constraints
are a min and max width and a min and max height. During layout,
the child determines its geometry by choosing a size within these bounds.
After the child returns from layout, the parent decides the child’s
position in the parent’s coordinate system3.
Note that the child’s layout cannot depend on its position,
as the position is not determined until after the child
returns from the layout. As a result, the parent is free to reposition
the child without needing to recompute its layout.

More generally, during layout, the only information that flows from
parent to child are the constraints and the only information that
flows from child to parent is the geometry. These invariants can reduce
the amount of work required during layout: