Repository navigation
Commit 77705cb
authored
[google_maps_flutter] Convert top-level classes to Swift in
This converts GoogleMapsPlugin, GoogleMapFactory, and GoogleMapController to Swift, and restructures the source code to typical migration state of having the Swift code be the primary target, depending on a new `*_objc` target that contains the unmigrated code. Because `google_maps_flutter_ios` cannot adopt Swift (see discussion in linked issue), this removes that package from the code sharing. Going forward, development will be limited to the `_sdk*` packages.
For reasons explained [here](flutter/flutter#119108 (comment)), the Pigeon API layer is still Objective-C for now, which does lead to some temporary non-ideal code in GoogleMapController. That will be cleaned up in the last step when we are able to switch to Swift Pigeon generation.
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.
The last step was more extensive than usual because the init method had longstanding design issues (flutter/flutter#104121) that became hard errors under Swift. There was some refactoring of helper methods and reordering of initialization steps to make the code work with the strict two-phase init process.
Part of flutter/flutter#119108
Fixes flutter/flutter#104121
## 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._sdk* packages (flutter#12307)1 parent 33512cb commit 77705cb
163 files changed
Lines changed: 3368 additions & 4073 deletions
File tree
- packages/google_maps_flutter
- google_maps_flutter_ios_sdk10
- example/ios/RunnerTests
- ios
- google_maps_flutter_ios_sdk10
- Sources
- google_maps_flutter_ios_sdk10_objc
- Resources
- include/google_maps_flutter_ios_sdk10_objc
- google_maps_flutter_ios_sdk10
- include/google_maps_flutter_ios_sdk10
- tool
- google_maps_flutter_ios_sdk9
- example/ios/RunnerTests
- ios
- google_maps_flutter_ios_sdk9
- Sources
- google_maps_flutter_ios_sdk9_objc
- include/google_maps_flutter_ios_sdk9_objc
- google_maps_flutter_ios_sdk9
- include/google_maps_flutter_ios_sdk9
- tool
- google_maps_flutter_ios
- tool
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
1 | 7 | | |
2 | 8 | | |
3 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments