Hello, can someone be kind enough to show me how to put different colored words in a text field, im using BasicTextField, please, ill really appreciate. i was trying to find annotated string but i could find that option
✅ 1
l
lazt omen
10/24/2023, 7:53 PM
Copy code
BasicTextField(colorFieldValue, {
colorFieldValue = it.copy(
annotatedString = buildAnnotatedString {
for (i in 0 until it.text.length step 5) {
withStyle(
style = SpanStyle(
color = Color(
i*255 + 2.0.pow(31.0).toInt()
)
)
) {
append(it.text.substring(i).take(5))
}
}
}
)
})