当我把图片放在ConstrainedBox里的ListTile leading中时,我遇到了图片大小的问题,图片太小了,无法填充到更大的尺寸。有什么方法可以使此图片大小跟随Card的高度?
谢谢。
ListTile(
leading: ConstrainedBox(
constraints:
BoxConstraints(minWidth: 100, minHeight: 100),
child: Image.network(
'http://www.malmalioboro.co.id/$gambar',
width: 100,
height: 100,
)),
title: Text(
nama,
style: TextStyle(
fontSize: 20.0, fontWeight: FontWeight.bold),
),
subtitle: Column(
children: <Widget>[
Row(
children: <Widget>[
Text(
'Barcode : ',
style: TextStyle(fontWeight: FontWeight.bold),
),
Text(
deskripsi,
style: TextStyle(fontSize: 15.0),
),
],
),
Row(
children: <Widget>[
Text(
'Harga : ',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20),
),
Text(
harga,
style: TextStyle(fontSize: 20),
)
],
),
],
),
),