https://kotlinlang.org logo
#compose
Title
# compose
r

RayeW47

06/07/2022, 8:03 PM
Suggestions on how to handle over 2 states of validity for a field? Valid/Maybe/Invalid? Currently the default
TextField
takes
isError: Boolean
and I'm using my
Maybe
state as a valid state with a small context message. I'm trying to not work around this in a way that I think is weird like... replacing the
colors: TextFieldColors
, but maybe that's actually a better way to do it than I'm trying to hint at?
s

Sean McQuillan [G]

06/07/2022, 9:48 PM
This solution looks reasonable to me, since you're using the full styling of TextField.
👍 1
c

Colton Idle

06/08/2022, 12:09 AM
Yeah. This makes sense to me
👍 1
r

RayeW47

06/08/2022, 7:54 AM
Huh, thank you for the input. I thought that might be doing it weirdly but nice to know that some people agree with me.
c

Colton Idle

06/08/2022, 6:35 PM
If you share some code we can comment on that
r

RayeW47

06/08/2022, 7:41 PM
here's an MVP, re-writing to an MVP also helped me understand recomposition a little bit more
2 Views