MarkerTapBehavior.togglePopupAndHideRest constructor
MarkerTapBehavior.togglePopupAndHideRest()
Toggle the popup of the tapped marker and hide all other popups. This is the recommended behavior if you only want to show one popup at a time.
Implementation
MarkerTapBehavior.togglePopupAndHideRest()
: _onTap = ((
Marker marker,
PopupState popupState,
PopupController popupController,
) {
if (popupState.selectedMarkers.contains(marker)) {
popupController.hideAllPopups();
} else {
popupController.showPopupsOnlyFor([marker]);
}
});