Input keyboard type - Flutter

In Flutter, you can set a keyboard type by using the keyboardType property.

The following values are defined in TextInputType:

  • 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 keyboardType:

TextField( 
  keyboardType: TextInputType.emailAddress,
)