Skip to content

Commit ba8ed34

Browse files
authored
Added keyboard InputType in autofill form (#681)
1 parent f628602 commit ba8ed34

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

form_app/lib/src/autofill.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,27 +45,31 @@ class _AutofillDemoState extends State<AutofillDemo> {
4545
autofillHints: [AutofillHints.familyName],
4646
),
4747
TextField(
48+
keyboardType: TextInputType.emailAddress,
4849
decoration: InputDecoration(
4950
hintText: '[email protected]',
5051
labelText: 'Email',
5152
),
5253
autofillHints: [AutofillHints.email],
5354
),
5455
TextField(
56+
keyboardType: TextInputType.phone,
5557
decoration: InputDecoration(
5658
hintText: '(123) 456-7890',
5759
labelText: 'Telephone',
5860
),
5961
autofillHints: <String>[AutofillHints.telephoneNumber],
6062
),
6163
TextField(
64+
keyboardType: TextInputType.streetAddress,
6265
decoration: InputDecoration(
6366
hintText: '123 4th Ave',
6467
labelText: 'Street Address',
6568
),
6669
autofillHints: <String>[AutofillHints.streetAddressLine1],
6770
),
6871
TextField(
72+
keyboardType: TextInputType.number,
6973
decoration: InputDecoration(
7074
hintText: '12345',
7175
labelText: 'Postal Code',
@@ -80,6 +84,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
8084
autofillHints: <String>[AutofillHints.countryName],
8185
),
8286
TextField(
87+
keyboardType: TextInputType.number,
8388
decoration: InputDecoration(
8489
hintText: '1',
8590
labelText: 'Country Code',

0 commit comments

Comments
 (0)