|
|
@ -31,6 +31,8 @@ class _AutofillDemoState extends State<AutofillDemo> {
|
|
|
|
...[
|
|
|
|
...[
|
|
|
|
Text('This sample demonstrates autofill. '),
|
|
|
|
Text('This sample demonstrates autofill. '),
|
|
|
|
TextFormField(
|
|
|
|
TextFormField(
|
|
|
|
|
|
|
|
autofocus: true,
|
|
|
|
|
|
|
|
textInputAction: TextInputAction.next,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: 'Jane',
|
|
|
|
hintText: 'Jane',
|
|
|
|
labelText: 'First Name',
|
|
|
|
labelText: 'First Name',
|
|
|
@ -38,6 +40,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
|
|
|
|
autofillHints: [AutofillHints.givenName],
|
|
|
|
autofillHints: [AutofillHints.givenName],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
TextFormField(
|
|
|
|
TextFormField(
|
|
|
|
|
|
|
|
textInputAction: TextInputAction.next,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: 'Doe',
|
|
|
|
hintText: 'Doe',
|
|
|
|
labelText: 'Last Name',
|
|
|
|
labelText: 'Last Name',
|
|
|
@ -46,6 +49,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
TextField(
|
|
|
|
TextField(
|
|
|
|
keyboardType: TextInputType.emailAddress,
|
|
|
|
keyboardType: TextInputType.emailAddress,
|
|
|
|
|
|
|
|
textInputAction: TextInputAction.next,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: 'foo@example.com',
|
|
|
|
hintText: 'foo@example.com',
|
|
|
|
labelText: 'Email',
|
|
|
|
labelText: 'Email',
|
|
|
@ -54,6 +58,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
TextField(
|
|
|
|
TextField(
|
|
|
|
keyboardType: TextInputType.phone,
|
|
|
|
keyboardType: TextInputType.phone,
|
|
|
|
|
|
|
|
textInputAction: TextInputAction.next,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: '(123) 456-7890',
|
|
|
|
hintText: '(123) 456-7890',
|
|
|
|
labelText: 'Telephone',
|
|
|
|
labelText: 'Telephone',
|
|
|
@ -62,6 +67,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
TextField(
|
|
|
|
TextField(
|
|
|
|
keyboardType: TextInputType.streetAddress,
|
|
|
|
keyboardType: TextInputType.streetAddress,
|
|
|
|
|
|
|
|
textInputAction: TextInputAction.next,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: '123 4th Ave',
|
|
|
|
hintText: '123 4th Ave',
|
|
|
|
labelText: 'Street Address',
|
|
|
|
labelText: 'Street Address',
|
|
|
@ -70,6 +76,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
TextField(
|
|
|
|
TextField(
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
|
|
|
|
textInputAction: TextInputAction.next,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: '12345',
|
|
|
|
hintText: '12345',
|
|
|
|
labelText: 'Postal Code',
|
|
|
|
labelText: 'Postal Code',
|
|
|
@ -77,6 +84,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
|
|
|
|
autofillHints: <String>[AutofillHints.postalCode],
|
|
|
|
autofillHints: <String>[AutofillHints.postalCode],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
TextField(
|
|
|
|
TextField(
|
|
|
|
|
|
|
|
textInputAction: TextInputAction.next,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: 'United States',
|
|
|
|
hintText: 'United States',
|
|
|
|
labelText: 'Country',
|
|
|
|
labelText: 'Country',
|
|
|
|