flutter - 使用RichText 如何设置每个TextS
2023-10-23 本文已影响0人
6bbba3902a7a
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'),
],
),
)