Skip to content

[google_maps_flutter_web] Issue 64073 implement my location - #12186

Merged
auto-submit[bot] merged 30 commits into
flutter:mainfrom
Zubii12:issue-64073-implement-my-location
Oct 21, 2026
Merged

auto-submit[bot] merged 30 commits into
flutter:mainfrom
Zubii12:issue-64073-implement-my-location

Conversation

@Zubii12

@Zubii12 Zubii12 commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Implement my location button, add blue dot location

Fixes flutter/flutter#64073

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

@Zubii12
Zubii12 force-pushed the issue-64073-implement-my-location branch 2 times, most recently from 01d001a to 771d770 Compare July 14, 2026 21:10
@Zubii12
Zubii12 marked this pull request as ready for review July 24, 2026 14:57

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

Copy link
Copy Markdown
Contributor

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 the 'My Location' button and current location tracking in the Google Maps Web plugin by introducing MyLocationController, MyLocationButton, and a mockable GeolocationApi. The review feedback highlights several critical issues, including potential resource and memory leaks from uncleared geolocation watches and map event listeners, runtime crashes in non-secure contexts due to unchecked geolocation support, and unsafe force-unwrapping of _markersController. Additionally, the feedback suggests using relative asset paths instead of web.window.location.href, triggering the location button's loading animation, preventing duplicate CSS injections, adding accessibility attributes, and improving double literal readability.

@Zubii12
Zubii12 marked this pull request as draft July 24, 2026 15:02
@Zubii12
Zubii12 force-pushed the issue-64073-implement-my-location branch from 771d770 to 17725bd Compare July 24, 2026 20:25
@Zubii12
Zubii12 marked this pull request as ready for review July 28, 2026 10:09

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

Copy link
Copy Markdown
Contributor

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 the 'My Location' button and current location tracking (blue dot) on the web platform for google_maps_flutter. The feedback highlights several critical runtime issues and improvements: instantiating HTML elements directly via constructors throws a TypeError on the web and should be replaced with web.document.createElement; navigator.geolocation requires null-safety checks for insecure contexts; the location button animation should handle null locations gracefully; removing the button control should target its specific index rather than using pop(); and the bang operator on _markersController should be avoided to prevent potential null pointer exceptions.

@stuartmorgan-g stuartmorgan-g added the triage-web Should be looked at in web triage label Jul 28, 2026
@stuartmorgan-g
stuartmorgan-g requested a review from mdebbar July 28, 2026 18:52
@Piinks

Piinks commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

@mdebbar can you take a look at this PR?

@Zubii12
Zubii12 force-pushed the issue-64073-implement-my-location branch from 49913ef to d1563cc Compare September 29, 2026 11:28
@Zubii12

Zubii12 commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

@mdebbar just made the changes you requested

@Zubii12
Zubii12 requested a review from mdebbar September 29, 2026 14:32
@Zubii12
Zubii12 requested a review from mdebbar October 3, 2026 11:41
@Zubii12
Zubii12 force-pushed the issue-64073-implement-my-location branch from a9ce05e to 26803ef Compare October 3, 2026 11:42
@mdebbar mdebbar added the CICD Run CI/CD label Oct 5, 2026
@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Oct 6, 2026
@Zubii12
Zubii12 force-pushed the issue-64073-implement-my-location branch from 91d7956 to 3a35a39 Compare October 6, 2026 17:55
@Zubii12
Zubii12 requested a review from mdebbar October 6, 2026 17:56
@Zubii12

Zubii12 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

@mdebbar just made the changes you requested

Also added 2 fixes for CI/CD:

@mdebbar mdebbar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for the contribution!

@mdebbar mdebbar added the CICD Run CI/CD label Oct 7, 2026
@mdebbar
mdebbar requested a review from bparrishMines October 7, 2026 16:26

@bparrishMines bparrishMines left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@Zubii12
Zubii12 force-pushed the issue-64073-implement-my-location branch from 3a35a39 to 0fd5804 Compare October 21, 2026 17:14
@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Oct 21, 2026
@Zubii12

Zubii12 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

@mdebbar just fixed the conflicts

@mdebbar mdebbar added autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD labels Oct 21, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 21, 2026
@auto-submit

auto-submit Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/packages/12186, because - The status or check suite Dashboard Checks has failed. Please fix the issues identified (or deflake) before re-applying this label.

@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Oct 21, 2026
@mdebbar mdebbar added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App labels Oct 21, 2026
@auto-submit
auto-submit Bot merged commit 66acaa8 into flutter:main Oct 21, 2026
14 checks passed
GhagSagar23 pushed a commit to Kryonex-Labs/flutter that referenced this pull request Oct 22, 2026
flutter/packages@1383427...93baed9

2026-10-22 [email protected] [material_ui] Port flutter/flutter
flutter#186777 MaterialColor test (flutter/packages#12858)
2026-10-21 [email protected] [rfw] Migrate to material_ui
(flutter/packages#12811)
2026-10-21 [email protected] [cupertino_ui] Fix the installing
command of the cupertino_ui package (flutter/packages#13141)
2026-10-21 [email protected]
[cupertino_ui] Unskip web tests that pass on CanvasKit and Skwasm:
date_picker_test, spell_check_suggestions_toolbar_test
(flutter/packages#13367)
2026-10-21 [email protected] [video_player] Convert player classes
to Swift (flutter/packages#13197)
2026-10-21 [email protected] [camera_windows] Fall back to a physical
stream for cameras that reject preferred-stream selectors
(flutter/packages#12748)
2026-10-21 [email protected] [google_sign_in_ios, video_player] Specify
types for pattern variable declarations (flutter/packages#13362)
2026-10-21 [email protected] [google_maps_flutter_web] Issue 64073
implement my location (flutter/packages#12186)
2026-10-21 [email protected] [material_ui]
Unskip web tests that pass on CanvasKit and Skwasm: app_bar_theme_test,
input_decorator_test, paginated_data_table_test,
spell_check_suggestions_toolbar_test (flutter/packages#13352)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] 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
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
flutter/packages@1383427...93baed9

2026-10-22 [email protected] [material_ui] Port flutter/flutter
flutter#186777 MaterialColor test (flutter/packages#12858)
2026-10-21 [email protected] [rfw] Migrate to material_ui
(flutter/packages#12811)
2026-10-21 [email protected] [cupertino_ui] Fix the installing
command of the cupertino_ui package (flutter/packages#13141)
2026-10-21 [email protected]
[cupertino_ui] Unskip web tests that pass on CanvasKit and Skwasm:
date_picker_test, spell_check_suggestions_toolbar_test
(flutter/packages#13367)
2026-10-21 [email protected] [video_player] Convert player classes
to Swift (flutter/packages#13197)
2026-10-21 [email protected] [camera_windows] Fall back to a physical
stream for cameras that reject preferred-stream selectors
(flutter/packages#12748)
2026-10-21 [email protected] [google_sign_in_ios, video_player] Specify
types for pattern variable declarations (flutter/packages#13362)
2026-10-21 [email protected] [google_maps_flutter_web] Issue 64073
implement my location (flutter/packages#12186)
2026-10-21 [email protected] [material_ui]
Unskip web tests that pass on CanvasKit and Skwasm: app_bar_theme_test,
input_decorator_test, paginated_data_table_test,
spell_check_suggestions_toolbar_test (flutter/packages#13352)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] 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-web triage-web Should be looked at in web triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[google_maps_flutter_web] Add "My Location" Widget.

5 participants