fluttercommunity / flutter_google_places

Google Places - Google places autocomplete widgets for flutter. No wrapper, use https://pub.dev/packages/google_maps_webservice. Maintainer: @juliansteenbakker
https://pub.dev/packages/flutter_google_places
Other
303 stars 415 forks source link

Exception: Null check operator used on a null value #165

Closed DineshTaral closed 2 years ago

DineshTaral commented 3 years ago

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)

diggdiganta commented 3 years ago

Same problem

paghardik commented 3 years ago

Duplicate of #164

ysoofiyani commented 3 years ago

Same issue

farhantariq916 commented 3 years ago

Also facing same issue :(

in3mo commented 3 years ago

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")] );

cyuket commented 3 years ago

Thank you @in3mo

hoc081098 commented 3 years ago

Trying it: https://pub.dev/packages/flutter_google_places_hoc081098

AnasMasri commented 3 years ago

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.

dungnc commented 3 years ago

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: [ ]

naqash-smrt-is commented 3 years ago

Used as custom widget image

image Still getting it

naqash-smrt-is commented 3 years ago

Used as custom widget image

image Still getting it

Resolved this by adding the following options in constructor image

juliansteenbakker commented 2 years ago

Duplicate of #164, expect an update soon.