【发布时间】:2021-11-13 05:59:35
【问题描述】:
使该行具有响应性的最佳方法是什么?我遇到的问题之一是如果团队名称有很多字符,那么就会出现溢出像素错误。看截图
另见下面的代码
child: Row(
//mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const SizedBox(
child: Padding(
padding: EdgeInsets.all(10.0),
child: Text(
'Bosnia and Herzegovina',
style: TextStyle(
fontFamily: 'Poppins',
),
),
),
),
SizedBox(
child: Image.network(
'https://upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Flag_of_Bosnia_and_Herzegovina.svg/1920px-Flag_of_Bosnia_and_Herzegovina.svg.png',
height: 50,
fit: BoxFit.cover,
),
),
Card(
child: Container(
width: 70,
color: Colors.amber,
child: const Padding(
padding: EdgeInsets.all(10.0),
child: Text(
"4:0",
textAlign: TextAlign.center,
)),
),
),
SizedBox(
child: Image.network(
'https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Flag_of_the_Czech_Republic.svg/1920px-Flag_of_the_Czech_Republic.svg.png',
height: 50,
fit: BoxFit.cover,
),
),
const SizedBox(
child: Padding(
padding: EdgeInsets.all(10.0),
child: Text(
'Czech Republic',
style: TextStyle(
fontFamily: 'Poppins',
),
),
),
)
],
),
【问题讨论】:
标签: flutter responsive-design flutter-layout row flutter-test