问题本身说明了问题是什么
代码片段:
下面的代码对于 运行良好Column,但是当我将其替换为 时Row,它没有在屏幕上显示分隔符。
Column(
children: <Widget>[
Divider(
thickness: 1,
color: Colors.black,
),
SizedBox(
width: 50,
),
Divider(
thickness: 1,
color: Colors.black,
),
],
),
Run Code Online (Sandbox Code Playgroud)
Expanded/FlexibleRow Widget 需要与Widget一起使用 Divider
Row(
children: <Widget>[
Flexible(
child: Divider(
thickness: 1,
color: Colors.black,
),
),
SizedBox(
width: 10,
),
Flexible(
child: Divider(
thickness: 1,
color: Colors.black,
),
),
],
),
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1970 次 |
| 最近记录: |