Unverified Commit b267e7bd authored by Greg Spencer's avatar Greg Spencer Committed by GitHub

This fixes a compile error in the form field example, and switches to using...

This fixes a compile error in the form field example, and switches to using space instead of enter as the example for moving to the next field, since the text field on web unfocuses automatically when enter is pressed. (#61123)
parent 744a1693
......@@ -82,9 +82,8 @@ export 'package:flutter/services.dart' show SmartQuotesType, SmartDashesType;
/// child: Center(
/// child: Shortcuts(
/// shortcuts: <LogicalKeySet, Intent>{
/// // Pressing enter on the field will now move to the next field.
/// LogicalKeySet(LogicalKeyboardKey.enter):
/// NextFocusIntent(),
/// // Pressing space in the field will now move to the next field.
/// LogicalKeySet(LogicalKeyboardKey.space): const NextFocusIntent(),
/// },
/// child: FocusTraversalGroup(
/// child: Form(
......@@ -97,7 +96,7 @@ export 'package:flutter/services.dart' show SmartQuotesType, SmartDashesType;
/// return Padding(
/// padding: const EdgeInsets.all(8.0),
/// child: ConstrainedBox(
/// constraints: BoxConstraints.tight(Size(200, 50)),
/// constraints: BoxConstraints.tight(const Size(200, 50)),
/// child: TextFormField(
/// onSaved: (String value) {
/// print('Value for field $index saved as "$value"');
......
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