【自用】 Flutter Flex 布局 + Expanded
Dart Flex( direction: Axis.horizontal, // 主轴水平 // direction: Axis.vertical, // 主轴垂直 children: <Widget>[ Expanded( flex: 1, child: Text("#1"), ), Expanded( flex: 2, child: Text("#2"), ), Expanded( flex: 7, child: Text("#3"), ), ], ); PS:自用的 不做解释 作者:一个吃货帅锅 来源: oschina 链接: https://my.oschina.net/kilosnow/blog/3162033