Unverified Commit 0f11de2e authored by xster's avatar xster Committed by GitHub

add email to the text fields demo (#13946)

parent 4954bbfa
......@@ -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',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment