gpt4 book ai didi

android - 我/flutter (17109) : Another exception was thrown: A RenderFlex overflowed by 80 pixels on the right

转载 作者:IT王子 更新时间:2023-10-29 06:53:52 26 4
gpt4 key购买 nike

我正在使用带有卡片的 ListView ,但我需要在左侧放置一条丝带

错误:

I/flutter (17109): Another exception was thrown: A RenderFlex overflowed by 80 pixels on the right.
I/flutter (17109): Another exception was thrown: A RenderFlex overflowed by 2.0 pixels on the right.
I/flutter (17109): Another exception was thrown: A RenderFlex overflowed by 63 pixels on the right.
I/flutter (17109): Another exception was thrown: A RenderFlex overflowed by 19 pixels on the right.
I/flutter (17109): Another exception was thrown: A RenderFlex overflowed by 80 pixels on the right.
I/flutter (17109): Another exception was thrown: A RenderFlex overflowed by 2.0 pixels on the right

App Image

代码项构建器 ListView

Dismissible(
onDismissed: (direction){
launch("tel:0${snapshot.data[index].celular}");
},
background: Card(
color: hexToColor("#25D366"),
child: Padding(padding: EdgeInsets.all(3.0),
child: Align(
alignment:Alignment.centerRight,
child: Icon(Icons.phone, color: Colors.white, size: 35.0,),
),
)
),
direction: DismissDirection.endToStart,
key: Key(DateTime.now().millisecondsSinceEpoch.toString()),
child: Card(
margin: EdgeInsets.symmetric(
horizontal: 5.0, vertical: 4.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
width: 8.0,
height: 110.0,
color: Colors.green,
child: Card(

),

),
Padding(
padding: EdgeInsets.only(
left: 1.0,
top: 7.0,
right: 5.0,
bottom: 5.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text("CLIENTE: " + snapshot.data[index].nomeCliente, style: TextStyle(fontWeight: FontWeight.bold,color: Colors.blueGrey),),
Text("CONTATO: " + snapshot.data[index].contato,style: TextStyle(fontWeight: FontWeight.bold,color: Colors.blueGrey),),
Text("DESCRIÇAO: " + snapshot.data[index].descricaoOS,style: TextStyle(fontWeight: FontWeight.bold,color: Colors.blueGrey),),
Text("CELULAR: " +snapshot.data[index].celular,style: TextStyle(fontWeight: FontWeight.bold,color: Colors.blueGrey),),
Row(
mainAxisAlignment:
MainAxisAlignment.end,
children: <Widget>[
Container(
margin: EdgeInsets.only(
bottom: 0.0, top: 0.0),
width: 25.0,
height: 30.0,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
image: DecorationImage(
image: AssetImage(
snapshot.data[index].origemOS == "INTERNO"?"images/interno.png":"images/carro.png"
)),
),
),
Text(
"OS: " +
snapshot.data[index].numOS
.toString(),
style: TextStyle(
fontWeight: FontWeight.bold,
color: hexToColor("#90B348")),
),
],
),
],
),
)
],
),
),
);

最佳答案

您需要用 Expanded 小部件包裹您的行第二个子项 - Padding

Dismissible(
onDismissed: (direction) {
// launch("tel:0123");
},
background: Card(
color: Colors.grey,
child: Padding(
padding: EdgeInsets.all(3.0),
child: Align(
alignment: Alignment.centerRight,
child: Icon(
Icons.phone,
color: Colors.white,
size: 35.0,
),
),
)),
direction: DismissDirection.endToStart,
key: Key(DateTime.now().millisecondsSinceEpoch.toString()),
child: Card(
margin: EdgeInsets.symmetric(horizontal: 5.0, vertical: 4.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
width: 8.0,
height: 110.0,
color: Colors.green,
child: Card(),
),
Expanded( //Add this - wrap second Child with Expanded
child: Padding(
padding:
EdgeInsets.only(left: 1.0, top: 7.0, right: 5.0, bottom: 5.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
......//Code Cont

关于android - 我/flutter (17109) : Another exception was thrown: A RenderFlex overflowed by 80 pixels on the right,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54731856/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com