赞
踩
在Flutter中,可以使用Flexible widget来控制Row中的子widget的占比。可以在Flexible widget中设置flex属性来控制占比。例如:
- Row( children: [
- Flexible(
- flex: 7,
- child: Text("Left widget"),
- ),
- Flexible(
- flex: 3,
- child: Text("Right widget"),
- ),
- ],
- )
这样左侧widget就最多占用Row 70%的空间。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。