1
1
part of platform_maps_flutter;
2
2
3
3
class PlatformMapController {
4
- appleMaps.AppleMapController ? appleController;
5
- googleMaps.GoogleMapController ? googleController;
4
+ appleMaps.AppleMapController ? appleController;
5
+ googleMaps.GoogleMapController ? googleController;
6
6
7
7
PlatformMapController (dynamic controller) {
8
8
if (controller.runtimeType == googleMaps.GoogleMapController ) {
@@ -22,7 +22,8 @@ class PlatformMapController {
22
22
/// * [isMarkerInfoWindowShown] to check if the Info Window is showing.
23
23
Future <void > showMarkerInfoWindow (MarkerId markerId) {
24
24
if (Platform .isAndroid) {
25
- return googleController! .showMarkerInfoWindow (markerId.googleMapsMarkerId);
25
+ return googleController!
26
+ .showMarkerInfoWindow (markerId.googleMapsMarkerId);
26
27
} else if (Platform .isIOS) {
27
28
return appleController!
28
29
.showMarkerInfoWindow (markerId.appleMapsAnnoationId);
@@ -40,7 +41,8 @@ class PlatformMapController {
40
41
/// * [isMarkerInfoWindowShown] to check if the Info Window is showing.
41
42
Future <void > hideMarkerInfoWindow (MarkerId markerId) {
42
43
if (Platform .isAndroid) {
43
- return googleController! .hideMarkerInfoWindow (markerId.googleMapsMarkerId);
44
+ return googleController!
45
+ .hideMarkerInfoWindow (markerId.googleMapsMarkerId);
44
46
} else if (Platform .isIOS) {
45
47
return appleController!
46
48
.hideMarkerInfoWindow (markerId.appleMapsAnnoationId);
@@ -56,13 +58,14 @@ class PlatformMapController {
56
58
/// * See also:
57
59
/// * [showMarkerInfoWindow] to show the Info Window.
58
60
/// * [hideMarkerInfoWindow] to hide the Info Window.
59
- Future <bool > isMarkerInfoWindowShown (MarkerId markerId) {
61
+ Future <bool > isMarkerInfoWindowShown (MarkerId markerId) async {
60
62
if (Platform .isAndroid) {
61
63
return googleController!
62
64
.isMarkerInfoWindowShown (markerId.googleMapsMarkerId);
63
65
} else if (Platform .isIOS) {
64
- return appleController!
65
- .isMarkerInfoWindowShown (markerId.appleMapsAnnoationId);
66
+ return await appleController!
67
+ .isMarkerInfoWindowShown (markerId.appleMapsAnnoationId) ??
68
+ false ;
66
69
}
67
70
throw ('Platform not supported.' );
68
71
}
0 commit comments