Skip to content

[google_maps_flutter] Android cluster pin info window onTap callback not firing#11390

Merged
auto-submit[bot] merged 3 commits intoflutter:mainfrom
ReportAll:fix/marker-info-window-clusters
Apr 7, 2026
Merged

[google_maps_flutter] Android cluster pin info window onTap callback not firing#11390
auto-submit[bot] merged 3 commits intoflutter:mainfrom
ReportAll:fix/marker-info-window-clusters

Conversation

@elitree
Copy link
Copy Markdown
Contributor

@elitree elitree commented Mar 30, 2026

As described in flutter/flutter#184338, Google Maps Flutter Android has an issue where the cluster pin info window doesn't fire the onTap callback. That's the info window that shows when you tap a clustered pin (a pin which is part of a cluster manager). While the info window shows properly, the onTap doesn't fire in Android, but properly fires in other platforms.

Fixes flutter/flutter#184338

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@elitree elitree force-pushed the fix/marker-info-window-clusters branch from 01f4b2f to 1ef8250 Compare March 30, 2026 14:47
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for info window tap events on clustered markers in the Google Maps Android plugin. It introduces the OnClusterItemInfoWindowClickListener interface, implements it in GoogleMapController, and updates ClusterManagersController and MarkersController to handle the event and notify the Flutter API. Unit tests are included to verify the implementation. Feedback suggests refactoring MarkersController to reduce code duplication between the info window tap handlers.

Comment on lines +310 to +316
/**
* Called when a cluster-managed marker's info window is tapped. Takes the Dart marker ID
* directly.
*/
void onClusterItemInfoWindowTap(String markerId) {
flutterApi.onInfoWindowTap(markerId, new NoOpVoidResult());
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve maintainability and reduce code duplication, you could refactor this new method and the existing onInfoWindowTap to share a common private method. The current implementation duplicates the call to flutterApi.onInfoWindowTap.

For example, you could introduce a private method that takes the Dart markerId and makes the API call. Then, both onInfoWindowTap (after resolving the googleMarkerId) and this new onClusterItemInfoWindowTap method could call that private method.

@reidbaker reidbaker requested a review from a team April 2, 2026 18:38
Copy link
Copy Markdown
Collaborator

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 7, 2026
@auto-submit auto-submit Bot merged commit 221eb21 into flutter:main Apr 7, 2026
81 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 9, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 9, 2026
github-merge-queue Bot pushed a commit to flutter/flutter that referenced this pull request Apr 9, 2026
flutter/packages@0e0a032...1aa892c

2026-04-09 10687576+bparrishMines@users.noreply.github.com
[webview_flutter_android] Adds support to opt out of Android inset
changes (flutter/packages#11192)
2026-04-08 engine-flutter-autoroll@skia.org Roll Flutter from
a0924c7 to 05e0ae0 (24 revisions) (flutter/packages#11470)
2026-04-08 stuartmorgan@google.com [pigeon] Make Kotlin FlutterError a
runtime error (flutter/packages#11469)
2026-04-08 stuartmorgan@google.com [path_provider] Remove dependency on
engine PathUtils (flutter/packages#11467)
2026-04-07 1063596+reidbaker@users.noreply.github.com [all] Prepare
packages for skills (flutter/packages#11430)
2026-04-07 engine-flutter-autoroll@skia.org Roll Flutter from
9cd60b5 to a0924c7 (13 revisions) (flutter/packages#11463)
2026-04-07 elitree@gmail.com [google_maps_flutter] Android cluster pin
info window onTap callback not firing (flutter/packages#11390)
2026-04-07 stuartmorgan@google.com [flutter_svg] Remove generated CMake
files (flutter/packages#11459)
2026-04-07 stuartmorgan@google.com [various] Convert remaining Groovy
files to Kotlin (flutter/packages#11443)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
mbcorona pushed a commit to mbcorona/flutter that referenced this pull request Apr 15, 2026
…r#184829)

flutter/packages@0e0a032...1aa892c

2026-04-09 10687576+bparrishMines@users.noreply.github.com
[webview_flutter_android] Adds support to opt out of Android inset
changes (flutter/packages#11192)
2026-04-08 engine-flutter-autoroll@skia.org Roll Flutter from
a0924c7 to 05e0ae0 (24 revisions) (flutter/packages#11470)
2026-04-08 stuartmorgan@google.com [pigeon] Make Kotlin FlutterError a
runtime error (flutter/packages#11469)
2026-04-08 stuartmorgan@google.com [path_provider] Remove dependency on
engine PathUtils (flutter/packages#11467)
2026-04-07 1063596+reidbaker@users.noreply.github.com [all] Prepare
packages for skills (flutter/packages#11430)
2026-04-07 engine-flutter-autoroll@skia.org Roll Flutter from
9cd60b5 to a0924c7 (13 revisions) (flutter/packages#11463)
2026-04-07 elitree@gmail.com [google_maps_flutter] Android cluster pin
info window onTap callback not firing (flutter/packages#11390)
2026-04-07 stuartmorgan@google.com [flutter_svg] Remove generated CMake
files (flutter/packages#11459)
2026-04-07 stuartmorgan@google.com [various] Convert remaining Groovy
files to Kotlin (flutter/packages#11443)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: google_maps_flutter platform-android triage-android Should be looked at in Android triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[google_maps_flutter] Android clustered pin marker info window onTap not firing

3 participants