File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ class FormBuilderDateTimePicker extends FormBuilderFieldDecoration<DateTime> {
204
204
return FocusTraversalGroup (
205
205
policy: ReadingOrderTraversalPolicy (),
206
206
child: TextField (
207
- onTap: disablePicker ? () {} : () => state.showPicker (),
207
+ onTap: disablePicker ? null : () => state.showPicker (),
208
208
textDirection: textDirection,
209
209
textAlign: textAlign,
210
210
textAlignVertical: textAlignVertical,
@@ -268,7 +268,8 @@ class _FormBuilderDateTimePickerState
268
268
effectiveFocusNode.onKeyEvent = (node, event) {
269
269
if (event is KeyDownEvent &&
270
270
event.logicalKey == LogicalKeyboardKey .space &&
271
- node.hasFocus) {
271
+ node.hasFocus &&
272
+ ! widget.disablePicker) {
272
273
showPicker ();
273
274
return KeyEventResult .handled;
274
275
}
You can’t perform that action at this time.
0 commit comments