1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

Added keyboard InputType in autofill form (#681)

This commit is contained in:
Alabhya
2021-02-03 05:05:21 +05:30
committed by GitHub
parent f628602f2a
commit ba8ed34582

View File

@@ -45,6 +45,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
autofillHints: [AutofillHints.familyName], autofillHints: [AutofillHints.familyName],
), ),
TextField( TextField(
keyboardType: TextInputType.emailAddress,
decoration: InputDecoration( decoration: InputDecoration(
hintText: 'foo@example.com', hintText: 'foo@example.com',
labelText: 'Email', labelText: 'Email',
@@ -52,6 +53,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
autofillHints: [AutofillHints.email], autofillHints: [AutofillHints.email],
), ),
TextField( TextField(
keyboardType: TextInputType.phone,
decoration: InputDecoration( decoration: InputDecoration(
hintText: '(123) 456-7890', hintText: '(123) 456-7890',
labelText: 'Telephone', labelText: 'Telephone',
@@ -59,6 +61,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
autofillHints: <String>[AutofillHints.telephoneNumber], autofillHints: <String>[AutofillHints.telephoneNumber],
), ),
TextField( TextField(
keyboardType: TextInputType.streetAddress,
decoration: InputDecoration( decoration: InputDecoration(
hintText: '123 4th Ave', hintText: '123 4th Ave',
labelText: 'Street Address', labelText: 'Street Address',
@@ -66,6 +69,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
autofillHints: <String>[AutofillHints.streetAddressLine1], autofillHints: <String>[AutofillHints.streetAddressLine1],
), ),
TextField( TextField(
keyboardType: TextInputType.number,
decoration: InputDecoration( decoration: InputDecoration(
hintText: '12345', hintText: '12345',
labelText: 'Postal Code', labelText: 'Postal Code',
@@ -80,6 +84,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
autofillHints: <String>[AutofillHints.countryName], autofillHints: <String>[AutofillHints.countryName],
), ),
TextField( TextField(
keyboardType: TextInputType.number,
decoration: InputDecoration( decoration: InputDecoration(
hintText: '1', hintText: '1',
labelText: 'Country Code', labelText: 'Country Code',