flutter-autocomplete-textfield icon indicating copy to clipboard operation
flutter-autocomplete-textfield copied to clipboard

when i don't select a item in autoCompleteTextField (android)

Open breitembach opened this issue 5 years ago • 2 comments

The Screen don't Open More

Another exception was thrown: setState() called after dispose(): AutoCompleteTextFieldState<banks>#f9733(lifecycle state: defunct, not mounted

Another exception was thrown: NoSuchMethodError: The method 'clear' was called on null

I/flutter ( 1454): When the exception was thrown, this was the stack:
I/flutter ( 1454): #0      Object.noSuchMethod  (dart:core-patch/object_patch.dart:50:5)
I/flutter ( 1454): #1      new AutoCompleteTextFieldState.<anonymous closure> 
package:autocomplete_textfield/autocomplete_textfield.dart:182
I/flutter ( 1454): #2      ChangeNotifier.notifyListeners 
package:flutter/…/foundation/change_notifier.dart:206
I/flutter ( 1454): #3      FocusNode._notify 
package:flutter/…/widgets/focus_manager.dart:103
I/flutter ( 1454): #4      FocusManager._update 
package:flutter/…/widgets/focus_manager.dart:474
I/flutter ( 1454): (elided 10 frames from package dart:async)
I/flutter ( 1454):
I/flutter ( 1454): The FocusNode sending notification was:
I/flutter ( 1454):   FocusNode#eab7a(FOCUSED)
I/flutter ( 1454): ════════════════════════════════════════════════════════════════════════════════════════════════════

breitembach avatar Jun 22 '19 17:06 breitembach

Not really sure what you mean here...

felixmccuaig avatar Jun 24 '19 11:06 felixmccuaig

What I think @breitembach is trying to say is that "losing focus" event is not triggering. He is selecting the autocomplete widget that then displays the suggestions but if a suggestion isn't selected and tries to leave the page then this results in an exception.

The autocomplete tries to call setState() but the page is now disposed.

msalinas1088 avatar Jul 09 '19 22:07 msalinas1088