fysoul17 / google_maps_place_picker

Place picker on Google Maps for Flutter
MIT License
222 stars 357 forks source link

Autocomplete doesn't work without device location? #85

Open xJon opened 3 years ago

xJon commented 3 years ago

Describe the bug When the device's location is turned off, and therefore also Google's location service, the picker will become non-usable as there will be no autocomplete options.

To Reproduce Steps to reproduce the behavior:

  1. Disable device location
  2. Use PlacePicker()
  3. Answer NO THANKS for enabling device location & using Google's location service
  4. Try to search & see error

Expected behavior I'm not sure, but it didn't seem to be clear the package only works when device location is turned on.

Screenshots gif

Flutter Doctor -v

[√] Flutter (Channel stable, 1.22.4, on Microsoft Windows [Version 10.0.19042.630], locale en-AU) • Framework revision 1aafb3a8b9 (8 days ago), 2020-11-13 09:59:28 -0800 • Engine revision 2c956a31c0 • Dart version 2.10.4 [√] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Platform android-29, build-tools 29.0.2 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) • All Android licenses accepted. [!] Android Studio (version 4.1.0) X Flutter plugin not installed; this adds Flutter specific functionality. X Dart plugin not installed; this adds Dart specific functionality. • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) [√] VS Code (version 1.51.1) • Flutter extension version 3.16.0 [√] Connected device (1 available) • Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 6.0 (API 23) (emulator)

Additional context I tried setting forceAndroidLocationManager: true, which did not help.

fysoul17 commented 3 years ago

Try setting 'useCurrentLocation' to false when a user disabled the location service.

xJon commented 3 years ago

Try setting 'useCurrentLocation' to false when a user disabled the location service.

Hi, I've tried that and it did not work. I also just tried setting useCurrentLocation to false, and the autocomplete does not work when location services are off.

xJon commented 3 years ago

Hi, is there any workaround for this issue, apart from requiring location services & permissions before using the package? Thank you!