Commit 98c5dd9
[google_maps_flutter] Replace deprecated APIs (flutter#10474)
This fixes two sets of API deprecations:
- Within the package, cloudMapId was deprecated in the platform interface, and replaced with mapId. This updates everything that's not client-facing to use the mapId name instead (except for local variables in native code, where it ensure there's no potential confusion with the plugin-level map ID that tracks map instances in the plugin).
- `Color.value` is deprecated. Rather than just replace it with `toARGB()`, this adds structured data to the Pigeon interface, so that it's not relying on magic knowledge on both sides of the interface that the ints are ARGB:
- On Android, where the native SDK color representation is just a 32-bit ARGB, this adds a wrapper class to make that explicit in the Pigeon API surface.
- On iOS, where `UIColor` uses four doubles, this passes the underlying `Color` doubles directly via the wrapper class, so that it's not lossy.
- For legacy JSON representation still used for heatmaps, it just continues to use the equivalent `toARGB()`. That will change once heatmaps are converted to Pigeon.
This also annotates a couple of intentional internal uses of the deprecated `legacy` renderer type so that it won't show up in future repository deprecation audits.
Also pays down some tech debt by renaming the now-very-poorly-named FLTGoogleMapJSONConversions.* file to FGMConversionUtils, since it is now mostly Pigeon type conversions. It also renames the legacy FLTGoogleMapJSONConversions bag-of-class-methods class to reflect that it is now only used for heatmaps, the last type that still uses JSON serialization in the Pigeon interface
(flutter/flutter#117907).
Part of flutter/flutter#159739
## 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.1 parent 62841e3 commit 98c5dd9
File tree
53 files changed
+742
-418
lines changed- packages/google_maps_flutter
- google_maps_flutter_android
- android/src
- main/java/io/flutter/plugins/googlemaps
- test/java/io/flutter/plugins/googlemaps
- example
- integration_test
- lib
- lib/src
- pigeons
- test
- google_maps_flutter_ios
- example
- ios14
- integration_test
- ios
- Flutter
- Runner.xcodeproj
- RunnerTests
- ios15
- ios/Classes
- lib/src
- pigeons
- test
- google_maps_flutter
- example/lib
- lib/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
53 files changed
+742
-418
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
726 | | - | |
| 726 | + | |
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
630 | | - | |
631 | | - | |
| 630 | + | |
| 631 | + | |
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
| |||
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
657 | | - | |
| 657 | + | |
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
| |||
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
672 | | - | |
673 | | - | |
| 672 | + | |
| 673 | + | |
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
0 commit comments