RichText(
text: TextSpan(
children: [
TextSpan(text: 'Hello'),
WidgetSpan(
child: SizedBox(width: 10), // 设置间隙的宽度
),
TextSpan(text: 'World'),
],
),
)
RichText(
text: TextSpan(
children: [
TextSpan(text: 'Hello'),
WidgetSpan(
child: SizedBox(width: 10), // 设置间隙的宽度
),
TextSpan(text: 'World'),
],
),
)
本文标题:flutter - 使用RichText 如何设置每个TextS
本文链接:https://www.haomeiwen.com/subject/ypqjidtx.html
网友评论