What you can do now is much simpler.
If you want to create a RichText
with default TextStyle
, just use Text.rich
:
Text.rich(
TextSpan(
children: [
TextSpan(text: 'Hello '),
TextSpan(
text: 'bold',
style: TextStyle(fontWeight: FontWeight.bold),
),
TextSpan(text: ' world!'),
],
),
)