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

Jan Skrasek

03/16/2022, 8:26 AM
Why one `TextField()`'s boolean argument is named
isError
and another without
is
-
readOnly
?
🤔 1
😁 1
z

Zach Klippenstein (he/him) [MOD]

03/16/2022, 2:40 PM
is
is a material prefix? Jk, idk, probably no reason I’m guessing.
j

Jan Skrasek

03/16/2022, 4:59 PM
I mimic this naming in our composables and l get asked about this so trying to come up with other argument than "this is material way"
s

Siyamed

03/16/2022, 5:17 PM
I believe "error" is easier to read as "error message", readOnly does sound like a boolean (to me)
2
z

Zach Klippenstein (he/him) [MOD]

03/16/2022, 5:47 PM
Makes sense, it would still be nice to be consistent with prefixes though 🙈
s

Siyamed

03/16/2022, 5:51 PM
isReadOnly would be better I agree
👍 1
6 Views