【发布时间】:2020-05-31 12:38:38
【问题描述】:
Flutter:我想制作一个有两张卡片的行,上面有一张图片和一条如下图所示的文字
body: groups.isEmpty
? Center(child: Text('No Students'))
: ListView(
children: [
...groups.map(
(group) => Card(
elevation: 7,
child: ListTile(
leading: CircleAvatar(
backgroundImage: AssetImage('assets/01.jpg'),
),
title: Text(group),
trailing: Icon(Icons.person),
)
),
)
],
)
【问题讨论】:
-
您好,您可以发布您的代码吗?展示您尝试实施的内容,以便我们提供帮助。
-
好的,我已经尝试过使用 ListView 和 ListTile " body: groups.isEmpty ? Center(child: Text('No Students')) : ListView( children: [ ...groups.map ((组)=>卡片(海拔:7,孩子:ListTile(前导:CircleAvatar(背景图像:AssetImage('assets/01.jpg'),),标题:文本(组),尾随:图标(图标.person) , ) ), ) ], ) "
标签: flutter dart layout flutter-layout