【发布时间】:2021-06-30 23:15:44
【问题描述】:
我想知道如何实现类似或接近此的目标 image 而不是使用卡片 任何示例代码都将受到高度赞赏
【问题讨论】:
标签: flutter user-interface layout
我想知道如何实现类似或接近此的目标 image 而不是使用卡片 任何示例代码都将受到高度赞赏
【问题讨论】:
标签: flutter user-interface layout
试试这个代码
ListView.builder(
itemCount: 2,
itemBuilder: (BuildContext context, int index) {
return Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Row(
children: <Widget>[
SizedBox(width: 10.0),
Image.asset(
'Your Asset',
height: 100,
),
SizedBox(width: 20.0),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(
'Title Here',
style: TextStyle(
color: Colors.black,
fontSize: 18.0,
fontWeight: FontWeight.w500,
),
),
SizedBox(width: 6.0),
Text(
'Subtitle Here',
style: TextStyle(
color: Colors.black,
fontSize: 15.0,
fontWeight: FontWeight.w300,
),
),
],
),
),
],
),
Divider(
color: Colors.black,
thickness: 1.5,
),
],
);
},
),
【讨论】: