Skip to content

Commit 72534ac

Browse files
Merge pull request #1268 from agent3bood/fix/DateTimePicker_setState
fix: check mounted after async
2 parents 079d25a + fb9634e commit 72534ac

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/src/fields/form_builder_date_time_picker.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ class _FormBuilderDateTimePickerState extends FormBuilderFieldDecorationState<
309309
default:
310310
throw 'Unexpected input type ${widget.inputType}';
311311
}
312+
if (!mounted) return null;
312313
final finalValue = newValue ?? currentValue;
313314
didChange(finalValue);
314315
return finalValue;

0 commit comments

Comments
 (0)