- Flutter Widget Livebook

Expanded

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

示例

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,
      ),
    ],
  ),
)

相关链接

  1. 示例
  2. 相关链接