best way to display text in flutter code example
Example 1: flutter text multiple styles
RichText(
text: TextSpan(
text: 'Hello ',
style: DefaultTextStyle.of(context).style,
children: <TextSpan>[
TextSpan(text: 'bold', style: TextStyle(fontWeight: FontWeight.bold)),
TextSpan(text: ' world!'),
],
),
)
Example 2: how to style text in flutter
Text(
'text'
style: TextStyle(),
),