A widget can’t know and doesn’t decide its own position
in the screen, since it’s the widget’s parent who decides
the position of the widget.

Since the parent’s size and position, in its turn,
also depends on its own parent, it’s impossible to
precisely define the size and position of any widget
without taking into consideration the tree as a whole.

If a child wants a different size from its parent and 
the parent doesn’t have enough information to align it,
then the child’s size might be ignored.
Be specific when defining alignment.

Examples

For an interactive experience, use the following DartPad.
Use the numbered horizontal scrolling bar to switch between
29 different examples.

If you prefer, you can grab the code from
this GitHub repo.

The examples are explained in the following sections.

Example 1