Example: Testing flex values

When flex properties are compared against one another,
  the ratio between their flex values determines
  what fraction of the total remaining space each
  Flexible widget receives.

remainingSpace

flex

totalOfAllFlexValues

In this example, the sum of the flex values (2),
  determines that both Flexible widgets receive
  half of the total remaining space.
  The BlueBox widget (or fixed-size widget)
  remains the same size.

Tip:
  Before moving to the next example,
  try changing the flex properties to other values,
  such as 2 and 1.

Expanded widget

Similar to Flexible, the Expanded widget can
wrap a widget and force the widget to fill extra space.

Example: Filling extra space

The following example demonstrates how the
  Expanded widget forces its child widget to
  fill extra space.