zyzdev / flutter_street_view

10 stars 29 forks source link

The screen goes black #5

Closed Santi92 closed 2 years ago

Santi92 commented 2 years ago

Hello again 👋

Summary The screen goes black when it cannot find a view of a location.

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, 2.5.1, on macOS 11.2.3 20D91 darwin-x64, locale en-CO)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
[✓] VS Code (version 1.61.2)
[✓] VS Code (version 1.57.0)
[✓] VS Code (version 1.56.2)
[✓] Connected device (2 available)

pubspec

 name: xxxxxx
 description: xxxxx

 environment:
  sdk: 2.14.2
  flutter: 2.5.1

  dependencies:
  flutter:
    sdk: flutter

   flutter_google_street_view: ^2.2.2

Steps to Reproduce Issue:

Screen Shot 2021-10-29 at 2 38 07 PM

:nerd_face: I have consulted this behavior and it is normal in street view when that location does not yet have mapped, the same thing happens in js SDK. :nerd_face:

The ideal point is to control this case, I would like to know if from the SDK it can be notified through a listener, to detect this behavior and show the user a corresponding message. :question:

zyzdev commented 2 years ago

Hi Santi92,

Callback onPanoramaChangeListener can solve it. Please refer to demo Street View Events Demo in example for the usage of onPanoramaChangeListener.

https://user-images.githubusercontent.com/16483162/139518991-69695d2e-feb6-4827-adb6-4e92508a41d9.mp4

This issue duplicates to issue #2. Close issue here.