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 49eaba1 commit 40cfc4bCopy full SHA for 40cfc4b
lib/src/fields/form_builder_typeahead.dart
@@ -206,9 +206,9 @@ class _FormBuilderTypeAheadState<T> extends State<FormBuilderTypeAhead<T>> {
206
void dispose() {
207
_formState?.unregisterFieldKey(widget.attribute);
208
if (widget.controller == null) {
209
- _typeAheadController.dispose();
+ _typeAheadController?.dispose();
210
} else {
211
- _typeAheadController.removeListener(_handleStringOnChanged);
+ _typeAheadController?.removeListener(_handleStringOnChanged);
212
}
213
if (widget.textFieldConfiguration.focusNode == null) {
214
_typeAheadFocusNode?.dispose();
0 commit comments