mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +00:00
Added Focusnodes in form sample (#707)
This commit is contained in:
@@ -31,6 +31,8 @@ class _AutofillDemoState extends State<AutofillDemo> {
|
||||
...[
|
||||
Text('This sample demonstrates autofill. '),
|
||||
TextFormField(
|
||||
autofocus: true,
|
||||
textInputAction: TextInputAction.next,
|
||||
decoration: InputDecoration(
|
||||
hintText: 'Jane',
|
||||
labelText: 'First Name',
|
||||
@@ -38,6 +40,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
|
||||
autofillHints: [AutofillHints.givenName],
|
||||
),
|
||||
TextFormField(
|
||||
textInputAction: TextInputAction.next,
|
||||
decoration: InputDecoration(
|
||||
hintText: 'Doe',
|
||||
labelText: 'Last Name',
|
||||
@@ -46,6 +49,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
|
||||
),
|
||||
TextField(
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
textInputAction: TextInputAction.next,
|
||||
decoration: InputDecoration(
|
||||
hintText: 'foo@example.com',
|
||||
labelText: 'Email',
|
||||
@@ -54,6 +58,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
|
||||
),
|
||||
TextField(
|
||||
keyboardType: TextInputType.phone,
|
||||
textInputAction: TextInputAction.next,
|
||||
decoration: InputDecoration(
|
||||
hintText: '(123) 456-7890',
|
||||
labelText: 'Telephone',
|
||||
@@ -62,6 +67,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
|
||||
),
|
||||
TextField(
|
||||
keyboardType: TextInputType.streetAddress,
|
||||
textInputAction: TextInputAction.next,
|
||||
decoration: InputDecoration(
|
||||
hintText: '123 4th Ave',
|
||||
labelText: 'Street Address',
|
||||
@@ -70,6 +76,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
|
||||
),
|
||||
TextField(
|
||||
keyboardType: TextInputType.number,
|
||||
textInputAction: TextInputAction.next,
|
||||
decoration: InputDecoration(
|
||||
hintText: '12345',
|
||||
labelText: 'Postal Code',
|
||||
@@ -77,6 +84,7 @@ class _AutofillDemoState extends State<AutofillDemo> {
|
||||
autofillHints: <String>[AutofillHints.postalCode],
|
||||
),
|
||||
TextField(
|
||||
textInputAction: TextInputAction.next,
|
||||
decoration: InputDecoration(
|
||||
hintText: 'United States',
|
||||
labelText: 'Country',
|
||||
|
||||
Reference in New Issue
Block a user