【发布时间】:2020-03-16 22:30:52
【问题描述】:
我正在努力完成这项工作,但我尝试了一切,但仍然无法完成这项工作。所以,我的结构如下:
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
CircleAvatar(
radius: 40.0,
backgroundImage: Image
.network(
'$thumbnail',
fit: BoxFit.cover,
)
.image,
),
SizedBox(
width: 20,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'Really biiiig drink name here',
style: TextStyle(
color: Colors.white,
fontSize: 28
),
),
Text(
'Category goes here',
style: TextStyle(
color: Colors.white.withOpacity(.8)
),
),
],
),
],
),
它呈现如下:
如何在不为父小部件定义固定宽度的情况下剪辑或包装标题文本?
【问题讨论】:
-
将您的
Column包装在Expanded小部件中 -
将@OMiShah 答案与ChyperX 结合起来,我实现了我想要的。谢谢你们。