【发布时间】:2020-07-12 04:44:39
【问题描述】:
是否可以使我的文本正常,我的意思是单词之间没有空格? 有没有办法通过分隔它们来包装下一行的单词?
这是我的文本部分代码。
Widget textSection({String leadingTitle, String title, String content, BuildContext context}) {
return Row(
children: <Widget>[
Material(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5.0)),
color: Colors.red,
child: Container(
padding: EdgeInsets.all(5.0),
child: Text(leadingTitle,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 18.0)),
),
),
SizedBox(
width: 10.0,
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Text(
text: content,
textAlign: TextAlign.justify,
style: TextStyle(
fontFamily: 'verdana', color: Colors.black, fontSize: 14),
)
],
),
)
],
);
}
【问题讨论】:
-
您能否更清楚地说明所需的输出应该是什么样的?
-
@JJuice 刚刚添加了欲望输出截图
-
@GenchiGenbutsu 没有
textAlign: TextAlign.justify它看起来像这样 - image
标签: flutter text text-align