GitHub

    Table of contents

  1. Example
  2. Related Links

Expanded

Edit this page

A widget that expands a child of a Row, Column, or Flex so that the child fills the available space.

Example

Center(
  child: Column(
  children: <Widget>[
    Container(
      color: Colors.red,
      height: 100,
      width: 100,
    ),
    Expanded(
      child: Container(
        color: Colors.blue,
        width: 100,
      ),
    ),
    Container(
      color: Colors.red,
      height: 100,
      width: 100,
    ),
  ],
)

Related Links