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 919955f commit 7c1619cCopy full SHA for 7c1619c
lib/src/fields/form_builder_dropdown.dart
@@ -83,8 +83,8 @@ class _FormBuilderDropdownState<T> extends State<FormBuilderDropdown<T>> {
83
_formState = FormBuilder.of(context);
84
_formState?.registerFieldKey(widget.attribute, _fieldKey);
85
_initialValue = widget.initialValue ??
86
- (_formState.initialValue.containsKey(widget.attribute)
87
- ? _formState.initialValue[widget.attribute]
+ ((_formState?.initialValue?.containsKey(widget.attribute) ?? false)
+ ? _formState?.initialValue[widget.attribute]
88
: null);
89
super.initState();
90
}
0 commit comments