You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[google_map_flutter] Add style to widget - platform impls (#6205)
Platform implementations portion of #6192
Adds handling of `MapConfiguration.style` and implements new `getStyleError` method.
Part of flutter/flutter#66207
Copy file name to clipboardExpand all lines: packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java
Copy file name to clipboardExpand all lines: packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapBuilder.java
Copy file name to clipboardExpand all lines: packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java
+35-13
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,7 @@
48
48
importjava.util.HashMap;
49
49
importjava.util.List;
50
50
importjava.util.Map;
51
+
importjava.util.Objects;
51
52
52
53
/** Controller of a single GoogleMaps MapView instance. */
53
54
finalclassGoogleMapController
@@ -87,6 +88,9 @@ final class GoogleMapController
87
88
privateList<Object> initialPolylines;
88
89
privateList<Object> initialCircles;
89
90
privateList<Map<String, ?>> initialTileOverlays;
91
+
// Null except between initialization and onMapReady.
92
+
private@NullableStringinitialMapStyle;
93
+
private@NullableStringlastStyleError;
90
94
@VisibleForTestingList<Float> initialPadding;
91
95
92
96
GoogleMapController(
@@ -169,6 +173,10 @@ public void onMapReady(GoogleMap googleMap) {
169
173
initialPadding.get(2),
170
174
initialPadding.get(3));
171
175
}
176
+
if (initialMapStyle != null) {
177
+
updateMapStyle(initialMapStyle);
178
+
initialMapStyle = null;
179
+
}
172
180
}
173
181
174
182
// Returns the first TextureView found in the view hierarchy.
@@ -459,26 +467,22 @@ public void onSnapshotReady(Bitmap bitmap) {
Copy file name to clipboardExpand all lines: packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapOptionsSink.java
0 commit comments