Keep in mind, setting width or height of a container, it's same as setting min-width and max-width or min-height and max-height at the same time.
Your case for the inner Container according to the documentation will be:
If the widget has no child and no alignment, but a height, width, or constraints are provided, then the Container tries to be as small as possible given the combination of those constraints and the parent's constraints.
Since your outer container gives minWidth=minHeight=200 constraints to the inner container, thus the size of your inner container cannot be less than Size(200, 200).
In support of Rémi Rousselet's answer, the Align widget, same as Center
widget, will expand to fit its parent's constraints, if its parent has constraints, and position its child in the specified alignment.
If the widget has an alignment, constraints, and the parent provides bounded constraints, then the Container tries to be as small as possible given the combination of those constraints and the parent’s constraints, and then positions the child within itself as per the alignment.
In this case, the outer Container has an Align widget as child (an alignment), constraints, and the parent provides bounded constraints, thus it tries to be as small as possible given the combination of its constraints and the parent’s constraints, which is Size(200, 200)
.
You might be wondering why does the inner Container has the size of 50*50
, instead of 200*200
, since its parent (outer Container) has specify the minWidth=minHeight = 200
. The reason is that as mentioned before the Align widget will expand to fit its parent constraints, so in this case the Align widget will expand to fit the outer Container
's constraints, i.e. it will have the size of Size(200, 200)
, and tell its child (the inner Container), that it can be any size it wants, but not bigger than my size, 200*200
. Therefore, the information of minWidth and minHeight of the outer Container that is supposed to be pass to the inner Container is lost.