Input keyboard type on Flutter
Setting the keyboard type for input fields helps user entering data. For example, if users need to enter a number, it helps to show a numeric keyboard. If users need to enter an e-mail address, it helps if the at-key (
@) is shown. You should always set an appropriate keyboard type.
In Flutter, you can set a keyboard type by using the
The following values are defined in
datetime: Keyboard optimized for entering date and time, iOS displays default keyboard.
emailAddress: Keyboard optimized for entering e-mail addresses.
multiline: Optimized for multiline text input, by having an enter key.
name: Keyboard optimized for inputting a person's name
none: Prevents the OS from displaying a keyboard.
number: Optimized for unsigned numerical input.
phone: Number keyboard with '
*' and '
streetAddress: Optimized for entering addresses, iOS displays default keyboard.
text: Optimized for text input.
url: Optimized keyboard for entering URLs with '
/' and '
visiblePassword: Keyboard with letters and numbers.
Example of using
TextField( keyboardType: TextInputType.emailAddress, )