【flutter】两个Container之间会出现一条线
2024-07-25 本文已影响0人
朱慢慢
这个问题为flutter上的bug,目前为止3.16.4还未修复
解决办法:为Container设置宽度为0颜色为填充色的Border
Container(
color: Colors.black,
child: Column(
children: [
Container(
height: 31,
decoration: BoxDecoration(
border: Border.all(color: Colors.white, width: 0),
color: Colors.white,
),
),
Container(
height: 31,
decoration: BoxDecoration(
border: Border.all(color: Colors.white, width: 0),
color: Colors.white,
),
),
Container(
height: 31,
decoration: BoxDecoration(
border: Border.all(color: Colors.white, width: 0),
color: Colors.white,
),
),
],
),
)