1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Flutter】TextInputTypeを使ってキーボードを指定する(テキスト・数字・日付など)

Posted at

TextInputTypeとは?

これを指定することで任意のキーボードを設定可能

今回はTextFormFieldでのkeyboardTypeを変更することで確認を行う

none

フォーカスをしてもキーボードが表示されない。

TextFormField(
   keyboardType: TextInputType.none,
),

Screenshot_1640008711.png

name・text・streetAddress・url

キーボードの見た目は同じように見えた。

TextFormField(
   keyboardType: TextInputType.name,
   // keyboardType: TextInputType.text,
   // keyboardType: TextInputType.streetAddress,
   // keyboardType: TextInputType.url,
),

Screenshot_1640008892.png

emailAddress

TextFormField(
   keyboardType: TextInputType.emailAddress,
),

Screenshot_1640009140.png

multiline

TextFormField(
   keyboardType: TextInputType.multiline,
),

Screenshot_1640009221.png

visiblePassword

TextFormField(
   keyboardType: TextInputType.visiblePassword,
),

Screenshot_1640009552.png

number

TextFormField(
   keyboardType: TextInputType.number,
),

Screenshot_1640008790.png

datetime

TextFormField(
   keyboardType: TextInputType.datetime,
),

Screenshot_1640009059.png

phone

TextFormField(
   keyboardType: TextInputType.phone,
),

Screenshot_1640009289.png

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?