AnnotatedString: Rich Mixed Text
Style spans within a single Text block.
One Text, Many Styles
Sometimes one word in a sentence needs to stand out. AnnotatedString lets you style spans inside a single Text composable.
Why Not Two Texts
You could split words into separate Texts, but they would wrap awkwardly. AnnotatedString keeps everything as one flowing, naturally wrapping line.
All lessons in this course
- The Text Composable
- Font Size, Weight & Style
- Color, Alignment & Overflow
- AnnotatedString: Rich Mixed Text