Flutter:ListTile上的图像前导太小

问题描述 投票:0回答:1

当我在ConstrainedBox上放置ListTile的引线时,图像尺寸出现问题,图像太小且无法填满较大的尺寸,是否有任何想法可以使此图像尺寸跟随Card的高度?

谢谢。

Listview with 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),
                                )
                              ],
                            ),
                          ],
                        ),
                      ),
flutter flutter-layout
1个回答
0
投票

使用自定义窗口小部件代替ListTile。

© www.soinside.com 2019 - 2024. All rights reserved.