Exception: Null check operator used on a null value
DineshTaral opened this issue ยท 12 comments
I'm not able to search any place don't know why, getting below issue
[VERBOSE-2:ui_dart_state.cc(186)] Unhandled Exception: Null check operator used on a null value
#0 PlacesAutocompleteState.doSearch (package:flutter_google_places/src/flutter_google_places.dart:436:28)
Same problem
Same issue
Also facing same issue :(
You have to send all the parameters of the function:
Prediction p = await PlacesAutocomplete.show( offset: 0, radius: 1000, types: [], strictbounds: false, region: "ar", context: context, apiKey: kGoogleApiKey, mode: Mode.overlay, // Mode.fullscreen language: "es", components: [Component(Component.country, "ar")] );
Null safety migration is not implemented in the right way, strictbounds, components and types aren't required but they're used with Null Check operator "!" which technically means they're required and will have to pass them as a workaround for now.
You have to send all the parameters of the function:
Prediction p = await PlacesAutocomplete.show( offset: 0, radius: 1000, types: [], strictbounds: false, region: "ar", context: context, apiKey: kGoogleApiKey, mode: Mode.overlay, // Mode.fullscreen language: "es", components: [Component(Component.country, "ar")] );
Which I should use it when I want to search place all of world?
Edit:
Oh I can use
components: [ ]
Duplicate of #164, expect an update soon.