Hi. How can add bold to a part of a text? (the `@...
# compose
a
Hi. How can add bold to a part of a text? (the
@nosferatu95
part
v
you should use the “annotatedString”:
Copy code
Text(
 buildAnnotatedString {
  pushStyle(SpanStyle(fontWeight = FontWeight.Bold))
  append("@${userName} ")
  pop()
  append(yourString)
 }
)
a
nice, thanks
🙌 1
s
You can use withStyle which is a shortcut for push/pop
🙌 1