

如果不加margin就不会这样,BoxFit其他属性也尝试了没效果图片就是有左右边距
@override
bottomContent() {
return Expanded(
child: Container(
constraints: BoxConstraints.expand(), //强制撑满父布局
child: Image.network('http://www.devio.org/io/flutter_beauty/card_1.jpg',
fit: BoxFit.cover,)
),
);
}我在iOS上遇到了你所述的问题,Android是好的,解决的方法只有一行代码:
@override
bottomContent() {
return Expanded(
child: Container(
child: Image.network('http://www.devio.org/io/flutter_beauty/card_1.jpg',
fit: BoxFit.cover,)
),
);
}至于为什么这样我也不知道,但我知道加了这一行就好了。