forked from firka/flutter
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:
@@ -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"');
|
||||
|
||||
Reference in New Issue
Block a user