【发布时间】:2020-10-08 03:22:50
【问题描述】:
Widget build(BuildContext context) {
return Card(
child: ListTile(
title: new Text(prod_name),
leading: Image.asset(prod_img, width: 50.0, height: 50.0,),
subtitle: new Column(
children: <Widget>[
new Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(0.0),
child: new Text("ice-cream: "),
),
Padding(
padding: const EdgeInsets.all(4.0),
child: new Text(prod_ice_cream, style: TextStyle(color: Colors.red),),
),
),
new Container(
alignment: Alignment.topLeft,
child: new Text("\Rs${prod_price}", style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold),),
),
trailing: new Column(
children: <Widget>[
new IconButton(icon: Icon(Icons.arrow_drop_up), onPressed: (){}),
new IconButton(icon: Icon(Icons.arrow_drop_down), onPressed: (){})
],
),
),
);
添加这两个图标后,我得到“A RenderFlex 在底部溢出 40 像素” 我尝试了stackoverflow 解决方案,但之后我得到“A RenderFlex 在底部溢出了 21 个像素”。这里有一些截图screenshot1screenshot2screenshot3。这是我的完整代码code
【问题讨论】:
-
您的代码甚至无法编译。
-
请发截图
-
添加了一些截图
标签: flutter