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)
This commit is contained in:
parent
744a169387
commit
b267e7bd9b
@ -82,9 +82,8 @@ export 'package:flutter/services.dart' show SmartQuotesType, SmartDashesType;
|
|||||||
/// child: Center(
|
/// child: Center(
|
||||||
/// child: Shortcuts(
|
/// child: Shortcuts(
|
||||||
/// shortcuts: <LogicalKeySet, Intent>{
|
/// shortcuts: <LogicalKeySet, Intent>{
|
||||||
/// // Pressing enter on the field will now move to the next field.
|
/// // Pressing space in the field will now move to the next field.
|
||||||
/// LogicalKeySet(LogicalKeyboardKey.enter):
|
/// LogicalKeySet(LogicalKeyboardKey.space): const NextFocusIntent(),
|
||||||
/// NextFocusIntent(),
|
|
||||||
/// },
|
/// },
|
||||||
/// child: FocusTraversalGroup(
|
/// child: FocusTraversalGroup(
|
||||||
/// child: Form(
|
/// child: Form(
|
||||||
@ -97,7 +96,7 @@ export 'package:flutter/services.dart' show SmartQuotesType, SmartDashesType;
|
|||||||
/// return Padding(
|
/// return Padding(
|
||||||
/// padding: const EdgeInsets.all(8.0),
|
/// padding: const EdgeInsets.all(8.0),
|
||||||
/// child: ConstrainedBox(
|
/// child: ConstrainedBox(
|
||||||
/// constraints: BoxConstraints.tight(Size(200, 50)),
|
/// constraints: BoxConstraints.tight(const Size(200, 50)),
|
||||||
/// child: TextFormField(
|
/// child: TextFormField(
|
||||||
/// onSaved: (String value) {
|
/// onSaved: (String value) {
|
||||||
/// print('Value for field $index saved as "$value"');
|
/// print('Value for field $index saved as "$value"');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user