Skip to content

Commit b96fe62

Browse files
committed
fix: Build failure after Nullability update
1 parent 2112aea commit b96fe62

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## 1.0.0
22

3-
* Adds null safety. Refresh example app.
3+
* Adds null safety. Refresh example app (Tanks to @jonbhanson).
44

55
## 0.1.9+4
66

lib/src/controller.dart

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
part of platform_maps_flutter;
22

33
class 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
}

pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dependencies:
1313
sdk: flutter
1414

1515
google_maps_flutter: ^2.0.1
16+
google_maps_flutter_platform_interface: ^2.0.3
1617
apple_maps_flutter: ^1.0.0
1718

1819
dev_dependencies:

0 commit comments

Comments
 (0)