Closed pahtz closed 1 year ago
@pahtz You can set the base style with the style
parameter in the StyledText
constructor:
StyledText(
text: 'Test: <bold>bold</bold> text.',
style: TextStyle(color: Colors.red), // default text style
tags: {
'bold': StyledTextTag(style: TextStyle(fontWeight: FontWeight.bold)),
},
)
It would be nice to have a baseStyle: for untagged text so you don't have to wrap everything in a tag to get a default style.
Update: Oh, I can use the StyledText(style: TextStyle(...)) parameter.