what would be the correct KeyboardType for number ...
# compose
m
what would be the correct KeyboardType for number only (not decimal). NumberPassword or Phone ?
I’d do the non-decimal restriction separately from the KeyboardType.
m
number allows decimals. i guess its phone ?
there is also NumberPassword. There is no description anywhere, thats why i ask
you mean on the change callback ?
b
I don’t recommend relying on the keyboard type to enforce input restrictions. I see it as more of a convenience for the user. There’s nothing stopping me from making a keyboard with
KeyboardType.Phone
that has a period character
Yeah, on change callback or whatever other validation mechanism you like