fysoul17 / google_maps_place_picker

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

SearchingState stuck at 'Searching' after selecting a suggested place #124

Closed Wian-TMC closed 2 years ago

Wian-TMC commented 3 years ago

Describe the bug When selecting an option from the suggested dropdown list, the map animates to the selected location, but the SearchingState in the selectedPlaceWidgetBuilder remains stuck at 'SearchingState.Searching', even though a PickResult is returned. When moving the map to a different position it fixes itself.

I am using the pre-release version 2.0.0-nullsafety.3

A temp fix is to check if PickResult is not null in selectedPlaceWidgetBuilder, but then the effect of a loader when moving between places is not possible.

To Reproduce Steps to reproduce the behavior:

  1. Search for any place
  2. Click on any suggestion
  3. Notice the SearchingState in selectedPlaceWidgetBuilder remains stuck at 'SearchingState.Searching'.

Expected behavior The SearchingState in selectedPlaceWidgetBuilder should change to 'SearchingState.Idle' once the PickResult is returned.

Flutter Doctor -v [✓] Flutter (Channel stable, 2.0.6, on Mac OS X 10.15.7 19H15 darwin-x64, locale en-ZA) • Flutter version 2.0.6 at /Users/wiansnyman/Development/flutter • Framework revision 1d9032c7e1 (5 weeks ago), 2021-04-29 17:37:58 -0700 • Engine revision 05e680e202 • Dart version 2.12.3

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /Users/wiansnyman/Library/Android/sdk • Platform android-30, build-tools 30.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.1, Build version 12A7403 • CocoaPods version 1.10.1

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 48.1.2 • Dart plugin version 193.7361 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.56.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.22.0

[✓] Connected device (2 available) • iPhone 11 (mobile) • A412F27A-EB0B-45CA-96B2-9FAC6FB7E655 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-1 (simulator) • Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.212

• No issues found!

svyazist2005 commented 3 years ago

I have met the same issue with google_maps_place_picker: ^2.0.0-nullsafety.3

[✓] Flutter (Channel unknown, 2.0.3, on Mac OS X 10.15.7 19H524 darwin-x64, locale en-UA) • Flutter version 2.0.3 at /Users/svyazist2005/fvm/versions/2.0.3 • Framework revision 4d7946a68d (3 months ago), 2021-03-18 17:24:33 -0700 • Engine revision 3459eb2436 • Dart version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /Users/svyazist2005/WorkTools/Android/sdk • Platform android-30, build-tools 30.0.2 • ANDROID_HOME = /Users/svyazist2005/WorkTools/Android/sdk • Java binary at: /Users/svyazist2005/WorkTools/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS • Xcode at /Users/svyazist2005/WorkTools/Xcode.app/Contents/Developer • Xcode 12.0, Build version 12A7209 ! Xcode 12.0.0 out of date (12.0.1 is recommended). Download the latest version or update via the Mac App Store. • CocoaPods version 1.10.1

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0) • Android Studio at /Users/svyazist2005/WorkTools/Android Studio.app/Contents • Flutter plugin version 48.1.2 • Dart plugin version 193.7547 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (3 available) • sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator) • iPhone 11 (mobile) • C41BAD7E-FAD6-420C-BC88-7E44088648CF • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator) • Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.77

svyazist2005 commented 3 years ago

hi!

the problem that I have this API enabled and it does not help to solve the problem

(https://user-images.githubusercontent.com/16213879/122047153-77be5080-cde8-11eb-8eef-247cfe02734f.png)

пн, 14 июн. 2021 г. в 22:47, Aymeric Le Feyer @.***>:

I had the same issue, try to activate the "Places API" on GCP

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fysoul17/google_maps_place_picker/issues/124#issuecomment-860946648, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3WO5ZIRDRVHZ7EA3YVDRDTSZMEZANCNFSM454ER66Q .

--

З повагою Ілля +380633021629

jahanzebifisol commented 3 years ago

I am facing the same issue. After searching the place loading keeps on loading.

poqueque commented 2 years ago

There is a pull request from a year ago fixing the issue. Hope is merged soon.

martin-braun commented 2 years ago

There is a pull request from a year ago fixing the issue. Hope is merged soon.

This PR is bugged, I tested it. I made a PR fixing this that is not bugged. See #147.