-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: error thrown when dialog back button is pressed without entering any text into search bar #191
Comments
please fix this issue |
same issue |
Can you please try the following in
|
That worked for me. Thanks!
|
https://github.com/fluttercommunity/flutter_google_places I am a beginner in both formats but I have not found more information thanks ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ |
In flutter_google_places.dart main class it add listener in initState() @OverRide in the listener it initialized the _debounce. void _onQueryChange() { _debounce!.cancel(); } So when we back button pressed without entering text add listener not called and _debounce is not initialized and on dispose we cancel the debounce with ! operator which throws the error because it is not initialized. So change the _debounce!.cancel() to _debounce?.cancel() will solve the error. |
I'm having the same issue, and manually changing _debounce!.cancel() to _debounce?.cancel() worked for me too. Would be great to have this included in a release. |
Null check operator used on a null value
The text was updated successfully, but these errors were encountered: