Home > Blockchain >  How to force EditText to accept only numbers in compose kotlin?
How to force EditText to accept only numbers in compose kotlin?

Time:12-05

How to force outLineTxtFieldValue to accept only numbers ?.

For example,

user can only enter numbers, not a negative value. We can enter numbers such as

120, 1, 9, 10012,

in short, we can say positive integers or natural numbers in kotlin compose outlinetextfield or textfield

CodePudding user response:

TextField(
    keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Number)
  • Related