Repository navigation
[google_maps_flutter] Convert marker controllers to Swift - #12662
Conversation
There was a problem hiding this comment.
Code Review
This pull request converts the marker and cluster manager controllers from Objective-C to Swift across the google_maps_flutter_ios_sdk10, google_maps_flutter_ios_sdk9, and shared iOS codebases. The feedback recommends aligning the opening braces of function declarations to the same line in ConversionUtils.swift to adhere to Swift style guidelines. Additionally, it suggests simplifying the extraction of marker identifiers in pigeonCluster by replacing the filter and force-cast chain with a single, safer compactMap operation.
| if let clusterManagerIdentifier = clusterManagerIdentifier { | ||
| let clusterManager = clusterManagersController?.clusterManager( | ||
| withIdentifier: clusterManagerIdentifier) | ||
| clusterManager?.add(marker) |
There was a problem hiding this comment.
Does the marker not need to conform to GMUClusterItem?
There was a problem hiding this comment.
It's the reverse; it can't not conform to GMUClusterItem. The maps utils library that defines the GMU* types includes:
@interface GMSMarker (GMSMarker_GMUClusteritem) <GMUClusterItem>
@endSo the check that the Obj-C code had wasn't doing anything unless the type was somehow wrong, and with the stronger type checking of Swift that pointless check became a warning.
…r#192119) flutter/packages@d642322...7a7912f 2026-09-01 [email protected] [material_ui] Migrate AppBar M3 template to use new gen_defaults script (flutter/packages#12707) 2026-09-01 [email protected] [vector_graphics] Fix deprecation lints (flutter/packages#12702) 2026-08-31 [email protected] [material_ui] Standardize M3 and M3E token template base class names (flutter/packages#12675) 2026-08-31 [email protected] [vector_graphics_compiler] Fix deprecation issues in tests (flutter/packages#12700) 2026-08-31 [email protected] [google_maps_flutter] Convert marker controllers to Swift (flutter/packages#12662) 2026-08-31 [email protected] [material_ui, cupertino_ui, go_router] Command to test dart fixes (flutter/packages#12390) 2026-08-31 [email protected] Roll Flutter from c978386 to c8c5e3b (4 revisions) (flutter/packages#12706) 2026-08-31 [email protected] [tool] Exempt AGENTS.md from version and changelog checks (flutter/packages#12681) 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 [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
) This converts MarkerController and ClusterManagersController to Swift in the `_sdk*` packages. The remaining Obj-C code will be migrated in a series of follow-up PRs to keep the scope of each PR reasonable for review. The conversion process was: - Initial conversion via Gemini, with explicit instruction to keep the structure the same. - Side-by-side manual review of the old and new versions of the files. - Manual fixes and improvements. Part of flutter/flutter#119108 ## Pre-Review Checklist [^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.
) This converts MarkerController and ClusterManagersController to Swift in the `_sdk*` packages. The remaining Obj-C code will be migrated in a series of follow-up PRs to keep the scope of each PR reasonable for review. The conversion process was: - Initial conversion via Gemini, with explicit instruction to keep the structure the same. - Side-by-side manual review of the old and new versions of the files. - Manual fixes and improvements. Part of flutter/flutter#119108 ## Pre-Review Checklist [^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.
This converts MarkerController and ClusterManagersController to Swift in the
_sdk*packages.The remaining Obj-C code will be migrated in a series of follow-up PRs to keep the scope of each PR reasonable for review.
The conversion process was:
Part of flutter/flutter#119108
Pre-Review Checklist
[shared_preferences]///).Footnotes
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