Skip to content

[google_maps_flutter] Add a new zIndexInt param to marker and deprecate zIndex #8012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
98a270a
Add zIndexInt param and use it conditionally in android and ios
Hari-07 Apr 28, 2025
c6fc547
Update test to include zIndexInt
Hari-07 Apr 28, 2025
6e1e926
Changelog and pubspec changes
Hari-07 Apr 28, 2025
2fb938d
Make testing dependency override changes
Hari-07 Apr 28, 2025
81a6243
Update android test related to encoding
Hari-07 Apr 28, 2025
fb6c050
Fix android test failures
Hari-07 Apr 28, 2025
42a3b7a
Redo the version changes
Hari-07 Apr 28, 2025
7e51cbd
Update deprecation explainer copy
Hari-07 Apr 28, 2025
b824ef8
Test for prio
Hari-07 Apr 28, 2025
4a20526
Comment about prio
Hari-07 Apr 28, 2025
7dc5725
Use zIndexInt on web
Hari-07 Apr 28, 2025
7caafe5
Comment improv
Hari-07 Apr 28, 2025
d86fec6
Test for web
Hari-07 Apr 28, 2025
bb6fb9f
Fix android test
Hari-07 Apr 28, 2025
7ade231
Deprecating wording
Hari-07 Apr 28, 2025
24b70b2
Make zIndex a single field
Hari-07 Apr 28, 2025
8215c68
Rebase fixes
Hari-07 Apr 28, 2025
ac9afcc
Revert missing code from merge
Hari-07 Apr 30, 2025
9a96ca1
Fix marker test
Hari-07 May 7, 2025
664dcdb
Fix pubspec and changelog
Hari-07 May 29, 2025
a2877a9
Fix field name in google map marker controller ios
Hari-07 May 29, 2025
831c891
Fix CI failure
Hari-07 May 29, 2025
a37010c
Merge branch 'main' of github.com:flutter/packages into maps-zindex-i…
Hari-07 May 29, 2025
377eb6e
Bump pubspec
Hari-07 May 29, 2025
784e4e0
Merge branch 'main' of github.com:flutter/packages into maps-zindex-i…
Hari-07 Jun 9, 2025
6a540f0
Update the web test to avoid changing method signature
Hari-07 Jun 9, 2025
bd5db16
Remove interface dependency overrides
Hari-07 Jun 9, 2025
9fd95dc
Merge branch 'main' of github.com:flutter/packages into maps-zindex-i…
Hari-07 Jun 16, 2025
184c2ef
Remove remaining dep overrides
Hari-07 Jun 16, 2025
ea96882
Avoid reverting the changes
Hari-07 Jun 16, 2025
d313edc
Use the correct android version
Hari-07 Jun 16, 2025
a9aa804
Correct changelog error from upstream merge
Hari-07 Jun 16, 2025
8ffeda1
Don't pass both zIndexes in copy with test
Hari-07 Jun 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.12.3

* Updates the example app to use the zIndexInt param instead of the deprecated zIndex.

## 2.12.2

* Fixes memory leak by disposing stream subscriptions in `GoogleMapController`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ Marker _copyMarkerWithClusterManagerId(
position: marker.position,
rotation: marker.rotation,
visible: marker.visible,
zIndex: marker.zIndex,
zIndexInt: marker.zIndexInt,
onTap: marker.onTap,
onDragStart: marker.onDragStart,
onDrag: marker.onDrag,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,10 @@ class PlaceMarkerBodyState extends State<PlaceMarkerBody> {

Future<void> _changeZIndex(MarkerId markerId) async {
final Marker marker = markers[markerId]!;
final double current = marker.zIndex;
final int current = marker.zIndexInt;
setState(() {
markers[markerId] = marker.copyWith(
zIndexParam: current == 12.0 ? 0.0 : current + 1.0,
zIndexIntParam: current == 12 ? 0 : current + 1,
);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ dependencies:
# The example app is bundled with the plugin so we use a path dependency on
# the parent directory to use the current plugin's version.
path: ../
google_maps_flutter_android: ^2.16.0
google_maps_flutter_platform_interface: ^2.11.0
google_maps_flutter_android: ^2.16.1
google_maps_flutter_platform_interface: ^2.12.1

dev_dependencies:
build_runner: ^2.1.10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_maps_flutter
description: A Flutter plugin for integrating Google Maps in iOS and Android applications.
repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
version: 2.12.2
version: 2.12.3

environment:
sdk: ^3.6.0
Expand All @@ -21,9 +21,9 @@ flutter:
dependencies:
flutter:
sdk: flutter
google_maps_flutter_android: ^2.16.0
google_maps_flutter_ios: ^2.15.0
google_maps_flutter_platform_interface: ^2.11.0
google_maps_flutter_android: ^2.16.1
google_maps_flutter_ios: ^2.15.4
google_maps_flutter_platform_interface: ^2.12.1
google_maps_flutter_web: ^0.5.12

dev_dependencies:
Expand Down