hideMarkerInfoWindow method
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.
- See also:
- showMarkerInfoWindow to show the Info Window.
- isMarkerInfoWindowShown to check if the Info Window is showing.
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.');
}