is it a good idea to use `CharSequence` for text t...
# compose
p
is it a good idea to use
CharSequence
for text type? Is it stable?
Copy code
@Composable
fun Foo(text: CharSequence)
j
No. `CharSequence`s can be mutable (e.g.,
StringBuilder
).
🍺 3
h
Why do you want to use
CharSequence
?
p
Just felt a bit annoyed by the need to have two function overloads for
String
and
AnnotatedText
. So I was wondering if the
CharSequence
would work if I do type-check in the implementation.