How do you handle text capitalization in Button()?...
# compose
l
How do you handle text capitalization in Button()? The text gets automatically styled with Typography.button as far as I understood but it doesn't seem to be actually capitalizing it.
c
Capitalization is not part of
TextStyle
so you have to use
"Text".uppercase()
. If you find you want to capitalize all Button text, I’d suggest just creating a custom Composable that wraps Button with uppercased text
@Louis Pullen-Freilich [G] may have more advice on how to manage this better though
l
Yeah, that's probably the cleanest way if you want to do it globally, automatically.