📅  最后修改于: 2022-03-11 14:57:55.799000             🧑  作者: Mango
url: https://stackoverflow.com/questions/41557139/how-do-i-bold-or-format-a-piece-of-text-within-a-paragraph
var text = RichText(
text: TextSpan(
// Note: Styles for TextSpans must be explicitly defined.
// Child text spans will inherit styles from parent
style:TextStyle(
fontSize: 14.0,
color: Colors.black,
),
children: [
TextSpan(text: 'Hello'),
TextSpan(text: 'World', style: TextStyle(fontWeight: FontWeight.bold)),
],
),
);