-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
d: examplesSample code and demosSample code and demosp: mapsGoogle Maps pluginGoogle Maps pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionwaiting for PR to land (fixed)A fix is in flightA fix is in flight
Description
I found a small bug in the example in google maps flutter.
there is a function written as:-
void _onMarkerTapped(MarkerId markerId) {
final Marker? tappedMarker = markers[markerId];
if (tappedMarker != null) {
setState(() {
if (markers.containsKey(markerId)) {
final Marker resetOld = markers[markerId]!
.copyWith(iconParam: BitmapDescriptor.defaultMarker);
markers[markerId] = resetOld;
}
selectedMarker = markerId;
final Marker newMarker = tappedMarker.copyWith(
iconParam: BitmapDescriptor.defaultMarkerWithHue(
BitmapDescriptor.hueGreen,
),
);
markers[markerId] = newMarker;
});
}
}
here instead of resetting markers[markerId] we should reset markers[selectedMarker].
I have opened a pull request for it, can someone guide me?
Metadata
Metadata
Assignees
Labels
d: examplesSample code and demosSample code and demosp: mapsGoogle Maps pluginGoogle Maps pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionwaiting for PR to land (fixed)A fix is in flightA fix is in flight