11part of platform_maps_flutter;
22
33class PlatformMapController {
4- appleMaps.AppleMapController ? appleController;
5- googleMaps.GoogleMapController ? googleController;
4+ appleMaps.AppleMapController ? appleController;
5+ googleMaps.GoogleMapController ? googleController;
66
77 PlatformMapController (dynamic controller) {
88 if (controller.runtimeType == googleMaps.GoogleMapController ) {
@@ -22,7 +22,8 @@ class PlatformMapController {
2222 /// * [isMarkerInfoWindowShown] to check if the Info Window is showing.
2323 Future <void > showMarkerInfoWindow (MarkerId markerId) {
2424 if (Platform .isAndroid) {
25- return googleController! .showMarkerInfoWindow (markerId.googleMapsMarkerId);
25+ return googleController!
26+ .showMarkerInfoWindow (markerId.googleMapsMarkerId);
2627 } else if (Platform .isIOS) {
2728 return appleController!
2829 .showMarkerInfoWindow (markerId.appleMapsAnnoationId);
@@ -40,7 +41,8 @@ class PlatformMapController {
4041 /// * [isMarkerInfoWindowShown] to check if the Info Window is showing.
4142 Future <void > hideMarkerInfoWindow (MarkerId markerId) {
4243 if (Platform .isAndroid) {
43- return googleController! .hideMarkerInfoWindow (markerId.googleMapsMarkerId);
44+ return googleController!
45+ .hideMarkerInfoWindow (markerId.googleMapsMarkerId);
4446 } else if (Platform .isIOS) {
4547 return appleController!
4648 .hideMarkerInfoWindow (markerId.appleMapsAnnoationId);
@@ -56,13 +58,14 @@ class PlatformMapController {
5658 /// * See also:
5759 /// * [showMarkerInfoWindow] to show the Info Window.
5860 /// * [hideMarkerInfoWindow] to hide the Info Window.
59- Future <bool > isMarkerInfoWindowShown (MarkerId markerId) {
61+ Future <bool > isMarkerInfoWindowShown (MarkerId markerId) async {
6062 if (Platform .isAndroid) {
6163 return googleController!
6264 .isMarkerInfoWindowShown (markerId.googleMapsMarkerId);
6365 } else if (Platform .isIOS) {
64- return appleController!
65- .isMarkerInfoWindowShown (markerId.appleMapsAnnoationId);
66+ return await appleController!
67+ .isMarkerInfoWindowShown (markerId.appleMapsAnnoationId) ??
68+ false ;
6669 }
6770 throw ('Platform not supported.' );
6871 }
0 commit comments