gpt4 book ai didi

flutter - 调整图像尺寸以适应卡片抖动

转载 作者:行者123 更新时间:2023-12-03 04:53:56 26 4
gpt4 key购买 nike

我正在尝试将所有图片(在尾随ListTile中)调整为第三张照片(以降低卡片)。

enter image description here

到目前为止,这是我的代码:

return Card(
child:ListTile(...
...
trailing: LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
return FadeInImage.memoryNetwork(
height: constraints.maxHeight,
placeholder: kTransparentImage,
image: picture,
);
},
),

感谢您的帮助

最佳答案

通过@Manuel的建议-它是这样工作的:

            ...trailing: LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
return FadeInImage.memoryNetwork(
fit: BoxFit.cover,
height: constraints.maxHeight,
width: constraints.maxWidth/3,
placeholder: kTransparentImage,
image: picture,
);
},
),

关于flutter - 调整图像尺寸以适应卡片抖动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60887908/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com