Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/google_maps_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.5.12

* Prevent calling null callbacks and callbacks on removed objects.

## 0.5.11+1

* Android: Fix an issue where myLocationButtonEnabled setting was not propagated when set to false onMapLoad.
Expand Down
16 changes: 12 additions & 4 deletions packages/google_maps_flutter/lib/src/google_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -248,24 +248,32 @@ class _GoogleMapState extends State<GoogleMap> {
void onMarkerTap(String markerIdParam) {
assert(markerIdParam != null);
final MarkerId markerId = MarkerId(markerIdParam);
_markers[markerId].onTap();
if (_markers[markerId]?.onTap != null) {
_markers[markerId].onTap();
}
}

void onPolylineTap(String polylineIdParam) {
assert(polylineIdParam != null);
final PolylineId polylineId = PolylineId(polylineIdParam);
_polylines[polylineId].onTap();
if (_polylines[polylineId]?.onTap != null) {
_polylines[polylineId].onTap();
}
}

void onInfoWindowTap(String markerIdParam) {
assert(markerIdParam != null);
final MarkerId markerId = MarkerId(markerIdParam);
_markers[markerId].infoWindow.onTap();
if (_markers[markerId]?.infoWindow?.onTap != null) {
_markers[markerId].infoWindow.onTap();
}
}

void onTap(LatLng position) {
assert(position != null);
widget.onTap(position);
if (widget.onTap != null) {
widget.onTap(position);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/google_maps_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_maps_flutter
description: A Flutter plugin for integrating Google Maps in iOS and Android applications.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/google_maps_flutter
version: 0.5.11+1
version: 0.5.12

dependencies:
flutter:
Expand Down