GitHub

    Table of contents

  1. 示例
  2. 相关链接

Flexible

Edit this page

A widget that controls how a child of a Row, Column, or Flex flexes.

示例

Column(
  children: <Widget>[
    Flexible(
      flex: 2,
      child: Container(color: Colors.cyan,),
    ),
    Flexible(
      flex: 3,
      child: Container(color: Colors.teal,),
    ),
    Flexible(
      flex: 1,
      child: Container(color: Colors.indigo,),
    ),
  ],
)

相关链接