hideMarkerInfoWindow method

Future<void> hideMarkerInfoWindow(
  1. MarkerId markerId
)

Programmatically hide the Info Window for a Marker.

The markerId must match one of the markers on the map. An invalid markerId triggers an "Invalid markerId" error.

Implementation

Future<void> hideMarkerInfoWindow(MarkerId markerId) {
  if (Platform.isAndroid) {
    return googleController!
        .hideMarkerInfoWindow(markerId.googleMapsMarkerId);
  } else if (Platform.isIOS) {
    return appleController!
        .hideMarkerInfoWindow(markerId.appleMapsAnnoationId);
  }
  throw ('Platform not supported.');
}