Open davoutuk opened 1 year ago
The onPanoramaChangeListener
will receive exception when the location is no valid panorama.
See example Street View Panorama events
for usage.
FlutterGoogleStreetView(
...
onPanoramaChangeListener: (location, exception) {
...
},
...
)
https://github.com/zyzdev/flutter_street_view/assets/16483162/0103024e-51fb-48c7-88cf-961c24d22cae
Business problem: Not all LatLng locations can be translated into a street view. Currently, if a LatLng has no street view then the widget returns a blank black image. In this case, the user does not know why the the black screen is being displayed (e.g. software bug or something wrong with Google or no street view available)
New feature proposal: Add a new attribute to the Street view widget that allow the developer to set a presentation value that would be displayed if no street view were available for a given LatLng. This could either be:
For option 'a' this could be a string value like...
noViewAvailable: 'No view available for this location'
For option (b) this could benoViewAvailable: Row(children: [Icon(Icons.block), Text('No view available for this location)]);