We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5101607 commit babaceaCopy full SHA for babacea
lib/src/fields/form_builder_date_time_picker.dart
@@ -298,10 +298,11 @@ class _FormBuilderDateTimePickerState extends FormBuilderFieldDecorationState<
298
newValue = await _showDatePicker(context, currentValue);
299
break;
300
case InputType.time:
301
- final newTime = await _showTimePicker(context, currentValue);
302
- newValue = null != newTime ? convert(newTime) : null;
+ if (!context.mounted) return null;
+ newValue = convert(await _showTimePicker(context, currentValue));
303
304
case InputType.both:
305
306
final date = await _showDatePicker(context, currentValue);
307
if (date != null) {
308
if (!mounted) break;
0 commit comments