Commit 571834ea authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Indicate required fields in flutter_gallery demo. (#7717)

parent c234d405
......@@ -116,20 +116,20 @@ class TextFieldDemoState extends State<TextFieldDemo> {
new TextField(
icon: new Icon(Icons.person),
hintText: 'What do people call you?',
labelText: 'Name',
labelText: 'Name *',
onSaved: (InputValue val) { person.name = val.text; },
validator: _validateName,
),
new TextField(
icon: new Icon(Icons.phone),
hintText: 'Where can we reach you?',
labelText: 'Phone Number',
labelText: 'Phone Number *',
keyboardType: TextInputType.phone,
onSaved: (InputValue val) { person.phoneNumber = val.text; },
validator: _validatePhoneNumber,
),
new TextField(
hintText: 'Tell us about yourself (optional)',
hintText: 'Tell us about yourself',
labelText: 'Life story',
maxLines: 3,
),
......@@ -140,7 +140,7 @@ class TextFieldDemoState extends State<TextFieldDemo> {
child: new TextField(
key: _passwordFieldKey,
hintText: 'How do you log in?',
labelText: 'New Password',
labelText: 'New Password *',
obscureText: true,
onSaved: (InputValue val) { person.password = val.text; }
)
......@@ -149,7 +149,7 @@ class TextFieldDemoState extends State<TextFieldDemo> {
new Expanded(
child: new TextField(
hintText: 'How do you log in?',
labelText: 'Re-type Password',
labelText: 'Re-type Password *',
obscureText: true,
validator: _validatePassword,
)
......@@ -163,7 +163,11 @@ class TextFieldDemoState extends State<TextFieldDemo> {
child: new Text('SUBMIT'),
onPressed: _handleSubmitted,
),
)
),
new Container(
padding: const EdgeInsets.only(top: 20.0),
child: new Text('* indicates required field', style: Theme.of(context).textTheme.caption),
),
]
)
)
......
......@@ -596,12 +596,12 @@ class DataTable extends StatelessWidget {
/// Must have an ancestor [Material] widget in which to cause ink
/// reactions and an ancestor [Table] widget to establish a row.
///
/// The TableRowInkWell must be in the same coordinate space (modulo
/// The [TableRowInkWell] must be in the same coordinate space (modulo
/// translations) as the [Table]. If it's rotated or scaled or
/// otherwise transformed, it will not be able to describe the
/// rectangle of the row in its own coordinate system as a [Rect], and
/// thus the splash will not occur. (In general, this is easy to
/// achieve: just put the TableRowInkWell as the direct child of the
/// achieve: just put the [TableRowInkWell] as the direct child of the
/// [Table], and put the other contents of the cell inside it.)
class TableRowInkWell extends InkResponse {
/// Creates an ink well for a table row.
......
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