diff --git a/lib/src/fields/form_builder_date_time_picker.dart b/lib/src/fields/form_builder_date_time_picker.dart index b73cd599b..7517c22e5 100644 --- a/lib/src/fields/form_builder_date_time_picker.dart +++ b/lib/src/fields/form_builder_date_time_picker.dart @@ -125,6 +125,7 @@ class FormBuilderDateTimePicker extends FormBuilderFieldDecoration { final SelectableDayPredicate? selectableDayPredicate; final Offset? anchorPoint; final EntryModeChangeCallback? onEntryModeChanged; + final bool barrierDismissible; /// Creates field for `Date`, `Time` and `DateTime` input FormBuilderDateTimePicker({ @@ -195,6 +196,7 @@ class FormBuilderDateTimePicker extends FormBuilderFieldDecoration { this.selectableDayPredicate, this.anchorPoint, this.onEntryModeChanged, + this.barrierDismissible = true, }) : super( builder: (FormFieldState field) { final state = field as _FormBuilderDateTimePickerState; @@ -343,6 +345,7 @@ class _FormBuilderDateTimePickerState extends FormBuilderFieldDecorationState< currentDate: widget.currentDate, anchorPoint: widget.anchorPoint, keyboardType: widget.keyboardType, + barrierDismissible: widget.barrierDismissible, ); } @@ -376,6 +379,7 @@ class _FormBuilderDateTimePickerState extends FormBuilderFieldDecorationState< anchorPoint: widget.anchorPoint, errorInvalidText: widget.errorInvalidText, onEntryModeChanged: widget.onEntryModeChanged, + barrierDismissible: widget.barrierDismissible, ); }