add email to the text fields demo (#13946)
This commit is contained in:
@@ -19,6 +19,7 @@ class TextFormFieldDemo extends StatefulWidget {
|
||||
class PersonData {
|
||||
String name = '';
|
||||
String phoneNumber = '';
|
||||
String email = '';
|
||||
String password = '';
|
||||
}
|
||||
|
||||
@@ -144,6 +145,15 @@ class TextFormFieldDemoState extends State<TextFormFieldDemo> {
|
||||
_phoneNumberFormatter,
|
||||
],
|
||||
),
|
||||
new TextFormField(
|
||||
decoration: const InputDecoration(
|
||||
icon: const Icon(Icons.email),
|
||||
hintText: 'Your email address',
|
||||
labelText: 'E-mail',
|
||||
),
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
onSaved: (String value) { person.email = value; },
|
||||
),
|
||||
new TextFormField(
|
||||
decoration: const InputDecoration(
|
||||
hintText: 'Tell us about yourself',
|
||||
|
||||
Reference in New Issue
Block a user