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

Result don't show on my screen #159

Closed guijacobus2 closed 2 years ago

guijacobus2 commented 3 years ago

I am having the following issue: I have a Flutter project with a Text Form Field where I am calling the flutter_google_places API. I can see the new screen when I click on it, the Powered By Google Logo, but when I search any address, I can't see any results, only a loading bar under the search bar, but no results, just a blank screen.

This is the code I am using for now:

TextFormField( decoration: textInputDecoration.copyWith( hintText: "Enter Company Address", prefixIcon: Icon(Icons.map), ), onTap: () async { Prediction p = await PlacesAutocomplete.show( context: context, apiKey: kGoogleApiKey, mode: Mode.fullscreen, ); return p; }, validator: (val) => val.isEmpty ? 'Enter address' : null, onChanged: (val) { setState(() => address = val); }, ),

muhammadsaddamnur commented 3 years ago

same issue

KevMorelli commented 3 years ago

Did you replaced kGoogleApiKey value with your API key and enabled billing?

guijacobus2 commented 3 years ago

@KevMorelli yes all API’s are enabled, billing account active, replaced by my apy... Don’t know what’s wrong

KevMorelli commented 3 years ago

Any info on the debug console?

muhammadsaddamnur commented 3 years ago

i try get API in postman with my key is fine, i have result from API. but when use this package i don't have result or error on debug console.

guijacobus2 commented 3 years ago

I got it working, had to set the strictbound to false and radius to 100000