你可以使用RichText和Unicode
final defaultStyle = TextStyle(color: Colors.black);
final blueStyle = TextStyle(color: Colors.blue);
return Center(
child: RichText(
text: TextSpan(
text: "c. 10\u{207B}\u{2076} seconds: ",
style: defaultStyle,
children: [
TextSpan(text: "Hadron epoch ", style: blueStyle, children: [
TextSpan(
style: defaultStyle,
text:
"begins: As the universe cools to about 10\u{00B9}\u{2070} kelvin,",
),
])
]),
),
);
Run Code Online (Sandbox Code Playgroud)
更多信息:https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts
| 归档时间: |
|
| 查看次数: |
858 次 |
| 最近记录: |