更新时间:2023-11-14 17:20:40
尝试用"Flexible"(而不是可扩展的)包装您的列.
Try wrapping your column with 'Flexible' instead of expandable.
我也遇到相同的问题,即列中的文本溢出,并使用"flexible"将列本身换行,从而使文本变小.
I had the same issue with text overflowing in column and wrapping column itself with 'flexible' allowed to make text smaller.
Flexible(
child: Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: Text(
'Name',
style: CustomTextStyle.blueTitle14(context),
),
),
Padding(
padding: const EdgeInsets.only(bottom: 4.0),
child: Text('Long text'),
),
],
),
),
),