如果我有一个长标题,根据字符串的长度分成两行,则正文文本在 Container 小部件内剪裁不正确
Expanded(
child: Container(
height: MediaQuery.of(context).size.height / 7.5,
padding: EdgeInsets.only(right: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
'HERE SOME LONG HEADLINE, WITH 1 or 2 Lines'
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
SizedBox(
height: 3.0,
),
Expanded(
child: Text(
'here some long body text over more lines, which is cut wrong when the headline is two lines',
overflow: TextOverflow.ellipsis,
softWrap: true,
maxLines: 5,
textAlign: TextAlign.left,
),
),
],
),
),
),