onTap property

VoidCallback? onTap
final

Called when the marker is tapped.

On Google Maps a tap also moves the camera to the marker, centred in the part of the map the host's padding leaves clear — the platform's own tap-to-centre ignores that padding. On flutter_map the marker is a live widget, so this is a plain tap on it, with no camera move. Not called on the Mapbox SDK, which draws markers without taps.

Left out of ==: a callback built inline is new on every build, and comparing it would re-render every marker each time.

Implementation

final VoidCallback? onTap;