From 43e7f4b51e2196b6b189685d34cdc90fc4aa1727 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 24 Sep 2024 10:46:45 +0300 Subject: [PATCH 001/130] Use local package version for development --- .../google_maps_flutter/example/pubspec.yaml | 5 +++++ .../google_maps_flutter/pubspec.yaml | 5 +++++ .../google_maps_flutter_android/example/pubspec.yaml | 5 +++++ .../google_maps_flutter_android/pubspec.yaml | 5 +++++ .../google_maps_flutter_ios/example/ios14/pubspec.yaml | 5 +++++ .../google_maps_flutter_ios/example/ios15/pubspec.yaml | 5 +++++ .../example/shared/maps_example_dart/pubspec.yaml | 5 +++++ .../google_maps_flutter_ios/pubspec.yaml | 5 +++++ .../google_maps_flutter_web/example/pubspec.yaml | 10 +++++++++- .../google_maps_flutter_web/pubspec.yaml | 5 +++++ 10 files changed, 54 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml index b686cbf766c..9375a0601ce 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml @@ -33,3 +33,8 @@ flutter: uses-material-design: true assets: - assets/ + +# FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE. +# See https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changing-federated-plugins +dependency_overrides: + {google_maps_flutter: {path: ../../../google_maps_flutter/google_maps_flutter}, google_maps_flutter_android: {path: ../../../google_maps_flutter/google_maps_flutter_android}, google_maps_flutter_ios: {path: ../../../google_maps_flutter/google_maps_flutter_ios}, google_maps_flutter_platform_interface: {path: ../../../google_maps_flutter/google_maps_flutter_platform_interface}, google_maps_flutter_web: {path: ../../../google_maps_flutter/google_maps_flutter_web}} diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index 9a23a1d5253..64f88db14df 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -41,3 +41,8 @@ topics: # The example deliberately includes limited-use secrets. false_secrets: - /example/web/index.html + +# FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE. +# See https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changing-federated-plugins +dependency_overrides: + {google_maps_flutter_android: {path: ../../google_maps_flutter/google_maps_flutter_android}, google_maps_flutter_ios: {path: ../../google_maps_flutter/google_maps_flutter_ios}, google_maps_flutter_platform_interface: {path: ../../google_maps_flutter/google_maps_flutter_platform_interface}, google_maps_flutter_web: {path: ../../google_maps_flutter/google_maps_flutter_web}} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml index 4acca270819..33410fc8ee0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml @@ -33,3 +33,8 @@ flutter: uses-material-design: true assets: - assets/ + +# FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE. +# See https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changing-federated-plugins +dependency_overrides: + {google_maps_flutter_android: {path: ../../../google_maps_flutter/google_maps_flutter_android}, google_maps_flutter_platform_interface: {path: ../../../google_maps_flutter/google_maps_flutter_platform_interface}} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml index ad3b86b3ad2..62e6a5e0bf8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml @@ -37,3 +37,8 @@ topics: - google-maps - google-maps-flutter - map + +# FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE. +# See https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changing-federated-plugins +dependency_overrides: + {google_maps_flutter_platform_interface: {path: ../../google_maps_flutter/google_maps_flutter_platform_interface}} diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/pubspec.yaml index 947a78b4241..f01612af2e3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/pubspec.yaml @@ -32,3 +32,8 @@ flutter: uses-material-design: true assets: - assets/ + +# FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE. +# See https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changing-federated-plugins +dependency_overrides: + {google_maps_flutter_ios: {path: ../../../../google_maps_flutter/google_maps_flutter_ios}, google_maps_flutter_platform_interface: {path: ../../../../google_maps_flutter/google_maps_flutter_platform_interface}} diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/pubspec.yaml index 947a78b4241..f01612af2e3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/pubspec.yaml @@ -32,3 +32,8 @@ flutter: uses-material-design: true assets: - assets/ + +# FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE. +# See https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changing-federated-plugins +dependency_overrides: + {google_maps_flutter_ios: {path: ../../../../google_maps_flutter/google_maps_flutter_ios}, google_maps_flutter_platform_interface: {path: ../../../../google_maps_flutter/google_maps_flutter_platform_interface}} diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/pubspec.yaml index 071506ac425..3df8fdd770e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/pubspec.yaml @@ -27,3 +27,8 @@ dev_dependencies: flutter: uses-material-design: true + +# FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE. +# See https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changing-federated-plugins +dependency_overrides: + {google_maps_flutter_ios: {path: ../../../../../google_maps_flutter/google_maps_flutter_ios}, google_maps_flutter_platform_interface: {path: ../../../../../google_maps_flutter/google_maps_flutter_platform_interface}} diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml index 55c040865da..b4299379400 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml @@ -35,3 +35,8 @@ topics: - google-maps - google-maps-flutter - map + +# FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE. +# See https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changing-federated-plugins +dependency_overrides: + {google_maps_flutter_platform_interface: {path: ../../google_maps_flutter/google_maps_flutter_platform_interface}} diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml index a61f8043548..a8128b5d009 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml @@ -28,9 +28,17 @@ flutter: assets: - assets/ + +# FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE. +# See https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changing-federated-plugins dependency_overrides: + # Override the google_maps_flutter dependency on google_maps_flutter_web. # TODO(ditman): Unwind the circular dependency. This will create problems # if we need to make a breaking change to google_maps_flutter_web. + google_maps_flutter: + path: ../../../google_maps_flutter/google_maps_flutter + google_maps_flutter_platform_interface: + path: ../../../google_maps_flutter/google_maps_flutter_platform_interface google_maps_flutter_web: - path: ../ + path: ../../../google_maps_flutter/google_maps_flutter_web diff --git a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml index de53daa7817..f4ffaf5cba4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml @@ -40,3 +40,8 @@ topics: # The example deliberately includes limited-use secrets. false_secrets: - /example/web/index.html + +# FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE. +# See https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changing-federated-plugins +dependency_overrides: + {google_maps_flutter_platform_interface: {path: ../../google_maps_flutter/google_maps_flutter_platform_interface}} From 1df604c9ea6914e99f39633551aadf0f8415282e Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 24 Sep 2024 10:50:14 +0300 Subject: [PATCH 002/130] Add advanced markers classes and capability check --- .../flutter/plugins/googlemaps/Convert.java | 80 ++++++++++++++++++ .../googlemaps/GoogleMapController.java | 13 +++ .../plugins/googlemaps/MarkerBuilder.java | 12 ++- .../plugins/googlemaps/MarkerController.java | 4 + .../plugins/googlemaps/MarkerOptionsSink.java | 2 + .../plugins/googlemaps/MarkersController.java | 5 +- .../lib/src/google_maps_flutter_android.dart | 26 ++++++ .../pigeons/messages.dart | 12 +++ .../google_maps_flutter_platform.dart | 6 ++ .../lib/src/types/advanced_marker.dart | 84 +++++++++++++++++++ .../lib/src/types/bitmap.dart | 44 ++++++++++ .../lib/src/types/pin_config.dart | 49 +++++++++++ .../lib/src/types/types.dart | 2 + 13 files changed, 336 insertions(+), 3 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart create mode 100644 packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/pin_config.dart diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java index c8109ebd4f8..86d05a89736 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java @@ -20,6 +20,7 @@ import com.google.android.gms.maps.CameraUpdate; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.MapsInitializer; +import com.google.android.gms.maps.model.AdvancedMarkerOptions; import com.google.android.gms.maps.model.BitmapDescriptor; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import com.google.android.gms.maps.model.ButtCap; @@ -34,6 +35,7 @@ import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.LatLngBounds; import com.google.android.gms.maps.model.PatternItem; +import com.google.android.gms.maps.model.PinConfig; import com.google.android.gms.maps.model.RoundCap; import com.google.android.gms.maps.model.SquareCap; import com.google.android.gms.maps.model.Tile; @@ -187,6 +189,65 @@ public static BitmapDescriptor getBitmapFromBytes( } } + public static BitmapDescriptor getBitmapFromPinConfig( + Map byteData, + AssetManager assetManager, + float density, + BitmapDescriptorFactoryWrapper bitmapDescriptorFactory + ) { + try { + final String backgroundColorKey = "backgroundColor"; + final String borderColorKey = "borderColor"; + final String glyphTextKey = "glyphText"; + final String glyphTextColorKey = "glyphTextColor"; + final String glyphColorKey = "glyphColor"; + final String glyphBitmapDescriptorKey = "glyphBitmapDescriptor"; + + final Integer backgroundColor = + byteData.containsKey(backgroundColorKey) ? toInt(byteData.get(backgroundColorKey)) : null; + final Integer borderColor = + byteData.containsKey(borderColorKey) ? toInt(byteData.get(borderColorKey)) : null; + final String glyphText = + byteData.containsKey(glyphTextKey) ? toString(byteData.get(glyphTextKey)) : null; + final Integer glyphTextColor = + byteData.containsKey(glyphTextColorKey) ? toInt(byteData.get(glyphTextColorKey)) : null; + final Integer glyphColor = + byteData.containsKey(glyphColorKey) ? toInt(byteData.get(glyphColorKey)) : null; + final BitmapDescriptor glyphBitmapDescriptor = byteData.containsKey(glyphBitmapDescriptorKey) + ? toBitmapDescriptor(byteData.get(glyphBitmapDescriptorKey), assetManager, density) + : null; + + final PinConfig.Builder pinConfigBuilder = PinConfig.builder(); + if (backgroundColor != null) { + pinConfigBuilder.setBackgroundColor(backgroundColor); + } + + if (borderColor != null) { + pinConfigBuilder.setBorderColor(borderColor); + } + + PinConfig.Glyph glyph = null; + if (glyphText != null) { + glyph = glyphTextColor != null + ? new PinConfig.Glyph(glyphText, glyphTextColor) + : new PinConfig.Glyph(glyphText); + } else if (glyphBitmapDescriptor != null) { + glyph = new PinConfig.Glyph(glyphBitmapDescriptor); + } else if (glyphColor != null) { + glyph = new PinConfig.Glyph(glyphColor); + } + + if (glyph != null) { + pinConfigBuilder.setGlyph(glyph); + } + + final PinConfig pinConfig = pinConfigBuilder.build(); + return bitmapDescriptorFactory.fromPinConfig(pinConfig); + } catch (Exception e) { + throw new IllegalArgumentException("Unable to interpret pin config as a valid image.", e); + } + } + /** * Creates a BitmapDescriptor object from asset, using given details and density. * @@ -602,6 +663,7 @@ static void interpretMarkerOptions( sink.setRotation(marker.getRotation().floatValue()); sink.setVisible(marker.getVisible()); sink.setZIndex(marker.getZIndex().floatValue()); + sink.setCollisionBehavior(collisionBehaviorFromPigeon(marker.getCollisionBehavior())); } private static void interpretInfoWindowOptions( @@ -640,6 +702,19 @@ static int jointTypeFromPigeon(Messages.PlatformJointType jointType) { return JointType.DEFAULT; } + static int collisionBehaviorFromPigeon( + Messages.PlatformMarkerCollisionBehavior collisionBehavior) { + switch (collisionBehavior) { + case REQUIRED: + return AdvancedMarkerOptions.CollisionBehavior.REQUIRED; + case OPTIONAL_AND_HIDES_LOWER_PRIORITY: + return AdvancedMarkerOptions.CollisionBehavior.OPTIONAL_AND_HIDES_LOWER_PRIORITY; + case REQUIRED_AND_HIDES_OPTIONAL: + return AdvancedMarkerOptions.CollisionBehavior.REQUIRED_AND_HIDES_OPTIONAL; + } + return AdvancedMarkerOptions.CollisionBehavior.REQUIRED; + } + static String interpretPolylineOptions( Messages.PlatformPolyline polyline, PolylineOptionsSink sink, @@ -1021,6 +1096,11 @@ public BitmapDescriptor fromAsset(String assetKey) { public BitmapDescriptor fromBitmap(Bitmap bitmap) { return BitmapDescriptorFactory.fromBitmap(bitmap); } + + @VisibleForTesting + public BitmapDescriptor fromPinConfig(PinConfig pinConfig) { + return BitmapDescriptorFactory.fromPinConfig(pinConfig); + } } @VisibleForTesting diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java index 012f0689d7c..f62a73ec708 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java @@ -35,6 +35,7 @@ import com.google.android.gms.maps.model.GroundOverlay; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.LatLngBounds; +import com.google.android.gms.maps.model.MapCapabilities; import com.google.android.gms.maps.model.MapStyleOptions; import com.google.android.gms.maps.model.Marker; import com.google.android.gms.maps.model.Polygon; @@ -1026,6 +1027,18 @@ public Boolean isInfoWindowShown(@NonNull String markerId) { return lastSetStyleSucceeded; } + @Override + public @NonNull Boolean isAdvancedMarkersAvailable() { + if (googleMap == null) { + throw new FlutterError( + "GoogleMap uninitialized", "getMapCapabilities() called prior to map initialization", + null + ); + } + final MapCapabilities mapCapabilities = googleMap.getMapCapabilities(); + return mapCapabilities.isAdvancedMarkersAvailable(); + } + @Override public void clearTileCache(@NonNull String tileOverlayId) { tileOverlaysController.clearTileCache(tileOverlayId); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java index fe99cb48ada..382aa3bbae7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java @@ -4,6 +4,7 @@ package io.flutter.plugins.googlemaps; +import com.google.android.gms.maps.model.AdvancedMarkerOptions; import com.google.android.gms.maps.model.BitmapDescriptor; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.MarkerOptions; @@ -15,8 +16,8 @@ class MarkerBuilder implements MarkerOptionsSink, ClusterItem { private String markerId; private boolean consumeTapEvents; - MarkerBuilder(String markerId, String clusterManagerId) { - this.markerOptions = new MarkerOptions(); + MarkerBuilder(String markerId, String clusterManagerId, boolean isAdvanced) { + this.markerOptions = isAdvanced ? new AdvancedMarkerOptions() : new MarkerOptions(); this.markerId = markerId; this.clusterManagerId = clusterManagerId; } @@ -115,6 +116,13 @@ public void setZIndex(float zIndex) { markerOptions.zIndex(zIndex); } + @Override + public void setCollisionBehavior(int collisionBehavior) { + if (markerOptions.getClass() == AdvancedMarkerOptions.class) { + ((AdvancedMarkerOptions) markerOptions).collisionBehavior(collisionBehavior); + } + } + @Override public LatLng getPosition() { return markerOptions.getPosition(); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java index 353ec2dfadb..dd5722e2c1b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java @@ -143,6 +143,10 @@ public void setZIndex(float zIndex) { marker.setZIndex(zIndex); } + @Override + public void setCollisionBehavior(int collisionBehavior) { + } + String getGoogleMapsMarkerId() { return googleMapsMarkerId; } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerOptionsSink.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerOptionsSink.java index 88c970c1f14..9ffc27806a4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerOptionsSink.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerOptionsSink.java @@ -32,4 +32,6 @@ interface MarkerOptionsSink { void setVisible(boolean visible); void setZIndex(float zIndex); + + void setCollisionBehavior(int collisionBehavior); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java index 24326fe5305..50ffabf4770 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java @@ -5,7 +5,9 @@ package io.flutter.plugins.googlemaps; import android.content.res.AssetManager; + import androidx.annotation.NonNull; + import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.Marker; import com.google.android.gms.maps.model.MarkerOptions; @@ -174,7 +176,8 @@ public void onClusterItemRendered(MarkerBuilder markerBuilder, Marker marker) { private void addMarker(@NonNull Messages.PlatformMarker marker) { String markerId = marker.getMarkerId(); String clusterManagerId = marker.getClusterManagerId(); - MarkerBuilder markerBuilder = new MarkerBuilder(markerId, clusterManagerId); + MarkerBuilder markerBuilder = new MarkerBuilder(markerId, clusterManagerId, + marker.getIsAdvanced()); Convert.interpretMarkerOptions( marker, markerBuilder, assetManager, density, bitmapDescriptorFactoryWrapper); addMarker(markerBuilder); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index ef713e6fd0a..c79c475a0f0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -497,6 +497,11 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { : _setStyleFailureMessage; } + @override + Future isAdvancedMarkersAvailable({required int mapId}) async { + return _hostApi(mapId).isAdvancedMarkersAvailable(); + } + /// Set [GoogleMapsFlutterPlatform] to use [AndroidViewSurface] to build the /// Google Maps widget. /// @@ -795,6 +800,12 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { zIndex: marker.zIndex, markerId: marker.markerId.value, clusterManagerId: marker.clusterManagerId?.value, + isAdvanced: marker is AdvancedMarker, + collisionBehavior: marker is AdvancedMarker + ? _platformPlatformMarkerCollisionBehaviorFromMarkerCollisionBehavior( + marker.collisionBehavior, + ) + : PlatformMarkerCollisionBehavior.required, ); } @@ -1420,6 +1431,21 @@ PlatformPatternItem platformPatternItemFromPatternItem(PatternItem item) { return PlatformPatternItem(type: PlatformPatternItemType.dot); } +@visibleForTesting +PlatformMarkerCollisionBehavior + _platformPlatformMarkerCollisionBehaviorFromMarkerCollisionBehavior( + MarkerCollisionBehavior markerCollisionBehavior, +) { + switch (markerCollisionBehavior) { + case MarkerCollisionBehavior.required: + return PlatformMarkerCollisionBehavior.required; + case MarkerCollisionBehavior.optionalAndHidesLowerPriority: + return PlatformMarkerCollisionBehavior.optionalAndHidesLowerPriority; + case MarkerCollisionBehavior.requiredAndHidesOptional: + return PlatformMarkerCollisionBehavior.requiredAndHidesOptional; + } +} + /// Update specification for a set of [TileOverlay]s. // TODO(stuartmorgan): Fix the missing export of this class in the platform // interface, and remove this copy. diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart index 04989b20e00..fb55f1192d0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart @@ -184,6 +184,7 @@ class PlatformMarker { this.visible = true, this.zIndex = 0.0, this.clusterManagerId, + this.collisionBehavior = PlatformMarkerCollisionBehavior.required, }); final double alpha; @@ -200,6 +201,15 @@ class PlatformMarker { final double zIndex; final String markerId; final String? clusterManagerId; + + final bool isAdvanced; + final PlatformMarkerCollisionBehavior collisionBehavior; +} + +enum PlatformMarkerCollisionBehavior { + required, + optionalAndHidesLowerPriority, + requiredAndHidesOptional, } /// Pigeon equivalent of the Polygon class. @@ -713,6 +723,8 @@ abstract class MapsApi { /// is no way to return failures from map initialization. bool didLastStyleSucceed(); + bool isAdvancedMarkersAvailable(); + /// Clears the cache of tiles previously requseted from the tile provider. void clearTileCache(String tileOverlayId); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart index f81473aaad3..385a263869e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart @@ -430,6 +430,12 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface { return null; } + Future isAdvancedMarkersAvailable({required int mapId}) async { + throw UnimplementedError( + 'isAdvancedMarkersAvailable() has not been implemented.', + ); + } + /// Returns a widget displaying the map view. @Deprecated('Use buildViewWithConfiguration instead.') Widget buildView( diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart new file mode 100644 index 00000000000..a1fcf980b81 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart @@ -0,0 +1,84 @@ +import 'dart:ui' show Offset; +import 'package:flutter/foundation.dart'; + +import '../../google_maps_flutter_platform_interface.dart'; + +@immutable +class AdvancedMarker extends Marker { + const AdvancedMarker({ + required super.markerId, + super.alpha, + super.anchor, + super.consumeTapEvents, + super.draggable, + super.flat, + super.icon, + super.infoWindow, + super.position, + super.rotation, + super.visible, + super.zIndex, + super.clusterManagerId, + super.onTap, + super.onDrag, + super.onDragStart, + super.onDragEnd, + this.collisionBehavior = MarkerCollisionBehavior.required, + this.altitude = 0.0, + }); + + final MarkerCollisionBehavior collisionBehavior; + final double altitude; + + /// Creates a new [Marker] object whose values are the same as this instance, + /// unless overwritten by the specified parameters. + @override + AdvancedMarker copyWith({ + double? alphaParam, + Offset? anchorParam, + bool? consumeTapEventsParam, + bool? draggableParam, + bool? flatParam, + BitmapDescriptor? iconParam, + InfoWindow? infoWindowParam, + LatLng? positionParam, + double? rotationParam, + bool? visibleParam, + double? zIndexParam, + VoidCallback? onTapParam, + ValueChanged? onDragStartParam, + ValueChanged? onDragParam, + ValueChanged? onDragEndParam, + ClusterManagerId? clusterManagerIdParam, + MarkerCollisionBehavior? collisionBehaviorParam, + double? altitudeParam, + }) { + return AdvancedMarker( + markerId: markerId, + alpha: alphaParam ?? alpha, + anchor: anchorParam ?? anchor, + consumeTapEvents: consumeTapEventsParam ?? consumeTapEvents, + draggable: draggableParam ?? draggable, + flat: flatParam ?? flat, + icon: iconParam ?? icon, + infoWindow: infoWindowParam ?? infoWindow, + position: positionParam ?? position, + rotation: rotationParam ?? rotation, + visible: visibleParam ?? visible, + zIndex: zIndexParam ?? zIndex, + onTap: onTapParam ?? onTap, + onDragStart: onDragStartParam ?? onDragStart, + onDrag: onDragParam ?? onDrag, + onDragEnd: onDragEndParam ?? onDragEnd, + clusterManagerId: clusterManagerIdParam ?? clusterManagerId, + collisionBehavior: collisionBehaviorParam ?? collisionBehavior, + altitude: altitudeParam ?? altitude, + ); + } +} + +enum MarkerCollisionBehavior { + required, + optionalAndHidesLowerPriority, + requiredAndHidesOptional, +} diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart index e25d3c7a2c5..91d24be0a8c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart @@ -16,6 +16,8 @@ import 'package:flutter/material.dart' createLocalImageConfiguration; import 'package:flutter/services.dart' show AssetBundle; +import 'pin_config.dart'; + /// Type of bitmap scaling to use on BitmapDescriptor creation. enum MapBitmapScaling { /// Automatically scale image with devices pixel ratio or to given size, @@ -330,6 +332,10 @@ abstract class BitmapDescriptor { ); } + static BitmapDescriptor pinConfig(PinConfig pinConfig) { + return PinConfigBitmap(pinConfig); + } + /// Convert the object to a Json format. Object toJson(); } @@ -954,3 +960,41 @@ class BytesMapBitmap extends MapBitmap { } ]; } + +class PinConfigBitmap extends MapBitmap { + PinConfigBitmap( + this.pinConfig, { + super.bitmapScaling = MapBitmapScaling.auto, + super.width, + super.height, + double? imagePixelRatio, + }) : super._(imagePixelRatio: imagePixelRatio ?? _naturalPixelRatio); + + final PinConfig pinConfig; + + /// The type of the MapBitmap object, used for the JSON serialization. + static const String type = 'pinConfig'; + + @override + Object toJson() => [ + type, + { + 'bitmapScaling': bitmapScaling.name, + 'imagePixelRatio': imagePixelRatio, + if (width != null) 'width': width, + if (height != null) 'height': height, + if (pinConfig.backgroundColor != null) + 'backgroundColor': pinConfig.backgroundColor?.value, + if (pinConfig.borderColor != null) + 'borderColor': pinConfig.borderColor?.value, + if (pinConfig.glyph?.text != null) 'glyphText': pinConfig.glyph?.text, + if (pinConfig.glyph?.textColor != null) + 'glyphTextColor': pinConfig.glyph?.textColor?.value, + if (pinConfig.glyph?.color != null) + 'glyphColor': pinConfig.glyph?.color?.value, + if (pinConfig.glyph?.bitmapDescriptor != null) + 'glyphBitmapDescriptor': + pinConfig.glyph?.bitmapDescriptor?.toJson(), + } + ]; +} diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/pin_config.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/pin_config.dart new file mode 100644 index 00000000000..de7defcb63c --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/pin_config.dart @@ -0,0 +1,49 @@ +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart' show Color; + +import '../../google_maps_flutter_platform_interface.dart'; + +@immutable +class PinConfig { + const PinConfig({ + this.backgroundColor, + this.borderColor, + this.glyph, + }); + + final Color? backgroundColor; + final Color? borderColor; + final Glyph? glyph; +} + +@immutable +class Glyph { + factory Glyph.color(Color color) { + return Glyph._(color: color); + } + + factory Glyph.bitmap(BitmapDescriptor bitmapDescriptor) { + return Glyph._(bitmapDescriptor: bitmapDescriptor); + } + + factory Glyph.text({ + required String text, + Color? textColor, + }) { + return Glyph._( + text: text, + textColor: textColor, + ); + } + const Glyph._({ + this.text, + this.textColor, + this.bitmapDescriptor, + this.color, + }); + + final String? text; + final Color? textColor; + final BitmapDescriptor? bitmapDescriptor; + final Color? color; +} diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart index 95c27d5bf95..bce8a87efe5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart @@ -3,6 +3,7 @@ // found in the LICENSE file. // All the public types exposed by this package. +export 'advanced_marker.dart'; export 'bitmap.dart'; export 'callbacks.dart'; export 'camera.dart'; @@ -26,6 +27,7 @@ export 'maps_object_updates.dart'; export 'marker.dart'; export 'marker_updates.dart'; export 'pattern_item.dart'; +export 'pin_config.dart'; export 'polygon.dart'; export 'polygon_updates.dart'; export 'polyline.dart'; From b5a762f45c64156db208a260616dd4d66f5a913d Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 25 Sep 2024 09:59:52 +0300 Subject: [PATCH 003/130] Simplify BitmapDescriptor creation from PinConfig --- .../lib/src/types/bitmap.dart | 60 ++++++++++--------- .../src/types/{pin_config.dart => glyph.dart} | 13 ---- .../lib/src/types/types.dart | 2 +- 3 files changed, 32 insertions(+), 43 deletions(-) rename packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/{pin_config.dart => glyph.dart} (78%) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart index 91d24be0a8c..b894d4fd7e0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart @@ -4,6 +4,7 @@ import 'dart:async' show Future; import 'dart:typed_data' show Uint8List; +import 'dart:ui'; import 'package:flutter/foundation.dart' show kIsWeb, visibleForTesting; import 'package:flutter/material.dart' @@ -16,7 +17,7 @@ import 'package:flutter/material.dart' createLocalImageConfiguration; import 'package:flutter/services.dart' show AssetBundle; -import 'pin_config.dart'; +import 'glyph.dart'; /// Type of bitmap scaling to use on BitmapDescriptor creation. enum MapBitmapScaling { @@ -332,8 +333,16 @@ abstract class BitmapDescriptor { ); } - static BitmapDescriptor pinConfig(PinConfig pinConfig) { - return PinConfigBitmap(pinConfig); + static BitmapDescriptor pinConfig({ + Color? backgroundColor, + Color? borderColor, + Glyph? glyph, + }) { + return PinConfig( + backgroundColor: backgroundColor, + borderColor: borderColor, + glyph: glyph, + ); } /// Convert the object to a Json format. @@ -961,40 +970,33 @@ class BytesMapBitmap extends MapBitmap { ]; } -class PinConfigBitmap extends MapBitmap { - PinConfigBitmap( - this.pinConfig, { - super.bitmapScaling = MapBitmapScaling.auto, - super.width, - super.height, - double? imagePixelRatio, - }) : super._(imagePixelRatio: imagePixelRatio ?? _naturalPixelRatio); - - final PinConfig pinConfig; +class PinConfig extends BitmapDescriptor { + PinConfig({ + this.backgroundColor, + this.borderColor, + this.glyph, + }) : super._(const []); /// The type of the MapBitmap object, used for the JSON serialization. static const String type = 'pinConfig'; + final Color? backgroundColor; + final Color? borderColor; + final Glyph? glyph; + @override Object toJson() => [ type, { - 'bitmapScaling': bitmapScaling.name, - 'imagePixelRatio': imagePixelRatio, - if (width != null) 'width': width, - if (height != null) 'height': height, - if (pinConfig.backgroundColor != null) - 'backgroundColor': pinConfig.backgroundColor?.value, - if (pinConfig.borderColor != null) - 'borderColor': pinConfig.borderColor?.value, - if (pinConfig.glyph?.text != null) 'glyphText': pinConfig.glyph?.text, - if (pinConfig.glyph?.textColor != null) - 'glyphTextColor': pinConfig.glyph?.textColor?.value, - if (pinConfig.glyph?.color != null) - 'glyphColor': pinConfig.glyph?.color?.value, - if (pinConfig.glyph?.bitmapDescriptor != null) - 'glyphBitmapDescriptor': - pinConfig.glyph?.bitmapDescriptor?.toJson(), + if (backgroundColor != null) + 'backgroundColor': backgroundColor?.value, + if (borderColor != null) 'borderColor': borderColor?.value, + if (glyph?.text != null) 'glyphText': glyph?.text, + if (glyph?.textColor != null) + 'glyphTextColor': glyph?.textColor?.value, + if (glyph?.color != null) 'glyphColor': glyph?.color?.value, + if (glyph?.bitmapDescriptor != null) + 'glyphBitmapDescriptor': glyph?.bitmapDescriptor?.toJson(), } ]; } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/pin_config.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart similarity index 78% rename from packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/pin_config.dart rename to packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart index de7defcb63c..36486780925 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/pin_config.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart @@ -3,19 +3,6 @@ import 'package:flutter/material.dart' show Color; import '../../google_maps_flutter_platform_interface.dart'; -@immutable -class PinConfig { - const PinConfig({ - this.backgroundColor, - this.borderColor, - this.glyph, - }); - - final Color? backgroundColor; - final Color? borderColor; - final Glyph? glyph; -} - @immutable class Glyph { factory Glyph.color(Color color) { diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart index bce8a87efe5..bc5570c164c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart @@ -27,7 +27,7 @@ export 'maps_object_updates.dart'; export 'marker.dart'; export 'marker_updates.dart'; export 'pattern_item.dart'; -export 'pin_config.dart'; +export 'glyph.dart'; export 'polygon.dart'; export 'polygon_updates.dart'; export 'polyline.dart'; From f6aaeed9816076e86d6bee2a6b8f446c5513a9f4 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 25 Sep 2024 12:34:59 +0300 Subject: [PATCH 004/130] Add advanced markers clustering --- .../android/build.gradle | 2 +- .../googlemaps/ClusterManagersController.java | 71 +++++++++++++++++-- .../plugins/googlemaps/MarkerBuilder.java | 2 + 3 files changed, 67 insertions(+), 8 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/build.gradle b/packages/google_maps_flutter/google_maps_flutter_android/android/build.gradle index c86b55971b4..ad0e5ecb470 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/build.gradle +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/build.gradle @@ -38,7 +38,7 @@ android { dependencies { implementation "androidx.annotation:annotation:1.9.1" implementation 'com.google.android.gms:play-services-maps:18.2.0' - implementation 'com.google.maps.android:android-maps-utils:3.6.0' + implementation 'com.google.maps.android:android-maps-utils:3.7.0' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test:rules:1.4.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java index cd81eba7940..f73c209c3e9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java @@ -8,11 +8,14 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.google.android.gms.maps.GoogleMap; +import com.google.android.gms.maps.model.AdvancedMarkerOptions; import com.google.android.gms.maps.model.Marker; import com.google.android.gms.maps.model.MarkerOptions; import com.google.maps.android.clustering.Cluster; import com.google.maps.android.clustering.ClusterItem; import com.google.maps.android.clustering.ClusterManager; +import com.google.maps.android.clustering.view.ClusterRenderer; +import com.google.maps.android.clustering.view.DefaultAdvancedMarkersClusterRenderer; import com.google.maps.android.clustering.view.DefaultClusterRenderer; import com.google.maps.android.collections.MarkerManager; import io.flutter.plugins.googlemaps.Messages.MapsCallbackApi; @@ -89,11 +92,34 @@ void addClusterManagers(@NonNull List clusterMa void addClusterManager(String clusterManagerId) { ClusterManager clusterManager = new ClusterManager(context, googleMap, markerManager); - ClusterRenderer clusterRenderer = - new ClusterRenderer(context, googleMap, clusterManager, this); + clusterManagerIdToManager.put(clusterManagerId, clusterManager); + } + + /** + * Initialize cluster renderer if it hasn't been initialized before. + * ClusterManager uses default renderer which should be changed to (legacy) renderer or + * advanced renderer + **/ + void initializeRenderer(String clusterManagerId, boolean isAdvanced) { + final ClusterManager clusterManager = clusterManagerIdToManager.get( + clusterManagerId); + if (clusterManager == null) { + return; + } + + final ClusterRenderer renderer = clusterManager.getRenderer(); + if (renderer.getClass() == MarkerClusterRenderer.class + || renderer.getClass() == AdvancedMarkerClusterRenderer.class) { + // Renderer has already been initialized + return; + } + + final ClusterRenderer clusterRenderer = + isAdvanced + ? new AdvancedMarkerClusterRenderer<>(context, googleMap, clusterManager, this) + : new MarkerClusterRenderer<>(context, googleMap, clusterManager, this); clusterManager.setRenderer(clusterRenderer); initListenersForClusterManager(clusterManager, this, clusterItemClickListener); - clusterManagerIdToManager.put(clusterManagerId, clusterManager); } /** Removes ClusterManagers by given cluster manager IDs from the controller. */ @@ -122,6 +148,8 @@ private void removeClusterManager(Object clusterManagerId) { /** Adds item to the ClusterManager it belongs to. */ public void addItem(MarkerBuilder item) { + initializeRenderer(item.clusterManagerId(), item.isAdvanced); + ClusterManager clusterManager = clusterManagerIdToManager.get(item.clusterManagerId()); if (clusterManager != null) { @@ -195,13 +223,13 @@ public boolean onClusterClick(Cluster cluster) { } /** - * ClusterRenderer builds marker options for new markers to be rendered to the map. After cluster - * item (marker) is rendered, it is sent to the listeners for control. + * MarkerClusterRenderer builds marker options for new markers to be rendered to the map. After + * cluster item (marker) is rendered, it is sent to the listeners for control. */ - private static class ClusterRenderer extends DefaultClusterRenderer { + private static class MarkerClusterRenderer extends DefaultClusterRenderer { private final ClusterManagersController clusterManagersController; - public ClusterRenderer( + public MarkerClusterRenderer( Context context, GoogleMap map, ClusterManager clusterManager, @@ -225,6 +253,35 @@ protected void onClusterItemRendered(@NonNull T item, @NonNull Marker marker) { } } + /** AdvancedMarkerClusterRenderer is a ClusterRenderer that supports AdvancedMarkers */ + private static class AdvancedMarkerClusterRenderer extends + DefaultAdvancedMarkersClusterRenderer { + + private final ClusterManagersController clusterManagersController; + + public AdvancedMarkerClusterRenderer( + Context context, + GoogleMap map, + ClusterManager clusterManager, + ClusterManagersController clusterManagersController + ) { + super(context, map, clusterManager); + this.clusterManagersController = clusterManagersController; + } + + @Override + protected void onBeforeClusterItemRendered( + @NonNull T item, @NonNull AdvancedMarkerOptions markerOptions) { + item.update(markerOptions); + } + + @Override + protected void onClusterItemRendered(@NonNull T item, @NonNull Marker marker) { + super.onClusterItemRendered(item, marker); + clusterManagersController.onClusterItemRendered(item, marker); + } + } + /** Interface for handling situations where clusterManager adds new visible marker to the map. */ public interface OnClusterItemRendered { void onClusterItemRendered(@NonNull T item, @NonNull Marker marker); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java index 382aa3bbae7..2ab3beda539 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java @@ -15,11 +15,13 @@ class MarkerBuilder implements MarkerOptionsSink, ClusterItem { private String clusterManagerId; private String markerId; private boolean consumeTapEvents; + final boolean isAdvanced; MarkerBuilder(String markerId, String clusterManagerId, boolean isAdvanced) { this.markerOptions = isAdvanced ? new AdvancedMarkerOptions() : new MarkerOptions(); this.markerId = markerId; this.clusterManagerId = clusterManagerId; + this.isAdvanced = isAdvanced; } MarkerOptions build() { From d21efda8dd4f8790e6988169ae62acaeec14a214 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:31:34 +0300 Subject: [PATCH 005/130] Add AdvancedMarkers example --- .../example/lib/advanced_markers.dart | 193 ++++++++++++++++++ .../example/lib/main.dart | 2 + .../example/lib/map_map_id.dart | 4 +- .../lib/src/types/types.dart | 2 +- 4 files changed, 198 insertions(+), 3 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers.dart diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers.dart new file mode 100644 index 00000000000..4433f16e26f --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers.dart @@ -0,0 +1,193 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +import 'example_google_map.dart'; +import 'page.dart'; + +/// Map Id is required to use advanced markers +const String? _cloudMapId = null; + +/// Page demonstrating advanced markers styling and behavior +class AdvancedMarkersPage extends GoogleMapExampleAppPage { + /// Default constructor + const AdvancedMarkersPage({Key? key}) + : super(const Icon(Icons.place_outlined), 'Advanced Markers', key: key); + + @override + Widget build(BuildContext context) { + return const _AdvancedMarkersBody(); + } +} + +class _AdvancedMarkersBody extends StatefulWidget { + const _AdvancedMarkersBody(); + + @override + State<_AdvancedMarkersBody> createState() => _AdvancedMarkersBodyState(); +} + +class _AdvancedMarkersBodyState extends State<_AdvancedMarkersBody> { + static const LatLng marker1Location = LatLng(-33.86711, 151.1947171); + static const LatLng marker2Location = LatLng(-32.9283, 151.7817); + static const LatLng marker3Location = LatLng(-34.4248, 150.8931); + static const LatLng marker4Location = LatLng(-32.9289, 150.3610); + + static const LatLng initialMapLocation = LatLng(-33.852, 151.211); + static const double initialZoomLevel = 7.0; + static const double collisionZoomLevel = 4.0; + + /// Whether map supports advanced markers. Null indicates capability check + /// is in progress + bool? _isAdvancedMarkersAvailable; + + ExampleGoogleMapController? controller; + final Map markers = {}; + + @override + Widget build(BuildContext context) { + // Check if map is capable of showing advanced markers + if (controller != null) { + GoogleMapsFlutterPlatform.instance + .isAdvancedMarkersAvailable(mapId: controller!.mapId) + .then((bool result) { + setState(() { + _isAdvancedMarkersAvailable = result; + }); + }); + } + + return Padding( + padding: const EdgeInsets.all(16), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Padding( + padding: const EdgeInsets.all(16), + child: Text( + switch (_isAdvancedMarkersAvailable) { + null => 'Checking map capabilities…', + true => + 'Map capabilities check result:\nthis map supports advanced markers', + false => + "Map capabilities check result:\nthis map don't support advanced markers. Please check that map Id is provided and correct map renderer is used", + }, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.bodyLarge?.copyWith( + color: _isAdvancedMarkersAvailable == false + ? Colors.red + : null, + ), + ), + ), + Expanded( + child: ExampleGoogleMap( + // ignore: avoid_redundant_argument_values + cloudMapId: _cloudMapId, + initialCameraPosition: const CameraPosition( + target: initialMapLocation, + zoom: initialZoomLevel, + ), + onMapCreated: _onMapCreated, + markers: markers.values.toSet(), + ), + ), + TextButton( + onPressed: markers.isEmpty ? _addMarkers : null, + child: const Text('Add markers'), + ), + TextButton( + onPressed: markers.isEmpty ? null : _zoomOut, + child: const Text('Zoom out (show required markers)'), + ), + TextButton( + onPressed: markers.isEmpty ? null : _zoomIn, + child: const Text('Zoom in (show all markers)'), + ), + ], + ), + ); + } + + void _onMapCreated(ExampleGoogleMapController controller) { + setState(() { + this.controller = controller; + }); + } + + void _zoomOut() { + controller?.animateCamera( + CameraUpdate.newLatLngZoom( + initialMapLocation, + collisionZoomLevel, + ), + ); + } + + void _zoomIn() { + controller?.animateCamera( + CameraUpdate.newLatLngZoom( + initialMapLocation, + initialZoomLevel, + ), + ); + } + + Future _addMarkers() async { + final AdvancedMarker defaultMarker = AdvancedMarker( + markerId: const MarkerId('default'), + position: marker1Location, + collisionBehavior: MarkerCollisionBehavior.optionalAndHidesLowerPriority, + icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueRed), + ); + + final AdvancedMarker colorMarker = AdvancedMarker( + markerId: const MarkerId('custom'), + position: marker2Location, + collisionBehavior: MarkerCollisionBehavior.optionalAndHidesLowerPriority, + icon: BitmapDescriptor.pinConfig( + backgroundColor: Colors.white, + borderColor: Colors.blue, + glyph: Glyph.color(Colors.blue), + ), + ); + + final AdvancedMarker textMarker = AdvancedMarker( + markerId: const MarkerId('text'), + position: marker3Location, + collisionBehavior: MarkerCollisionBehavior.requiredAndHidesOptional, + icon: BitmapDescriptor.pinConfig( + backgroundColor: Colors.yellow, + borderColor: Colors.red, + glyph: Glyph.text(text: 'Hey', textColor: Colors.red), + ), + ); + + final AdvancedMarker bitmapGlyphMarker = AdvancedMarker( + markerId: const MarkerId('bitmapGlyph'), + position: marker4Location, + collisionBehavior: MarkerCollisionBehavior.optionalAndHidesLowerPriority, + icon: BitmapDescriptor.pinConfig( + backgroundColor: Colors.grey, + borderColor: Colors.grey, + glyph: Glyph.bitmap( + await BitmapDescriptor.asset( + const ImageConfiguration(size: Size(12, 12)), + 'assets/red_square.png', + ), + ), + ), + ); + + setState(() { + markers[defaultMarker.markerId] = defaultMarker; + markers[colorMarker.markerId] = colorMarker; + markers[textMarker.markerId] = textMarker; + markers[bitmapGlyphMarker.markerId] = bitmapGlyphMarker; + }); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart index 5261d84beac..6621eefe805 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart @@ -8,6 +8,7 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_android/google_maps_flutter_android.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; +import 'advanced_markers.dart'; import 'animate_camera.dart'; import 'clustering.dart'; import 'ground_overlay.dart'; @@ -36,6 +37,7 @@ final List _allPages = [ const MoveCameraPage(), const PlaceMarkerPage(), const MarkerIconsPage(), + const AdvancedMarkersPage(), const ScrollingMapPage(), const PlacePolylinePage(), const PlacePolygonPage(), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/map_map_id.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/map_map_id.dart index 984e32a8ea5..73224a4527b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/map_map_id.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/map_map_id.dart @@ -48,7 +48,7 @@ class MapIdBodyState extends State { super.initState(); } - String _getInitializedsRendererType() { + String _getInitializedRendererType() { switch (_initializedRenderer) { case AndroidMapRenderer.latest: return 'latest'; @@ -114,7 +114,7 @@ class MapIdBodyState extends State { padding: const EdgeInsets.all(10.0), child: Text( 'On Android, Cloud-based maps styling only works with "latest" renderer.\n\n' - 'Current initialized renderer is "${_getInitializedsRendererType()}".'), + 'Current initialized renderer is "${_getInitializedRendererType()}".'), ), ]; diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart index bc5570c164c..1b4d2b102ce 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart @@ -15,6 +15,7 @@ export 'cluster_manager.dart'; export 'cluster_manager_updates.dart'; export 'ground_overlay.dart'; export 'ground_overlay_updates.dart'; +export 'glyph.dart'; export 'heatmap.dart'; export 'heatmap_updates.dart'; export 'joint_type.dart'; @@ -27,7 +28,6 @@ export 'maps_object_updates.dart'; export 'marker.dart'; export 'marker_updates.dart'; export 'pattern_item.dart'; -export 'glyph.dart'; export 'polygon.dart'; export 'polygon_updates.dart'; export 'polyline.dart'; From 590bd739e00fc3693284aafca6d87f1797039d1d Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 26 Sep 2024 09:45:37 +0300 Subject: [PATCH 006/130] Add documentation --- .../lib/src/types/advanced_marker.dart | 39 ++++++++++++- .../lib/src/types/bitmap.dart | 56 ++++++++++++++++++- .../lib/src/types/glyph.dart | 18 ++++-- 3 files changed, 105 insertions(+), 8 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart index a1fcf980b81..bcd9d74d158 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart @@ -3,8 +3,32 @@ import 'package:flutter/foundation.dart'; import '../../google_maps_flutter_platform_interface.dart'; +/// Marks a geographical location on the map. +/// +/// Extends [Marker] and provides additional features @immutable class AdvancedMarker extends Marker { + /// Creates a set of marker configuration options. + /// + /// Default marker options. + /// + /// Specifies a marker that + /// * is fully opaque; [alpha] is 1.0 + /// * uses icon bottom center to indicate map position; [anchor] is (0.5, 1.0) + /// * has default tap handling; [consumeTapEvents] is false + /// * is stationary; [draggable] is false + /// * is drawn against the screen, not the map; [flat] is false + /// * has a default icon; [icon] is `BitmapDescriptor.defaultMarker` + /// * anchors the info window at top center; [infoWindowAnchor] is (0.5, 0.0) + /// * has no info window text; [infoWindowText] is `InfoWindowText.noText` + /// * is positioned at 0, 0; [position] is `LatLng(0.0, 0.0)` + /// * has an axis-aligned icon; [rotation] is 0.0 + /// * is visible; [visible] is true + /// * is placed at the base of the drawing order; [zIndex] is 0.0 + /// * reports [onTap] events + /// * reports [onDragEnd] events + /// * is always displayed on the map regardless of collision with other + /// markers; [collisionBehavior] is [MarkerCollisionBehavior.required] const AdvancedMarker({ required super.markerId, super.alpha, @@ -24,11 +48,10 @@ class AdvancedMarker extends Marker { super.onDragStart, super.onDragEnd, this.collisionBehavior = MarkerCollisionBehavior.required, - this.altitude = 0.0, }); + /// Indicates how the marker behaves when it collides with other markers final MarkerCollisionBehavior collisionBehavior; - final double altitude; /// Creates a new [Marker] object whose values are the same as this instance, /// unless overwritten by the specified parameters. @@ -72,13 +95,23 @@ class AdvancedMarker extends Marker { onDragEnd: onDragEndParam ?? onDragEnd, clusterManagerId: clusterManagerIdParam ?? clusterManagerId, collisionBehavior: collisionBehaviorParam ?? collisionBehavior, - altitude: altitudeParam ?? altitude, ); } } +/// Indicates how the marker behaves when it collides with other markers enum MarkerCollisionBehavior { + /// (default) Always display the marker regardless of collision required, + + /// Display the marker only if it does not overlap with other markers. + /// If two markers of this type would overlap, the one with the higher zIndex + /// is shown. If they have the same zIndex, the one with the lower vertical + /// screen position is shown optionalAndHidesLowerPriority, + + /// Always display the marker regardless of collision, and hide any + /// ´optionalAndHidesLowerPriority´ markers or labels that would overlap with + /// the marker requiredAndHidesOptional, } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart index b894d4fd7e0..125717fd55a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart @@ -970,8 +970,57 @@ class BytesMapBitmap extends MapBitmap { ]; } +/// Represents a [BitmapDescriptor] that is created from a pin configuration. +/// +/// The [backgroundColor] and [borderColor] are used to define the color of the +/// standard pin marker. +/// +/// The [glyph] parameter is used to define the glyph that is displayed on the +/// pin marker (default glyph is a circle). +/// +/// The following example demonstrates how to change colors of the default map +/// pin to white and blue: +/// +/// ```dart +/// PinConfig( +/// backgroundColor: Colors.blue, +/// borderColor: Colors.white, +/// glyph: Glyph.color(Colors.blue) +/// ) +/// ``` +/// +/// The following example demonstrates how to customize a marker pin by showing +/// a short text on the pin: +/// +/// ```dart +/// PinConfig( +/// backgroundColor: Colors.blue, +/// glyph: Glyph.text('Pin', Colors.white) +/// ) +/// ``` +/// +/// The following example demonstrates how to customize a marker pin by showing +/// a custom image on the pin: +/// +/// ```dart +/// PinConfig( +/// glyph: Glyph.bitmapDescriptor( +/// BitmapDescriptor.asset( +/// ImageConfiguration(size: Size(12, 12)), +/// 'assets/cat.png' +/// ) +/// ) +/// ``` +/// class PinConfig extends BitmapDescriptor { - PinConfig({ + /// Constructs a [PinConfig] that is created from a pin configuration. + /// + /// The [backgroundColor] and [borderColor] are used to define the color of + /// the standard pin marker. + /// + /// The [glyph] parameter is used to define the glyph that is displayed on the + /// pin marker. + const PinConfig({ this.backgroundColor, this.borderColor, this.glyph, @@ -980,8 +1029,13 @@ class PinConfig extends BitmapDescriptor { /// The type of the MapBitmap object, used for the JSON serialization. static const String type = 'pinConfig'; + /// The background color of the pin final Color? backgroundColor; + + /// The border color of the pin final Color? borderColor; + + /// The glyph that is displayed on the pin marker final Glyph? glyph; @override diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart index 36486780925..9c8d3c0e563 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart @@ -3,20 +3,23 @@ import 'package:flutter/material.dart' show Color; import '../../google_maps_flutter_platform_interface.dart'; +/// Defines a glyph (the element at the center of an [AdvancedMarker] icon). +/// Default glyph is a circle but can be configured to have a different color, +/// some text or bitmap @immutable class Glyph { + /// Create a glyph with a circle of the specified [color] factory Glyph.color(Color color) { return Glyph._(color: color); } + /// Create a glyph with a bitmap image factory Glyph.bitmap(BitmapDescriptor bitmapDescriptor) { return Glyph._(bitmapDescriptor: bitmapDescriptor); } - factory Glyph.text({ - required String text, - Color? textColor, - }) { + /// Create a glyph with a text + factory Glyph.text(String text, {Color? textColor}) { return Glyph._( text: text, textColor: textColor, @@ -29,8 +32,15 @@ class Glyph { this.color, }); + /// Text to be displayed in the glyph final String? text; + + /// Color of the text final Color? textColor; + + /// Bitmap image to be displayed in center of the glyph final BitmapDescriptor? bitmapDescriptor; + + /// Color of the default glyph (circle) final Color? color; } From 967e35abf95ea02cf18c862fe9b2e5ad49cf40e0 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 27 Sep 2024 09:44:42 +0300 Subject: [PATCH 007/130] Move advanced markers page to main example --- .../example/lib/advanced_markers.dart | 10 +++++----- .../google_maps_flutter/example/lib/main.dart | 2 ++ .../google_maps_flutter_android/example/lib/main.dart | 2 -- 3 files changed, 7 insertions(+), 7 deletions(-) rename packages/google_maps_flutter/{google_maps_flutter_android => google_maps_flutter}/example/lib/advanced_markers.dart (96%) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers.dart similarity index 96% rename from packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers.dart rename to packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers.dart index 4433f16e26f..8225ed6b4ed 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers.dart @@ -3,9 +3,9 @@ // found in the LICENSE file. import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; -import 'example_google_map.dart'; import 'page.dart'; /// Map Id is required to use advanced markers @@ -44,7 +44,7 @@ class _AdvancedMarkersBodyState extends State<_AdvancedMarkersBody> { /// is in progress bool? _isAdvancedMarkersAvailable; - ExampleGoogleMapController? controller; + GoogleMapController? controller; final Map markers = {}; @override @@ -85,7 +85,7 @@ class _AdvancedMarkersBodyState extends State<_AdvancedMarkersBody> { ), ), Expanded( - child: ExampleGoogleMap( + child: GoogleMap( // ignore: avoid_redundant_argument_values cloudMapId: _cloudMapId, initialCameraPosition: const CameraPosition( @@ -113,7 +113,7 @@ class _AdvancedMarkersBodyState extends State<_AdvancedMarkersBody> { ); } - void _onMapCreated(ExampleGoogleMapController controller) { + void _onMapCreated(GoogleMapController controller) { setState(() { this.controller = controller; }); @@ -163,7 +163,7 @@ class _AdvancedMarkersBodyState extends State<_AdvancedMarkersBody> { icon: BitmapDescriptor.pinConfig( backgroundColor: Colors.yellow, borderColor: Colors.red, - glyph: Glyph.text(text: 'Hey', textColor: Colors.red), + glyph: Glyph.text('Hey', textColor: Colors.red), ), ); diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart index db7f38f9f8a..cf28b06674f 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart @@ -8,6 +8,7 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_android/google_maps_flutter_android.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; +import 'advanced_markers.dart'; import 'animate_camera.dart'; import 'clustering.dart'; import 'ground_overlay.dart'; @@ -37,6 +38,7 @@ final List _allPages = [ const MoveCameraPage(), const PlaceMarkerPage(), const MarkerIconsPage(), + const AdvancedMarkersPage(), const ScrollingMapPage(), const PlacePolylinePage(), const PlacePolygonPage(), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart index 6621eefe805..5261d84beac 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart @@ -8,7 +8,6 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_android/google_maps_flutter_android.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; -import 'advanced_markers.dart'; import 'animate_camera.dart'; import 'clustering.dart'; import 'ground_overlay.dart'; @@ -37,7 +36,6 @@ final List _allPages = [ const MoveCameraPage(), const PlaceMarkerPage(), const MarkerIconsPage(), - const AdvancedMarkersPage(), const ScrollingMapPage(), const PlacePolylinePage(), const PlacePolygonPage(), From a452546837d2c81050c649eb56ad7552eaa3db0e Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 30 Sep 2024 09:03:54 +0300 Subject: [PATCH 008/130] Add Advanced Markers support for web --- .../example/web/index.html | 2 +- .../example/web/index.html | 3 +- .../lib/google_maps_flutter_web.dart | 1 + .../lib/src/convert.dart | 146 +++++++++---- .../lib/src/google_maps_controller.dart | 44 +++- .../lib/src/google_maps_flutter_web.dart | 7 + .../lib/src/google_maps_inspector_web.dart | 4 +- .../lib/src/marker.dart | 200 ++++++++++++++---- .../lib/src/marker_clustering.dart | 69 +++--- .../lib/src/marker_clustering_js_interop.dart | 53 +++-- .../lib/src/markers.dart | 85 +++++--- 11 files changed, 445 insertions(+), 169 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/web/index.html b/packages/google_maps_flutter/google_maps_flutter/example/web/index.html index 1d99e9742c8..49d01b4e669 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/web/index.html +++ b/packages/google_maps_flutter/google_maps_flutter/example/web/index.html @@ -36,7 +36,7 @@ - + diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/web/index.html b/packages/google_maps_flutter/google_maps_flutter_web/example/web/index.html index 51b7253b8e1..83a2193f41d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/web/index.html +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/web/index.html @@ -6,10 +6,11 @@ Browser Tests - + + diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/google_maps_flutter_web.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/google_maps_flutter_web.dart index f8b7dd0506b..7dc51d3cce1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/google_maps_flutter_web.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/google_maps_flutter_web.dart @@ -21,6 +21,7 @@ import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platf import 'package:sanitize_html/sanitize_html.dart'; import 'package:stream_transform/stream_transform.dart'; import 'package:web/web.dart'; +import 'package:web/web.dart' as web; import 'src/dom_window_extension.dart'; import 'src/google_maps_inspector_web.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index 0eeddbc8b84..83976bc51df 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -193,7 +193,7 @@ LatLng gmLatLngToLatLng(gmaps.LatLng latLng) { } /// Converts a [gmaps.LatLngBounds] into a [LatLngBounds]. -LatLngBounds gmLatLngBoundsTolatLngBounds(gmaps.LatLngBounds latLngBounds) { +LatLngBounds gmLatLngBoundsToLatLngBounds(gmaps.LatLngBounds latLngBounds) { return LatLngBounds( southwest: gmLatLngToLatLng(latLngBounds.southWest), northeast: gmLatLngToLatLng(latLngBounds.northEast), @@ -278,12 +278,12 @@ gmaps.InfoWindowOptions? _infoWindowOptionsFromMarker(Marker marker) { } // Attempts to extract a [gmaps.Size] from `iconConfig[sizeIndex]`. -gmaps.Size? _gmSizeFromIconConfig(List iconConfig, int sizeIndex) { - gmaps.Size? size; +Size? _gmSizeFromIconConfig(List iconConfig, int sizeIndex) { + Size? size; if (iconConfig.length >= sizeIndex + 1) { final List? rawIconSize = iconConfig[sizeIndex] as List?; if (rawIconSize != null) { - size = gmaps.Size( + size = Size( rawIconSize[0]! as double, rawIconSize[1]! as double, ); @@ -292,14 +292,15 @@ gmaps.Size? _gmSizeFromIconConfig(List iconConfig, int sizeIndex) { return size; } -/// Sets the size of the Google Maps icon. +/// Sets the size of the Google Maps icon element. void _setIconSize({ required Size size, - required gmaps.Icon icon, + required web.Element icon, }) { - final gmaps.Size gmapsSize = gmaps.Size(size.width, size.height); - icon.size = gmapsSize; - icon.scaledSize = gmapsSize; + icon.setAttribute( + 'style', + 'width: ${size.width}px; height: ${size.height}px;', + ); } void _setIconAnchor({ @@ -388,14 +389,16 @@ void _cleanUpBitmapConversionCaches() { } // Converts a [BitmapDescriptor] into a [gmaps.Icon] that can be used in Markers. -Future _gmIconFromBitmapDescriptor( - BitmapDescriptor bitmapDescriptor, Offset anchor) async { - gmaps.Icon? icon; +Future _gmIconFromBitmapDescriptor( + BitmapDescriptor bitmapDescriptor, + Offset anchor, +) async { + web.Element? icon; if (bitmapDescriptor is MapBitmap) { final String url = urlFromMapBitmap(bitmapDescriptor); - icon = gmaps.Icon()..url = url; + icon = document.createElement('img')..setAttribute('src', url); switch (bitmapDescriptor.bitmapScaling) { case MapBitmapScaling.auto: @@ -407,9 +410,47 @@ Future _gmIconFromBitmapDescriptor( case MapBitmapScaling.none: break; } + return icon; } + if (bitmapDescriptor is PinConfig) { + final gmaps.PinElementOptions options = gmaps.PinElementOptions() + ..background = bitmapDescriptor.backgroundColor != null + ? _getCssColor(bitmapDescriptor.backgroundColor!) + : null + ..borderColor = bitmapDescriptor.borderColor != null + ? _getCssColor(bitmapDescriptor.borderColor!) + : null + ..glyphColor = bitmapDescriptor.glyph?.color != null + ? _getCssColor(bitmapDescriptor.glyph!.color!) + : null; + + final Glyph? glyph = bitmapDescriptor.glyph; + if (glyph != null) { + if (glyph.text != null) { + // Set glyph text and text color + final web.Element element = document.createElement('p'); + element.innerHTML = glyph.text!.toJS; + if (glyph.textColor != null) { + element.setAttribute( + 'style', + 'color: ${_getCssColor(bitmapDescriptor.glyph!.textColor!)}', + ); + } + + options.glyph = element; + } else if (glyph.bitmapDescriptor != null) { + // Create glyph from bitmap + final Node? glyphBitmap = + await _gmIconFromBitmapDescriptor(glyph.bitmapDescriptor!); + options.glyph = glyphBitmap; + } + } + + return gmaps.PinElement(options).element; + } + // The following code is for the deprecated BitmapDescriptor.fromBytes // and BitmapDescriptor.fromAssetImage. final List iconConfig = bitmapDescriptor.toJson() as List; @@ -417,14 +458,15 @@ Future _gmIconFromBitmapDescriptor( assert(iconConfig.length >= 2); // iconConfig[2] contains the DPIs of the screen, but that information is // already encoded in the iconConfig[1] - icon = gmaps.Icon() - ..url = ui_web.assetManager.getAssetUrl(iconConfig[1]! as String); + icon = document.createElement('img') + ..setAttribute( + 'src', + ui_web.assetManager.getAssetUrl(iconConfig[1]! as String), + ); - final gmaps.Size? size = _gmSizeFromIconConfig(iconConfig, 3); + final Size? size = _gmSizeFromIconConfig(iconConfig, 3); if (size != null) { - icon - ..size = size - ..scaledSize = size; + _setIconSize(size: size, icon: icon); } } else if (iconConfig[0] == 'fromBytes') { // Grab the bytes, and put them into a blob @@ -441,13 +483,12 @@ Future _gmIconFromBitmapDescriptor( // See https://github.com/dart-lang/web/issues/180 blob = Blob([(bytes as Uint8List).toJS].toJS); - icon = gmaps.Icon()..url = URL.createObjectURL(blob as JSObject); + icon = document.createElement('img') + ..setAttribute('src', URL.createObjectURL(blob as JSObject)); - final gmaps.Size? size = _gmSizeFromIconConfig(iconConfig, 2); + final Size? size = _gmSizeFromIconConfig(iconConfig, 2); if (size != null) { - icon - ..size = size - ..scaledSize = size; + _setIconSize(size: size, icon: icon); } } return icon; @@ -455,21 +496,40 @@ Future _gmIconFromBitmapDescriptor( // Computes the options for a new [gmaps.Marker] from an incoming set of options // [marker], and the existing marker registered with the map: [currentMarker]. -Future _markerOptionsFromMarker( +Future _markerOptionsFromMarker( Marker marker, - gmaps.Marker? currentMarker, + T? currentMarker, ) async { - return gmaps.MarkerOptions() - ..position = gmaps.LatLng( - marker.position.latitude, - marker.position.longitude, - ) - ..title = sanitizeHtml(marker.infoWindow.title ?? '') - ..zIndex = marker.zIndex - ..visible = marker.visible - ..opacity = marker.alpha - ..draggable = marker.draggable - ..icon = await _gmIconFromBitmapDescriptor(marker.icon, marker.anchor); + if (marker is AdvancedMarker) { + final gmaps.AdvancedMarkerElementOptions options = + gmaps.AdvancedMarkerElementOptions() + ..collisionBehavior = _markerCollisionBehaviorToGmCollisionBehavior( + marker.collisionBehavior, + ) + ..content = await _gmIconFromBitmapDescriptor(marker.icon) + ..position = gmaps.LatLng( + marker.position.latitude, + marker.position.longitude, + ) + ..title = sanitizeHtml(marker.infoWindow.title ?? '') + ..zIndex = marker.zIndex; + // FIXME alpha and visibility + return options as O; + } else { + final gmaps.MarkerOptions options = gmaps.MarkerOptions() + ..position = gmaps.LatLng( + marker.position.latitude, + marker.position.longitude, + ) + ..icon = await _gmIconFromBitmapDescriptor(marker.icon) + ..title = sanitizeHtml(marker.infoWindow.title ?? '') + ..zIndex = marker.zIndex + ..visible = marker.visible + ..opacity = marker.alpha + ..draggable = marker.draggable; + return options as O; + } + // TODO(ditman): Compute anchor properly, otherwise infowindows attach to the wrong spot. // Flat and Rotation are not supported directly on the web. } @@ -730,3 +790,15 @@ gmaps.LatLng _pixelToLatLng(gmaps.Map map, int x, int y) { return projection.fromPointToLatLng(point)!; } + +gmaps.CollisionBehavior _markerCollisionBehaviorToGmCollisionBehavior( + MarkerCollisionBehavior markerCollisionBehavior, +) { + return switch (markerCollisionBehavior) { + MarkerCollisionBehavior.required => gmaps.CollisionBehavior.REQUIRED, + MarkerCollisionBehavior.optionalAndHidesLowerPriority => + gmaps.CollisionBehavior.OPTIONAL_AND_HIDES_LOWER_PRIORITY, + MarkerCollisionBehavior.requiredAndHidesOptional => + gmaps.CollisionBehavior.REQUIRED_AND_HIDES_OPTIONAL, + }; +} diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index 4588c4717ba..0cb7819fe68 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -38,11 +38,33 @@ class GoogleMapController { _heatmapsController = HeatmapsController(); _polygonsController = PolygonsController(stream: _streamController); _polylinesController = PolylinesController(stream: _streamController); - _clusterManagersController = - ClusterManagersController(stream: _streamController); - _markersController = MarkersController( - stream: _streamController, - clusterManagersController: _clusterManagersController!); + _clusterManagersController = _markers is Set + ? ClusterManagersController( + stream: _streamController) + : ClusterManagersController(stream: _streamController); + + // Check if all markers are of the same type. Mixing marker types is not + // allowed + final int markerType = + _markers.map((Marker e) => e.runtimeType).toSet().length; + if (markerType > 1) { + throw ArgumentError( + 'All markers must be of the same type (e.g. AdvancedMarker or Marker).', + ); + } + + _markersController = _markers is Set + ? MarkersController( + stream: _streamController, + clusterManagersController: _clusterManagersController! + as ClusterManagersController, + ) + : MarkersController( + stream: _streamController, + clusterManagersController: _clusterManagersController! + as ClusterManagersController, + ); _tileOverlaysController = TileOverlaysController(); _groundOverlaysController = GroundOverlaysController(stream: _streamController); @@ -132,8 +154,8 @@ class GoogleMapController { HeatmapsController? _heatmapsController; PolygonsController? _polygonsController; PolylinesController? _polylinesController; - MarkersController? _markersController; - ClusterManagersController? _clusterManagersController; + MarkersController? _markersController; + ClusterManagersController? _clusterManagersController; TileOverlaysController? _tileOverlaysController; GroundOverlaysController? _groundOverlaysController; @@ -145,7 +167,7 @@ class GoogleMapController { /// The ClusterManagersController of this Map. Only for integration testing. @visibleForTesting - ClusterManagersController? get clusterManagersController => + ClusterManagersController? get clusterManagersController => _clusterManagersController; /// The GroundOverlaysController of this Map. Only for integration testing. @@ -158,12 +180,12 @@ class GoogleMapController { void debugSetOverrides({ DebugCreateMapFunction? createMap, DebugSetOptionsFunction? setOptions, - MarkersController? markers, + MarkersController? markers, CirclesController? circles, HeatmapsController? heatmaps, PolygonsController? polygons, PolylinesController? polylines, - ClusterManagersController? clusterManagers, + ClusterManagersController? clusterManagers, TileOverlaysController? tileOverlays, GroundOverlaysController? groundOverlays, }) { @@ -421,7 +443,7 @@ class GoogleMapController { await Future.value(_googleMap!.bounds) ?? _nullGmapsLatLngBounds; - return gmLatLngBoundsTolatLngBounds(bounds); + return gmLatLngBoundsToLatLngBounds(bounds); } /// Returns the [ScreenCoordinate] for a given viewport [LatLng]. diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart index d205a747690..ec14564351e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart @@ -319,6 +319,13 @@ class GoogleMapsPlugin extends GoogleMapsFlutterPlatform { return _map(mapId).lastStyleError; } + @override + Future isAdvancedMarkersAvailable({required int mapId}) async { + // The web implementation of the plugin always supports advanced markers. + // Legacy markers are deprecated + return true; + } + /// Disposes of the current map. It can't be used afterwards! @override void dispose({required int mapId}) { diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_inspector_web.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_inspector_web.dart index d5a23c434a2..5434939aebd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_inspector_web.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_inspector_web.dart @@ -15,8 +15,8 @@ import 'marker_clustering.dart'; typedef ConfigurationProvider = MapConfiguration Function(int mapId); /// Function that gets the [ClusterManagersController] for a given `mapId`. -typedef ClusterManagersControllerProvider = ClusterManagersController? Function( - int mapId); +typedef ClusterManagersControllerProvider = ClusterManagersController? + Function(int mapId); /// Function that gets the [GroundOverlaysController] for a given `mapId`. typedef GroundOverlaysControllerProvider = GroundOverlaysController? Function( diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart index 518dce6de77..06ba49ca552 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart @@ -4,11 +4,11 @@ part of '../google_maps_flutter_web.dart'; -/// The `MarkerController` class wraps a [gmaps.Marker], how it handles events, and its associated (optional) [gmaps.InfoWindow] widget. -class MarkerController { - /// Creates a `MarkerController`, which wraps a [gmaps.Marker] object, its `onTap`/`onDrag` behavior, and its associated [gmaps.InfoWindow]. +/// The `MarkerController` class wraps a [gmaps.AdvancedMarkerElement], how it handles events, and its associated (optional) [gmaps.InfoWindow] widget. +class MarkerController { + /// Creates a `MarkerController`, which wraps a [gmaps.AdvancedMarkerElement] object, its `onTap`/`onDrag` behavior, and its associated [gmaps.InfoWindow]. MarkerController({ - required gmaps.Marker marker, + required T marker, gmaps.InfoWindow? infoWindow, bool consumeTapEvents = false, LatLngCallback? onDragStart, @@ -20,32 +20,30 @@ class MarkerController { _infoWindow = infoWindow, _consumeTapEvents = consumeTapEvents, _clusterManagerId = clusterManagerId { - if (onTap != null) { - marker.onClick.listen((gmaps.MapMouseEvent event) { - onTap.call(); - }); - } - if (onDragStart != null) { - marker.onDragstart.listen((gmaps.MapMouseEvent event) { - marker.position = event.latLng; - onDragStart.call(event.latLng ?? _nullGmapsLatLng); - }); - } - if (onDrag != null) { - marker.onDrag.listen((gmaps.MapMouseEvent event) { - marker.position = event.latLng; - onDrag.call(event.latLng ?? _nullGmapsLatLng); - }); - } - if (onDragEnd != null) { - marker.onDragend.listen((gmaps.MapMouseEvent event) { - marker.position = event.latLng; - onDragEnd.call(event.latLng ?? _nullGmapsLatLng); - }); - } + _doOnMarkerType( + marker: marker, + legacy: (gmaps.Marker marker) { + _initializeMarkerListener( + marker: marker, + onDragStart: onDragStart, + onDrag: onDrag, + onDragEnd: onDragEnd, + onTap: onTap, + ); + }, + advanced: (gmaps.AdvancedMarkerElement marker) { + _initializeAdvancedMarkerElementListener( + marker: marker, + onDragStart: onDragStart, + onDrag: onDrag, + onDragEnd: onDragEnd, + onTap: onTap, + ); + }, + ); } - gmaps.Marker? _marker; + T? _marker; final bool _consumeTapEvents; @@ -64,33 +62,54 @@ class MarkerController { /// Returns [ClusterManagerId] if marker belongs to cluster. ClusterManagerId? get clusterManagerId => _clusterManagerId; - /// Returns the [gmaps.Marker] associated to this controller. - gmaps.Marker? get marker => _marker; + /// Returns the [gmaps.AdvancedMarkerElement] associated to this controller. + T? get marker => _marker; /// Returns the [gmaps.InfoWindow] associated to the marker. @visibleForTesting gmaps.InfoWindow? get infoWindow => _infoWindow; - /// Updates the options of the wrapped [gmaps.Marker] object. + /// Updates the options of the wrapped [gmaps.AdvancedMarkerElement] object. /// /// This cannot be called after [remove]. void update( - gmaps.MarkerOptions options, { + O options, { HTMLElement? newInfoWindowContent, }) { assert(_marker != null, 'Cannot `update` Marker after calling `remove`.'); - _marker!.options = options; + + if (O is gmaps.MarkerOptions) { + (_marker! as gmaps.Marker).options = options as gmaps.MarkerOptions; + } else if (O is gmaps.AdvancedMarkerElementOptions) { + options as gmaps.AdvancedMarkerElementOptions; + final gmaps.AdvancedMarkerElement marker = + _marker! as gmaps.AdvancedMarkerElement; + marker.collisionBehavior = options.collisionBehavior; + marker.content = options.content; + marker.gmpClickable = options.gmpClickable; + marker.gmpDraggable = options.gmpDraggable; + marker.map = options.map; + marker.position = options.position; + marker.title = options.title ?? ''; + marker.zIndex = options.zIndex; + } + if (_infoWindow != null && newInfoWindowContent != null) { _infoWindow.content = newInfoWindowContent; } } - /// Disposes of the currently wrapped [gmaps.Marker]. + /// Disposes of the currently wrapped [gmaps.AdvancedMarkerElement]. void remove() { if (_marker != null) { _infoWindowShown = false; - _marker!.visible = false; - _marker!.map = null; + + _doOnMarkerType( + marker: marker, + legacy: (gmaps.Marker marker) => marker.map = null, + advanced: (gmaps.AdvancedMarkerElement marker) => marker.map = null, + ); + _marker = null; } } @@ -112,8 +131,115 @@ class MarkerController { void showInfoWindow() { assert(_marker != null, 'Cannot `showInfoWindow` on a `remove`d Marker.'); if (_infoWindow != null) { - _infoWindow.open(_marker!.map, _marker); + _doOnMarkerType( + marker: _marker, + legacy: (gmaps.Marker marker) { + _infoWindow.open(marker.map, marker); + }, + advanced: (gmaps.AdvancedMarkerElement marker) { + _infoWindow.open(marker.map, marker); + }, + ); + _infoWindowShown = true; } } + + void _initializeMarkerListener({ + required gmaps.Marker marker, + required LatLngCallback? onDragStart, + required LatLngCallback? onDrag, + required LatLngCallback? onDragEnd, + required VoidCallback? onTap, + }) { + if (onTap != null) { + marker.onClick.listen((gmaps.MapMouseEvent event) { + onTap.call(); + }); + } + if (onDragStart != null) { + marker.onDragstart.listen((gmaps.MapMouseEvent event) { + marker.position = event.latLng; + onDragStart.call(event.latLng ?? _nullGmapsLatLng); + }); + } + if (onDrag != null) { + marker.onDrag.listen((gmaps.MapMouseEvent event) { + marker.position = event.latLng; + onDrag.call(event.latLng ?? _nullGmapsLatLng); + }); + } + if (onDragEnd != null) { + marker.onDragend.listen((gmaps.MapMouseEvent event) { + marker.position = event.latLng; + onDragEnd.call(event.latLng ?? _nullGmapsLatLng); + }); + } + } + + void _initializeAdvancedMarkerElementListener({ + required gmaps.AdvancedMarkerElement marker, + required LatLngCallback? onDragStart, + required LatLngCallback? onDrag, + required LatLngCallback? onDragEnd, + required VoidCallback? onTap, + }) { + if (onTap != null) { + marker.onClick.listen((gmaps.MapMouseEvent event) { + onTap.call(); + }); + } + if (onDragStart != null) { + marker.onDragstart.listen((gmaps.MapMouseEvent event) { + marker.position = event.latLng; + onDragStart.call(event.latLng ?? _nullGmapsLatLng); + }); + } + if (onDrag != null) { + marker.onDrag.listen((gmaps.MapMouseEvent event) { + marker.position = event.latLng; + onDrag.call(event.latLng ?? _nullGmapsLatLng); + }); + } + if (onDragEnd != null) { + marker.onDragend.listen((gmaps.MapMouseEvent event) { + marker.position = event.latLng; + onDragEnd.call(event.latLng ?? _nullGmapsLatLng); + }); + } + } +} + +void _doOnMarkerType({ + required dynamic marker, + required void Function(gmaps.Marker marker) legacy, + required void Function(gmaps.AdvancedMarkerElement marker) advanced, +}) { + final JSObject object = marker as JSObject; + if (object.isA()) { + legacy(marker as gmaps.Marker); + } else if (object.isA()) { + advanced(marker as gmaps.AdvancedMarkerElement); + } else { + throw ArgumentError( + 'Must be either a gmaps.Marker or a gmaps.AdvancedMarkerElement', + ); + } +} + +R getOnMarkerType({ + required dynamic marker, + required R Function(gmaps.Marker marker) legacy, + required R Function(gmaps.AdvancedMarkerElement marker) advanced, +}) { + final JSObject object = marker as JSObject; + if (object.isA()) { + return legacy(marker as gmaps.Marker); + } else if (object.isA()) { + return advanced(marker as gmaps.AdvancedMarkerElement); + } else { + throw ArgumentError( + 'Must be either a gmaps.Marker or a gmaps.AdvancedMarkerElement', + ); + } } diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart index 8dbb4308ba6..55bb0aef6bd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart @@ -17,7 +17,7 @@ import 'types.dart'; /// This class maps [ClusterManager] objects to javascript [MarkerClusterer] /// objects and provides an interface for adding and removing markers from /// clusters. -class ClusterManagersController extends GeometryController { +class ClusterManagersController extends GeometryController { /// Creates a new [ClusterManagersController] instance. /// /// The [stream] parameter is a required [StreamController] used for @@ -26,13 +26,13 @@ class ClusterManagersController extends GeometryController { {required StreamController> stream}) : _streamController = stream, _clusterManagerIdToMarkerClusterer = - {}; + >{}; // The stream over which cluster managers broadcast their events final StreamController> _streamController; // A cache of [MarkerClusterer]s indexed by their [ClusterManagerId]. - final Map + final Map> _clusterManagerIdToMarkerClusterer; /// Adds a set of [ClusterManager] objects to the cache. @@ -41,12 +41,12 @@ class ClusterManagersController extends GeometryController { } void _addClusterManager(ClusterManager clusterManager) { - final MarkerClusterer markerClusterer = createMarkerClusterer( - googleMap, - (gmaps.MapMouseEvent event, MarkerClustererCluster cluster, - gmaps.Map map) => - _clusterClicked( - clusterManager.clusterManagerId, event, cluster, map)); + final MarkerClusterer markerClusterer = createMarkerClusterer( + googleMap, + (gmaps.MapMouseEvent event, MarkerClustererCluster cluster, + gmaps.Map map) => + _clusterClicked(clusterManager.clusterManagerId, event, cluster, map), + ); _clusterManagerIdToMarkerClusterer[clusterManager.clusterManagerId] = markerClusterer; @@ -59,7 +59,7 @@ class ClusterManagersController extends GeometryController { } void _removeClusterManager(ClusterManagerId clusterManagerId) { - final MarkerClusterer? markerClusterer = + final MarkerClusterer? markerClusterer = _clusterManagerIdToMarkerClusterer[clusterManagerId]; if (markerClusterer != null) { markerClusterer.clearMarkers(true); @@ -68,10 +68,13 @@ class ClusterManagersController extends GeometryController { _clusterManagerIdToMarkerClusterer.remove(clusterManagerId); } - /// Adds given [gmaps.Marker] to the [MarkerClusterer] with given - /// [ClusterManagerId]. - void addItem(ClusterManagerId clusterManagerId, gmaps.Marker marker) { - final MarkerClusterer? markerClusterer = + /// Adds given [gmaps.AdvancedMarkerElement] to the [MarkerClusterer] with + /// given [ClusterManagerId]. + void addItem( + ClusterManagerId clusterManagerId, + T marker, + ) { + final MarkerClusterer? markerClusterer = _clusterManagerIdToMarkerClusterer[clusterManagerId]; if (markerClusterer != null) { markerClusterer.addMarker(marker, true); @@ -79,11 +82,14 @@ class ClusterManagersController extends GeometryController { } } - /// Removes given [gmaps.Marker] from the [MarkerClusterer] with given - /// [ClusterManagerId]. - void removeItem(ClusterManagerId clusterManagerId, gmaps.Marker? marker) { + /// Removes given [gmaps.AdvancedMarkerElement] from the [MarkerClusterer] + /// with given [ClusterManagerId]. + void removeItem( + ClusterManagerId clusterManagerId, + T? marker, + ) { if (marker != null) { - final MarkerClusterer? markerClusterer = + final MarkerClusterer? markerClusterer = _clusterManagerIdToMarkerClusterer[clusterManagerId]; if (markerClusterer != null) { markerClusterer.removeMarker(marker, true); @@ -95,11 +101,11 @@ class ClusterManagersController extends GeometryController { /// Returns list of clusters in [MarkerClusterer] with given /// [ClusterManagerId]. List getClusters(ClusterManagerId clusterManagerId) { - final MarkerClusterer? markerClusterer = + final MarkerClusterer? markerClusterer = _clusterManagerIdToMarkerClusterer[clusterManagerId]; if (markerClusterer != null) { return markerClusterer.clusters - .map((MarkerClustererCluster cluster) => + .map((MarkerClustererCluster cluster) => _convertCluster(clusterManagerId, cluster)) .toList(); } @@ -109,7 +115,7 @@ class ClusterManagersController extends GeometryController { void _clusterClicked( ClusterManagerId clusterManagerId, gmaps.MapMouseEvent event, - MarkerClustererCluster markerClustererCluster, + MarkerClustererCluster markerClustererCluster, gmaps.Map map) { if (markerClustererCluster.count > 0 && markerClustererCluster.bounds != null) { @@ -121,15 +127,24 @@ class ClusterManagersController extends GeometryController { /// Converts [MarkerClustererCluster] to [Cluster]. Cluster _convertCluster(ClusterManagerId clusterManagerId, - MarkerClustererCluster markerClustererCluster) { + MarkerClustererCluster markerClustererCluster) { final LatLng position = gmLatLngToLatLng(markerClustererCluster.position); final LatLngBounds bounds = - gmLatLngBoundsTolatLngBounds(markerClustererCluster.bounds!); + gmLatLngBoundsToLatLngBounds(markerClustererCluster.bounds!); + + final List markerIds = + markerClustererCluster.markers.map((T marker) { + return getOnMarkerType( + marker: marker, + legacy: (gmaps.Marker marker) { + return MarkerId((marker.get('markerId')! as JSString).toDart); + }, + advanced: (gmaps.AdvancedMarkerElement marker) { + return MarkerId((marker.getAttribute('id')! as JSString).toDart); + }, + ); + }).toList(); - final List markerIds = markerClustererCluster.markers - .map((gmaps.Marker marker) => - MarkerId((marker.get('markerId')! as JSString).toDart)) - .toList(); return Cluster( clusterManagerId, markerIds, diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart index 80e7e5fc1c1..130c0774abd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart @@ -13,9 +13,9 @@ import 'dart:js_interop'; import 'package:google_maps/google_maps.dart' as gmaps; /// A typedef representing a callback function for handling cluster tap events. -typedef ClusterClickHandler = void Function( +typedef ClusterClickHandler = void Function( gmaps.MapMouseEvent, - MarkerClustererCluster, + MarkerClustererCluster, gmaps.Map, ); @@ -24,18 +24,18 @@ typedef ClusterClickHandler = void Function( /// See: https://googlemaps.github.io/js-markerclusterer/interfaces/MarkerClustererOptions.html @JS() @anonymous -extension type MarkerClustererOptions._(JSObject _) implements JSObject { +extension type MarkerClustererOptions._(JSObject _) implements JSObject { /// Constructs a new [MarkerClustererOptions] object. factory MarkerClustererOptions({ gmaps.Map? map, - List? markers, - ClusterClickHandler? onClusterClick, + List? markers, + ClusterClickHandler? onClusterClick, }) => - MarkerClustererOptions._js( + MarkerClustererOptions._js( map: map as JSAny?, markers: markers?.cast().toJS ?? JSArray(), onClusterClick: onClusterClick != null - ? ((JSAny event, MarkerClustererCluster cluster, JSAny map) => + ? ((JSAny event, MarkerClustererCluster cluster, JSAny map) => onClusterClick(event as gmaps.MapMouseEvent, cluster, map as gmaps.Map)).toJS : null, @@ -52,13 +52,13 @@ extension type MarkerClustererOptions._(JSObject _) implements JSObject { @JS('map') external JSAny? get _map; - /// Returns the list of [gmaps.Marker] objects. - List? get markers => _markers?.toDart.cast(); + /// Returns the list of marker objects. + List? get markers => _markers?.toDart.cast(); @JS('markers') external JSArray? get _markers; /// Returns the onClusterClick handler. - ClusterClickHandler? get onClusterClick => + ClusterClickHandler? get onClusterClick => _onClusterClick?.toDart as ClusterClickHandler?; @JS('onClusterClick') external JSExportedDartFunction? get _onClusterClick; @@ -68,14 +68,14 @@ extension type MarkerClustererOptions._(JSObject _) implements JSObject { /// /// https://googlemaps.github.io/js-markerclusterer/classes/Cluster.html @JS('markerClusterer.Cluster') -extension type MarkerClustererCluster._(JSObject _) implements JSObject { +extension type MarkerClustererCluster._(JSObject _) implements JSObject { /// Getter for the cluster marker. - gmaps.Marker get marker => _marker as gmaps.Marker; + T get marker => _marker as T; @JS('marker') external JSAny get _marker; /// List of markers in the cluster. - List get markers => _markers.toDart.cast(); + List get markers => _markers.toDart.cast(); @JS('markers') external JSArray get _markers; @@ -96,7 +96,7 @@ extension type MarkerClustererCluster._(JSObject _) implements JSObject { external void delete(); /// Adds a marker to the cluster. - void push(gmaps.Marker marker) => _push(marker as JSAny); + void push(T marker) => _push(marker as JSAny); @JS('push') external void _push(JSAny marker); } @@ -105,30 +105,29 @@ extension type MarkerClustererCluster._(JSObject _) implements JSObject { /// /// https://googlemaps.github.io/js-markerclusterer/classes/MarkerClusterer.html @JS('markerClusterer.MarkerClusterer') -extension type MarkerClusterer._(JSObject _) implements JSObject { +extension type MarkerClusterer._(JSObject _) implements JSObject { /// Constructs a new [MarkerClusterer] object. - external MarkerClusterer(MarkerClustererOptions options); + external MarkerClusterer(MarkerClustererOptions options); /// Adds a marker to be clustered by the [MarkerClusterer]. - void addMarker(gmaps.Marker marker, bool? noDraw) => - _addMarker(marker as JSAny, noDraw); + void addMarker(T marker, bool? noDraw) => _addMarker(marker as JSAny, noDraw); @JS('addMarker') external void _addMarker(JSAny marker, bool? noDraw); /// Adds a list of markers to be clustered by the [MarkerClusterer]. - void addMarkers(List? markers, bool? noDraw) => + void addMarkers(List? markers, bool? noDraw) => _addMarkers(markers?.cast().toJS, noDraw); @JS('addMarkers') external void _addMarkers(JSArray? markers, bool? noDraw); /// Removes a marker from the [MarkerClusterer]. - bool removeMarker(gmaps.Marker marker, bool? noDraw) => + bool removeMarker(T marker, bool? noDraw) => _removeMarker(marker as JSAny, noDraw); @JS('removeMarker') external bool _removeMarker(JSAny marker, bool? noDraw); /// Removes a list of markers from the [MarkerClusterer]. - bool removeMarkers(List? markers, bool? noDraw) => + bool removeMarkers(List? markers, bool? noDraw) => _removeMarkers(markers?.cast().toJS, noDraw); @JS('removeMarkers') external bool _removeMarkers(JSArray? markers, bool? noDraw); @@ -143,8 +142,8 @@ extension type MarkerClusterer._(JSObject _) implements JSObject { external void onRemove(); /// Returns the list of clusters. - List get clusters => - _clusters.toDart.cast(); + List> get clusters => + _clusters.toDart.cast>(); @JS('clusters') external JSArray get _clusters; @@ -154,11 +153,11 @@ extension type MarkerClusterer._(JSObject _) implements JSObject { /// Creates [MarkerClusterer] object with given [gmaps.Map] and /// [ClusterClickHandler]. -MarkerClusterer createMarkerClusterer( - gmaps.Map map, ClusterClickHandler onClusterClickHandler) { - final MarkerClustererOptions options = MarkerClustererOptions( +MarkerClusterer createMarkerClusterer( + gmaps.Map map, ClusterClickHandler onClusterClickHandler) { + final MarkerClustererOptions options = MarkerClustererOptions( map: map, onClusterClick: onClusterClickHandler, ); - return MarkerClusterer(options); + return MarkerClusterer(options); } diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart index f5204403528..d2c9ee9b479 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart @@ -5,26 +5,26 @@ part of '../google_maps_flutter_web.dart'; /// This class manages a set of [MarkerController]s associated to a [GoogleMapController]. -class MarkersController extends GeometryController { +class MarkersController extends GeometryController { /// Initialize the cache. The [StreamController] comes from the [GoogleMapController], and is shared with other controllers. MarkersController({ required StreamController> stream, - required ClusterManagersController clusterManagersController, + required ClusterManagersController clusterManagersController, }) : _streamController = stream, _clusterManagersController = clusterManagersController, - _markerIdToController = {}; + _markerIdToController = >{}; // A cache of [MarkerController]s indexed by their [MarkerId]. - final Map _markerIdToController; + final Map> _markerIdToController; // The stream over which markers broadcast their events final StreamController> _streamController; - final ClusterManagersController _clusterManagersController; + final ClusterManagersController _clusterManagersController; /// Returns the cache of [MarkerController]s. Test only. @visibleForTesting - Map get markers => _markerIdToController; + Map> get markers => _markerIdToController; /// Adds a set of [Marker] objects to the cache. /// @@ -52,23 +52,52 @@ class MarkersController extends GeometryController { } } - final gmaps.Marker? currentMarker = - _markerIdToController[marker.markerId]?.marker; + final T gmMarker; + if (marker is AdvancedMarker) { + final MarkerController? markerController = + _markerIdToController[marker.markerId] as MarkerController< + gmaps.AdvancedMarkerElement, gmaps.AdvancedMarkerElementOptions>?; + final gmaps.AdvancedMarkerElement? currentMarker = + markerController?.marker; + final gmaps.AdvancedMarkerElementOptions markerOptions = + await _markerOptionsFromMarker(marker, currentMarker); + final gmaps.AdvancedMarkerElement newGmMarker = + gmaps.AdvancedMarkerElement(markerOptions); + newGmMarker.setAttribute('id', marker.markerId.value); + + if (marker.clusterManagerId != null) { + _clusterManagersController.addItem( + marker.clusterManagerId!, newGmMarker as T); + } else { + newGmMarker.map = googleMap; + } - final gmaps.MarkerOptions markerOptions = - await _markerOptionsFromMarker(marker, currentMarker); + gmMarker = newGmMarker as T; + } else { + final MarkerController? + markerController = _markerIdToController[marker.markerId] + as MarkerController?; + final gmaps.Marker? currentMarker = markerController?.marker; - final gmaps.Marker gmMarker = gmaps.Marker(markerOptions); + final gmaps.MarkerOptions markerOptions = + await _markerOptionsFromMarker( + marker, currentMarker); - gmMarker.set('markerId', marker.markerId.value.toJS); + final gmaps.Marker newGmMarker = gmaps.Marker(markerOptions); + newGmMarker.set('markerId', marker.markerId.value.toJS); - if (marker.clusterManagerId != null) { - _clusterManagersController.addItem(marker.clusterManagerId!, gmMarker); - } else { - gmMarker.map = googleMap; + if (marker.clusterManagerId != null) { + _clusterManagersController.addItem( + marker.clusterManagerId!, newGmMarker as T); + } else { + newGmMarker.map = googleMap; + } + + gmMarker = newGmMarker as T; } - final MarkerController controller = MarkerController( + final MarkerController controller = MarkerController( marker: gmMarker, clusterManagerId: marker.clusterManagerId, infoWindow: gmInfoWindow, @@ -96,7 +125,7 @@ class MarkersController extends GeometryController { } Future _changeMarker(Marker marker) async { - final MarkerController? markerController = + final MarkerController? markerController = _markerIdToController[marker.markerId]; if (markerController != null) { final ClusterManagerId? oldClusterManagerId = @@ -108,7 +137,7 @@ class MarkersController extends GeometryController { _removeMarker(marker.markerId); await _addMarker(marker); } else { - final gmaps.MarkerOptions markerOptions = + final gmaps.AdvancedMarkerElementOptions markerOptions = await _markerOptionsFromMarker( marker, markerController.marker, @@ -116,7 +145,7 @@ class MarkersController extends GeometryController { final gmaps.InfoWindowOptions? infoWindow = _infoWindowOptionsFromMarker(marker); markerController.update( - markerOptions, + markerOptions as O, newInfoWindowContent: infoWindow?.content as HTMLElement?, ); } @@ -129,7 +158,8 @@ class MarkersController extends GeometryController { } void _removeMarker(MarkerId markerId) { - final MarkerController? markerController = _markerIdToController[markerId]; + final MarkerController? markerController = + _markerIdToController[markerId]; if (markerController?.clusterManagerId != null) { _clusterManagersController.removeItem( markerController!.clusterManagerId!, markerController.marker); @@ -145,7 +175,8 @@ class MarkersController extends GeometryController { /// See also [hideMarkerInfoWindow] and [isInfoWindowShown]. void showMarkerInfoWindow(MarkerId markerId) { _hideAllMarkerInfoWindow(); - final MarkerController? markerController = _markerIdToController[markerId]; + final MarkerController? markerController = + _markerIdToController[markerId]; markerController?.showInfoWindow(); } @@ -153,7 +184,8 @@ class MarkersController extends GeometryController { /// /// See also [showMarkerInfoWindow] and [isInfoWindowShown]. void hideMarkerInfoWindow(MarkerId markerId) { - final MarkerController? markerController = _markerIdToController[markerId]; + final MarkerController? markerController = + _markerIdToController[markerId]; markerController?.hideInfoWindow(); } @@ -161,7 +193,8 @@ class MarkersController extends GeometryController { /// /// See also [showMarkerInfoWindow] and [hideMarkerInfoWindow]. bool isInfoWindowShown(MarkerId markerId) { - final MarkerController? markerController = _markerIdToController[markerId]; + final MarkerController? markerController = + _markerIdToController[markerId]; return markerController?.infoWindowShown ?? false; } @@ -204,9 +237,9 @@ class MarkersController extends GeometryController { void _hideAllMarkerInfoWindow() { _markerIdToController.values - .where((MarkerController? controller) => + .where((MarkerController? controller) => controller?.infoWindowShown ?? false) - .forEach((MarkerController controller) { + .forEach((MarkerController controller) { controller.hideInfoWindow(); }); } From 5032d5a4464fb2595396ad0172b478cd3ba35295 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 30 Sep 2024 11:22:41 +0300 Subject: [PATCH 009/130] Add opacity and visibility support. Restore legacy markers icon customization --- .../lib/google_maps_flutter_web.dart | 2 +- .../lib/src/convert.dart | 210 ++++++++++++++---- 2 files changed, 168 insertions(+), 44 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/google_maps_flutter_web.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/google_maps_flutter_web.dart index 7dc51d3cce1..4e13d2636ef 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/google_maps_flutter_web.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/google_maps_flutter_web.dart @@ -20,8 +20,8 @@ import 'package:google_maps/google_maps_visualization.dart' as visualization; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; import 'package:sanitize_html/sanitize_html.dart'; import 'package:stream_transform/stream_transform.dart'; -import 'package:web/web.dart'; import 'package:web/web.dart' as web; +import 'package:web/web.dart'; import 'src/dom_window_extension.dart'; import 'src/google_maps_inspector_web.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index 83976bc51df..3a658d51d80 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -278,7 +278,13 @@ gmaps.InfoWindowOptions? _infoWindowOptionsFromMarker(Marker marker) { } // Attempts to extract a [gmaps.Size] from `iconConfig[sizeIndex]`. -Size? _gmSizeFromIconConfig(List iconConfig, int sizeIndex) { +gmaps.Size? _gmSizeFromIconConfig(List iconConfig, int sizeIndex) { + final Size? size = _sizeFromIconConfig(iconConfig, sizeIndex); + return size != null ? gmaps.Size(size.width, size.height) : null; +} + +// Attempts to extract a [Size] from `iconConfig[sizeIndex]`. +Size? _sizeFromIconConfig(List iconConfig, int sizeIndex) { Size? size; if (iconConfig.length >= sizeIndex + 1) { final List? rawIconSize = iconConfig[sizeIndex] as List?; @@ -292,17 +298,36 @@ Size? _gmSizeFromIconConfig(List iconConfig, int sizeIndex) { return size; } -/// Sets the size of the Google Maps icon element. -void _setIconSize({ - required Size size, +/// Sets the size and style of the [icon] element +void _setIconStyle({ required web.Element icon, + required Size? size, + required double? opacity, + required bool? isVisible, }) { icon.setAttribute( 'style', - 'width: ${size.width}px; height: ${size.height}px;', + [ + if (size != null) ...[ + 'width: ${size.width}px;', + 'height: ${size.height}px;', + ], + if (opacity != null) 'opacity: $opacity;', + if (isVisible != null) 'visibility: ${isVisible ? 'visible' : 'hidden'};', + ].join(' '), ); } +/// Sets the size of the Google Maps icon. +void _setIconSize({ + required Size size, + required gmaps.Icon icon, +}) { + final gmaps.Size gmapsSize = gmaps.Size(size.width, size.height); + icon.size = gmapsSize; + icon.scaledSize = gmapsSize; +} + void _setIconAnchor({ required Size size, required Offset anchor, @@ -388,32 +413,13 @@ void _cleanUpBitmapConversionCaches() { _bitmapBlobUrlCache.clear(); } -// Converts a [BitmapDescriptor] into a [gmaps.Icon] that can be used in Markers. -Future _gmIconFromBitmapDescriptor( - BitmapDescriptor bitmapDescriptor, - Offset anchor, -) async { - web.Element? icon; - - if (bitmapDescriptor is MapBitmap) { - final String url = urlFromMapBitmap(bitmapDescriptor); - - icon = document.createElement('img')..setAttribute('src', url); - - switch (bitmapDescriptor.bitmapScaling) { - case MapBitmapScaling.auto: - final Size? size = await _getBitmapSize(bitmapDescriptor, url); - if (size != null) { - _setIconSize(size: size, icon: icon); - _setIconAnchor(size: size, anchor: anchor, icon: icon); - } - case MapBitmapScaling.none: - break; - } - - return icon; - } - +/// Converts a [BitmapDescriptor] into a [Node] that can be used as Advanced +/// Marker icon +Future _advancedMarkerIconFromBitmapDescriptor( + BitmapDescriptor bitmapDescriptor, { + required double? opacity, + required bool isVisible, +}) async { if (bitmapDescriptor is PinConfig) { final gmaps.PinElementOptions options = gmaps.PinElementOptions() ..background = bitmapDescriptor.backgroundColor != null @@ -442,13 +448,49 @@ Future _gmIconFromBitmapDescriptor( options.glyph = element; } else if (glyph.bitmapDescriptor != null) { // Create glyph from bitmap - final Node? glyphBitmap = - await _gmIconFromBitmapDescriptor(glyph.bitmapDescriptor!); + final Node? glyphBitmap = await _advancedMarkerIconFromBitmapDescriptor( + glyph.bitmapDescriptor!, + // Always opaque, opacity is handled by the parent marker + opacity: 1.0, + // Always visible, as the visibility is handled by the parent marker + isVisible: true, + ); options.glyph = glyphBitmap; } } - return gmaps.PinElement(options).element; + final gmaps.PinElement pinElement = gmaps.PinElement(options); + final HTMLElement htmlElement = pinElement.element; + htmlElement.style + ..visibility = isVisible ? 'visible' : 'hidden' + ..opacity = opacity?.toString() ?? '1.0'; + return htmlElement; + } + + if (bitmapDescriptor is MapBitmap) { + final String url = switch (bitmapDescriptor) { + (final BytesMapBitmap bytesMapBitmap) => + _bitmapBlobUrlCache.putIfAbsent(bytesMapBitmap.byteData.hashCode, () { + final Blob blob = + Blob([bytesMapBitmap.byteData.toJS].toJS); + return URL.createObjectURL(blob as JSObject); + }), + (final AssetMapBitmap assetMapBitmap) => + ui_web.assetManager.getAssetUrl(assetMapBitmap.assetName), + _ => throw UnimplementedError(), + }; + + final web.Element icon = document.createElement('img') + ..setAttribute('src', url); + + final Size? size = switch (bitmapDescriptor.bitmapScaling) { + MapBitmapScaling.auto => await _getBitmapSize(bitmapDescriptor, url), + MapBitmapScaling.none => null, + }; + _setIconStyle( + icon: icon, size: size, opacity: opacity, isVisible: isVisible); + + return icon; } // The following code is for the deprecated BitmapDescriptor.fromBytes @@ -458,15 +500,93 @@ Future _gmIconFromBitmapDescriptor( assert(iconConfig.length >= 2); // iconConfig[2] contains the DPIs of the screen, but that information is // already encoded in the iconConfig[1] - icon = document.createElement('img') + final web.Element icon = document.createElement('img') ..setAttribute( 'src', ui_web.assetManager.getAssetUrl(iconConfig[1]! as String), ); - final Size? size = _gmSizeFromIconConfig(iconConfig, 3); + final Size? size = _sizeFromIconConfig(iconConfig, 3); + _setIconStyle( + icon: icon, size: size, opacity: opacity, isVisible: isVisible); + return icon; + } else if (iconConfig[0] == 'fromBytes') { + // Grab the bytes, and put them into a blob + final List bytes = iconConfig[1]! as List; + // Create a Blob from bytes, but let the browser figure out the encoding + final Blob blob; + + assert( + bytes is Uint8List, + 'The bytes for a BitmapDescriptor icon must be a Uint8List', + ); + + // TODO(ditman): Improve this conversion + // See https://github.com/dart-lang/web/issues/180 + blob = Blob([(bytes as Uint8List).toJS].toJS); + + final web.Element icon = document.createElement('img') + ..setAttribute('src', URL.createObjectURL(blob as JSObject)); + + final Size? size = _sizeFromIconConfig(iconConfig, 2); + _setIconStyle( + size: size, icon: icon, opacity: opacity, isVisible: isVisible); + return icon; + } + + return null; +} + +// Converts a [BitmapDescriptor] into a [gmaps.Icon] that can be used in Markers. +Future _gmIconFromBitmapDescriptor( + BitmapDescriptor bitmapDescriptor, + Offset anchor, +) async { + gmaps.Icon? icon; + + if (bitmapDescriptor is MapBitmap) { + final String url = switch (bitmapDescriptor) { + (final BytesMapBitmap bytesMapBitmap) => + _bitmapBlobUrlCache.putIfAbsent(bytesMapBitmap.byteData.hashCode, () { + final Blob blob = + Blob([bytesMapBitmap.byteData.toJS].toJS); + return URL.createObjectURL(blob as JSObject); + }), + (final AssetMapBitmap assetMapBitmap) => + ui_web.assetManager.getAssetUrl(assetMapBitmap.assetName), + _ => throw UnimplementedError(), + }; + + icon = gmaps.Icon()..url = url; + + switch (bitmapDescriptor.bitmapScaling) { + case MapBitmapScaling.auto: + final Size? size = await _getBitmapSize(bitmapDescriptor, url); + if (size != null) { + _setIconSize(size: size, icon: icon); + } + case MapBitmapScaling.none: + break; + } + + return icon; + } + + // The following code is for the deprecated BitmapDescriptor.fromBytes + // and BitmapDescriptor.fromAssetImage. + final List iconConfig = bitmapDescriptor.toJson() as List; + if (iconConfig[0] == 'fromAssetImage') { + assert(iconConfig.length >= 2); + // iconConfig[2] contains the DPIs of the screen, but that information is + // already encoded in the iconConfig[1] + icon = gmaps.Icon() + ..url = ui_web.assetManager.getAssetUrl(iconConfig[1]! as String); + + final gmaps.Size? size = _gmSizeFromIconConfig(iconConfig, 3); if (size != null) { - _setIconSize(size: size, icon: icon); + icon + ..size = size + ..scaledSize = size; } } else if (iconConfig[0] == 'fromBytes') { // Grab the bytes, and put them into a blob @@ -483,12 +603,13 @@ Future _gmIconFromBitmapDescriptor( // See https://github.com/dart-lang/web/issues/180 blob = Blob([(bytes as Uint8List).toJS].toJS); - icon = document.createElement('img') - ..setAttribute('src', URL.createObjectURL(blob as JSObject)); + icon = gmaps.Icon()..url = URL.createObjectURL(blob as JSObject); - final Size? size = _gmSizeFromIconConfig(iconConfig, 2); + final gmaps.Size? size = _gmSizeFromIconConfig(iconConfig, 2); if (size != null) { - _setIconSize(size: size, icon: icon); + icon + ..size = size + ..scaledSize = size; } } return icon; @@ -506,14 +627,17 @@ Future _markerOptionsFromMarker( ..collisionBehavior = _markerCollisionBehaviorToGmCollisionBehavior( marker.collisionBehavior, ) - ..content = await _gmIconFromBitmapDescriptor(marker.icon) + ..content = await _advancedMarkerIconFromBitmapDescriptor( + marker.icon, + opacity: marker.alpha, + isVisible: marker.visible, + ) ..position = gmaps.LatLng( marker.position.latitude, marker.position.longitude, ) ..title = sanitizeHtml(marker.infoWindow.title ?? '') ..zIndex = marker.zIndex; - // FIXME alpha and visibility return options as O; } else { final gmaps.MarkerOptions options = gmaps.MarkerOptions() From 01ee12de579e66373bd5c8f22554e1ef0aa08cc8 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:12:23 +0300 Subject: [PATCH 010/130] Change example pages to use AdvancedMarkers --- .../example/lib/advanced_markers.dart | 193 ------------------ .../example/lib/clustering.dart | 21 +- .../example/lib/legacy_markers.dart | 99 +++++++++ .../google_maps_flutter/example/lib/main.dart | 8 +- .../example/lib/marker_icons.dart | 13 +- .../example/lib/place_marker.dart | 90 ++++++-- .../lib/src/marker.dart | 5 +- 7 files changed, 203 insertions(+), 226 deletions(-) delete mode 100644 packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers.dart create mode 100644 packages/google_maps_flutter/google_maps_flutter/example/lib/legacy_markers.dart diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers.dart deleted file mode 100644 index 8225ed6b4ed..00000000000 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers.dart +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:flutter/material.dart'; -import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; - -import 'page.dart'; - -/// Map Id is required to use advanced markers -const String? _cloudMapId = null; - -/// Page demonstrating advanced markers styling and behavior -class AdvancedMarkersPage extends GoogleMapExampleAppPage { - /// Default constructor - const AdvancedMarkersPage({Key? key}) - : super(const Icon(Icons.place_outlined), 'Advanced Markers', key: key); - - @override - Widget build(BuildContext context) { - return const _AdvancedMarkersBody(); - } -} - -class _AdvancedMarkersBody extends StatefulWidget { - const _AdvancedMarkersBody(); - - @override - State<_AdvancedMarkersBody> createState() => _AdvancedMarkersBodyState(); -} - -class _AdvancedMarkersBodyState extends State<_AdvancedMarkersBody> { - static const LatLng marker1Location = LatLng(-33.86711, 151.1947171); - static const LatLng marker2Location = LatLng(-32.9283, 151.7817); - static const LatLng marker3Location = LatLng(-34.4248, 150.8931); - static const LatLng marker4Location = LatLng(-32.9289, 150.3610); - - static const LatLng initialMapLocation = LatLng(-33.852, 151.211); - static const double initialZoomLevel = 7.0; - static const double collisionZoomLevel = 4.0; - - /// Whether map supports advanced markers. Null indicates capability check - /// is in progress - bool? _isAdvancedMarkersAvailable; - - GoogleMapController? controller; - final Map markers = {}; - - @override - Widget build(BuildContext context) { - // Check if map is capable of showing advanced markers - if (controller != null) { - GoogleMapsFlutterPlatform.instance - .isAdvancedMarkersAvailable(mapId: controller!.mapId) - .then((bool result) { - setState(() { - _isAdvancedMarkersAvailable = result; - }); - }); - } - - return Padding( - padding: const EdgeInsets.all(16), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Padding( - padding: const EdgeInsets.all(16), - child: Text( - switch (_isAdvancedMarkersAvailable) { - null => 'Checking map capabilities…', - true => - 'Map capabilities check result:\nthis map supports advanced markers', - false => - "Map capabilities check result:\nthis map don't support advanced markers. Please check that map Id is provided and correct map renderer is used", - }, - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.bodyLarge?.copyWith( - color: _isAdvancedMarkersAvailable == false - ? Colors.red - : null, - ), - ), - ), - Expanded( - child: GoogleMap( - // ignore: avoid_redundant_argument_values - cloudMapId: _cloudMapId, - initialCameraPosition: const CameraPosition( - target: initialMapLocation, - zoom: initialZoomLevel, - ), - onMapCreated: _onMapCreated, - markers: markers.values.toSet(), - ), - ), - TextButton( - onPressed: markers.isEmpty ? _addMarkers : null, - child: const Text('Add markers'), - ), - TextButton( - onPressed: markers.isEmpty ? null : _zoomOut, - child: const Text('Zoom out (show required markers)'), - ), - TextButton( - onPressed: markers.isEmpty ? null : _zoomIn, - child: const Text('Zoom in (show all markers)'), - ), - ], - ), - ); - } - - void _onMapCreated(GoogleMapController controller) { - setState(() { - this.controller = controller; - }); - } - - void _zoomOut() { - controller?.animateCamera( - CameraUpdate.newLatLngZoom( - initialMapLocation, - collisionZoomLevel, - ), - ); - } - - void _zoomIn() { - controller?.animateCamera( - CameraUpdate.newLatLngZoom( - initialMapLocation, - initialZoomLevel, - ), - ); - } - - Future _addMarkers() async { - final AdvancedMarker defaultMarker = AdvancedMarker( - markerId: const MarkerId('default'), - position: marker1Location, - collisionBehavior: MarkerCollisionBehavior.optionalAndHidesLowerPriority, - icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueRed), - ); - - final AdvancedMarker colorMarker = AdvancedMarker( - markerId: const MarkerId('custom'), - position: marker2Location, - collisionBehavior: MarkerCollisionBehavior.optionalAndHidesLowerPriority, - icon: BitmapDescriptor.pinConfig( - backgroundColor: Colors.white, - borderColor: Colors.blue, - glyph: Glyph.color(Colors.blue), - ), - ); - - final AdvancedMarker textMarker = AdvancedMarker( - markerId: const MarkerId('text'), - position: marker3Location, - collisionBehavior: MarkerCollisionBehavior.requiredAndHidesOptional, - icon: BitmapDescriptor.pinConfig( - backgroundColor: Colors.yellow, - borderColor: Colors.red, - glyph: Glyph.text('Hey', textColor: Colors.red), - ), - ); - - final AdvancedMarker bitmapGlyphMarker = AdvancedMarker( - markerId: const MarkerId('bitmapGlyph'), - position: marker4Location, - collisionBehavior: MarkerCollisionBehavior.optionalAndHidesLowerPriority, - icon: BitmapDescriptor.pinConfig( - backgroundColor: Colors.grey, - borderColor: Colors.grey, - glyph: Glyph.bitmap( - await BitmapDescriptor.asset( - const ImageConfiguration(size: Size(12, 12)), - 'assets/red_square.png', - ), - ), - ), - ); - - setState(() { - markers[defaultMarker.markerId] = defaultMarker; - markers[colorMarker.markerId] = colorMarker; - markers[textMarker.markerId] = textMarker; - markers[bitmapGlyphMarker.markerId] = bitmapGlyphMarker; - }); - } -} diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart index 5c06a61b2a1..54f33ecd51b 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart @@ -6,7 +6,9 @@ import 'dart:math'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; +import 'main.dart'; import 'page.dart'; /// Page for demonstrating marker clustering support. @@ -64,7 +66,7 @@ class ClusteringBodyState extends State { {}; /// Map of markers with identifier as the key. - Map markers = {}; + Map markers = {}; /// Id of the currently selected marker. MarkerId? selectedMarker; @@ -90,17 +92,17 @@ class ClusteringBodyState extends State { } void _onMarkerTapped(MarkerId markerId) { - final Marker? tappedMarker = markers[markerId]; + final AdvancedMarker? tappedMarker = markers[markerId]; if (tappedMarker != null) { setState(() { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { - final Marker resetOld = markers[previousMarkerId]! + final AdvancedMarker resetOld = markers[previousMarkerId]! .copyWith(iconParam: BitmapDescriptor.defaultMarker); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = tappedMarker.copyWith( + final AdvancedMarker newMarker = tappedMarker.copyWith( iconParam: BitmapDescriptor.defaultMarkerWithHue( BitmapDescriptor.hueGreen, ), @@ -159,7 +161,7 @@ class ClusteringBodyState extends State { final double clusterManagerLongitudeOffset = clusterManagerIndex * _clusterManagerLongitudeOffset; - final Marker marker = Marker( + final AdvancedMarker marker = AdvancedMarker( clusterManagerId: clusterManager.clusterManagerId, markerId: markerId, position: LatLng( @@ -168,6 +170,11 @@ class ClusteringBodyState extends State { ), infoWindow: InfoWindow(title: markerIdVal, snippet: '*'), onTap: () => _onMarkerTapped(markerId), + icon: BitmapDescriptor.pinConfig( + backgroundColor: Colors.white, + borderColor: Colors.blue, + glyph: Glyph.color(Colors.blue), + ), ); markers[markerId] = marker; } @@ -188,7 +195,7 @@ class ClusteringBodyState extends State { void _changeMarkersAlpha() { for (final MarkerId markerId in markers.keys) { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; final double current = marker.alpha; markers[markerId] = marker.copyWith( alphaParam: current == _fullyVisibleAlpha @@ -208,6 +215,8 @@ class ClusteringBodyState extends State { SizedBox( height: 300.0, child: GoogleMap( + // ignore: avoid_redundant_argument_values + cloudMapId: cloudMapId, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.25), diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/legacy_markers.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/legacy_markers.dart new file mode 100644 index 00000000000..9b6271ff3da --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/legacy_markers.dart @@ -0,0 +1,99 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; + +import 'page.dart'; + +/// Page demonstrating how to use legacy [Marker] class +class LegacyMarkersPage extends GoogleMapExampleAppPage { + /// Default constructor + const LegacyMarkersPage({Key? key}) + : super(const Icon(Icons.place_outlined), 'Legacy Markers', key: key); + + @override + Widget build(BuildContext context) { + return const _LegacyMarkersBody(); + } +} + +class _LegacyMarkersBody extends StatefulWidget { + const _LegacyMarkersBody(); + + @override + State<_LegacyMarkersBody> createState() => _LegacyMarkersBodyState(); +} + +class _LegacyMarkersBodyState extends State<_LegacyMarkersBody> { + static const LatLng marker1Location = LatLng(-33.86711, 151.1947171); + static const LatLng marker2Location = LatLng(-32.9283, 151.7817); + static const LatLng marker3Location = LatLng(-32.9289, 150.3610); + + static const LatLng initialMapLocation = LatLng(-33.852, 151.211); + static const double initialZoomLevel = 7.0; + + final Map markers = {}; + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(16), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Expanded( + child: GoogleMap( + initialCameraPosition: const CameraPosition( + target: initialMapLocation, + zoom: initialZoomLevel, + ), + markers: markers.values.toSet(), + ), + ), + TextButton( + onPressed: markers.isEmpty ? _addMarkers : null, + child: const Text('Add markers'), + ), + ], + ), + ); + } + + Future _addMarkers() async { + // Create default red-pin marker + const Marker defaultMarker = Marker( + markerId: MarkerId('default'), + position: marker1Location, + infoWindow: InfoWindow(title: 'Default marker'), + ); + + // Create a colored pin marker + final Marker colorMarker = Marker( + markerId: const MarkerId('custom-hue'), + position: marker2Location, + icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueCyan), + infoWindow: const InfoWindow(title: 'Hue marker'), + ); + + // Create a transparent bitmap marker + final Marker bitmapGlyphMarker = Marker( + markerId: const MarkerId('asset'), + position: marker3Location, + alpha: 0.75, + icon: await BitmapDescriptor.asset( + const ImageConfiguration(size: Size(42, 42)), + 'assets/red_square.png', + ), + infoWindow: const InfoWindow(title: 'Bitmap marker'), + ); + + setState(() { + markers[defaultMarker.markerId] = defaultMarker; + markers[colorMarker.markerId] = colorMarker; + markers[bitmapGlyphMarker.markerId] = bitmapGlyphMarker; + }); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart index cf28b06674f..d340c4e7a7b 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart @@ -8,11 +8,11 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_android/google_maps_flutter_android.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; -import 'advanced_markers.dart'; import 'animate_camera.dart'; import 'clustering.dart'; import 'ground_overlay.dart'; import 'heatmap.dart'; +import 'legacy_markers.dart'; import 'lite_mode.dart'; import 'map_click.dart'; import 'map_coordinates.dart'; @@ -30,6 +30,10 @@ import 'scrolling_map.dart'; import 'snapshot.dart'; import 'tile_overlay.dart'; +/// Map Id is required for some examples to use advanced markers +// ignore: unreachable_from_main +const String? cloudMapId = null; + final List _allPages = [ const MapUiPage(), const MapCoordinatesPage(), @@ -38,7 +42,7 @@ final List _allPages = [ const MoveCameraPage(), const PlaceMarkerPage(), const MarkerIconsPage(), - const AdvancedMarkersPage(), + const LegacyMarkersPage(), const ScrollingMapPage(), const PlacePolylinePage(), const PlacePolygonPage(), diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart index d2010b65b13..6d0242d8276 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart @@ -10,6 +10,7 @@ import 'dart:async'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; import 'custom_marker_icon.dart'; import 'page.dart'; @@ -44,7 +45,7 @@ enum _MarkerSizeOption { class MarkerIconsBodyState extends State { final Size _markerAssetImageSize = const Size(48, 48); _MarkerSizeOption _currentSizeOption = _MarkerSizeOption.original; - Set _markers = {}; + Set _markers = {}; bool _scalingEnabled = true; bool _mipMapsEnabled = true; GoogleMapController? controller; @@ -205,22 +206,22 @@ class MarkerIconsBodyState extends State { _updateMarkers(); } - Marker _createAssetMarker(int index) { + AdvancedMarker _createAssetMarker(int index) { final LatLng position = LatLng(_kMapCenter.latitude - (index * 0.5), _kMapCenter.longitude - 1); - return Marker( + return AdvancedMarker( markerId: MarkerId('marker_asset_$index'), position: position, icon: _markerIconAsset!, ); } - Marker _createBytesMarker(int index) { + AdvancedMarker _createBytesMarker(int index) { final LatLng position = LatLng(_kMapCenter.latitude - (index * 0.5), _kMapCenter.longitude + 1); - return Marker( + return AdvancedMarker( markerId: MarkerId('marker_bytes_$index'), position: position, icon: _markerIconBytes!, @@ -228,7 +229,7 @@ class MarkerIconsBodyState extends State { } void _updateMarkers() { - final Set markers = {}; + final Set markers = {}; for (int i = 0; i < _markersAmountPerType; i++) { if (_markerIconAsset != null) { markers.add(_createAssetMarker(i)); diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart index 1534f3b64ba..403ac61f4df 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart @@ -10,8 +10,10 @@ import 'dart:typed_data'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; import 'custom_marker_icon.dart'; +import 'main.dart'; import 'page.dart'; class PlaceMarkerPage extends GoogleMapExampleAppPage { @@ -38,14 +40,20 @@ class PlaceMarkerBodyState extends State { static const LatLng center = LatLng(-33.86711, 151.1947171); GoogleMapController? controller; - Map markers = {}; + Map markers = {}; MarkerId? selectedMarker; int _markerIdCounter = 1; LatLng? markerPosition; + /// Whether map supports advanced markers. Null indicates capability check + /// is in progress + bool? _isAdvancedMarkersAvailable; + // ignore: use_setters_to_change_properties void _onMapCreated(GoogleMapController controller) { - this.controller = controller; + setState(() { + this.controller = controller; + }); } @override @@ -54,17 +62,17 @@ class PlaceMarkerBodyState extends State { } void _onMarkerTapped(MarkerId markerId) { - final Marker? tappedMarker = markers[markerId]; + final AdvancedMarker? tappedMarker = markers[markerId]; if (tappedMarker != null) { setState(() { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { - final Marker resetOld = markers[previousMarkerId]! + final AdvancedMarker resetOld = markers[previousMarkerId]! .copyWith(iconParam: BitmapDescriptor.defaultMarker); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = tappedMarker.copyWith( + final AdvancedMarker newMarker = tappedMarker.copyWith( iconParam: BitmapDescriptor.defaultMarkerWithHue( BitmapDescriptor.hueGreen, ), @@ -111,7 +119,7 @@ class PlaceMarkerBodyState extends State { } } - void _add() { + Future _add() async { final int markerCount = markers.length; if (markerCount == 12) { @@ -122,7 +130,9 @@ class PlaceMarkerBodyState extends State { _markerIdCounter++; final MarkerId markerId = MarkerId(markerIdVal); - final Marker marker = Marker( + final Color markerColor = + _markerIdCounter.isEven ? Colors.green : Colors.red; + final AdvancedMarker marker = AdvancedMarker( markerId: markerId, position: LatLng( center.latitude + sin(_markerIdCounter * pi / 6.0) / 20.0, @@ -132,6 +142,19 @@ class PlaceMarkerBodyState extends State { onTap: () => _onMarkerTapped(markerId), onDragEnd: (LatLng position) => _onMarkerDragEnd(markerId, position), onDrag: (LatLng position) => _onMarkerDrag(markerId, position), + // Hide some markers when they collide with others + collisionBehavior: _markerIdCounter.isEven + ? MarkerCollisionBehavior.required + : MarkerCollisionBehavior.optionalAndHidesLowerPriority, + alpha: _markerIdCounter.isEven ? 1.0 : 0.7, + icon: BitmapDescriptor.pinConfig( + backgroundColor: markerColor, + borderColor: Colors.white, + glyph: Glyph.text( + _markerIdCounter.isEven ? 'A' : 'B', + textColor: Colors.white, + ), + ), ); setState(() { @@ -148,7 +171,7 @@ class PlaceMarkerBodyState extends State { } void _changePosition(MarkerId markerId) { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; final LatLng current = marker.position; final Offset offset = Offset( center.latitude - current.latitude, @@ -165,7 +188,7 @@ class PlaceMarkerBodyState extends State { } void _changeAnchor(MarkerId markerId) { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; final Offset currentAnchor = marker.anchor; final Offset newAnchor = Offset(1.0 - currentAnchor.dy, currentAnchor.dx); setState(() { @@ -176,7 +199,7 @@ class PlaceMarkerBodyState extends State { } Future _changeInfoAnchor(MarkerId markerId) async { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; final Offset currentAnchor = marker.infoWindow.anchor; final Offset newAnchor = Offset(1.0 - currentAnchor.dy, currentAnchor.dx); setState(() { @@ -189,7 +212,7 @@ class PlaceMarkerBodyState extends State { } Future _toggleDraggable(MarkerId markerId) async { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; setState(() { markers[markerId] = marker.copyWith( draggableParam: !marker.draggable, @@ -198,7 +221,7 @@ class PlaceMarkerBodyState extends State { } Future _toggleFlat(MarkerId markerId) async { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; setState(() { markers[markerId] = marker.copyWith( flatParam: !marker.flat, @@ -207,7 +230,7 @@ class PlaceMarkerBodyState extends State { } Future _changeInfo(MarkerId markerId) async { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; final String newSnippet = '${marker.infoWindow.snippet!}*'; setState(() { markers[markerId] = marker.copyWith( @@ -219,7 +242,7 @@ class PlaceMarkerBodyState extends State { } Future _changeAlpha(MarkerId markerId) async { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; final double current = marker.alpha; setState(() { markers[markerId] = marker.copyWith( @@ -229,7 +252,7 @@ class PlaceMarkerBodyState extends State { } Future _changeRotation(MarkerId markerId) async { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; final double current = marker.rotation; setState(() { markers[markerId] = marker.copyWith( @@ -239,7 +262,7 @@ class PlaceMarkerBodyState extends State { } Future _toggleVisible(MarkerId markerId) async { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; setState(() { markers[markerId] = marker.copyWith( visibleParam: !marker.visible, @@ -248,7 +271,7 @@ class PlaceMarkerBodyState extends State { } Future _changeZIndex(MarkerId markerId) async { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; final double current = marker.zIndex; setState(() { markers[markerId] = marker.copyWith( @@ -258,7 +281,7 @@ class PlaceMarkerBodyState extends State { } void _setMarkerIcon(MarkerId markerId, BitmapDescriptor assetIcon) { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; setState(() { markers[markerId] = marker.copyWith( iconParam: assetIcon, @@ -274,14 +297,45 @@ class PlaceMarkerBodyState extends State { @override Widget build(BuildContext context) { + // Check if map is capable of showing advanced markers + if (controller != null) { + GoogleMapsFlutterPlatform.instance + .isAdvancedMarkersAvailable(mapId: controller!.mapId) + .then((bool result) { + setState(() { + _isAdvancedMarkersAvailable = result; + }); + }); + } + final MarkerId? selectedId = selectedMarker; return Stack(children: [ Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ + Padding( + padding: const EdgeInsets.all(16), + child: Text( + switch (_isAdvancedMarkersAvailable) { + null => 'Checking map capabilities…', + true => + 'Map capabilities check result:\nthis map supports advanced markers', + false => + "Map capabilities check result:\nthis map don't support advanced markers. Please check that map Id is provided and correct map renderer is used", + }, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.bodyLarge?.copyWith( + color: _isAdvancedMarkersAvailable == false + ? Colors.red + : null, + ), + ), + ), Expanded( child: GoogleMap( + // ignore: avoid_redundant_argument_values + cloudMapId: cloudMapId, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.211), diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart index 06ba49ca552..0f228de46a2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart @@ -107,7 +107,10 @@ class MarkerController { _doOnMarkerType( marker: marker, legacy: (gmaps.Marker marker) => marker.map = null, - advanced: (gmaps.AdvancedMarkerElement marker) => marker.map = null, + advanced: (gmaps.AdvancedMarkerElement marker) { + marker.remove(); + marker.map = null; + }, ); _marker = null; From 7ebbbf1854826572cb35417a8ba5c433b8102603 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:52:42 +0300 Subject: [PATCH 011/130] Deprecate cloudMapId and use mapId instead --- .../example/lib/clustering.dart | 2 +- .../google_maps_flutter/example/lib/main.dart | 4 ++-- .../example/lib/map_map_id.dart | 2 +- .../example/lib/place_marker.dart | 2 +- .../google_maps_flutter/lib/src/google_map.dart | 12 ++++++++++-- .../integration_test/google_maps_tests.dart | 2 +- .../example/lib/example_google_map.dart | 6 +++--- .../lib/src/google_maps_flutter_android.dart | 4 ++-- .../lib/src/types/map_configuration.dart | 14 +++++++------- .../utils/map_configuration_serialization.dart | 2 +- .../test/types/map_configuration_test.dart | 8 ++++---- .../map_configuration_serialization_test.dart | 2 +- .../google_maps_flutter_web/lib/src/convert.dart | 2 +- 13 files changed, 35 insertions(+), 27 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart index 54f33ecd51b..e6914163a4c 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart @@ -216,7 +216,7 @@ class ClusteringBodyState extends State { height: 300.0, child: GoogleMap( // ignore: avoid_redundant_argument_values - cloudMapId: cloudMapId, + mapId: mapId, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.25), diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart index d340c4e7a7b..7114ad41b6a 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart @@ -31,8 +31,8 @@ import 'snapshot.dart'; import 'tile_overlay.dart'; /// Map Id is required for some examples to use advanced markers -// ignore: unreachable_from_main -const String? cloudMapId = null; +// ignore: unnecessary_nullable_for_final_variable_declarations, unreachable_from_main +const String? mapId = null; final List _allPages = [ const MapUiPage(), diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/map_map_id.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/map_map_id.dart index 6b90d777da0..bddb7cf3bb4 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/map_map_id.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/map_map_id.dart @@ -80,7 +80,7 @@ class MapIdBodyState extends State { zoom: 7.0, ), key: _key, - cloudMapId: _mapId); + mapId: _mapId); final List columnChildren = [ Padding( diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart index 403ac61f4df..f8c218f2076 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart @@ -335,7 +335,7 @@ class PlaceMarkerBodyState extends State { Expanded( child: GoogleMap( // ignore: avoid_redundant_argument_values - cloudMapId: cloudMapId, + mapId: mapId, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.211), diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index 76bcad6e26c..ea20b0a9c4a 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -127,7 +127,8 @@ class GoogleMap extends StatefulWidget { this.onCameraIdle, this.onTap, this.onLongPress, - this.cloudMapId, + this.mapId, + @Deprecated('cloudMapId is deprecated. Use mapId instead') this.cloudMapId, }); /// Callback method for when the map is ready to be used. @@ -353,6 +354,13 @@ class GoogleMap extends StatefulWidget { /// /// See https://developers.google.com/maps/documentation/get-map-id /// for more details. + final String? mapId; + + /// Identifier that's associated with a specific cloud-based map style. + /// + /// See https://developers.google.com/maps/documentation/get-map-id + /// for more details. + @Deprecated('cloudMapId is deprecated. Use mapId instead') final String? cloudMapId; /// Creates a [State] for this [GoogleMap]. @@ -672,7 +680,7 @@ MapConfiguration _configurationFromMapWidget(GoogleMap map) { indoorViewEnabled: map.indoorViewEnabled, trafficEnabled: map.trafficEnabled, buildingsEnabled: map.buildingsEnabled, - cloudMapId: map.cloudMapId, + mapId: map.mapId ?? map.cloudMapId, // A null style in the widget means no style, which is expressed as '' in // the configuration to distinguish from no change (null). style: map.style ?? '', diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart index 952c381df53..2576affbce0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart @@ -1294,7 +1294,7 @@ void googleMapsTests() { onMapCreated: (ExampleGoogleMapController controller) { mapIdCompleter.complete(controller.mapId); }, - cloudMapId: _kCloudMapId, + mapId: _kCloudMapId, ), ), ); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart index e712208421c..1cbc764d7db 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart @@ -266,7 +266,7 @@ class ExampleGoogleMap extends StatefulWidget { this.onCameraIdle, this.onTap, this.onLongPress, - this.cloudMapId, + this.mapId, this.style, }); @@ -380,7 +380,7 @@ class ExampleGoogleMap extends StatefulWidget { /// /// See https://developers.google.com/maps/documentation/get-map-id /// for more details. - final String? cloudMapId; + final String? mapId; /// The locally configured style for the map. final String? style; @@ -604,7 +604,7 @@ MapConfiguration _configurationFromMapWidget(ExampleGoogleMap map) { indoorViewEnabled: map.indoorViewEnabled, trafficEnabled: map.trafficEnabled, buildingsEnabled: map.buildingsEnabled, - cloudMapId: map.cloudMapId, + mapId: map.mapId, style: map.style, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index c79c475a0f0..e63391f9d79 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -1277,7 +1277,7 @@ PlatformMapConfiguration _platformMapConfigurationFromMapConfiguration( trafficEnabled: config.trafficEnabled, buildingsEnabled: config.buildingsEnabled, liteModeEnabled: config.liteModeEnabled, - cloudMapId: config.cloudMapId, + mapId: config.mapId, style: config.style, ); } @@ -1318,7 +1318,7 @@ PlatformMapConfiguration _platformMapConfigurationFromOptionsJson( trafficEnabled: options['trafficEnabled'] as bool?, buildingsEnabled: options['buildingsEnabled'] as bool?, liteModeEnabled: options['liteModeEnabled'] as bool?, - cloudMapId: options['cloudMapId'] as String?, + mapId: options['mapId'] as String?, style: options['style'] as String?, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart index 6abd6c641e8..bf9e3bcafdc 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart @@ -35,7 +35,7 @@ class MapConfiguration { this.indoorViewEnabled, this.trafficEnabled, this.buildingsEnabled, - this.cloudMapId, + this.mapId, this.style, }); @@ -112,7 +112,7 @@ class MapConfiguration { /// /// See https://developers.google.com/maps/documentation/get-map-id /// for more details. - final String? cloudMapId; + final String? mapId; /// Locally configured JSON style. /// @@ -179,7 +179,7 @@ class MapConfiguration { trafficEnabled != other.trafficEnabled ? trafficEnabled : null, buildingsEnabled: buildingsEnabled != other.buildingsEnabled ? buildingsEnabled : null, - cloudMapId: cloudMapId != other.cloudMapId ? cloudMapId : null, + mapId: mapId != other.mapId ? mapId : null, style: style != other.style ? style : null, ); } @@ -212,7 +212,7 @@ class MapConfiguration { indoorViewEnabled: diff.indoorViewEnabled ?? indoorViewEnabled, trafficEnabled: diff.trafficEnabled ?? trafficEnabled, buildingsEnabled: diff.buildingsEnabled ?? buildingsEnabled, - cloudMapId: diff.cloudMapId ?? cloudMapId, + mapId: diff.mapId ?? mapId, style: diff.style ?? style, ); } @@ -239,7 +239,7 @@ class MapConfiguration { indoorViewEnabled == null && trafficEnabled == null && buildingsEnabled == null && - cloudMapId == null && + mapId == null && style == null; @override @@ -271,7 +271,7 @@ class MapConfiguration { indoorViewEnabled == other.indoorViewEnabled && trafficEnabled == other.trafficEnabled && buildingsEnabled == other.buildingsEnabled && - cloudMapId == other.cloudMapId && + mapId == other.mapId && style == other.style; } @@ -297,7 +297,7 @@ class MapConfiguration { indoorViewEnabled, trafficEnabled, buildingsEnabled, - cloudMapId, + mapId, style, ]); } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart index 43b25fa642d..8367facce8e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart @@ -58,7 +58,7 @@ Map jsonForMapConfiguration(MapConfiguration config) { if (config.trafficEnabled != null) 'trafficEnabled': config.trafficEnabled!, if (config.buildingsEnabled != null) 'buildingsEnabled': config.buildingsEnabled!, - if (config.cloudMapId != null) 'cloudMapId': config.cloudMapId!, + if (config.mapId != null) 'mapId': config.mapId!, if (config.style != null) 'style': config.style!, }; } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart index e34f32676e0..ffbca045638 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart @@ -58,7 +58,7 @@ void main() { expect(updated.liteModeEnabled, isNot(null)); expect(updated.padding, isNot(null)); expect(updated.trafficEnabled, isNot(null)); - expect(updated.cloudMapId, null); + expect(updated.mapId, null); }); test('handle webGestureHandling', () async { @@ -395,7 +395,7 @@ void main() { }); test('handle cloudMapId', () async { - const MapConfiguration diff = MapConfiguration(cloudMapId: _kCloudMapId); + const MapConfiguration diff = MapConfiguration(mapId: _kCloudMapId); const MapConfiguration empty = MapConfiguration(); final MapConfiguration updated = diffBase.applyDiff(diff); @@ -405,7 +405,7 @@ void main() { // The diff from empty options should be the diff itself. expect(diff.diffFrom(empty), diff); // A diff applied to non-empty options should update that field. - expect(updated.cloudMapId, _kCloudMapId); + expect(updated.mapId, _kCloudMapId); // The hash code should change. expect(empty.hashCode, isNot(diff.hashCode)); }); @@ -555,7 +555,7 @@ void main() { }); test('is false with cloudMapId', () async { - const MapConfiguration diff = MapConfiguration(cloudMapId: _kCloudMapId); + const MapConfiguration diff = MapConfiguration(mapId: _kCloudMapId); expect(diff.isEmpty, false); }); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart index 80618356c1c..bacd2376200 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart @@ -39,7 +39,7 @@ void main() { indoorViewEnabled: false, trafficEnabled: false, buildingsEnabled: false, - cloudMapId: _kCloudMapId); + mapId: _kCloudMapId); final Map json = jsonForMapConfiguration(config); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index 3a658d51d80..c763cf1e81a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -101,7 +101,7 @@ gmaps.MapOptions _configurationAndStyleToGmapsOptions( // See updateMapConfiguration for why this is not using configuration.style. options.styles = styles; - options.mapId = configuration.cloudMapId; + options.mapId = configuration.mapId; return options; } From d9476bca98cc0a1dc709e58037e924a4731a8264 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:46:34 +0300 Subject: [PATCH 012/130] Fix marker update --- .../example/lib/place_marker.dart | 29 ++++++++-------- .../lib/src/marker.dart | 33 ++++++++++--------- .../lib/src/markers.dart | 5 ++- 3 files changed, 34 insertions(+), 33 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart index f8c218f2076..7adab5cf594 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart @@ -68,14 +68,12 @@ class PlaceMarkerBodyState extends State { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { final AdvancedMarker resetOld = markers[previousMarkerId]! - .copyWith(iconParam: BitmapDescriptor.defaultMarker); + .copyWith(iconParam: _getDefaultMarkerIcon(isSelected: false)); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; final AdvancedMarker newMarker = tappedMarker.copyWith( - iconParam: BitmapDescriptor.defaultMarkerWithHue( - BitmapDescriptor.hueGreen, - ), + iconParam: _getDefaultMarkerIcon(isSelected: true), ); markers[markerId] = newMarker; @@ -130,8 +128,6 @@ class PlaceMarkerBodyState extends State { _markerIdCounter++; final MarkerId markerId = MarkerId(markerIdVal); - final Color markerColor = - _markerIdCounter.isEven ? Colors.green : Colors.red; final AdvancedMarker marker = AdvancedMarker( markerId: markerId, position: LatLng( @@ -146,15 +142,7 @@ class PlaceMarkerBodyState extends State { collisionBehavior: _markerIdCounter.isEven ? MarkerCollisionBehavior.required : MarkerCollisionBehavior.optionalAndHidesLowerPriority, - alpha: _markerIdCounter.isEven ? 1.0 : 0.7, - icon: BitmapDescriptor.pinConfig( - backgroundColor: markerColor, - borderColor: Colors.white, - glyph: Glyph.text( - _markerIdCounter.isEven ? 'A' : 'B', - textColor: Colors.white, - ), - ), + icon: _getDefaultMarkerIcon(isSelected: false), ); setState(() { @@ -295,6 +283,17 @@ class PlaceMarkerBodyState extends State { return BytesMapBitmap(bytes.buffer.asUint8List()); } + BitmapDescriptor _getDefaultMarkerIcon({required bool isSelected}) { + return BitmapDescriptor.pinConfig( + backgroundColor: isSelected ? Colors.blue : Colors.green, + borderColor: Colors.white, + glyph: Glyph.text( + 'Hey', + textColor: Colors.white, + ), + ); + } + @override Widget build(BuildContext context) { // Check if map is capable of showing advanced markers diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart index 0f228de46a2..6c59e289a48 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart @@ -78,21 +78,24 @@ class MarkerController { }) { assert(_marker != null, 'Cannot `update` Marker after calling `remove`.'); - if (O is gmaps.MarkerOptions) { - (_marker! as gmaps.Marker).options = options as gmaps.MarkerOptions; - } else if (O is gmaps.AdvancedMarkerElementOptions) { - options as gmaps.AdvancedMarkerElementOptions; - final gmaps.AdvancedMarkerElement marker = - _marker! as gmaps.AdvancedMarkerElement; - marker.collisionBehavior = options.collisionBehavior; - marker.content = options.content; - marker.gmpClickable = options.gmpClickable; - marker.gmpDraggable = options.gmpDraggable; - marker.map = options.map; - marker.position = options.position; - marker.title = options.title ?? ''; - marker.zIndex = options.zIndex; - } + _doOnMarkerType( + marker: _marker, + legacy: (gmaps.Marker marker) { + marker.options = options as gmaps.MarkerOptions; + }, + advanced: (gmaps.AdvancedMarkerElement marker) { + options as gmaps.AdvancedMarkerElementOptions; + final gmaps.AdvancedMarkerElement marker = + _marker! as gmaps.AdvancedMarkerElement; + marker.collisionBehavior = options.collisionBehavior; + marker.content = options.content; + marker.gmpClickable = options.gmpClickable; + marker.gmpDraggable = options.gmpDraggable; + marker.position = options.position; + marker.title = options.title ?? ''; + marker.zIndex = options.zIndex; + }, + ); if (_infoWindow != null && newInfoWindowContent != null) { _infoWindow.content = newInfoWindowContent; diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart index d2c9ee9b479..eaac1ffdbe5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart @@ -137,15 +137,14 @@ class MarkersController extends GeometryController { _removeMarker(marker.markerId); await _addMarker(marker); } else { - final gmaps.AdvancedMarkerElementOptions markerOptions = - await _markerOptionsFromMarker( + final O markerOptions = await _markerOptionsFromMarker( marker, markerController.marker, ); final gmaps.InfoWindowOptions? infoWindow = _infoWindowOptionsFromMarker(marker); markerController.update( - markerOptions as O, + markerOptions, newInfoWindowContent: infoWindow?.content as HTMLElement?, ); } From 9760db8a894dae42fcaec6f92859436cff75a7f2 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:53:36 +0300 Subject: [PATCH 013/130] Fix draggable flag --- .../google_maps_flutter_web/lib/src/convert.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index c763cf1e81a..bdb9d05e32d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -637,7 +637,8 @@ Future _markerOptionsFromMarker( marker.position.longitude, ) ..title = sanitizeHtml(marker.infoWindow.title ?? '') - ..zIndex = marker.zIndex; + ..zIndex = marker.zIndex + ..gmpDraggable = marker.draggable; return options as O; } else { final gmaps.MarkerOptions options = gmaps.MarkerOptions() From f184b0480465e32515879d8a77605c874a97610b Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 1 Oct 2024 10:37:36 +0300 Subject: [PATCH 014/130] Fix cloudMapId deprecation on iOS --- .../maps_example_dart/lib/example_google_map.dart | 12 ++++++++++-- .../ios/Classes/GoogleMapController.m | 6 +++--- .../lib/src/google_maps_flutter_ios.dart | 4 ++-- .../google_maps_flutter_ios/lib/src/messages.g.dart | 8 ++++---- .../google_maps_flutter_ios/pigeons/messages.dart | 4 ++-- .../test/google_maps_flutter_ios_test.dart | 5 ++--- 6 files changed, 23 insertions(+), 16 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart index 351e1c117c4..fcd9ef7e34e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart @@ -264,7 +264,8 @@ class ExampleGoogleMap extends StatefulWidget { this.onCameraIdle, this.onTap, this.onLongPress, - this.cloudMapId, + this.mapId, + @Deprecated('cloudMapId is deprecated. Use mapId instead') this.cloudMapId, this.style, }); @@ -372,6 +373,13 @@ class ExampleGoogleMap extends StatefulWidget { /// /// See https://developers.google.com/maps/documentation/get-map-id /// for more details. + final String? mapId; + + /// Identifier that's associated with a specific cloud-based map style. + /// + /// See https://developers.google.com/maps/documentation/get-map-id + /// for more details. + @Deprecated('cloudMapId is deprecated. Use mapId instead') final String? cloudMapId; /// The locally configured style for the map. @@ -594,7 +602,7 @@ MapConfiguration _configurationFromMapWidget(ExampleGoogleMap map) { indoorViewEnabled: map.indoorViewEnabled, trafficEnabled: map.trafficEnabled, buildingsEnabled: map.buildingsEnabled, - cloudMapId: map.cloudMapId, + mapId: map.mapId ?? map.cloudMapId, style: map.style, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m index 6844a67fb9b..52412464127 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m @@ -135,9 +135,9 @@ - (instancetype)initWithFrame:(CGRect)frame GMSMapViewOptions *options = [[GMSMapViewOptions alloc] init]; options.frame = frame; options.camera = camera; - NSString *cloudMapId = creationParameters.mapConfiguration.cloudMapId; - if (cloudMapId) { - options.mapID = [GMSMapID mapIDWithIdentifier:cloudMapId]; + NSString *mapId = creationParameters.mapConfiguration.mapId; + if (mapId) { + options.mapID = [GMSMapID mapIDWithIdentifier:mapId]; } GMSMapView *mapView = [[GMSMapView alloc] initWithOptions:options]; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index ab76471fc19..7cb38ed9664 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -1124,7 +1124,7 @@ PlatformMapConfiguration _platformMapConfigurationFromMapConfiguration( indoorViewEnabled: config.indoorViewEnabled, trafficEnabled: config.trafficEnabled, buildingsEnabled: config.buildingsEnabled, - cloudMapId: config.cloudMapId, + mapId: config.mapId, style: config.style, ); } @@ -1162,7 +1162,7 @@ PlatformMapConfiguration _platformMapConfigurationFromOptionsJson( indoorViewEnabled: options['indoorEnabled'] as bool?, trafficEnabled: options['trafficEnabled'] as bool?, buildingsEnabled: options['buildingsEnabled'] as bool?, - cloudMapId: options['cloudMapId'] as String?, + mapId: options['mapId'] as String?, style: options['style'] as String?, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart index c7b67e500c9..56309970411 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart @@ -1095,7 +1095,7 @@ class PlatformMapConfiguration { this.indoorViewEnabled, this.trafficEnabled, this.buildingsEnabled, - this.cloudMapId, + this.mapId, this.style, }); @@ -1129,7 +1129,7 @@ class PlatformMapConfiguration { bool? buildingsEnabled; - String? cloudMapId; + String? mapId; String? style; @@ -1150,7 +1150,7 @@ class PlatformMapConfiguration { indoorViewEnabled, trafficEnabled, buildingsEnabled, - cloudMapId, + mapId, style, ]; } @@ -1173,7 +1173,7 @@ class PlatformMapConfiguration { indoorViewEnabled: result[12] as bool?, trafficEnabled: result[13] as bool?, buildingsEnabled: result[14] as bool?, - cloudMapId: result[15] as String?, + mapId: result[15] as String?, style: result[16] as String?, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index dcbe6691bd1..fbf2908211b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -431,7 +431,7 @@ class PlatformMapConfiguration { required this.indoorViewEnabled, required this.trafficEnabled, required this.buildingsEnabled, - required this.cloudMapId, + required this.mapId, required this.style, }); @@ -450,7 +450,7 @@ class PlatformMapConfiguration { final bool? indoorViewEnabled; final bool? trafficEnabled; final bool? buildingsEnabled; - final String? cloudMapId; + final String? mapId; final String? style; } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart index ba920814a7e..f037d141bce 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart @@ -1169,8 +1169,7 @@ void main() { MapsApi.pigeonChannelCodec.decodeMessage(byteData) as PlatformMapViewCreationParams?; if (creationParams != null) { - final String? passedMapId = - creationParams.mapConfiguration.cloudMapId; + final String? passedMapId = creationParams.mapConfiguration.mapId; if (passedMapId != null) { passedCloudMapIdCompleter.complete(passedMapId); } @@ -1190,7 +1189,7 @@ void main() { initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr), - mapConfiguration: const MapConfiguration(cloudMapId: cloudMapId)))); + mapConfiguration: const MapConfiguration(mapId: cloudMapId)))); expect( await passedCloudMapIdCompleter.future, From 509c87c98b38bc99849a4334c637cd4c79207f2f Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 1 Oct 2024 10:57:17 +0300 Subject: [PATCH 015/130] Fix cloudMapId deprecation on Android --- .../example/lib/map_map_id.dart | 2 +- .../google_maps_flutter_android/lib/src/messages.g.dart | 8 ++++---- .../google_maps_flutter_android/pigeons/messages.dart | 4 ++-- .../test/google_maps_flutter_android_test.dart | 5 ++--- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/map_map_id.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/map_map_id.dart index 73224a4527b..6054257ed65 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/map_map_id.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/map_map_id.dart @@ -79,7 +79,7 @@ class MapIdBodyState extends State { zoom: 7.0, ), key: _key, - cloudMapId: _mapId, + mapId: _mapId, ); final List columnChildren = [ diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart index d77cb4b83ea..ba3189b0a08 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart @@ -1192,7 +1192,7 @@ class PlatformMapConfiguration { this.trafficEnabled, this.buildingsEnabled, this.liteModeEnabled, - this.cloudMapId, + this.mapId, this.style, }); @@ -1232,7 +1232,7 @@ class PlatformMapConfiguration { bool? liteModeEnabled; - String? cloudMapId; + String? mapId; String? style; @@ -1256,7 +1256,7 @@ class PlatformMapConfiguration { trafficEnabled, buildingsEnabled, liteModeEnabled, - cloudMapId, + mapId, style, ]; } @@ -1282,7 +1282,7 @@ class PlatformMapConfiguration { trafficEnabled: result[15] as bool?, buildingsEnabled: result[16] as bool?, liteModeEnabled: result[17] as bool?, - cloudMapId: result[18] as String?, + mapId: result[18] as String?, style: result[19] as String?, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart index fb55f1192d0..eb010b7219d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart @@ -484,7 +484,7 @@ class PlatformMapConfiguration { required this.trafficEnabled, required this.buildingsEnabled, required this.liteModeEnabled, - required this.cloudMapId, + required this.mapId, required this.style, }); @@ -506,7 +506,7 @@ class PlatformMapConfiguration { final bool? trafficEnabled; final bool? buildingsEnabled; final bool? liteModeEnabled; - final String? cloudMapId; + final String? mapId; final String? style; } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart index 210be3c3e01..28c7d7bc354 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart @@ -1248,8 +1248,7 @@ void main() { MapsApi.pigeonChannelCodec.decodeMessage(byteData) as PlatformMapViewCreationParams?; if (creationParams != null) { - final String? passedMapId = - creationParams.mapConfiguration.cloudMapId; + final String? passedMapId = creationParams.mapConfiguration.mapId; if (passedMapId != null) { passedCloudMapIdCompleter.complete(passedMapId); } @@ -1267,7 +1266,7 @@ void main() { initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr), - mapConfiguration: const MapConfiguration(cloudMapId: cloudMapId))); + mapConfiguration: const MapConfiguration(mapId: cloudMapId))); expect( await passedCloudMapIdCompleter.future, From a82416cbe8bc61fb147b76dfe8abb03436a8f8d9 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:43:10 +0300 Subject: [PATCH 016/130] Convert Android example to use Advanced Markers --- .../example/lib/clustering.dart | 19 ++-- .../example/lib/legacy_markers.dart | 104 ++++++++++++++++++ .../example/lib/main.dart | 4 + .../example/lib/marker_icons.dart | 12 +- .../example/lib/place_marker.dart | 34 +++--- .../example/lib/scrolling_map.dart | 4 +- 6 files changed, 144 insertions(+), 33 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/example/lib/legacy_markers.dart diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart index 1cd95118eb1..302a2d9e170 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart @@ -8,6 +8,7 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; import 'example_google_map.dart'; +import 'main.dart'; import 'page.dart'; /// Page for demonstrating marker clustering support. @@ -71,7 +72,7 @@ class ClusteringBodyState extends State { {}; /// Map of markers with identifier as the key. - Map markers = {}; + Map markers = {}; /// Id of the currently selected marker. MarkerId? selectedMarker; @@ -96,17 +97,17 @@ class ClusteringBodyState extends State { } void _onMarkerTapped(MarkerId markerId) { - final Marker? tappedMarker = markers[markerId]; + final AdvancedMarker? tappedMarker = markers[markerId]; if (tappedMarker != null) { setState(() { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { - final Marker resetOld = markers[previousMarkerId]! + final AdvancedMarker resetOld = markers[previousMarkerId]! .copyWith(iconParam: BitmapDescriptor.defaultMarker); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = tappedMarker.copyWith( + final AdvancedMarker newMarker = tappedMarker.copyWith( iconParam: BitmapDescriptor.defaultMarkerWithHue( BitmapDescriptor.hueGreen, ), @@ -143,7 +144,7 @@ class ClusteringBodyState extends State { void _removeClusterManager(ClusterManager clusterManager) { setState(() { // Remove markers managed by cluster manager to be removed. - markers.removeWhere((MarkerId key, Marker marker) => + markers.removeWhere((MarkerId key, AdvancedMarker marker) => marker.clusterManagerId == clusterManager.clusterManagerId); // Remove cluster manager. clusterManagers.remove(clusterManager.clusterManagerId); @@ -165,7 +166,7 @@ class ClusteringBodyState extends State { final double clusterManagerLongitudeOffset = clusterManagerIndex * _clusterManagerLongitudeOffset; - final Marker marker = Marker( + final AdvancedMarker marker = AdvancedMarker( clusterManagerId: clusterManager.clusterManagerId, markerId: markerId, position: LatLng( @@ -194,7 +195,7 @@ class ClusteringBodyState extends State { void _changeMarkersAlpha() { for (final MarkerId markerId in markers.keys) { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; final double current = marker.alpha; markers[markerId] = marker.copyWith( alphaParam: current == _fullyVisibleAlpha @@ -214,9 +215,11 @@ class ClusteringBodyState extends State { children: [ Expanded( child: ExampleGoogleMap( + // ignore: avoid_redundant_argument_values + mapId: mapId, onMapCreated: _onMapCreated, initialCameraPosition: initialCameraPosition, - markers: Set.of(markers.values), + markers: Set.of(markers.values), clusterManagers: Set.of(clusterManagers.values), ), ), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/legacy_markers.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/legacy_markers.dart new file mode 100644 index 00000000000..af6531c6f41 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/legacy_markers.dart @@ -0,0 +1,104 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +import 'example_google_map.dart'; +import 'page.dart'; + +/// Page demonstrating how to use legacy [Marker] class +class LegacyMarkersPage extends GoogleMapExampleAppPage { + /// Default constructor + const LegacyMarkersPage({Key? key}) + : super(const Icon(Icons.place_outlined), 'Legacy Markers', key: key); + + @override + Widget build(BuildContext context) { + return const _LegacyMarkersBody(); + } +} + +class _LegacyMarkersBody extends StatefulWidget { + const _LegacyMarkersBody(); + + @override + State<_LegacyMarkersBody> createState() => _LegacyMarkersBodyState(); +} + +class _LegacyMarkersBodyState extends State<_LegacyMarkersBody> { + static const LatLng marker1Location = LatLng(-33.86711, 151.1947171); + static const LatLng marker2Location = LatLng(-32.9283, 151.7817); + static const LatLng marker3Location = LatLng(-32.9289, 150.3610); + + static const LatLng initialMapLocation = LatLng(-33.852, 151.211); + static const double initialZoomLevel = 7.0; + + final Map markers = {}; + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(16), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Expanded( + child: ExampleGoogleMap( + // Explicitly set mapId to null, legacy markers work fine + // without mapId + // ignore: avoid_redundant_argument_values + mapId: null, + initialCameraPosition: const CameraPosition( + target: initialMapLocation, + zoom: initialZoomLevel, + ), + markers: markers.values.toSet(), + ), + ), + TextButton( + onPressed: markers.isEmpty ? _addMarkers : null, + child: const Text('Add markers'), + ), + ], + ), + ); + } + + Future _addMarkers() async { + // Create default red-pin marker + const Marker defaultMarker = Marker( + markerId: MarkerId('default'), + position: marker1Location, + infoWindow: InfoWindow(title: 'Default marker'), + ); + + // Create a colored pin marker + final Marker colorMarker = Marker( + markerId: const MarkerId('custom-hue'), + position: marker2Location, + icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueCyan), + infoWindow: const InfoWindow(title: 'Hue marker'), + ); + + // Create a transparent bitmap marker + final Marker bitmapGlyphMarker = Marker( + markerId: const MarkerId('asset'), + position: marker3Location, + alpha: 0.75, + icon: await BitmapDescriptor.asset( + const ImageConfiguration(size: Size(42, 42)), + 'assets/red_square.png', + ), + infoWindow: const InfoWindow(title: 'Bitmap marker'), + ); + + setState(() { + markers[defaultMarker.markerId] = defaultMarker; + markers[colorMarker.markerId] = colorMarker; + markers[bitmapGlyphMarker.markerId] = bitmapGlyphMarker; + }); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart index 5261d84beac..e6a4d397e6c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart @@ -28,6 +28,10 @@ import 'scrolling_map.dart'; import 'snapshot.dart'; import 'tile_overlay.dart'; +/// Map Id is required for some examples to use advanced markers +// ignore: unnecessary_nullable_for_final_variable_declarations, unreachable_from_main +const String? mapId = null; + final List _allPages = [ const MapUiPage(), const MapCoordinatesPage(), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart index df4f79205e8..081f0ed1e6e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart @@ -45,7 +45,7 @@ enum _MarkerSizeOption { class MarkerIconsBodyState extends State { final Size _markerAssetImageSize = const Size(48, 48); _MarkerSizeOption _currentSizeOption = _MarkerSizeOption.original; - Set _markers = {}; + Set _markers = {}; bool _scalingEnabled = true; bool _mipMapsEnabled = true; ExampleGoogleMapController? controller; @@ -206,22 +206,22 @@ class MarkerIconsBodyState extends State { _updateMarkers(); } - Marker _createAssetMarker(int index) { + AdvancedMarker _createAssetMarker(int index) { final LatLng position = LatLng(_kMapCenter.latitude - (index * 0.5), _kMapCenter.longitude - 1); - return Marker( + return AdvancedMarker( markerId: MarkerId('marker_asset_$index'), position: position, icon: _markerIconAsset!, ); } - Marker _createBytesMarker(int index) { + AdvancedMarker _createBytesMarker(int index) { final LatLng position = LatLng(_kMapCenter.latitude - (index * 0.5), _kMapCenter.longitude + 1); - return Marker( + return AdvancedMarker( markerId: MarkerId('marker_bytes_$index'), position: position, icon: _markerIconBytes!, @@ -229,7 +229,7 @@ class MarkerIconsBodyState extends State { } void _updateMarkers() { - final Set markers = {}; + final Set markers = {}; for (int i = 0; i < _markersAmountPerType; i++) { if (_markerIconAsset != null) { markers.add(_createAssetMarker(i)); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart index d475787c92f..6975bc69092 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart @@ -39,7 +39,7 @@ class PlaceMarkerBodyState extends State { static const LatLng center = LatLng(-33.86711, 151.1947171); ExampleGoogleMapController? controller; - Map markers = {}; + Map markers = {}; MarkerId? selectedMarker; int _markerIdCounter = 1; LatLng? markerPosition; @@ -55,17 +55,17 @@ class PlaceMarkerBodyState extends State { } void _onMarkerTapped(MarkerId markerId) { - final Marker? tappedMarker = markers[markerId]; + final AdvancedMarker? tappedMarker = markers[markerId]; if (tappedMarker != null) { setState(() { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { - final Marker resetOld = markers[previousMarkerId]! + final AdvancedMarker resetOld = markers[previousMarkerId]! .copyWith(iconParam: BitmapDescriptor.defaultMarker); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = tappedMarker.copyWith( + final AdvancedMarker newMarker = tappedMarker.copyWith( iconParam: BitmapDescriptor.defaultMarkerWithHue( BitmapDescriptor.hueGreen, ), @@ -84,7 +84,7 @@ class PlaceMarkerBodyState extends State { } Future _onMarkerDragEnd(MarkerId markerId, LatLng newPosition) async { - final Marker? tappedMarker = markers[markerId]; + final AdvancedMarker? tappedMarker = markers[markerId]; if (tappedMarker != null) { setState(() { markerPosition = null; @@ -123,7 +123,7 @@ class PlaceMarkerBodyState extends State { _markerIdCounter++; final MarkerId markerId = MarkerId(markerIdVal); - final Marker marker = Marker( + final AdvancedMarker marker = AdvancedMarker( markerId: markerId, position: LatLng( center.latitude + sin(_markerIdCounter * pi / 6.0) / 20.0, @@ -149,7 +149,7 @@ class PlaceMarkerBodyState extends State { } void _changePosition(MarkerId markerId) { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; final LatLng current = marker.position; final Offset offset = Offset( center.latitude - current.latitude, @@ -166,7 +166,7 @@ class PlaceMarkerBodyState extends State { } void _changeAnchor(MarkerId markerId) { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; final Offset currentAnchor = marker.anchor; final Offset newAnchor = Offset(1.0 - currentAnchor.dy, currentAnchor.dx); setState(() { @@ -177,7 +177,7 @@ class PlaceMarkerBodyState extends State { } Future _changeInfoAnchor(MarkerId markerId) async { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; final Offset currentAnchor = marker.infoWindow.anchor; final Offset newAnchor = Offset(1.0 - currentAnchor.dy, currentAnchor.dx); setState(() { @@ -190,7 +190,7 @@ class PlaceMarkerBodyState extends State { } Future _toggleDraggable(MarkerId markerId) async { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; setState(() { markers[markerId] = marker.copyWith( draggableParam: !marker.draggable, @@ -199,7 +199,7 @@ class PlaceMarkerBodyState extends State { } Future _toggleFlat(MarkerId markerId) async { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; setState(() { markers[markerId] = marker.copyWith( flatParam: !marker.flat, @@ -208,7 +208,7 @@ class PlaceMarkerBodyState extends State { } Future _changeInfo(MarkerId markerId) async { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; final String newSnippet = '${marker.infoWindow.snippet!}*'; setState(() { markers[markerId] = marker.copyWith( @@ -220,7 +220,7 @@ class PlaceMarkerBodyState extends State { } Future _changeAlpha(MarkerId markerId) async { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; final double current = marker.alpha; setState(() { markers[markerId] = marker.copyWith( @@ -230,7 +230,7 @@ class PlaceMarkerBodyState extends State { } Future _changeRotation(MarkerId markerId) async { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; final double current = marker.rotation; setState(() { markers[markerId] = marker.copyWith( @@ -240,7 +240,7 @@ class PlaceMarkerBodyState extends State { } Future _toggleVisible(MarkerId markerId) async { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; setState(() { markers[markerId] = marker.copyWith( visibleParam: !marker.visible, @@ -249,7 +249,7 @@ class PlaceMarkerBodyState extends State { } Future _changeZIndex(MarkerId markerId) async { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; final double current = marker.zIndex; setState(() { markers[markerId] = marker.copyWith( @@ -259,7 +259,7 @@ class PlaceMarkerBodyState extends State { } void _setMarkerIcon(MarkerId markerId, BitmapDescriptor assetIcon) { - final Marker marker = markers[markerId]!; + final AdvancedMarker marker = markers[markerId]!; setState(() { markers[markerId] = marker.copyWith( iconParam: assetIcon, diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/scrolling_map.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/scrolling_map.dart index a4901f2ce5f..a3c2efa7cef 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/scrolling_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/scrolling_map.dart @@ -82,8 +82,8 @@ class ScrollingMapBody extends StatelessWidget { target: _center, zoom: 11.0, ), - markers: { - Marker( + markers: { + AdvancedMarker( markerId: const MarkerId('test_marker_id'), position: LatLng( _center.latitude, From 42a5d5504c3e9a968005df496f8361b12604f464 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:53:13 +0300 Subject: [PATCH 017/130] Add missing public member documentation --- .../google_maps_flutter_platform.dart | 1 + .../lib/src/types/bitmap.dart | 12 ++++++++++++ .../lib/src/types/glyph.dart | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart index 385a263869e..5a978309e48 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart @@ -430,6 +430,7 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface { return null; } + /// Returns true if [AdvancedMarker]s can be used with this map Future isAdvancedMarkersAvailable({required int mapId}) async { throw UnimplementedError( 'isAdvancedMarkersAvailable() has not been implemented.', diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart index 125717fd55a..58b85a1a923 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart @@ -333,6 +333,18 @@ abstract class BitmapDescriptor { ); } + /// Creates a [BitmapDescriptor] from a pin configuration. + /// + /// This methods helps customizing default marker pins. Works with + /// [AdvancedMarker]s. + /// + /// [backgroundColor] is the color of the pin's background. + /// [borderColor] is the color of the pin's border. + /// [glyph] is the pin's glyph to be displayed on the pin. + /// + /// See [PinConfig] for more information on the parameters. + /// + /// Returns a new [PinConfig] instance. static BitmapDescriptor pinConfig({ Color? backgroundColor, Color? borderColor, diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart index 9c8d3c0e563..a7ccc5bccf5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart @@ -18,7 +18,7 @@ class Glyph { return Glyph._(bitmapDescriptor: bitmapDescriptor); } - /// Create a glyph with a text + /// Create a glyph with a [text] of the specified [textColor] factory Glyph.text(String text, {Color? textColor}) { return Glyph._( text: text, From 7142a232d3bce09eddf8a13d497e3db9ece9dcf4 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:17:17 +0300 Subject: [PATCH 018/130] Add cloudMapId to make MapConfiguration backward-compatible --- .../plugins/googlemaps/GoogleMapFactory.java | 6 +++--- .../lib/src/google_maps_flutter_android.dart | 2 +- .../lib/src/types/map_configuration.dart | 13 +++++++++++++ .../utils/map_configuration_serialization.dart | 1 + .../utils/map_configuration_serialization_test.dart | 2 +- .../google_maps_controller_test.dart | 4 ++-- .../google_maps_flutter_web/lib/src/convert.dart | 2 +- 7 files changed, 22 insertions(+), 8 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java index c4208f003c6..2f9563f6eb8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java @@ -48,9 +48,9 @@ public PlatformView create(@NonNull Context context, int id, @Nullable Object ar builder.setInitialTileOverlays(params.getInitialTileOverlays()); builder.setInitialGroundOverlays(params.getInitialGroundOverlays()); - final String cloudMapId = mapConfig.getCloudMapId(); - if (cloudMapId != null) { - builder.setMapId(cloudMapId); + final String mapId = mapConfig.getMapId(); + if (mapId != null) { + builder.setMapId(mapId); } return builder.build(id, context, binaryMessenger, lifecycleProvider); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index e63391f9d79..db42cc0d522 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -1277,7 +1277,7 @@ PlatformMapConfiguration _platformMapConfigurationFromMapConfiguration( trafficEnabled: config.trafficEnabled, buildingsEnabled: config.buildingsEnabled, liteModeEnabled: config.liteModeEnabled, - mapId: config.mapId, + mapId: config.mapId ?? config.cloudMapId, style: config.style, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart index bf9e3bcafdc..710b61c6be7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart @@ -36,6 +36,7 @@ class MapConfiguration { this.trafficEnabled, this.buildingsEnabled, this.mapId, + @Deprecated('cloudMapId is deprecated. Use mapId instead') this.cloudMapId, this.style, }); @@ -114,6 +115,13 @@ class MapConfiguration { /// for more details. final String? mapId; + /// Identifier that's associated with a specific cloud-based map style. + /// + /// See https://developers.google.com/maps/documentation/get-map-id + /// for more details. + @Deprecated('cloudMapId is deprecated. Use mapId instead') + final String? cloudMapId; + /// Locally configured JSON style. /// /// To clear a previously set style, set this to an empty string. @@ -180,6 +188,7 @@ class MapConfiguration { buildingsEnabled: buildingsEnabled != other.buildingsEnabled ? buildingsEnabled : null, mapId: mapId != other.mapId ? mapId : null, + cloudMapId: cloudMapId != other.cloudMapId ? cloudMapId : null, style: style != other.style ? style : null, ); } @@ -213,6 +222,7 @@ class MapConfiguration { trafficEnabled: diff.trafficEnabled ?? trafficEnabled, buildingsEnabled: diff.buildingsEnabled ?? buildingsEnabled, mapId: diff.mapId ?? mapId, + cloudMapId: diff.cloudMapId ?? cloudMapId, style: diff.style ?? style, ); } @@ -240,6 +250,7 @@ class MapConfiguration { trafficEnabled == null && buildingsEnabled == null && mapId == null && + cloudMapId == null && style == null; @override @@ -272,6 +283,7 @@ class MapConfiguration { trafficEnabled == other.trafficEnabled && buildingsEnabled == other.buildingsEnabled && mapId == other.mapId && + cloudMapId == other.cloudMapId && style == other.style; } @@ -298,6 +310,7 @@ class MapConfiguration { trafficEnabled, buildingsEnabled, mapId, + cloudMapId, style, ]); } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart index 8367facce8e..3775d34555d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart @@ -59,6 +59,7 @@ Map jsonForMapConfiguration(MapConfiguration config) { if (config.buildingsEnabled != null) 'buildingsEnabled': config.buildingsEnabled!, if (config.mapId != null) 'mapId': config.mapId!, + if (config.cloudMapId != null) 'cloudMapId': config.cloudMapId!, if (config.style != null) 'style': config.style!, }; } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart index bacd2376200..79b16bd476e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart @@ -72,7 +72,7 @@ void main() { 'indoorEnabled': false, 'trafficEnabled': false, 'buildingsEnabled': false, - 'cloudMapId': _kCloudMapId + 'mapId': _kCloudMapId }); }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart index dcf5345ae95..7c4df94601e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart @@ -35,7 +35,7 @@ gmaps.Map mapShim() => throw UnimplementedError(); MockSpec( fallbackGenerators: {#googleMap: mapShim}, ), - MockSpec( + MockSpec>( fallbackGenerators: {#googleMap: mapShim}, ), MockSpec( @@ -434,7 +434,7 @@ void main() { mapConfiguration: const MapConfiguration( mapType: MapType.satellite, zoomControlsEnabled: true, - cloudMapId: _kCloudMapId, + mapId: _kCloudMapId, fortyFiveDegreeImageryEnabled: false, )); controller.debugSetOverrides( diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index bdb9d05e32d..775637b4646 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -101,7 +101,7 @@ gmaps.MapOptions _configurationAndStyleToGmapsOptions( // See updateMapConfiguration for why this is not using configuration.style. options.styles = styles; - options.mapId = configuration.mapId; + options.mapId = configuration.mapId ?? configuration.cloudMapId; return options; } From 1432fec342bcc5323b777ffa32cf7221dd347f90 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:31:16 +0300 Subject: [PATCH 019/130] Add AdvancedMarker tests --- .../lib/src/types/advanced_marker.dart | 66 +++++++ .../lib/src/types/marker.dart | 12 +- .../google_maps_flutter_platform_test.dart | 10 + .../test/types/advanced_marker_test.dart | 181 ++++++++++++++++++ .../map_configuration_serialization_test.dart | 45 +++-- 5 files changed, 288 insertions(+), 26 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/advanced_marker_test.dart diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart index bcd9d74d158..f4ce20f38ff 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart @@ -97,6 +97,72 @@ class AdvancedMarker extends Marker { collisionBehavior: collisionBehaviorParam ?? collisionBehavior, ); } + + /// Converts this object to something serializable in JSON. + @override + Object toJson() { + final Map json = {}; + + void addIfPresent(String fieldName, Object? value) { + if (value != null) { + json[fieldName] = value; + } + } + + addIfPresent('markerId', markerId.value); + addIfPresent('alpha', alpha); + addIfPresent('anchor', offsetToJson(anchor)); + addIfPresent('consumeTapEvents', consumeTapEvents); + addIfPresent('draggable', draggable); + addIfPresent('flat', flat); + addIfPresent('icon', icon.toJson()); + addIfPresent('infoWindow', infoWindow.toJson()); + addIfPresent('position', position.toJson()); + addIfPresent('rotation', rotation); + addIfPresent('visible', visible); + addIfPresent('zIndex', zIndex); + addIfPresent('clusterManagerId', clusterManagerId?.value); + addIfPresent('collisionBehavior', collisionBehavior.index); + return json; + } + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (other.runtimeType != runtimeType) { + return false; + } + return other is AdvancedMarker && + markerId == other.markerId && + alpha == other.alpha && + anchor == other.anchor && + consumeTapEvents == other.consumeTapEvents && + draggable == other.draggable && + flat == other.flat && + icon == other.icon && + infoWindow == other.infoWindow && + position == other.position && + rotation == other.rotation && + visible == other.visible && + zIndex == other.zIndex && + clusterManagerId == other.clusterManagerId && + collisionBehavior == other.collisionBehavior; + } + + @override + int get hashCode => markerId.hashCode; + + @override + String toString() { + return 'Marker{markerId: $markerId, alpha: $alpha, anchor: $anchor, ' + 'consumeTapEvents: $consumeTapEvents, draggable: $draggable, flat: $flat, ' + 'icon: $icon, infoWindow: $infoWindow, position: $position, rotation: $rotation, ' + 'visible: $visible, zIndex: $zIndex, onTap: $onTap, onDragStart: $onDragStart, ' + 'onDrag: $onDrag, onDragEnd: $onDragEnd, clusterManagerId: $clusterManagerId, ' + 'collisionBehavior: $collisionBehavior}'; + } } /// Indicates how the marker behaves when it collides with other markers diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart index 0921d2d4ec5..f04b9f19e27 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart @@ -9,7 +9,8 @@ import 'package:flutter/foundation.dart' import 'types.dart'; -Object _offsetToJson(Offset offset) { +/// Convert [Offset] to JSON object. +Object offsetToJson(Offset offset) { return [offset.dx, offset.dy]; } @@ -64,7 +65,8 @@ class InfoWindow { ); } - Object _toJson() { + /// Convert this object to something serializable in JSON. + Object toJson() { final Map json = {}; void addIfPresent(String fieldName, Object? value) { @@ -75,7 +77,7 @@ class InfoWindow { addIfPresent('title', title); addIfPresent('snippet', snippet); - addIfPresent('anchor', _offsetToJson(anchor)); + addIfPresent('anchor', offsetToJson(anchor)); return json; } @@ -291,12 +293,12 @@ class Marker implements MapsObject { addIfPresent('markerId', markerId.value); addIfPresent('alpha', alpha); - addIfPresent('anchor', _offsetToJson(anchor)); + addIfPresent('anchor', offsetToJson(anchor)); addIfPresent('consumeTapEvents', consumeTapEvents); addIfPresent('draggable', draggable); addIfPresent('flat', flat); addIfPresent('icon', icon.toJson()); - addIfPresent('infoWindow', infoWindow._toJson()); + addIfPresent('infoWindow', infoWindow.toJson()); addIfPresent('position', position.toJson()); addIfPresent('rotation', rotation); addIfPresent('visible', visible); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart index faccbab1d66..a49bec548a7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart @@ -123,6 +123,16 @@ void main() { ); test( + 'default implementation of isAdvancedMarkersAvailable throws Unimplemented Error', + () async { + final GoogleMapsFlutterPlatform platform = + BuildViewGoogleMapsFlutterPlatform(); + expect(() => platform.isAdvancedMarkersAvailable(mapId: 0), + throwsUnimplementedError); + }, + ); + + test( 'default implementation of `animateCameraWithConfiguration` delegates to `animateCamera`', () { final GoogleMapsFlutterPlatform platform = diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/advanced_marker_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/advanced_marker_test.dart new file mode 100644 index 00000000000..4bb1c876a22 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/advanced_marker_test.dart @@ -0,0 +1,181 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +void main() { + TestWidgetsFlutterBinding.ensureInitialized(); + + group('$AdvancedMarker', () { + test('constructor defaults', () { + const AdvancedMarker marker = + AdvancedMarker(markerId: MarkerId('ABC123')); + + expect(marker.alpha, equals(1.0)); + expect(marker.anchor, equals(const Offset(0.5, 1.0))); + expect(marker.consumeTapEvents, equals(false)); + expect(marker.draggable, equals(false)); + expect(marker.flat, equals(false)); + expect(marker.icon, equals(BitmapDescriptor.defaultMarker)); + expect(marker.infoWindow, equals(InfoWindow.noText)); + expect(marker.position, equals(const LatLng(0.0, 0.0))); + expect(marker.rotation, equals(0.0)); + expect(marker.visible, equals(true)); + expect(marker.zIndex, equals(0.0)); + expect(marker.onTap, equals(null)); + expect(marker.onDrag, equals(null)); + expect(marker.onDragStart, equals(null)); + expect(marker.onDragEnd, equals(null)); + expect(marker.collisionBehavior, MarkerCollisionBehavior.required); + }); + + test('constructor alpha is >= 0.0 and <= 1.0', () { + void initWithAlpha(double alpha) { + AdvancedMarker(markerId: const MarkerId('ABC123'), alpha: alpha); + } + + expect(() => initWithAlpha(-0.5), throwsAssertionError); + expect(() => initWithAlpha(0.0), isNot(throwsAssertionError)); + expect(() => initWithAlpha(0.5), isNot(throwsAssertionError)); + expect(() => initWithAlpha(1.0), isNot(throwsAssertionError)); + expect(() => initWithAlpha(100), throwsAssertionError); + }); + + test('toJson', () { + final BitmapDescriptor testDescriptor = + BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueCyan); + final AdvancedMarker marker = AdvancedMarker( + markerId: const MarkerId('ABC123'), + alpha: 0.12345, + anchor: const Offset(100, 100), + consumeTapEvents: true, + draggable: true, + flat: true, + icon: testDescriptor, + infoWindow: const InfoWindow( + title: 'Test title', + snippet: 'Test snippet', + anchor: Offset(100, 200), + ), + position: const LatLng(50, 50), + rotation: 100, + visible: false, + zIndex: 100, + onTap: () {}, + onDragStart: (LatLng latLng) {}, + onDrag: (LatLng latLng) {}, + onDragEnd: (LatLng latLng) {}, + collisionBehavior: MarkerCollisionBehavior.requiredAndHidesOptional, + ); + + final Map json = marker.toJson() as Map; + + expect(json, { + 'markerId': 'ABC123', + 'alpha': 0.12345, + 'anchor': [100, 100], + 'consumeTapEvents': true, + 'draggable': true, + 'flat': true, + 'icon': testDescriptor.toJson(), + 'infoWindow': { + 'title': 'Test title', + 'snippet': 'Test snippet', + 'anchor': [100.0, 200.0], + }, + 'position': [50, 50], + 'rotation': 100.0, + 'visible': false, + 'zIndex': 100.0, + 'collisionBehavior': + MarkerCollisionBehavior.requiredAndHidesOptional.index, + }); + }); + + test('clone', () { + const Marker marker = AdvancedMarker(markerId: MarkerId('ABC123')); + final Marker clone = marker.clone(); + + expect(clone, isA()); + expect(identical(clone, marker), isFalse); + expect(clone, equals(marker)); + }); + + test('copyWith', () { + const MarkerId markerId = MarkerId('ABC123'); + const AdvancedMarker marker = AdvancedMarker(markerId: markerId); + + final BitmapDescriptor testDescriptor = + BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueCyan); + const double testAlphaParam = 0.12345; + const Offset testAnchorParam = Offset(100, 100); + final bool testConsumeTapEventsParam = !marker.consumeTapEvents; + final bool testDraggableParam = !marker.draggable; + final bool testFlatParam = !marker.flat; + final BitmapDescriptor testIconParam = testDescriptor; + const InfoWindow testInfoWindowParam = InfoWindow(title: 'Test'); + const LatLng testPositionParam = LatLng(100, 100); + const double testRotationParam = 100; + final bool testVisibleParam = !marker.visible; + const double testZIndexParam = 100; + const ClusterManagerId testClusterManagerIdParam = + ClusterManagerId('DEF123'); + final List log = []; + const MarkerCollisionBehavior testCollisionBehavior = + MarkerCollisionBehavior.requiredAndHidesOptional; + + final AdvancedMarker copy = marker.copyWith( + alphaParam: testAlphaParam, + anchorParam: testAnchorParam, + consumeTapEventsParam: testConsumeTapEventsParam, + draggableParam: testDraggableParam, + flatParam: testFlatParam, + iconParam: testIconParam, + infoWindowParam: testInfoWindowParam, + positionParam: testPositionParam, + rotationParam: testRotationParam, + visibleParam: testVisibleParam, + zIndexParam: testZIndexParam, + clusterManagerIdParam: testClusterManagerIdParam, + collisionBehaviorParam: testCollisionBehavior, + onTapParam: () { + log.add('onTapParam'); + }, + onDragStartParam: (LatLng latLng) { + log.add('onDragStartParam'); + }, + onDragParam: (LatLng latLng) { + log.add('onDragParam'); + }, + onDragEndParam: (LatLng latLng) { + log.add('onDragEndParam'); + }, + ); + + expect(copy.markerId, equals(markerId)); + expect(copy.alpha, equals(testAlphaParam)); + expect(copy.anchor, equals(testAnchorParam)); + expect(copy.consumeTapEvents, equals(testConsumeTapEventsParam)); + expect(copy.draggable, equals(testDraggableParam)); + expect(copy.flat, equals(testFlatParam)); + expect(copy.icon, equals(testIconParam)); + expect(copy.infoWindow, equals(testInfoWindowParam)); + expect(copy.position, equals(testPositionParam)); + expect(copy.rotation, equals(testRotationParam)); + expect(copy.visible, equals(testVisibleParam)); + expect(copy.zIndex, equals(testZIndexParam)); + expect(copy.clusterManagerId, equals(testClusterManagerIdParam)); + expect(copy.collisionBehavior, equals(testCollisionBehavior)); + + copy.onTap!(); + expect(log, contains('onTapParam')); + + copy.onDragStart!(const LatLng(0, 1)); + expect(log, contains('onDragStartParam')); + + copy.onDrag!(const LatLng(0, 1)); + expect(log, contains('onDragParam')); + + copy.onDragEnd!(const LatLng(0, 1)); + expect(log, contains('onDragEndParam')); + }); + }); +} diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart index 79b16bd476e..c1fab2ff0bd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart @@ -20,26 +20,28 @@ void main() { test('complete serialization', () async { final MapConfiguration config = MapConfiguration( - compassEnabled: false, - mapToolbarEnabled: false, - cameraTargetBounds: CameraTargetBounds(LatLngBounds( - northeast: const LatLng(30, 20), southwest: const LatLng(10, 40))), - mapType: MapType.normal, - minMaxZoomPreference: const MinMaxZoomPreference(1.0, 10.0), - rotateGesturesEnabled: false, - scrollGesturesEnabled: false, - tiltGesturesEnabled: false, - trackCameraPosition: false, - zoomControlsEnabled: false, - zoomGesturesEnabled: false, - liteModeEnabled: false, - myLocationEnabled: false, - myLocationButtonEnabled: false, - padding: const EdgeInsets.all(5.0), - indoorViewEnabled: false, - trafficEnabled: false, - buildingsEnabled: false, - mapId: _kCloudMapId); + compassEnabled: false, + mapToolbarEnabled: false, + cameraTargetBounds: CameraTargetBounds(LatLngBounds( + northeast: const LatLng(30, 20), southwest: const LatLng(10, 40))), + mapType: MapType.normal, + minMaxZoomPreference: const MinMaxZoomPreference(1.0, 10.0), + rotateGesturesEnabled: false, + scrollGesturesEnabled: false, + tiltGesturesEnabled: false, + trackCameraPosition: false, + zoomControlsEnabled: false, + zoomGesturesEnabled: false, + liteModeEnabled: false, + myLocationEnabled: false, + myLocationButtonEnabled: false, + padding: const EdgeInsets.all(5.0), + indoorViewEnabled: false, + trafficEnabled: false, + buildingsEnabled: false, + mapId: _kCloudMapId, + cloudMapId: _kCloudMapId, + ); final Map json = jsonForMapConfiguration(config); @@ -72,7 +74,8 @@ void main() { 'indoorEnabled': false, 'trafficEnabled': false, 'buildingsEnabled': false, - 'mapId': _kCloudMapId + 'mapId': _kCloudMapId, + 'cloudMapId': _kCloudMapId, }); }); } From 57ab8bf8e8e68d1c5ebeff484ef4dce57f7eb370 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:32:10 +0300 Subject: [PATCH 020/130] Fix web integration tests --- .../example/integration_test/marker_test.dart | 29 ++++++++++++------- .../integration_test/markers_test.dart | 9 +++--- .../example/pubspec.yaml | 3 ++ 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_test.dart index 2859d082b78..4764a291a1a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_test.dart @@ -53,7 +53,8 @@ void main() { }); testWidgets('onTap gets called', (WidgetTester tester) async { - MarkerController(marker: marker, onTap: onTap); + MarkerController( + marker: marker, onTap: onTap); // Trigger a click event... gmaps.event.trigger( @@ -67,7 +68,8 @@ void main() { }); testWidgets('onDragStart gets called', (WidgetTester tester) async { - MarkerController(marker: marker, onDragStart: onDragStart); + MarkerController( + marker: marker, onDragStart: onDragStart); // Trigger a drag end event... gmaps.event.trigger( @@ -80,7 +82,8 @@ void main() { }); testWidgets('onDrag gets called', (WidgetTester tester) async { - MarkerController(marker: marker, onDrag: onDrag); + MarkerController( + marker: marker, onDrag: onDrag); // Trigger a drag end event... gmaps.event.trigger( @@ -93,7 +96,8 @@ void main() { }); testWidgets('onDragEnd gets called', (WidgetTester tester) async { - MarkerController(marker: marker, onDragEnd: onDragEnd); + MarkerController( + marker: marker, onDragEnd: onDragEnd); // Trigger a drag end event... gmaps.event.trigger( @@ -106,7 +110,8 @@ void main() { }); testWidgets('update', (WidgetTester tester) async { - final MarkerController controller = MarkerController(marker: marker); + final MarkerController controller = + MarkerController(marker: marker); final gmaps.MarkerOptions options = gmaps.MarkerOptions() ..draggable = true ..position = gmaps.LatLng(42, 54); @@ -122,7 +127,8 @@ void main() { testWidgets('infoWindow null, showInfoWindow.', (WidgetTester tester) async { - final MarkerController controller = MarkerController(marker: marker); + final MarkerController controller = + MarkerController(marker: marker); controller.showInfoWindow(); @@ -133,7 +139,8 @@ void main() { final gmaps.InfoWindow infoWindow = gmaps.InfoWindow(); final gmaps.Map map = gmaps.Map(createDivElement()); marker.set('map', map); - final MarkerController controller = MarkerController( + final MarkerController controller = + MarkerController( marker: marker, infoWindow: infoWindow, ); @@ -148,7 +155,8 @@ void main() { final gmaps.InfoWindow infoWindow = gmaps.InfoWindow(); final gmaps.Map map = gmaps.Map(createDivElement()); marker.set('map', map); - final MarkerController controller = MarkerController( + final MarkerController controller = + MarkerController( marker: marker, infoWindow: infoWindow, ); @@ -160,13 +168,14 @@ void main() { }); group('remove', () { - late MarkerController controller; + late MarkerController controller; setUp(() { final gmaps.InfoWindow infoWindow = gmaps.InfoWindow(); final gmaps.Map map = gmaps.Map(createDivElement()); marker.set('map', map); - controller = MarkerController(marker: marker, infoWindow: infoWindow); + controller = MarkerController( + marker: marker, infoWindow: infoWindow); }); testWidgets('drops gmaps instance', (WidgetTester tester) async { diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/markers_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/markers_test.dart index 45b218f139c..088d912b66d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/markers_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/markers_test.dart @@ -25,15 +25,16 @@ void main() { group('MarkersController', () { late StreamController> events; - late MarkersController controller; - late ClusterManagersController clusterManagersController; + late MarkersController controller; + late ClusterManagersController clusterManagersController; late gmaps.Map map; setUp(() { events = StreamController>(); - clusterManagersController = ClusterManagersController(stream: events); - controller = MarkersController( + clusterManagersController = + ClusterManagersController(stream: events); + controller = MarkersController( stream: events, clusterManagersController: clusterManagersController); map = gmaps.Map(createDivElement()); clusterManagersController.bindToMap(123, map); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml index a8128b5d009..d532297667c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml @@ -42,3 +42,6 @@ dependency_overrides: path: ../../../google_maps_flutter/google_maps_flutter_platform_interface google_maps_flutter_web: path: ../../../google_maps_flutter/google_maps_flutter_web + google_maps_flutter_android: + path: ../../../google_maps_flutter/google_maps_flutter_android + From a026e31dcc384e3d8a3c18b31d057e7b0bcf48af Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 2 Oct 2024 12:49:16 +0300 Subject: [PATCH 021/130] Add actual capability check on web --- .../lib/src/google_maps_controller.dart | 7 +++++++ .../lib/src/google_maps_flutter_web.dart | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index 0cb7819fe68..83e39ea3852 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -593,6 +593,13 @@ class GoogleMapController { return _markersController?.isInfoWindowShown(markerId) ?? false; } + /// Returns true if this map supports [AdvancedMarker]s + bool isAdvancedMarkersAvailable() { + assert(_googleMap != null, 'Cannot get map capabilities of a null map.'); + + return _googleMap!.mapCapabilities.isAdvancedMarkersAvailable ?? false; + } + // Cleanup /// Disposes of this controller and its resources. diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart index ec14564351e..fc173ec913b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart @@ -321,9 +321,8 @@ class GoogleMapsPlugin extends GoogleMapsFlutterPlatform { @override Future isAdvancedMarkersAvailable({required int mapId}) async { - // The web implementation of the plugin always supports advanced markers. - // Legacy markers are deprecated - return true; + final GoogleMapController map = _map(mapId); + return map.isAdvancedMarkersAvailable(); } /// Disposes of the current map. It can't be used afterwards! From 8e7269aeaeae93b379781cde0a079c5ec6ee27ae Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 2 Oct 2024 12:49:38 +0300 Subject: [PATCH 022/130] Add AdvancedMarker test --- .../advanced_marker_test.dart | 241 ++++++++++++++++++ 1 file changed, 241 insertions(+) create mode 100644 packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_marker_test.dart diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_marker_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_marker_test.dart new file mode 100644 index 00000000000..ac62683c35b --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_marker_test.dart @@ -0,0 +1,241 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:async'; +import 'dart:js_interop'; + +import 'package:flutter_test/flutter_test.dart'; +import 'package:google_maps/google_maps.dart' as gmaps; +import 'package:google_maps_flutter_web/google_maps_flutter_web.dart'; +import 'package:google_maps_flutter_web/src/utils.dart'; +import 'package:integration_test/integration_test.dart'; + +/// Test Markers +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + // Since onTap/DragEnd events happen asynchronously, we need to store when the event + // is fired. We use a completer so the test can wait for the future to be completed. + late Completer methodCalledCompleter; + + /// This is the future value of the [methodCalledCompleter]. Reinitialized + /// in the [setUp] method, and completed (as `true`) by [onTap] and [onDragEnd] + /// when those methods are called from the MarkerController. + late Future methodCalled; + + void onTap() { + methodCalledCompleter.complete(true); + } + + void onDragStart(gmaps.LatLng _) { + methodCalledCompleter.complete(true); + } + + void onDrag(gmaps.LatLng _) { + methodCalledCompleter.complete(true); + } + + void onDragEnd(gmaps.LatLng _) { + methodCalledCompleter.complete(true); + } + + setUp(() { + methodCalledCompleter = Completer(); + methodCalled = methodCalledCompleter.future; + }); + + group('MarkerController', () { + late gmaps.AdvancedMarkerElement marker; + + setUp(() { + marker = gmaps.AdvancedMarkerElement(); + }); + + testWidgets('onTap gets called', (WidgetTester tester) async { + MarkerController(marker: marker, onTap: onTap); + + // Trigger a click event... + gmaps.event.trigger( + marker, + 'click', + gmaps.MapMouseEvent(), + ); + + // The event handling is now truly async. Wait for it... + expect(await methodCalled, isTrue); + }); + + testWidgets('onDragStart gets called', (WidgetTester tester) async { + MarkerController( + marker: marker, onDragStart: onDragStart); + + // Trigger a drag end event... + gmaps.event.trigger( + marker, + 'dragstart', + gmaps.MapMouseEvent()..latLng = gmaps.LatLng(0, 0), + ); + + expect(await methodCalled, isTrue); + }); + + testWidgets('onDrag gets called', (WidgetTester tester) async { + MarkerController(marker: marker, onDrag: onDrag); + + // Trigger a drag end event... + gmaps.event.trigger( + marker, + 'drag', + gmaps.MapMouseEvent()..latLng = gmaps.LatLng(0, 0), + ); + + expect(await methodCalled, isTrue); + }); + + testWidgets('onDragEnd gets called', (WidgetTester tester) async { + MarkerController( + marker: marker, onDragEnd: onDragEnd); + + // Trigger a drag end event... + gmaps.event.trigger( + marker, + 'dragend', + gmaps.MapMouseEvent()..latLng = gmaps.LatLng(0, 0), + ); + + expect(await methodCalled, isTrue); + }); + + testWidgets('update', (WidgetTester tester) async { + final MarkerController controller = + MarkerController(marker: marker); + final gmaps.AdvancedMarkerElementOptions options = + gmaps.AdvancedMarkerElementOptions() + ..collisionBehavior = + gmaps.CollisionBehavior.OPTIONAL_AND_HIDES_LOWER_PRIORITY + ..gmpDraggable = true + ..position = gmaps.LatLng(42, 54); + + expect(marker.collisionBehavior, gmaps.CollisionBehavior.REQUIRED); + expect(marker.gmpDraggable, isFalse); + + controller.update(options); + + expect(marker.gmpDraggable, isTrue); + expect( + marker.collisionBehavior, + gmaps.CollisionBehavior.OPTIONAL_AND_HIDES_LOWER_PRIORITY, + ); + final JSAny? position = marker.position; + expect(position, isNotNull); + expect(position is gmaps.LatLngLiteral, isTrue); + expect((position! as gmaps.LatLngLiteral).lat, equals(42)); + expect((position as gmaps.LatLngLiteral).lng, equals(54)); + }); + + testWidgets('infoWindow null, showInfoWindow.', + (WidgetTester tester) async { + final MarkerController controller = + MarkerController(marker: marker); + + controller.showInfoWindow(); + + expect(controller.infoWindowShown, isFalse); + }); + + testWidgets('showInfoWindow', (WidgetTester tester) async { + final gmaps.InfoWindow infoWindow = gmaps.InfoWindow(); + final gmaps.Map map = gmaps.Map(createDivElement()); + marker.map = map; + final MarkerController controller = + MarkerController( + marker: marker, + infoWindow: infoWindow, + ); + + controller.showInfoWindow(); + + expect(infoWindow.get('map'), map); + expect(controller.infoWindowShown, isTrue); + }); + + testWidgets('hideInfoWindow', (WidgetTester tester) async { + final gmaps.InfoWindow infoWindow = gmaps.InfoWindow(); + final gmaps.Map map = gmaps.Map(createDivElement()); + marker.map = map; + final MarkerController controller = + MarkerController( + marker: marker, + infoWindow: infoWindow, + ); + + controller.hideInfoWindow(); + + expect(infoWindow.get('map'), isNull); + expect(controller.infoWindowShown, isFalse); + }); + + group('remove', () { + late MarkerController controller; + + setUp(() { + final gmaps.InfoWindow infoWindow = gmaps.InfoWindow(); + final gmaps.Map map = gmaps.Map(createDivElement()); + marker.map = map; + controller = MarkerController( + marker: marker, infoWindow: infoWindow); + }); + + testWidgets('drops gmaps instance', (WidgetTester tester) async { + controller.remove(); + + expect(controller.marker, isNull); + }); + + testWidgets('cannot call update after remove', + (WidgetTester tester) async { + final gmaps.AdvancedMarkerElementOptions options = + gmaps.AdvancedMarkerElementOptions()..gmpDraggable = true; + + controller.remove(); + + expect(() { + controller.update(options); + }, throwsAssertionError); + }); + + testWidgets('cannot call showInfoWindow after remove', + (WidgetTester tester) async { + controller.remove(); + + expect(() { + controller.showInfoWindow(); + }, throwsAssertionError); + }); + + testWidgets('cannot call hideInfoWindow after remove', + (WidgetTester tester) async { + controller.remove(); + + expect(() { + controller.hideInfoWindow(); + }, throwsAssertionError); + }); + }); + }); +} From 16c790f1c39db5fc487ab123431d18ccc65c721a Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 3 Oct 2024 09:43:53 +0300 Subject: [PATCH 023/130] Add marker type to MapWidgetConfiguration --- .../src/types/map_widget_configuration.dart | 17 +++++ .../lib/src/google_maps_controller.dart | 63 ++++++++++++------- 2 files changed, 59 insertions(+), 21 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart index 029af990166..86419e6a8ca 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart @@ -19,6 +19,7 @@ class MapWidgetConfiguration { required this.initialCameraPosition, required this.textDirection, this.gestureRecognizers = const >{}, + this.markerType = MarkerType.legacy, }); /// The initial camera position to display. @@ -29,4 +30,20 @@ class MapWidgetConfiguration { /// Gesture recognizers to add to the widget. final Set> gestureRecognizers; + + /// The type of marker that map should use. + /// + /// Advanced and legacy markers could be handled differently by platform + /// implementations. This property indicates which type of marker should be + /// used. + final MarkerType markerType; +} + +/// Indicates the type of marker that map should use +enum MarkerType { + /// Represents the default marker type, [Marker] + legacy, + + /// Represents the advanced marker type, [AdvancedMarker] + advanced, } diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index 83e39ea3852..4c02bbd4c59 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -38,33 +38,54 @@ class GoogleMapController { _heatmapsController = HeatmapsController(); _polygonsController = PolygonsController(stream: _streamController); _polylinesController = PolylinesController(stream: _streamController); - _clusterManagersController = _markers is Set - ? ClusterManagersController( - stream: _streamController) - : ClusterManagersController(stream: _streamController); // Check if all markers are of the same type. Mixing marker types is not // allowed - final int markerType = - _markers.map((Marker e) => e.runtimeType).toSet().length; - if (markerType > 1) { - throw ArgumentError( - 'All markers must be of the same type (e.g. AdvancedMarker or Marker).', - ); + final Set markerTypes = + _markers.map((Marker e) => e.runtimeType).toSet(); + if (markerTypes.isNotEmpty) { + assert(markerTypes.length == 1, 'All markers must be of the same type.'); + + switch (widgetConfiguration.markerType) { + case MarkerType.legacy: + assert( + markerTypes.first is Marker, + 'All markers must be of type Marker because ' + 'widgetConfiguration.markerType is MarkerType.legacy', + ); + case MarkerType.advanced: + assert( + markerTypes.first is AdvancedMarker, + 'All markers must be of type AdvancedMarker because ' + 'widgetConfiguration.markerType is MarkerType.advanced', + ); + } } - _markersController = _markers is Set - ? MarkersController + ClusterManagersController(stream: _streamController), + MarkerType.advanced => + ClusterManagersController( + stream: _streamController), + }; + + _markersController = switch (widgetConfiguration.markerType) { + MarkerType.legacy => MarkersController( + stream: _streamController, + clusterManagersController: _clusterManagersController! + as ClusterManagersController, + ), + MarkerType.advanced => MarkersController( - stream: _streamController, - clusterManagersController: _clusterManagersController! - as ClusterManagersController, - ) - : MarkersController( - stream: _streamController, - clusterManagersController: _clusterManagersController! - as ClusterManagersController, - ); + stream: _streamController, + clusterManagersController: _clusterManagersController! + as ClusterManagersController, + ), + }; + _tileOverlaysController = TileOverlaysController(); _groundOverlaysController = GroundOverlaysController(stream: _streamController); From d1e19188d2887e7261314391d3eaa28c411b6326 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 3 Oct 2024 16:37:44 +0300 Subject: [PATCH 024/130] Use legacy markers for all examples. Add separate Advanced Marker examples --- .../example/lib/advanced_marker_icons.dart | 42 ++++++ .../lib/advanced_markers_clustering.dart | 71 +++++++++ .../example/lib/clustering.dart | 68 ++++++--- .../example/lib/legacy_markers.dart | 99 ------------ .../google_maps_flutter/example/lib/main.dart | 10 +- .../example/lib/marker_icons.dart | 44 ++++-- .../example/lib/place_advanced_marker.dart | 65 ++++++++ .../example/lib/place_marker.dart | 141 ++++++++---------- .../lib/src/google_map.dart | 5 + 9 files changed, 326 insertions(+), 219 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart create mode 100644 packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart delete mode 100644 packages/google_maps_flutter/google_maps_flutter/example/lib/legacy_markers.dart create mode 100644 packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart new file mode 100644 index 00000000000..2d504ca2e7c --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart @@ -0,0 +1,42 @@ +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +import 'main.dart' as main; +import 'marker_icons.dart'; +import 'page.dart'; + +/// Page that demonstrates how to use custom [AdvanceMarker] icons +class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { + /// Default constructor + const AdvancedMarkerIconsPage({Key? key}) + : super( + key: key, + const Icon(Icons.image_outlined), + 'Advanced marker icons', + ); + + @override + Widget build(BuildContext context) { + return const _AdvancedMarkerIconsBody(); + } +} + +class _AdvancedMarkerIconsBody extends MarkerIconsBody { + const _AdvancedMarkerIconsBody(); + + @override + String? get mapId => main.mapId; + + @override + Marker createMarker( + MarkerId markerId, + LatLng position, + BitmapDescriptor icon, + ) { + return AdvancedMarker( + markerId: markerId, + position: position, + icon: icon, + ); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart new file mode 100644 index 00000000000..3e08b006e34 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart @@ -0,0 +1,71 @@ +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +import 'clustering.dart'; +import 'main.dart' as main; +import 'page.dart'; + +/// Page for demonstrating advanced marker clustering support. +/// Same as [ClusteringPage] but works with [AdvancedMarker]. +class AdvancedMarkersClustering extends GoogleMapExampleAppPage { + /// Default constructor. + const AdvancedMarkersClustering({Key? key}) + : super( + key: key, + const Icon(Icons.place_outlined), + 'Manage clusters of advanced markers', + ); + + @override + Widget build(BuildContext context) { + return const _AdvancedMarkerClusteringBody(); + } +} + +/// Same as [ClusteringBody] but works with [AdvancedMarker]. +class _AdvancedMarkerClusteringBody extends ClusteringBody { + const _AdvancedMarkerClusteringBody(); + + @override + String? get mapId => main.mapId; + + @override + Marker createMarker( + MarkerId markerId, + ClusterManagerId clusterManagerId, + LatLng position, + InfoWindow infoWindow, + VoidCallback onTap, + ) { + return AdvancedMarker( + markerId: markerId, + clusterManagerId: clusterManagerId, + position: position, + infoWindow: infoWindow, + onTap: onTap, + icon: BitmapDescriptor.pinConfig( + backgroundColor: Colors.white, + borderColor: Colors.blue, + glyph: Glyph.color(Colors.blue), + ), + ); + } + + @override + Marker getSelectedMarker(Marker marker, bool isSelected) { + assert(marker is AdvancedMarker); + return (marker as AdvancedMarker).copyWith( + iconParam: isSelected + ? BitmapDescriptor.pinConfig( + backgroundColor: Colors.blue, + borderColor: Colors.white, + glyph: Glyph.color(Colors.white), + ) + : BitmapDescriptor.pinConfig( + backgroundColor: Colors.white, + borderColor: Colors.blue, + glyph: Glyph.color(Colors.blue), + ), + ); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart index e6914163a4c..45162c5ace3 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart @@ -8,7 +8,6 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; -import 'main.dart'; import 'page.dart'; /// Page for demonstrating marker clustering support. @@ -30,6 +29,35 @@ class ClusteringBody extends StatefulWidget { @override State createState() => ClusteringBodyState(); + + /// Create a marker that is later added to a cluster + Marker createMarker( + MarkerId markerId, + ClusterManagerId clusterManagerId, + LatLng position, + InfoWindow infoWindow, + VoidCallback onTap, + ) { + return Marker( + markerId: markerId, + clusterManagerId: clusterManagerId, + position: position, + infoWindow: infoWindow, + onTap: onTap, + ); + } + + /// Return selected or unselected state of the given [marker] + Marker getSelectedMarker(Marker marker, bool isSelected) { + return marker.copyWith( + iconParam: isSelected + ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) + : BitmapDescriptor.defaultMarker, + ); + } + + /// Return the mapId to use for the GoogleMap + String? get mapId => null; } /// State of the clustering page. @@ -66,7 +94,7 @@ class ClusteringBodyState extends State { {}; /// Map of markers with identifier as the key. - Map markers = {}; + Map markers = {}; /// Id of the currently selected marker. MarkerId? selectedMarker; @@ -92,21 +120,17 @@ class ClusteringBodyState extends State { } void _onMarkerTapped(MarkerId markerId) { - final AdvancedMarker? tappedMarker = markers[markerId]; + final Marker? tappedMarker = markers[markerId]; if (tappedMarker != null) { setState(() { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { - final AdvancedMarker resetOld = markers[previousMarkerId]! - .copyWith(iconParam: BitmapDescriptor.defaultMarker); + final Marker resetOld = + widget.getSelectedMarker(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final AdvancedMarker newMarker = tappedMarker.copyWith( - iconParam: BitmapDescriptor.defaultMarkerWithHue( - BitmapDescriptor.hueGreen, - ), - ); + final Marker newMarker = widget.getSelectedMarker(tappedMarker, true); markers[markerId] = newMarker; }); } @@ -161,20 +185,15 @@ class ClusteringBodyState extends State { final double clusterManagerLongitudeOffset = clusterManagerIndex * _clusterManagerLongitudeOffset; - final AdvancedMarker marker = AdvancedMarker( - clusterManagerId: clusterManager.clusterManagerId, - markerId: markerId, - position: LatLng( + final Marker marker = widget.createMarker( + markerId, + clusterManager.clusterManagerId, + LatLng( center.latitude + _getRandomOffset(), center.longitude + _getRandomOffset() + clusterManagerLongitudeOffset, ), - infoWindow: InfoWindow(title: markerIdVal, snippet: '*'), - onTap: () => _onMarkerTapped(markerId), - icon: BitmapDescriptor.pinConfig( - backgroundColor: Colors.white, - borderColor: Colors.blue, - glyph: Glyph.color(Colors.blue), - ), + InfoWindow(title: markerIdVal, snippet: '*'), + () => _onMarkerTapped(markerId), ); markers[markerId] = marker; } @@ -195,7 +214,7 @@ class ClusteringBodyState extends State { void _changeMarkersAlpha() { for (final MarkerId markerId in markers.keys) { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; final double current = marker.alpha; markers[markerId] = marker.copyWith( alphaParam: current == _fullyVisibleAlpha @@ -215,8 +234,9 @@ class ClusteringBodyState extends State { SizedBox( height: 300.0, child: GoogleMap( - // ignore: avoid_redundant_argument_values - mapId: mapId, + markerType: + widget.mapId == null ? MarkerType.legacy : MarkerType.advanced, + mapId: widget.mapId, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.25), diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/legacy_markers.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/legacy_markers.dart deleted file mode 100644 index 9b6271ff3da..00000000000 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/legacy_markers.dart +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:flutter/material.dart'; -import 'package:google_maps_flutter/google_maps_flutter.dart'; - -import 'page.dart'; - -/// Page demonstrating how to use legacy [Marker] class -class LegacyMarkersPage extends GoogleMapExampleAppPage { - /// Default constructor - const LegacyMarkersPage({Key? key}) - : super(const Icon(Icons.place_outlined), 'Legacy Markers', key: key); - - @override - Widget build(BuildContext context) { - return const _LegacyMarkersBody(); - } -} - -class _LegacyMarkersBody extends StatefulWidget { - const _LegacyMarkersBody(); - - @override - State<_LegacyMarkersBody> createState() => _LegacyMarkersBodyState(); -} - -class _LegacyMarkersBodyState extends State<_LegacyMarkersBody> { - static const LatLng marker1Location = LatLng(-33.86711, 151.1947171); - static const LatLng marker2Location = LatLng(-32.9283, 151.7817); - static const LatLng marker3Location = LatLng(-32.9289, 150.3610); - - static const LatLng initialMapLocation = LatLng(-33.852, 151.211); - static const double initialZoomLevel = 7.0; - - final Map markers = {}; - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.all(16), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Expanded( - child: GoogleMap( - initialCameraPosition: const CameraPosition( - target: initialMapLocation, - zoom: initialZoomLevel, - ), - markers: markers.values.toSet(), - ), - ), - TextButton( - onPressed: markers.isEmpty ? _addMarkers : null, - child: const Text('Add markers'), - ), - ], - ), - ); - } - - Future _addMarkers() async { - // Create default red-pin marker - const Marker defaultMarker = Marker( - markerId: MarkerId('default'), - position: marker1Location, - infoWindow: InfoWindow(title: 'Default marker'), - ); - - // Create a colored pin marker - final Marker colorMarker = Marker( - markerId: const MarkerId('custom-hue'), - position: marker2Location, - icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueCyan), - infoWindow: const InfoWindow(title: 'Hue marker'), - ); - - // Create a transparent bitmap marker - final Marker bitmapGlyphMarker = Marker( - markerId: const MarkerId('asset'), - position: marker3Location, - alpha: 0.75, - icon: await BitmapDescriptor.asset( - const ImageConfiguration(size: Size(42, 42)), - 'assets/red_square.png', - ), - infoWindow: const InfoWindow(title: 'Bitmap marker'), - ); - - setState(() { - markers[defaultMarker.markerId] = defaultMarker; - markers[colorMarker.markerId] = colorMarker; - markers[bitmapGlyphMarker.markerId] = bitmapGlyphMarker; - }); - } -} diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart index 7114ad41b6a..2a0160e131d 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart @@ -8,11 +8,12 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_android/google_maps_flutter_android.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; +import 'advanced_marker_icons.dart'; +import 'advanced_markers_clustering.dart'; import 'animate_camera.dart'; import 'clustering.dart'; import 'ground_overlay.dart'; import 'heatmap.dart'; -import 'legacy_markers.dart'; import 'lite_mode.dart'; import 'map_click.dart'; import 'map_coordinates.dart'; @@ -22,6 +23,7 @@ import 'marker_icons.dart'; import 'move_camera.dart'; import 'padding.dart'; import 'page.dart'; +import 'place_advanced_marker.dart'; import 'place_circle.dart'; import 'place_marker.dart'; import 'place_polygon.dart'; @@ -32,7 +34,7 @@ import 'tile_overlay.dart'; /// Map Id is required for some examples to use advanced markers // ignore: unnecessary_nullable_for_final_variable_declarations, unreachable_from_main -const String? mapId = null; +const String? mapId = 'ffa0cdfef09314e3'; final List _allPages = [ const MapUiPage(), @@ -41,8 +43,9 @@ final List _allPages = [ const AnimateCameraPage(), const MoveCameraPage(), const PlaceMarkerPage(), + const PlaceAdvancedMarkerPage(), const MarkerIconsPage(), - const LegacyMarkersPage(), + const AdvancedMarkerIconsPage(), const ScrollingMapPage(), const PlacePolylinePage(), const PlacePolygonPage(), @@ -53,6 +56,7 @@ final List _allPages = [ const TileOverlayPage(), const GroundOverlayPage(), const ClusteringPage(), + const AdvancedMarkersClustering(), const MapIdPage(), const HeatmapPage(), ]; diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart index 6d0242d8276..5dc7786c52c 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart @@ -30,6 +30,22 @@ class MarkerIconsBody extends StatefulWidget { @override State createState() => MarkerIconsBodyState(); + + /// Return the mapId to use for the GoogleMap + String? get mapId => null; + + /// Create a marker to be displayed on the map + Marker createMarker( + MarkerId markerId, + LatLng position, + BitmapDescriptor icon, + ) { + return Marker( + markerId: markerId, + position: position, + icon: icon, + ); + } } const LatLng _kMapCenter = LatLng(52.4478, -3.5402); @@ -45,7 +61,7 @@ enum _MarkerSizeOption { class MarkerIconsBodyState extends State { final Size _markerAssetImageSize = const Size(48, 48); _MarkerSizeOption _currentSizeOption = _MarkerSizeOption.original; - Set _markers = {}; + Set _markers = {}; bool _scalingEnabled = true; bool _mipMapsEnabled = true; GoogleMapController? controller; @@ -69,6 +85,10 @@ class MarkerIconsBodyState extends State { width: 350.0, height: 300.0, child: GoogleMap( + markerType: widget.mapId == null + ? MarkerType.legacy + : MarkerType.advanced, + mapId: widget.mapId, initialCameraPosition: const CameraPosition( target: _kMapCenter, zoom: 7.0, @@ -206,30 +226,30 @@ class MarkerIconsBodyState extends State { _updateMarkers(); } - AdvancedMarker _createAssetMarker(int index) { + Marker _createAssetMarker(int index) { final LatLng position = LatLng(_kMapCenter.latitude - (index * 0.5), _kMapCenter.longitude - 1); - return AdvancedMarker( - markerId: MarkerId('marker_asset_$index'), - position: position, - icon: _markerIconAsset!, + return widget.createMarker( + MarkerId('marker_asset_$index'), + position, + _markerIconAsset!, ); } - AdvancedMarker _createBytesMarker(int index) { + Marker _createBytesMarker(int index) { final LatLng position = LatLng(_kMapCenter.latitude - (index * 0.5), _kMapCenter.longitude + 1); - return AdvancedMarker( - markerId: MarkerId('marker_bytes_$index'), - position: position, - icon: _markerIconBytes!, + return widget.createMarker( + MarkerId('marker_bytes_$index'), + position, + _markerIconBytes!, ); } void _updateMarkers() { - final Set markers = {}; + final Set markers = {}; for (int i = 0; i < _markersAmountPerType; i++) { if (_markerIconAsset != null) { markers.add(_createAssetMarker(i)); diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart new file mode 100644 index 00000000000..7793424d6c7 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart @@ -0,0 +1,65 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +import 'main.dart' as main; +import 'page.dart'; +import 'place_marker.dart'; + +/// Page demonstrating how to use Advanced [Marker] class +class PlaceAdvancedMarkerPage extends GoogleMapExampleAppPage { + /// Default constructor + const PlaceAdvancedMarkerPage({Key? key}) + : super(const Icon(Icons.place_outlined), 'Place advanced marker', + key: key); + + @override + Widget build(BuildContext context) { + return const _PlaceAdvancedMarkerBody(); + } +} + +class _PlaceAdvancedMarkerBody extends PlaceMarkerBody { + const _PlaceAdvancedMarkerBody(); + + @override + String? get mapId => main.mapId; + + @override + Marker createMarker( + MarkerId markerId, + LatLng position, + InfoWindow infoWindow, + VoidCallback onTap, + ValueChanged? onDragEnd, + ValueChanged? onDrag, + ) { + return AdvancedMarker( + markerId: markerId, + position: position, + infoWindow: infoWindow, + onTap: onTap, + onDrag: onDrag, + onDragEnd: onDragEnd, + icon: _getMarkerBitmapDescriptor(isSelected: false), + ); + } + + @override + Marker getSelectedMarker(Marker marker, bool isSelected) { + return marker.copyWith( + iconParam: _getMarkerBitmapDescriptor(isSelected: isSelected), + ); + } + + BitmapDescriptor _getMarkerBitmapDescriptor({required bool isSelected}) { + return BitmapDescriptor.pinConfig( + backgroundColor: isSelected ? Colors.blue : Colors.white, + borderColor: isSelected ? Colors.white : Colors.blue, + glyph: Glyph.color(isSelected ? Colors.white : Colors.blue), + ); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart index 7adab5cf594..9e2355324fe 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart @@ -13,7 +13,6 @@ import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; import 'custom_marker_icon.dart'; -import 'main.dart'; import 'page.dart'; class PlaceMarkerPage extends GoogleMapExampleAppPage { @@ -31,6 +30,37 @@ class PlaceMarkerBody extends StatefulWidget { @override State createState() => PlaceMarkerBodyState(); + + /// Return the mapId to use for the GoogleMap + String? get mapId => null; + + /// Create a marker with given parameters + Marker createMarker( + MarkerId markerId, + LatLng position, + InfoWindow infoWindow, + VoidCallback onTap, + ValueChanged? onDragEnd, + ValueChanged? onDrag, + ) { + return Marker( + markerId: markerId, + position: position, + infoWindow: infoWindow, + onTap: onTap, + onDrag: onDrag, + onDragEnd: onDragEnd, + ); + } + + /// Perform customizations of the [marker] to mark it as selected or not + Marker getSelectedMarker(Marker marker, bool isSelected) { + return marker.copyWith( + iconParam: isSelected + ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) + : BitmapDescriptor.defaultMarker, + ); + } } typedef MarkerUpdateAction = Marker Function(Marker marker); @@ -40,20 +70,14 @@ class PlaceMarkerBodyState extends State { static const LatLng center = LatLng(-33.86711, 151.1947171); GoogleMapController? controller; - Map markers = {}; + Map markers = {}; MarkerId? selectedMarker; int _markerIdCounter = 1; LatLng? markerPosition; - /// Whether map supports advanced markers. Null indicates capability check - /// is in progress - bool? _isAdvancedMarkersAvailable; - // ignore: use_setters_to_change_properties void _onMapCreated(GoogleMapController controller) { - setState(() { - this.controller = controller; - }); + this.controller = controller; } @override @@ -62,19 +86,17 @@ class PlaceMarkerBodyState extends State { } void _onMarkerTapped(MarkerId markerId) { - final AdvancedMarker? tappedMarker = markers[markerId]; + final Marker? tappedMarker = markers[markerId]; if (tappedMarker != null) { setState(() { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { - final AdvancedMarker resetOld = markers[previousMarkerId]! - .copyWith(iconParam: _getDefaultMarkerIcon(isSelected: false)); + final Marker resetOld = + widget.getSelectedMarker(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final AdvancedMarker newMarker = tappedMarker.copyWith( - iconParam: _getDefaultMarkerIcon(isSelected: true), - ); + final Marker newMarker = widget.getSelectedMarker(tappedMarker, true); markers[markerId] = newMarker; markerPosition = null; @@ -117,7 +139,7 @@ class PlaceMarkerBodyState extends State { } } - Future _add() async { + void _add() { final int markerCount = markers.length; if (markerCount == 12) { @@ -128,21 +150,16 @@ class PlaceMarkerBodyState extends State { _markerIdCounter++; final MarkerId markerId = MarkerId(markerIdVal); - final AdvancedMarker marker = AdvancedMarker( - markerId: markerId, - position: LatLng( + final Marker marker = widget.createMarker( + markerId, + LatLng( center.latitude + sin(_markerIdCounter * pi / 6.0) / 20.0, center.longitude + cos(_markerIdCounter * pi / 6.0) / 20.0, ), - infoWindow: InfoWindow(title: markerIdVal, snippet: '*'), - onTap: () => _onMarkerTapped(markerId), - onDragEnd: (LatLng position) => _onMarkerDragEnd(markerId, position), - onDrag: (LatLng position) => _onMarkerDrag(markerId, position), - // Hide some markers when they collide with others - collisionBehavior: _markerIdCounter.isEven - ? MarkerCollisionBehavior.required - : MarkerCollisionBehavior.optionalAndHidesLowerPriority, - icon: _getDefaultMarkerIcon(isSelected: false), + InfoWindow(title: markerIdVal, snippet: '*'), + () => _onMarkerTapped(markerId), + (LatLng position) => _onMarkerDrag(markerId, position), + (LatLng position) => _onMarkerDragEnd(markerId, position), ); setState(() { @@ -159,7 +176,7 @@ class PlaceMarkerBodyState extends State { } void _changePosition(MarkerId markerId) { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; final LatLng current = marker.position; final Offset offset = Offset( center.latitude - current.latitude, @@ -176,7 +193,7 @@ class PlaceMarkerBodyState extends State { } void _changeAnchor(MarkerId markerId) { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; final Offset currentAnchor = marker.anchor; final Offset newAnchor = Offset(1.0 - currentAnchor.dy, currentAnchor.dx); setState(() { @@ -187,7 +204,7 @@ class PlaceMarkerBodyState extends State { } Future _changeInfoAnchor(MarkerId markerId) async { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; final Offset currentAnchor = marker.infoWindow.anchor; final Offset newAnchor = Offset(1.0 - currentAnchor.dy, currentAnchor.dx); setState(() { @@ -200,7 +217,7 @@ class PlaceMarkerBodyState extends State { } Future _toggleDraggable(MarkerId markerId) async { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; setState(() { markers[markerId] = marker.copyWith( draggableParam: !marker.draggable, @@ -209,7 +226,7 @@ class PlaceMarkerBodyState extends State { } Future _toggleFlat(MarkerId markerId) async { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; setState(() { markers[markerId] = marker.copyWith( flatParam: !marker.flat, @@ -218,7 +235,7 @@ class PlaceMarkerBodyState extends State { } Future _changeInfo(MarkerId markerId) async { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; final String newSnippet = '${marker.infoWindow.snippet!}*'; setState(() { markers[markerId] = marker.copyWith( @@ -230,7 +247,7 @@ class PlaceMarkerBodyState extends State { } Future _changeAlpha(MarkerId markerId) async { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; final double current = marker.alpha; setState(() { markers[markerId] = marker.copyWith( @@ -240,7 +257,7 @@ class PlaceMarkerBodyState extends State { } Future _changeRotation(MarkerId markerId) async { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; final double current = marker.rotation; setState(() { markers[markerId] = marker.copyWith( @@ -250,7 +267,7 @@ class PlaceMarkerBodyState extends State { } Future _toggleVisible(MarkerId markerId) async { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; setState(() { markers[markerId] = marker.copyWith( visibleParam: !marker.visible, @@ -259,7 +276,7 @@ class PlaceMarkerBodyState extends State { } Future _changeZIndex(MarkerId markerId) async { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; final double current = marker.zIndex; setState(() { markers[markerId] = marker.copyWith( @@ -269,7 +286,7 @@ class PlaceMarkerBodyState extends State { } void _setMarkerIcon(MarkerId markerId, BitmapDescriptor assetIcon) { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; setState(() { markers[markerId] = marker.copyWith( iconParam: assetIcon, @@ -283,58 +300,20 @@ class PlaceMarkerBodyState extends State { return BytesMapBitmap(bytes.buffer.asUint8List()); } - BitmapDescriptor _getDefaultMarkerIcon({required bool isSelected}) { - return BitmapDescriptor.pinConfig( - backgroundColor: isSelected ? Colors.blue : Colors.green, - borderColor: Colors.white, - glyph: Glyph.text( - 'Hey', - textColor: Colors.white, - ), - ); - } - @override Widget build(BuildContext context) { - // Check if map is capable of showing advanced markers - if (controller != null) { - GoogleMapsFlutterPlatform.instance - .isAdvancedMarkersAvailable(mapId: controller!.mapId) - .then((bool result) { - setState(() { - _isAdvancedMarkersAvailable = result; - }); - }); - } - final MarkerId? selectedId = selectedMarker; return Stack(children: [ Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Padding( - padding: const EdgeInsets.all(16), - child: Text( - switch (_isAdvancedMarkersAvailable) { - null => 'Checking map capabilities…', - true => - 'Map capabilities check result:\nthis map supports advanced markers', - false => - "Map capabilities check result:\nthis map don't support advanced markers. Please check that map Id is provided and correct map renderer is used", - }, - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.bodyLarge?.copyWith( - color: _isAdvancedMarkersAvailable == false - ? Colors.red - : null, - ), - ), - ), Expanded( child: GoogleMap( - // ignore: avoid_redundant_argument_values - mapId: mapId, + mapId: widget.mapId, + markerType: widget.mapId != null + ? MarkerType.advanced + : MarkerType.legacy, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.211), diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index ea20b0a9c4a..34cb7989e75 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -128,6 +128,7 @@ class GoogleMap extends StatefulWidget { this.onTap, this.onLongPress, this.mapId, + this.markerType = MarkerType.legacy, @Deprecated('cloudMapId is deprecated. Use mapId instead') this.cloudMapId, }); @@ -363,6 +364,9 @@ class GoogleMap extends StatefulWidget { @Deprecated('cloudMapId is deprecated. Use mapId instead') final String? cloudMapId; + /// Indicates whether map should use [AdvancedMarker]s or [Marker]s. + final MarkerType markerType; + /// Creates a [State] for this [GoogleMap]. @override State createState() => _GoogleMapState(); @@ -396,6 +400,7 @@ class _GoogleMapState extends State { TextDirection.ltr, initialCameraPosition: widget.initialCameraPosition, gestureRecognizers: widget.gestureRecognizers, + markerType: widget.markerType, ), mapObjects: MapObjects( markers: widget.markers, From 9f9572cb4e1b67fa931980eaf6a5d6671e5e2cee Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 4 Oct 2024 10:21:54 +0300 Subject: [PATCH 025/130] Add advanced marker examples for Android --- .../lib/advanced_markers_clustering.dart | 14 +-- .../example/lib/clustering.dart | 24 ++-- .../example/lib/place_advanced_marker.dart | 65 ++++++++-- .../example/lib/place_marker.dart | 96 ++++++++------- .../example/lib/advanced_marker_icons.dart | 42 +++++++ .../lib/advanced_markers_clustering.dart | 71 +++++++++++ .../example/lib/clustering.dart | 67 ++++++---- .../example/lib/example_google_map.dart | 5 + .../example/lib/legacy_markers.dart | 104 ---------------- .../example/lib/main.dart | 6 + .../example/lib/marker_icons.dart | 44 +++++-- .../example/lib/place_advanced_marker.dart | 114 ++++++++++++++++++ .../example/lib/place_marker.dart | 78 ++++++++---- .../lib/src/google_maps_flutter_android.dart | 16 ++- .../google_maps_flutter_android_test.dart | 42 ++++--- .../method_channel_google_maps_flutter.dart | 9 +- .../google_maps_flutter_platform.dart | 4 + .../lib/src/types/bitmap.dart | 1 + .../src/types/map_widget_configuration.dart | 2 +- .../google_maps_flutter_platform_test.dart | 2 + 20 files changed, 551 insertions(+), 255 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart delete mode 100644 packages/google_maps_flutter/google_maps_flutter_android/example/lib/legacy_markers.dart create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart index 3e08b006e34..830fe279437 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart @@ -30,13 +30,13 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { String? get mapId => main.mapId; @override - Marker createMarker( - MarkerId markerId, - ClusterManagerId clusterManagerId, - LatLng position, - InfoWindow infoWindow, - VoidCallback onTap, - ) { + Marker createMarker({ + required MarkerId markerId, + required ClusterManagerId clusterManagerId, + required LatLng position, + required InfoWindow infoWindow, + required VoidCallback onTap, + }) { return AdvancedMarker( markerId: markerId, clusterManagerId: clusterManagerId, diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart index 45162c5ace3..755788d47fe 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart @@ -31,13 +31,13 @@ class ClusteringBody extends StatefulWidget { State createState() => ClusteringBodyState(); /// Create a marker that is later added to a cluster - Marker createMarker( - MarkerId markerId, - ClusterManagerId clusterManagerId, - LatLng position, - InfoWindow infoWindow, - VoidCallback onTap, - ) { + Marker createMarker({ + required MarkerId markerId, + required ClusterManagerId clusterManagerId, + required LatLng position, + required InfoWindow infoWindow, + required VoidCallback onTap, + }) { return Marker( markerId: markerId, clusterManagerId: clusterManagerId, @@ -186,14 +186,14 @@ class ClusteringBodyState extends State { clusterManagerIndex * _clusterManagerLongitudeOffset; final Marker marker = widget.createMarker( - markerId, - clusterManager.clusterManagerId, - LatLng( + markerId: markerId, + clusterManagerId: clusterManager.clusterManagerId, + position: LatLng( center.latitude + _getRandomOffset(), center.longitude + _getRandomOffset() + clusterManagerLongitudeOffset, ), - InfoWindow(title: markerIdVal, snippet: '*'), - () => _onMarkerTapped(markerId), + infoWindow: InfoWindow(title: markerIdVal, snippet: '*'), + onTap: () => _onMarkerTapped(markerId), ); markers[markerId] = marker; } diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart index 7793424d6c7..0969c362c61 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart @@ -25,18 +25,23 @@ class PlaceAdvancedMarkerPage extends GoogleMapExampleAppPage { class _PlaceAdvancedMarkerBody extends PlaceMarkerBody { const _PlaceAdvancedMarkerBody(); + @override + State createState() => _PlaceAdvancedMarkerBodyState(); +} + +class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { @override String? get mapId => main.mapId; @override - Marker createMarker( - MarkerId markerId, - LatLng position, - InfoWindow infoWindow, - VoidCallback onTap, - ValueChanged? onDragEnd, - ValueChanged? onDrag, - ) { + Marker createMarker({ + required MarkerId markerId, + required LatLng position, + required InfoWindow infoWindow, + required VoidCallback onTap, + required ValueChanged? onDragEnd, + required ValueChanged? onDrag, + }) { return AdvancedMarker( markerId: markerId, position: position, @@ -62,4 +67,48 @@ class _PlaceAdvancedMarkerBody extends PlaceMarkerBody { glyph: Glyph.color(isSelected ? Colors.white : Colors.blue), ); } + + /// Whether map supports advanced markers. Null indicates capability check + /// is in progress + bool? _isAdvancedMarkersAvailable; + + @override + Widget getHeader() { + return Padding( + padding: const EdgeInsets.all(16), + child: Text( + switch (_isAdvancedMarkersAvailable) { + null => 'Checking map capabilities…', + true => + 'Map capabilities check result:\nthis map supports advanced markers', + false => + "Map capabilities check result:\nthis map doesn't support advanced markers. Please check that map Id is provided and correct map renderer is used", + }, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.bodyLarge?.copyWith( + color: switch (_isAdvancedMarkersAvailable) { + true => Colors.green.shade700, + false => Colors.red, + null => Colors.black, + }, + ), + ), + ); + } + + @override + Widget build(BuildContext context) { + // Check if map is capable of showing advanced markers + if (controller != null) { + GoogleMapsFlutterPlatform.instance + .isAdvancedMarkersAvailable(mapId: controller!.mapId) + .then((bool result) { + setState(() { + _isAdvancedMarkersAvailable = result; + }); + }); + } + + return super.build(context); + } } diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart index 9e2355324fe..49e0bfd8b9a 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart @@ -30,37 +30,6 @@ class PlaceMarkerBody extends StatefulWidget { @override State createState() => PlaceMarkerBodyState(); - - /// Return the mapId to use for the GoogleMap - String? get mapId => null; - - /// Create a marker with given parameters - Marker createMarker( - MarkerId markerId, - LatLng position, - InfoWindow infoWindow, - VoidCallback onTap, - ValueChanged? onDragEnd, - ValueChanged? onDrag, - ) { - return Marker( - markerId: markerId, - position: position, - infoWindow: infoWindow, - onTap: onTap, - onDrag: onDrag, - onDragEnd: onDragEnd, - ); - } - - /// Perform customizations of the [marker] to mark it as selected or not - Marker getSelectedMarker(Marker marker, bool isSelected) { - return marker.copyWith( - iconParam: isSelected - ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) - : BitmapDescriptor.defaultMarker, - ); - } } typedef MarkerUpdateAction = Marker Function(Marker marker); @@ -75,9 +44,10 @@ class PlaceMarkerBodyState extends State { int _markerIdCounter = 1; LatLng? markerPosition; - // ignore: use_setters_to_change_properties void _onMapCreated(GoogleMapController controller) { - this.controller = controller; + setState(() { + this.controller = controller; + }); } @override @@ -92,11 +62,11 @@ class PlaceMarkerBodyState extends State { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { final Marker resetOld = - widget.getSelectedMarker(markers[previousMarkerId]!, false); + getSelectedMarker(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = widget.getSelectedMarker(tappedMarker, true); + final Marker newMarker = getSelectedMarker(tappedMarker, true); markers[markerId] = newMarker; markerPosition = null; @@ -150,16 +120,16 @@ class PlaceMarkerBodyState extends State { _markerIdCounter++; final MarkerId markerId = MarkerId(markerIdVal); - final Marker marker = widget.createMarker( - markerId, - LatLng( + final Marker marker = createMarker( + markerId: markerId, + position: LatLng( center.latitude + sin(_markerIdCounter * pi / 6.0) / 20.0, center.longitude + cos(_markerIdCounter * pi / 6.0) / 20.0, ), - InfoWindow(title: markerIdVal, snippet: '*'), - () => _onMarkerTapped(markerId), - (LatLng position) => _onMarkerDrag(markerId, position), - (LatLng position) => _onMarkerDragEnd(markerId, position), + infoWindow: InfoWindow(title: markerIdVal, snippet: '*'), + onTap: () => _onMarkerTapped(markerId), + onDrag: (LatLng position) => _onMarkerDrag(markerId, position), + onDragEnd: (LatLng position) => _onMarkerDragEnd(markerId, position), ); setState(() { @@ -300,6 +270,40 @@ class PlaceMarkerBodyState extends State { return BytesMapBitmap(bytes.buffer.asUint8List()); } + /// Return the mapId to use for the GoogleMap + String? get mapId => null; + + /// Create a marker with given parameters + Marker createMarker({ + required MarkerId markerId, + required LatLng position, + required InfoWindow infoWindow, + required VoidCallback onTap, + required ValueChanged? onDragEnd, + required ValueChanged? onDrag, + }) { + return Marker( + markerId: markerId, + position: position, + infoWindow: infoWindow, + onTap: onTap, + onDrag: onDrag, + onDragEnd: onDragEnd, + ); + } + + /// Perform customizations of the [marker] to mark it as selected or not + Marker getSelectedMarker(Marker marker, bool isSelected) { + return marker.copyWith( + iconParam: isSelected + ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) + : BitmapDescriptor.defaultMarker, + ); + } + + /// Optional header to be displayed above the map + Widget getHeader() => const SizedBox.shrink(); + @override Widget build(BuildContext context) { final MarkerId? selectedId = selectedMarker; @@ -308,12 +312,12 @@ class PlaceMarkerBodyState extends State { mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ + getHeader(), Expanded( child: GoogleMap( - mapId: widget.mapId, - markerType: widget.mapId != null - ? MarkerType.advanced - : MarkerType.legacy, + mapId: mapId, + markerType: + mapId != null ? MarkerType.advanced : MarkerType.legacy, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.211), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart new file mode 100644 index 00000000000..2d504ca2e7c --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart @@ -0,0 +1,42 @@ +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +import 'main.dart' as main; +import 'marker_icons.dart'; +import 'page.dart'; + +/// Page that demonstrates how to use custom [AdvanceMarker] icons +class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { + /// Default constructor + const AdvancedMarkerIconsPage({Key? key}) + : super( + key: key, + const Icon(Icons.image_outlined), + 'Advanced marker icons', + ); + + @override + Widget build(BuildContext context) { + return const _AdvancedMarkerIconsBody(); + } +} + +class _AdvancedMarkerIconsBody extends MarkerIconsBody { + const _AdvancedMarkerIconsBody(); + + @override + String? get mapId => main.mapId; + + @override + Marker createMarker( + MarkerId markerId, + LatLng position, + BitmapDescriptor icon, + ) { + return AdvancedMarker( + markerId: markerId, + position: position, + icon: icon, + ); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart new file mode 100644 index 00000000000..3e08b006e34 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart @@ -0,0 +1,71 @@ +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +import 'clustering.dart'; +import 'main.dart' as main; +import 'page.dart'; + +/// Page for demonstrating advanced marker clustering support. +/// Same as [ClusteringPage] but works with [AdvancedMarker]. +class AdvancedMarkersClustering extends GoogleMapExampleAppPage { + /// Default constructor. + const AdvancedMarkersClustering({Key? key}) + : super( + key: key, + const Icon(Icons.place_outlined), + 'Manage clusters of advanced markers', + ); + + @override + Widget build(BuildContext context) { + return const _AdvancedMarkerClusteringBody(); + } +} + +/// Same as [ClusteringBody] but works with [AdvancedMarker]. +class _AdvancedMarkerClusteringBody extends ClusteringBody { + const _AdvancedMarkerClusteringBody(); + + @override + String? get mapId => main.mapId; + + @override + Marker createMarker( + MarkerId markerId, + ClusterManagerId clusterManagerId, + LatLng position, + InfoWindow infoWindow, + VoidCallback onTap, + ) { + return AdvancedMarker( + markerId: markerId, + clusterManagerId: clusterManagerId, + position: position, + infoWindow: infoWindow, + onTap: onTap, + icon: BitmapDescriptor.pinConfig( + backgroundColor: Colors.white, + borderColor: Colors.blue, + glyph: Glyph.color(Colors.blue), + ), + ); + } + + @override + Marker getSelectedMarker(Marker marker, bool isSelected) { + assert(marker is AdvancedMarker); + return (marker as AdvancedMarker).copyWith( + iconParam: isSelected + ? BitmapDescriptor.pinConfig( + backgroundColor: Colors.blue, + borderColor: Colors.white, + glyph: Glyph.color(Colors.white), + ) + : BitmapDescriptor.pinConfig( + backgroundColor: Colors.white, + borderColor: Colors.blue, + glyph: Glyph.color(Colors.blue), + ), + ); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart index 302a2d9e170..19602a799ae 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart @@ -8,7 +8,6 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; import 'example_google_map.dart'; -import 'main.dart'; import 'page.dart'; /// Page for demonstrating marker clustering support. @@ -30,6 +29,35 @@ class ClusteringBody extends StatefulWidget { @override State createState() => ClusteringBodyState(); + + /// Create a marker that is later added to a cluster + Marker createMarker( + MarkerId markerId, + ClusterManagerId clusterManagerId, + LatLng position, + InfoWindow infoWindow, + VoidCallback onTap, + ) { + return Marker( + markerId: markerId, + clusterManagerId: clusterManagerId, + position: position, + infoWindow: infoWindow, + onTap: onTap, + ); + } + + /// Return selected or unselected state of the given [marker] + Marker getSelectedMarker(Marker marker, bool isSelected) { + return marker.copyWith( + iconParam: isSelected + ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) + : BitmapDescriptor.defaultMarker, + ); + } + + /// Return the mapId to use for the GoogleMap + String? get mapId => null; } /// State of the clustering page. @@ -72,7 +100,7 @@ class ClusteringBodyState extends State { {}; /// Map of markers with identifier as the key. - Map markers = {}; + Map markers = {}; /// Id of the currently selected marker. MarkerId? selectedMarker; @@ -97,21 +125,17 @@ class ClusteringBodyState extends State { } void _onMarkerTapped(MarkerId markerId) { - final AdvancedMarker? tappedMarker = markers[markerId]; + final Marker? tappedMarker = markers[markerId]; if (tappedMarker != null) { setState(() { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { - final AdvancedMarker resetOld = markers[previousMarkerId]! - .copyWith(iconParam: BitmapDescriptor.defaultMarker); + final Marker resetOld = + widget.getSelectedMarker(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final AdvancedMarker newMarker = tappedMarker.copyWith( - iconParam: BitmapDescriptor.defaultMarkerWithHue( - BitmapDescriptor.hueGreen, - ), - ); + final Marker newMarker = widget.getSelectedMarker(tappedMarker, true); markers[markerId] = newMarker; }); } @@ -144,7 +168,7 @@ class ClusteringBodyState extends State { void _removeClusterManager(ClusterManager clusterManager) { setState(() { // Remove markers managed by cluster manager to be removed. - markers.removeWhere((MarkerId key, AdvancedMarker marker) => + markers.removeWhere((MarkerId key, Marker marker) => marker.clusterManagerId == clusterManager.clusterManagerId); // Remove cluster manager. clusterManagers.remove(clusterManager.clusterManagerId); @@ -166,15 +190,15 @@ class ClusteringBodyState extends State { final double clusterManagerLongitudeOffset = clusterManagerIndex * _clusterManagerLongitudeOffset; - final AdvancedMarker marker = AdvancedMarker( - clusterManagerId: clusterManager.clusterManagerId, - markerId: markerId, - position: LatLng( + final Marker marker = widget.createMarker( + markerId, + clusterManager.clusterManagerId, + LatLng( center.latitude + _getRandomOffset(), center.longitude + _getRandomOffset() + clusterManagerLongitudeOffset, ), - infoWindow: InfoWindow(title: markerIdVal, snippet: '*'), - onTap: () => _onMarkerTapped(markerId), + InfoWindow(title: markerIdVal, snippet: '*'), + () => _onMarkerTapped(markerId), ); markers[markerId] = marker; } @@ -195,7 +219,7 @@ class ClusteringBodyState extends State { void _changeMarkersAlpha() { for (final MarkerId markerId in markers.keys) { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; final double current = marker.alpha; markers[markerId] = marker.copyWith( alphaParam: current == _fullyVisibleAlpha @@ -215,11 +239,12 @@ class ClusteringBodyState extends State { children: [ Expanded( child: ExampleGoogleMap( - // ignore: avoid_redundant_argument_values - mapId: mapId, + mapId: widget.mapId, + markerType: + widget.mapId != null ? MarkerType.advanced : MarkerType.legacy, onMapCreated: _onMapCreated, initialCameraPosition: initialCameraPosition, - markers: Set.of(markers.values), + markers: Set.of(markers.values), clusterManagers: Set.of(clusterManagers.values), ), ), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart index 1cbc764d7db..dc0b8fda675 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart @@ -262,6 +262,7 @@ class ExampleGoogleMap extends StatefulWidget { this.onCameraMoveStarted, this.tileOverlays = const {}, this.groundOverlays = const {}, + this.markerType = MarkerType.legacy, this.onCameraMove, this.onCameraIdle, this.onTap, @@ -385,6 +386,9 @@ class ExampleGoogleMap extends StatefulWidget { /// The locally configured style for the map. final String? style; + /// The type of marker to use (legacy or advanced) + final MarkerType markerType; + /// Creates a [State] for this [ExampleGoogleMap]. @override State createState() => _ExampleGoogleMapState(); @@ -417,6 +421,7 @@ class _ExampleGoogleMapState extends State { TextDirection.ltr, initialCameraPosition: widget.initialCameraPosition, gestureRecognizers: widget.gestureRecognizers, + markerType: widget.markerType, ), mapObjects: MapObjects( markers: widget.markers, diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/legacy_markers.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/legacy_markers.dart deleted file mode 100644 index af6531c6f41..00000000000 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/legacy_markers.dart +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:flutter/material.dart'; -import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; - -import 'example_google_map.dart'; -import 'page.dart'; - -/// Page demonstrating how to use legacy [Marker] class -class LegacyMarkersPage extends GoogleMapExampleAppPage { - /// Default constructor - const LegacyMarkersPage({Key? key}) - : super(const Icon(Icons.place_outlined), 'Legacy Markers', key: key); - - @override - Widget build(BuildContext context) { - return const _LegacyMarkersBody(); - } -} - -class _LegacyMarkersBody extends StatefulWidget { - const _LegacyMarkersBody(); - - @override - State<_LegacyMarkersBody> createState() => _LegacyMarkersBodyState(); -} - -class _LegacyMarkersBodyState extends State<_LegacyMarkersBody> { - static const LatLng marker1Location = LatLng(-33.86711, 151.1947171); - static const LatLng marker2Location = LatLng(-32.9283, 151.7817); - static const LatLng marker3Location = LatLng(-32.9289, 150.3610); - - static const LatLng initialMapLocation = LatLng(-33.852, 151.211); - static const double initialZoomLevel = 7.0; - - final Map markers = {}; - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.all(16), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Expanded( - child: ExampleGoogleMap( - // Explicitly set mapId to null, legacy markers work fine - // without mapId - // ignore: avoid_redundant_argument_values - mapId: null, - initialCameraPosition: const CameraPosition( - target: initialMapLocation, - zoom: initialZoomLevel, - ), - markers: markers.values.toSet(), - ), - ), - TextButton( - onPressed: markers.isEmpty ? _addMarkers : null, - child: const Text('Add markers'), - ), - ], - ), - ); - } - - Future _addMarkers() async { - // Create default red-pin marker - const Marker defaultMarker = Marker( - markerId: MarkerId('default'), - position: marker1Location, - infoWindow: InfoWindow(title: 'Default marker'), - ); - - // Create a colored pin marker - final Marker colorMarker = Marker( - markerId: const MarkerId('custom-hue'), - position: marker2Location, - icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueCyan), - infoWindow: const InfoWindow(title: 'Hue marker'), - ); - - // Create a transparent bitmap marker - final Marker bitmapGlyphMarker = Marker( - markerId: const MarkerId('asset'), - position: marker3Location, - alpha: 0.75, - icon: await BitmapDescriptor.asset( - const ImageConfiguration(size: Size(42, 42)), - 'assets/red_square.png', - ), - infoWindow: const InfoWindow(title: 'Bitmap marker'), - ); - - setState(() { - markers[defaultMarker.markerId] = defaultMarker; - markers[colorMarker.markerId] = colorMarker; - markers[bitmapGlyphMarker.markerId] = bitmapGlyphMarker; - }); - } -} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart index e6a4d397e6c..6bd3933c8dc 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart @@ -8,6 +8,8 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_android/google_maps_flutter_android.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; +import 'advanced_marker_icons.dart'; +import 'advanced_markers_clustering.dart'; import 'animate_camera.dart'; import 'clustering.dart'; import 'ground_overlay.dart'; @@ -20,6 +22,7 @@ import 'marker_icons.dart'; import 'move_camera.dart'; import 'padding.dart'; import 'page.dart'; +import 'place_advanced_marker.dart'; import 'place_circle.dart'; import 'place_marker.dart'; import 'place_polygon.dart'; @@ -39,7 +42,9 @@ final List _allPages = [ const AnimateCameraPage(), const MoveCameraPage(), const PlaceMarkerPage(), + const PlaceAdvancedMarkerPage(), const MarkerIconsPage(), + const AdvancedMarkerIconsPage(), const ScrollingMapPage(), const PlacePolylinePage(), const PlacePolygonPage(), @@ -50,6 +55,7 @@ final List _allPages = [ const TileOverlayPage(), const GroundOverlayPage(), const ClusteringPage(), + const AdvancedMarkersClustering(), const MapIdPage(), ]; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart index 081f0ed1e6e..80c20b12569 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart @@ -30,6 +30,22 @@ class MarkerIconsBody extends StatefulWidget { @override State createState() => MarkerIconsBodyState(); + + /// Return the mapId to use for the GoogleMap + String? get mapId => null; + + /// Create a marker to be displayed on the map + Marker createMarker( + MarkerId markerId, + LatLng position, + BitmapDescriptor icon, + ) { + return Marker( + markerId: markerId, + position: position, + icon: icon, + ); + } } const LatLng _kMapCenter = LatLng(52.4478, -3.5402); @@ -45,7 +61,7 @@ enum _MarkerSizeOption { class MarkerIconsBodyState extends State { final Size _markerAssetImageSize = const Size(48, 48); _MarkerSizeOption _currentSizeOption = _MarkerSizeOption.original; - Set _markers = {}; + Set _markers = {}; bool _scalingEnabled = true; bool _mipMapsEnabled = true; ExampleGoogleMapController? controller; @@ -69,6 +85,10 @@ class MarkerIconsBodyState extends State { width: 350.0, height: 300.0, child: ExampleGoogleMap( + mapId: widget.mapId, + markerType: widget.mapId != null + ? MarkerType.advanced + : MarkerType.legacy, initialCameraPosition: const CameraPosition( target: _kMapCenter, zoom: 7.0, @@ -206,30 +226,30 @@ class MarkerIconsBodyState extends State { _updateMarkers(); } - AdvancedMarker _createAssetMarker(int index) { + Marker _createAssetMarker(int index) { final LatLng position = LatLng(_kMapCenter.latitude - (index * 0.5), _kMapCenter.longitude - 1); - return AdvancedMarker( - markerId: MarkerId('marker_asset_$index'), - position: position, - icon: _markerIconAsset!, + return widget.createMarker( + MarkerId('marker_asset_$index'), + position, + _markerIconAsset!, ); } - AdvancedMarker _createBytesMarker(int index) { + Marker _createBytesMarker(int index) { final LatLng position = LatLng(_kMapCenter.latitude - (index * 0.5), _kMapCenter.longitude + 1); - return AdvancedMarker( - markerId: MarkerId('marker_bytes_$index'), - position: position, - icon: _markerIconBytes!, + return widget.createMarker( + MarkerId('marker_bytes_$index'), + position, + _markerIconBytes!, ); } void _updateMarkers() { - final Set markers = {}; + final Set markers = {}; for (int i = 0; i < _markersAmountPerType; i++) { if (_markerIconAsset != null) { markers.add(_createAssetMarker(i)); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart new file mode 100644 index 00000000000..0969c362c61 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart @@ -0,0 +1,114 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +import 'main.dart' as main; +import 'page.dart'; +import 'place_marker.dart'; + +/// Page demonstrating how to use Advanced [Marker] class +class PlaceAdvancedMarkerPage extends GoogleMapExampleAppPage { + /// Default constructor + const PlaceAdvancedMarkerPage({Key? key}) + : super(const Icon(Icons.place_outlined), 'Place advanced marker', + key: key); + + @override + Widget build(BuildContext context) { + return const _PlaceAdvancedMarkerBody(); + } +} + +class _PlaceAdvancedMarkerBody extends PlaceMarkerBody { + const _PlaceAdvancedMarkerBody(); + + @override + State createState() => _PlaceAdvancedMarkerBodyState(); +} + +class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { + @override + String? get mapId => main.mapId; + + @override + Marker createMarker({ + required MarkerId markerId, + required LatLng position, + required InfoWindow infoWindow, + required VoidCallback onTap, + required ValueChanged? onDragEnd, + required ValueChanged? onDrag, + }) { + return AdvancedMarker( + markerId: markerId, + position: position, + infoWindow: infoWindow, + onTap: onTap, + onDrag: onDrag, + onDragEnd: onDragEnd, + icon: _getMarkerBitmapDescriptor(isSelected: false), + ); + } + + @override + Marker getSelectedMarker(Marker marker, bool isSelected) { + return marker.copyWith( + iconParam: _getMarkerBitmapDescriptor(isSelected: isSelected), + ); + } + + BitmapDescriptor _getMarkerBitmapDescriptor({required bool isSelected}) { + return BitmapDescriptor.pinConfig( + backgroundColor: isSelected ? Colors.blue : Colors.white, + borderColor: isSelected ? Colors.white : Colors.blue, + glyph: Glyph.color(isSelected ? Colors.white : Colors.blue), + ); + } + + /// Whether map supports advanced markers. Null indicates capability check + /// is in progress + bool? _isAdvancedMarkersAvailable; + + @override + Widget getHeader() { + return Padding( + padding: const EdgeInsets.all(16), + child: Text( + switch (_isAdvancedMarkersAvailable) { + null => 'Checking map capabilities…', + true => + 'Map capabilities check result:\nthis map supports advanced markers', + false => + "Map capabilities check result:\nthis map doesn't support advanced markers. Please check that map Id is provided and correct map renderer is used", + }, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.bodyLarge?.copyWith( + color: switch (_isAdvancedMarkersAvailable) { + true => Colors.green.shade700, + false => Colors.red, + null => Colors.black, + }, + ), + ), + ); + } + + @override + Widget build(BuildContext context) { + // Check if map is capable of showing advanced markers + if (controller != null) { + GoogleMapsFlutterPlatform.instance + .isAdvancedMarkersAvailable(mapId: controller!.mapId) + .then((bool result) { + setState(() { + _isAdvancedMarkersAvailable = result; + }); + }); + } + + return super.build(context); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart index 6975bc69092..3f7222844ab 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart @@ -39,7 +39,7 @@ class PlaceMarkerBodyState extends State { static const LatLng center = LatLng(-33.86711, 151.1947171); ExampleGoogleMapController? controller; - Map markers = {}; + Map markers = {}; MarkerId? selectedMarker; int _markerIdCounter = 1; LatLng? markerPosition; @@ -55,21 +55,17 @@ class PlaceMarkerBodyState extends State { } void _onMarkerTapped(MarkerId markerId) { - final AdvancedMarker? tappedMarker = markers[markerId]; + final Marker? tappedMarker = markers[markerId]; if (tappedMarker != null) { setState(() { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { - final AdvancedMarker resetOld = markers[previousMarkerId]! - .copyWith(iconParam: BitmapDescriptor.defaultMarker); + final Marker resetOld = + getSelectedMarker(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final AdvancedMarker newMarker = tappedMarker.copyWith( - iconParam: BitmapDescriptor.defaultMarkerWithHue( - BitmapDescriptor.hueGreen, - ), - ); + final Marker newMarker = getSelectedMarker(tappedMarker, true); markers[markerId] = newMarker; markerPosition = null; @@ -84,7 +80,7 @@ class PlaceMarkerBodyState extends State { } Future _onMarkerDragEnd(MarkerId markerId, LatLng newPosition) async { - final AdvancedMarker? tappedMarker = markers[markerId]; + final Marker? tappedMarker = markers[markerId]; if (tappedMarker != null) { setState(() { markerPosition = null; @@ -123,7 +119,7 @@ class PlaceMarkerBodyState extends State { _markerIdCounter++; final MarkerId markerId = MarkerId(markerIdVal); - final AdvancedMarker marker = AdvancedMarker( + final Marker marker = createMarker( markerId: markerId, position: LatLng( center.latitude + sin(_markerIdCounter * pi / 6.0) / 20.0, @@ -149,7 +145,7 @@ class PlaceMarkerBodyState extends State { } void _changePosition(MarkerId markerId) { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; final LatLng current = marker.position; final Offset offset = Offset( center.latitude - current.latitude, @@ -166,7 +162,7 @@ class PlaceMarkerBodyState extends State { } void _changeAnchor(MarkerId markerId) { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; final Offset currentAnchor = marker.anchor; final Offset newAnchor = Offset(1.0 - currentAnchor.dy, currentAnchor.dx); setState(() { @@ -177,7 +173,7 @@ class PlaceMarkerBodyState extends State { } Future _changeInfoAnchor(MarkerId markerId) async { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; final Offset currentAnchor = marker.infoWindow.anchor; final Offset newAnchor = Offset(1.0 - currentAnchor.dy, currentAnchor.dx); setState(() { @@ -190,7 +186,7 @@ class PlaceMarkerBodyState extends State { } Future _toggleDraggable(MarkerId markerId) async { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; setState(() { markers[markerId] = marker.copyWith( draggableParam: !marker.draggable, @@ -199,7 +195,7 @@ class PlaceMarkerBodyState extends State { } Future _toggleFlat(MarkerId markerId) async { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; setState(() { markers[markerId] = marker.copyWith( flatParam: !marker.flat, @@ -208,7 +204,7 @@ class PlaceMarkerBodyState extends State { } Future _changeInfo(MarkerId markerId) async { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; final String newSnippet = '${marker.infoWindow.snippet!}*'; setState(() { markers[markerId] = marker.copyWith( @@ -220,7 +216,7 @@ class PlaceMarkerBodyState extends State { } Future _changeAlpha(MarkerId markerId) async { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; final double current = marker.alpha; setState(() { markers[markerId] = marker.copyWith( @@ -230,7 +226,7 @@ class PlaceMarkerBodyState extends State { } Future _changeRotation(MarkerId markerId) async { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; final double current = marker.rotation; setState(() { markers[markerId] = marker.copyWith( @@ -240,7 +236,7 @@ class PlaceMarkerBodyState extends State { } Future _toggleVisible(MarkerId markerId) async { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; setState(() { markers[markerId] = marker.copyWith( visibleParam: !marker.visible, @@ -249,7 +245,7 @@ class PlaceMarkerBodyState extends State { } Future _changeZIndex(MarkerId markerId) async { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; final double current = marker.zIndex; setState(() { markers[markerId] = marker.copyWith( @@ -259,7 +255,7 @@ class PlaceMarkerBodyState extends State { } void _setMarkerIcon(MarkerId markerId, BitmapDescriptor assetIcon) { - final AdvancedMarker marker = markers[markerId]!; + final Marker marker = markers[markerId]!; setState(() { markers[markerId] = marker.copyWith( iconParam: assetIcon, @@ -273,6 +269,40 @@ class PlaceMarkerBodyState extends State { return BytesMapBitmap(bytes.buffer.asUint8List()); } + /// Return the mapId to use for the GoogleMap + String? get mapId => null; + + /// Create a marker with given parameters + Marker createMarker({ + required MarkerId markerId, + required LatLng position, + required InfoWindow infoWindow, + required VoidCallback onTap, + required ValueChanged? onDragEnd, + required ValueChanged? onDrag, + }) { + return Marker( + markerId: markerId, + position: position, + infoWindow: infoWindow, + onTap: onTap, + onDrag: onDrag, + onDragEnd: onDragEnd, + ); + } + + /// Perform customizations of the [marker] to mark it as selected or not + Marker getSelectedMarker(Marker marker, bool isSelected) { + return marker.copyWith( + iconParam: isSelected + ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) + : BitmapDescriptor.defaultMarker, + ); + } + + /// Optional header to be shown above the map + Widget getHeader() => const SizedBox.shrink(); + @override Widget build(BuildContext context) { final MarkerId? selectedId = selectedMarker; @@ -281,8 +311,12 @@ class PlaceMarkerBodyState extends State { mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ + getHeader(), Expanded( child: ExampleGoogleMap( + mapId: mapId, + markerType: + mapId != null ? MarkerType.advanced : MarkerType.legacy, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.211), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index db42cc0d522..f539ce26048 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -551,6 +551,7 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { required PlatformMapConfiguration mapConfiguration, required MapWidgetConfiguration widgetConfiguration, MapObjects mapObjects = const MapObjects(), + MarkerType markerType = MarkerType.legacy, }) { assert( mapObjects.groundOverlays.every((GroundOverlay groundOverlay) => @@ -637,6 +638,7 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { required MapWidgetConfiguration widgetConfiguration, MapConfiguration mapConfiguration = const MapConfiguration(), MapObjects mapObjects = const MapObjects(), + MarkerType markerType = MarkerType.legacy, }) { return _buildView( creationId, @@ -662,13 +664,16 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { Set clusterManagers = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, + MarkerType markerType = MarkerType.legacy, }) { return _buildView( creationId, onPlatformViewCreated, widgetConfiguration: MapWidgetConfiguration( - initialCameraPosition: initialCameraPosition, - textDirection: textDirection), + initialCameraPosition: initialCameraPosition, + textDirection: textDirection, + markerType: markerType, + ), mapObjects: MapObjects( markers: markers, polygons: polygons, @@ -677,6 +682,7 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { clusterManagers: clusterManagers, tileOverlays: tileOverlays), mapConfiguration: _platformMapConfigurationFromOptionsJson(mapOptions), + markerType: markerType, ); } @@ -693,6 +699,7 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { Set clusterManagers = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, + MarkerType markerType = MarkerType.legacy, }) { return buildViewWithTextDirection( creationId, @@ -707,6 +714,7 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { clusterManagers: clusterManagers, gestureRecognizers: gestureRecognizers, mapOptions: mapOptions, + markerType: markerType, ); } @@ -802,7 +810,7 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { clusterManagerId: marker.clusterManagerId?.value, isAdvanced: marker is AdvancedMarker, collisionBehavior: marker is AdvancedMarker - ? _platformPlatformMarkerCollisionBehaviorFromMarkerCollisionBehavior( + ? _platformMarkerCollisionBehaviorFromMarkerCollisionBehavior( marker.collisionBehavior, ) : PlatformMarkerCollisionBehavior.required, @@ -1433,7 +1441,7 @@ PlatformPatternItem platformPatternItemFromPatternItem(PatternItem item) { @visibleForTesting PlatformMarkerCollisionBehavior - _platformPlatformMarkerCollisionBehaviorFromMarkerCollisionBehavior( + _platformMarkerCollisionBehaviorFromMarkerCollisionBehavior( MarkerCollisionBehavior markerCollisionBehavior, ) { switch (markerCollisionBehavior) { diff --git a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart index 28c7d7bc354..302aca275a6 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart @@ -967,11 +967,15 @@ void main() { () async { final GoogleMapsFlutterAndroid maps = GoogleMapsFlutterAndroid(); maps.useAndroidViewSurface = false; - final Widget widget = maps.buildViewWithConfiguration(1, (int _) {}, - widgetConfiguration: const MapWidgetConfiguration( - initialCameraPosition: - CameraPosition(target: LatLng(0, 0), zoom: 1), - textDirection: TextDirection.ltr)); + final Widget widget = maps.buildViewWithConfiguration( + 1, + (int _) {}, + widgetConfiguration: const MapWidgetConfiguration( + initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), + textDirection: TextDirection.ltr, + markerType: MarkerType.legacy, + ), + ); expect(widget, isA()); }, @@ -1211,9 +1215,10 @@ void main() { final Widget widget = maps.buildViewWithConfiguration(1, (int _) {}, widgetConfiguration: const MapWidgetConfiguration( - initialCameraPosition: - CameraPosition(target: LatLng(0, 0), zoom: 1), - textDirection: TextDirection.ltr)); + initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), + textDirection: TextDirection.ltr, + markerType: MarkerType.legacy, + )); expect(widget, isA()); }); @@ -1221,11 +1226,15 @@ void main() { testWidgets('Defaults to AndroidView', (WidgetTester tester) async { final GoogleMapsFlutterAndroid maps = GoogleMapsFlutterAndroid(); - final Widget widget = maps.buildViewWithConfiguration(1, (int _) {}, - widgetConfiguration: const MapWidgetConfiguration( - initialCameraPosition: - CameraPosition(target: LatLng(0, 0), zoom: 1), - textDirection: TextDirection.ltr)); + final Widget widget = maps.buildViewWithConfiguration( + 1, + (int _) {}, + widgetConfiguration: const MapWidgetConfiguration( + initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), + textDirection: TextDirection.ltr, + markerType: MarkerType.legacy, + ), + ); expect(widget, isA()); }); @@ -1263,9 +1272,10 @@ void main() { await tester.pumpWidget(maps.buildViewWithConfiguration(1, (int id) {}, widgetConfiguration: const MapWidgetConfiguration( - initialCameraPosition: - CameraPosition(target: LatLng(0, 0), zoom: 1), - textDirection: TextDirection.ltr), + initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), + textDirection: TextDirection.ltr, + markerType: MarkerType.legacy, + ), mapConfiguration: const MapConfiguration(mapId: cloudMapId))); expect( diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart index 254a5444dc7..0b3c6a87fc8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart @@ -647,13 +647,16 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { Set clusterManagers = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, + MarkerType markerType = MarkerType.legacy, }) { return _buildView( creationId, onPlatformViewCreated, widgetConfiguration: MapWidgetConfiguration( - initialCameraPosition: initialCameraPosition, - textDirection: textDirection), + initialCameraPosition: initialCameraPosition, + textDirection: textDirection, + markerType: markerType, + ), mapObjects: MapObjects( markers: markers, polygons: polygons, @@ -678,6 +681,7 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { Set clusterManagers = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, + MarkerType markerType = MarkerType.legacy, }) { return buildViewWithTextDirection( creationId, @@ -692,6 +696,7 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { clusterManagers: clusterManagers, gestureRecognizers: gestureRecognizers, mapOptions: mapOptions, + markerType: markerType, ); } } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart index 5a978309e48..2ee04ec055e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart @@ -453,6 +453,7 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface { // TODO(stuartmorgan): Replace with a structured type that's part of the // interface. See https://github.com/flutter/flutter/issues/70330. Map mapOptions = const {}, + MarkerType markerType = MarkerType.legacy, }) { throw UnimplementedError('buildView() has not been implemented.'); } @@ -479,6 +480,7 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface { Set circles = const {}, Set tileOverlays = const {}, Map mapOptions = const {}, + MarkerType markerType = MarkerType.legacy, }) { return buildView( creationId, @@ -491,6 +493,7 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface { tileOverlays: tileOverlays, gestureRecognizers: gestureRecognizers, mapOptions: mapOptions, + markerType: markerType, ); } @@ -514,6 +517,7 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface { tileOverlays: mapObjects.tileOverlays, gestureRecognizers: widgetConfiguration.gestureRecognizers, mapOptions: jsonForMapConfiguration(mapConfiguration), + markerType: widgetConfiguration.markerType, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart index 58b85a1a923..f19232eaace 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart @@ -983,6 +983,7 @@ class BytesMapBitmap extends MapBitmap { } /// Represents a [BitmapDescriptor] that is created from a pin configuration. +/// Can only be used with [AdvancedMarker]s. /// /// The [backgroundColor] and [borderColor] are used to define the color of the /// standard pin marker. diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart index 86419e6a8ca..0f04e7b26a1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart @@ -18,8 +18,8 @@ class MapWidgetConfiguration { const MapWidgetConfiguration({ required this.initialCameraPosition, required this.textDirection, + required this.markerType, this.gestureRecognizers = const >{}, - this.markerType = MarkerType.legacy, }); /// The initial camera position to display. diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart index a49bec548a7..fda0eb2896c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart @@ -77,6 +77,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0.0, 0.0)), textDirection: TextDirection.ltr, + markerType: MarkerType.legacy, ), ), isA(), @@ -180,6 +181,7 @@ class BuildViewGoogleMapsFlutterPlatform extends GoogleMapsFlutterPlatform { Set>? gestureRecognizers = const >{}, Map mapOptions = const {}, + MarkerType markerType = MarkerType.legacy, }) { return const Text(''); } From 26c1493f400675e7777f080b1cefaa84a55a0415 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:04:44 +0300 Subject: [PATCH 026/130] Add capability check (iOS) --- .../gradle/wrapper/gradle-wrapper.properties | 1 + .../lib/example_google_map.dart | 11 +++++++ .../ios/Classes/GoogleMapController.m | 6 ++++ .../ios/Classes/messages.g.h | 8 +++-- .../ios/Classes/messages.g.m | 30 ++++++++++++++++--- .../lib/src/google_maps_flutter_ios.dart | 14 +++++++-- .../lib/src/messages.g.dart | 30 +++++++++++++++++++ .../pigeons/messages.dart | 4 +++ .../test/google_maps_flutter_ios_test.dart | 8 +++-- 9 files changed, 101 insertions(+), 11 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/android/gradle/wrapper/gradle-wrapper.properties diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/gradle/wrapper/gradle-wrapper.properties b/packages/google_maps_flutter/google_maps_flutter_android/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000000..87c380463c7 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1 @@ +#distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip \ No newline at end of file diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart index fcd9ef7e34e..8994a3d18f6 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart @@ -215,6 +215,12 @@ class ExampleGoogleMapController { return GoogleMapsFlutterPlatform.instance.getStyleError(mapId: mapId); } + /// Returns true if [AdvancedMarker]s can be used with this map + Future isAdvancedMarkersAvailable() { + return GoogleMapsFlutterPlatform.instance + .isAdvancedMarkersAvailable(mapId: mapId); + } + /// Disposes of the platform resources void dispose() { GoogleMapsFlutterPlatform.instance.dispose(mapId: mapId); @@ -260,6 +266,7 @@ class ExampleGoogleMap extends StatefulWidget { this.onCameraMoveStarted, this.tileOverlays = const {}, this.groundOverlays = const {}, + this.markerType = MarkerType.legacy, this.onCameraMove, this.onCameraIdle, this.onTap, @@ -385,6 +392,9 @@ class ExampleGoogleMap extends StatefulWidget { /// The locally configured style for the map. final String? style; + /// The type of marker to use (legacy or advanced) + final MarkerType markerType; + /// Creates a [State] for this [ExampleGoogleMap]. @override State createState() => _ExampleGoogleMapState(); @@ -417,6 +427,7 @@ class _ExampleGoogleMapState extends State { TextDirection.ltr, initialCameraPosition: widget.initialCameraPosition, gestureRecognizers: widget.gestureRecognizers, + markerType: widget.markerType, ), mapObjects: MapObjects( markers: widget.markers, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m index 52412464127..210998a3d80 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m @@ -731,6 +731,12 @@ - (nullable FlutterStandardTypedData *)takeSnapshotWithError: return imageData ? [FlutterStandardTypedData typedDataWithBytes:imageData] : nil; } +- (nullable NSNumber *)isAdvancedMarkersAvailable:(FlutterError *_Nullable __autoreleasing *_Nonnull) error { + NSUInteger advancedMarkerFlag = self.controller.mapView.mapCapabilities & GMSMapCapabilityFlagsAdvancedMarkers; + BOOL boolValue = advancedMarkerFlag != 0; + return [NSNumber numberWithBool:boolValue]; +} + @end #pragma mark - diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h index 0d1c3935e8a..05867c61ad8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h @@ -505,7 +505,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled trafficEnabled:(nullable NSNumber *)trafficEnabled buildingsEnabled:(nullable NSNumber *)buildingsEnabled - cloudMapId:(nullable NSString *)cloudMapId + mapId:(nullable NSString *)mapId style:(nullable NSString *)style; @property(nonatomic, strong, nullable) NSNumber *compassEnabled; @property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds *cameraTargetBounds; @@ -522,7 +522,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @property(nonatomic, strong, nullable) NSNumber *indoorViewEnabled; @property(nonatomic, strong, nullable) NSNumber *trafficEnabled; @property(nonatomic, strong, nullable) NSNumber *buildingsEnabled; -@property(nonatomic, copy, nullable) NSString *cloudMapId; +@property(nonatomic, copy, nullable) NSString *mapId; @property(nonatomic, copy, nullable) NSString *style; @end @@ -763,6 +763,10 @@ NSObject *FGMGetMessagesCodec(void); /// Takes a snapshot of the map and returns its image data. - (nullable FlutterStandardTypedData *)takeSnapshotWithError: (FlutterError *_Nullable *_Nonnull)error; +/// Returns true if the map supports advanced markers +/// +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)isAdvancedMarkersAvailable:(FlutterError *_Nullable *_Nonnull)error; @end extern void SetUpFGMMapsApi(id binaryMessenger, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m index ccf0735ec94..1ea8a4a3f7a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m @@ -1232,7 +1232,7 @@ + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled trafficEnabled:(nullable NSNumber *)trafficEnabled buildingsEnabled:(nullable NSNumber *)buildingsEnabled - cloudMapId:(nullable NSString *)cloudMapId + mapId:(nullable NSString *)mapId style:(nullable NSString *)style { FGMPlatformMapConfiguration *pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; pigeonResult.compassEnabled = compassEnabled; @@ -1250,7 +1250,7 @@ + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled pigeonResult.indoorViewEnabled = indoorViewEnabled; pigeonResult.trafficEnabled = trafficEnabled; pigeonResult.buildingsEnabled = buildingsEnabled; - pigeonResult.cloudMapId = cloudMapId; + pigeonResult.mapId = mapId; pigeonResult.style = style; return pigeonResult; } @@ -1271,7 +1271,7 @@ + (FGMPlatformMapConfiguration *)fromList:(NSArray *)list { pigeonResult.indoorViewEnabled = GetNullableObjectAtIndex(list, 12); pigeonResult.trafficEnabled = GetNullableObjectAtIndex(list, 13); pigeonResult.buildingsEnabled = GetNullableObjectAtIndex(list, 14); - pigeonResult.cloudMapId = GetNullableObjectAtIndex(list, 15); + pigeonResult.mapId = GetNullableObjectAtIndex(list, 15); pigeonResult.style = GetNullableObjectAtIndex(list, 16); return pigeonResult; } @@ -1295,7 +1295,7 @@ + (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray *)list { self.indoorViewEnabled ?: [NSNull null], self.trafficEnabled ?: [NSNull null], self.buildingsEnabled ?: [NSNull null], - self.cloudMapId ?: [NSNull null], + self.mapId ?: [NSNull null], self.style ?: [NSNull null], ]; } @@ -2510,6 +2510,28 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, [channel setMessageHandler:nil]; } } + /// Returns true if the map supports advanced markers + { + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.isAdvancedMarkersAvailable", + messageChannelSuffix] + binaryMessenger:binaryMessenger + codec:FGMGetMessagesCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(isAdvancedMarkersAvailable:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(isAdvancedMarkersAvailable:)", + api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + NSNumber *output = [api isAdvancedMarkersAvailable:&error]; + callback(wrapResult(output, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } } @interface FGMMapsCallbackApi () @property(nonatomic, strong) NSObject *binaryMessenger; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index 7cb38ed9664..dd541f67f9f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -483,6 +483,11 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { return _hostApi(mapId).getLastStyleError(); } + @override + Future isAdvancedMarkersAvailable({required int mapId}) { + return _hostApi(mapId).isAdvancedMarkersAvailable(); + } + Widget _buildView( int creationId, PlatformViewCreatedCallback onPlatformViewCreated, { @@ -561,13 +566,16 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { Set tileOverlays = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, + MarkerType markerType = MarkerType.legacy, }) { return _buildView( creationId, onPlatformViewCreated, widgetConfiguration: MapWidgetConfiguration( - initialCameraPosition: initialCameraPosition, - textDirection: textDirection), + initialCameraPosition: initialCameraPosition, + textDirection: textDirection, + markerType: markerType, + ), mapObjects: MapObjects( markers: markers, polygons: polygons, @@ -590,6 +598,7 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { Set tileOverlays = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, + MarkerType markerType = MarkerType.legacy, }) { return buildViewWithTextDirection( creationId, @@ -603,6 +612,7 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { tileOverlays: tileOverlays, gestureRecognizers: gestureRecognizers, mapOptions: mapOptions, + markerType: markerType, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart index 56309970411..673815e21b6 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart @@ -2400,6 +2400,36 @@ class MapsApi { return (pigeonVar_replyList[0] as Uint8List?); } } + + /// Returns true if the map supports advanced markers + Future isAdvancedMarkersAvailable() async { + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( + __pigeon_channelName, + pigeonChannelCodec, + binaryMessenger: __pigeon_binaryMessenger, + ); + final List? __pigeon_replyList = + await __pigeon_channel.send(null) as List?; + if (__pigeon_replyList == null) { + throw _createConnectionError(__pigeon_channelName); + } else if (__pigeon_replyList.length > 1) { + throw PlatformException( + code: __pigeon_replyList[0]! as String, + message: __pigeon_replyList[1] as String?, + details: __pigeon_replyList[2], + ); + } else if (__pigeon_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (__pigeon_replyList[0] as bool?)!; + } + } } /// Interface for calls from the native SDK to Dart. diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index fbf2908211b..269588877f3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -694,6 +694,10 @@ abstract class MapsApi { /// Takes a snapshot of the map and returns its image data. Uint8List? takeSnapshot(); + + /// Returns true if the map supports advanced markers + @ObjCSelector('isAdvancedMarkersAvailable') + bool isAdvancedMarkersAvailable(); } /// Interface for calls from the native SDK to Dart. diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart index f037d141bce..2e55e85bcca 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart @@ -1186,9 +1186,11 @@ void main() { textDirection: TextDirection.ltr, child: maps.buildViewWithConfiguration(1, (int id) {}, widgetConfiguration: const MapWidgetConfiguration( - initialCameraPosition: - CameraPosition(target: LatLng(0, 0), zoom: 1), - textDirection: TextDirection.ltr), + initialCameraPosition: + CameraPosition(target: LatLng(0, 0), zoom: 1), + textDirection: TextDirection.ltr, + markerType: MarkerType.legacy, + ), mapConfiguration: const MapConfiguration(mapId: cloudMapId)))); expect( From abed4b3a22b391fac2f1043d2840efd173e1f321 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 7 Oct 2024 12:32:28 +0300 Subject: [PATCH 027/130] Add collision behavior support --- .../ios/Classes/GoogleMapController.m | 10 ++++++---- .../ios/Classes/GoogleMapMarkerController.m | 13 ++++++++++++- .../lib/src/types/advanced_marker.dart | 5 +++++ 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m index 210998a3d80..843a2a82819 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m @@ -731,10 +731,12 @@ - (nullable FlutterStandardTypedData *)takeSnapshotWithError: return imageData ? [FlutterStandardTypedData typedDataWithBytes:imageData] : nil; } -- (nullable NSNumber *)isAdvancedMarkersAvailable:(FlutterError *_Nullable __autoreleasing *_Nonnull) error { - NSUInteger advancedMarkerFlag = self.controller.mapView.mapCapabilities & GMSMapCapabilityFlagsAdvancedMarkers; - BOOL boolValue = advancedMarkerFlag != 0; - return [NSNumber numberWithBool:boolValue]; +- (nullable NSNumber *)isAdvancedMarkersAvailable: + (FlutterError *_Nullable __autoreleasing *_Nonnull)error { + NSUInteger advancedMarkerFlag = + self.controller.mapView.mapCapabilities & GMSMapCapabilityFlagsAdvancedMarkers; + BOOL boolValue = advancedMarkerFlag != 0; + return [NSNumber numberWithBool:boolValue]; } @end diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m index 4db08d52e89..ae802732e16 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m @@ -107,6 +107,13 @@ - (void)setZIndex:(int)zIndex { self.marker.zIndex = zIndex; } +- (void)setCollisionBehavior:(int)collisionBehavior { + if ([self.marker isKindOfClass:[GMSAdvancedMarker class]]) { + GMSCollisionBehavior collitionBehaviorValue = (GMSCollisionBehavior)collisionBehavior; + [(GMSAdvancedMarker *)self.marker setCollisionBehavior:(collitionBehaviorValue)]; + } +} + - (void)updateFromPlatformMarker:(FGMPlatformMarker *)platformMarker registrar:(NSObject *)registrar screenScale:(CGFloat)screenScale { @@ -120,6 +127,7 @@ - (void)updateFromPlatformMarker:(FGMPlatformMarker *)platformMarker [self setPosition:FGMGetCoordinateForPigeonLatLng(platformMarker.position)]; [self setRotation:platformMarker.rotation]; [self setZIndex:platformMarker.zIndex]; + [self setCollisionBehavior:platformMarker.collisionBehavior] FGMPlatformInfoWindow *infoWindow = platformMarker.infoWindow; [self setInfoWindowAnchor:FGMGetCGPointForPigeonPoint(infoWindow.anchor)]; if (infoWindow.title) { @@ -169,7 +177,10 @@ - (void)addMarker:(FGMPlatformMarker *)markerToAdd { CLLocationCoordinate2D position = FGMGetCoordinateForPigeonLatLng(markerToAdd.position); NSString *markerIdentifier = markerToAdd.markerId; NSString *clusterManagerIdentifier = markerToAdd.clusterManagerId; - GMSMarker *marker = [GMSMarker markerWithPosition:position]; + NSNumber *isAdvanced = markerToAdd[@"isAdvanced"]; + GMSMarker *marker = isAdvanced ? [GMSAdvancedMarker markerWithPosition:position] + : [GMSMarker markerWithPosition:position]; + FLTGoogleMapMarkerController *controller = [[FLTGoogleMapMarkerController alloc] initWithMarker:marker markerIdentifier:markerIdentifier diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart index f4ce20f38ff..6269bda6061 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart @@ -109,6 +109,11 @@ class AdvancedMarker extends Marker { } } + // Add a flag indicating that this is an advanced marker. This might be used + // by platform implementations to distinguish between legacy and advanced + // markers + addIfPresent('isAdvanced', true); + addIfPresent('markerId', markerId.value); addIfPresent('alpha', alpha); addIfPresent('anchor', offsetToJson(anchor)); From 9f7f624f18aface74ffc734111da00e89ae50ca8 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:21:48 +0300 Subject: [PATCH 028/130] Remove isAdvanced flag from AdvancedMarker class --- .../ios14/integration_test/google_maps_test.dart | 4 ++-- .../maps_example_dart/lib/example_google_map.dart | 10 +--------- .../shared/maps_example_dart/lib/map_map_id.dart | 2 +- .../ios/Classes/GoogleMapController.m | 4 +++- .../ios/Classes/GoogleMapMarkerController.h | 3 ++- .../ios/Classes/GoogleMapMarkerController.m | 11 +++++++---- .../lib/src/google_maps_flutter_ios.dart | 10 ++++++++++ .../google_maps_flutter_ios/pigeons/messages.dart | 1 + .../method_channel_google_maps_flutter.dart | 1 + .../lib/src/types/advanced_marker.dart | 5 ----- 10 files changed, 28 insertions(+), 23 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart index 9c700671465..797210a0a04 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart @@ -21,7 +21,7 @@ const CameraPosition _kInitialCameraPosition = CameraPosition( target: _kInitialMapCenter, zoom: _kInitialZoomLevel, ); -const String _kCloudMapId = '000000000000000'; // Dummy map ID. +const String _kMapId = '000000000000000'; // Dummy map ID. // The tolerance value for floating-point comparisons in the tests. // This value was selected as the minimum possible value that the test passes. @@ -1138,7 +1138,7 @@ void main() { child: ExampleGoogleMap( key: key, initialCameraPosition: _kInitialCameraPosition, - cloudMapId: _kCloudMapId, + mapId: _kMapId, ), )); }); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart index 8994a3d18f6..487dfdb27d2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart @@ -272,7 +272,6 @@ class ExampleGoogleMap extends StatefulWidget { this.onTap, this.onLongPress, this.mapId, - @Deprecated('cloudMapId is deprecated. Use mapId instead') this.cloudMapId, this.style, }); @@ -382,13 +381,6 @@ class ExampleGoogleMap extends StatefulWidget { /// for more details. final String? mapId; - /// Identifier that's associated with a specific cloud-based map style. - /// - /// See https://developers.google.com/maps/documentation/get-map-id - /// for more details. - @Deprecated('cloudMapId is deprecated. Use mapId instead') - final String? cloudMapId; - /// The locally configured style for the map. final String? style; @@ -613,7 +605,7 @@ MapConfiguration _configurationFromMapWidget(ExampleGoogleMap map) { indoorViewEnabled: map.indoorViewEnabled, trafficEnabled: map.trafficEnabled, buildingsEnabled: map.buildingsEnabled, - mapId: map.mapId ?? map.cloudMapId, + mapId: map.mapId, style: map.style, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/map_map_id.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/map_map_id.dart index 037bafd8a35..fd46cf500c3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/map_map_id.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/map_map_id.dart @@ -54,7 +54,7 @@ class MapIdBodyState extends State { zoom: 7.0, ), key: _key, - cloudMapId: _mapId, + mapId: _mapId, ); final List columnChildren = [ diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m index 843a2a82819..cbd5f4a9d12 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m @@ -162,6 +162,7 @@ - (instancetype)initWithMapView:(GMSMapView *_Nonnull)mapView NSString *pigeonSuffix = [NSString stringWithFormat:@"%lld", viewId]; _dartCallbackHandler = [[FGMMapsCallbackApi alloc] initWithBinaryMessenger:registrar.messenger messageChannelSuffix:pigeonSuffix]; + FGMPlatformMarkerType markerType = creationParameters.markerType; _mapView.delegate = self; _mapView.paddingAdjustmentBehavior = kGMSMapViewPaddingAdjustmentBehaviorNever; _registrar = registrar; @@ -171,7 +172,8 @@ - (instancetype)initWithMapView:(GMSMapView *_Nonnull)mapView _markersController = [[FLTMarkersController alloc] initWithMapView:_mapView callbackHandler:_dartCallbackHandler clusterManagersController:_clusterManagersController - registrar:registrar]; + registrar:registrar + markerType:markerType]; _polygonsController = [[FLTPolygonsController alloc] initWithMapView:_mapView callbackHandler:_dartCallbackHandler registrar:registrar]; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.h index 3b090a3ed02..4ad7ef80b1e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.h @@ -28,7 +28,8 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithMapView:(GMSMapView *)mapView callbackHandler:(FGMMapsCallbackApi *)callbackHandler clusterManagersController:(nullable FGMClusterManagersController *)clusterManagersController - registrar:(NSObject *)registrar; + registrar:(NSObject *)registrar + markerType:(FGMPlatformMarkerType)markerType; - (void)addMarkers:(NSArray *)markersToAdd; - (void)changeMarkers:(NSArray *)markersToChange; - (void)removeMarkersWithIdentifiers:(NSArray *)identifiers; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m index ae802732e16..27fec356733 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m @@ -147,6 +147,7 @@ @interface FLTMarkersController () @property(weak, nonatomic, nullable) FGMClusterManagersController *clusterManagersController; @property(weak, nonatomic) NSObject *registrar; @property(weak, nonatomic) GMSMapView *mapView; +@property(nonatomic) FGMPlatformMarkerType markerType; @end @@ -155,7 +156,8 @@ @implementation FLTMarkersController - (instancetype)initWithMapView:(GMSMapView *)mapView callbackHandler:(FGMMapsCallbackApi *)callbackHandler clusterManagersController:(nullable FGMClusterManagersController *)clusterManagersController - registrar:(NSObject *)registrar { + registrar:(NSObject *)registrar + markerType:(FGMPlatformMarkerType)markerType { self = [super init]; if (self) { _callbackHandler = callbackHandler; @@ -163,6 +165,7 @@ - (instancetype)initWithMapView:(GMSMapView *)mapView _clusterManagersController = clusterManagersController; _markerIdentifierToController = [[NSMutableDictionary alloc] init]; _registrar = registrar; + _markerType = markerType; } return self; } @@ -177,9 +180,9 @@ - (void)addMarker:(FGMPlatformMarker *)markerToAdd { CLLocationCoordinate2D position = FGMGetCoordinateForPigeonLatLng(markerToAdd.position); NSString *markerIdentifier = markerToAdd.markerId; NSString *clusterManagerIdentifier = markerToAdd.clusterManagerId; - NSNumber *isAdvanced = markerToAdd[@"isAdvanced"]; - GMSMarker *marker = isAdvanced ? [GMSAdvancedMarker markerWithPosition:position] - : [GMSMarker markerWithPosition:position]; + GMSMarker *marker = (self.markerType == FGMPlatformMarkerTypeAdvanced) + ? [GMSAdvancedMarker markerWithPosition:position] + : [GMSMarker markerWithPosition:position]; FLTGoogleMapMarkerController *controller = [[FLTGoogleMapMarkerController alloc] initWithMarker:marker diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index dd541f67f9f..381f29ca2e8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -524,6 +524,8 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { initialGroundOverlays: mapObjects.groundOverlays .map(_platformGroundOverlayFromGroundOverlay) .toList(), + markerType: + _platformMarkerTypeFromMarkerType(widgetConfiguration.markerType), ); return UiKitView( @@ -773,6 +775,14 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { identifier: clusterManager.clusterManagerId.value); } + static PlatformMarkerType _platformMarkerTypeFromMarkerType( + MarkerType markerType) { + return switch (markerType) { + MarkerType.legacy => PlatformMarkerType.legacy, + MarkerType.advanced => PlatformMarkerType.advanced, + }; + } + static PlatformCameraUpdate _platformCameraUpdateFromCameraUpdate( CameraUpdate update) { switch (update.updateType) { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index 269588877f3..770ef70c020 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -399,6 +399,7 @@ class PlatformMapViewCreationParams { required this.initialTileOverlays, required this.initialClusterManagers, required this.initialGroundOverlays, + required this.markerType, }); final PlatformCameraPosition initialCameraPosition; diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart index 0b3c6a87fc8..9175f3f71dc 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart @@ -556,6 +556,7 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { 'circlesToAdd': serializeCircleSet(mapObjects.circles), 'heatmapsToAdd': serializeHeatmapSet(mapObjects.heatmaps), 'tileOverlaysToAdd': serializeTileOverlaySet(mapObjects.tileOverlays), + 'markerType': widgetConfiguration.markerType.index, }; if (defaultTargetPlatform == TargetPlatform.android) { diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart index 6269bda6061..f4ce20f38ff 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart @@ -109,11 +109,6 @@ class AdvancedMarker extends Marker { } } - // Add a flag indicating that this is an advanced marker. This might be used - // by platform implementations to distinguish between legacy and advanced - // markers - addIfPresent('isAdvanced', true); - addIfPresent('markerId', markerId.value); addIfPresent('alpha', alpha); addIfPresent('anchor', offsetToJson(anchor)); From cde0ca1c4e5c19ee49f1ef04924fa2cbf02d8ede Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:07:13 +0300 Subject: [PATCH 029/130] Remove isAdvanced flag from AdvancedMarker on Android --- .../plugins/googlemaps/GoogleMapBuilder.java | 7 +++++-- .../googlemaps/GoogleMapController.java | 7 +++++-- .../plugins/googlemaps/GoogleMapFactory.java | 2 +- .../plugins/googlemaps/MarkersController.java | 9 +++++++-- .../lib/src/google_maps_flutter_android.dart | 19 ++++++++++++++----- .../pigeons/messages.dart | 8 +++++++- 6 files changed, 39 insertions(+), 13 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapBuilder.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapBuilder.java index 75897778f8d..7ee163b0fcf 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapBuilder.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapBuilder.java @@ -12,6 +12,7 @@ import com.google.android.gms.maps.model.CameraPosition; import com.google.android.gms.maps.model.LatLngBounds; import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugins.googlemaps.Messages.PlatformMarkerType; import java.util.List; class GoogleMapBuilder implements GoogleMapOptionsSink { @@ -37,9 +38,11 @@ GoogleMapController build( int id, Context context, BinaryMessenger binaryMessenger, - LifecycleProvider lifecycleProvider) { + LifecycleProvider lifecycleProvider, + PlatformMarkerType markerType) { final GoogleMapController controller = - new GoogleMapController(id, context, binaryMessenger, lifecycleProvider, options); + new GoogleMapController(id, context, binaryMessenger, lifecycleProvider, options, + markerType); controller.init(); controller.setMyLocationEnabled(myLocationEnabled); controller.setMyLocationButtonEnabled(myLocationButtonEnabled); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java index f62a73ec708..eec2d02af9e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java @@ -51,6 +51,7 @@ import io.flutter.plugins.googlemaps.Messages.MapsApi; import io.flutter.plugins.googlemaps.Messages.MapsCallbackApi; import io.flutter.plugins.googlemaps.Messages.MapsInspectorApi; +import io.flutter.plugins.googlemaps.Messages.PlatformMarkerType; import java.io.ByteArrayOutputStream; import java.util.ArrayList; import java.util.List; @@ -117,7 +118,8 @@ class GoogleMapController Context context, BinaryMessenger binaryMessenger, LifecycleProvider lifecycleProvider, - GoogleMapOptions options) { + GoogleMapOptions options, + PlatformMarkerType markerType) { this.id = id; this.context = context; this.options = options; @@ -136,7 +138,8 @@ class GoogleMapController clusterManagersController, assetManager, density, - new Convert.BitmapDescriptorFactoryWrapper()); + new Convert.BitmapDescriptorFactoryWrapper(), + markerType); this.polygonsController = new PolygonsController(flutterApi, density); this.polylinesController = new PolylinesController(flutterApi, assetManager, density); this.circlesController = new CirclesController(flutterApi, density); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java index 2f9563f6eb8..68e235247dc 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java @@ -53,6 +53,6 @@ public PlatformView create(@NonNull Context context, int id, @Nullable Object ar builder.setMapId(mapId); } - return builder.build(id, context, binaryMessenger, lifecycleProvider); + return builder.build(id, context, binaryMessenger, lifecycleProvider, params.getMarkerType()); } } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java index 50ffabf4770..06fff785137 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java @@ -13,6 +13,7 @@ import com.google.android.gms.maps.model.MarkerOptions; import com.google.maps.android.collections.MarkerManager; import io.flutter.plugins.googlemaps.Messages.MapsCallbackApi; +import io.flutter.plugins.googlemaps.Messages.PlatformMarkerType; import java.util.HashMap; import java.util.List; import java.util.Objects; @@ -27,13 +28,15 @@ class MarkersController { private final AssetManager assetManager; private final float density; private final Convert.BitmapDescriptorFactoryWrapper bitmapDescriptorFactoryWrapper; + private PlatformMarkerType markerType; MarkersController( @NonNull MapsCallbackApi flutterApi, ClusterManagersController clusterManagersController, AssetManager assetManager, float density, - Convert.BitmapDescriptorFactoryWrapper bitmapDescriptorFactoryWrapper) { + Convert.BitmapDescriptorFactoryWrapper bitmapDescriptorFactoryWrapper, + @NonNull PlatformMarkerType markerType) { this.markerIdToMarkerBuilder = new HashMap<>(); this.markerIdToController = new HashMap<>(); this.googleMapsMarkerIdToDartMarkerId = new HashMap<>(); @@ -42,6 +45,7 @@ class MarkersController { this.assetManager = assetManager; this.density = density; this.bitmapDescriptorFactoryWrapper = bitmapDescriptorFactoryWrapper; + this.markerType = markerType; } void setCollection(MarkerManager.Collection markerCollection) { @@ -176,8 +180,9 @@ public void onClusterItemRendered(MarkerBuilder markerBuilder, Marker marker) { private void addMarker(@NonNull Messages.PlatformMarker marker) { String markerId = marker.getMarkerId(); String clusterManagerId = marker.getClusterManagerId(); + boolean isAdvancedMarker = markerType == PlatformMarkerType.ADVANCED; MarkerBuilder markerBuilder = new MarkerBuilder(markerId, clusterManagerId, - marker.getIsAdvanced()); + isAdvancedMarker); Convert.interpretMarkerOptions( marker, markerBuilder, assetManager, density, bitmapDescriptorFactoryWrapper); addMarker(markerBuilder); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index f539ce26048..3744263562b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -550,8 +550,8 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { PlatformViewCreatedCallback onPlatformViewCreated, { required PlatformMapConfiguration mapConfiguration, required MapWidgetConfiguration widgetConfiguration, + required MarkerType markerType, MapObjects mapObjects = const MapObjects(), - MarkerType markerType = MarkerType.legacy, }) { assert( mapObjects.groundOverlays.every((GroundOverlay groundOverlay) => @@ -582,6 +582,7 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { initialGroundOverlays: mapObjects.groundOverlays .map(_platformGroundOverlayFromGroundOverlay) .toList(), + markerType: _platformMarkerTypeFromMarkerType(markerType), ); const String viewType = 'plugins.flutter.dev/google_maps_android'; @@ -638,7 +639,6 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { required MapWidgetConfiguration widgetConfiguration, MapConfiguration mapConfiguration = const MapConfiguration(), MapObjects mapObjects = const MapObjects(), - MarkerType markerType = MarkerType.legacy, }) { return _buildView( creationId, @@ -647,6 +647,7 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { mapObjects: mapObjects, mapConfiguration: _platformMapConfigurationFromMapConfiguration(mapConfiguration), + markerType: widgetConfiguration.markerType, ); } @@ -808,9 +809,8 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { zIndex: marker.zIndex, markerId: marker.markerId.value, clusterManagerId: marker.clusterManagerId?.value, - isAdvanced: marker is AdvancedMarker, collisionBehavior: marker is AdvancedMarker - ? _platformMarkerCollisionBehaviorFromMarkerCollisionBehavior( + ? platformMarkerCollisionBehaviorFromMarkerCollisionBehavior( marker.collisionBehavior, ) : PlatformMarkerCollisionBehavior.required, @@ -947,6 +947,13 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { } } + PlatformMarkerType _platformMarkerTypeFromMarkerType(MarkerType markerType) { + return switch (markerType) { + MarkerType.legacy => PlatformMarkerType.legacy, + MarkerType.advanced => PlatformMarkerType.advanced, + }; + } + /// Convert [MapBitmapScaling] from platform interface to [PlatformMapBitmapScaling] Pigeon. @visibleForTesting static PlatformMapBitmapScaling platformMapBitmapScalingFromScaling( @@ -1439,9 +1446,11 @@ PlatformPatternItem platformPatternItemFromPatternItem(PatternItem item) { return PlatformPatternItem(type: PlatformPatternItemType.dot); } +/// Converts a MarkerCollisionBehavior to Pigeon's +/// PlatformMarkerCollisionBehavior @visibleForTesting PlatformMarkerCollisionBehavior - _platformMarkerCollisionBehaviorFromMarkerCollisionBehavior( + platformMarkerCollisionBehaviorFromMarkerCollisionBehavior( MarkerCollisionBehavior markerCollisionBehavior, ) { switch (markerCollisionBehavior) { diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart index eb010b7219d..19af7e9ce73 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart @@ -202,7 +202,6 @@ class PlatformMarker { final String markerId; final String? clusterManagerId; - final bool isAdvanced; final PlatformMarkerCollisionBehavior collisionBehavior; } @@ -449,6 +448,7 @@ class PlatformMapViewCreationParams { required this.initialTileOverlays, required this.initialClusterManagers, required this.initialGroundOverlays, + required this.markerType, }); final PlatformCameraPosition initialCameraPosition; @@ -461,6 +461,12 @@ class PlatformMapViewCreationParams { final List initialTileOverlays; final List initialClusterManagers; final List initialGroundOverlays; + final PlatformMarkerType markerType; +} + +enum PlatformMarkerType { + legacy, + advanced, } /// Pigeon equivalent of MapConfiguration. From 63c0d43162018f7b1a794e0f3698a6de85da8947 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:38:15 +0300 Subject: [PATCH 030/130] Add AdvancedMarker examples (iOS) --- .../lib/advanced_markers_clustering.dart | 4 +- .../example/lib/main.dart | 2 +- .../example/ios14/lib/main.dart | 10 ++ .../example/ios15/lib/main.dart | 10 ++ .../lib/advanced_marker_icons.dart | 46 +++++++ .../lib/advanced_markers_clustering.dart | 76 ++++++++++++ .../maps_example_dart/lib/clustering.dart | 44 +++++-- .../maps_example_dart/lib/marker_icons.dart | 20 +++ .../lib/place_advanced_marker.dart | 117 ++++++++++++++++++ .../maps_example_dart/lib/place_marker.dart | 53 ++++++-- 10 files changed, 362 insertions(+), 20 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart create mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart create mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart index 3e08b006e34..a12a3589d0e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart @@ -7,9 +7,9 @@ import 'page.dart'; /// Page for demonstrating advanced marker clustering support. /// Same as [ClusteringPage] but works with [AdvancedMarker]. -class AdvancedMarkersClustering extends GoogleMapExampleAppPage { +class AdvancedMarkersClusteringPage extends GoogleMapExampleAppPage { /// Default constructor. - const AdvancedMarkersClustering({Key? key}) + const AdvancedMarkersClusteringPage({Key? key}) : super( key: key, const Icon(Icons.place_outlined), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart index 6bd3933c8dc..89b243daddc 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart @@ -55,7 +55,7 @@ final List _allPages = [ const TileOverlayPage(), const GroundOverlayPage(), const ClusteringPage(), - const AdvancedMarkersClustering(), + const AdvancedMarkersClusteringPage(), const MapIdPage(), ]; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart index d1d736a659a..1905bd03a07 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart @@ -3,6 +3,8 @@ // found in the LICENSE file. import 'package:flutter/material.dart'; +import 'package:maps_example_dart/advanced_marker_icons.dart'; +import 'package:maps_example_dart/advanced_markers_clustering.dart'; import 'package:maps_example_dart/animate_camera.dart'; import 'package:maps_example_dart/clustering.dart'; import 'package:maps_example_dart/ground_overlay.dart'; @@ -16,6 +18,7 @@ import 'package:maps_example_dart/marker_icons.dart'; import 'package:maps_example_dart/move_camera.dart'; import 'package:maps_example_dart/padding.dart'; import 'package:maps_example_dart/page.dart'; +import 'package:maps_example_dart/place_advanced_marker.dart'; import 'package:maps_example_dart/place_circle.dart'; import 'package:maps_example_dart/place_marker.dart'; import 'package:maps_example_dart/place_polygon.dart'; @@ -24,6 +27,10 @@ import 'package:maps_example_dart/scrolling_map.dart'; import 'package:maps_example_dart/snapshot.dart'; import 'package:maps_example_dart/tile_overlay.dart'; +/// Map Id is required for some examples to use advanced markers +// ignore: unnecessary_nullable_for_final_variable_declarations, unreachable_from_main +const String? mapId = null; + void main() { runApp(const MaterialApp( home: MapsDemo([ @@ -33,7 +40,9 @@ void main() { AnimateCameraPage(), MoveCameraPage(), PlaceMarkerPage(), + PlaceAdvancedMarkerPage(mapId: mapId), MarkerIconsPage(), + AdvancedMarkerIconsPage(mapId: mapId), ScrollingMapPage(), PlacePolylinePage(), PlacePolygonPage(), @@ -44,6 +53,7 @@ void main() { TileOverlayPage(), GroundOverlayPage(), ClusteringPage(), + AdvancedMarkersClusteringPage(mapId: mapId), MapIdPage(), ]))); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart index d1d736a659a..1905bd03a07 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart @@ -3,6 +3,8 @@ // found in the LICENSE file. import 'package:flutter/material.dart'; +import 'package:maps_example_dart/advanced_marker_icons.dart'; +import 'package:maps_example_dart/advanced_markers_clustering.dart'; import 'package:maps_example_dart/animate_camera.dart'; import 'package:maps_example_dart/clustering.dart'; import 'package:maps_example_dart/ground_overlay.dart'; @@ -16,6 +18,7 @@ import 'package:maps_example_dart/marker_icons.dart'; import 'package:maps_example_dart/move_camera.dart'; import 'package:maps_example_dart/padding.dart'; import 'package:maps_example_dart/page.dart'; +import 'package:maps_example_dart/place_advanced_marker.dart'; import 'package:maps_example_dart/place_circle.dart'; import 'package:maps_example_dart/place_marker.dart'; import 'package:maps_example_dart/place_polygon.dart'; @@ -24,6 +27,10 @@ import 'package:maps_example_dart/scrolling_map.dart'; import 'package:maps_example_dart/snapshot.dart'; import 'package:maps_example_dart/tile_overlay.dart'; +/// Map Id is required for some examples to use advanced markers +// ignore: unnecessary_nullable_for_final_variable_declarations, unreachable_from_main +const String? mapId = null; + void main() { runApp(const MaterialApp( home: MapsDemo([ @@ -33,7 +40,9 @@ void main() { AnimateCameraPage(), MoveCameraPage(), PlaceMarkerPage(), + PlaceAdvancedMarkerPage(mapId: mapId), MarkerIconsPage(), + AdvancedMarkerIconsPage(mapId: mapId), ScrollingMapPage(), PlacePolylinePage(), PlacePolygonPage(), @@ -44,6 +53,7 @@ void main() { TileOverlayPage(), GroundOverlayPage(), ClusteringPage(), + AdvancedMarkersClusteringPage(mapId: mapId), MapIdPage(), ]))); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart new file mode 100644 index 00000000000..4624736bba5 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart @@ -0,0 +1,46 @@ +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +import 'marker_icons.dart'; +import 'page.dart'; + +/// Page that demonstrates how to use custom [AdvanceMarker] icons +class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { + /// Default constructor + const AdvancedMarkerIconsPage({Key? key, required this.mapId}) + : super( + key: key, + const Icon(Icons.image_outlined), + 'Advanced marker icons', + ); + + /// Map Id to use for the GoogleMap + final String? mapId; + + @override + Widget build(BuildContext context) { + return _AdvancedMarkerIconsBody(mapId); + } +} + +class _AdvancedMarkerIconsBody extends MarkerIconsBody { + const _AdvancedMarkerIconsBody(this.providedMapId); + + final String? providedMapId; + + @override + String? get mapId => providedMapId; + + @override + Marker createMarker( + MarkerId markerId, + LatLng position, + BitmapDescriptor icon, + ) { + return AdvancedMarker( + markerId: markerId, + position: position, + icon: icon, + ); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart new file mode 100644 index 00000000000..d6ce1797f58 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart @@ -0,0 +1,76 @@ +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +import 'clustering.dart'; +import 'page.dart'; + +/// Page for demonstrating advanced marker clustering support. +/// Same as [ClusteringPage] but works with [AdvancedMarker]. +class AdvancedMarkersClusteringPage extends GoogleMapExampleAppPage { + /// Default constructor. + const AdvancedMarkersClusteringPage({Key? key, required this.mapId}) + : super( + key: key, + const Icon(Icons.place_outlined), + 'Manage clusters of advanced markers', + ); + + /// Map Id to use for the GoogleMap + final String? mapId; + + @override + Widget build(BuildContext context) { + return _AdvancedMarkerClusteringBody(providedMapId: mapId); + } +} + +/// Same as [ClusteringBody] but works with [AdvancedMarker]. +class _AdvancedMarkerClusteringBody extends ClusteringBody { + const _AdvancedMarkerClusteringBody({required this.providedMapId}); + + final String? providedMapId; + + /// Return the mapId to use for the GoogleMap + @override + String? get mapId => providedMapId; + + @override + Marker createMarker({ + required MarkerId markerId, + required ClusterManagerId clusterManagerId, + required LatLng position, + required InfoWindow infoWindow, + required VoidCallback onTap, + }) { + return AdvancedMarker( + markerId: markerId, + clusterManagerId: clusterManagerId, + position: position, + infoWindow: infoWindow, + onTap: onTap, + icon: BitmapDescriptor.pinConfig( + backgroundColor: Colors.white, + borderColor: Colors.blue, + glyph: Glyph.color(Colors.blue), + ), + ); + } + + @override + Marker getSelectedMarker(Marker marker, bool isSelected) { + assert(marker is AdvancedMarker); + return (marker as AdvancedMarker).copyWith( + iconParam: isSelected + ? BitmapDescriptor.pinConfig( + backgroundColor: Colors.blue, + borderColor: Colors.white, + glyph: Glyph.color(Colors.white), + ) + : BitmapDescriptor.pinConfig( + backgroundColor: Colors.white, + borderColor: Colors.blue, + glyph: Glyph.color(Colors.blue), + ), + ); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart index f6860f7bf42..33e8f6eccba 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart @@ -29,6 +29,35 @@ class ClusteringBody extends StatefulWidget { @override State createState() => ClusteringBodyState(); + + /// Map Id to use for the GoogleMap + String? get mapId => null; + + /// Create a marker that is later added to a cluster + Marker createMarker({ + required MarkerId markerId, + required ClusterManagerId clusterManagerId, + required LatLng position, + required InfoWindow infoWindow, + required VoidCallback onTap, + }) { + return Marker( + markerId: markerId, + clusterManagerId: clusterManagerId, + position: position, + infoWindow: infoWindow, + onTap: onTap, + ); + } + + /// Return selected or unselected state of the given [marker] + Marker getSelectedMarker(Marker marker, bool isSelected) { + return marker.copyWith( + iconParam: isSelected + ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) + : BitmapDescriptor.defaultMarker, + ); + } } /// State of the clustering page. @@ -95,16 +124,12 @@ class ClusteringBodyState extends State { setState(() { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { - final Marker resetOld = markers[previousMarkerId]! - .copyWith(iconParam: BitmapDescriptor.defaultMarker); + final Marker resetOld = + widget.getSelectedMarker(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = tappedMarker.copyWith( - iconParam: BitmapDescriptor.defaultMarkerWithHue( - BitmapDescriptor.hueGreen, - ), - ); + final Marker newMarker = widget.getSelectedMarker(tappedMarker, true); markers[markerId] = newMarker; }); } @@ -159,7 +184,7 @@ class ClusteringBodyState extends State { final double clusterManagerLongitudeOffset = clusterManagerIndex * _clusterManagerLongitudeOffset; - final Marker marker = Marker( + final Marker marker = widget.createMarker( clusterManagerId: clusterManager.clusterManagerId, markerId: markerId, position: LatLng( @@ -208,6 +233,9 @@ class ClusteringBodyState extends State { SizedBox( height: 300.0, child: ExampleGoogleMap( + mapId: widget.mapId, + markerType: + widget.mapId != null ? MarkerType.advanced : MarkerType.legacy, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.25), diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/marker_icons.dart index df4f79205e8..62cc31619b9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/marker_icons.dart @@ -30,6 +30,22 @@ class MarkerIconsBody extends StatefulWidget { @override State createState() => MarkerIconsBodyState(); + + /// Return the mapId to use for the GoogleMap + String? get mapId => null; + + /// Create a marker to be displayed on the map + Marker createMarker( + MarkerId markerId, + LatLng position, + BitmapDescriptor icon, + ) { + return Marker( + markerId: markerId, + position: position, + icon: icon, + ); + } } const LatLng _kMapCenter = LatLng(52.4478, -3.5402); @@ -69,6 +85,10 @@ class MarkerIconsBodyState extends State { width: 350.0, height: 300.0, child: ExampleGoogleMap( + mapId: widget.mapId, + markerType: widget.mapId != null + ? MarkerType.advanced + : MarkerType.legacy, initialCameraPosition: const CameraPosition( target: _kMapCenter, zoom: 7.0, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart new file mode 100644 index 00000000000..e91d14fa995 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart @@ -0,0 +1,117 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +import 'page.dart'; +import 'place_marker.dart'; + +/// Page demonstrating how to use Advanced [Marker] class +class PlaceAdvancedMarkerPage extends GoogleMapExampleAppPage { + /// Default constructor + const PlaceAdvancedMarkerPage({ + Key? key, + required this.mapId, + }) : super(const Icon(Icons.place_outlined), 'Place advanced marker', + key: key); + + /// Map Id to use for the GoogleMap + final String? mapId; + + @override + Widget build(BuildContext context) { + return _PlaceAdvancedMarkerBody(mapId: mapId); + } +} + +class _PlaceAdvancedMarkerBody extends PlaceMarkerBody { + const _PlaceAdvancedMarkerBody({required super.mapId}); + + @override + State createState() => _PlaceAdvancedMarkerBodyState(); +} + +class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { + @override + Marker createMarker({ + required MarkerId markerId, + required LatLng position, + required InfoWindow infoWindow, + required VoidCallback onTap, + required ValueChanged? onDragStart, + required ValueChanged? onDragEnd, + required ValueChanged? onDrag, + }) { + return AdvancedMarker( + markerId: markerId, + position: position, + infoWindow: infoWindow, + onTap: onTap, + onDrag: onDrag, + onDragStart: onDragStart, + onDragEnd: onDragEnd, + icon: _getMarkerBitmapDescriptor(isSelected: false), + ); + } + + @override + Marker getSelectedMarker(Marker marker, bool isSelected) { + return marker.copyWith( + iconParam: _getMarkerBitmapDescriptor(isSelected: isSelected), + ); + } + + BitmapDescriptor _getMarkerBitmapDescriptor({required bool isSelected}) { + return BitmapDescriptor.pinConfig( + backgroundColor: isSelected ? Colors.blue : Colors.white, + borderColor: isSelected ? Colors.white : Colors.blue, + glyph: Glyph.color(isSelected ? Colors.white : Colors.blue), + ); + } + + /// Whether map supports advanced markers. Null indicates capability check + /// is in progress + bool? _isAdvancedMarkersAvailable; + + @override + Widget getHeader() { + return Padding( + padding: const EdgeInsets.all(16), + child: Text( + switch (_isAdvancedMarkersAvailable) { + null => 'Checking map capabilities…', + true => + 'Map capabilities check result:\nthis map supports advanced markers', + false => + "Map capabilities check result:\nthis map doesn't support advanced markers. Please check that map Id is provided and correct map renderer is used", + }, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.bodyLarge?.copyWith( + color: switch (_isAdvancedMarkersAvailable) { + true => Colors.green.shade700, + false => Colors.red, + null => Colors.black, + }, + ), + ), + ); + } + + @override + Widget build(BuildContext context) { + // Check if map is capable of showing advanced markers + if (controller != null) { + GoogleMapsFlutterPlatform.instance + .isAdvancedMarkersAvailable(mapId: controller!.mapId) + .then((bool result) { + setState(() { + _isAdvancedMarkersAvailable = result; + }); + }); + } + + return super.build(context); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart index d282602d8dc..437c189b768 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart @@ -26,7 +26,9 @@ class PlaceMarkerPage extends GoogleMapExampleAppPage { } class PlaceMarkerBody extends StatefulWidget { - const PlaceMarkerBody({super.key}); + const PlaceMarkerBody({super.key, this.mapId}); + + final String? mapId; @override State createState() => PlaceMarkerBodyState(); @@ -62,16 +64,12 @@ class PlaceMarkerBodyState extends State { setState(() { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { - final Marker resetOld = markers[previousMarkerId]! - .copyWith(iconParam: BitmapDescriptor.defaultMarker); + final Marker resetOld = + getSelectedMarker(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = tappedMarker.copyWith( - iconParam: BitmapDescriptor.defaultMarkerWithHue( - BitmapDescriptor.hueGreen, - ), - ); + final Marker newMarker = getSelectedMarker(tappedMarker, true); markers[markerId] = newMarker; markerPosition = null; @@ -141,7 +139,7 @@ class PlaceMarkerBodyState extends State { _markerIdCounter++; final MarkerId markerId = MarkerId(markerIdVal); - final Marker marker = Marker( + final Marker marker = createMarker( markerId: markerId, position: LatLng( center.latitude + sin(_markerIdCounter * pi / 6.0) / 20.0, @@ -292,6 +290,39 @@ class PlaceMarkerBodyState extends State { return BytesMapBitmap(bytes.buffer.asUint8List()); } + /// Create a marker with given parameters + Marker createMarker({ + required MarkerId markerId, + required LatLng position, + required InfoWindow infoWindow, + required VoidCallback onTap, + required ValueChanged? onDragStart, + required ValueChanged? onDragEnd, + required ValueChanged? onDrag, + }) { + return Marker( + markerId: markerId, + position: position, + infoWindow: infoWindow, + onTap: onTap, + onDragStart: onDragStart, + onDrag: onDrag, + onDragEnd: onDragEnd, + ); + } + + /// Perform customizations of the [marker] to mark it as selected or not + Marker getSelectedMarker(Marker marker, bool isSelected) { + return marker.copyWith( + iconParam: isSelected + ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) + : BitmapDescriptor.defaultMarker, + ); + } + + /// Optional header to be shown above the map + Widget getHeader() => const SizedBox.shrink(); + @override Widget build(BuildContext context) { final MarkerId? selectedId = selectedMarker; @@ -302,6 +333,10 @@ class PlaceMarkerBodyState extends State { children: [ Expanded( child: ExampleGoogleMap( + mapId: widget.mapId, + markerType: widget.mapId != null + ? MarkerType.advanced + : MarkerType.legacy, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.211), From b847bc01e348ba3616c07365440a99dd081a91bd Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:01:23 +0300 Subject: [PATCH 031/130] Fix Android and iOS tests --- .../ClusterManagersControllerTest.java | 11 +- .../plugins/googlemaps/ConvertTest.java | 4 +- .../googlemaps/GoogleMapControllerTest.java | 8 +- .../googlemaps/MarkersControllerTest.java | 8 +- .../integration_test/google_maps_tests.dart | 6 +- .../google_maps_flutter_android_test.dart | 191 +++++++++++++++++- .../FGMClusterManagersControllerTests.m | 3 +- .../ios14/ios/RunnerTests/GoogleMapsTests.m | 1 + .../ios15/ios/RunnerTests/GoogleMapsTests.m | 1 + .../lib/src/types/bitmap.dart | 6 +- .../test/types/bitmap_test.dart | 77 ++++++- .../test/types/map_configuration_test.dart | 30 ++- 12 files changed, 324 insertions(+), 22 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java index df4208df5e6..f7f2d076ca6 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java @@ -26,6 +26,7 @@ import com.google.maps.android.collections.MarkerManager; import io.flutter.plugin.common.BinaryMessenger; import io.flutter.plugins.googlemaps.Messages.MapsCallbackApi; +import io.flutter.plugins.googlemaps.Messages.PlatformMarkerCollisionBehavior; import java.io.ByteArrayOutputStream; import java.util.ArrayList; import java.util.Collections; @@ -34,6 +35,7 @@ import java.util.Set; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentMatchers; @@ -100,8 +102,8 @@ public void AddClusterManagersAndMarkers() { clusterManagersToAdd.add(initialClusterManager); controller.addClusterManagers(clusterManagersToAdd); - MarkerBuilder markerBuilder1 = new MarkerBuilder(markerId1, clusterManagerId); - MarkerBuilder markerBuilder2 = new MarkerBuilder(markerId2, clusterManagerId); + MarkerBuilder markerBuilder1 = new MarkerBuilder(markerId1, clusterManagerId, false); + MarkerBuilder markerBuilder2 = new MarkerBuilder(markerId2, clusterManagerId, false); final Messages.PlatformMarker markerData1 = createPlatformMarker(markerId1, location1, clusterManagerId); @@ -140,11 +142,11 @@ public void OnClusterClickCallsMethodChannel() { StaticCluster cluster = new StaticCluster<>(clusterPosition); - MarkerBuilder marker1 = new MarkerBuilder("m_1", clusterManagerId); + MarkerBuilder marker1 = new MarkerBuilder("m_1", clusterManagerId, false); marker1.setPosition(markerPosition1); cluster.add(marker1); - MarkerBuilder marker2 = new MarkerBuilder("m_2", clusterManagerId); + MarkerBuilder marker2 = new MarkerBuilder("m_2", clusterManagerId, false); marker2.setPosition(markerPosition2); cluster.add(marker2); @@ -211,6 +213,7 @@ private Messages.PlatformMarker createPlatformMarker( .setClusterManagerId(clusterManagerId) .setAnchor(anchor) .setInfoWindow(new Messages.PlatformInfoWindow.Builder().setAnchor(anchor).build()) + .setCollisionBehavior(PlatformMarkerCollisionBehavior.REQUIRED) .build(); } } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java index 7590eb53d36..e39320c2df5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java @@ -100,11 +100,11 @@ public void ConvertClusterToPigeonReturnsCorrectData() { StaticCluster cluster = new StaticCluster<>(clusterPosition); - MarkerBuilder marker1 = new MarkerBuilder("m_1", clusterManagerId); + MarkerBuilder marker1 = new MarkerBuilder("m_1", clusterManagerId, false); marker1.setPosition(markerPosition1); cluster.add(marker1); - MarkerBuilder marker2 = new MarkerBuilder("m_2", clusterManagerId); + MarkerBuilder marker2 = new MarkerBuilder("m_2", clusterManagerId, false); marker2.setPosition(markerPosition2); cluster.add(marker2); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java index c03156e68c1..0d93a5c3ca2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java @@ -29,6 +29,7 @@ import com.google.android.gms.maps.model.Marker; import com.google.maps.android.clustering.ClusterManager; import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugins.googlemaps.Messages.PlatformMarkerType; import java.util.ArrayList; import java.util.List; import org.junit.After; @@ -74,7 +75,8 @@ public void before() { // See getGoogleMapControllerWithMockedDependencies for version with dependency injections. public GoogleMapController getGoogleMapController() { GoogleMapController googleMapController = - new GoogleMapController(0, context, mockMessenger, activity::getLifecycle, null); + new GoogleMapController(0, context, mockMessenger, activity::getLifecycle, null, + PlatformMarkerType.LEGACY); googleMapController.init(); return googleMapController; } @@ -219,7 +221,7 @@ public void SetInitialClusterManagers() { @Test public void OnClusterItemRenderedCallsMarkersController() { GoogleMapController googleMapController = getGoogleMapControllerWithMockedDependencies(); - MarkerBuilder markerBuilder = new MarkerBuilder("m_1", "cm_1"); + MarkerBuilder markerBuilder = new MarkerBuilder("m_1", "cm_1", false); final Marker marker = mock(Marker.class); googleMapController.onClusterItemRendered(markerBuilder, marker); verify(mockMarkersController, times(1)).onClusterItemRendered(markerBuilder, marker); @@ -228,7 +230,7 @@ public void OnClusterItemRenderedCallsMarkersController() { @Test public void OnClusterItemClickCallsMarkersController() { GoogleMapController googleMapController = getGoogleMapControllerWithMockedDependencies(); - MarkerBuilder markerBuilder = new MarkerBuilder("m_1", "cm_1"); + MarkerBuilder markerBuilder = new MarkerBuilder("m_1", "cm_1", false); googleMapController.onClusterItemClick(markerBuilder); verify(mockMarkersController, times(1)).onMarkerTap(markerBuilder.markerId()); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java index 1540ebccf69..530ebd9a653 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java @@ -24,6 +24,8 @@ import com.google.maps.android.collections.MarkerManager; import io.flutter.plugin.common.BinaryMessenger; import io.flutter.plugins.googlemaps.Messages.MapsCallbackApi; +import io.flutter.plugins.googlemaps.Messages.PlatformMarkerCollisionBehavior; +import io.flutter.plugins.googlemaps.Messages.PlatformMarkerType; import java.io.ByteArrayOutputStream; import java.util.Collections; import java.util.List; @@ -84,7 +86,8 @@ private static Messages.PlatformMarker.Builder defaultMarkerBuilder() { .setZIndex(0.0) .setConsumeTapEvents(false) .setIcon(icon) - .setInfoWindow(infoWindow); + .setInfoWindow(infoWindow) + .setCollisionBehavior(PlatformMarkerCollisionBehavior.REQUIRED); } @Before @@ -100,7 +103,8 @@ public void setUp() { clusterManagersController, assetManager, density, - bitmapDescriptorFactoryWrapper); + bitmapDescriptorFactoryWrapper, + PlatformMarkerType.LEGACY); googleMap = mock(GoogleMap.class); markerManager = new MarkerManager(googleMap); markerCollection = markerManager.newCollection(); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart index 2576affbce0..c553cb840b2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart @@ -21,7 +21,7 @@ const CameraPosition _kInitialCameraPosition = CameraPosition( target: _kInitialMapCenter, zoom: _kInitialZoomLevel, ); -const String _kCloudMapId = '000000000000000'; // Dummy map ID. +const String _kMapId = '000000000000000'; // Dummy map ID. // The tolerance value for floating-point comparisons in the tests. // This value was selected as the minimum possible value that the test passes. @@ -1280,7 +1280,7 @@ void googleMapsTests() { }); testWidgets( - 'testCloudMapId', + 'testMapId', (WidgetTester tester) async { final Completer mapIdCompleter = Completer(); final Key key = GlobalKey(); @@ -1294,7 +1294,7 @@ void googleMapsTests() { onMapCreated: (ExampleGoogleMapController controller) { mapIdCompleter.complete(controller.mapId); }, - mapId: _kCloudMapId, + mapId: _kMapId, ), ), ); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart index 302aca275a6..43cf0d3fd4a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart @@ -239,6 +239,18 @@ void main() { verify(api.clearTileCache(tileOverlayId)); }); + test('isAdvancedMarkersAvailable calls through', () async { + const int mapId = 1; + final (GoogleMapsFlutterAndroid maps, MockMapsApi api) = + setUpMockMap(mapId: mapId); + when(api.isAdvancedMarkersAvailable()).thenAnswer((_) async => true); + + await maps.isAdvancedMarkersAvailable(mapId: mapId); + final bool isAdvancedMarkersAvailable = + await api.isAdvancedMarkersAvailable(); + expect(isAdvancedMarkersAvailable, isTrue); + }); + test('updateMapConfiguration passes expected arguments', () async { const int mapId = 1; final (GoogleMapsFlutterAndroid maps, MockMapsApi api) = @@ -478,6 +490,94 @@ void main() { } }); + test('updateMarkers passes expected arguments (AdvancedMarkers)', () async { + const int mapId = 1; + final (GoogleMapsFlutterAndroid maps, MockMapsApi api) = + setUpMockMap(mapId: mapId); + + const AdvancedMarker object1 = AdvancedMarker(markerId: MarkerId('1')); + const AdvancedMarker object2old = AdvancedMarker(markerId: MarkerId('2')); + final AdvancedMarker object2new = object2old.copyWith(rotationParam: 42); + const AdvancedMarker object3 = AdvancedMarker(markerId: MarkerId('3')); + await maps.updateMarkers( + MarkerUpdates.from( + {object1, object2old}, + {object2new, object3}, + ), + mapId: mapId); + + final VerificationResult verification = + verify(api.updateMarkers(captureAny, captureAny, captureAny)); + final List toAdd = + verification.captured[0] as List; + final List toChange = + verification.captured[1] as List; + final List toRemove = verification.captured[2] as List; + // Object one should be removed. + expect(toRemove.length, 1); + expect(toRemove.first, object1.markerId.value); + // Object two should be changed. + { + expect(toChange.length, 1); + final List? encoded = toChange.first?.encode() as List?; + expect(encoded?[0], object2new.alpha); + final PlatformOffset? offset = encoded?[1] as PlatformOffset?; + expect(offset?.dx, object2new.anchor.dx); + expect(offset?.dy, object2new.anchor.dy); + expect(encoded?.getRange(2, 6).toList(), [ + object2new.consumeTapEvents, + object2new.draggable, + object2new.flat, + object2new.icon.toJson(), + ]); + final PlatformInfoWindow? window = encoded?[6] as PlatformInfoWindow?; + expect(window?.title, object2new.infoWindow.title); + expect(window?.snippet, object2new.infoWindow.snippet); + expect(window?.anchor.dx, object2new.infoWindow.anchor.dx); + expect(window?.anchor.dy, object2new.infoWindow.anchor.dy); + final PlatformLatLng? latLng = encoded?[7] as PlatformLatLng?; + expect(latLng?.latitude, object2new.position.latitude); + expect(latLng?.longitude, object2new.position.longitude); + expect(encoded?.getRange(8, 13), [ + object2new.rotation, + object2new.visible, + object2new.zIndex, + object2new.markerId.value, + object2new.clusterManagerId?.value, + ]); + } + // Object 3 should be added. + { + expect(toAdd.length, 1); + final List? encoded = toAdd.first?.encode() as List?; + expect(encoded?[0], object3.alpha); + final PlatformOffset? offset = encoded?[1] as PlatformOffset?; + expect(offset?.dx, object3.anchor.dx); + expect(offset?.dy, object3.anchor.dy); + expect(encoded?.getRange(2, 6).toList(), [ + object3.consumeTapEvents, + object3.draggable, + object3.flat, + object3.icon.toJson(), + ]); + final PlatformInfoWindow? window = encoded?[6] as PlatformInfoWindow?; + expect(window?.title, object3.infoWindow.title); + expect(window?.snippet, object3.infoWindow.snippet); + expect(window?.anchor.dx, object3.infoWindow.anchor.dx); + expect(window?.anchor.dy, object3.infoWindow.anchor.dy); + final PlatformLatLng? latLng = encoded?[7] as PlatformLatLng?; + expect(latLng?.latitude, object3.position.latitude); + expect(latLng?.longitude, object3.position.longitude); + expect(encoded?.getRange(8, 13), [ + object3.rotation, + object3.visible, + object3.zIndex, + object3.markerId.value, + object3.clusterManagerId?.value, + ]); + } + }); + test('updatePolygons passes expected arguments', () async { const int mapId = 1; final (GoogleMapsFlutterAndroid maps, MockMapsApi api) = @@ -1276,7 +1376,9 @@ void main() { textDirection: TextDirection.ltr, markerType: MarkerType.legacy, ), - mapConfiguration: const MapConfiguration(mapId: cloudMapId))); + // Here deprecated cloudMapId is used to test that creation params have + // the correct mapId + mapConfiguration: const MapConfiguration(cloudMapId: cloudMapId))); expect( await passedCloudMapIdCompleter.future, @@ -1284,4 +1386,91 @@ void main() { reason: 'Should pass cloudMapId on PlatformView creation message', ); }); + + testWidgets('mapId is passed', (WidgetTester tester) async { + const String mapId = '000000000000000'; // Dummy map ID. + final Completer passedMapIdCompleter = Completer(); + + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler( + SystemChannels.platform_views, + (MethodCall methodCall) async { + if (methodCall.method == 'create') { + final Map args = Map.from( + methodCall.arguments as Map); + if (args.containsKey('params')) { + final Uint8List paramsUint8List = args['params'] as Uint8List; + final ByteData byteData = ByteData.sublistView(paramsUint8List); + final PlatformMapViewCreationParams? creationParams = + MapsApi.pigeonChannelCodec.decodeMessage(byteData) + as PlatformMapViewCreationParams?; + if (creationParams != null) { + final String? passedMapId = creationParams.mapConfiguration.mapId; + if (passedMapId != null) { + passedMapIdCompleter.complete(passedMapId); + } + } + } + } + return 0; + }, + ); + + final GoogleMapsFlutterAndroid maps = GoogleMapsFlutterAndroid(); + + await tester.pumpWidget(maps.buildViewWithConfiguration(1, (int id) {}, + widgetConfiguration: const MapWidgetConfiguration( + initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), + textDirection: TextDirection.ltr, + markerType: MarkerType.legacy, + ), + mapConfiguration: const MapConfiguration(mapId: mapId))); + + expect( + await passedMapIdCompleter.future, + mapId, + reason: 'Should pass mapId on PlatformView creation message', + ); + }); + + test( + 'Correct marker type is padded to platform view', + () async { + final GoogleMapsFlutterAndroid maps = GoogleMapsFlutterAndroid(); + final Widget widget = maps.buildViewWithConfiguration( + 1, + (int _) {}, + widgetConfiguration: const MapWidgetConfiguration( + initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), + textDirection: TextDirection.ltr, + markerType: MarkerType.advanced, + ), + ); + + expect(widget, isA()); + final dynamic creationParams = (widget as AndroidView).creationParams; + expect(creationParams, isA()); + expect( + (creationParams as PlatformMapViewCreationParams).markerType, + PlatformMarkerType.advanced, + ); + + final Widget widget2 = maps.buildViewWithConfiguration( + 1, + (int _) {}, + widgetConfiguration: const MapWidgetConfiguration( + initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), + textDirection: TextDirection.ltr, + markerType: MarkerType.legacy, + ), + ); + expect(widget2, isA()); + expect( + ((widget2 as AndroidView).creationParams + as PlatformMapViewCreationParams) + .markerType, + PlatformMarkerType.legacy, + ); + }, + ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/FGMClusterManagersControllerTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/FGMClusterManagersControllerTests.m index 8d435eb4941..c9068b3607f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/FGMClusterManagersControllerTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/FGMClusterManagersControllerTests.m @@ -35,7 +35,8 @@ - (void)testClustering { [[FLTMarkersController alloc] initWithMapView:mapView callbackHandler:handler clusterManagersController:clusterManagersController - registrar:registrar]; + registrar:registrar + markerType:FGMPlatformMarkerTypeLegacy]; // Add cluster managers. NSString *clusterManagerId = @"cm"; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/GoogleMapsTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/GoogleMapsTests.m index 4982d4a59ce..6af726de2e8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/GoogleMapsTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/GoogleMapsTests.m @@ -212,6 +212,7 @@ - (FGMPlatformMapViewCreationParams *)emptyCreationParameters { initialTileOverlays:@[] initialClusterManagers:@[] initialGroundOverlays:@[]]; +markerType:FGMPlatformMarkerTypeLegacy]; } @end diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/ios/RunnerTests/GoogleMapsTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/ios/RunnerTests/GoogleMapsTests.m index 6d821b4d11f..a1fbc3e66c9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/ios/RunnerTests/GoogleMapsTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/ios/RunnerTests/GoogleMapsTests.m @@ -105,6 +105,7 @@ - (FGMPlatformMapViewCreationParams *)emptyCreationParameters { initialTileOverlays:@[] initialClusterManagers:@[] initialGroundOverlays:@[]]; +markerType:FGMPlatformMarkerTypeLegacy]; } @end diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart index f19232eaace..f4d753a40ee 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart @@ -1037,7 +1037,11 @@ class PinConfig extends BitmapDescriptor { this.backgroundColor, this.borderColor, this.glyph, - }) : super._(const []); + }) : assert( + backgroundColor != null || borderColor != null || glyph != null, + 'Cannot create PinConfig with all parameters being null.', + ), + super._(const []); /// The type of the MapBitmap object, used for the JSON serialization. static const String type = 'pinConfig'; diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart index 001dbe755e3..57048e1e1d2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart @@ -4,7 +4,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; - import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; void main() { @@ -682,6 +681,82 @@ void main() { }); }); + group('PinConfig', () { + test('construct with empty values, throws assertion error', () { + expect(() => PinConfig(), throwsAssertionError); + }); + + test('construct', () { + const PinConfig pinConfig = PinConfig( + backgroundColor: Colors.green, + borderColor: Colors.blue, + ); + expect(pinConfig, isA()); + expect(pinConfig.backgroundColor, Colors.green); + expect(pinConfig.borderColor, Colors.blue); + expect( + pinConfig.toJson(), + [ + PinConfig.type, + { + 'backgroundColor': Colors.green.value, + 'borderColor': Colors.blue.value, + }, + ], + ); + }); + + test('construct with glyph text', () { + final PinConfig pinConfig = PinConfig( + backgroundColor: Colors.green, + borderColor: Colors.blue, + glyph: Glyph.text('Hello', textColor: Colors.red), + ); + expect(pinConfig.glyph?.text, 'Hello'); + expect(pinConfig.glyph?.textColor, Colors.red); + expect( + pinConfig.toJson(), + [ + PinConfig.type, + { + 'backgroundColor': Colors.green.value, + 'borderColor': Colors.blue.value, + 'glyphText': 'Hello', + 'glyphTextColor': Colors.red.value, + }, + ], + ); + }); + + test('construct with glyph bitmap', () async { + const ImageConfiguration imageConfiguration = ImageConfiguration( + devicePixelRatio: 3, + size: Size(48, 56), + ); + final BitmapDescriptor bitmap = await BitmapDescriptor.asset( + imageConfiguration, + 'red_square.png', + ); + final PinConfig pinConfig = PinConfig( + backgroundColor: Colors.black, + borderColor: Colors.red, + glyph: Glyph.bitmap(bitmap), + ); + + expect(pinConfig.backgroundColor, Colors.black); + expect(pinConfig.borderColor, Colors.red); + expect( + pinConfig.toJson(), + [ + PinConfig.type, + { + 'backgroundColor': Colors.black.value, + 'borderColor': Colors.red.value, + 'glyphBitmapDescriptor': bitmap.toJson(), + }, + ], + ); + }); test('mapBitmapScaling from String', () { expect(mapBitmapScalingFromString('auto'), MapBitmapScaling.auto); expect(mapBitmapScalingFromString('none'), MapBitmapScaling.none); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart index ffbca045638..0b7ab5825cd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart @@ -6,7 +6,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; -const String _kCloudMapId = '000000000000000'; // Dummy map ID. +const String _kMapId = '000000000000000'; // Dummy map ID. void main() { group('diffs', () { @@ -395,7 +395,7 @@ void main() { }); test('handle cloudMapId', () async { - const MapConfiguration diff = MapConfiguration(mapId: _kCloudMapId); + const MapConfiguration diff = MapConfiguration(cloudMapId: _kMapId); const MapConfiguration empty = MapConfiguration(); final MapConfiguration updated = diffBase.applyDiff(diff); @@ -405,7 +405,23 @@ void main() { // The diff from empty options should be the diff itself. expect(diff.diffFrom(empty), diff); // A diff applied to non-empty options should update that field. - expect(updated.mapId, _kCloudMapId); + expect(updated.cloudMapId, _kMapId); + // The hash code should change. + expect(empty.hashCode, isNot(diff.hashCode)); + }); + + test('handle mapId', () async { + const MapConfiguration diff = MapConfiguration(mapId: _kMapId); + + const MapConfiguration empty = MapConfiguration(); + final MapConfiguration updated = diffBase.applyDiff(diff); + + // A diff applied to empty options should be the diff itself. + expect(empty.applyDiff(diff), diff); + // The diff from empty options should be the diff itself. + expect(diff.diffFrom(empty), diff); + // A diff applied to non-empty options should update that field. + expect(updated.mapId, _kMapId); // The hash code should change. expect(empty.hashCode, isNot(diff.hashCode)); }); @@ -555,7 +571,13 @@ void main() { }); test('is false with cloudMapId', () async { - const MapConfiguration diff = MapConfiguration(mapId: _kCloudMapId); + const MapConfiguration diff = MapConfiguration(mapId: _kMapId); + + expect(diff.isEmpty, false); + }); + + test('is false with mapId', () async { + const MapConfiguration diff = MapConfiguration(mapId: _kMapId); expect(diff.isEmpty, false); }); From f26c3b8fd89e95b42bfd56272c2f545ade7d0b58 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 14 Oct 2024 11:11:09 +0300 Subject: [PATCH 032/130] Use enum instead of boolean to indicate that marker is advanced --- .../googlemaps/ClusterManagersController.java | 35 ++++++---- .../googlemaps/GoogleMapController.java | 2 +- .../plugins/googlemaps/MarkerBuilder.java | 9 +-- .../plugins/googlemaps/MarkersController.java | 3 +- .../ClusterManagersControllerTest.java | 68 +++++++++++++++++-- .../plugins/googlemaps/ConvertTest.java | 20 +++++- .../googlemaps/GoogleMapControllerTest.java | 4 +- .../googlemaps/MarkersControllerTest.java | 3 +- 8 files changed, 112 insertions(+), 32 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java index f73c209c3e9..bbadf916daf 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java @@ -7,6 +7,7 @@ import android.content.Context; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.model.AdvancedMarkerOptions; import com.google.android.gms.maps.model.Marker; @@ -19,6 +20,7 @@ import com.google.maps.android.clustering.view.DefaultClusterRenderer; import com.google.maps.android.collections.MarkerManager; import io.flutter.plugins.googlemaps.Messages.MapsCallbackApi; +import io.flutter.plugins.googlemaps.Messages.PlatformMarkerType; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -32,10 +34,15 @@ class ClusterManagersController implements GoogleMap.OnCameraIdleListener, ClusterManager.OnClusterClickListener { @NonNull private final Context context; - @NonNull private final HashMap> clusterManagerIdToManager; + + @VisibleForTesting + @NonNull + protected final HashMap> clusterManagerIdToManager; + @NonNull private final MapsCallbackApi flutterApi; @Nullable private MarkerManager markerManager; @Nullable private GoogleMap googleMap; + @NonNull private PlatformMarkerType markerType; @Nullable private ClusterManager.OnClusterItemClickListener clusterItemClickListener; @@ -44,10 +51,15 @@ class ClusterManagersController private ClusterManagersController.OnClusterItemRendered clusterItemRenderedListener; - ClusterManagersController(@NonNull MapsCallbackApi flutterApi, Context context) { + ClusterManagersController( + @NonNull MapsCallbackApi flutterApi, + @NonNull Context context, + @NonNull PlatformMarkerType markerType + ) { this.clusterManagerIdToManager = new HashMap<>(); this.context = context; this.flutterApi = flutterApi; + this.markerType = markerType; } void init(GoogleMap googleMap, MarkerManager markerManager) { @@ -92,6 +104,7 @@ void addClusterManagers(@NonNull List clusterMa void addClusterManager(String clusterManagerId) { ClusterManager clusterManager = new ClusterManager(context, googleMap, markerManager); + initializeRenderer(clusterManager); clusterManagerIdToManager.put(clusterManagerId, clusterManager); } @@ -100,13 +113,7 @@ void addClusterManager(String clusterManagerId) { * ClusterManager uses default renderer which should be changed to (legacy) renderer or * advanced renderer **/ - void initializeRenderer(String clusterManagerId, boolean isAdvanced) { - final ClusterManager clusterManager = clusterManagerIdToManager.get( - clusterManagerId); - if (clusterManager == null) { - return; - } - + private void initializeRenderer(ClusterManager clusterManager) { final ClusterRenderer renderer = clusterManager.getRenderer(); if (renderer.getClass() == MarkerClusterRenderer.class || renderer.getClass() == AdvancedMarkerClusterRenderer.class) { @@ -115,7 +122,7 @@ void initializeRenderer(String clusterManagerId, boolean isAdvanced) { } final ClusterRenderer clusterRenderer = - isAdvanced + markerType == PlatformMarkerType.ADVANCED ? new AdvancedMarkerClusterRenderer<>(context, googleMap, clusterManager, this) : new MarkerClusterRenderer<>(context, googleMap, clusterManager, this); clusterManager.setRenderer(clusterRenderer); @@ -148,8 +155,6 @@ private void removeClusterManager(Object clusterManagerId) { /** Adds item to the ClusterManager it belongs to. */ public void addItem(MarkerBuilder item) { - initializeRenderer(item.clusterManagerId(), item.isAdvanced); - ClusterManager clusterManager = clusterManagerIdToManager.get(item.clusterManagerId()); if (clusterManager != null) { @@ -226,7 +231,8 @@ public boolean onClusterClick(Cluster cluster) { * MarkerClusterRenderer builds marker options for new markers to be rendered to the map. After * cluster item (marker) is rendered, it is sent to the listeners for control. */ - private static class MarkerClusterRenderer extends DefaultClusterRenderer { + @VisibleForTesting + static class MarkerClusterRenderer extends DefaultClusterRenderer { private final ClusterManagersController clusterManagersController; public MarkerClusterRenderer( @@ -254,7 +260,8 @@ protected void onClusterItemRendered(@NonNull T item, @NonNull Marker marker) { } /** AdvancedMarkerClusterRenderer is a ClusterRenderer that supports AdvancedMarkers */ - private static class AdvancedMarkerClusterRenderer extends + @VisibleForTesting + static class AdvancedMarkerClusterRenderer extends DefaultAdvancedMarkersClusterRenderer { private final ClusterManagersController clusterManagersController; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java index eec2d02af9e..7fc011fbc04 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java @@ -131,7 +131,7 @@ class GoogleMapController MapsInspectorApi.setUp(binaryMessenger, Integer.toString(id), this); AssetManager assetManager = context.getAssets(); this.lifecycleProvider = lifecycleProvider; - this.clusterManagersController = new ClusterManagersController(flutterApi, context); + this.clusterManagersController = new ClusterManagersController(flutterApi, context, markerType); this.markersController = new MarkersController( flutterApi, diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java index 2ab3beda539..12d46a3a57f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java @@ -9,19 +9,20 @@ import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.MarkerOptions; import com.google.maps.android.clustering.ClusterItem; +import io.flutter.plugins.googlemaps.Messages.PlatformMarkerType; class MarkerBuilder implements MarkerOptionsSink, ClusterItem { private final MarkerOptions markerOptions; private String clusterManagerId; private String markerId; private boolean consumeTapEvents; - final boolean isAdvanced; - MarkerBuilder(String markerId, String clusterManagerId, boolean isAdvanced) { - this.markerOptions = isAdvanced ? new AdvancedMarkerOptions() : new MarkerOptions(); + MarkerBuilder(String markerId, String clusterManagerId, PlatformMarkerType markerType) { + this.markerOptions = markerType == PlatformMarkerType.ADVANCED + ? new AdvancedMarkerOptions() + : new MarkerOptions(); this.markerId = markerId; this.clusterManagerId = clusterManagerId; - this.isAdvanced = isAdvanced; } MarkerOptions build() { diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java index 06fff785137..2f0dd0b0e5c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java @@ -180,9 +180,8 @@ public void onClusterItemRendered(MarkerBuilder markerBuilder, Marker marker) { private void addMarker(@NonNull Messages.PlatformMarker marker) { String markerId = marker.getMarkerId(); String clusterManagerId = marker.getClusterManagerId(); - boolean isAdvancedMarker = markerType == PlatformMarkerType.ADVANCED; MarkerBuilder markerBuilder = new MarkerBuilder(markerId, clusterManagerId, - isAdvancedMarker); + markerType); Convert.interpretMarkerOptions( marker, markerBuilder, assetManager, density, bitmapDescriptorFactoryWrapper); addMarker(markerBuilder); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java index f7f2d076ca6..eac72b5d1d4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java @@ -6,6 +6,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertSame; import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.eq; @@ -22,11 +23,15 @@ import com.google.android.gms.maps.model.CameraPosition; import com.google.android.gms.maps.model.LatLng; import com.google.maps.android.clustering.Cluster; +import com.google.maps.android.clustering.ClusterManager; import com.google.maps.android.clustering.algo.StaticCluster; import com.google.maps.android.collections.MarkerManager; import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugins.googlemaps.ClusterManagersController.AdvancedMarkerClusterRenderer; +import io.flutter.plugins.googlemaps.ClusterManagersController.MarkerClusterRenderer; import io.flutter.plugins.googlemaps.Messages.MapsCallbackApi; import io.flutter.plugins.googlemaps.Messages.PlatformMarkerCollisionBehavior; +import io.flutter.plugins.googlemaps.Messages.PlatformMarkerType; import java.io.ByteArrayOutputStream; import java.util.ArrayList; import java.util.Collections; @@ -35,7 +40,6 @@ import java.util.Set; import org.junit.After; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentMatchers; @@ -66,7 +70,7 @@ public void setUp() { context = ApplicationProvider.getApplicationContext(); assetManager = context.getAssets(); flutterApi = spy(new MapsCallbackApi(mock(BinaryMessenger.class))); - controller = spy(new ClusterManagersController(flutterApi, context)); + controller = spy(new ClusterManagersController(flutterApi, context, PlatformMarkerType.LEGACY)); googleMap = mock(GoogleMap.class); markerManager = new MarkerManager(googleMap); controller.init(googleMap, markerManager); @@ -102,8 +106,10 @@ public void AddClusterManagersAndMarkers() { clusterManagersToAdd.add(initialClusterManager); controller.addClusterManagers(clusterManagersToAdd); - MarkerBuilder markerBuilder1 = new MarkerBuilder(markerId1, clusterManagerId, false); - MarkerBuilder markerBuilder2 = new MarkerBuilder(markerId2, clusterManagerId, false); + MarkerBuilder markerBuilder1 = new MarkerBuilder(markerId1, clusterManagerId, + PlatformMarkerType.LEGACY); + MarkerBuilder markerBuilder2 = new MarkerBuilder(markerId2, clusterManagerId, + PlatformMarkerType.LEGACY); final Messages.PlatformMarker markerData1 = createPlatformMarker(markerId1, location1, clusterManagerId); @@ -133,6 +139,56 @@ public void AddClusterManagersAndMarkers() { assertEquals("Cluster should contain exactly 2 markers", 2, cluster.getSize()); } + @Test + public void SelectClusterRenderer() { + final String clusterManagerId1 = "cm_1"; + final String clusterManagerId2 = "cm_2"; + final String markerId1 = "mid_1"; + final String markerId2 = "mid_2"; + + when(googleMap.getCameraPosition()) + .thenReturn(CameraPosition.builder().target(new LatLng(0, 0)).build()); + + ClusterManagersController controller1 = spy( + new ClusterManagersController(flutterApi, context, PlatformMarkerType.LEGACY)); + controller1.init(googleMap, markerManager); + ClusterManagersController controller2 = spy( + new ClusterManagersController(flutterApi, context, PlatformMarkerType.ADVANCED)); + controller2.init(googleMap, markerManager); + + Messages.PlatformClusterManager initialClusterManager1 = + new Messages.PlatformClusterManager.Builder().setIdentifier(clusterManagerId1).build(); + List clusterManagersToAdd1 = new ArrayList<>(); + clusterManagersToAdd1.add(initialClusterManager1); + controller1.addClusterManagers(clusterManagersToAdd1); + + Messages.PlatformClusterManager initialClusterManager2 = + new Messages.PlatformClusterManager.Builder().setIdentifier(clusterManagerId2).build(); + List clusterManagersToAdd2 = new ArrayList<>(); + clusterManagersToAdd2.add(initialClusterManager2); + controller2.addClusterManagers(clusterManagersToAdd2); + + MarkerBuilder markerBuilder1 = new MarkerBuilder(markerId1, clusterManagerId1, + PlatformMarkerType.LEGACY); + markerBuilder1.setPosition(new LatLng(10.0, 20.0)); + controller1.addItem(markerBuilder1); + + MarkerBuilder markerBuilder2 = new MarkerBuilder(markerId2, clusterManagerId2, + PlatformMarkerType.ADVANCED); + markerBuilder2.setPosition(new LatLng(20.0, 10.0)); + controller2.addItem(markerBuilder2); + + ClusterManager clusterManager1 = controller1.clusterManagerIdToManager.get( + clusterManagerId1); + assertNotNull(clusterManager1); + assertSame(clusterManager1.getRenderer().getClass(), MarkerClusterRenderer.class); + + ClusterManager clusterManager2 = controller2.clusterManagerIdToManager.get( + clusterManagerId2); + assertNotNull(clusterManager2); + assertSame(clusterManager2.getRenderer().getClass(), AdvancedMarkerClusterRenderer.class); + } + @Test public void OnClusterClickCallsMethodChannel() { String clusterManagerId = "cm_1"; @@ -142,11 +198,11 @@ public void OnClusterClickCallsMethodChannel() { StaticCluster cluster = new StaticCluster<>(clusterPosition); - MarkerBuilder marker1 = new MarkerBuilder("m_1", clusterManagerId, false); + MarkerBuilder marker1 = new MarkerBuilder("m_1", clusterManagerId, PlatformMarkerType.LEGACY); marker1.setPosition(markerPosition1); cluster.add(marker1); - MarkerBuilder marker2 = new MarkerBuilder("m_2", clusterManagerId, false); + MarkerBuilder marker2 = new MarkerBuilder("m_2", clusterManagerId, PlatformMarkerType.LEGACY); marker2.setPosition(markerPosition2); cluster.add(marker2); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java index e39320c2df5..2853f6c93bc 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java @@ -38,6 +38,10 @@ import com.google.maps.android.projection.SphericalMercatorProjection; import io.flutter.plugins.googlemaps.Convert.BitmapDescriptorFactoryWrapper; import io.flutter.plugins.googlemaps.Convert.FlutterInjectorWrapper; +import io.flutter.plugins.googlemaps.Messages.PlatformMarkerType; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; import java.util.Collections; import java.util.List; import java.util.Map; @@ -100,11 +104,11 @@ public void ConvertClusterToPigeonReturnsCorrectData() { StaticCluster cluster = new StaticCluster<>(clusterPosition); - MarkerBuilder marker1 = new MarkerBuilder("m_1", clusterManagerId, false); + MarkerBuilder marker1 = new MarkerBuilder("m_1", clusterManagerId, PlatformMarkerType.LEGACY); marker1.setPosition(markerPosition1); cluster.add(marker1); - MarkerBuilder marker2 = new MarkerBuilder("m_2", clusterManagerId, false); + MarkerBuilder marker2 = new MarkerBuilder("m_2", clusterManagerId, PlatformMarkerType.LEGACY); marker2.setPosition(markerPosition2); cluster.add(marker2); @@ -330,6 +334,18 @@ public void GetBitmapFromBytesThrowsErrorIfInvalidImageData() { fail("Expected an IllegalArgumentException to be thrown"); } + @Test + public void GetBitmapFromPinConfig() { + Map assetDetails = new HashMap<>(); + assetDetails.put("backgroundColor", 0xFFFFFFFF); + assetDetails.put("borderColor", 0xFFFFFFFF); + + when(bitmapDescriptorFactoryWrapper.fromPinConfig(any())).thenReturn(mockBitmapDescriptor); + BitmapDescriptor result = Convert.getBitmapFromPinConfig( + assetDetails, assetManager, 1f, bitmapDescriptorFactoryWrapper); + Assert.assertEquals(mockBitmapDescriptor, result); + } + @Test public void interpretMapConfiguration_handlesNulls() { final Messages.PlatformMapConfiguration config = diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java index 0d93a5c3ca2..27251ffd4eb 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java @@ -221,7 +221,7 @@ public void SetInitialClusterManagers() { @Test public void OnClusterItemRenderedCallsMarkersController() { GoogleMapController googleMapController = getGoogleMapControllerWithMockedDependencies(); - MarkerBuilder markerBuilder = new MarkerBuilder("m_1", "cm_1", false); + MarkerBuilder markerBuilder = new MarkerBuilder("m_1", "cm_1", PlatformMarkerType.LEGACY); final Marker marker = mock(Marker.class); googleMapController.onClusterItemRendered(markerBuilder, marker); verify(mockMarkersController, times(1)).onClusterItemRendered(markerBuilder, marker); @@ -230,7 +230,7 @@ public void OnClusterItemRenderedCallsMarkersController() { @Test public void OnClusterItemClickCallsMarkersController() { GoogleMapController googleMapController = getGoogleMapControllerWithMockedDependencies(); - MarkerBuilder markerBuilder = new MarkerBuilder("m_1", "cm_1", false); + MarkerBuilder markerBuilder = new MarkerBuilder("m_1", "cm_1", PlatformMarkerType.LEGACY); googleMapController.onClusterItemClick(markerBuilder); verify(mockMarkersController, times(1)).onMarkerTap(markerBuilder.markerId()); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java index 530ebd9a653..403cb9b3074 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java @@ -96,7 +96,8 @@ public void setUp() { assetManager = ApplicationProvider.getApplicationContext().getAssets(); context = ApplicationProvider.getApplicationContext(); flutterApi = spy(new MapsCallbackApi(mock(BinaryMessenger.class))); - clusterManagersController = spy(new ClusterManagersController(flutterApi, context)); + clusterManagersController = spy( + new ClusterManagersController(flutterApi, context, PlatformMarkerType.LEGACY)); controller = new MarkersController( flutterApi, From c6115e2a18a29e35d50a64f59ceac6f74fad4de6 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 15 Oct 2024 11:13:43 +0300 Subject: [PATCH 033/130] Add more tests --- .../integration_test/google_maps_tests.dart | 148 ++++- .../integration_test/google_maps_test.dart | 148 ++++- .../advanced_markers_test.dart | 620 ++++++++++++++++++ .../google_maps_controller_test.dart | 6 +- .../google_maps_plugin_test.dart | 3 + .../marker_clustering_test.dart | 3 +- .../lib/src/google_maps_controller.dart | 4 +- 7 files changed, 925 insertions(+), 7 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart index c553cb840b2..7da755403e7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart @@ -1279,6 +1279,97 @@ void googleMapsTests() { } }); + testWidgets('advanced markers clustering', (WidgetTester tester) async { + final Key key = GlobalKey(); + const int clusterManagersAmount = 2; + const int markersPerClusterManager = 5; + final Map markers = {}; + final Set clusterManagers = {}; + + for (int i = 0; i < clusterManagersAmount; i++) { + final ClusterManagerId clusterManagerId = + ClusterManagerId('cluster_manager_$i'); + final ClusterManager clusterManager = + ClusterManager(clusterManagerId: clusterManagerId); + clusterManagers.add(clusterManager); + } + + for (final ClusterManager cm in clusterManagers) { + for (int i = 0; i < markersPerClusterManager; i++) { + final MarkerId markerId = + MarkerId('${cm.clusterManagerId.value}_marker_$i'); + final AdvancedMarker marker = AdvancedMarker( + markerId: markerId, + clusterManagerId: cm.clusterManagerId, + position: LatLng( + _kInitialMapCenter.latitude + i, + _kInitialMapCenter.longitude, + ), + ); + markers[markerId] = marker; + } + } + + final Completer controllerCompleter = + Completer(); + + final GoogleMapsInspectorPlatform inspector = + GoogleMapsInspectorPlatform.instance!; + + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: ExampleGoogleMap( + key: key, + initialCameraPosition: _kInitialCameraPosition, + clusterManagers: clusterManagers, + markerType: MarkerType.advanced, + markers: Set.of(markers.values), + onMapCreated: (ExampleGoogleMapController googleMapController) { + controllerCompleter.complete(googleMapController); + }, + ), + ), + ); + + final ExampleGoogleMapController controller = + await controllerCompleter.future; + + for (final ClusterManager cm in clusterManagers) { + final List clusters = await inspector.getClusters( + mapId: controller.mapId, clusterManagerId: cm.clusterManagerId); + final int markersAmountForClusterManager = clusters + .map((Cluster cluster) => cluster.count) + .reduce((int value, int element) => value + element); + expect(markersAmountForClusterManager, markersPerClusterManager); + } + + // Remove markers from clusterManagers and test that clusterManagers are empty. + for (final MapEntry entry in markers.entries) { + markers[entry.key] = + _copyAdvancedMarkerWithClusterManagerId(entry.value, null); + } + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: ExampleGoogleMap( + key: key, + initialCameraPosition: _kInitialCameraPosition, + clusterManagers: clusterManagers, + markers: Set.of(markers.values), + ), + ), + ); + + for (final ClusterManager cm in clusterManagers) { + final List clusters = await inspector.getClusters( + mapId: controller.mapId, + clusterManagerId: cm.clusterManagerId, + ); + expect(clusters.length, 0); + } + }); + testWidgets( 'testMapId', (WidgetTester tester) async { @@ -1949,6 +2040,33 @@ void googleMapsTests() { // https://github.com/flutter/flutter/issues/131071 skip: true, ); + + testWidgets('markerWithPinConfig', (WidgetTester tester) async { + final Set markers = { + AdvancedMarker( + markerId: const MarkerId('1'), + icon: BitmapDescriptor.pinConfig( + backgroundColor: Colors.green, + borderColor: Colors.greenAccent, + glyph: Glyph.text('A', textColor: Colors.white), + ), + ), + }; + + await tester.pumpWidget( + Directionality( + textDirection: ui.TextDirection.ltr, + child: ExampleGoogleMap( + initialCameraPosition: const CameraPosition( + target: LatLng(10.0, 20.0), + ), + markers: markers, + markerType: MarkerType.advanced, + ), + ), + ); + await tester.pumpAndSettle(); + }); } class _DebugTileProvider implements TileProvider { @@ -1996,7 +2114,9 @@ class _DebugTileProvider implements TileProvider { } Marker _copyMarkerWithClusterManagerId( - Marker marker, ClusterManagerId? clusterManagerId) { + Marker marker, + ClusterManagerId? clusterManagerId, +) { return Marker( markerId: marker.markerId, alpha: marker.alpha, @@ -2103,3 +2223,29 @@ Future _checkCameraUpdateByType( expect(currentPosition.zoom, wrapMatcher(equals(_kInitialZoomLevel - 1))); } } + +AdvancedMarker _copyAdvancedMarkerWithClusterManagerId( + AdvancedMarker marker, + ClusterManagerId? clusterManagerId, +) { + return AdvancedMarker( + markerId: marker.markerId, + alpha: marker.alpha, + anchor: marker.anchor, + consumeTapEvents: marker.consumeTapEvents, + draggable: marker.draggable, + flat: marker.flat, + icon: marker.icon, + infoWindow: marker.infoWindow, + position: marker.position, + rotation: marker.rotation, + visible: marker.visible, + zIndex: marker.zIndex, + onTap: marker.onTap, + onDragStart: marker.onDragStart, + onDrag: marker.onDrag, + onDragEnd: marker.onDragEnd, + clusterManagerId: clusterManagerId, + collisionBehavior: marker.collisionBehavior, + ); +} diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart index 797210a0a04..a99c59ea2aa 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart @@ -1130,6 +1130,97 @@ void main() { } }); + testWidgets('advanced markers clustering', (WidgetTester tester) async { + final Key key = GlobalKey(); + const int clusterManagersAmount = 2; + const int markersPerClusterManager = 5; + final Map markers = {}; + final Set clusterManagers = {}; + + for (int i = 0; i < clusterManagersAmount; i++) { + final ClusterManagerId clusterManagerId = + ClusterManagerId('cluster_manager_$i'); + final ClusterManager clusterManager = + ClusterManager(clusterManagerId: clusterManagerId); + clusterManagers.add(clusterManager); + } + + for (final ClusterManager cm in clusterManagers) { + for (int i = 0; i < markersPerClusterManager; i++) { + final MarkerId markerId = + MarkerId('${cm.clusterManagerId.value}_marker_$i'); + final AdvancedMarker marker = AdvancedMarker( + markerId: markerId, + clusterManagerId: cm.clusterManagerId, + position: LatLng( + _kInitialMapCenter.latitude + i, + _kInitialMapCenter.longitude, + ), + ); + markers[markerId] = marker; + } + } + + final Completer controllerCompleter = + Completer(); + + final GoogleMapsInspectorPlatform inspector = + GoogleMapsInspectorPlatform.instance!; + + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: ExampleGoogleMap( + key: key, + initialCameraPosition: _kInitialCameraPosition, + clusterManagers: clusterManagers, + markerType: MarkerType.advanced, + markers: Set.of(markers.values), + onMapCreated: (ExampleGoogleMapController googleMapController) { + controllerCompleter.complete(googleMapController); + }, + ), + ), + ); + + final ExampleGoogleMapController controller = + await controllerCompleter.future; + + for (final ClusterManager cm in clusterManagers) { + final List clusters = await inspector.getClusters( + mapId: controller.mapId, clusterManagerId: cm.clusterManagerId); + final int markersAmountForClusterManager = clusters + .map((Cluster cluster) => cluster.count) + .reduce((int value, int element) => value + element); + expect(markersAmountForClusterManager, markersPerClusterManager); + } + + // Remove markers from clusterManagers and test that clusterManagers are empty. + for (final MapEntry entry in markers.entries) { + markers[entry.key] = + _copyAdvancedMarkerWithClusterManagerId(entry.value, null); + } + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: ExampleGoogleMap( + key: key, + initialCameraPosition: _kInitialCameraPosition, + clusterManagers: clusterManagers, + markers: Set.of(markers.values), + ), + ), + ); + + for (final ClusterManager cm in clusterManagers) { + final List clusters = await inspector.getClusters( + mapId: controller.mapId, + clusterManagerId: cm.clusterManagerId, + ); + expect(clusters.length, 0); + } + }); + testWidgets('testSetStyleMapId', (WidgetTester tester) async { final Key key = GlobalKey(); @@ -1791,6 +1882,33 @@ void main() { // Hanging in CI, https://github.com/flutter/flutter/issues/166139 skip: true, ); + + testWidgets('markerWithPinConfig', (WidgetTester tester) async { + final Set markers = { + AdvancedMarker( + markerId: const MarkerId('1'), + icon: BitmapDescriptor.pinConfig( + backgroundColor: Colors.green, + borderColor: Colors.greenAccent, + glyph: Glyph.text('A', textColor: Colors.white), + ), + ), + }; + + await tester.pumpWidget( + Directionality( + textDirection: ui.TextDirection.ltr, + child: ExampleGoogleMap( + initialCameraPosition: const CameraPosition( + target: LatLng(10.0, 20.0), + ), + markers: markers, + markerType: MarkerType.advanced, + ), + ), + ); + await tester.pumpAndSettle(); + }); } class _DebugTileProvider implements TileProvider { @@ -1838,7 +1956,9 @@ class _DebugTileProvider implements TileProvider { } Marker _copyMarkerWithClusterManagerId( - Marker marker, ClusterManagerId? clusterManagerId) { + Marker marker, + ClusterManagerId? clusterManagerId, +) { return Marker( markerId: marker.markerId, alpha: marker.alpha, @@ -1945,3 +2065,29 @@ Future _checkCameraUpdateByType( expect(currentPosition.zoom, wrapMatcher(equals(_kInitialZoomLevel - 1))); } } + +AdvancedMarker _copyAdvancedMarkerWithClusterManagerId( + AdvancedMarker marker, + ClusterManagerId? clusterManagerId, +) { + return AdvancedMarker( + markerId: marker.markerId, + alpha: marker.alpha, + anchor: marker.anchor, + consumeTapEvents: marker.consumeTapEvents, + draggable: marker.draggable, + flat: marker.flat, + icon: marker.icon, + infoWindow: marker.infoWindow, + position: marker.position, + rotation: marker.rotation, + visible: marker.visible, + zIndex: marker.zIndex, + onTap: marker.onTap, + onDragStart: marker.onDragStart, + onDrag: marker.onDrag, + onDragEnd: marker.onDragEnd, + clusterManagerId: clusterManagerId, + collisionBehavior: marker.collisionBehavior, + ); +} diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart new file mode 100644 index 00000000000..e1af4430c6a --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart @@ -0,0 +1,620 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:js_interop'; +import 'dart:typed_data'; + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:google_maps/google_maps.dart' as gmaps; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; +import 'package:google_maps_flutter_web/google_maps_flutter_web.dart'; +import 'package:google_maps_flutter_web/src/marker_clustering.dart'; +import 'package:google_maps_flutter_web/src/utils.dart'; +import 'package:http/http.dart' as http; +import 'package:integration_test/integration_test.dart'; +import 'package:web/src/dom.dart' as dom; +import 'package:web/web.dart'; + +import 'resources/icon_image_base64.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('MarkersController', () { + late StreamController> events; + late MarkersController controller; + late ClusterManagersController + clusterManagersController; + late gmaps.Map map; + + setUp(() { + events = StreamController>(); + + clusterManagersController = + ClusterManagersController( + stream: events); + controller = MarkersController( + stream: events, + clusterManagersController: clusterManagersController, + ); + map = gmaps.Map(createDivElement()); + clusterManagersController.bindToMap(123, map); + controller.bindToMap(123, map); + }); + + testWidgets('addMarkers', (WidgetTester tester) async { + final Set markers = { + const AdvancedMarker(markerId: MarkerId('1')), + const AdvancedMarker(markerId: MarkerId('2')), + }; + + await controller.addMarkers(markers); + + expect(controller.markers.length, 2); + expect(controller.markers, contains(const MarkerId('1'))); + expect(controller.markers, contains(const MarkerId('2'))); + expect(controller.markers, isNot(contains(const MarkerId('66')))); + }); + + testWidgets('changeMarkers', (WidgetTester tester) async { + gmaps.AdvancedMarkerElement? marker; + gmaps.LatLngLiteral? position; + + final Set markers = { + const AdvancedMarker(markerId: MarkerId('1')), + }; + await controller.addMarkers(markers); + + marker = controller.markers[const MarkerId('1')]?.marker; + expect(marker, isNotNull); + expect(marker!.gmpDraggable, isFalse); + + // By default, markers fall in LatLng(0, 0) + position = marker.position! as gmaps.LatLngLiteral; + expect(position, isNotNull); + expect(position.lat, equals(0)); + expect(position.lng, equals(0)); + + // Update the marker with draggable and position + final Set updatedMarkers = { + const AdvancedMarker( + markerId: MarkerId('1'), + draggable: true, + position: LatLng(42, 54), + ), + }; + await controller.changeMarkers(updatedMarkers); + expect(controller.markers.length, 1); + + marker = controller.markers[const MarkerId('1')]?.marker; + expect(marker, isNotNull); + expect(marker!.gmpDraggable, isTrue); + + position = marker.position! as gmaps.LatLngLiteral; + expect(position, isNotNull); + expect(position.lat, equals(42)); + expect(position.lng, equals(54)); + }); + + testWidgets( + 'changeMarkers resets marker position if not passed when updating!', + (WidgetTester tester) async { + gmaps.AdvancedMarkerElement? marker; + gmaps.LatLngLiteral? position; + + final Set markers = { + const AdvancedMarker( + markerId: MarkerId('1'), + position: LatLng(42, 54), + ), + }; + await controller.addMarkers(markers); + + marker = controller.markers[const MarkerId('1')]?.marker; + expect(marker, isNotNull); + expect(marker!.gmpDraggable, isFalse); + + position = marker.position! as gmaps.LatLngLiteral; + expect(position, isNotNull); + expect(position.lat, equals(42)); + expect(position.lng, equals(54)); + + // Update the marker without position + final Set updatedMarkers = { + const AdvancedMarker( + markerId: MarkerId('1'), + draggable: true, + ), + }; + await controller.changeMarkers(updatedMarkers); + expect(controller.markers.length, 1); + + marker = controller.markers[const MarkerId('1')]?.marker; + expect(marker, isNotNull); + expect(marker!.gmpDraggable, isTrue); + + position = marker.position! as gmaps.LatLngLiteral; + expect(position, isNotNull); + expect(position.lat, equals(0)); + expect(position.lng, equals(0)); + }); + + testWidgets('removeMarkers', (WidgetTester tester) async { + final Set markers = { + const AdvancedMarker(markerId: MarkerId('1')), + const AdvancedMarker(markerId: MarkerId('2')), + const AdvancedMarker(markerId: MarkerId('3')), + }; + + await controller.addMarkers(markers); + + expect(controller.markers.length, 3); + + // Remove some markers... + final Set markerIdsToRemove = { + const MarkerId('1'), + const MarkerId('3'), + }; + + controller.removeMarkers(markerIdsToRemove); + + expect(controller.markers.length, 1); + expect(controller.markers, isNot(contains(const MarkerId('1')))); + expect(controller.markers, contains(const MarkerId('2'))); + expect(controller.markers, isNot(contains(const MarkerId('3')))); + }); + + testWidgets('InfoWindow show/hide', (WidgetTester tester) async { + final Set markers = { + const AdvancedMarker( + markerId: MarkerId('1'), + infoWindow: InfoWindow(title: 'Title', snippet: 'Snippet'), + ), + }; + + await controller.addMarkers(markers); + + expect(controller.markers[const MarkerId('1')]?.infoWindowShown, isFalse); + + controller.showMarkerInfoWindow(const MarkerId('1')); + + expect(controller.markers[const MarkerId('1')]?.infoWindowShown, isTrue); + + controller.hideMarkerInfoWindow(const MarkerId('1')); + + expect(controller.markers[const MarkerId('1')]?.infoWindowShown, isFalse); + }); + + testWidgets('only single InfoWindow is visible', + (WidgetTester tester) async { + final Set markers = { + const AdvancedMarker( + markerId: MarkerId('1'), + infoWindow: InfoWindow(title: 'Title', snippet: 'Snippet'), + ), + const AdvancedMarker( + markerId: MarkerId('2'), + infoWindow: InfoWindow(title: 'Title', snippet: 'Snippet'), + ), + }; + await controller.addMarkers(markers); + + expect(controller.markers[const MarkerId('1')]?.infoWindowShown, isFalse); + expect(controller.markers[const MarkerId('2')]?.infoWindowShown, isFalse); + + controller.showMarkerInfoWindow(const MarkerId('1')); + + expect(controller.markers[const MarkerId('1')]?.infoWindowShown, isTrue); + expect(controller.markers[const MarkerId('2')]?.infoWindowShown, isFalse); + + controller.showMarkerInfoWindow(const MarkerId('2')); + + expect(controller.markers[const MarkerId('1')]?.infoWindowShown, isFalse); + expect(controller.markers[const MarkerId('2')]?.infoWindowShown, isTrue); + }); + + testWidgets('markers with custom asset icon work', + (WidgetTester tester) async { + final Set markers = { + AdvancedMarker( + markerId: const MarkerId('1'), + icon: AssetMapBitmap( + 'assets/red_square.png', + imagePixelRatio: 1.0, + ), + ), + }; + + await controller.addMarkers(markers); + + expect(controller.markers.length, 1); + final HTMLImageElement? icon = controller + .markers[const MarkerId('1')]?.marker?.content as HTMLImageElement?; + expect(icon, isNotNull); + + final String assetUrl = icon!.src; + expect(assetUrl, endsWith('assets/red_square.png')); + + // asset size is 48x48 physical pixels + expect(icon.style.width, '48px'); + expect(icon.style.height, '48px'); + }); + + testWidgets('markers with custom asset icon and pixel ratio work', + (WidgetTester tester) async { + final Set markers = { + AdvancedMarker( + markerId: const MarkerId('1'), + icon: AssetMapBitmap( + 'assets/red_square.png', + imagePixelRatio: 2.0, + ), + ), + }; + + await controller.addMarkers(markers); + + expect(controller.markers.length, 1); + final HTMLImageElement? icon = controller + .markers[const MarkerId('1')]?.marker?.content as HTMLImageElement?; + expect(icon, isNotNull); + + final String assetUrl = icon!.src; + expect(assetUrl, endsWith('assets/red_square.png')); + + // Asset size is 48x48 physical pixels, and with pixel ratio 2.0 it + // should be drawn with size 24x24 logical pixels. + expect(icon.style.width, '24px'); + expect(icon.style.height, '24px'); + }); + + testWidgets('markers with custom asset icon with width and height work', + (WidgetTester tester) async { + final Set markers = { + AdvancedMarker( + markerId: const MarkerId('1'), + icon: AssetMapBitmap( + 'assets/red_square.png', + imagePixelRatio: 2.0, + width: 64, + height: 64, + )), + }; + + await controller.addMarkers(markers); + + expect(controller.markers.length, 1); + final HTMLImageElement? icon = controller + .markers[const MarkerId('1')]?.marker?.content as HTMLImageElement?; + expect(icon, isNotNull); + + final String assetUrl = icon!.src; + expect(assetUrl, endsWith('assets/red_square.png')); + + // Asset size is 48x48 physical pixels, + // and scaled to requested 64x64 size. + expect(icon.style.width, '64px'); + expect(icon.style.height, '64px'); + }); + + testWidgets('markers with missing asset icon should not set size', + (WidgetTester tester) async { + final Set markers = { + AdvancedMarker( + markerId: const MarkerId('1'), + icon: AssetMapBitmap( + 'assets/broken_asset_name.png', + imagePixelRatio: 2.0, + )), + }; + + await controller.addMarkers(markers); + + expect(controller.markers.length, 1); + final HTMLImageElement? icon = controller + .markers[const MarkerId('1')]?.marker?.content as HTMLImageElement?; + expect(icon, isNotNull); + + final String assetUrl = icon!.src; + expect(assetUrl, endsWith('assets/broken_asset_name.png')); + + // For invalid assets, the size and scaledSize should be null. + expect(icon.style.width, isEmpty); + expect(icon.style.height, isEmpty); + }); + + testWidgets('markers with custom bitmap icon work', + (WidgetTester tester) async { + final Uint8List bytes = const Base64Decoder().convert(iconImageBase64); + final Set markers = { + AdvancedMarker( + markerId: const MarkerId('1'), + icon: BytesMapBitmap( + bytes, + imagePixelRatio: tester.view.devicePixelRatio, + ), + ), + }; + + await controller.addMarkers(markers); + + expect(controller.markers.length, 1); + final HTMLImageElement? icon = controller + .markers[const MarkerId('1')]?.marker?.content as HTMLImageElement?; + expect(icon, isNotNull); + + final String blobUrl = icon!.src; + expect(blobUrl, startsWith('blob:')); + + final http.Response response = await http.get(Uri.parse(blobUrl)); + expect( + response.bodyBytes, + bytes, + reason: + 'Bytes from the Icon blob must match bytes used to create AdvancedMarker', + ); + + // Icon size is 16x16 pixels, this should be automatically read from the + // bitmap and set to the icon size scaled to 8x8 using the + // given imagePixelRatio. + final int expectedSize = 16 ~/ tester.view.devicePixelRatio; + expect(icon.style.width, '${expectedSize}px'); + expect(icon.style.height, '${expectedSize}px'); + }); + + testWidgets('markers with custom bitmap icon and pixel ratio work', + (WidgetTester tester) async { + final Uint8List bytes = const Base64Decoder().convert(iconImageBase64); + final Set markers = { + AdvancedMarker( + markerId: const MarkerId('1'), + icon: BytesMapBitmap( + bytes, + imagePixelRatio: 1, + ), + ), + }; + + await controller.addMarkers(markers); + + expect(controller.markers.length, 1); + final HTMLImageElement? icon = controller + .markers[const MarkerId('1')]?.marker?.content as HTMLImageElement?; + expect(icon, isNotNull); + + // Icon size is 16x16 pixels, this should be automatically read from the + // bitmap and set to the icon size and should not be changed as + // image pixel ratio is set to 1.0. + expect(icon!.style.width, '16px'); + expect(icon.style.height, '16px'); + }); + + testWidgets('markers with custom bitmap icon pass size to sdk', + (WidgetTester tester) async { + final Uint8List bytes = const Base64Decoder().convert(iconImageBase64); + final Set markers = { + AdvancedMarker( + markerId: const MarkerId('1'), + icon: BytesMapBitmap( + bytes, + width: 20, + height: 30, + ), + ), + }; + + await controller.addMarkers(markers); + + expect(controller.markers.length, 1); + final HTMLImageElement? icon = controller + .markers[const MarkerId('1')]?.marker?.content as HTMLImageElement?; + expect(icon, isNotNull); + expect(icon!.style.width, '20px'); + expect(icon.style.height, '30px'); + }); + + testWidgets('markers created with pin config and colored glyph work', + (WidgetTester widgetTester) async { + final Set markers = { + AdvancedMarker( + markerId: const MarkerId('1'), + icon: BitmapDescriptor.pinConfig( + backgroundColor: const Color(0xFF00FF00), + borderColor: const Color(0xFFFF0000), + glyph: Glyph.color(const Color(0xFFFFFFFF)), + ), + ), + }; + await controller.addMarkers(markers); + expect(controller.markers.length, 1); + + final HTMLDivElement? icon = controller + .markers[const MarkerId('1')]?.marker?.content as HTMLDivElement?; + expect(icon, isNotNull); + + // Query nodes and check colors. This is a bit fragile as it depends on + // the implementation details of the icon which is not part of the public + // API + final NodeList backgroundNodes = + icon!.querySelectorAll("[class*='maps-pin-view-background']"); + final NodeList borderNodes = + icon.querySelectorAll("[class*='maps-pin-view-border']"); + final NodeList glyphNodes = + icon.querySelectorAll("[class*='maps-pin-view-default-glyph']"); + + expect(backgroundNodes.length, 1); + expect(borderNodes.length, 1); + expect(glyphNodes.length, 1); + + expect( + (backgroundNodes.item(0)! as dom.Element) + .getAttribute('fill') + ?.toUpperCase(), + '#00FF00', + ); + expect( + (borderNodes.item(0)! as dom.Element) + .getAttribute('fill') + ?.toUpperCase(), + '#FF0000', + ); + expect( + (glyphNodes.item(0)! as dom.Element) + .getAttribute('fill') + ?.toUpperCase(), + '#FFFFFF', + ); + }); + + testWidgets('markers created with text glyph work', + (WidgetTester widgetTester) async { + final Set markers = { + AdvancedMarker( + markerId: const MarkerId('1'), + icon: BitmapDescriptor.pinConfig( + backgroundColor: Colors.black, + borderColor: Colors.black, + glyph: Glyph.text( + 'Hey', + textColor: const Color(0xFF0000FF), + ), + ), + ), + }; + await controller.addMarkers(markers); + expect(controller.markers.length, 1); + + final HTMLDivElement? icon = controller + .markers[const MarkerId('1')]?.marker?.content as HTMLDivElement?; + expect(icon, isNotNull); + + // Query pin nodes and find text element. This is a bit fragile as it + // depends on the implementation details of the icon which is not part of + // the public API + dom.Element? paragraphElement; + final NodeList paragraphs = icon!.querySelectorAll('p'); + for (int i = 0; i < paragraphs.length; i++) { + final dom.Element? paragraph = paragraphs.item(i) as dom.Element?; + if (paragraph?.innerHTML.toString() == 'Hey') { + paragraphElement = paragraph; + break; + } + } + + expect(paragraphElement, isNotNull); + expect(paragraphElement!.innerHTML, 'Hey'); + expect(paragraphElement.innerHTML, 'Hey'); + expect( + paragraphElement.getAttribute('style')?.toLowerCase(), + contains('color: #0000ff'), + ); + }); + + testWidgets('markers created with text glyph work', + (WidgetTester widgetTester) async { + final Set markers = { + AdvancedMarker( + markerId: const MarkerId('1'), + icon: BitmapDescriptor.pinConfig( + backgroundColor: Colors.black, + borderColor: Colors.black, + glyph: Glyph.bitmap( + await BitmapDescriptor.asset( + const ImageConfiguration( + size: Size.square(12), + ), + 'assets/red_square.png', + ), + ), + ), + ), + }; + await controller.addMarkers(markers); + expect(controller.markers.length, 1); + + final HTMLDivElement? icon = controller + .markers[const MarkerId('1')]?.marker?.content as HTMLDivElement?; + expect(icon, isNotNull); + + // Query pin nodes and find text element. This is a bit fragile as it + // depends on the implementation details of the icon which is not part of + // the public API + HTMLImageElement? imgElement; + final NodeList imgElements = icon!.querySelectorAll('img'); + for (int i = 0; i < imgElements.length; i++) { + final dom.Element? img = imgElements.item(i) as dom.Element?; + final String src = (img! as HTMLImageElement).src; + if (src.endsWith('assets/red_square.png')) { + imgElement = img as HTMLImageElement; + break; + } + } + + expect(imgElement, isNotNull); + expect(imgElement!.src, endsWith('assets/red_square.png')); + expect( + imgElement.getAttribute('style')?.toLowerCase(), + contains('width: 12px; height: 12px;'), + ); + }); + + testWidgets('InfoWindow snippet can have links', + (WidgetTester tester) async { + final Set markers = { + const AdvancedMarker( + markerId: MarkerId('1'), + infoWindow: InfoWindow( + title: 'title for test', + snippet: 'Go to Google >>>', + ), + ), + }; + + await controller.addMarkers(markers); + + expect(controller.markers.length, 1); + final HTMLElement? content = controller + .markers[const MarkerId('1')]?.infoWindow?.content as HTMLElement?; + expect(content, isNotNull); + + final String innerHtml = (content!.innerHTML as JSString).toDart; + expect(innerHtml, contains('title for test')); + expect( + innerHtml, + contains( + 'Go to Google >>>', + )); + }); + + testWidgets('InfoWindow content is clickable', (WidgetTester tester) async { + final Set markers = { + const AdvancedMarker( + markerId: MarkerId('1'), + infoWindow: InfoWindow( + title: 'title for test', + snippet: 'some snippet', + ), + ), + }; + + await controller.addMarkers(markers); + + expect(controller.markers.length, 1); + final HTMLElement? content = controller + .markers[const MarkerId('1')]?.infoWindow?.content as HTMLElement?; + + content?.click(); + + final MapEvent event = await events.stream.first; + + expect(event, isA()); + expect((event as InfoWindowTapEvent).value, equals(const MarkerId('1'))); + }); + }); +} diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart index 7c4df94601e..4654291b7aa 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart @@ -66,8 +66,10 @@ void main() { mapId: mapId, streamController: stream, widgetConfiguration: MapWidgetConfiguration( - initialCameraPosition: initialCameraPosition, - textDirection: TextDirection.ltr), + initialCameraPosition: initialCameraPosition, + textDirection: TextDirection.ltr, + markerType: MarkerType.legacy, + ), mapObjects: mapObjects, mapConfiguration: mapConfiguration, ); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart index 1e02f576a08..d74d27d2f0e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart @@ -83,6 +83,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: TextDirection.ltr, + markerType: MarkerType.legacy, ), ); @@ -121,6 +122,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: TextDirection.ltr, + markerType: MarkerType.legacy, ), ); @@ -140,6 +142,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: TextDirection.ltr, + markerType: MarkerType.legacy, ), ); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_clustering_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_clustering_test.dart index ce39bea20b7..f617cf08abc 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_clustering_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_clustering_test.dart @@ -54,6 +54,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: TextDirection.ltr, + markerType: MarkerType.legacy, ), mapObjects: MapObjects( clusterManagers: clusterManagers, markers: initialMarkers))); @@ -98,7 +99,7 @@ void main() { } // Repeatedly checks an asynchronous value against a test condition, waiting -// one frame between each check, returing the value if it passes the predicate +// one frame between each check, returning the value if it passes the predicate // before [maxTries] is reached. // // Returns null if the predicate is never satisfied. diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index 4c02bbd4c59..c581e093f9a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -49,13 +49,13 @@ class GoogleMapController { switch (widgetConfiguration.markerType) { case MarkerType.legacy: assert( - markerTypes.first is Marker, + markerTypes.first == Marker, 'All markers must be of type Marker because ' 'widgetConfiguration.markerType is MarkerType.legacy', ); case MarkerType.advanced: assert( - markerTypes.first is AdvancedMarker, + markerTypes.first == AdvancedMarker, 'All markers must be of type AdvancedMarker because ' 'widgetConfiguration.markerType is MarkerType.advanced', ); From 005785fa92bc10667dfb8325502c0081e2621243 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 15 Oct 2024 12:45:07 +0300 Subject: [PATCH 034/130] Rename MarkerType enum values --- .../example/lib/clustering.dart | 5 +++-- .../example/lib/marker_icons.dart | 6 +++--- .../example/lib/place_marker.dart | 2 +- .../lib/src/google_map.dart | 2 +- .../googlemaps/ClusterManagersController.java | 2 +- .../plugins/googlemaps/MarkerBuilder.java | 2 +- .../ClusterManagersControllerTest.java | 18 +++++++++--------- .../plugins/googlemaps/ConvertTest.java | 4 ++-- .../googlemaps/GoogleMapControllerTest.java | 6 +++--- .../googlemaps/MarkersControllerTest.java | 4 ++-- .../integration_test/google_maps_tests.dart | 4 ++-- .../example/lib/clustering.dart | 5 +++-- .../example/lib/marker_icons.dart | 4 ++-- .../example/lib/place_marker.dart | 2 +- .../lib/src/google_maps_flutter_android.dart | 8 ++++---- .../pigeons/messages.dart | 4 ++-- .../test/google_maps_flutter_android_test.dart | 18 +++++++++--------- .../integration_test/google_maps_test.dart | 4 ++-- .../maps_example_dart/lib/clustering.dart | 5 +++-- .../maps_example_dart/lib/marker_icons.dart | 4 ++-- .../maps_example_dart/lib/place_marker.dart | 4 ++-- .../ios/Classes/GoogleMapMarkerController.m | 2 +- .../ios/Classes/messages.g.h | 5 +++++ .../lib/src/google_maps_flutter_ios.dart | 8 ++++---- .../pigeons/messages.dart | 1 + .../test/google_maps_flutter_ios_test.dart | 2 +- .../method_channel_google_maps_flutter.dart | 4 ++-- .../google_maps_flutter_platform.dart | 4 ++-- .../src/types/map_widget_configuration.dart | 7 ++++--- .../lib/src/types/marker.dart | 2 ++ .../google_maps_flutter_platform_test.dart | 4 ++-- .../google_maps_controller_test.dart | 2 +- .../google_maps_plugin_test.dart | 6 +++--- .../marker_clustering_test.dart | 2 +- .../lib/src/convert.dart | 4 ++-- .../lib/src/google_maps_controller.dart | 15 +++++++-------- .../lib/src/marker.dart | 16 +++++++++++----- .../lib/src/marker_clustering.dart | 7 +++---- 38 files changed, 110 insertions(+), 94 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart index 755788d47fe..c777e9e57dc 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart @@ -234,8 +234,9 @@ class ClusteringBodyState extends State { SizedBox( height: 300.0, child: GoogleMap( - markerType: - widget.mapId == null ? MarkerType.legacy : MarkerType.advanced, + markerType: widget.mapId != null + ? MarkerType.advancedMarker + : MarkerType.marker, mapId: widget.mapId, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart index 5dc7786c52c..140c4d220c6 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart @@ -85,9 +85,9 @@ class MarkerIconsBodyState extends State { width: 350.0, height: 300.0, child: GoogleMap( - markerType: widget.mapId == null - ? MarkerType.legacy - : MarkerType.advanced, + markerType: widget.mapId != null + ? MarkerType.advancedMarker + : MarkerType.marker, mapId: widget.mapId, initialCameraPosition: const CameraPosition( target: _kMapCenter, diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart index 49e0bfd8b9a..e80842f877d 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart @@ -317,7 +317,7 @@ class PlaceMarkerBodyState extends State { child: GoogleMap( mapId: mapId, markerType: - mapId != null ? MarkerType.advanced : MarkerType.legacy, + mapId != null ? MarkerType.advancedMarker : MarkerType.marker, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.211), diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index 34cb7989e75..31a9eaa614f 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -128,7 +128,7 @@ class GoogleMap extends StatefulWidget { this.onTap, this.onLongPress, this.mapId, - this.markerType = MarkerType.legacy, + this.markerType = MarkerType.marker, @Deprecated('cloudMapId is deprecated. Use mapId instead') this.cloudMapId, }); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java index bbadf916daf..e2d5fee7d91 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java @@ -122,7 +122,7 @@ private void initializeRenderer(ClusterManager clusterManager) { } final ClusterRenderer clusterRenderer = - markerType == PlatformMarkerType.ADVANCED + markerType == PlatformMarkerType.ADVANCED_MARKER ? new AdvancedMarkerClusterRenderer<>(context, googleMap, clusterManager, this) : new MarkerClusterRenderer<>(context, googleMap, clusterManager, this); clusterManager.setRenderer(clusterRenderer); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java index 12d46a3a57f..d5fabbd7acb 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java @@ -18,7 +18,7 @@ class MarkerBuilder implements MarkerOptionsSink, ClusterItem { private boolean consumeTapEvents; MarkerBuilder(String markerId, String clusterManagerId, PlatformMarkerType markerType) { - this.markerOptions = markerType == PlatformMarkerType.ADVANCED + this.markerOptions = markerType == PlatformMarkerType.ADVANCED_MARKER ? new AdvancedMarkerOptions() : new MarkerOptions(); this.markerId = markerId; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java index eac72b5d1d4..2bbf88e0eeb 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java @@ -70,7 +70,7 @@ public void setUp() { context = ApplicationProvider.getApplicationContext(); assetManager = context.getAssets(); flutterApi = spy(new MapsCallbackApi(mock(BinaryMessenger.class))); - controller = spy(new ClusterManagersController(flutterApi, context, PlatformMarkerType.LEGACY)); + controller = spy(new ClusterManagersController(flutterApi, context, PlatformMarkerType.MARKER)); googleMap = mock(GoogleMap.class); markerManager = new MarkerManager(googleMap); controller.init(googleMap, markerManager); @@ -107,9 +107,9 @@ public void AddClusterManagersAndMarkers() { controller.addClusterManagers(clusterManagersToAdd); MarkerBuilder markerBuilder1 = new MarkerBuilder(markerId1, clusterManagerId, - PlatformMarkerType.LEGACY); + PlatformMarkerType.MARKER); MarkerBuilder markerBuilder2 = new MarkerBuilder(markerId2, clusterManagerId, - PlatformMarkerType.LEGACY); + PlatformMarkerType.MARKER); final Messages.PlatformMarker markerData1 = createPlatformMarker(markerId1, location1, clusterManagerId); @@ -150,10 +150,10 @@ public void SelectClusterRenderer() { .thenReturn(CameraPosition.builder().target(new LatLng(0, 0)).build()); ClusterManagersController controller1 = spy( - new ClusterManagersController(flutterApi, context, PlatformMarkerType.LEGACY)); + new ClusterManagersController(flutterApi, context, PlatformMarkerType.MARKER)); controller1.init(googleMap, markerManager); ClusterManagersController controller2 = spy( - new ClusterManagersController(flutterApi, context, PlatformMarkerType.ADVANCED)); + new ClusterManagersController(flutterApi, context, PlatformMarkerType.ADVANCED_MARKER)); controller2.init(googleMap, markerManager); Messages.PlatformClusterManager initialClusterManager1 = @@ -169,12 +169,12 @@ public void SelectClusterRenderer() { controller2.addClusterManagers(clusterManagersToAdd2); MarkerBuilder markerBuilder1 = new MarkerBuilder(markerId1, clusterManagerId1, - PlatformMarkerType.LEGACY); + PlatformMarkerType.MARKER); markerBuilder1.setPosition(new LatLng(10.0, 20.0)); controller1.addItem(markerBuilder1); MarkerBuilder markerBuilder2 = new MarkerBuilder(markerId2, clusterManagerId2, - PlatformMarkerType.ADVANCED); + PlatformMarkerType.ADVANCED_MARKER); markerBuilder2.setPosition(new LatLng(20.0, 10.0)); controller2.addItem(markerBuilder2); @@ -198,11 +198,11 @@ public void OnClusterClickCallsMethodChannel() { StaticCluster cluster = new StaticCluster<>(clusterPosition); - MarkerBuilder marker1 = new MarkerBuilder("m_1", clusterManagerId, PlatformMarkerType.LEGACY); + MarkerBuilder marker1 = new MarkerBuilder("m_1", clusterManagerId, PlatformMarkerType.MARKER); marker1.setPosition(markerPosition1); cluster.add(marker1); - MarkerBuilder marker2 = new MarkerBuilder("m_2", clusterManagerId, PlatformMarkerType.LEGACY); + MarkerBuilder marker2 = new MarkerBuilder("m_2", clusterManagerId, PlatformMarkerType.MARKER); marker2.setPosition(markerPosition2); cluster.add(marker2); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java index 2853f6c93bc..7116e0cdd94 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java @@ -104,11 +104,11 @@ public void ConvertClusterToPigeonReturnsCorrectData() { StaticCluster cluster = new StaticCluster<>(clusterPosition); - MarkerBuilder marker1 = new MarkerBuilder("m_1", clusterManagerId, PlatformMarkerType.LEGACY); + MarkerBuilder marker1 = new MarkerBuilder("m_1", clusterManagerId, PlatformMarkerType.MARKER); marker1.setPosition(markerPosition1); cluster.add(marker1); - MarkerBuilder marker2 = new MarkerBuilder("m_2", clusterManagerId, PlatformMarkerType.LEGACY); + MarkerBuilder marker2 = new MarkerBuilder("m_2", clusterManagerId, PlatformMarkerType.MARKER); marker2.setPosition(markerPosition2); cluster.add(marker2); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java index 27251ffd4eb..416e1e7816a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java @@ -76,7 +76,7 @@ public void before() { public GoogleMapController getGoogleMapController() { GoogleMapController googleMapController = new GoogleMapController(0, context, mockMessenger, activity::getLifecycle, null, - PlatformMarkerType.LEGACY); + PlatformMarkerType.MARKER); googleMapController.init(); return googleMapController; } @@ -221,7 +221,7 @@ public void SetInitialClusterManagers() { @Test public void OnClusterItemRenderedCallsMarkersController() { GoogleMapController googleMapController = getGoogleMapControllerWithMockedDependencies(); - MarkerBuilder markerBuilder = new MarkerBuilder("m_1", "cm_1", PlatformMarkerType.LEGACY); + MarkerBuilder markerBuilder = new MarkerBuilder("m_1", "cm_1", PlatformMarkerType.MARKER); final Marker marker = mock(Marker.class); googleMapController.onClusterItemRendered(markerBuilder, marker); verify(mockMarkersController, times(1)).onClusterItemRendered(markerBuilder, marker); @@ -230,7 +230,7 @@ public void OnClusterItemRenderedCallsMarkersController() { @Test public void OnClusterItemClickCallsMarkersController() { GoogleMapController googleMapController = getGoogleMapControllerWithMockedDependencies(); - MarkerBuilder markerBuilder = new MarkerBuilder("m_1", "cm_1", PlatformMarkerType.LEGACY); + MarkerBuilder markerBuilder = new MarkerBuilder("m_1", "cm_1", PlatformMarkerType.MARKER); googleMapController.onClusterItemClick(markerBuilder); verify(mockMarkersController, times(1)).onMarkerTap(markerBuilder.markerId()); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java index 403cb9b3074..b76cd78e472 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java @@ -97,7 +97,7 @@ public void setUp() { context = ApplicationProvider.getApplicationContext(); flutterApi = spy(new MapsCallbackApi(mock(BinaryMessenger.class))); clusterManagersController = spy( - new ClusterManagersController(flutterApi, context, PlatformMarkerType.LEGACY)); + new ClusterManagersController(flutterApi, context, PlatformMarkerType.MARKER)); controller = new MarkersController( flutterApi, @@ -105,7 +105,7 @@ public void setUp() { assetManager, density, bitmapDescriptorFactoryWrapper, - PlatformMarkerType.LEGACY); + PlatformMarkerType.MARKER); googleMap = mock(GoogleMap.class); markerManager = new MarkerManager(googleMap); markerCollection = markerManager.newCollection(); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart index 7da755403e7..29983363fa3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart @@ -1323,7 +1323,7 @@ void googleMapsTests() { key: key, initialCameraPosition: _kInitialCameraPosition, clusterManagers: clusterManagers, - markerType: MarkerType.advanced, + markerType: MarkerType.advancedMarker, markers: Set.of(markers.values), onMapCreated: (ExampleGoogleMapController googleMapController) { controllerCompleter.complete(googleMapController); @@ -2061,7 +2061,7 @@ void googleMapsTests() { target: LatLng(10.0, 20.0), ), markers: markers, - markerType: MarkerType.advanced, + markerType: MarkerType.advancedMarker, ), ), ); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart index 19602a799ae..7dd26cd3ba2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart @@ -240,8 +240,9 @@ class ClusteringBodyState extends State { Expanded( child: ExampleGoogleMap( mapId: widget.mapId, - markerType: - widget.mapId != null ? MarkerType.advanced : MarkerType.legacy, + markerType: widget.mapId != null + ? MarkerType.advancedMarker + : MarkerType.marker, onMapCreated: _onMapCreated, initialCameraPosition: initialCameraPosition, markers: Set.of(markers.values), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart index 80c20b12569..3ab47dbcb61 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart @@ -87,8 +87,8 @@ class MarkerIconsBodyState extends State { child: ExampleGoogleMap( mapId: widget.mapId, markerType: widget.mapId != null - ? MarkerType.advanced - : MarkerType.legacy, + ? MarkerType.advancedMarker + : MarkerType.marker, initialCameraPosition: const CameraPosition( target: _kMapCenter, zoom: 7.0, diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart index 3f7222844ab..97ef4d338f2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart @@ -316,7 +316,7 @@ class PlaceMarkerBodyState extends State { child: ExampleGoogleMap( mapId: mapId, markerType: - mapId != null ? MarkerType.advanced : MarkerType.legacy, + mapId != null ? MarkerType.advancedMarker : MarkerType.marker, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.211), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index 3744263562b..684417c3079 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -665,7 +665,7 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { Set clusterManagers = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, - MarkerType markerType = MarkerType.legacy, + MarkerType markerType = MarkerType.marker, }) { return _buildView( creationId, @@ -700,7 +700,7 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { Set clusterManagers = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, - MarkerType markerType = MarkerType.legacy, + MarkerType markerType = MarkerType.marker, }) { return buildViewWithTextDirection( creationId, @@ -949,8 +949,8 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { PlatformMarkerType _platformMarkerTypeFromMarkerType(MarkerType markerType) { return switch (markerType) { - MarkerType.legacy => PlatformMarkerType.legacy, - MarkerType.advanced => PlatformMarkerType.advanced, + MarkerType.marker => PlatformMarkerType.marker, + MarkerType.advancedMarker => PlatformMarkerType.advancedMarker, }; } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart index 19af7e9ce73..26635f66e3e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart @@ -465,8 +465,8 @@ class PlatformMapViewCreationParams { } enum PlatformMarkerType { - legacy, - advanced, + marker, + advancedMarker, } /// Pigeon equivalent of MapConfiguration. diff --git a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart index 43cf0d3fd4a..e8533b8789a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart @@ -1073,7 +1073,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, - markerType: MarkerType.legacy, + markerType: MarkerType.marker, ), ); @@ -1317,7 +1317,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, - markerType: MarkerType.legacy, + markerType: MarkerType.marker, )); expect(widget, isA()); @@ -1332,7 +1332,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, - markerType: MarkerType.legacy, + markerType: MarkerType.marker, ), ); @@ -1374,7 +1374,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, - markerType: MarkerType.legacy, + markerType: MarkerType.marker, ), // Here deprecated cloudMapId is used to test that creation params have // the correct mapId @@ -1422,7 +1422,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, - markerType: MarkerType.legacy, + markerType: MarkerType.marker, ), mapConfiguration: const MapConfiguration(mapId: mapId))); @@ -1443,7 +1443,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, - markerType: MarkerType.advanced, + markerType: MarkerType.advancedMarker, ), ); @@ -1452,7 +1452,7 @@ void main() { expect(creationParams, isA()); expect( (creationParams as PlatformMapViewCreationParams).markerType, - PlatformMarkerType.advanced, + PlatformMarkerType.advancedMarker, ); final Widget widget2 = maps.buildViewWithConfiguration( @@ -1461,7 +1461,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, - markerType: MarkerType.legacy, + markerType: MarkerType.marker, ), ); expect(widget2, isA()); @@ -1469,7 +1469,7 @@ void main() { ((widget2 as AndroidView).creationParams as PlatformMapViewCreationParams) .markerType, - PlatformMarkerType.legacy, + PlatformMarkerType.marker, ); }, ); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart index a99c59ea2aa..b6c33884ff2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart @@ -1174,7 +1174,7 @@ void main() { key: key, initialCameraPosition: _kInitialCameraPosition, clusterManagers: clusterManagers, - markerType: MarkerType.advanced, + markerType: MarkerType.advancedMarker, markers: Set.of(markers.values), onMapCreated: (ExampleGoogleMapController googleMapController) { controllerCompleter.complete(googleMapController); @@ -1903,7 +1903,7 @@ void main() { target: LatLng(10.0, 20.0), ), markers: markers, - markerType: MarkerType.advanced, + markerType: MarkerType.advancedMarker, ), ), ); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart index 33e8f6eccba..82eb7efcf9a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart @@ -234,8 +234,9 @@ class ClusteringBodyState extends State { height: 300.0, child: ExampleGoogleMap( mapId: widget.mapId, - markerType: - widget.mapId != null ? MarkerType.advanced : MarkerType.legacy, + markerType: widget.mapId != null + ? MarkerType.advancedMarker + : MarkerType.marker, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.25), diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/marker_icons.dart index 62cc31619b9..5c9f22324bf 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/marker_icons.dart @@ -87,8 +87,8 @@ class MarkerIconsBodyState extends State { child: ExampleGoogleMap( mapId: widget.mapId, markerType: widget.mapId != null - ? MarkerType.advanced - : MarkerType.legacy, + ? MarkerType.advancedMarker + : MarkerType.marker, initialCameraPosition: const CameraPosition( target: _kMapCenter, zoom: 7.0, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart index 437c189b768..a4d4ae5588f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart @@ -335,8 +335,8 @@ class PlaceMarkerBodyState extends State { child: ExampleGoogleMap( mapId: widget.mapId, markerType: widget.mapId != null - ? MarkerType.advanced - : MarkerType.legacy, + ? MarkerType.advancedMarker + : MarkerType.marker, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.211), diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m index 27fec356733..51afca23f58 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m @@ -180,7 +180,7 @@ - (void)addMarker:(FGMPlatformMarker *)markerToAdd { CLLocationCoordinate2D position = FGMGetCoordinateForPigeonLatLng(markerToAdd.position); NSString *markerIdentifier = markerToAdd.markerId; NSString *clusterManagerIdentifier = markerToAdd.clusterManagerId; - GMSMarker *marker = (self.markerType == FGMPlatformMarkerTypeAdvanced) + GMSMarker *marker = (self.markerType == FGMPlatformMarkerTypeAdvanced) ? [GMSAdvancedMarker markerWithPosition:position] : [GMSMarker markerWithPosition:position]; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h index 05867c61ad8..8417375a058 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h @@ -35,6 +35,11 @@ typedef NS_ENUM(NSUInteger, FGMPlatformJointType) { FGMPlatformJointTypeRound = 2, }; +typedef NS_ENUM(NSUInteger, FGMPlatformMarkerType) { + FGMPlatformMarkerTypeMarker = 0, + FGMPlatformMarkerTypeAdvancedMarker = 1, +}; + /// Wrapper for FGMPlatformJointType to allow for nullability. @interface FGMPlatformJointTypeBox : NSObject @property(nonatomic, assign) FGMPlatformJointType value; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index 381f29ca2e8..e6c74736394 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -568,7 +568,7 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { Set tileOverlays = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, - MarkerType markerType = MarkerType.legacy, + MarkerType markerType = MarkerType.marker, }) { return _buildView( creationId, @@ -600,7 +600,7 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { Set tileOverlays = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, - MarkerType markerType = MarkerType.legacy, + MarkerType markerType = MarkerType.marker, }) { return buildViewWithTextDirection( creationId, @@ -778,8 +778,8 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { static PlatformMarkerType _platformMarkerTypeFromMarkerType( MarkerType markerType) { return switch (markerType) { - MarkerType.legacy => PlatformMarkerType.legacy, - MarkerType.advanced => PlatformMarkerType.advanced, + MarkerType.marker => PlatformMarkerType.marker, + MarkerType.advancedMarker => PlatformMarkerType.advancedMarker, }; } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index 770ef70c020..149eca9870b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -412,6 +412,7 @@ class PlatformMapViewCreationParams { final List initialTileOverlays; final List initialClusterManagers; final List initialGroundOverlays; + final PlatformMarkerType markerType; } /// Pigeon equivalent of MapConfiguration. diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart index 2e55e85bcca..5c2890c780c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart @@ -1189,7 +1189,7 @@ void main() { initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, - markerType: MarkerType.legacy, + markerType: MarkerType.marker, ), mapConfiguration: const MapConfiguration(mapId: cloudMapId)))); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart index 9175f3f71dc..5178c603995 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart @@ -648,7 +648,7 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { Set clusterManagers = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, - MarkerType markerType = MarkerType.legacy, + MarkerType markerType = MarkerType.marker, }) { return _buildView( creationId, @@ -682,7 +682,7 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { Set clusterManagers = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, - MarkerType markerType = MarkerType.legacy, + MarkerType markerType = MarkerType.marker, }) { return buildViewWithTextDirection( creationId, diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart index 2ee04ec055e..bf2d76a6424 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart @@ -453,7 +453,7 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface { // TODO(stuartmorgan): Replace with a structured type that's part of the // interface. See https://github.com/flutter/flutter/issues/70330. Map mapOptions = const {}, - MarkerType markerType = MarkerType.legacy, + MarkerType markerType = MarkerType.marker, }) { throw UnimplementedError('buildView() has not been implemented.'); } @@ -480,7 +480,7 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface { Set circles = const {}, Set tileOverlays = const {}, Map mapOptions = const {}, - MarkerType markerType = MarkerType.legacy, + MarkerType markerType = MarkerType.marker, }) { return buildView( creationId, diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart index 0f04e7b26a1..9521892e01f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart @@ -41,9 +41,10 @@ class MapWidgetConfiguration { /// Indicates the type of marker that map should use enum MarkerType { - /// Represents the default marker type, [Marker] - legacy, + /// Represents the default marker type, [Marker]. This marker type is + /// deprecated on the web + marker, /// Represents the advanced marker type, [AdvancedMarker] - advanced, + advancedMarker, } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart index f04b9f19e27..88c817fa7d3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart @@ -119,6 +119,8 @@ class MarkerId extends MapsObjectId { /// A marker icon is drawn oriented against the device's screen rather than /// the map's surface; that is, it will not necessarily change orientation /// due to map rotations, tilting, or zooming. +/// +/// Deprecated on the web in favor of [AdvancedMarker]. @immutable class Marker implements MapsObject { /// Creates a set of marker configuration options. diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart index fda0eb2896c..dbd0bee927c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart @@ -77,7 +77,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0.0, 0.0)), textDirection: TextDirection.ltr, - markerType: MarkerType.legacy, + markerType: MarkerType.marker, ), ), isA(), @@ -181,7 +181,7 @@ class BuildViewGoogleMapsFlutterPlatform extends GoogleMapsFlutterPlatform { Set>? gestureRecognizers = const >{}, Map mapOptions = const {}, - MarkerType markerType = MarkerType.legacy, + MarkerType markerType = MarkerType.marker, }) { return const Text(''); } diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart index 4654291b7aa..58d89518100 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart @@ -68,7 +68,7 @@ void main() { widgetConfiguration: MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: TextDirection.ltr, - markerType: MarkerType.legacy, + markerType: MarkerType.marker, ), mapObjects: mapObjects, mapConfiguration: mapConfiguration, diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart index d74d27d2f0e..f5ba9b5b4ad 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart @@ -83,7 +83,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: TextDirection.ltr, - markerType: MarkerType.legacy, + markerType: MarkerType.marker, ), ); @@ -122,7 +122,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: TextDirection.ltr, - markerType: MarkerType.legacy, + markerType: MarkerType.marker, ), ); @@ -142,7 +142,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: TextDirection.ltr, - markerType: MarkerType.legacy, + markerType: MarkerType.marker, ), ); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_clustering_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_clustering_test.dart index f617cf08abc..4cbd6e240ae 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_clustering_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_clustering_test.dart @@ -54,7 +54,7 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: TextDirection.ltr, - markerType: MarkerType.legacy, + markerType: MarkerType.marker, ), mapObjects: MapObjects( clusterManagers: clusterManagers, markers: initialMarkers))); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index 775637b4646..1209d27c97b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -277,13 +277,13 @@ gmaps.InfoWindowOptions? _infoWindowOptionsFromMarker(Marker marker) { // and the marker.infoWindow.anchor property. } -// Attempts to extract a [gmaps.Size] from `iconConfig[sizeIndex]`. +/// Attempts to extract a [gmaps.Size] from `iconConfig[sizeIndex]`. gmaps.Size? _gmSizeFromIconConfig(List iconConfig, int sizeIndex) { final Size? size = _sizeFromIconConfig(iconConfig, sizeIndex); return size != null ? gmaps.Size(size.width, size.height) : null; } -// Attempts to extract a [Size] from `iconConfig[sizeIndex]`. +/// Attempts to extract a [Size] from `iconConfig[sizeIndex]`. Size? _sizeFromIconConfig(List iconConfig, int sizeIndex) { Size? size; if (iconConfig.length >= sizeIndex + 1) { diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index c581e093f9a..674cb0ff3c4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -47,13 +47,13 @@ class GoogleMapController { assert(markerTypes.length == 1, 'All markers must be of the same type.'); switch (widgetConfiguration.markerType) { - case MarkerType.legacy: + case MarkerType.marker: assert( markerTypes.first == Marker, 'All markers must be of type Marker because ' 'widgetConfiguration.markerType is MarkerType.legacy', ); - case MarkerType.advanced: + case MarkerType.advancedMarker: assert( markerTypes.first == AdvancedMarker, 'All markers must be of type AdvancedMarker because ' @@ -65,21 +65,20 @@ class GoogleMapController { // Advanced and legacy markers are handled differently so markers controller // and cluster manager need be initialized with the correct marker type _clusterManagersController = switch (widgetConfiguration.markerType) { - MarkerType.legacy => + MarkerType.marker => ClusterManagersController(stream: _streamController), - MarkerType.advanced => + MarkerType.advancedMarker => ClusterManagersController( stream: _streamController), }; - _markersController = switch (widgetConfiguration.markerType) { - MarkerType.legacy => MarkersController( + MarkerType.marker => MarkersController( stream: _streamController, clusterManagersController: _clusterManagersController! as ClusterManagersController, ), - MarkerType.advanced => MarkersController( + MarkerType.advancedMarker => MarkersController< + gmaps.AdvancedMarkerElement, gmaps.AdvancedMarkerElementOptions>( stream: _streamController, clusterManagersController: _clusterManagersController! as ClusterManagersController, diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart index 6c59e289a48..e0a10f205e9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart @@ -4,9 +4,13 @@ part of '../google_maps_flutter_web.dart'; -/// The `MarkerController` class wraps a [gmaps.AdvancedMarkerElement], how it handles events, and its associated (optional) [gmaps.InfoWindow] widget. +/// The `MarkerController` class wraps a [gmaps.AdvancedMarkerElement] +/// or [gmaps.Marker], how it handles events, and its associated (optional) +/// [gmaps.InfoWindow] widget. class MarkerController { - /// Creates a `MarkerController`, which wraps a [gmaps.AdvancedMarkerElement] object, its `onTap`/`onDrag` behavior, and its associated [gmaps.InfoWindow]. + /// Creates a `MarkerController`, which wraps a [gmaps.AdvancedMarkerElement] + /// or [gmaps.Marker] object, its `onTap`/`onDrag` behavior, and its + /// associated [gmaps.InfoWindow]. MarkerController({ required T marker, gmaps.InfoWindow? infoWindow, @@ -62,14 +66,14 @@ class MarkerController { /// Returns [ClusterManagerId] if marker belongs to cluster. ClusterManagerId? get clusterManagerId => _clusterManagerId; - /// Returns the [gmaps.AdvancedMarkerElement] associated to this controller. + /// Returns the marker associated to this controller. T? get marker => _marker; /// Returns the [gmaps.InfoWindow] associated to the marker. @visibleForTesting gmaps.InfoWindow? get infoWindow => _infoWindow; - /// Updates the options of the wrapped [gmaps.AdvancedMarkerElement] object. + /// Updates the options of the wrapped marker object. /// /// This cannot be called after [remove]. void update( @@ -102,7 +106,7 @@ class MarkerController { } } - /// Disposes of the currently wrapped [gmaps.AdvancedMarkerElement]. + /// Disposes of the currently wrapped marker object. void remove() { if (_marker != null) { _infoWindowShown = false; @@ -216,6 +220,7 @@ class MarkerController { } } +/// Check marker type and call [legacy] or [advanced] void _doOnMarkerType({ required dynamic marker, required void Function(gmaps.Marker marker) legacy, @@ -233,6 +238,7 @@ void _doOnMarkerType({ } } +/// Check [marker] type and return result of [legacy] or [advanced] function R getOnMarkerType({ required dynamic marker, required R Function(gmaps.Marker marker) legacy, diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart index 55bb0aef6bd..778466565e1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart @@ -68,8 +68,7 @@ class ClusterManagersController extends GeometryController { _clusterManagerIdToMarkerClusterer.remove(clusterManagerId); } - /// Adds given [gmaps.AdvancedMarkerElement] to the [MarkerClusterer] with - /// given [ClusterManagerId]. + /// Adds given markers to the [MarkerClusterer] with given [ClusterManagerId]. void addItem( ClusterManagerId clusterManagerId, T marker, @@ -82,8 +81,8 @@ class ClusterManagersController extends GeometryController { } } - /// Removes given [gmaps.AdvancedMarkerElement] from the [MarkerClusterer] - /// with given [ClusterManagerId]. + /// Removes given marker from the [MarkerClusterer] with + /// given [ClusterManagerId]. void removeItem( ClusterManagerId clusterManagerId, T? marker, From 0ecffad1026a34e6fc44a1fab0e38b65f3f83645 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 15 Oct 2024 13:41:59 +0300 Subject: [PATCH 035/130] Add a comment about hue bitmap descriptor --- .../lib/src/types/bitmap.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart index f4d753a40ee..84bc827d4fd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart @@ -55,6 +55,8 @@ const double _naturalPixelRatio = 1.0; /// a default marker icon. /// Use the [BitmapDescriptor.defaultMarkerWithHue] to create a /// [BitmapDescriptor] for a default marker icon with a hue value. +/// Use the [BitmapDescriptor.pinConfig] to create a custom icon for +/// [AdvancedMarker]. abstract class BitmapDescriptor { const BitmapDescriptor._(); @@ -211,6 +213,9 @@ abstract class BitmapDescriptor { /// Creates a BitmapDescriptor that refers to a colorization of the default /// marker image. For convenience, there is a predefined set of hue values. /// See e.g. [hueYellow]. + /// + /// Doesn't work with [AdvancedMarker]s, [BitmapDescriptor.pinConfig] should + /// be used instead. static BitmapDescriptor defaultMarkerWithHue(double hue) { assert(0.0 <= hue && hue < 360.0); return DefaultMarker(hue: hue); From 5b61f58de9d29828ca03451586d8cfb5fc2f75bb Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 16 Oct 2024 11:40:29 +0300 Subject: [PATCH 036/130] Fix after rebase --- .../flutter/plugins/googlemaps/Convert.java | 22 +++++++---- .../plugins/googlemaps/ConvertTest.java | 11 +++--- .../example/lib/place_marker.dart | 5 ++- .../lib/src/google_maps_flutter_android.dart | 15 ++++++++ .../pigeons/messages.dart | 19 ++++++++++ .../google_maps_flutter_android_test.dart | 38 ++++++++++++------- .../maps_example_dart/lib/place_marker.dart | 5 ++- .../pigeons/messages.dart | 5 +++ .../lib/src/types/bitmap.dart | 2 +- .../test/types/bitmap_test.dart | 2 + 10 files changed, 92 insertions(+), 32 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java index 86d05a89736..e36cb74734d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java @@ -119,6 +119,10 @@ private static BitmapDescriptor toBitmapDescriptor( Messages.PlatformBitmapBytesMap typedBitmap = (Messages.PlatformBitmapBytesMap) bitmap; return getBitmapFromBytes(typedBitmap, density, wrapper); } + if (bitmap instanceof Messages.PlatformBitmapPinConfig) { + Messages.PlatformBitmapPinConfig pinConfigBitmap = (Messages.PlatformBitmapPinConfig) bitmap; + return getBitmapFromPinConfig(pinConfigBitmap, assetManager, density, wrapper); + } throw new IllegalArgumentException("PlatformBitmap did not contain a supported subtype."); } @@ -190,7 +194,7 @@ public static BitmapDescriptor getBitmapFromBytes( } public static BitmapDescriptor getBitmapFromPinConfig( - Map byteData, + Messages.PlatformBitmapPinConfig pinConfigBitmap, AssetManager assetManager, float density, BitmapDescriptorFactoryWrapper bitmapDescriptorFactory @@ -204,17 +208,19 @@ public static BitmapDescriptor getBitmapFromPinConfig( final String glyphBitmapDescriptorKey = "glyphBitmapDescriptor"; final Integer backgroundColor = - byteData.containsKey(backgroundColorKey) ? toInt(byteData.get(backgroundColorKey)) : null; + pinConfigBitmap.getBackgroundColor() != null ? toInt(pinConfigBitmap.getBackgroundColor()) + : null; final Integer borderColor = - byteData.containsKey(borderColorKey) ? toInt(byteData.get(borderColorKey)) : null; + pinConfigBitmap.getBorderColor() != null ? toInt(pinConfigBitmap.getBorderColor()) : null; final String glyphText = - byteData.containsKey(glyphTextKey) ? toString(byteData.get(glyphTextKey)) : null; + pinConfigBitmap.getGlyphText() != null ? pinConfigBitmap.getGlyphText() : null; final Integer glyphTextColor = - byteData.containsKey(glyphTextColorKey) ? toInt(byteData.get(glyphTextColorKey)) : null; + pinConfigBitmap.getGlyphTextColor() != null ? toInt(pinConfigBitmap.getGlyphTextColor()) + : null; final Integer glyphColor = - byteData.containsKey(glyphColorKey) ? toInt(byteData.get(glyphColorKey)) : null; - final BitmapDescriptor glyphBitmapDescriptor = byteData.containsKey(glyphBitmapDescriptorKey) - ? toBitmapDescriptor(byteData.get(glyphBitmapDescriptorKey), assetManager, density) + pinConfigBitmap.getGlyphColor() != null ? toInt(pinConfigBitmap.getGlyphColor()) : null; + final BitmapDescriptor glyphBitmapDescriptor = pinConfigBitmap.getGlyphBitmap() != null + ? toBitmapDescriptor(pinConfigBitmap.getGlyphBitmap(), assetManager, density) : null; final PinConfig.Builder pinConfigBuilder = PinConfig.builder(); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java index 7116e0cdd94..683c46a2633 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java @@ -336,13 +336,14 @@ public void GetBitmapFromBytesThrowsErrorIfInvalidImageData() { @Test public void GetBitmapFromPinConfig() { - Map assetDetails = new HashMap<>(); - assetDetails.put("backgroundColor", 0xFFFFFFFF); - assetDetails.put("borderColor", 0xFFFFFFFF); + Messages.PlatformBitmapPinConfig bitmap = new Messages.PlatformBitmapPinConfig.Builder() + .setBackgroundColor(0xFFFFFFL) + .setBorderColor(0xFFFFFFL) + .build(); when(bitmapDescriptorFactoryWrapper.fromPinConfig(any())).thenReturn(mockBitmapDescriptor); - BitmapDescriptor result = Convert.getBitmapFromPinConfig( - assetDetails, assetManager, 1f, bitmapDescriptorFactoryWrapper); + BitmapDescriptor result = Convert.getBitmapFromPinConfig(bitmap, assetManager, 1f, + bitmapDescriptorFactoryWrapper); Assert.assertEquals(mockBitmapDescriptor, result); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart index 97ef4d338f2..b87764cf838 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart @@ -44,9 +44,10 @@ class PlaceMarkerBodyState extends State { int _markerIdCounter = 1; LatLng? markerPosition; - // ignore: use_setters_to_change_properties void _onMapCreated(ExampleGoogleMapController controller) { - this.controller = controller; + setState(() { + this.controller = controller; + }); } @override diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index 684417c3079..44f71ced985 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -1022,6 +1022,21 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { imagePixelRatio: bytes.imagePixelRatio, width: bytes.width, height: bytes.height)); + case final PinConfig pinConfig: + final BitmapDescriptor? glyphBitmapDescriptor = + pinConfig.glyph?.bitmapDescriptor; + return PlatformBitmap( + bitmap: PlatformBitmapPinConfig( + backgroundColor: pinConfig.backgroundColor?.value, + borderColor: pinConfig.borderColor?.value, + glyphColor: pinConfig.glyph?.color?.value, + glyphText: pinConfig.glyph?.text, + glyphTextColor: pinConfig.glyph?.textColor?.value, + glyphBitmap: glyphBitmapDescriptor != null + ? platformBitmapFromBitmapDescriptor(glyphBitmapDescriptor) + : null, + ), + ); default: throw ArgumentError( 'Unrecognized type of bitmap ${bitmap.runtimeType}', 'bitmap'); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart index 26635f66e3e..82b9d37f15c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart @@ -637,6 +637,25 @@ class PlatformBitmapBytesMap { final double? height; } +class PlatformBitmapPinConfig { + PlatformBitmapPinConfig({ + required this.backgroundColor, + required this.borderColor, + required this.glyphColor, + required this.glyphBitmap, + required this.glyphText, + required this.glyphTextColor, + }); + + final int? backgroundColor; + final int? borderColor; + final int? glyphColor; + final PlatformBitmap? glyphBitmap; + + final String? glyphText; + final int? glyphTextColor; +} + /// Interface for non-test interactions with the native SDK. /// /// For test-only state queries, see [MapsInspectorApi]. diff --git a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart index e8533b8789a..1d39c58c7f4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart @@ -521,20 +521,25 @@ void main() { expect(toChange.length, 1); final List? encoded = toChange.first?.encode() as List?; expect(encoded?[0], object2new.alpha); - final PlatformOffset? offset = encoded?[1] as PlatformOffset?; - expect(offset?.dx, object2new.anchor.dx); - expect(offset?.dy, object2new.anchor.dy); - expect(encoded?.getRange(2, 6).toList(), [ + final PlatformDoublePair? offset = encoded?[1] as PlatformDoublePair?; + expect(offset?.x, object2new.anchor.dx); + expect(offset?.y, object2new.anchor.dy); + expect(encoded?.getRange(2, 5).toList(), [ object2new.consumeTapEvents, object2new.draggable, object2new.flat, - object2new.icon.toJson(), ]); + expect( + (encoded?[5] as PlatformBitmap?)?.bitmap.runtimeType, + GoogleMapsFlutterAndroid.platformBitmapFromBitmapDescriptor( + object2new.icon) + .bitmap + .runtimeType); final PlatformInfoWindow? window = encoded?[6] as PlatformInfoWindow?; expect(window?.title, object2new.infoWindow.title); expect(window?.snippet, object2new.infoWindow.snippet); - expect(window?.anchor.dx, object2new.infoWindow.anchor.dx); - expect(window?.anchor.dy, object2new.infoWindow.anchor.dy); + expect(window?.anchor.x, object2new.infoWindow.anchor.dx); + expect(window?.anchor.y, object2new.infoWindow.anchor.dy); final PlatformLatLng? latLng = encoded?[7] as PlatformLatLng?; expect(latLng?.latitude, object2new.position.latitude); expect(latLng?.longitude, object2new.position.longitude); @@ -551,20 +556,25 @@ void main() { expect(toAdd.length, 1); final List? encoded = toAdd.first?.encode() as List?; expect(encoded?[0], object3.alpha); - final PlatformOffset? offset = encoded?[1] as PlatformOffset?; - expect(offset?.dx, object3.anchor.dx); - expect(offset?.dy, object3.anchor.dy); - expect(encoded?.getRange(2, 6).toList(), [ + final PlatformDoublePair? offset = encoded?[1] as PlatformDoublePair?; + expect(offset?.x, object3.anchor.dx); + expect(offset?.y, object3.anchor.dy); + expect(encoded?.getRange(2, 5).toList(), [ object3.consumeTapEvents, object3.draggable, object3.flat, - object3.icon.toJson(), ]); + expect( + (encoded?[5] as PlatformBitmap?)?.bitmap.runtimeType, + GoogleMapsFlutterAndroid.platformBitmapFromBitmapDescriptor( + object3.icon) + .bitmap + .runtimeType); final PlatformInfoWindow? window = encoded?[6] as PlatformInfoWindow?; expect(window?.title, object3.infoWindow.title); expect(window?.snippet, object3.infoWindow.snippet); - expect(window?.anchor.dx, object3.infoWindow.anchor.dx); - expect(window?.anchor.dy, object3.infoWindow.anchor.dy); + expect(window?.anchor.x, object3.infoWindow.anchor.dx); + expect(window?.anchor.y, object3.infoWindow.anchor.dy); final PlatformLatLng? latLng = encoded?[7] as PlatformLatLng?; expect(latLng?.latitude, object3.position.latitude); expect(latLng?.longitude, object3.position.longitude); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart index a4d4ae5588f..406744c3900 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart @@ -48,9 +48,10 @@ class PlaceMarkerBodyState extends State { // A helper text for Xcode UITests. String _onDragXcodeUITestHelperText = ''; - // ignore: use_setters_to_change_properties void _onMapCreated(ExampleGoogleMapController controller) { - this.controller = controller; + setState(() { + this.controller = controller; + }); } @override diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index 149eca9870b..1087691392d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -415,6 +415,11 @@ class PlatformMapViewCreationParams { final PlatformMarkerType markerType; } +enum PlatformMarkerType { + marker, + advancedMarker, +} + /// Pigeon equivalent of MapConfiguration. class PlatformMapConfiguration { PlatformMapConfiguration({ diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart index 84bc827d4fd..80f9f6a026e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart @@ -1046,7 +1046,7 @@ class PinConfig extends BitmapDescriptor { backgroundColor != null || borderColor != null || glyph != null, 'Cannot create PinConfig with all parameters being null.', ), - super._(const []); + super._(); /// The type of the MapBitmap object, used for the JSON serialization. static const String type = 'pinConfig'; diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart index 57048e1e1d2..2d11748786f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart @@ -757,6 +757,8 @@ void main() { ], ); }); + }); + test('mapBitmapScaling from String', () { expect(mapBitmapScalingFromString('auto'), MapBitmapScaling.auto); expect(mapBitmapScalingFromString('none'), MapBitmapScaling.none); From be481c7bfa4e1ac63fef5e3a955f6ab2426a81b0 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 16 Oct 2024 12:00:14 +0300 Subject: [PATCH 037/130] Update README --- .../google_maps_flutter/README.md | 15 +++++++++++++++ .../google_maps_flutter_web/README.md | 11 +++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/README.md b/packages/google_maps_flutter/google_maps_flutter/README.md index dd7bd70a337..f9a1965c26b 100644 --- a/packages/google_maps_flutter/google_maps_flutter/README.md +++ b/packages/google_maps_flutter/google_maps_flutter/README.md @@ -116,6 +116,21 @@ the `GoogleMap`'s `onMapCreated` callback. The `GoogleMap` widget should be used within a widget with a bounded size. Using it in an unbounded widget will cause the application to throw a Flutter exception. +### Advanced Markers + +[Advanced Markers](https://developers.google.com/maps/documentation/javascript/advanced-markers/overview) are map markers that offer extra customization options. [Map Id](https://developers.google.com/maps/documentation/get-map-id) is required in order to use Advanced Markers: + +```dart +GoogleMap( + // Set your Map Id + mapId: 'my-map-id', + + // Let map know that you're using Advanced Markers + markerType: MarkerType.advancedMarker, + ... +), +``` + ### Sample Usage diff --git a/packages/google_maps_flutter/google_maps_flutter_web/README.md b/packages/google_maps_flutter/google_maps_flutter_web/README.md index 9a92c70bad1..2dd51dcaf8d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/README.md +++ b/packages/google_maps_flutter/google_maps_flutter_web/README.md @@ -32,7 +32,7 @@ Modify the `` tag of your `web/index.html` to load the Google Maps JavaScr The Google Maps Web SDK splits some of its functionality in [separate libraries](https://developers.google.com/maps/documentation/javascript/libraries#libraries-for-dynamic-library-import). If your app needs the `drawing` library (to draw polygons, rectangles, polylines, -circles or markers on a map), include it like this: +circles or legacy markers on a map), include it like this: ```html +``` + To request multiple libraries, separate them with commas: ```html ``` From 065bdd122de6492ed85a910906371ea86e8d1686 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 16 Oct 2024 14:03:39 +0300 Subject: [PATCH 038/130] Clean up --- .../google_maps_flutter/example/lib/main.dart | 2 +- .../android/gradle/wrapper/gradle-wrapper.properties | 1 - .../example/lib/scrolling_map.dart | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 packages/google_maps_flutter/google_maps_flutter_android/android/gradle/wrapper/gradle-wrapper.properties diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart index 2a0160e131d..33b83e09c8c 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart @@ -34,7 +34,7 @@ import 'tile_overlay.dart'; /// Map Id is required for some examples to use advanced markers // ignore: unnecessary_nullable_for_final_variable_declarations, unreachable_from_main -const String? mapId = 'ffa0cdfef09314e3'; +const String? mapId = null; final List _allPages = [ const MapUiPage(), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/gradle/wrapper/gradle-wrapper.properties b/packages/google_maps_flutter/google_maps_flutter_android/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 87c380463c7..00000000000 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1 +0,0 @@ -#distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip \ No newline at end of file diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/scrolling_map.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/scrolling_map.dart index a3c2efa7cef..a4901f2ce5f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/scrolling_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/scrolling_map.dart @@ -82,8 +82,8 @@ class ScrollingMapBody extends StatelessWidget { target: _center, zoom: 11.0, ), - markers: { - AdvancedMarker( + markers: { + Marker( markerId: const MarkerId('test_marker_id'), position: LatLng( _center.latitude, From a0d9e31c81c11a50f7ce8245056190cc30269eef Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 16 Oct 2024 15:22:58 +0300 Subject: [PATCH 039/130] Reformat code --- .../googlemaps/ClusterManagersController.java | 20 +++++------- .../flutter/plugins/googlemaps/Convert.java | 23 +++++++------ .../plugins/googlemaps/GoogleMapBuilder.java | 4 +-- .../googlemaps/GoogleMapController.java | 6 ++-- .../plugins/googlemaps/MarkerBuilder.java | 7 ++-- .../plugins/googlemaps/MarkerController.java | 3 +- .../plugins/googlemaps/MarkersController.java | 5 +-- .../ClusterManagersControllerTest.java | 32 +++++++++---------- .../plugins/googlemaps/ConvertTest.java | 13 ++++---- .../googlemaps/GoogleMapControllerTest.java | 4 +-- .../googlemaps/MarkersControllerTest.java | 4 +-- .../example/pubspec.yaml | 4 +-- 12 files changed, 61 insertions(+), 64 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java index e2d5fee7d91..9809d32a591 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java @@ -35,8 +35,7 @@ class ClusterManagersController ClusterManager.OnClusterClickListener { @NonNull private final Context context; - @VisibleForTesting - @NonNull + @VisibleForTesting @NonNull protected final HashMap> clusterManagerIdToManager; @NonNull private final MapsCallbackApi flutterApi; @@ -54,8 +53,7 @@ class ClusterManagersController ClusterManagersController( @NonNull MapsCallbackApi flutterApi, @NonNull Context context, - @NonNull PlatformMarkerType markerType - ) { + @NonNull PlatformMarkerType markerType) { this.clusterManagerIdToManager = new HashMap<>(); this.context = context; this.flutterApi = flutterApi; @@ -109,10 +107,9 @@ void addClusterManager(String clusterManagerId) { } /** - * Initialize cluster renderer if it hasn't been initialized before. - * ClusterManager uses default renderer which should be changed to (legacy) renderer or - * advanced renderer - **/ + * Initialize cluster renderer if it hasn't been initialized before. ClusterManager uses default + * renderer which should be changed to (legacy) renderer or advanced renderer + */ private void initializeRenderer(ClusterManager clusterManager) { final ClusterRenderer renderer = clusterManager.getRenderer(); if (renderer.getClass() == MarkerClusterRenderer.class @@ -261,8 +258,8 @@ protected void onClusterItemRendered(@NonNull T item, @NonNull Marker marker) { /** AdvancedMarkerClusterRenderer is a ClusterRenderer that supports AdvancedMarkers */ @VisibleForTesting - static class AdvancedMarkerClusterRenderer extends - DefaultAdvancedMarkersClusterRenderer { + static class AdvancedMarkerClusterRenderer + extends DefaultAdvancedMarkersClusterRenderer { private final ClusterManagersController clusterManagersController; @@ -270,8 +267,7 @@ public AdvancedMarkerClusterRenderer( Context context, GoogleMap map, ClusterManager clusterManager, - ClusterManagersController clusterManagersController - ) { + ClusterManagersController clusterManagersController) { super(context, map, clusterManager); this.clusterManagersController = clusterManagersController; } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java index e36cb74734d..274dd8f4248 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java @@ -197,8 +197,7 @@ public static BitmapDescriptor getBitmapFromPinConfig( Messages.PlatformBitmapPinConfig pinConfigBitmap, AssetManager assetManager, float density, - BitmapDescriptorFactoryWrapper bitmapDescriptorFactory - ) { + BitmapDescriptorFactoryWrapper bitmapDescriptorFactory) { try { final String backgroundColorKey = "backgroundColor"; final String borderColorKey = "borderColor"; @@ -208,20 +207,23 @@ public static BitmapDescriptor getBitmapFromPinConfig( final String glyphBitmapDescriptorKey = "glyphBitmapDescriptor"; final Integer backgroundColor = - pinConfigBitmap.getBackgroundColor() != null ? toInt(pinConfigBitmap.getBackgroundColor()) + pinConfigBitmap.getBackgroundColor() != null + ? toInt(pinConfigBitmap.getBackgroundColor()) : null; final Integer borderColor = pinConfigBitmap.getBorderColor() != null ? toInt(pinConfigBitmap.getBorderColor()) : null; final String glyphText = pinConfigBitmap.getGlyphText() != null ? pinConfigBitmap.getGlyphText() : null; final Integer glyphTextColor = - pinConfigBitmap.getGlyphTextColor() != null ? toInt(pinConfigBitmap.getGlyphTextColor()) + pinConfigBitmap.getGlyphTextColor() != null + ? toInt(pinConfigBitmap.getGlyphTextColor()) : null; final Integer glyphColor = pinConfigBitmap.getGlyphColor() != null ? toInt(pinConfigBitmap.getGlyphColor()) : null; - final BitmapDescriptor glyphBitmapDescriptor = pinConfigBitmap.getGlyphBitmap() != null - ? toBitmapDescriptor(pinConfigBitmap.getGlyphBitmap(), assetManager, density) - : null; + final BitmapDescriptor glyphBitmapDescriptor = + pinConfigBitmap.getGlyphBitmap() != null + ? toBitmapDescriptor(pinConfigBitmap.getGlyphBitmap(), assetManager, density) + : null; final PinConfig.Builder pinConfigBuilder = PinConfig.builder(); if (backgroundColor != null) { @@ -234,9 +236,10 @@ public static BitmapDescriptor getBitmapFromPinConfig( PinConfig.Glyph glyph = null; if (glyphText != null) { - glyph = glyphTextColor != null - ? new PinConfig.Glyph(glyphText, glyphTextColor) - : new PinConfig.Glyph(glyphText); + glyph = + glyphTextColor != null + ? new PinConfig.Glyph(glyphText, glyphTextColor) + : new PinConfig.Glyph(glyphText); } else if (glyphBitmapDescriptor != null) { glyph = new PinConfig.Glyph(glyphBitmapDescriptor); } else if (glyphColor != null) { diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapBuilder.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapBuilder.java index 7ee163b0fcf..678475558ac 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapBuilder.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapBuilder.java @@ -41,8 +41,8 @@ GoogleMapController build( LifecycleProvider lifecycleProvider, PlatformMarkerType markerType) { final GoogleMapController controller = - new GoogleMapController(id, context, binaryMessenger, lifecycleProvider, options, - markerType); + new GoogleMapController( + id, context, binaryMessenger, lifecycleProvider, options, markerType); controller.init(); controller.setMyLocationEnabled(myLocationEnabled); controller.setMyLocationButtonEnabled(myLocationButtonEnabled); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java index 7fc011fbc04..80e5969c077 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java @@ -1034,9 +1034,9 @@ public Boolean isInfoWindowShown(@NonNull String markerId) { public @NonNull Boolean isAdvancedMarkersAvailable() { if (googleMap == null) { throw new FlutterError( - "GoogleMap uninitialized", "getMapCapabilities() called prior to map initialization", - null - ); + "GoogleMap uninitialized", + "getMapCapabilities() called prior to map initialization", + null); } final MapCapabilities mapCapabilities = googleMap.getMapCapabilities(); return mapCapabilities.isAdvancedMarkersAvailable(); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java index d5fabbd7acb..fde0a3b6b84 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java @@ -18,9 +18,10 @@ class MarkerBuilder implements MarkerOptionsSink, ClusterItem { private boolean consumeTapEvents; MarkerBuilder(String markerId, String clusterManagerId, PlatformMarkerType markerType) { - this.markerOptions = markerType == PlatformMarkerType.ADVANCED_MARKER - ? new AdvancedMarkerOptions() - : new MarkerOptions(); + this.markerOptions = + markerType == PlatformMarkerType.ADVANCED_MARKER + ? new AdvancedMarkerOptions() + : new MarkerOptions(); this.markerId = markerId; this.clusterManagerId = clusterManagerId; } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java index dd5722e2c1b..b1c0a144419 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java @@ -144,8 +144,7 @@ public void setZIndex(float zIndex) { } @Override - public void setCollisionBehavior(int collisionBehavior) { - } + public void setCollisionBehavior(int collisionBehavior) {} String getGoogleMapsMarkerId() { return googleMapsMarkerId; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java index 2f0dd0b0e5c..b19cc422eea 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkersController.java @@ -5,9 +5,7 @@ package io.flutter.plugins.googlemaps; import android.content.res.AssetManager; - import androidx.annotation.NonNull; - import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.Marker; import com.google.android.gms.maps.model.MarkerOptions; @@ -180,8 +178,7 @@ public void onClusterItemRendered(MarkerBuilder markerBuilder, Marker marker) { private void addMarker(@NonNull Messages.PlatformMarker marker) { String markerId = marker.getMarkerId(); String clusterManagerId = marker.getClusterManagerId(); - MarkerBuilder markerBuilder = new MarkerBuilder(markerId, clusterManagerId, - markerType); + MarkerBuilder markerBuilder = new MarkerBuilder(markerId, clusterManagerId, markerType); Convert.interpretMarkerOptions( marker, markerBuilder, assetManager, density, bitmapDescriptorFactoryWrapper); addMarker(markerBuilder); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java index 2bbf88e0eeb..adaae8c3b4c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java @@ -106,10 +106,10 @@ public void AddClusterManagersAndMarkers() { clusterManagersToAdd.add(initialClusterManager); controller.addClusterManagers(clusterManagersToAdd); - MarkerBuilder markerBuilder1 = new MarkerBuilder(markerId1, clusterManagerId, - PlatformMarkerType.MARKER); - MarkerBuilder markerBuilder2 = new MarkerBuilder(markerId2, clusterManagerId, - PlatformMarkerType.MARKER); + MarkerBuilder markerBuilder1 = + new MarkerBuilder(markerId1, clusterManagerId, PlatformMarkerType.MARKER); + MarkerBuilder markerBuilder2 = + new MarkerBuilder(markerId2, clusterManagerId, PlatformMarkerType.MARKER); final Messages.PlatformMarker markerData1 = createPlatformMarker(markerId1, location1, clusterManagerId); @@ -149,11 +149,11 @@ public void SelectClusterRenderer() { when(googleMap.getCameraPosition()) .thenReturn(CameraPosition.builder().target(new LatLng(0, 0)).build()); - ClusterManagersController controller1 = spy( - new ClusterManagersController(flutterApi, context, PlatformMarkerType.MARKER)); + ClusterManagersController controller1 = + spy(new ClusterManagersController(flutterApi, context, PlatformMarkerType.MARKER)); controller1.init(googleMap, markerManager); - ClusterManagersController controller2 = spy( - new ClusterManagersController(flutterApi, context, PlatformMarkerType.ADVANCED_MARKER)); + ClusterManagersController controller2 = + spy(new ClusterManagersController(flutterApi, context, PlatformMarkerType.ADVANCED_MARKER)); controller2.init(googleMap, markerManager); Messages.PlatformClusterManager initialClusterManager1 = @@ -168,23 +168,23 @@ public void SelectClusterRenderer() { clusterManagersToAdd2.add(initialClusterManager2); controller2.addClusterManagers(clusterManagersToAdd2); - MarkerBuilder markerBuilder1 = new MarkerBuilder(markerId1, clusterManagerId1, - PlatformMarkerType.MARKER); + MarkerBuilder markerBuilder1 = + new MarkerBuilder(markerId1, clusterManagerId1, PlatformMarkerType.MARKER); markerBuilder1.setPosition(new LatLng(10.0, 20.0)); controller1.addItem(markerBuilder1); - MarkerBuilder markerBuilder2 = new MarkerBuilder(markerId2, clusterManagerId2, - PlatformMarkerType.ADVANCED_MARKER); + MarkerBuilder markerBuilder2 = + new MarkerBuilder(markerId2, clusterManagerId2, PlatformMarkerType.ADVANCED_MARKER); markerBuilder2.setPosition(new LatLng(20.0, 10.0)); controller2.addItem(markerBuilder2); - ClusterManager clusterManager1 = controller1.clusterManagerIdToManager.get( - clusterManagerId1); + ClusterManager clusterManager1 = + controller1.clusterManagerIdToManager.get(clusterManagerId1); assertNotNull(clusterManager1); assertSame(clusterManager1.getRenderer().getClass(), MarkerClusterRenderer.class); - ClusterManager clusterManager2 = controller2.clusterManagerIdToManager.get( - clusterManagerId2); + ClusterManager clusterManager2 = + controller2.clusterManagerIdToManager.get(clusterManagerId2); assertNotNull(clusterManager2); assertSame(clusterManager2.getRenderer().getClass(), AdvancedMarkerClusterRenderer.class); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java index 683c46a2633..42b552103bb 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java @@ -336,14 +336,15 @@ public void GetBitmapFromBytesThrowsErrorIfInvalidImageData() { @Test public void GetBitmapFromPinConfig() { - Messages.PlatformBitmapPinConfig bitmap = new Messages.PlatformBitmapPinConfig.Builder() - .setBackgroundColor(0xFFFFFFL) - .setBorderColor(0xFFFFFFL) - .build(); + Messages.PlatformBitmapPinConfig bitmap = + new Messages.PlatformBitmapPinConfig.Builder() + .setBackgroundColor(0xFFFFFFL) + .setBorderColor(0xFFFFFFL) + .build(); when(bitmapDescriptorFactoryWrapper.fromPinConfig(any())).thenReturn(mockBitmapDescriptor); - BitmapDescriptor result = Convert.getBitmapFromPinConfig(bitmap, assetManager, 1f, - bitmapDescriptorFactoryWrapper); + BitmapDescriptor result = + Convert.getBitmapFromPinConfig(bitmap, assetManager, 1f, bitmapDescriptorFactoryWrapper); Assert.assertEquals(mockBitmapDescriptor, result); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java index 416e1e7816a..bbe9b9d7bbf 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java @@ -75,8 +75,8 @@ public void before() { // See getGoogleMapControllerWithMockedDependencies for version with dependency injections. public GoogleMapController getGoogleMapController() { GoogleMapController googleMapController = - new GoogleMapController(0, context, mockMessenger, activity::getLifecycle, null, - PlatformMarkerType.MARKER); + new GoogleMapController( + 0, context, mockMessenger, activity::getLifecycle, null, PlatformMarkerType.MARKER); googleMapController.init(); return googleMapController; } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java index b76cd78e472..3fb75793255 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java @@ -96,8 +96,8 @@ public void setUp() { assetManager = ApplicationProvider.getApplicationContext().getAssets(); context = ApplicationProvider.getApplicationContext(); flutterApi = spy(new MapsCallbackApi(mock(BinaryMessenger.class))); - clusterManagersController = spy( - new ClusterManagersController(flutterApi, context, PlatformMarkerType.MARKER)); + clusterManagersController = + spy(new ClusterManagersController(flutterApi, context, PlatformMarkerType.MARKER)); controller = new MarkersController( flutterApi, diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml index d532297667c..d0628d351e0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml @@ -38,10 +38,10 @@ dependency_overrides: # if we need to make a breaking change to google_maps_flutter_web. google_maps_flutter: path: ../../../google_maps_flutter/google_maps_flutter + google_maps_flutter_android: + path: ../../../google_maps_flutter/google_maps_flutter_android google_maps_flutter_platform_interface: path: ../../../google_maps_flutter/google_maps_flutter_platform_interface google_maps_flutter_web: path: ../../../google_maps_flutter/google_maps_flutter_web - google_maps_flutter_android: - path: ../../../google_maps_flutter/google_maps_flutter_android From dbebe95f0965f22fac52d3ccb287901e1faac89d Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:30:50 +0300 Subject: [PATCH 040/130] Fix lint issue --- .../google_maps_flutter_web/lib/src/convert.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index 1209d27c97b..add43e2a30a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -437,7 +437,7 @@ Future _advancedMarkerIconFromBitmapDescriptor( if (glyph.text != null) { // Set glyph text and text color final web.Element element = document.createElement('p'); - element.innerHTML = glyph.text!.toJS; + element.innerHTML = glyph.text!; if (glyph.textColor != null) { element.setAttribute( 'style', From ff474bd8d1fdc7626396f0955725b215248d4eeb Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:36:33 +0300 Subject: [PATCH 041/130] Add license blocks --- .../example/lib/advanced_marker_icons.dart | 4 ++++ .../example/lib/advanced_markers_clustering.dart | 4 ++++ .../example/lib/advanced_marker_icons.dart | 4 ++++ .../example/lib/advanced_markers_clustering.dart | 4 ++++ .../shared/maps_example_dart/lib/advanced_marker_icons.dart | 4 ++++ .../maps_example_dart/lib/advanced_markers_clustering.dart | 4 ++++ .../lib/src/types/advanced_marker.dart | 4 ++++ .../lib/src/types/glyph.dart | 4 ++++ .../test/types/advanced_marker_test.dart | 3 +++ 9 files changed, 35 insertions(+) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart index 2d504ca2e7c..0d57006942b 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart index 830fe279437..8ef99b62094 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart index 2d504ca2e7c..0d57006942b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart index a12a3589d0e..6c252477fad 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart index 4624736bba5..5059eb8cbbb 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart index d6ce1797f58..cc35dc426cb 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart index f4ce20f38ff..ef9cb32dc71 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'dart:ui' show Offset; import 'package:flutter/foundation.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart index a7ccc5bccf5..8792c1fb6dd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart' show Color; diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/advanced_marker_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/advanced_marker_test.dart index 4bb1c876a22..d984427175a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/advanced_marker_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/advanced_marker_test.dart @@ -1,3 +1,6 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. import 'package:flutter_test/flutter_test.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; From 588c6899a4daf4eceb4a9d5db7acb323d586c2bc Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 17 Oct 2024 11:09:09 +0300 Subject: [PATCH 042/130] Add advanced markers sample to readme_sample.dart --- .../google_maps_flutter/README.md | 4 ++- .../example/lib/readme_sample.dart | 26 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/README.md b/packages/google_maps_flutter/google_maps_flutter/README.md index f9a1965c26b..9d74bac956a 100644 --- a/packages/google_maps_flutter/google_maps_flutter/README.md +++ b/packages/google_maps_flutter/google_maps_flutter/README.md @@ -120,6 +120,8 @@ in an unbounded widget will cause the application to throw a Flutter exception. [Advanced Markers](https://developers.google.com/maps/documentation/javascript/advanced-markers/overview) are map markers that offer extra customization options. [Map Id](https://developers.google.com/maps/documentation/get-map-id) is required in order to use Advanced Markers: + + ```dart GoogleMap( // Set your Map Id @@ -127,7 +129,7 @@ GoogleMap( // Let map know that you're using Advanced Markers markerType: MarkerType.advancedMarker, - ... + initialCameraPosition: _kGooglePlex, ), ``` diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample.dart index 672a3718776..5c624b08ceb 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample.dart @@ -8,6 +8,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; void main() => runApp(const MyApp()); @@ -70,3 +71,28 @@ class MapSampleState extends State { } } // #enddocregion MapSample + +// #docregion AdvancedMarkersSample +class AdvancedMarkersSample extends StatelessWidget { + const AdvancedMarkersSample({super.key}); + + static const CameraPosition _kGooglePlex = CameraPosition( + target: LatLng(37.42796133580664, -122.085749655962), + zoom: 14.4746, + ); + + @override + Widget build(BuildContext context) { + return const Scaffold( + body: GoogleMap( + // Set your Map Id + mapId: 'my-map-id', + + // Let map know that you're using Advanced Markers + markerType: MarkerType.advancedMarker, + initialCameraPosition: _kGooglePlex, + ), + ); + } +} +// #enddocregion AdvancedMarkersSample \ No newline at end of file From 29e8447a20a9d2278e7323c6171a4d50ce8aa0ad Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 17 Oct 2024 12:29:19 +0300 Subject: [PATCH 043/130] Fix bitmap test timeout --- .../test/types/bitmap_test.dart | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart index 2d11748786f..ac284cec37b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart @@ -729,14 +729,7 @@ void main() { }); test('construct with glyph bitmap', () async { - const ImageConfiguration imageConfiguration = ImageConfiguration( - devicePixelRatio: 3, - size: Size(48, 56), - ); - final BitmapDescriptor bitmap = await BitmapDescriptor.asset( - imageConfiguration, - 'red_square.png', - ); + const BitmapDescriptor bitmap = AssetBitmap(name: 'red_square.png'); final PinConfig pinConfig = PinConfig( backgroundColor: Colors.black, borderColor: Colors.red, From f12f8b26b7806613bb9235288b0fcdcc5cdbbf31 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 17 Oct 2024 12:40:41 +0300 Subject: [PATCH 044/130] Fix incorrect enum value --- .../google_maps_flutter/example/lib/readme_sample.dart | 2 +- .../ios14/ios/RunnerTests/FGMClusterManagersControllerTests.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample.dart index 5c624b08ceb..b2ec5e93633 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample.dart @@ -95,4 +95,4 @@ class AdvancedMarkersSample extends StatelessWidget { ); } } -// #enddocregion AdvancedMarkersSample \ No newline at end of file +// #enddocregion AdvancedMarkersSample diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/FGMClusterManagersControllerTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/FGMClusterManagersControllerTests.m index c9068b3607f..44305bfcdcd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/FGMClusterManagersControllerTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/FGMClusterManagersControllerTests.m @@ -36,7 +36,7 @@ - (void)testClustering { callbackHandler:handler clusterManagersController:clusterManagersController registrar:registrar - markerType:FGMPlatformMarkerTypeLegacy]; + markerType:FGMPlatformMarkerTypeMarker]; // Add cluster managers. NSString *clusterManagerId = @"cm"; From fc28825dbf9a0979964c7500da5ad57955798f6e Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 18 Oct 2024 12:52:06 +0300 Subject: [PATCH 045/130] Move README sample to a separate file --- .../google_maps_flutter/README.md | 2 +- .../example/lib/readme_sample.dart | 26 ---------- .../lib/readme_sample_advanced_markers.dart | 48 +++++++++++++++++++ 3 files changed, 49 insertions(+), 27 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart diff --git a/packages/google_maps_flutter/google_maps_flutter/README.md b/packages/google_maps_flutter/google_maps_flutter/README.md index 9d74bac956a..cb934a15cb5 100644 --- a/packages/google_maps_flutter/google_maps_flutter/README.md +++ b/packages/google_maps_flutter/google_maps_flutter/README.md @@ -121,7 +121,7 @@ in an unbounded widget will cause the application to throw a Flutter exception. [Advanced Markers](https://developers.google.com/maps/documentation/javascript/advanced-markers/overview) are map markers that offer extra customization options. [Map Id](https://developers.google.com/maps/documentation/get-map-id) is required in order to use Advanced Markers: - + ```dart GoogleMap( // Set your Map Id diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample.dart index b2ec5e93633..672a3718776 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample.dart @@ -8,7 +8,6 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; void main() => runApp(const MyApp()); @@ -71,28 +70,3 @@ class MapSampleState extends State { } } // #enddocregion MapSample - -// #docregion AdvancedMarkersSample -class AdvancedMarkersSample extends StatelessWidget { - const AdvancedMarkersSample({super.key}); - - static const CameraPosition _kGooglePlex = CameraPosition( - target: LatLng(37.42796133580664, -122.085749655962), - zoom: 14.4746, - ); - - @override - Widget build(BuildContext context) { - return const Scaffold( - body: GoogleMap( - // Set your Map Id - mapId: 'my-map-id', - - // Let map know that you're using Advanced Markers - markerType: MarkerType.advancedMarker, - initialCameraPosition: _kGooglePlex, - ), - ); - } -} -// #enddocregion AdvancedMarkersSample diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart new file mode 100644 index 00000000000..1d9144257a1 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart @@ -0,0 +1,48 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// ignore_for_file: public_member_api_docs + +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +void main() => runApp(const MyApp()); + +class MyApp extends StatelessWidget { + const MyApp({super.key}); + + @override + Widget build(BuildContext context) { + return const MaterialApp( + title: 'Flutter Google Maps Demo', + home: AdvancedMarkersSample(), + ); + } +} + +// #docregion AdvancedMarkersSample +class AdvancedMarkersSample extends StatelessWidget { + const AdvancedMarkersSample({super.key}); + + static const CameraPosition _kGooglePlex = CameraPosition( + target: LatLng(37.42796133580664, -122.085749655962), + zoom: 14.4746, + ); + + @override + Widget build(BuildContext context) { + return const Scaffold( + body: GoogleMap( + // Set your Map Id + mapId: 'my-map-id', + + // Let map know that you're using Advanced Markers + markerType: MarkerType.advancedMarker, + initialCameraPosition: _kGooglePlex, + ), + ); + } +} +// #enddocregion AdvancedMarkersSample From ec63890c3fa9c2f6e6776426e8220b373a998468 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 18 Oct 2024 13:33:56 +0300 Subject: [PATCH 046/130] Update excerpts --- packages/google_maps_flutter/google_maps_flutter/README.md | 6 ++---- .../example/lib/readme_sample_advanced_markers.dart | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/README.md b/packages/google_maps_flutter/google_maps_flutter/README.md index cb934a15cb5..7aab92be89b 100644 --- a/packages/google_maps_flutter/google_maps_flutter/README.md +++ b/packages/google_maps_flutter/google_maps_flutter/README.md @@ -123,14 +123,12 @@ in an unbounded widget will cause the application to throw a Flutter exception. ```dart -GoogleMap( +body: GoogleMap( // Set your Map Id mapId: 'my-map-id', - + // Let map know that you're using Advanced Markers markerType: MarkerType.advancedMarker, - initialCameraPosition: _kGooglePlex, -), ``` ### Sample Usage diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart index 1d9144257a1..4e5aa6f973a 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart @@ -22,7 +22,6 @@ class MyApp extends StatelessWidget { } } -// #docregion AdvancedMarkersSample class AdvancedMarkersSample extends StatelessWidget { const AdvancedMarkersSample({super.key}); @@ -34,15 +33,16 @@ class AdvancedMarkersSample extends StatelessWidget { @override Widget build(BuildContext context) { return const Scaffold( +// #docregion AdvancedMarkersSample body: GoogleMap( // Set your Map Id mapId: 'my-map-id', // Let map know that you're using Advanced Markers markerType: MarkerType.advancedMarker, +// #enddocregion AdvancedMarkersSample initialCameraPosition: _kGooglePlex, ), ); } } -// #enddocregion AdvancedMarkersSample From 3201e5da5be59fea61019bcebb42c18532de530b Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 21 Oct 2024 09:23:03 +0300 Subject: [PATCH 047/130] Bump min web version --- .../google_maps_flutter/google_maps_flutter_web/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml index f4ffaf5cba4..5c83a967c84 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml @@ -26,7 +26,7 @@ dependencies: google_maps_flutter_platform_interface: ^2.10.0 sanitize_html: ^2.0.0 stream_transform: ^2.0.0 - web: ">=0.5.1 <2.0.0" + web: ">=1.0.0 <2.0.0" dev_dependencies: flutter_test: From 1fb61224265b63d7857b3a2f81583e5a8e20cd54 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 21 Oct 2024 09:32:44 +0300 Subject: [PATCH 048/130] Treat innerHTML as JSAny --- .../google_maps_flutter_web/lib/src/convert.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index add43e2a30a..1209d27c97b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -437,7 +437,7 @@ Future _advancedMarkerIconFromBitmapDescriptor( if (glyph.text != null) { // Set glyph text and text color final web.Element element = document.createElement('p'); - element.innerHTML = glyph.text!; + element.innerHTML = glyph.text!.toJS; if (glyph.textColor != null) { element.setAttribute( 'style', From 20189e54ea31643e38f3bce9dc35b569e0429ef3 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 12 Dec 2024 10:09:13 +0200 Subject: [PATCH 049/130] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit cbdb48a0bcee5865e6e5d29826d6f44cc1f0984d Author: engine-flutter-autoroll Date: Wed Dec 11 23:50:26 2024 -0500 Manual roll Flutter from 918b2b9ddb43 to f559e16010a0 (4 revisions) (#8277) Manual roll requested by tarrinneal@google.com https://github.com/flutter/flutter/compare/918b2b9ddb43...f559e16010a0 2024-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from e3524615fb69 to 92de3d0f8830 (1 revision) (flutter/flutter#160132) 2024-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from b8034f152711 to e3524615fb69 (2 revisions) (flutter/flutter#160128) 2024-12-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from ba7ad8719733 to b8034f152711 (3 revisions) (flutter/flutter#160126) 2024-12-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3cdd84160baa to ba7ad8719733 (1 revision) (flutter/flutter#160117) 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 Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 26373787d5c768a21befaec34300efb2df84cb52 Author: Tarrin Neal Date: Wed Dec 11 18:40:10 2024 -0800 disable maps test and manual roll (#8275) Disables failing test while we wait for framework to look into bug https://github.com/flutter/flutter/issues/160115 manual roll commit 8238e1c5ada8c6a99f7fb6087484b52face33721 Author: Sinyu Date: Thu Dec 12 02:57:58 2024 +0800 [quick_actions] add localizedSubtitle for iOS (#8038) Add the localizedSubtitle field on quick actions for iOS https://github.com/flutter/flutter/issues/129759 Pre-launch Checklist I read and followed the [relevant style guides](https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style) and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.) commit 374d1bef1033688165359ee7b76330139d9c3cb8 Author: Naomi Watanabe Date: Thu Dec 12 02:43:26 2024 +0900 [video_player_avfoundation] Support the audio-only HLS (.m3u8) on iOS (#7890) Supports the audio-only HLS on iOS. After through https://github.com/flutter/plugins/pull/4639 and https://github.com/flutter/plugins/pull/4727, we can play HLS videos and audios, but it does not support audio-only HLS. When attempting to play that on iOS, it never finishes initialization. Show the before/after demonstration here: https://github.com/flutter/flutter/issues/156589#issuecomment-2408846446 Fixes: https://github.com/flutter/flutter/issues/156589 Test with https://github.com/flutter/assets-for-api-docs/pull/252 commit 16616ad588d7ad9c00958ec61022e5b5dde5f5dd Author: engine-flutter-autoroll Date: Tue Dec 10 16:13:19 2024 -0500 Manual roll Flutter from ab5b20c16d56 to 456366232af9 (10 revisions) (#8264) Manual roll requested by tarrinneal@google.com https://github.com/flutter/flutter/compare/ab5b20c16d56...456366232af9 2024-12-05 ditman@gmail.com [ci] Add google_adsense to 9_first_party_packages.yml (flutter/flutter#159827) 2024-12-05 jonahwilliams@google.com [flutter_tools] configure shader compiler to output GLES3 shaders for Android. (flutter/flutter#159857) 2024-12-05 tessertaha@gmail.com Introduce Material 3 `year2023` flag to `ProgressIndicatorThemeData` (flutter/flutter#159720) 2024-12-05 tessertaha@gmail.com Updated Material 3 `Slider` Samples (flutter/flutter#159795) 2024-12-05 tessertaha@gmail.com Updated Material 3 Progress Indicators Samples (flutter/flutter#158925) 2024-12-05 andrewrkolos@gmail.com Remove some usages of package:usage (flutter/flutter#159705) 2024-12-05 anis.alibegic@gmail.com Fixed typos (flutter/flutter#159331) 2024-12-05 bruno.leroux@gmail.com Reland Fix Date picker overlay colors aren't applied on selected state (flutter/flutter#159839) 2024-12-05 mohellebiabdessalem@gmail.com fix failing lint in MainActivity.kt.tmpl (flutter/flutter#159441) 2024-12-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 05e2d6597cb2 to b4f52b275535 (1 revision) (flutter/flutter#159842) 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 Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit a02deb49c1f6bcb8bb895dd67fbf36ac2c9738bd Author: Sinyu Date: Tue Dec 10 23:59:05 2024 +0800 [quick_action_ios] add localizedSubtitle for iOS (#8149) This is prequel PR for: https://github.com/flutter/packages/pull/8038 Containing only changes to quick_action_ios package. Add the localizedSubtitle field on quick actions for iOS https://github.com/flutter/flutter/issues/129759 commit 0f1fd493b893c02ac37544cfd31f5c4f184202db Author: Camille Simon <43054281+camsim99@users.noreply.github.com> Date: Mon Dec 9 15:58:25 2024 -0500 [dependabot] Generalizes dependabot commit message prefix (#8255) Changes dependabot commit message prefix from "[gradle]" to "[dependabot]" since dependabot handles more than Gradle updates. Also updates dependabot configuration docs link since the one included didn't work for me. commit 2dc8b98a2c0da9e7f44eaed385cca98e62c3093e Author: David Iglesias Date: Mon Dec 9 11:03:04 2024 -0800 [google_adsense] Tighten exports and docs. (#8233) * **Breaking changes**: Reshuffles API exports: * Removes the `adUnit` method, and instead exports the `AdUnitWidget` directly. * Renames `experimental/google_adsense` to `experimental/ad_unit_widget.dart`. * Removes the `AdStatus` and `AdUnitParams` exports. * Removes the "stub" files, so this package is now web-only and must be used through a conditional import. * Tweaks several documentation pages to remove references to internal APIs. * Splits tests to reflect the new code structure. ## Issue * Continuation of: https://github.com/flutter/packages/pull/6871 * Part of: https://github.com/flutter/flutter/issues/40376 commit 9f6d5998784826a0741be8370c95a5ab458bba41 Author: stuartmorgan Date: Mon Dec 9 09:44:19 2024 -0800 [path_provider] Clean up Java code (#8240) Minor cleanup in the native implementation code: - Removes a utility to map from index integers to directories, which hasn't been used since the Pigeon conversion but was accidentally left. - Inlines all the implementations of path getters; many methods were pointlessly delegating their implementation to another private method, which is a relic of the pre-Pigeon structure. All of the method implementations were moved without any changes. commit ebe5367e4d31150718db4de23c0448efaa501ef9 Author: stuartmorgan Date: Mon Dec 9 09:44:17 2024 -0800 [google_sign_in] Clean up Java code (#8241) Removes the legacy public native interface to the sign-in plugin, which was inherently linked to raw method channels (which we no longer use) and the structure of the Google Sign-In native SDK (which is deprecated), so we don't want to continue supporting. I (unsurprisingly, as native->native plugin dependencies are very rare) can't find any evidence that any public plugin has ever directly used this Java code. The original use case this was added for was internal, and no longer exists (see b/158361263). The test file being deleted is specific to the legacy interface. There is already an almost-exact duplicate of that test file that tests the Pigeon interface. commit 45bcc3210fcc24011bc7f88de1ca61528d9e5cbc Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Thu Dec 5 13:54:59 2024 -0800 [various] Add Swift Package Manager integration to Google sign in example apps (#8230) This migrates the following plugins' example apps to have Swift Package Manager integration: 1. google_sign_in 2. google_sign_in_ios This also checks-in CocoaPods integration stuff that was missing. This raises the example apps' Flutter SDK requirement to 3.24.0 or higher. I will get a text exemption for this change. The example apps were migrated using the following commands: ``` dart run script/tool/bin/flutter_plugin_tools.dart build-examples --ios --swift-package-manager dart run script/tool/bin/flutter_plugin_tools.dart build-examples --macos --swift-package-manager ``` Completes: https://github.com/flutter/flutter/issues/159173 commit 824d91ab4858d16f24e010cd8691670d83ceb0f3 Author: engine-flutter-autoroll Date: Thu Dec 5 10:55:06 2024 -0500 Roll Flutter from e1e4ee9a016e to ab5b20c16d56 (7 revisions) (#8236) https://github.com/flutter/flutter/compare/e1e4ee9a016e...ab5b20c16d56 2024-12-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 8d3c71840069 to 05e2d6597cb2 (4 revisions) (flutter/flutter#159836) 2024-12-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9e8fcad4eaf6 to 8d3c71840069 (3 revisions) (flutter/flutter#159818) 2024-12-04 bkonyi@google.com Add `flutter widget-preview {start, clean}` commands (flutter/flutter#159510) 2024-12-04 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1f7f37e264b0 to 9e8fcad4eaf6 (2 revisions) (flutter/flutter#159808) 2024-12-04 engine-flutter-autoroll@skia.org Roll Flutter Engine from 29d66405e6df to 1f7f37e264b0 (2 revisions) (flutter/flutter#159805) 2024-12-04 11473691+YeungKC@users.noreply.github.com Fix: Update PopupMenu position when layout changes (flutter/flutter#157983) 2024-12-04 43054281+camsim99@users.noreply.github.com [Android] Removes dev dependency plugins from release builds (flutter/flutter#158026) 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 Please CC stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 8522c9e82f4ef0d1317d69dbc2eeadfefefce263 Author: stuartmorgan Date: Thu Dec 5 07:29:22 2024 -0500 [various] Update iOS/macOS Pigeon versions (#8226) Updates iOS and macOS plugin implementations that were still using Pigeon 10/11 to the latest version (22). This picks up some minor improvements to serialization, as well as newer dependencies that can avoid resolver issues in flutter/flutter tests (see linked issue). Most of this PR is auto-generated via the repo tool's `update-dependency` command; only minor manual updates were required (mostly to test code). Fixes https://github.com/flutter/flutter/issues/159803 commit 953c683ca2bc4d6a497ccc78d6b3e66e9fa2e287 Author: David Iglesias Date: Thu Dec 5 04:25:09 2024 -0800 [ci] Adds google_adsense to labeler.yml (#8231) Updates some CI config for `package:google_adsense`: * Configures `labeler.yaml` to add `p: google_adsense` to PRs with changes to `packages/google_adsense` * Adds me to CODEOWNERS of the package. commit 71a2e703a9de3afc450b4ffcf54064ba21cc0f4d Author: Tarrin Neal Date: Wed Dec 4 19:32:11 2024 -0800 [pigeon] adds event channel support for kotlin and swift (#7892) adds event channel support for kotlin and swift work towards https://github.com/flutter/flutter/issues/66711 adds sealed classes with extensions (empty base classes only) fixes https://github.com/flutter/flutter/issues/155859 (Fix a small inconsistency with Pigeon docs) adds some convenience methods to Root fixes generation/format tests to include test pigeons Makes swift codec class names upper camel case commit ea902186e4db7b1c91372d0b87914a74a5e68e3d Author: Vitaly Sokolov <50541317+sokoloff06@users.noreply.github.com> Date: Thu Dec 5 01:08:10 2024 +0200 [google_adsense] (Experimental) AdSense plugin for Flutter Web (#6871) Google Adsense plugin should allow Flutter Web developers to integrate Adsense more easily and monetize web project. *List which issues are fixed by this PR. You must list at least one issue.* https://github.com/flutter/flutter/issues/40376 commit 71c9e77b68367fc6d493a2d0c3a827539a31bb1f Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Wed Dec 4 14:25:08 2024 -0800 [various] Add Swift Package Manager integration to image picker examp… (#8227) This migrates the following plugins' example apps to have Swift Package Manager integration: 1. image_picker 2. image_picker_ios 3. image_picker_macos This also checks-in CocoaPods integration stuff that was missing. This raises the example apps' Flutter SDK requirement to 3.24.0 or higher. I will get a text exemption for this change. The example apps were migrated using the following commands: ``` dart run script/tool/bin/flutter_plugin_tools.dart build-examples --ios --swift-package-manager dart run script/tool/bin/flutter_plugin_tools.dart build-examples --macos --swift-package-manager ``` Part of: https://github.com/flutter/flutter/issues/159173 commit 012fae8f1dd6930d776aa602df9de8343dc25e76 Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Wed Dec 4 14:23:11 2024 -0800 [pigeon] Add Swift Package Manager integration to example app (#8225) This migrates Pigeon's example app to have Swift Package Manager integration. This raises the example apps' Flutter SDK requirement to 3.24.0 or higher. This also checks-in CocoaPods integration stuff that was missing. I will get a text exemption for this change. The example apps were migrated using the following commands: ``` dart run script/tool/bin/flutter_plugin_tools.dart build-examples --ios --swift-package-manager dart run script/tool/bin/flutter_plugin_tools.dart build-examples --macos --swift-package-manager ``` Part of: https://github.com/flutter/flutter/issues/159173 commit d34f32dfaa6ac2e0af22208e1d1116d38ba47235 Author: Paweł Jakubowski Date: Wed Dec 4 22:07:24 2024 +0100 [video_player_avfoundation] Split iOS native code into multiple files (#8171) This PR splits iOS native code into multiple files. Specifically, it extracts `FVPVideoPlayer` and `FVPFrameUpdater` from `FVPVideoPlayerPlugin.m` file, and puts them into separate files (.h and .m). This should make it easier to maintain the code and add new features in the future (e.g. support for platform views which is mentioned in [86613](https://github.com/flutter/flutter/issues/86613). In order for the code to compile, I had to add some methods to the interface of `FVPVideoPlayer`. I also added doc comments for them. No tests were added as this PR does not introduce any new functionality. Related issues: - [86613](https://github.com/flutter/flutter/issues/86613) This PR does not fix the issue, it only refactors some parts of the code, so that it is easier in the future to add support for platform views (the git diff will be cleaner when we modify the code to support it - only related changes would show up then). If you'd like me to create a new issue, specifically for splitting the native code into files, let me know. commit 264d920a4ce617436eeee46a8f5fa35d971f39c1 Author: engine-flutter-autoroll Date: Wed Dec 4 14:17:07 2024 -0500 Roll Flutter from e64ee5de7cdd to e1e4ee9a016e (18 revisions) (#8224) https://github.com/flutter/flutter/compare/e64ee5de7cdd...e1e4ee9a016e 2024-12-04 ybz975218925@gmail.com Fix `DropdownMenu` focus (flutter/flutter#156412) 2024-12-04 bkonyi@google.com Add deprecation notice for Android x86 when building for the target (flutter/flutter#159750) 2024-12-04 fluttergithubbot@gmail.com Marks Mac_benchmark flutter_view_macos__start_up to be flaky (flutter/flutter#159541) 2024-12-04 bruno.leroux@gmail.com Reland Fix InkWell overlayColor resolution ignores selected state (flutter/flutter#159784) 2024-12-04 engine-flutter-autoroll@skia.org Roll Flutter Engine from ee1b6ed65677 to 29d66405e6df (2 revisions) (flutter/flutter#159783) 2024-12-04 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1e6864c489c8 to ee1b6ed65677 (1 revision) (flutter/flutter#159778) 2024-12-04 38378650+hgraceb@users.noreply.github.com Format controller.dart of flutter_test (flutter/flutter#159667) 2024-12-04 32538273+ValentinVignal@users.noreply.github.com Add `mouseCursor` parameter to `Chip`s (flutter/flutter#159422) 2024-12-04 engine-flutter-autoroll@skia.org Roll Flutter Engine from 938f8163b526 to 1e6864c489c8 (6 revisions) (flutter/flutter#159776) 2024-12-03 katelovett@google.com Increase timeout of Devtools tests (flutter/flutter#159759) 2024-12-03 tessertaha@gmail.com Add `IconAlignment` to `ButtonStyle` and `styleFrom` methods (flutter/flutter#158503) 2024-12-03 21270878+elliette@users.noreply.github.com [Widget Inspector] Only include `truncated` field in JSON response if `true` (flutter/flutter#159701) 2024-12-03 mohellebiabdessalem@gmail.com fix fialing lint `Consider using 'register' to avoid unnecessary configuration` (flutter/flutter#159137) 2024-12-03 8218910+TheJoeSchr@users.noreply.github.com Fix typo in flutter_command.dart (flutter/flutter#159398) 2024-12-03 codefu@google.com Mark Mac_ios microbenchmarks_ios as flakey (flutter/flutter#158540) 2024-12-03 engine-flutter-autoroll@skia.org Roll Flutter Engine from c7f553eb6a30 to 938f8163b526 (1 revision) (flutter/flutter#159742) 2024-12-03 mohellebiabdessalem@gmail.com remove unnecessary semicolon in module_plugin_loader.radle (flutter/flutter#159303) 2024-12-03 737941+loic-sharma@users.noreply.github.com [SwiftPM] Rename `SWIFT_PACKAGE_MANAGER` environment variable to `FLUTTER_SWIFT_PACKAGE_MANAGER` (flutter/flutter#159502) 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 Please CC stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit bd8dafac67c2dd30abc648cbec375937099209c0 Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Wed Dec 4 10:37:15 2024 -0800 [various] Add Swift Package Manager integration to example apps (#8219) This migrates various example apps to have Swift Package Manager integration. This raises the example apps' Flutter SDK requirement to 3.24.0 or higher. I will get a text exemption for this change. The example apps were migrated using the following commands: ``` dart run script/tool/bin/flutter_plugin_tools.dart build-examples --ios --swift-package-manager dart run script/tool/bin/flutter_plugin_tools.dart build-examples --macos --swift-package-manager ``` ⚠️ The following plugins' example apps are **not* included in this change as their migration included non-SPM changes that require closer review: 1. google_sign_in 1. google_sign_in_ios 1. image_picker 1. image_picker_ios 1. image_picker_macos 1. pigeon Part of: https://github.com/flutter/flutter/issues/159173 commit 67291a378c270ba61641406c1991c0f432600307 Author: stuartmorgan Date: Wed Dec 4 10:38:57 2024 -0500 [google_maps_flutter] Annotate deprecated member usage (#8214) There are several intentional uses of deprecated members from other packages within the plugin group, so annotate them so that they don't show up in the regular team audits: - App-facing package integration tests of the deprecated style method. - Handling of deprecated marker bitmap formats. These turned up in the [routine repo audit](https://github.com/flutter/flutter/blob/main/docs/infra/Packages-Gardener-Rotation.md#deprecations). commit 74963062fb0bb244dbc4cfd1036432a132d20fb2 Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Tue Dec 3 21:28:51 2024 -0700 [pigeon] Fixes channel names of the named constructors of ProxyApis. (#8201) commit 28160caa64eaaebd300dd494720a5b1e1afd0d9c Author: stuartmorgan Date: Tue Dec 3 17:01:21 2024 -0500 [local_auth] Add compatibility with intl 0.20 (#8217) Nothing in `intl` 0.20 breaks `local_auth` usage, so expand the compatibility window to include 0.20.x for better ecosystem compatibility. Fixes https://github.com/flutter/flutter/issues/159591 commit d44156691131583f6cddf47d23655a3471ff2634 Author: stuartmorgan Date: Tue Dec 3 13:52:21 2024 -0500 [various] Replaces deprecated `whereNotNull()` (#8215) Replaces the `whereNotNull()` method from `pkg:collection` with the Dart core `nonNulls`. `nonNulls` has been available in Dart since 3.0, so no dependency or SDK requirement changes are necessary. Fixes https://github.com/flutter/flutter/issues/159738 commit bf4194590e460405a948aa39cd714e03c88ae718 Author: engine-flutter-autoroll Date: Tue Dec 3 12:00:18 2024 -0500 Roll Flutter from 08e26a3ffcd7 to e64ee5de7cdd (20 revisions) (#8213) https://github.com/flutter/flutter/compare/08e26a3ffcd7...e64ee5de7cdd 2024-12-03 engine-flutter-autoroll@skia.org Roll Flutter Engine from f9d4f744e088 to c7f553eb6a30 (1 revision) (flutter/flutter#159722) 2024-12-03 kustermann@google.com Make native asset tests more robust against flutter upgrading its pinned dependencies (flutter/flutter#159715) 2024-12-03 engine-flutter-autoroll@skia.org Roll Flutter Engine from 089071a726d5 to f9d4f744e088 (1 revision) (flutter/flutter#159713) 2024-12-03 bruno.leroux@gmail.com Fix DropdownMenu menu is detached from the text field (flutter/flutter#159665) 2024-12-03 engine-flutter-autoroll@skia.org Roll Flutter Engine from 349ad277b574 to 089071a726d5 (1 revision) (flutter/flutter#159708) 2024-12-03 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5001e2a490db to 349ad277b574 (4 revisions) (flutter/flutter#159706) 2024-12-03 engine-flutter-autoroll@skia.org Roll Flutter Engine from 05fdaa6edc12 to 5001e2a490db (6 revisions) (flutter/flutter#159702) 2024-12-02 fluttergithubbot@gmail.com Marks Linux build_tests_4_5 to be unflaky (flutter/flutter#154994) 2024-12-02 37028599+EArminjon@users.noreply.github.com doc/improve-hint-text-doc (flutter/flutter#156313) 2024-12-02 31859944+LongCatIsLooong@users.noreply.github.com Ignore exhaustiveness check for some semantics tests, for now (flutter/flutter#159517) 2024-12-02 engine-flutter-autoroll@skia.org Roll Flutter Engine from e0900f83a0c8 to 05fdaa6edc12 (9 revisions) (flutter/flutter#159694) 2024-12-02 linxunfeng@yeah.net Fix output path for --appSizeBase (flutter/flutter#158302) 2024-12-02 bkonyi@google.com [ Tool ] Fix "Error: Unable to find git in your PATH" when Command Processor `AutoRun` registry key is defined (flutter/flutter#159424) 2024-12-02 ditman@gmail.com [tool] Removes deprecated --web-renderer parameter. (flutter/flutter#159314) 2024-12-02 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1f6312df6d75 to e0900f83a0c8 (3 revisions) (flutter/flutter#159684) 2024-12-02 jmccandless@google.com iPad Scribble flicker and crash (flutter/flutter#159508) 2024-12-02 engine-flutter-autoroll@skia.org Roll Flutter Engine from d7be573a5ee5 to 1f6312df6d75 (1 revision) (flutter/flutter#159676) 2024-11-29 120297255+PurplePolyhedron@users.noreply.github.com improve `ContainerRenderObjectMixin` error message when `parentData` is not set up properly (flutter/flutter#157846) 2024-11-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from d7c0bcfe7a30 to d7be573a5ee5 (1 revision) (flutter/flutter#159595) 2024-11-28 engine-flutter-autoroll@skia.org Roll Packages from e6932b77a183 to bc0c22d57910 (2 revisions) (flutter/flutter#159592) 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 Please CC stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 15501ece235684a3bdddad089345fc3e33dc1df3 Author: stuartmorgan Date: Mon Dec 2 14:32:19 2024 -0500 [shared_preferences] Limit Android decoding (#8187) When decoding stored preferences for `List` support, only allow lists and strings to avoid potentially instantiating other object types. commit a4ac811b752571de0764b07c83031807ed9bd647 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Dec 2 17:14:48 2024 +0000 [camera_android]: Bump androidx.annotation:annotation from 1.9.0 to 1.9.1 in /packages/camera/camera_android/android (#8164) Bumps androidx.annotation:annotation from 1.9.0 to 1.9.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.9.0&new-version=1.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 6c7a61d1fc30e28edd7851ce6c558fafa0f82603 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Dec 2 09:59:24 2024 +0000 [gradle]: Bump org.jetbrains.kotlin:kotlin-gradle-plugin from 2.0.21 to 2.1.0 in /packages/pigeon/platform_tests/test_plugin/android (#8205) Bumps [org.jetbrains.kotlin:kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 2.0.21 to 2.1.0.
Release notes

Sourced from org.jetbrains.kotlin:kotlin-gradle-plugin's releases.

Kotlin 2.1.0

Changelog

Analysis API

New Features

  • KT-68603 KotlinDirectInheritorsProvider: add an option to ignore non-kotlin results

Performance Improvements

  • KT-70757 Performance problem in KaFirVisibilityChecker for KaFirPsiJavaClassSymbol

Fixes

  • KT-70437 Class reference is not resolvable
  • KT-57733 Analysis API: Use optimized ModuleWithDependenciesScopes in combined symbol providers
  • KT-72389 K2: False positive "Redundant 'protected' modifier" for protected property inside protected constructor from private or internal class
  • KT-69190 K2: False-positive "redundant private modifier"
  • KT-64984 Analysis API: Support Wasm target
  • KT-70375 K2: NPE at org.jetbrains.kotlin.analysis.api.fir.symbols.KaFirNamedClassSymbolBase.createPointer
  • KT-71259 K2 evaluator: Invalid smart cast info collecting for Code Fragments
  • KT-69360 Lack of implicit receiver for the last statement under lambda in scripts
  • KT-70890 Analysis API: Experiment with weak references to LL FIR/analysis sessions in session caches
  • KT-70657 Analysis API: Inner types from classes with generics are incorrectly represented by the compiled jars
  • KT-71055 Suspend calls inside 'analyze()' break the block guarantees
  • KT-70815 Analysis API: Implement stop-the-world session invalidation
  • KT-69819 K2 IDE: LHS type in callable references is unresolved when it has type arguments and is qualified
  • KT-68761 Analysis API: Experiment with limited-size cache in KaFirSessionProvider
  • KT-70384 Analysis API Standalone: The same class in the same two renamed jars is unresolved
  • KT-71067 Exceptions from references cancel Find Usages
  • KT-69535 Redesign 'containingSymbol'
  • KT-71025 K2 IDE: Scopes in "importingScopeContext" have reversed ordering and "indexInTower" values
  • KT-67483 K2 IDE: Serializable plugin causes infinite resolve recursion when there is a star import from a class with annotation call
  • KT-69416 K2 IDE / Completion: “No classifier found” on simple value creating
  • KT-70257 CCE: class kotlin.UInt cannot be cast to class java.lang.Number
  • KT-70376 K2 IDE / Kotlin Debugger: IAE “Only componentN functions should be cached this way, but got: toString” on evaluating toString() method for value class
  • KT-70264 AA: service registration via XML fails with AbstractMethodError in Lint CLI
  • KT-69950 Analysis API: Introduce isSubtypeOf(ClassId)
  • KT-68625 K2: “lazyResolveToPhase(STATUS) cannot be called from a transformer with a phase STATUS.”
  • KT-67665 K2: contract violation for value class with a constructor parameter with an implicit type
  • KT-67009 Analysis API: Add abbreviated type tests for type aliases from source modules
  • KT-69977 KaFirFunctionalType#getAbbreviation is always null
  • KT-68341 Analysis API: Expanded function types from libraries don't have an abbreviated type
  • KT-68857 Analysis API: Refactor annotations
  • KT-70386 Do not filter out overloads from different libraries in dangling files
  • KT-65552 K2: CANNOT_CHECK_FOR_ERASED in KtTypeCodeFragment
  • KT-65803 K2: Analysis API: KtFirTypeProvider#getSubstitutedSuperTypes throws an exception in the case of "Wrong number of type arguments"
  • KT-68896 Support VirtualFile binary dependency inputs to Analysis API modules
  • KT-69395 K2 IDE: incorrect overload selection from binary dependencies in a shared native source set

... (truncated)

Changelog

Sourced from org.jetbrains.kotlin:kotlin-gradle-plugin's changelog.

2.1.0

Analysis API

New Features

  • KT-68603 KotlinDirectInheritorsProvider: add an option to ignore non-kotlin results

Performance Improvements

  • KT-70757 Performance problem in KaFirVisibilityChecker for KaFirPsiJavaClassSymbol

Fixes

  • KT-70437 Class reference is not resolvable
  • KT-57733 Analysis API: Use optimized ModuleWithDependenciesScopes in combined symbol providers
  • KT-72389 K2: False positive "Redundant 'protected' modifier" for protected property inside protected constructor from private or internal class
  • KT-69190 K2: False-positive "redundant private modifier"
  • KT-64984 Analysis API: Support Wasm target
  • KT-70375 K2: NPE at org.jetbrains.kotlin.analysis.api.fir.symbols.KaFirNamedClassSymbolBase.createPointer
  • KT-71259 K2 evaluator: Invalid smart cast info collecting for Code Fragments
  • KT-69360 Lack of implicit receiver for the last statement under lambda in scripts
  • KT-70890 Analysis API: Experiment with weak references to LL FIR/analysis sessions in session caches
  • KT-70657 Analysis API: Inner types from classes with generics are incorrectly represented by the compiled jars
  • KT-71055 Suspend calls inside 'analyze()' break the block guarantees
  • KT-70815 Analysis API: Implement stop-the-world session invalidation
  • KT-69819 K2 IDE: LHS type in callable references is unresolved when it has type arguments and is qualified
  • KT-68761 Analysis API: Experiment with limited-size cache in KaFirSessionProvider
  • KT-70384 Analysis API Standalone: The same class in the same two renamed jars is unresolved
  • KT-71067 Exceptions from references cancel Find Usages
  • KT-69535 Redesign 'containingSymbol'
  • KT-71025 K2 IDE: Scopes in "importingScopeContext" have reversed ordering and "indexInTower" values
  • KT-67483 K2 IDE: Serializable plugin causes infinite resolve recursion when there is a star import from a class with annotation call
  • KT-69416 K2 IDE / Completion: “No classifier found” on simple value creating
  • KT-70257 CCE: class kotlin.UInt cannot be cast to class java.lang.Number
  • KT-70376 K2 IDE / Kotlin Debugger: IAE “Only componentN functions should be cached this way, but got: toString” on evaluating toString() method for value class
  • KT-70264 AA: service registration via XML fails with AbstractMethodError in Lint CLI
  • KT-69950 Analysis API: Introduce isSubtypeOf(ClassId)
  • KT-68625 K2: “lazyResolveToPhase(STATUS) cannot be called from a transformer with a phase STATUS.”
  • KT-67665 K2: contract violation for value class with a constructor parameter with an implicit type
  • KT-67009 Analysis API: Add abbreviated type tests for type aliases from source modules
  • KT-69977 KaFirFunctionalType#getAbbreviation is always null
  • KT-68341 Analysis API: Expanded function types from libraries don't have an abbreviated type
  • KT-68857 Analysis API: Refactor annotations
  • KT-70386 Do not filter out overloads from different libraries in dangling files
  • KT-65552 K2: CANNOT_CHECK_FOR_ERASED in KtTypeCodeFragment
  • KT-65803 K2: Analysis API: KtFirTypeProvider#getSubstitutedSuperTypes throws an exception in the case of "Wrong number of type arguments"
  • KT-68896 Support VirtualFile binary dependency inputs to Analysis API modules
  • KT-69395 K2 IDE: incorrect overload selection from binary dependencies in a shared native source set
  • KT-68573 ISE: "Unexpected constant value (kotlin/annotation/AnnotationTarget, CLASS)" at Kt1DescUtilsKt.toKtConstantValue()

... (truncated)

Commits
  • 5dd9cea Add ChangeLog for 2.1.0
  • be31f19 [Gradle] Fix documentation publishing to Kotlinlang
  • f959bf2 Add ChangeLog for 2.1.0-RC2
  • b21df7b [Gradle] Update info about versioning
  • a7dabb6 [Gradle] Fix templates extraction
  • 858b914 [Gradle] Add KDoc for KotlinTargetsDsl
  • 1026b47 [Gradle] Add KDoc for KotlinTargetWithTests
  • 54452c0 [Gradle] Add KDoc for KotlinTestRun
  • d10e47a [Gradle] Add KDoc for KotlinExecution
  • 1208eec fix: clarifications and language polishing
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.jetbrains.kotlin:kotlin-gradle-plugin&package-manager=gradle&previous-version=2.0.21&new-version=2.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 3458b423386e9cb0a0f421b98996bd5b91c7820f Author: engine-flutter-autoroll Date: Thu Nov 28 10:52:29 2024 -0500 Roll Flutter from fae695ed6198 to 08e26a3ffcd7 (19 revisions) (#8197) https://github.com/flutter/flutter/compare/fae695ed6198...08e26a3ffcd7 2024-11-28 bruno.leroux@gmail.com Revert "Fix InkWell overlayColor resolution ignores selected state (#159072) (flutter/flutter#159589) 2024-11-28 bruno.leroux@gmail.com Revert "Fix Date picker overlay colors aren't applied on selected sta… (flutter/flutter#159583) 2024-11-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from dd0ef5ba7d9a to d7c0bcfe7a30 (1 revision) (flutter/flutter#159579) 2024-11-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from ba112add5d98 to dd0ef5ba7d9a (2 revisions) (flutter/flutter#159574) 2024-11-28 1961493+harryterkelsen@users.noreply.github.com [web] On the web platform, use an tag to show an image if it can't be accessed with CORS (flutter/flutter#157755) 2024-11-28 60013060+azizChebbi@users.noreply.github.com Fix: Announce only the first error message for better accessibility (flutter/flutter#156399) 2024-11-27 engine-flutter-autoroll@skia.org Roll Flutter Engine from ed4e13cefb45 to ba112add5d98 (1 revision) (flutter/flutter#159563) 2024-11-27 engine-flutter-autoroll@skia.org Roll Packages from 8ecf4b010143 to e6932b77a183 (3 revisions) (flutter/flutter#159561) 2024-11-27 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4121287c360a to ed4e13cefb45 (1 revision) (flutter/flutter#159559) 2024-11-27 fluttergithubbot@gmail.com Marks Mac_benchmark hello_world_macos__compile to be flaky (flutter/flutter#159543) 2024-11-27 dacoharkes@google.com [native assets] Create `NativeAssetsManifest.json` instead of kernel embedding (flutter/flutter#159322) 2024-11-27 engine-flutter-autoroll@skia.org Roll Flutter Engine from b9474a99694c to 4121287c360a (1 revision) (flutter/flutter#159530) 2024-11-27 engine-flutter-autoroll@skia.org Roll Flutter Engine from da71729651d8 to b9474a99694c (2 revisions) (flutter/flutter#159527) 2024-11-27 engine-flutter-autoroll@skia.org Roll Flutter Engine from bd165dc27166 to da71729651d8 (7 revisions) (flutter/flutter#159523) 2024-11-27 59215665+davidhicks980@users.noreply.github.com Reland CupertinoPopupSurface (flutter/flutter#159272) 2024-11-26 58190796+MitchellGoodwin@users.noreply.github.com Suppress previous route transition if current route is fullscreenDialog (flutter/flutter#159312) 2024-11-26 engine-flutter-autoroll@skia.org Roll Flutter Engine from fe45a6608651 to bd165dc27166 (23 revisions) (flutter/flutter#159504) 2024-11-26 21270878+elliette@users.noreply.github.com [Widget Inspector] Fix stack overflow error for Flutter web when requesting a large widget tree (flutter/flutter#159454) 2024-11-26 matanlurey@users.noreply.github.com Report usage of `deferred-components` to analytics. (flutter/flutter#159307) 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 Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit bc0c22d57910047fff7569ccb4413cf031304c7d Author: Gray Mackall <34871572+gmackall@users.noreply.github.com> Date: Wed Nov 27 14:12:22 2024 -0800 [image_picker_android] Refactor interactions with ContentProvider provided filenames (#8188) https://developer.android.com/privacy-and-security/risks/untrustworthy-contentprovider-provided-filename#don%27t-trust-user-input Adapted from this option https://developer.android.com/privacy-and-security/risks/untrustworthy-contentprovider-provided-filename#sanitize-provided-filenames Based on the PR for `file_selector_android` https://github.com/flutter/packages/pull/8184. commit f7667a655bc603fa996c9b4a4c8f7f525d52eef7 Author: Gray Mackall <34871572+gmackall@users.noreply.github.com> Date: Wed Nov 27 13:29:15 2024 -0800 [file_selector_android] Refactor interactions with `ContentProvider` provided filenames (#8184) https://developer.android.com/privacy-and-security/risks/untrustworthy-contentprovider-provided-filename#don%27t-trust-user-input Adapted from this option https://developer.android.com/privacy-and-security/risks/untrustworthy-contentprovider-provided-filename#sanitize-provided-filenames commit e6932b77a183661e19136993094c3cc268900562 Author: stuartmorgan Date: Tue Nov 26 16:28:07 2024 -0500 [flutter_svg] Adopt code excerpts (#8181) Converts the README from unmanaged code examples to code excerpted from analyzed and compiled code. Part of https://github.com/flutter/flutter/issues/102679 commit 20331195daf4673832420726c7085d800a1641aa Author: Navaron Bracke Date: Tue Nov 26 22:02:06 2024 +0100 [flutter_markdown] fix invalid URI's causing unhandled image errors (#8058) This PR adds an error builder for images, so that any errors from those are caught. *List which issues are fixed by this PR. You must list at least one issue.* Fixes https://github.com/flutter/flutter/issues/158428 commit e9a6e246ffb4c433f8587e27b4d9050ca56c4676 Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Tue Nov 26 13:42:31 2024 -0700 [ci][webview_flutter_android] Manual Roll and skip tests (#8186) Manual Roll and skip failing `webview_flutter_android` test. See https://github.com/flutter/flutter/issues/159500 commit 8ecf4b010143d331461aa466f371a4f6f7f58d83 Author: stuartmorgan Date: Mon Nov 25 19:31:07 2024 -0500 [file_selector] Update Pigeon version for Linux (#8172) Updates to the latest version of Pigeon, picking up the change to make the declarations of some classes public rather than in the implementation file. Fixes https://github.com/flutter/flutter/issues/158900 commit e2e55cf72e6827da6b72c402e158adb02a5152e2 Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Mon Nov 25 11:49:14 2024 -0800 [various] Migrate example apps' AppDelegate.swift (#8155) Migrated by running: ``` dart run script/tool/bin/flutter_plugin_tools.dart build-examples --ios --swift-package-manager dart run script/tool/bin/flutter_plugin_tools.dart build-examples --macos --swift-package-manager ``` Tests aren't updated as this change should not affect semantics. I will get a test exemption. Part of https://github.com/flutter/flutter/issues/159173 commit d91f1389716bc7185f5535817185822d3ffd5d30 Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Mon Nov 25 11:11:39 2024 -0800 [various] Update example apps' .gitignore (#8156) Migrated by running: ``` dart run script/tool/bin/flutter_plugin_tools.dart build-examples --ios --swift-package-manager dart run script/tool/bin/flutter_plugin_tools.dart build-examples --macos --swift-package-manager ``` No test changes as this is a configuration change. I will get a test exemption. Part of https://github.com/flutter/flutter/issues/159173 commit e78838ec1c299e5f8f2f61301685d2e7efa5dc52 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Nov 25 18:20:04 2024 +0000 [gradle]: Bump androidx.annotation:annotation from 1.9.0 to 1.9.1 in /packages/path_provider/path_provider_android/android (#8170) Bumps androidx.annotation:annotation from 1.9.0 to 1.9.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.9.0&new-version=1.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit bc18995a266edbe0f3d1c2dad7111091e488130e Author: Fransdhinta D. Prianggoro <37843020+fransdhinta@users.noreply.github.com> Date: Mon Nov 25 22:39:07 2024 +0700 [vector_graphics_compiler] fix: handle parsing stroke-width with an invalid value (#8004) There is some issue while calling parseDouble from the original repo of this package [issue link](https://github.com/dnfield/vector_graphics/issues/209#issue-1784058965). I suggest a fix to change the return of **parseDouble** to always double.tryParse so that it will return `null` instead of throwing an error if it parses an invalid String Fixes https://github.com/flutter/flutter/issues/158819 Issue: [link](https://github.com/dnfield/vector_graphics/issues/209#issue-1784058965) commit 46aeb2b29d60d3b0492b716baaeed4c803890078 Author: Reid Baker Date: Fri Nov 22 18:53:19 2024 -0500 Update avd_cipd_version (#8135) Aligns with framework https://github.com/flutter/flutter/pull/158017/ and Engine https://github.com/flutter/engine/pull/56313 Related to b/371020223 commit 0be7cbe2517471e57a9d989daf27d725dfb46048 Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Fri Nov 22 14:10:01 2024 -0700 [interactive_media_ads] Adds internal wrapper for Android native `CompanionAdSlot` and `CompanionAdSlot.ClickListener` (#8131) commit 35f9c6e894a24a452d88472fc6fd9ff88d61cfec Author: engine-flutter-autoroll Date: Fri Nov 22 13:30:00 2024 -0500 Roll Flutter from 93d772c5cdd8 to 793569f621f7 (5 revisions) (#8152) https://github.com/flutter/flutter/compare/93d772c5cdd8...793569f621f7 2024-11-22 hello@lamnhan.dev Add `columnWidth` Property to `DataTable` for Customizable Column Widths (flutter/flutter#159279) 2024-11-22 engine-flutter-autoroll@skia.org Roll Flutter Engine from d1a08064e193 to 6f941c961b05 (5 revisions) (flutter/flutter#159308) 2024-11-22 zanderso@users.noreply.github.com Move Linux packages_autoroller to bringup (flutter/flutter#159336) 2024-11-21 166132265+dtscalac@users.noreply.github.com Fix `--web-header` flag for `flutter drive` (flutter/flutter#159039) 2024-11-21 jason-simmons@users.noreply.github.com Do a clean shutdown of the flutter_tools processes started by observatory_port_test (flutter/flutter#159169) 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 Please CC louisehsu@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 920321356e4507f1471bb00413d84b846a3c2697 Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Fri Nov 22 08:42:53 2024 -0800 Reland "[url_launcher] Add Swift Package Manager integration to example app" (#8148) Relands https://github.com/flutter/packages/pull/8128 which had been reverted due to license check errors (see https://github.com/flutter/packages/pull/8137). ### Original PR description This migrates the example app to have Swift Package Manager integration. This raises the example app's Flutter SDK requirement to 3.24.0 or higher. Scenarios: 1. **Run the example app using Flutter 3.24 or higher with SwiftPM feature on**: Plugin is added using Swift Package Manager. 2. **Run the example app using Flutter 3.24 or higher with SwiftPM feature off**: Plugin is added using CocoaPods. The tool generates an empty `FlutterGeneratedPluginSwiftPackage` local package. 3. **Run the example app using Flutter version lower than 3.24**: you get a build error because the example app's Xcode project expects a `FlutterGeneratedPluginSwiftPackage` local package but cannot find it. Part of: https://github.com/flutter/flutter/issues/159173 ### Tests Current tests build the example apps twice: once with SwiftPM on, once with SwiftPM off. Currently, the tests with SwiftPM on also migrate the example app to add SwiftPM integration. After this change, these tests will no longer need to migrate the example app as it is already migrated. In other words, this change is covered by existing tests. ### Migration steps The app was migrated using these steps: ```console flutter channel master flutter upgrade flutter config --enable-swift-package-manager flutter build ios --config-only flutter build macos --config-only ``` commit 14a822fc38781b8eb8499e54311edc689913a6ab Author: Meliksah Cakir Date: Fri Nov 22 17:42:50 2024 +0100 [webview_flutter_wkwebview] Webkit webview controller multiple registration fix (#8078) Fixes re-registering existing channels while removing Javascript channels in iOS environment. Android works as expected. Fixes https://github.com/flutter/flutter/issues/158648 commit 761812665448c7e5a1bd5810aeabfac1ac027038 Author: Sinyu <1341156974@qq.com> Date: Fri Nov 22 10:24:07 2024 +0800 [quick_actions_plaform_interface] add localizedSubtitle (#8112) This is prequel PR for: https://github.com/flutter/packages/pull/8038 Containing only changes to quick_action_platform_interface package. Add the localizedSubtitle field on quick actions for iOS https://github.com/flutter/flutter/issues/129759 commit fb8a5e17d134168b867abf4407e871db0306a183 Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Thu Nov 21 18:00:23 2024 -0800 [tools] Don't check license of generated Swift package (#8137) This updates the license check to ignore any file contained in a `FlutterGeneratedPluginSwiftPackage` directory. https://github.com/flutter/packages/pull/8128 was reverted as it caused the license check to [fail](https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8730732827684094689/+/u/Run_package_tests/license_validation/stdout): ``` The license block for these files is missing or incorrect: /b/s/w/ir/x/w/packages/packages/url_launcher/url_launcher/example/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift /b/s/w/ir/x/w/packages/packages/url_launcher/url_launcher/example/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Sources/FlutterGeneratedPluginSwiftPackage/FlutterGeneratedPluginSwiftPackage.swift /b/s/w/ir/x/w/packages/packages/url_launcher/url_launcher/example/macos/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift /b/s/w/ir/x/w/packages/packages/url_launcher/url_launcher/example/macos/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Sources/FlutterGeneratedPluginSwiftPackage/FlutterGeneratedPluginSwiftPackage.swift If this third-party code, move it to a "third_party/" directory, otherwise ensure that you are using the exact copyright and license text used by all first-party files in this repository. ``` Part of https://github.com/flutter/flutter/issues/159173 commit 0dac30a24e6689cff8c5f4b8675d9837ffb0aff3 Author: engine-flutter-autoroll Date: Thu Nov 21 18:55:14 2024 -0500 Roll Flutter from 8536b96ebb3e to 93d772c5cdd8 (37 revisions) (#8147) Roll Flutter from 8536b96ebb3e to 93d772c5cdd8 (37 revisions) https://github.com/flutter/flutter/compare/8536b96ebb3e...93d772c5cdd8 2024-11-21 bkonyi@google.com Added additional logging to `_listCoreDevices` (flutter/flutter#159275) 2024-11-21 engine-flutter-autoroll@skia.org Roll Flutter Engine from 78b87f3fe023 to d1a08064e193 (1 revision) (flutter/flutter#159280) 2024-11-21 jason-simmons@users.noreply.github.com Shut down DevTools and DDS processes if flutter_tools is killed by a signal (flutter/flutter#159238) 2024-11-21 matanlurey@users.noreply.github.com Remove `RepaintBoundary` that is no longer needed. (flutter/flutter#159232) 2024-11-21 matanlurey@users.noreply.github.com Try a speculative fix for Gradle OOMs. (flutter/flutter#159234) 2024-11-21 21270878+elliette@users.noreply.github.com On-device Widget Inspector button exits widget selection (flutter/flutter#158219) 2024-11-21 engine-flutter-autoroll@skia.org Roll Flutter Engine from 523d381893c8 to 78b87f3fe023 (2 revisions) (flutter/flutter#159270) 2024-11-21 jessiewong401@gmail.com Remove `firebase_abstract_method_smoke_test` (flutter/flutter#159145) 2024-11-21 engine-flutter-autoroll@skia.org Roll Packages from e95f6d8fce58 to 913b99ed8542 (7 revisions) (flutter/flutter#159268) 2024-11-21 engine-flutter-autoroll@skia.org Roll Flutter Engine from 69c325513a65 to 523d381893c8 (3 revisions) (flutter/flutter#159263) 2024-11-21 jonahwilliams@google.com [flutter_tools] opt iOS/macOS apps out of Metal API validation via migrator, update templates in repo. (flutter/flutter#159228) 2024-11-21 jmccandless@google.com Scribe Android handwriting text input (flutter/flutter#148784) 2024-11-21 matanlurey@users.noreply.github.com Terminate non-detached test devices on `flutter run` completion (flutter/flutter#159170) 2024-11-21 matanlurey@users.noreply.github.com Un-skip tests that use `flutter build apk`. (flutter/flutter#159231) 2024-11-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from 2d32cf3a7971 to 69c325513a65 (1 revision) (flutter/flutter#159229) 2024-11-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3828681d1f86 to 2d32cf3a7971 (3 revisions) (flutter/flutter#159226) 2024-11-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3245c8976976 to 3828681d1f86 (1 revision) (flutter/flutter#159217) 2024-11-20 matanlurey@users.noreply.github.com Add `--dry-run` to `dev/bots/test.dart`. (flutter/flutter#158956) 2024-11-20 34871572+gmackall@users.noreply.github.com Add docs for setting up Android Studio to auto format Kotlin code (flutter/flutter#159209) 2024-11-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from 80d77505fdde to 3245c8976976 (1 revision) (flutter/flutter#159214) 2024-11-20 stanleycocoa@gmail.com Fix: The enableFeedback property of InkWell cannot be set to a nullab… (flutter/flutter#158907) 2024-11-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3f19207e820e to 80d77505fdde (1 revision) (flutter/flutter#159210) 2024-11-20 engine-flutter-autoroll@skia.org Roll Packages from fc4adc78aa24 to e95f6d8fce58 (6 revisions) (flutter/flutter#159201) 2024-11-20 kustermann@google.com Remove dependency on [Target] and instead operate on [Architecture] (flutter/flutter#159196) 2024-11-20 63278936+hongeSunCoder@users.noreply.github.com Fix git command in Quality-Assurance.md (flutter/flutter#155146) 2024-11-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7eb87547cbc6 to 3f19207e820e (4 revisions) (flutter/flutter#159176) 2024-11-20 matanlurey@users.noreply.github.com Make `runner` non-nullable as it always is. (flutter/flutter#159156) 2024-11-19 tessertaha@gmail.com Update Material 3 `CircularProgressIndicator` for new visual style (flutter/flutter#158104) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4ff696b555dc to 7eb87547cbc6 (3 revisions) (flutter/flutter#159168) 2024-11-19 magder@google.com Add platform-android label for all flutter_tools *android* files (flutter/flutter#159166) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from d5820a638885 to 4ff696b555dc (1 revision) (flutter/flutter#159164) 2024-11-19 bernaferrari2@gmail.com Reland Add UI Benchmarks (flutter/flutter#153368) 2024-11-19 mohellebiabdessalem@gmail.com fix lint usage of `task` inside `resolve_dependecies.gradle` file (flutter/flutter#158022) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from cff1e751f853 to d5820a638885 (5 revisions) (flutter/flutter#159155) 2024-11-19 mohellebiabdessalem@gmail.com Removing redundant backticks in `flutter\packages\flutter_tools\gradle\gradle.kts` (flutter/flutter#159051) 2024-11-19 50643541+Mairramer@users.noreply.github.com Fixes initial validation with AutovalidateMode.always on first build (flutter/flutter#156708) 2024-11-19 tessertaha@gmail.com Introduce new Material 3 `Slider` shapes (flutter/flutter#152237) 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 Please CC louisehsu@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose ... commit 41c39ba587cae7ff1b9be2e8a3ad9f29c6f68d97 Author: Omar Khaled Date: Fri Nov 22 01:05:31 2024 +0200 [go_router] Fix: Consistent PopScope Handling on Root Routes issue #140869 (#8045) **Description:** This PR addresses issue [#140869](https://github.com/flutter/flutter/issues/140869) related to back button handling on root routes in `GoRouterDelegate`. The current `_findCurrentNavigator()` function only assigns `NavigatorState` when it can pop, which prevents `PopScope` and custom back button logic from triggering on root routes, especially on Android. Additionally, the `onExit` callbacks on routes requiring custom exit handling are affected. **What This PR Changes:** 1. **Modification of `_findCurrentNavigator()`**: - Removed the conditional `canPop` check, setting `state = navigatorKey.currentState;` directly to ensure `NavigatorState` is always non-null, allowing consistent `PopScope` handling on root routes. 2. **Adjustment of `popRoute()` to Preserve `onExit` Logic**: - Updated `popRoute()` to call `maybePop()` unconditionally to make sure `PopScope` can handle back button actions on root pages. - Added fallback to `onExit` logic in `popRoute()` if `maybePop()` does not handle the pop, this way, any route-specific exit callbacks are still functional. **Impact**: - **Resolves Inconsistent Back Button Handling**: The fix enables `PopScope` and back button handling on root pages without affecting nested routes or shell routes. - **Maintains `onExit` Callback Functionality**: `onExit` is invoked when `maybePop()` doesn’t handle the pop, preserving custom exit behaviors. --- commit c4fc0e0c61567d8316766e0eb8c58d456050d173 Author: LouiseHsu Date: Thu Nov 21 13:30:31 2024 -0800 [in_app_purchase_storekit] fix price displayed with wrong precision (#8127) Fixes https://github.com/flutter/flutter/issues/159080 commit 5180c03b8a0492defec2eae1677199dc29d308a7 Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Thu Nov 21 14:26:29 2024 -0700 [pigeon] Removes the `@protected` annotation from the InstanceManager field of the `PigeonInternalProxyApiBaseClass` (#8125) It's common to access the `InstanceManager` when creating platform views, so this removes the `@protected` annotation to prevent lint warnings. See https://github.com/flutter/packages/pull/7794#discussion_r1828288959 commit c55e398dad5630097be15d32625c2818d7b83142 Author: stuartmorgan Date: Thu Nov 21 13:06:16 2024 -0500 [google_maps_flutter] Use structured Pigeon data on iOS (#8142) Converts most of the maps objects that were still using pre-Pigeon JSON serializations to use structured Pigeon classes instead, mirroring the recent work in the Android implementation: - Copies the Pigeon definitions from Android, with minor modifications. - Copies the Dart conversion code and tests from Android, with minor modifications. - Updates the native code to eliminate a lot of JSON boilerplate. In addition to adding type safety, this mostly finishes addressing technical debt dating back to the initial federation of the plugin, where native code in the implementation package is relying on the JSON serialization of objects that is implemented in the platform interface package, meaning that the stringly-typed data had to match *across packages* in addition to languages. This also backports some Dart unit test improvements to the Android implementation. While bringing the test code over I noticed that the expectations were based on running the Pigeon serialization and then asserting things about the results, which I missed in review. That approach is very fragile because the Pigeon serialization is an internal implementation detail of Pigeon and subject to change at any time. Instead the tests should be using the object directly. Part of https://github.com/flutter/flutter/issues/117907 commit 913b99ed8542052266b260517bde75d549bd629f Author: Navaron Bracke Date: Thu Nov 21 02:36:53 2024 +0100 [vector_graphics] handle errors from bytes loader (#8080) This PR updates the VectorGraphicsWidget to handle errors from the underlying bytes loader using the existing error handling in its implementation. *List which issues are fixed by this PR. You must list at least one issue.* Fixes https://github.com/flutter/flutter/issues/158862 commit 013cc248b4a253bcb435c051f0b0a0b5632c9ac0 Author: derdilla <82763757+derdilla@users.noreply.github.com> Date: Thu Nov 21 02:04:14 2024 +0100 [flutter_svg] Fix SvgNetworkLoader not closing internal http client (#8126) closes https://github.com/flutter/flutter/issues/158928 Ensures that if a Client is created in `prepareMessage` it is closed after getting the resource. commit 2703b67eb4ee143f8a04a5d10cc3cf622588aa8c Author: misos1 <30872003+misos1@users.noreply.github.com> Date: Wed Nov 20 23:20:10 2024 +0100 [video_player_avfoundation] send video load failure even when eventsink was initialized late (#7194) Event `initialized` is sent from `onListenWithArguments` by calling `setupEventSinkIfReadyToPlay` if event sink was `nil` during `observeValueForKeyPath`. This change also sends failure in a similar way. Adds more details to the error message returned by `VideoPlayerController.initialize()`. - https://github.com/flutter/flutter/issues/151475 - https://github.com/flutter/flutter/issues/147707 - https://github.com/flutter/flutter/issues/56665 - now error message may look like: `Failed to load video: Operation Stopped: The server is not correctly configured.: The operation couldn’t be completed. (CoreMediaErrorDomain error -12939 - byte range and no content length - error code is 200)` Tests `testSeekToWhilePausedStartsDisplayLinkTemporarily` and `testSeekToWhilePlayingDoesNotStopDisplayLink` are failing on the main branch on ios. Seems position is correctly set to 1234 in `seekTo` completion handler but right after `[mockDisplayLink setRunning:YES]` is set again to 0 and after some time back to 1234 so those two tests sometimes fail (seems more often when running all tests). commit 1cd499ec0c7164afb6ecf951565ff30c4ee42ce5 Author: Kevin Moore Date: Wed Nov 20 13:33:24 2024 -0800 [flutter_markdown] enable Wasm support (#8120) Fix directive in widget code commit c53e5c4f37f1d6697d71f837ad1ca4e08e65e332 Author: auto-submit[bot] <98614782+auto-submit[bot]@users.noreply.github.com> Date: Wed Nov 20 21:25:26 2024 +0000 Reverts "[url_launcher] Add Swift Package Manager integration to example app (#8128)" (#8136) Reverts: flutter/packages#8128 Initiated by: loic-sharma Reason for reverting: this caused the license checker to [error](https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8730732827684094689/+/u/Run_package_tests/license_validation/stdout): ``` The license block for these files is missing or incorrect: /b/s/w/ir/x/w/packages/packages/url_launcher/url_launcher/example/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift /b Original PR Author: loic-sharma Reviewed By: {stuartmorgan} This change reverts the following previous change: This migrates the example app to have Swift Package Manager integration. This raises the example app's Flutter SDK requirement to 3.24.0 or higher. Scenarios: 1. **Run the example app using Flutter 3.24 or higher with SwiftPM feature on**: Plugin is added using Swift Package Manager. 2. **Run the example app using Flutter 3.24 or higher with SwiftPM feature off**: Plugin is added using CocoaPods. The tool generates an empty `FlutterGeneratedPluginSwiftPackage` local package. 3. **Run the example app using Flutter version lower than 3.24**: you get a build error because the example app's Xcode project expects a `FlutterGeneratedPluginSwiftPackage` local package but cannot find it. Part of: https://github.com/flutter/flutter/issues/159173 ### Tests Current tests build the example apps twice: once with SwiftPM on, once with SwiftPM off. Currently, the tests with SwiftPM on also migrate the example app to add SwiftPM integration. After this change, these tests will no longer need to migrate the example app as it is already migrated. In other words, this change is covered by existing tests. ### Migration steps The app was migrated using these steps: ```console flutter channel master flutter upgrade flutter config --enable-swift-package-manager flutter build ios --config-only flutter build macos --config-only ``` commit 59a1067db64aad91ba1b56c77d6dbc1aa5cf2481 Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Wed Nov 20 08:48:18 2024 -0800 [url_launcher] Add Swift Package Manager integration to example app (#8128) This migrates the example app to have Swift Package Manager integration. This raises the example app's Flutter SDK requirement to 3.24.0 or higher. Scenarios: 1. **Run the example app using Flutter 3.24 or higher with SwiftPM feature on**: Plugin is added using Swift Package Manager. 2. **Run the example app using Flutter 3.24 or higher with SwiftPM feature off**: Plugin is added using CocoaPods. The tool generates an empty `FlutterGeneratedPluginSwiftPackage` local package. 3. **Run the example app using Flutter version lower than 3.24**: you get a build error because the example app's Xcode project expects a `FlutterGeneratedPluginSwiftPackage` local package but cannot find it. Part of: https://github.com/flutter/flutter/issues/159173 ### Tests Current tests build the example apps twice: once with SwiftPM on, once with SwiftPM off. Currently, the tests with SwiftPM on also migrate the example app to add SwiftPM integration. After this change, these tests will no longer need to migrate the example app as it is already migrated. In other words, this change is covered by existing tests. ### Migration steps The app was migrated using these steps: ```console flutter channel master flutter upgrade flutter config --enable-swift-package-manager flutter build ios --config-only flutter build macos --config-only ``` commit 0d92794cecdf9e4d3093983bedbc7d0531dced17 Author: stuartmorgan Date: Wed Nov 20 11:34:08 2024 -0500 [pigeon] Enable example app build in CI (#8119) Removes example/pubspec.yaml, which is no longer needed since the excerpt system was rewritten not to use `build_runner`, so that the repo tooling recognizes `example/app/` as the actual example, enabling all the standard CI steps (build example for each platform, run integration test, etc.) to run for it. commit e95f6d8fce589a6dfbd8ceb6f2ddaa537ec2b2e6 Author: LouiseHsu Date: Tue Nov 19 15:42:58 2024 -0800 [in_app_purchase_storekit] disallow ios versions lower than supported from enabling storekit (#8110) Fixes https://github.com/flutter/flutter/issues/158894 Checks device version before enabling storekit 2. commit fc80137ff42a6957f8bac91c8a310776c939ffd7 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Nov 19 23:05:33 2024 +0000 [interactive_media_ads]: Bump com.google.ads.interactivemedia.v3:interactivemedia from 3.35.1 to 3.36.0 in /packages/interactive_media_ads/android (#8046) Bumps com.google.ads.interactivemedia.v3:interactivemedia from 3.35.1 to 3.36.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.google.ads.interactivemedia.v3:interactivemedia&package-manager=gradle&previous-version=3.35.1&new-version=3.36.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 1bbf83bfba8bd8335d46e678b77e6b0d254f5b7b Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Nov 19 20:27:58 2024 +0000 [interactive_media_ads]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.1 in /packages/interactive_media_ads/android (#7980) Bumps androidx.annotation:annotation from 1.8.2 to 1.9.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.8.2&new-version=1.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 6003bfebfe0d1ef6e587424025c48c0b1b03e256 Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Tue Nov 19 13:16:07 2024 -0700 [webview_flutter_android] Updates plugin to use `ProxyApis`s (#7794) commit 0e73a05715f61ccfcab25fd08aab2cb26370603b Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Tue Nov 19 12:37:23 2024 -0700 [interactive_media_ads] Adds support to define parameters that control the rendering of ads (#8057) Changes `PlatformAdsManager.init(AdsManagerInitParams)` to the correct shared `PlatformAdsManager.init(PlatformAdsRenderingSettings?)` feature. **Android:** https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/api/reference/com/google/ads/interactivemedia/v3/api/BaseManager.html#init(com.google.ads.interactivemedia.v3.api.AdsRenderingSettings) **iOS:** https://developers.google.com/interactive-media-ads/docs/sdks/ios/client-side/reference/Classes/IMAAdsManager#/c:objc(cs)IMAAdsManager(im)initializeWithAdsRenderingSettings: The platform interface and implementation aren't exposed yet, so this change should not be breaking. Fixes https://github.com/flutter/flutter/issues/152253 commit fb3a936b275e91676312a29e727c38536d0296be Author: engine-flutter-autoroll Date: Tue Nov 19 13:26:08 2024 -0500 Roll Flutter from b3818f6b5979 to 8536b96ebb3e (22 revisions) (#8124) https://github.com/flutter/flutter/compare/b3818f6b5979...8536b96ebb3e 2024-11-19 matanlurey@users.noreply.github.com Terminate `flutter test` when no longer needed in integration test. (flutter/flutter#159117) 2024-11-19 matanlurey@users.noreply.github.com Terminate the test device if the `flutter` tool is signal-killed. (flutter/flutter#159115) 2024-11-19 engine-flutter-autoroll@skia.org Roll Packages from c1eabf5e32cc to fc4adc78aa24 (10 revisions) (flutter/flutter#159143) 2024-11-19 reidbaker@google.com Deflake api 35 emulator tests by updating emulator definitions version to latest available from chrome infra (flutter/flutter#158017) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from b6723e33b858 to cff1e751f853 (1 revision) (flutter/flutter#159141) 2024-11-19 bruno.leroux@gmail.com Fix InkWell overlayColor resolution ignores selected state (flutter/flutter#159072) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from 983b7b85d122 to b6723e33b858 (3 revisions) (flutter/flutter#159134) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from c1b0e18a70b3 to 983b7b85d122 (2 revisions) (flutter/flutter#159124) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from 878f593802e1 to c1b0e18a70b3 (13 revisions) (flutter/flutter#159118) 2024-11-19 737941+loic-sharma@users.noreply.github.com [SwiftPM] Move where the migration checks feature flags (flutter/flutter#159110) 2024-11-18 gspencergoog@users.noreply.github.com Plumbs `scrollBehavior` into `SelectableText` so that the scrollbar may be hidden (flutter/flutter#158887) 2024-11-18 matanlurey@users.noreply.github.com Add a tag and assert some state in FlutterTestDriver tests. (flutter/flutter#159099) 2024-11-18 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.6.0 to 5.0.2 in the all-github-actions group (flutter/flutter#159104) 2024-11-18 nate.w5687@gmail.com Add `@protected` to public `State` method overrides (flutter/flutter#157313) 2024-11-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9686de154114 to 878f593802e1 (5 revisions) (flutter/flutter#159097) 2024-11-18 bkonyi@google.com Fix flaky failure related to core_device_list.json not being found (flutter/flutter#158946) 2024-11-18 katelovett@google.com Prettier merge_queue.md (flutter/flutter#158969) 2024-11-18 matanlurey@users.noreply.github.com Define and use `flutterBin` consistently across `integration.shard`. (flutter/flutter#159007) 2024-11-18 matanlurey@users.noreply.github.com No longer download `android-x86-jit-release`. (flutter/flutter#159011) 2024-11-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from e1f4e7d9bfc4 to 9686de154114 (1 revision) (flutter/flutter#159082) 2024-11-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from f365c9f5dce3 to e1f4e7d9bfc4 (4 revisions) (flutter/flutter#159078) 2024-11-18 engine-flutter-autoroll@skia.org Roll Packages from b164be312ca2 to c1eabf5e32cc (6 revisions) (flutter/flutter#159077) 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 Please CC louisehsu@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit fc4adc78aa2417fad51c776dc54cc35115635080 Author: Jenn Magder Date: Mon Nov 18 15:37:04 2024 -0800 [ci] Take screenshot when native drive test is taking longer than 10 minutes (#8050) If the `flutter test` run takes more than 10 minutes (default timeout is 12 minutes) take a screenshot and attach to the logs directory. Helped debug https://github.com/flutter/flutter/issues/153578#issuecomment-2465941063. Probably `flutter test` should have a screenshot option similar to `flutter drive`, but at the moment it doesn't. commit afb1aff77198240a1efd7b772beb31c73fa41397 Author: jesswrd Date: Mon Nov 18 15:51:25 2024 -0600 Applied Gradle Plugins Declaratively for Most Remaining Plugin Example Apps (Part 3) (#8037) Updated applying gradle plugins from usage of imperative apply to usage of declarative blocks {} apply for 25 remaining plugin example apps. Intending on updating all android example apps under packages. Here are previous bulk migrations from imperative apply to declarative apply: https://github.com/flutter/packages/pull/7968 https://github.com/flutter/packages/pull/8019 Previously migrated applying path_provider plugin example app from imperatively to declaratively in this PR [here](https://github.com/flutter/packages/pull/7822). Tests for changes in the linked PR above. More information on Flutter Gradle Pluggin Apply [here](https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply) All instances of `minSdkVersion` for example plugin apps use `flutter.minSdkVersion` instead of the hard-coded version https://github.com/flutter/packages/pull/8035. Partially addresses [#152656](https://github.com/flutter/flutter/issues/152656) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [x] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests commit 237846b7634853f08099f6e84efa735ea0a7443f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Nov 18 17:27:03 2024 +0000 [pigeon]: Bump org.jetbrains.kotlin:kotlin-bom from 1.8.10 to 2.0.21 in /packages/pigeon/platform_tests/test_plugin/android (#7867) Bumps [org.jetbrains.kotlin:kotlin-bom](https://github.com/JetBrains/kotlin) from 1.8.10 to 2.0.21.
Release notes

Sourced from org.jetbrains.kotlin:kotlin-bom's releases.

Kotlin 2.0.21

Changelog

Apple Ecosystem

Backend. Native. Debug

  • KT-71374 lldb: step out breaks breaking in Xcode 16

Compiler

Fixes

  • KT-69735 K2: Static fields are missing from the declaration list of corresponding IrClass for java class
  • KT-71122 Regression in Kotlin Compiler 2.0 causing NPE in the runtime
  • KT-70931 K2 / Scripts: "cannot convert IrExpression to ConstantValue" when using function annotation
  • KT-70584 K2: "IllegalStateException: flow for PostponedLambdaExitNode not initialized - traversing nodes in wrong order?"
  • KT-70808 K2: "node has already been visited" with anonymous object in dead code
  • KT-69985 K2: Classifier declarations from root package are resolved without imports in non-root packages
  • KT-70683 K2: Internal compiler error in IrFakeOverrideSymbolBase.getOwner
  • KT-70901 False positive Public-API inline function cannot access non-public-API property accessor
  • KT-70930 K2: Java annotations not present on ENUM_ENTRY IR elements
  • KT-70194 K2 IDE: exception on a very red file
  • KT-69399 Native: IllegalStateException: "Failed to build cache"

Compose compiler

Fixes

  • b/329477544 Force open / overridden Composable functions to be non-restartable.
  • b/361652128 Disable live literal transform if the corresponding flag is disabled

IR. Actualizer

  • KT-70894 IR crash. Unprocessed IrFunctionFakeOverrideSymbol when actualize to Java

IR. Tree

  • KT-71191 SymbolTable: Check if the provided signature is public before adding a symbol to the SymbolTable

Native. Build Infrastructure

  • KT-71485 K/N runtime parts don't build due to _Float16 issues on x86_64 macOS

Native. C Export

  • KT-69507 LLVM 11 clang with Xcode 16 headers: standard c++ headers

Native. C and ObjC Import

  • KT-71029 Investigate why stdarg.h declarations leak into testModuleA

Native. Platform Libraries

  • KT-70566 LLVM 11 clang with Xcode 16 headers: 'sys/cdefs.h' file not found
  • KT-71624 Eliminate remaining UIKit/AppKit removed signatures
  • KT-70031 Rebuild platform libraries in 2.0.21 with Xcode 16

Native. Testing

  • KT-70603 C++ with -fmodules: cyclic dependency in module 'std': std -> _wctype -> __wctype -> std in dev llvm toolchains

Tools. CLI. Native

  • KT-71262 KotlinNativeLink tasks fetching from network despite -Xoverride-konan-properties=dependenciesUrl= being set

Tools. Compiler Plugins

  • KT-71038 PowerAssert: Constant on RHS of elvis operator leads to compiler crash

Tools. Daemon

  • KT-35381 Get rid of the native-platform usage in kotlin compiler

Tools. Gradle. Multiplatform

  • KT-71444 Certain POMs produced by Kotlin 2.0.20 cannot be consumed by KMP projects with Android targets
  • KT-70700 Gradle 8.10: The value for task ':commonizeNativeDistribution' property 'kotlinNativeBundleBuildService' cannot be changed any further
  • KT-71396 Gradle client side JVM explodes with OOM due to xcodebuild logs

Tools. Gradle. Native

... (truncated)

Changelog

Sourced from org.jetbrains.kotlin:kotlin-bom's changelog.

2.0.21-RC

Apple Ecosystem

Backend. Native. Debug

  • KT-71374 lldb: step out breaks breaking in Xcode 16

Compiler

Fixes

  • KT-69735 K2: Static fields are missing from the declaration list of corresponding IrClass for java class
  • KT-71122 Regression in Kotlin Compiler 2.0 causing NPE in the runtime
  • KT-70931 K2 / Scripts: "cannot convert IrExpression to ConstantValue" when using function annotation
  • KT-70584 K2: "IllegalStateException: flow for PostponedLambdaExitNode not initialized - traversing nodes in wrong order?"
  • KT-70808 K2: "node has already been visited" with anonymous object in dead code
  • KT-69985 K2: Classifier declarations from root package are resolved without imports in non-root packages
  • KT-70683 K2: Internal compiler error in IrFakeOverrideSymbolBase.getOwner
  • KT-70901 False positive Public-API inline function cannot access non-public-API property accessor
  • KT-70930 K2: Java annotations not present on ENUM_ENTRY IR elements
  • KT-70194 K2 IDE: exception on a very red file
  • KT-69399 Native: IllegalStateException: "Failed to build cache"

Compose compiler

Fixes

  • b/329477544 Force open / overridden Composable functions to be non-restartable.
  • b/361652128 Disable live literal transform if the corresponding flag is disabled

IR. Actualizer

  • KT-70894 IR crash. Unprocessed IrFunctionFakeOverrideSymbol when actualize to Java

IR. Tree

  • KT-71191 SymbolTable: Check if the provided signature is public before adding a symbol to the SymbolTable

Native. Build Infrastructure

  • KT-71485 K/N runtime parts don't build due to _Float16 issues on x86_64 macOS

Native. C Export

  • KT-69507 LLVM 11 clang with Xcode 16 headers: standard c++ headers

Native. C and ObjC Import

... (truncated)

Commits
  • 284e9b4 Add ChangeLog for 2.0.21-RC
  • 38084f0 Enable source information for getters and other special-named functions
  • 9fcd247 Move source information of default parameters to the default group
  • 4bad11d Add source markers to @​ExplicitGroupsComposable
  • fcc1075 Bump IntelliJ platform to 233.13135.128
  • 1499254 [FIR2IR] Add static fields to the list of declarations of lazy IR java class
  • 8f121bc Derelocate NSTextAttachment and NSTextContainer methods
  • cc0919d Allow using categories in the def file to reintroduce methods in the class
  • b1504e7 [IC] Add synchronized clean methods to storage classes
  • 273abb8 Derelocate deprecated DOMElement APIs
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.jetbrains.kotlin:kotlin-bom&package-manager=gradle&previous-version=1.8.10&new-version=2.0.21)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 44a1745a862b528c323fe0e6aa1e95f5e3a24dde Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Nov 18 17:27:01 2024 +0000 [gradle]: Bump androidx.test.ext:junit-ktx from 1.1.5 to 1.2.1 in /packages/shared_preferences/shared_preferences_android/android (#8097) Bumps androidx.test.ext:junit-ktx from 1.1.5 to 1.2.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.test.ext:junit-ktx&package-manager=gradle&previous-version=1.1.5&new-version=1.2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 0cc2ca226fe214841f18f3fca355612a1b4ba948 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Nov 18 17:23:51 2024 +0000 [pigeon]: Bump org.jetbrains.kotlin:kotlin-gradle-plugin from 2.0.20 to 2.0.21 in /packages/pigeon/platform_tests/test_plugin/android (#7869) Bumps [org.jetbrains.kotlin:kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 2.0.20 to 2.0.21.
Release notes

Sourced from org.jetbrains.kotlin:kotlin-gradle-plugin's releases.

Kotlin 2.0.21

Changelog

Apple Ecosystem

Backend. Native. Debug

  • KT-71374 lldb: step out breaks breaking in Xcode 16

Compiler

Fixes

  • KT-69735 K2: Static fields are missing from the declaration list of corresponding IrClass for java class
  • KT-71122 Regression in Kotlin Compiler 2.0 causing NPE in the runtime
  • KT-70931 K2 / Scripts: "cannot convert IrExpression to ConstantValue" when using function annotation
  • KT-70584 K2: "IllegalStateException: flow for PostponedLambdaExitNode not initialized - traversing nodes in wrong order?"
  • KT-70808 K2: "node has already been visited" with anonymous object in dead code
  • KT-69985 K2: Classifier declarations from root package are resolved without imports in non-root packages
  • KT-70683 K2: Internal compiler error in IrFakeOverrideSymbolBase.getOwner
  • KT-70901 False positive Public-API inline function cannot access non-public-API property accessor
  • KT-70930 K2: Java annotations not present on ENUM_ENTRY IR elements
  • KT-70194 K2 IDE: exception on a very red file
  • KT-69399 Native: IllegalStateException: "Failed to build cache"

Compose compiler

Fixes

  • b/329477544 Force open / overridden Composable functions to be non-restartable.
  • b/361652128 Disable live literal transform if the corresponding flag is disabled

IR. Actualizer

  • KT-70894 IR crash. Unprocessed IrFunctionFakeOverrideSymbol when actualize to Java

IR. Tree

  • KT-71191 SymbolTable: Check if the provided signature is public before adding a symbol to the SymbolTable

Native. Build Infrastructure

  • KT-71485 K/N runtime parts don't build due to _Float16 issues on x86_64 macOS

Native. C Export

  • KT-69507 LLVM 11 clang with Xcode 16 headers: standard c++ headers

Native. C and ObjC Import

  • KT-71029 Investigate why stdarg.h declarations leak into testModuleA

Native. Platform Libraries

  • KT-70566 LLVM 11 clang with Xcode 16 headers: 'sys/cdefs.h' file not found
  • KT-71624 Eliminate remaining UIKit/AppKit removed signatures
  • KT-70031 Rebuild platform libraries in 2.0.21 with Xcode 16

Native. Testing

  • KT-70603 C++ with -fmodules: cyclic dependency in module 'std': std -> _wctype -> __wctype -> std in dev llvm toolchains

Tools. CLI. Native

  • KT-71262 KotlinNativeLink tasks fetching from network despite -Xoverride-konan-properties=dependenciesUrl= being set

Tools. Compiler Plugins

  • KT-71038 PowerAssert: Constant on RHS of elvis operator leads to compiler crash

Tools. Daemon

  • KT-35381 Get rid of the native-platform usage in kotlin compiler

Tools. Gradle. Multiplatform

  • KT-71444 Certain POMs produced by Kotlin 2.0.20 cannot be consumed by KMP projects with Android targets
  • KT-70700 Gradle 8.10: The value for task ':commonizeNativeDistribution' property 'kotlinNativeBundleBuildService' cannot be changed any further
  • KT-71396 Gradle client side JVM explodes with OOM due to xcodebuild logs

Tools. Gradle. Native

... (truncated)

Changelog

Sourced from org.jetbrains.kotlin:kotlin-gradle-plugin's changelog.

2.0.21-RC

Apple Ecosystem

Backend. Native. Debug

  • KT-71374 lldb: step out breaks breaking in Xcode 16

Compiler

Fixes

  • KT-69735 K2: Static fields are missing from the declaration list of corresponding IrClass for java class
  • KT-71122 Regression in Kotlin Compiler 2.0 causing NPE in the runtime
  • KT-70931 K2 / Scripts: "cannot convert IrExpression to ConstantValue" when using function annotation
  • KT-70584 K2: "IllegalStateException: flow for PostponedLambdaExitNode not initialized - traversing nodes in wrong order?"
  • KT-70808 K2: "node has already been visited" with anonymous object in dead code
  • KT-69985 K2: Classifier declarations from root package are resolved without imports in non-root packages
  • KT-70683 K2: Internal compiler error in IrFakeOverrideSymbolBase.getOwner
  • KT-70901 False positive Public-API inline function cannot access non-public-API property accessor
  • KT-70930 K2: Java annotations not present on ENUM_ENTRY IR elements
  • KT-70194 K2 IDE: exception on a very red file
  • KT-69399 Native: IllegalStateException: "Failed to build cache"

Compose compiler

Fixes

  • b/329477544 Force open / overridden Composable functions to be non-restartable.
  • b/361652128 Disable live literal transform if the corresponding flag is disabled

IR. Actualizer

  • KT-70894 IR crash. Unprocessed IrFunctionFakeOverrideSymbol when actualize to Java

IR. Tree

  • KT-71191 SymbolTable: Check if the provided signature is public before adding a symbol to the SymbolTable

Native. Build Infrastructure

  • KT-71485 K/N runtime parts don't build due to _Float16 issues on x86_64 macOS

Native. C Export

  • KT-69507 LLVM 11 clang with Xcode 16 headers: standard c++ headers

Native. C and ObjC Import

... (truncated)

Commits
  • 284e9b4 Add ChangeLog for 2.0.21-RC
  • 38084f0 Enable source information for getters and other special-named functions
  • 9fcd247 Move source information of default parameters to the default group
  • 4bad11d Add source markers to @​ExplicitGroupsComposable
  • fcc1075 Bump IntelliJ platform to 233.13135.128
  • 1499254 [FIR2IR] Add static fields to the list of declarations of lazy IR java class
  • 8f121bc Derelocate NSTextAttachment and NSTextContainer methods
  • cc0919d Allow using categories in the def file to reintroduce methods in the class
  • b1504e7 [IC] Add synchronized clean methods to storage classes
  • 273abb8 Derelocate deprecated DOMElement APIs
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.jetbrains.kotlin:kotlin-gradle-plugin&package-manager=gradle&previous-version=2.0.20&new-version=2.0.21)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 4880077c73ee9a8944a2486dcc2c2dc0f8d89ac7 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Nov 18 17:23:48 2024 +0000 [gradle]: Bump org.hamcrest:hamcrest from 2.2 to 3.0 in /packages/espresso/android (#8092) Bumps [org.hamcrest:hamcrest](https://github.com/hamcrest/JavaHamcrest) from 2.2 to 3.0.
Release notes

Sourced from org.hamcrest:hamcrest's releases.

Hamcrest v3.0

Breaking Changes

  • From version 3.0, the jar distributed to Maven Central is now compiled to Java 1.8 bytecode, and is not compatible with previous versions of Java. See [Issue #331](hamcrest/JavaHamcrest#331) and [PR #411](hamcrest/JavaHamcrest#411) for details. Developers who use Java 1.7 earlier can still depend upon hamcrest-2.2.jar.

Improvements

Hamcrest v3.0-rc1

Breaking Changes

  • From version 3.0, the jar distributed to Maven Central is now compiled to Java 1.8 bytecode, and is not compatible with previous versions of Java. See [Issue #331](hamcrest/JavaHamcrest#331) and [PR #411](hamcrest/JavaHamcrest#411) for details. Developers who use Java 1.7 earlier can still depend upon hamcrest-2.2.jar.

Improvements

Changelog

Sourced from org.hamcrest:hamcrest's changelog.

Version 3.0 (1st August 2024)

Breaking Changes

  • From version 3.0, the jar distributed to Maven Central is now compiled to Java 1.8 bytecode, and is not compatible with previous versions of Java. See [Issue #331](hamcrest/JavaHamcrest#331) and [PR #411](hamcrest/JavaHamcrest#411) for details. Developers who use Java 1.7 earlier can still depend upon hamcrest-2.2.jar.

Improvements

Commits
  • 68984b8 Version 3.0
  • 1adc351 Fix javadoc title
  • 4e2b71c Add instructions for releasing to Maven Central
  • 3fa841d Revert version to 3.0-SNAPSHOT
  • 750dc36 Prepare for version 3.0-rc1
  • 1703e95 Fix broken tutorial link in README
  • c4578ef Upgrade Gradle 8.8 -> 8.9
  • a9923af Remove old, unused build definitions
  • cf25e14 Cleanup README, fix broken links
  • bc4769e Upgrade to GitHub-native Dependabot (#342)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.hamcrest:hamcrest&package-manager=gradle&previous-version=2.2&new-version=3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 6f8613dd991f31c98ac12b406b5c258e9cf213f8 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Nov 18 17:23:45 2024 +0000 [pigeon]: Bump io.mockk:mockk from 1.13.12 to 1.13.13 in /packages/pigeon/platform_tests/test_plugin/android (#7868) Bumps [io.mockk:mockk](https://github.com/mockk/mockk) from 1.13.12 to 1.13.13.
Release notes

Sourced from io.mockk:mockk's releases.

1.13.13

What's Changed

New Contributors

Full Changelog: https://github.com/mockk/mockk/compare/1.13.11...1.13.13

Commits
  • a81fe33 Version bump
  • edf9f95 Merge pull request #1297 from erikhuizinga/erikhuizinga-bench-junit-api
  • ba215b8 Merge pull request #1298 from MGaetan89/update_calls_bounds_msg
  • c841e51 Improve error message on unexpected calls count
  • 6688d6a Respect JUnit 5 test instance lifecycle
  • 7314083 Add Gradle wrapper validation
  • 92d1d0d Dump API
  • e1c2de7 Reformat
  • 9f1c5b2 Unmock after each test
  • b1d3dc0 Benchmark clearAllMocks and unmockkAll
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=io.mockk:mockk&package-manager=gradle&previous-version=1.13.12&new-version=1.13.13)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit fe887cb7987b4887ad0b35f3b786be04ba9920af Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Nov 18 17:22:12 2024 +0000 [shared_pref]: Bump io.mockk:mockk from 1.13.12 to 1.13.13 in /packages/shared_preferences/shared_preferences_android/android (#7866) Bumps [io.mockk:mockk](https://github.com/mockk/mockk) from 1.13.12 to 1.13.13.
Release notes

Sourced from io.mockk:mockk's releases.

1.13.13

What's Changed

New Contributors

Full Changelog: https://github.com/mockk/mockk/compare/1.13.11...1.13.13

Commits
  • a81fe33 Version bump
  • edf9f95 Merge pull request #1297 from erikhuizinga/erikhuizinga-bench-junit-api
  • ba215b8 Merge pull request #1298 from MGaetan89/update_calls_bounds_msg
  • c841e51 Improve error message on unexpected calls count
  • 6688d6a Respect JUnit 5 test instance lifecycle
  • 7314083 Add Gradle wrapper validation
  • 92d1d0d Dump API
  • e1c2de7 Reformat
  • 9f1c5b2 Unmock after each test
  • b1d3dc0 Benchmark clearAllMocks and unmockkAll
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=io.mockk:mockk&package-manager=gradle&previous-version=1.13.12&new-version=1.13.13)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit a076baea2f16d4a5eefc5e511ace69c5261ef370 Author: Jenn Magder Date: Mon Nov 18 09:08:16 2024 -0800 Add autosubmit label to dependabot PRs (#8101) The [flutter/flutter](https://github.com/flutter/flutter/blob/09941e7b4781b81adeb7bce8b389e5b8b45325ca/.github/dependabot.yml#L19) and [flutter/engine](https://github.com/flutter/engine/blob/5f8e6e465584599bef234b5fea4320cf78041cc2/.github/dependabot.yml#L12-L13) repo put the `autosubmit` label on dependabot PRs so if all checks pass then no review is necessary and it will merge. For example, https://github.com/flutter/flutter/pull/156024 merged without any human intervention. In packages this is rarer (due to CHANGELOG and version bumps), but still happens, for example https://github.com/flutter/packages/pull/8097 bumps a `testImplementation` dependency and passed all checks. Add `autosubmit` to the packages repo for dependabot PRs so if all checks pass they just merge. If checks don't pass, the bot will remove the label and we'll be back to manual review required. commit 7b6583c8dc0efb8edac3bc1f7e4f5db9fba19c3e Author: engine-flutter-autoroll Date: Mon Nov 18 10:50:57 2024 -0500 Roll Flutter from 0e2d55e0e7b2 to b3818f6b5979 (23 revisions) (#8118) https://github.com/flutter/flutter/compare/0e2d55e0e7b2...b3818f6b5979 2024-11-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from a63841d0c64b to f365c9f5dce3 (1 revision) (flutter/flutter#159064) 2024-11-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4878f1c9ed1c to a63841d0c64b (8 revisions) (flutter/flutter#159057) 2024-11-17 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4c1eb8cacb95 to 4878f1c9ed1c (1 revision) (flutter/flutter#159050) 2024-11-17 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9d0720a7b0ec to 4c1eb8cacb95 (1 revision) (flutter/flutter#159049) 2024-11-17 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6f9854ad6ed7 to 9d0720a7b0ec (2 revisions) (flutter/flutter#159047) 2024-11-17 engine-flutter-autoroll@skia.org Roll Flutter Engine from 40000c742910 to 6f9854ad6ed7 (2 revisions) (flutter/flutter#159041) 2024-11-16 yaostyle@gmail.com Fix NavigationBar example overflow alignment (flutter/flutter#159034) 2024-11-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from 908061196148 to 40000c742910 (1 revision) (flutter/flutter#159038) 2024-11-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from 85d445e3cf78 to 908061196148 (3 revisions) (flutter/flutter#159032) 2024-11-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1800193ba961 to 85d445e3cf78 (1 revision) (flutter/flutter#159020) 2024-11-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from 98c3b7f8d1a7 to 1800193ba961 (1 revision) (flutter/flutter#159019) 2024-11-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from f23832175b7a to 98c3b7f8d1a7 (1 revision) (flutter/flutter#159017) 2024-11-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from f649330affa8 to f23832175b7a (1 revision) (flutter/flutter#159016) 2024-11-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from 619804c0fbb7 to f649330affa8 (47 revisions) (flutter/flutter#159015) 2024-11-16 fluttergithubbot@gmail.com Marks Linux web_benchmarks_skwasm_st to be unflaky (flutter/flutter#158563) 2024-11-16 fluttergithubbot@gmail.com Marks Windows windows_desktop_impeller to be unflaky (flutter/flutter#158565) 2024-11-15 yjbanov@google.com [flutter triage] Update list of frequent web contributors (flutter/flutter#159008) 2024-11-15 matanlurey@users.noreply.github.com Switch `flutter_build_apk_health_tests` to use a subset of current tests. (flutter/flutter#159004) 2024-11-15 gspencergoog@users.noreply.github.com Make the focus node on SelectableRegion optional. (flutter/flutter#158994) 2024-11-15 yjbanov@google.com Style change in Flutter-Web-Triage.md (flutter/flutter#159006) 2024-11-15 kustermann@google.com Refactor native asset integration into flutter tools (flutter/flutter#158932) 2024-11-15 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Try running historically flaky tests first to make `flutter build apk` health tests time out more often? (#158967)" (flutter/flutter#158993) 2024-11-15 mdebbar@google.com [web] Remove the benchmarks of the HTML renderer (flutter/flutter#158520) 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 Please CC louisehsu@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit c1eabf5e32cccfe54474726584ea1c2cf5a0a269 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat Nov 16 21:42:45 2024 +0000 [gradle]: Bump org.mockito.kotlin:mockito-kotlin from 4.1.0 to 5.4.0 in /packages/interactive_media_ads/android (#8095) Bumps [org.mockito.kotlin:mockito-kotlin](https://github.com/mockito/mockito-kotlin) from 4.1.0 to 5.4.0.
Release notes

Sourced from org.mockito.kotlin:mockito-kotlin's releases.

5.4.0

5.4.0

5.3.1

5.3.1

5.3.0

This release has not been published to maven-central

5.3.0

5.2.1

5.2.1

5.2.0

5.2.0

5.1.0

5.1.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.mockito.kotlin:mockito-kotlin&package-manager=gradle&previous-version=4.1.0&new-version=5.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 38b100c0c5326680e300b787ec7812bf178a055f Author: Kevin Moore Date: Fri Nov 15 16:28:23 2024 -0800 [google_identity_services_web] Migrate all types to JSObject (#8053) And cleanup other legacy JS-interop Also update tests so they pass with WebAssembly commit 58d1e6bff3aa0e37b99f28bb94ef4dc381a08bb0 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Nov 15 23:37:57 2024 +0000 [file_selector]: Bump androidx.annotation:annotation from 1.9.0 to 1.9.1 in /packages/file_selector/file_selector_android/android (#7982) Bumps androidx.annotation:annotation from 1.9.0 to 1.9.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.9.0&new-version=1.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 5bf6ac248535c2d9e980b2e962382ad2874884e9 Author: David Iglesias Date: Fri Nov 15 12:13:10 2024 -0800 [web_benchmarks] Remove `WebRenderer` enum. (#8103) Removes the `WebRenderer` enum, and its uses in the `CompilationOptions` class. This is a breaking change because it's removing public API (`CompilationOptions.renderer`, `WebRenderer`), but in *practice* people shouldn't need any changes to their code (since the `CompilationOptions` class is used through named constructors). In any case, labeling as `v4.0.0`. Related: https://github.com/flutter/flutter/issues/145954 commit 7dd395e8fb0e04317897ee20f60c7ac1ea874722 Author: Kevin Moore Date: Fri Nov 15 10:26:25 2024 -0800 [google_maps_flutter] Fix detection of WebAssembly compatibility (#8102) commit 319fe77dd14a69be06b74bdb7efbad16b2df2b8b Author: engine-flutter-autoroll Date: Fri Nov 15 11:46:20 2024 -0500 Roll Flutter from ed553d10cf63 to 0e2d55e0e7b2 (40 revisions) (#8106) Roll Flutter from ed553d10cf63 to 0e2d55e0e7b2 (40 revisions) https://github.com/flutter/flutter/compare/ed553d10cf63...0e2d55e0e7b2 2024-11-15 engine-flutter-autoroll@skia.org Roll Packages from b9ac917daeb0 to b164be312ca2 (4 revisions) (flutter/flutter#158986) 2024-11-15 magder@google.com Label PRs with gradle and Android paths "platform-android" (flutter/flutter#158970) 2024-11-15 kustermann@google.com Fix code asset copying logic in native asset code (flutter/flutter#158984) 2024-11-15 kustermann@google.com Fix duplicate work in native assets release builds (flutter/flutter#158980) 2024-11-15 matanlurey@users.noreply.github.com Stop generate both `.kts` and non-`.kts` gradle files for a test project. (flutter/flutter#158965) 2024-11-15 matanlurey@users.noreply.github.com Further skip `native_assets_test`(s) that runs `flutter build apk`. (flutter/flutter#158966) 2024-11-15 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 4.2.1 to 4.2.2 (flutter/flutter#157473) 2024-11-15 matanlurey@users.noreply.github.com Try running historically flaky tests first to make `flutter build apk` health tests time out more often? (flutter/flutter#158967) 2024-11-15 bkonyi@google.com [ tool ] Don't throw StateError when DDS fails to start (flutter/flutter#158744) 2024-11-14 katelovett@google.com Create merge_queue.md (flutter/flutter#158959) 2024-11-14 fluttergithubbot@gmail.com Marks Mac_x64 hot_mode_dev_cycle_macos_target__benchmark to be flaky (flutter/flutter#158569) 2024-11-14 fluttergithubbot@gmail.com Marks Mac_arm64 mac_desktop_impeller to be unflaky (flutter/flutter#158564) 2024-11-14 gengesa@gmail.com [gen_l10n] When localizing a message, prefer placeholder definitions defined by the current locale rather than the template locale (flutter/flutter#153459) 2024-11-14 august.oberhauser@swissinfo.ch feat: Include web 1.x.x in plugin template (flutter/flutter#156947) 2024-11-14 andrewrkolos@gmail.com hide members where possible (flutter/flutter#158492) 2024-11-14 andrewrkolos@gmail.com Move platform-specific log-reading implementation details from `ResidentRunner`/`FlutterDevice` to `DeviceLogReader` implementations (flutter/flutter#156181) 2024-11-14 98221114+Neutrino2711@users.noreply.github.com Updated document to clarify Clip Behaviour (flutter/flutter#157719) 2024-11-14 bkonyi@google.com Enable --verbose for android_plugin_skip_unsupported_test tests (flutter/flutter#158933) 2024-11-14 engine-flutter-autoroll@skia.org Roll Packages from 26e123a6ce03 to b9ac917daeb0 (5 revisions) (flutter/flutter#158938) 2024-11-14 43054281+camsim99@users.noreply.github.com Add `dev_dependency` attribute to plugins in `.flutter-plugins-dependencies` (flutter/flutter#158009) 2024-11-14 matanlurey@users.noreply.github.com No longer pass `--verbose` to implicit `pub` calls when `flutter --verbose` is set. (flutter/flutter#158898) 2024-11-14 stuartmorgan@google.com Update triage flow chart for SVG packages (flutter/flutter#158670) 2024-11-14 bruno.leroux@gmail.com Add one MenuAnchor alignment test (flutter/flutter#158915) 2024-11-14 32538273+ValentinVignal@users.noreply.github.com Reland Add test for dynamic_content_color.0.dart (flutter/flutter#158547) 2024-11-14 engine-flutter-autoroll@skia.org Roll Flutter Engine from e97b148e796d to 619804c0fbb7 (1 revision) (flutter/flutter#158905) 2024-11-14 engine-flutter-autoroll@skia.org Roll Flutter Engine from 82940a9aa714 to e97b148e796d (1 revision) (flutter/flutter#158901) 2024-11-14 matanlurey@users.noreply.github.com Move explicit package dependencies to a feature flag (flutter/flutter#158016) 2024-11-14 matanlurey@users.noreply.github.com Try with `bringup: true` debugging why `flutter build apk` often times out. (flutter/flutter#158895) 2024-11-14 rexios@rexios.dev Add constraint options to `SearchAnchor` suggestions builder (flutter/flutter#148856) 2024-11-14 50643541+Mairramer@users.noreply.github.com Adjusts the Hindi TimeOfDayFormat to display in a LTR orientation in localizations. (flutter/flutter#157998) 2024-11-14 38378650+hgraceb@users.noreply.github.com Fix update order of SliverAppBar (flutter/flutter#158159) 2024-11-13 42980667+srivats22@users.noreply.github.com #154792 - CupertinoActionSheetAction cursor doesn't change to clickable on desktop (flutter/flutter#158470) 2024-11-13 58190796+MitchellGoodwin@users.noreply.github.com Adds a skip message for analyzer (flutter/flutter#158890) 2024-11-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Marks Mac_arm64_ios hot_mode_dev_cycle_ios__benchmark to be flaky (#158242)" (flutter/flutter#158891) 2024-11-13 737941+loic-sharma@users.noreply.github.com [SwiftPM] Move the logic for SwiftPM enablement to the platform project (flutter/flutter#158213) 2024-11-13 matanlurey@users.noreply.github.com Temporarily skip flutter build apk for native_assets tests. (flutter/flutter#158880) 2024-11-13 me@alestiago.com docs: include Human Interface haptic information in HapticFeedback (flutter/flutter#158587) 2024-11-13 engine-flutter-autoroll@skia.org Roll Flutter Engine from db3e5af2ca22 to 82940a9aa714 (2 revisions) (flutter/flutter#158799) 2024-11-13 matanlurey@users.noreply.github.com Stream the output of `flutter build` for debugging. (flutter/flutter#158757) 2024-11-13 nate.w5687@gmail.com "Fix failing checks" wiki page for new contributors (flutter/flutter#154629) 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 Please CC dit@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. ... commit b164be312ca2e45ea332e38dd278ac84abe7658f Author: Jenn Magder Date: Thu Nov 14 15:52:19 2024 -0800 Remove packages/platform from dependabot config (#8099) Package was removed in https://github.com/flutter/packages/pull/6898. However the path was still being passed to dependabot, which made it mad: ``` ERROR Error during file fetching; aborting: No files found in /packages/platform/example/android/app ``` https://github.com/flutter/packages/actions/runs/11845225387/job/33010210199 I don't understand why this only started failing on https://github.com/flutter/packages/pull/8044 and not when the package was removed (since it moved that path from one place to another https://github.com/flutter/packages/pull/8036/files#diff-dd4fbda47e51f1e35defb9275a9cd9c212ecde0b870cba89ddaaae65c5f3cd28L571) commit 24752909e58c7be4a49c195d98a784ce10189ad9 Author: Jenn Magder Date: Thu Nov 14 12:45:26 2024 -0800 Ignore dependabot minor and patch updates of Kotlin mocking library (#8056) The dependabot version bumps are set up to ignore minor and patch "testing" dependencies bumps. Add Kotlin mocking library [io.mockk:mockk:](https://mockk.io/) to that list. Example where the patch was bumped https://github.com/flutter/packages/pull/7866 This isn't particularly a noisy dependency, but I noticed it when working on https://github.com/flutter/packages/pull/8048. Also delete `/packages/image_picker/image_picker/android` since that path doesn't exist. commit 4e1942e04937cfa13d2c53045acadc0f59f924ee Author: Paul Berry Date: Thu Nov 14 12:23:36 2024 -0800 [google_identity_services_web] Set nonce properly in loadWebSdk(). (#8069) This PR adds logic to `google_identity_services_web/lib/src/js_loader.dart` to cause the `nonce` property to be property set when creating new script elements. commit 4d0673ceaf6a202d24d5a0f107921e27037f6396 Author: engine-flutter-autoroll Date: Thu Nov 14 13:20:53 2024 -0500 Roll Flutter (stable) from 603104015dd6 to dec2ee5c1f98 (4 revisions) (#8084) https://github.com/flutter/flutter/compare/603104015dd6...dec2ee5c1f98 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-stable-packages Please CC dit@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter (stable): https://github.com/flutter/flutter/issues/new/choose To file a bug in Packages: 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 commit b9ac917daeb0fbf5bd6ad4a7d2a69ab81749d767 Author: LouiseHsu Date: Wed Nov 13 13:51:05 2024 -0800 [in_app_purchase_storekit] Fixes manual invocation of `finishTransaction()` triggering fatal crash (#8071) Fixes https://github.com/flutter/flutter/issues/154763 From the Apple docs: https://developer.apple.com/documentation/storekit/skpaymentqueue/1506003-finishtransaction `If you call finishTransaction(_:) on a transaction that is in the [SKPaymentTransactionState.purchasing](https://developer.apple.com/documentation/storekit/skpaymenttransactionstate/purchasing) state, StoreKit raises an exception.` For some reason even though the old Obj-C implementation didn't have this check, it didn't crash. This adds an explicit check for the purchasing state. commit d6f5e1b7c17f3961dad5d5a97bc7fb0cffc4c3a3 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Nov 13 21:43:07 2024 +0000 [webview]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.1 in /packages/webview_flutter/webview_flutter_android/android (#7988) Bumps androidx.annotation:annotation from 1.8.2 to 1.9.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.8.2&new-version=1.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 3af3b9e773e5445aeb4b334cf0a26a4037ed96a2 Author: LouiseHsu Date: Wed Nov 13 11:24:51 2024 -0800 [in_app_purchase_storekit] Remove unneeded platform annotations (#7914) Fixes https://github.com/flutter/flutter/issues/155213 commit d1992a442e53815db40e952328e0b9c63b9f85a8 Author: stuartmorgan Date: Wed Nov 13 14:21:21 2024 -0500 [tool] Improve Swift lint error message (#8074) If the Swift linter finds issues, log a message that communicates that rather than sounding like the linter failed to run. commit d345826a1919938bf355f10aea0a04eaa78cfef1 Author: engine-flutter-autoroll Date: Wed Nov 13 14:03:12 2024 -0500 Roll Flutter from c8510f29ccc2 to ed553d10cf63 (48 revisions) (#8076) Roll Flutter from c8510f29ccc2 to ed553d10cf63 (48 revisions) https://github.com/flutter/flutter/compare/c8510f29ccc2...ed553d10cf63 2024-11-13 matanlurey@users.noreply.github.com Avoid using platform `ProcessInfo.maxRss` in test. (flutter/flutter#158526) 2024-11-13 engine-flutter-autoroll@skia.org Roll Packages from 72356fda4684 to 26e123a6ce03 (19 revisions) (flutter/flutter#158626) 2024-11-13 matanlurey@users.noreply.github.com Move `dart pub deps` call to `.deps` and use it accordingly (flutter/flutter#158524) 2024-11-13 engine-flutter-autoroll@skia.org Roll Flutter Engine from 05c14d8b4cd7 to db3e5af2ca22 (1 revision) (flutter/flutter#158553) 2024-11-13 engine-flutter-autoroll@skia.org Roll Flutter Engine from ef760d6e1f13 to 05c14d8b4cd7 (3 revisions) (flutter/flutter#158551) 2024-11-13 engine-flutter-autoroll@skia.org Roll Flutter Engine from 08348c9eebcc to ef760d6e1f13 (1 revision) (flutter/flutter#158545) 2024-11-13 fluttergithubbot@gmail.com Marks Mac_arm64_ios hot_mode_dev_cycle_ios__benchmark to be flaky (flutter/flutter#158242) 2024-11-13 engine-flutter-autoroll@skia.org Roll Flutter Engine from 877abb9ad6ff to 08348c9eebcc (8 revisions) (flutter/flutter#158541) 2024-11-13 matanlurey@users.noreply.github.com Allow `devDependencies` to be omitted and not cause a tool crash. (flutter/flutter#158518) 2024-11-13 matanlurey@users.noreply.github.com Explain how to use `flutter channel`. (flutter/flutter#158533) 2024-11-13 magder@google.com Clean up dependabot config, add github-action group (flutter/flutter#158408) 2024-11-12 reidbaker@google.com Update test to include more complete instructions for how to run tests locally, add example to andoid 11 tests as well (flutter/flutter#158528) 2024-11-12 christopherfujino@gmail.com force Linux plugin_test to run on Ubuntu 20.04 (flutter/flutter#158529) 2024-11-12 jhy03261997@gmail.com Support materialTapTargetSize in PopupMenuButton (flutter/flutter#158357) 2024-11-12 737941+loic-sharma@users.noreply.github.com [SwiftPM] Update .flutter-plugin-dependencies format (flutter/flutter#158138) 2024-11-12 andrewrkolos@gmail.com add filesystem error handling to `systemTempDirectory` (flutter/flutter#158481) 2024-11-12 jiten.pateljp2001@gmail.com Made Cupertino dialog more like a native dialog in dark mode (flutter/flutter#157218) 2024-11-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from b0a4ca92c49e to 877abb9ad6ff (2 revisions) (flutter/flutter#158506) 2024-11-12 tessertaha@gmail.com Fix `NavigationBar` label style customization on the widget level (flutter/flutter#158510) 2024-11-12 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Add test for `dynamic_content_color.0.dart` (#158309)" (flutter/flutter#158511) 2024-11-12 32538273+ValentinVignal@users.noreply.github.com Add test for `dynamic_content_color.0.dart` (flutter/flutter#158309) 2024-11-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from a672f971c659 to b0a4ca92c49e (2 revisions) (flutter/flutter#158488) 2024-11-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 35041f118744 to a672f971c659 (1 revision) (flutter/flutter#158487) 2024-11-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7b3eacd20eb6 to 35041f118744 (9 revisions) (flutter/flutter#158485) 2024-11-11 737941+loic-sharma@users.noreply.github.com [SwiftPM] Simplify logic that determines if CocoaPods is used (flutter/flutter#158409) 2024-11-11 tessertaha@gmail.com Fix Chip draws `InkWell.hoverColor` is drawn on top of the provided background color with `hovered` state (flutter/flutter#158454) 2024-11-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3cb6f4de89b6 to 7b3eacd20eb6 (1 revision) (flutter/flutter#158464) 2024-11-11 engine-flutter-autoroll@skia.org Roll Packages from bb5a25815cae to 72356fda4684 (8 revisions) (flutter/flutter#158378) 2024-11-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from e9a44820f302 to 3cb6f4de89b6 (3 revisions) (flutter/flutter#158456) 2024-11-11 bkonyi@google.com Replace custom `RPCErrorCodes` with `RPCErrorKind` from `package:vm_service` (flutter/flutter#158379) 2024-11-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from d90e9f4718b8 to e9a44820f302 (1 revision) (flutter/flutter#158453) 2024-11-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 01c76e42c20f to d90e9f4718b8 (1 revision) (flutter/flutter#158443) 2024-11-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9b4c3b3d5518 to 01c76e42c20f (3 revisions) (flutter/flutter#158438) 2024-11-11 proddam@gmail.com Remove block and line comments when detecting '.flutter-plugins' in settings.gradle(.kts) (flutter/flutter#155488) 2024-11-11 nate.w5687@gmail.com Add `SafeArea` DartPad sample (flutter/flutter#158019) 2024-11-10 fluttergithubbot@gmail.com Marks Linux analyzer_benchmark to be flaky (flutter/flutter#158244) 2024-11-10 andrewrkolos@gmail.com remove `bringup` status for recently re-subsharded targets (flutter/flutter#158217) 2024-11-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 690cdfd09beb to 9b4c3b3d5518 (1 revision) (flutter/flutter#158418) 2024-11-09 fluttergithubbot@gmail.com Marks Mac_benchmark complex_layout_scroll_perf_macos__timeline_summary to be flaky (flutter/flutter#158252) 2024-11-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from ca6f5110d9d3 to 690cdfd09beb (1 revision) (flutter/flutter#158414) 2024-11-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 2f097cfd3d2d to ca6f5110d9d3 (3 revisions) (flutter/flutter#158411) 2024-11-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 54df0b8a4784 to 2f097cfd3d2d (1 revision) (flutter/flutter#158407) 2024-11-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from b7134d373ef8 to 54df0b8a4784 (2 revisions) (flutter/flutter#158405) 2024-11-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6b77347edfc5 to b7134d373ef8 (3 revisions) (flutter/flutter#158402) 2024-11-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1b567e80386e to 6b77347edfc5 (4 revisions) (flutter/flutter#158398) 2024-11-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from a08bd5a07c2a to 1b567e80386e (1 revision) (flutter/flutter#158393) ... commit 26e123a6ce039da6b75fe4248e93c8aeeb6d395b Author: Danang Rahmatullah Date: Wed Nov 13 16:12:06 2024 +0100 [camera_windows] Set device media type for video preview explicitly (#7447) Fixes preview aspect ratio on Windows on some webcams (See https://github.com/flutter/flutter/issues/122966). Before (main branch 7c1a05c8b12274e940e39adcb42896a32f57df32): ![image](https://github.com/user-attachments/assets/cca93da9-dd94-486e-930f-5c5aa73922a9) After: ![image](https://github.com/user-attachments/assets/05c5c460-21ed-40d8-93eb-1e75da7c929c) commit 67d8b50c1796eefa948a1367c1184b0e71753e44 Author: Thang Vu <39979207+ThangVuNguyenViet@users.noreply.github.com> Date: Wed Nov 13 07:27:24 2024 +0700 [go_router] Add support for relative routes (#6825) Add supports for relative routes by allowing going to a path relatively, like go('./$path') This PR doesn't fully resolve any issue, but it's mandatory to further add examples & tests for `TypedRelativeGoRoute` (see [#7174](https://github.com/flutter/packages/pull/6823)), which will resolves [#108177](https://github.com/flutter/flutter/issues/108177) commit e547e7af63ef4bc593d6419156e46be2c36b22c2 Author: Phil Quitslund Date: Tue Nov 12 16:01:30 2024 -0800 [vector_graphics_compiler] fix a renamed method parameter lint (#8070) An upcoming fix to `avoid_renaming_method_parameters` will flag this rename. (I updated the base class since that seems more correct.) For references, here's the fix in flight: https://dart-review.googlesource.com/c/sdk/+/394662 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [x] I signed the [CLA]. - [ ] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [ ] I [linked to at least one issue that this PR fixes] in the description above. - [ ] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [ ] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests commit c77ab99ab8385690f31e72b6a66f01f9c75dd60e Author: Michel Feinstein Date: Wed Nov 13 08:50:09 2024 +1100 [in_app_purchase] Add expiration date to Transaction (#8030) Closes https://github.com/flutter/flutter/issues/158226 Exposes the Transaction's expiration date, so this information can be used on the dart side. commit 1d142513086793bc35487dfc459590cc663be8f7 Author: stuartmorgan Date: Tue Nov 12 16:08:22 2024 -0500 [various] Clean up contributing guides (#8032) Several packages had documentation about how to use Pigeon or Mockito generation; this made sense when those were rare, but they are both now extremely common in our packages. Instead, https://github.com/flutter/flutter/pull/158326 adds this information to the general documentation for contribuing to flutter/packages, so it no longer needs to be in (a random subset of) specific packages. This also removes Contributing sections from several READMEs, as READMEs should be client-focused rather than developer-focused, and puts content in CONTRIBUTING.md where needed. commit 4a7b3853225f43d0c0a864748e0441638d967f63 Author: David Iglesias Date: Tue Nov 12 11:21:21 2024 -0800 [ci] Remove web renderer option from tools. (#8055) Removes the `--web-renderer` option from the "drive examples" and "dart test" commands. Fixes https://github.com/flutter/flutter/issues/151869 commit 53c1ff2b2aa48d20b6888dfdcbe1250510fc4b32 Author: stuartmorgan Date: Tue Nov 12 14:21:19 2024 -0500 [url_launcher] Update Pigeon version for Linux (#8065) Updates to the latest version of Pigeon, picking up the change to make the declarations of some classes public rather than in the implementation file. Fixes https://github.com/flutter/flutter/issues/153083 commit 9c294efb9eb4646336f18696ab2c1f3fe13c7bba Author: Tobias Löfstrand Date: Tue Nov 12 18:18:08 2024 +0100 [go_router] Add support for preloading branches of StatefulShellRoute (revised solution) (#6467) Adds support for preloading branches in a `StatefulShellRoute`. This functionality was initially part of an early implementation of flutter/packages#2650, however it was decided to implement this in a separate PR. The current implementation is a rewrite of the original implementation to better fit the final version of `StatefulShellRoute` (and go_router in general). **NOTE**: this is a revised version of the initial solution (see flutter/packages#4251), containing a substantially simpler implementation made possible thanks to recent refactoring in go_router. This fixes issue flutter/flutter#127804. commit 5e90ce258e33a8e9335a1eda7685eb81ee385529 Author: stuartmorgan Date: Mon Nov 11 19:50:02 2024 -0500 [pigeon] Make Linux type declarations public (#8040) Moves codec and HostAPI class declarations to the header to work around a glib bug. We could instead add an unnecessary call to the type check method, but we will need the codec to be public eventually anyway, and HostApi is conceptually a public class (it just isn't strictly necessary to declare it in the header due to the way abstract interfaces work in gobject) so may as well be declared publicly. Part of https://github.com/flutter/flutter/issues/153083 commit 366310328b97956c52b22563715e76ff4399652e Author: engine-flutter-autoroll Date: Mon Nov 11 17:46:31 2024 -0500 Roll Flutter from 73546b3b71a7 to c8510f29ccc2 (30 revisions) (#8042) https://github.com/flutter/flutter/compare/73546b3b71a7...c8510f29ccc2 2024-11-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from 44d788f4651b to a08bd5a07c2a (3 revisions) (flutter/flutter#158375) 2024-11-08 tessertaha@gmail.com Add ability to override `NavigationDestination.label` padding for `NavigationBar` (flutter/flutter#158260) 2024-11-08 stuartmorgan@google.com Add flutter/package code generation instructions (flutter/flutter#158326) 2024-11-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from 8e19915c19fc to 44d788f4651b (3 revisions) (flutter/flutter#158362) 2024-11-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from bcb281cde579 to 8e19915c19fc (4 revisions) (flutter/flutter#158354) 2024-11-07 rmolivares@renzo-olivares.dev Make `_SelectableRegionSelectionContainerDelegate` public (flutter/flutter#147080) 2024-11-07 jason-simmons@users.noreply.github.com Manual roll Flutter Engine from 371c86fb6b49 to bcb281cde579 (flutter/flutter#158346) 2024-11-07 katelovett@google.com Add clarification on review timelines in PR template (flutter/flutter#158345) 2024-11-07 bkonyi@google.com Increase Java heap limit to 8GB for plugin integration tests using deferred components (flutter/flutter#158330) 2024-11-07 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#158337) 2024-11-07 engine-flutter-autoroll@skia.org Roll Flutter Engine from ac50b20ae5c9 to 371c86fb6b49 (5 revisions) (flutter/flutter#158336) 2024-11-07 matanlurey@users.noreply.github.com Fix a breakage caused by the test being unskipped. (flutter/flutter#158335) 2024-11-07 engine-flutter-autoroll@skia.org Roll Flutter Engine from 8a963cfc134c to ac50b20ae5c9 (1 revision) (flutter/flutter#158308) 2024-11-07 matanlurey@users.noreply.github.com `Plugin.isDevDependency` if exclusively in `dev_dependencies` (flutter/flutter#157462) 2024-11-07 stuartmorgan@google.com Add recently imported packages to issue template (flutter/flutter#158324) 2024-11-07 engine-flutter-autoroll@skia.org Roll Flutter Engine from 076688d95818 to 8a963cfc134c (1 revision) (flutter/flutter#158304) 2024-11-07 engine-flutter-autoroll@skia.org Roll Flutter Engine from 94dac953a95f to 076688d95818 (2 revisions) (flutter/flutter#158303) 2024-11-07 polinach@google.com Make leak tracking bots blocking. (flutter/flutter#157866) 2024-11-07 engine-flutter-autoroll@skia.org Roll Flutter Engine from b36ca3319825 to 94dac953a95f (1 revision) (flutter/flutter#158297) 2024-11-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from 58ac1dadd69d to b36ca3319825 (9 revisions) (flutter/flutter#158295) 2024-11-06 5593189+p-salmon@users.noreply.github.com Added cusor control properties to CupertinoSearchTextField and tests (flutter/flutter#158240) 2024-11-06 bkonyi@google.com Fix flakiness in hot_reload_test.dart (flutter/flutter#158271) 2024-11-06 34871572+gmackall@users.noreply.github.com Fix use of deprecated `buildDir` in Android templates/tests/examples (flutter/flutter#157560) 2024-11-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from f03f11300a9d to 58ac1dadd69d (5 revisions) (flutter/flutter#158283) 2024-11-06 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#158281) 2024-11-06 magder@google.com Delete firebase_android_embedding_v2_smoke_test (flutter/flutter#158223) 2024-11-06 yjbanov@google.com [web] fix --ab option for web benchmarks (flutter/flutter#154574) 2024-11-06 47866232+chunhtai@users.noreply.github.com excluding website-cms from critical pr triage (flutter/flutter#158220) 2024-11-06 32538273+ValentinVignal@users.noreply.github.com Add test for `image.frame_builder.0.dart` (flutter/flutter#158247) 2024-11-06 engine-flutter-autoroll@skia.org Roll Packages from 721943194945 to bb5a25815cae (6 revisions) (flutter/flutter#158267) 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 Please CC camillesimon@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 3a9226ab2ff89afc9129262b0d5161f2733f1694 Author: Jenn Magder Date: Mon Nov 11 12:04:50 2024 -0800 Use dependabot multi-directory configuration for Android package updates (#8048) Follow up to https://github.com/flutter/packages/pull/8036#issuecomment-2465781953. [Multi-directory config](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#directories) allows duplicated dependabot configs can be removed in favor of one that specifies multiple directories. Update Android packages so the same gradle dependencies can be updated all at once across packages. > The directories option in the dependabot.yml file allows you to apply Dependabot updates to multiple directories at the same time. It's unclear whether this is a good idea. > I'm a bit skeptical that grouping all the non-example ones together will be easier in practice, since usually some plugins are fine and some need changes, but I know the current system has some issues too. https://github.com/flutter/packages/pull/8036#pullrequestreview-2424660637 The consensus seems to be we should try it, and revert or adjust if it makes the current system worse. Part of https://github.com/flutter/flutter/issues/148098 commit df0f42318422a94e8e09a5bc26fa5aeae82b45f6 Author: stuartmorgan Date: Mon Nov 11 14:55:30 2024 -0500 [tools] Run `pub get` before `format` (#8052) The new Dart formatter needs to know the Dart language version of the code it is formatting, and it reads that from a file in `.dart_tool`, not `pubspec.yaml` directly. To avoid it failing to determine the version and assuming the latest (which will almost always be wrong in this repo): - Adds a step to the `format` repo command to ensure that `pub get` appears to have been run, and runs it if not, and - To avoid `pub get` running in `format` in CI, adds a deps-fetching step to the `repo_checks` task, as we have in other tasks that need to `pub get`. This should unblock the roll. commit d681e4e404e8a1099d825c4e099f096d5bcad616 Author: stuartmorgan Date: Mon Nov 11 12:42:59 2024 -0500 [file_selector] Fix Linux cancel regression (#8051) Fixes a regression introduced during the Pigeon conversion where canceling a dialog would fail assertions due to accidentally returning a null list instead of an empty list. Fixes https://github.com/flutter/flutter/issues/158430 commit a9b71408355210efdc1549db82c472db6a8430fe Author: stuartmorgan Date: Fri Nov 8 22:39:24 2024 -0500 [shared_preferences] Fix confusing language in README (#8049) One use of "class" instead of "plugin" to refer to the `SharedPreferences` class specifically slipped through review. This updates it to make it clear that it's talking about a specific class, not the plugin. Also updates the `setPrefix:` doc comment to clarify that it only applies to that class, now that the addition of other classes to the API surface has made that ambiguous. Fixes https://github.com/flutter/flutter/issues/158404 commit 2eedd7d7916da4a9a66cf8dfa0c30ef54002f559 Author: Jenn Magder Date: Fri Nov 8 15:20:28 2024 -0800 Use dependabot multi-directory configuration for Android example gradle updates (#8036) [Multi-directory config](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#configuration-options-for-the-dependabotyml-file) allows duplicated dependabot configs can be removed in favor of one that specifies multiple directories. Update the Android example apps so they can be updated all at once. Also updated the dependabot CI command to look for either `directory` or `directories` key. Part of https://github.com/flutter/flutter/issues/148098 commit a3ea39db04eef2f6a713635ede0889060ab93ed5 Author: Camille Simon <43054281+camsim99@users.noreply.github.com> Date: Fri Nov 8 13:53:19 2024 -0800 [animations] Remove `.flutter-plugins` reference from example app (#8002) Removes `.flutter-plugins` reference from example by (1) deleting the `packages/animations/example/android` directory, (2) running (in the `packages/animations` directory) ``` flutter create example --platforms android -a kotlin --org "dev.flutter.packages.animations" ``` and then (3) manually made the following changes: - Added back `packages/animations/example/android/.pluginToolsConfig.yaml` (removed by command) - Updated the Gradle version from 8.7 to 8.3 (downgraded by command) - Deleted `example/analysis_options.yaml` (added by command) - Deleted `example/test/` (added by command) - Added back artifact hub - Removed template TODOs - Bumped Kotlin Gradle version to 1.9.0 - Bumped AGP version from 8.1.0 to 8.5.1. Part of https://github.com/flutter/flutter/issues/157660. commit 036d1bd67621d46a481ac24924d447a385fb23b5 Author: Jenn Magder Date: Fri Nov 8 11:51:22 2024 -0800 Group dependabot github-action update PRs, delete dead docker updates (#8044) Dependabot now supports [grouping dependencies](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups) into one PR instead of one per dependency. Group github-action updates into one PR. Make github-actions update weekly instead of daily. Remove docker since it was removed in #4822 This means a PR like https://github.com/flutter/packages/pull/7813 will instead be grouped into one. Here's an example of what that will look like: https://github.com/kubernetes-sigs/cluster-api/pull/11347 __________ Screenshot 2024-11-08 at 11 08 52 AM __________ https://github.com/kubernetes-sigs/cluster-api/blob/e13abeaed2bd3d7b04abd9c9823e2f4185fa6599/.github/dependabot.yaml#L10-L12 I also updated the reviewers to stop the "One or more of the users or teams you specified is not a collaborator" [error](https://github.com/flutter/packages/pull/7813#issuecomment-2399244249). Part of https://github.com/flutter/flutter/issues/148098 commit dcbac07b6ef487564b9c49a3ae90358f6e1b4fd2 Author: Enguerrand ARMINJON <37028599+EArminjon@users.noreply.github.com> Date: Fri Nov 8 19:34:08 2024 +0100 [vector_graphics_compiler] fix-null-exception (#8006) The following SVG throw an exception (when using flutter_svg) : https://sweden.a.bigcontent.io/v1/static/10000199. This SVG contain an empty tag : which lead to the issue. This PR check if path is null to avoid the issue. PR from https://github.com/dnfield/vector_graphics/pull/254 commit 94d13ae41bff2b15dc50baa7622f4f7916bfb470 Author: stuartmorgan Date: Fri Nov 8 13:31:14 2024 -0500 [tools] Format Dart per-package (#8043) Instead of running Dart formatting on the whole repo at once, run it per package, from the package's directory. This is slower, but necessary since the new formatter behaves differently depending on the package's min SDK version. commit 72356fda4684035d1a015f1ba16bc2f37d954d1e Author: stuartmorgan Date: Thu Nov 7 20:03:21 2024 -0500 [various] Update example app minSdkVersions (#8035) Updates all examples apps that haven't yet switch to using `flutter.minSdkVersion` as their value to use that instead of a hard-coded version, as none currently need a version higher than Flutter stable's min version. commit 6d6cc9a9345578844b2066cd3a067aeebb3fbe9c Author: Valentin Vignal <32538273+ValentinVignal@users.noreply.github.com> Date: Fri Nov 8 07:23:07 2024 +0800 [go_router] Activate leak testing (#7546) commit 01050136b26c5d60058b412b60b73cee4949d4ab Author: LouiseHsu Date: Thu Nov 7 12:37:18 2024 -0800 [in_app_purchase_storekit] Add restore purchases and receipts (#7964) Add ability to restore purchases using StoreKit 2 apis. commit 31859c029f5a0c9f7202621d7996a6dad939de3c Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Thu Nov 7 13:32:56 2024 -0700 [interactive_media_ads] Adds remaining methods for internal wrapper of the Android native `BaseManager` (#7943) commit 4b2132f394c6002e3533970d164dc58222e8a330 Author: Srujan Gaddam <58529443+srujzs@users.noreply.github.com> Date: Thu Nov 7 09:40:41 2024 -0800 [google_sign_in/google_identity_services] Clear-up documentation of callbacks in various APIs and uses of those APIs (#8029) These APIs used to accept allowInterop'd callbacks. When the implementation was migrated to use dart:js_interop, they were wrapped with toJS. However, starting in 3.5, to be consistent with dart2wasm, double-wrapping a function is an error. The documentation should be clear that it accepts only Dart functions and uses should be cleaned up to not use allowInterop and type the callbacks' parameter and return value correctly. commit da51281bbc3e1d22777246c029ab7c9ce58ea3bb Author: Alexandru Mariuti Date: Thu Nov 7 13:34:29 2024 +0100 [flutter_svg] wasm compatibility (#8014) Make `flutter_svg` wasm compatible commit f0b38adff180d00114f93a816be3dce913f6094a Author: jesswrd Date: Wed Nov 6 11:34:29 2024 -0800 Applied Gradle Plugins Declaratively for Multiple Plugin Example Apps (Part 2) (#8019) Updated applying gradle plugins from usage of imperative apply to usage of declarative blocks {} apply for 7 plugins. Intending on updating all android example apps under packages. The first migration was completed in this PR [here](https://github.com/flutter/packages/pull/7968) Previously migrated applying `path_provider` plugin example app from imperatively to declaratively in this PR [here](https://github.com/flutter/packages/pull/7822). Tests for changes in the linked PR above. More information on Flutter Gradle Pluggin Apply [here](https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply) Partially addresses [#152656](https://github.com/flutter/flutter/issues/152656) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [x] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests commit 1636da72a68c9dd27dfce855c82084e56dede5ae Author: engine-flutter-autoroll Date: Wed Nov 6 12:43:24 2024 -0500 Roll Flutter from 29d40f7f6826 to 73546b3b71a7 (20 revisions) (#8028) https://github.com/flutter/flutter/compare/29d40f7f6826...73546b3b71a7 2024-11-06 32538273+ValentinVignal@users.noreply.github.com Add test for `image.loading_builder.0.dart` (flutter/flutter#158248) 2024-11-06 kustermann@google.com Make flutter_tools use newest package:{native_assets_builder,native_assets_cli,native_toolchain_c} (flutter/flutter#158214) 2024-11-06 bruno.leroux@gmail.com Fix RawScrollbar examples and desktop test (flutter/flutter#158237) 2024-11-06 bruno.leroux@gmail.com Cleanup MenuAnchor and Improve DropdownMenu tests readability (flutter/flutter#158175) 2024-11-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from a3741d6248b7 to f03f11300a9d (2 revisions) (flutter/flutter#158222) 2024-11-06 louisehsu@google.com Update error message for Cocoapods support for synchronized groups/folders (flutter/flutter#158206) 2024-11-06 matanlurey@users.noreply.github.com Restore skipped iOS test by looping over `FakeAsync` elapse. (flutter/flutter#158204) 2024-11-06 41366638+kirya355@users.noreply.github.com fix: ensure draggable_scrollable_sheet respects shouldCloseOnMinExten… (flutter/flutter#156338) 2024-11-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from e5e06c97c33c to a3741d6248b7 (14 revisions) (flutter/flutter#158218) 2024-11-06 matanlurey@users.noreply.github.com Forward fix `CupertinoDynamicColor` by adding `toARGB32()`. (flutter/flutter#158145) 2024-11-05 matanlurey@users.noreply.github.com Remove unused `enableObservatory` flag. (flutter/flutter#158202) 2024-11-05 matanlurey@users.noreply.github.com Remove observatory related TODO that is already fixed. (flutter/flutter#158205) 2024-11-05 nate.w5687@gmail.com Factor out "shaker" class (flutter/flutter#157748) 2024-11-05 fluttergithubbot@gmail.com Marks Mac_benchmark animated_complex_opacity_perf_macos__e2e_summary to be flaky (flutter/flutter#157424) 2024-11-05 andrewrkolos@gmail.com Increase subsharding for `Linux tool_integration_tests` (flutter/flutter#158196) 2024-11-05 32538273+ValentinVignal@users.noreply.github.com Add test for `raw_scrollbar.2.dart` (flutter/flutter#158161) 2024-11-05 andrewrkolos@gmail.com use root directory as the default for rootOverride in Cache.test constructor (flutter/flutter#158201) 2024-11-05 magder@google.com Kill interactive script job `xcdevice observe` processes on tool/daemon shutdown (flutter/flutter#157646) 2024-11-05 34465683+rkishan516@users.noreply.github.com Fix: Gap between prefix and suffix icon and input field in input deco… (flutter/flutter#152069) 2024-11-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from f56401062e42 to e5e06c97c33c (1 revision) (flutter/flutter#158194) 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 Please CC camillesimon@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit bb5a25815cae4125f2a5903a2b376db58cff2e66 Author: Jenn Magder Date: Tue Nov 5 22:58:26 2024 -0800 [ci] Upload screenshots, logs, and Xcode test results for drive and integration_test runs (#7430) 1. Native Xcode tests will output a helpful "xcresult" package on failure containing logs, screenshots, and screen recordings. Zip and upload these results when tests fail. 2. Pass `flutter test --debug-logs-dir` flag to upload logs like https://github.com/flutter/flutter/pull/142643. 3. Pass `flutter drive --screenshot` flag to upload screenshots on timeout like https://github.com/flutter/flutter/pull/96973. Example of [failing Xcode analyzer build](https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20ios_platform_tests_shard_5%20master/17374/overview) has the [zipped xcresult](https://storage.googleapis.com/flutter_logs/flutter/ff98c32e-18ca-4ad4-a910-9db1d7f7e4b0/xcode%20analyze/ff98c32e-18ca-4ad4-a910-9db1d7f7e4b0/xcodebuild-2024-10-25T09:56:46.440913.zip) attached as a log. ![Screenshot 2024-10-25 at 10 10 36 AM](https://github.com/user-attachments/assets/dd7ae9bc-6161-4381-8a4f-f10b8c981801) The unzipped xcresult looks like this in Xcode: ![Screenshot 2024-10-25 at 10 11 55 AM](https://github.com/user-attachments/assets/d4dd8420-f272-459c-9785-ab0c03887a74) A [failing "native test" step build](https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20macos_platform_tests%20master%20-%20packages/17315/overview): ![Screenshot 2024-10-25 at 10 19 55 AM](https://github.com/user-attachments/assets/76a86a15-2150-482a-8b15-e3e7ac90485e) Fixes https://github.com/flutter/flutter/issues/144795 commit d3d563de5a2689abc06854bc093532d3833448e2 Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Tue Nov 5 13:33:54 2024 -0800 Remove use_modular_headers! from Podfiles (#7796) ⚠️ _This PR does not update packages' versions as it only affects unpublished parts of example apps and tests._ We added `use_modular_headers!` to our `Podfile`s as we originally planned to phase out `use_frameworks!` (see https://github.com/flutter/flutter/pull/42204). However, our plans have now changed and we are instead phasing out CocoaPods entirely in favor of Swift Package Manager. CocoaPods's `use_frameworks!` and `use_modular_headers!` are two different overlapping options that should not be used together. This change removes the `use_modular_headers!` from example apps' `Podfile`s. This change does not affect packages themselves. Part of https://github.com/flutter/flutter/issues/156259 commit 719bd8434b50008e263505317c6b661d3bcaf422 Author: misos1 <30872003+misos1@users.noreply.github.com> Date: Tue Nov 5 21:54:14 2024 +0100 [camera_avfoundation] enable more than 30 fps (#7394) Camera plugin was crashing when I tried to set fps to 60 on most media presets (except maybe on 1280x720, although tested device supports 60 fps for up to 1920x1440 and can do 240 fps on 1280x720) because when is `activeVideoMinFrameDuration` and `activeVideoMaxFrameDuration` set to fps outside of what active format supports it throws exception. Now it tries to find a format which supports fps closest to wanted fps and clamps it if it cannot be set to exact value to prevent crashes. It searches for formats with the exact same resolution. For example in format list it can be like "1920x1080 { 3- 30 fps}", "1920x1080 { 3- 60 fps}" and "1920x1080 { 6-120 fps}, but when setting `sessionPreset` then "1920x1080 { 3- 30 fps}" is selected by default. On the tested device there are 2 "media subtypes" `420f` and `420v` for each format where the first is denoted as "supports wide color" in debug description and the system has tendency to choose this one. So it tries to preserve the media subtype to what is preferred by the system and this is also added to `highestResolutionFormatForCaptureDevice` (with lower priority than max resolution/fps). Also there was nested `lockForConfiguration` and `unlockForConfiguration` when using `ResolutionPreset.max` together with setting up fps. commit 5d419d101a55757d06d5bf0999f5dfe8f450d714 Author: engine-flutter-autoroll Date: Tue Nov 5 14:25:32 2024 -0500 Roll Flutter from 8591d0c16a6c to 29d40f7f6826 (25 revisions) (#8027) https://github.com/flutter/flutter/compare/8591d0c16a6c...29d40f7f6826 2024-11-05 andrewrkolos@gmail.com increase subsharding for `Windows build_tests` from 8 to 9 (flutter/flutter#158146) 2024-11-05 polinach@google.com Reland2: Revert "Revert "Add a warning/additional handlers for parsing`synthetic-package`."" (flutter/flutter#158184) 2024-11-05 polinach@google.com Reland1: "Revert "Add and plumb `useImplicitPubspecResolution` across `flutter_tools`."" (flutter/flutter#158126) 2024-11-05 engine-flutter-autoroll@skia.org Roll Packages from 796afa35071d to 721943194945 (11 revisions) (flutter/flutter#158179) 2024-11-05 kustermann@google.com Make native asset integration test more robust, thereby allowing smooth auto-update of packages via `flutter update-packages` (flutter/flutter#158170) 2024-11-05 mohellebiabdessalem@gmail.com Readability change to `flutter.groovy`, align on null assignment, reduce unused scope for some methods, apply static where possible (flutter/flutter#157471) 2024-11-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7207a8fbec93 to f56401062e42 (1 revision) (flutter/flutter#158169) 2024-11-05 32538273+ValentinVignal@users.noreply.github.com Add test for `raw_scrollbar.shape.0.dart` (flutter/flutter#158094) 2024-11-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 418609dd5b58 to 7207a8fbec93 (1 revision) (flutter/flutter#158156) 2024-11-05 bruno.leroux@gmail.com Refactor DropdownMenu tests (flutter/flutter#157913) 2024-11-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6271a92a376f to 418609dd5b58 (3 revisions) (flutter/flutter#158152) 2024-11-05 fluttergithubbot@gmail.com Marks Linux_pixel_7pro flavors_test to be flaky (flutter/flutter#156956) 2024-11-05 matanlurey@users.noreply.github.com Further remove web-only considerations that are no longer necessary (flutter/flutter#158143) 2024-11-05 polinach@google.com Add optional parameter to FlutterTesterDevices. (flutter/flutter#158133) 2024-11-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 75acceedca41 to 6271a92a376f (2 revisions) (flutter/flutter#158148) 2024-11-05 matanlurey@users.noreply.github.com Extract and restore a test that a blank native assets project still builds (flutter/flutter#158141) 2024-11-04 matanlurey@users.noreply.github.com Remove references to the HTML renderer in public docs. (flutter/flutter#158035) 2024-11-04 engine-flutter-autoroll@skia.org Roll Flutter Engine from f880b56b6ede to 75acceedca41 (1 revision) (flutter/flutter#158137) 2024-11-04 nate.w5687@gmail.com Fix `WidgetStateProperty` documentation (flutter/flutter#154298) 2024-11-04 engine-flutter-autoroll@skia.org Roll Flutter Engine from 25c7e471e2ef to f880b56b6ede (5 revisions) (flutter/flutter#158132) 2024-11-04 engine-flutter-autoroll@skia.org Roll Flutter Engine from 05cb5d7f7939 to 25c7e471e2ef (12 revisions) (flutter/flutter#158127) 2024-11-04 737941+loic-sharma@users.noreply.github.com Remove use_modular_headers! from Swift Podfiles (flutter/flutter#156257) 2024-11-04 victorsanniay@gmail.com Disable failing native assets test (flutter/flutter#158119) 2024-11-04 nate.w5687@gmail.com Fix `NestedScrollView` inner position logic (flutter/flutter#157756) 2024-11-04 jacksongardner@google.com Add benchmarks for single-threaded Skwasm. (flutter/flutter#158027) 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 Please CC camillesimon@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 220f29966fab690c1235871167fd3de7bc12948a Author: stuartmorgan Date: Tue Nov 5 12:48:25 2024 -0500 [ci] Add vector_graphics and flutter_svg to autolabeler (#8025) Adds autolabel rules for the new packages. commit cb08b93d5f88d24f9d34010c74a369fcf097138b Author: Alexandru Mariuti Date: Tue Nov 5 18:45:00 2024 +0100 [vector_graphics_compiler] wasm compatibility (#8021) Make vector_graphics_compiler WASM compatible. - x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. commit 721943194945623062792dd3356f1ad1cbe070e2 Author: Jonah Williams Date: Tue Nov 5 08:00:10 2024 -0800 [vector_graphics*] Relax dependency constraints of vector_graphics, vector_graphics_codec, vector_graphics_compiler, flutter_svg (#8018) Relax the dependency constrraints of the vector graphics packages. Since there are no actual changes to the vector_graphics_codec package and the listed version is already published, I don't think it needs a version bump to remove the publish key. Fixes https://github.com/flutter/flutter/issues/157626 commit 79f8b0b6655132ac8d11a50243afe85867a09405 Author: Kallen Tu Date: Mon Nov 4 14:24:38 2024 -0800 [various] Add `missing_code_block_language_in_doc_comment` lint to flutter/packages. (#6473) Adds this Dartdoc-related lint to the flutter repository, in replacement of the Dartdoc warning (missingCodeBlockLanguage) because it will be deprecated and removed soon. flutter/flutter already has this lint as well. Adding to flutter/engine with https://github.com/flutter/engine/pull/51944. Lint Proposal: https://github.com/dart-lang/linter/issues/4904 Issue covering future work removing the `// ignore:`s: https://github.com/flutter/flutter/issues/157620 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [x] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#version-and-changelog-updates [following repository CHANGELOG style]: https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#changelog-style [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests commit abadfb54fc7aa327ae6ca0b5a928b2cff194db5c Author: stuartmorgan Date: Mon Nov 4 17:06:27 2024 -0500 [various] Update example apps to Kotlin 1.9.0 (#7998) Follow-up to https://github.com/flutter/packages/pull/7997 to update all example apps to 1.9.0 to protect us from similar OOB failures as other transitive dependencies in the ecosystem update to newer versions of Kotlin. commit da4c3eedb5e70d47452088d8cb30c02c058052a7 Author: cedvdb Date: Mon Nov 4 20:15:05 2024 +0100 [go_router] add current state getter (#7651) Adds a current state getter that returns `GoRouterState`. I've no idea if this is correct but the added tests seem to be passing. Rebuilding the state may be expensive too ? Fix: https://github.com/flutter/flutter/issues/129833 fixes https://github.com/flutter/flutter/issues/148215 commit 62762107c08b1b41fe068c81f7593ffac982a6d1 Author: jesswrd Date: Mon Nov 4 11:05:59 2024 -0800 Applied Gradle Plugins Declaratively for Multiple Plugin Example Apps (#7968) Updated applying gradle plugins from usage of imperative apply to usage of declarative blocks {} apply for 7 plugins. Intending on updating all android example apps under packages. Previously migrated applying `path_provider` plugin example app from imperatively to declaratively in this PR [here](https://github.com/flutter/packages/pull/7822). Tests for changes in the linked PR above. More information on Flutter Gradle Pluggin Apply [here](https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply) Partially addresses [#152656](https://github.com/flutter/flutter/issues/152656) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [x] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests commit aaa1b3f0746630cc5afbb835b7579f0e7b15eb29 Author: engine-flutter-autoroll Date: Mon Nov 4 11:09:14 2024 -0500 Roll Flutter from f86b77721524 to 8591d0c16a6c (16 revisions) (#8015) https://github.com/flutter/flutter/compare/f86b77721524...8591d0c16a6c 2024-11-04 32538273+ValentinVignal@users.noreply.github.com Remove null from flex documentation (flutter/flutter#158086) 2024-11-04 32538273+ValentinVignal@users.noreply.github.com Add test for `raw_scrollbar.1.dart` (flutter/flutter#158069) 2024-11-04 32538273+ValentinVignal@users.noreply.github.com Add test for `interactive_viewer.constrained.0.dart` (flutter/flutter#158044) 2024-11-03 polinach@google.com Revert "Add and plumb `useImplicitPubspecResolution` across `flutter_tools`." (flutter/flutter#158076) 2024-11-03 polinach@google.com Revert "Add a warning/additional handlers for parsing`synthetic-package`." (flutter/flutter#158078) 2024-11-03 jiten.pateljp2001@gmail.com Fixes typos & spelling error in changelog.md file (flutter/flutter#157438) 2024-11-02 32538273+ValentinVignal@users.noreply.github.com Add test for `raw_scrollbar.0.dart` (flutter/flutter#157989) 2024-11-02 engine-flutter-autoroll@skia.org Roll Flutter Engine from 38b6165f137d to 05cb5d7f7939 (4 revisions) (flutter/flutter#158038) 2024-11-02 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7dfdcacd8ae4 to 38b6165f137d (5 revisions) (flutter/flutter#158034) 2024-11-02 matanlurey@users.noreply.github.com Delete unused references to dev.flutter.plugins.e2e. (flutter/flutter#158031) 2024-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7b176f4f25da to 7dfdcacd8ae4 (1 revision) (flutter/flutter#158021) 2024-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3a090b46dd35 to 7b176f4f25da (2 revisions) (flutter/flutter#158018) 2024-11-01 737941+loic-sharma@users.noreply.github.com Make SwiftPM integration tests even MORE idiomatic (flutter/flutter#158014) 2024-11-01 737941+loic-sharma@users.noreply.github.com Improve consistency of code snippets in basic.dart (flutter/flutter#158015) 2024-11-01 matanlurey@users.noreply.github.com Remove unnecessary `kCliAnimationsFeatureName` that is available as `.configSetting`. (flutter/flutter#158013) 2024-11-01 737941+loic-sharma@users.noreply.github.com Make the SwiftPM integration tests more idiomatic (flutter/flutter#157971) 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 Please CC camillesimon@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit b3a5e33f1cf39c62e187cb3060814bae4e2efff2 Author: stuartmorgan Date: Mon Nov 4 10:48:07 2024 -0500 [camera_windows] Revert: Support image streams on Windows platform (#7951) This reverts commit b31a279641283f1ef75ee2cc586b53de559148e4 (https://github.com/flutter/packages/pull/7067) The implementation had significant bugs: - It had asynchronous results, but never responded to them, violating the engine API contract and preventing futures from completing. - It `std::move`d pointers between classes, while still keeping them as ivars and global references and referring to them from long-lived handlers. commit 2c8f22670812996a00e45e6304f79f1fd9b02fa1 Author: stuartmorgan Date: Sat Nov 2 05:56:05 2024 -0400 [camera] Use Pigeon for Windows C++->Dart (#8001) Replaces direct method channel usage with Pigeon for C++-to-Dart communication. On the Dart side, this re-uses the same structure used in other platform implementations. Part of http://github.com/flutter/flutter/issues/117905 commit 195b2d62a0514d018f3d8e1c71fe68a5220aa206 Author: Kevin Moore Date: Fri Nov 1 20:51:27 2024 -0700 [script/tool] update dependencies (#7992) commit 1d00782b90d4c57f03c7b6b1b4e4f91d39a0426b Author: engine-flutter-autoroll Date: Fri Nov 1 14:08:07 2024 -0400 Roll Flutter from 0fe615343bd9 to f86b77721524 (16 revisions) (#8000) https://github.com/flutter/flutter/compare/0fe615343bd9...f86b77721524 2024-11-01 engine-flutter-autoroll@skia.org Roll Packages from 7cc1caa0cc36 to 796afa35071d (15 revisions) (flutter/flutter#158003) 2024-11-01 fluttergithubbot@gmail.com Marks Linux_pixel_7pro service_extensions_test to be flaky (flutter/flutter#157853) 2024-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0a0d5c9be6ff to 3a090b46dd35 (1 revision) (flutter/flutter#157994) 2024-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from bacc5e1e73b7 to 0a0d5c9be6ff (3 revisions) (flutter/flutter#157991) 2024-11-01 32538273+ValentinVignal@users.noreply.github.com Add test for `interactive_viewer.transformation_controller.0.dart` (flutter/flutter#157986) 2024-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from d7e928911ac2 to bacc5e1e73b7 (1 revision) (flutter/flutter#157982) 2024-11-01 32538273+ValentinVignal@users.noreply.github.com Add test for `notification.0.dart` (flutter/flutter#157909) 2024-11-01 lammenspaolo@gmail.com performance: Override .elementAt in CachingIterable (flutter/flutter#152477) 2024-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from cd46383cd55e to d7e928911ac2 (4 revisions) (flutter/flutter#157978) 2024-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from bb77cf867aef to cd46383cd55e (11 revisions) (flutter/flutter#157972) 2024-11-01 matanlurey@users.noreply.github.com Add a warning/additional handlers for parsing`synthetic-package`. (flutter/flutter#157934) 2024-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from f2154ef3e31c to bb77cf867aef (6 revisions) (flutter/flutter#157960) 2024-10-31 matanlurey@users.noreply.github.com Renames `injectBuildTimePluginFilesForWebPlatform` and removes unused named parameter. (flutter/flutter#157944) 2024-10-31 jonahwilliams@google.com [flutter_driver] use mostly public screenshot API. (flutter/flutter#157888) 2024-10-31 sarbagyastha@gmail.com Made insetPadding configurable for Date Picker Dialog (flutter/flutter#155651) 2024-10-31 bruno.leroux@gmail.com Fix showSnackBar can't access useMaterial3 from the theme (flutter/flutter#157707) 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 Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 3c3181c2cfcd0557e12a95ace0e347141f63e384 Author: Kevin Moore Date: Fri Nov 1 10:11:51 2024 -0700 [path_parsing] deprecate utility functions that should be private (#7993) Towards https://github.com/flutter/flutter/issues/157940 commit 796afa35071dd836c7ac6a845cf21ccc7890ae29 Author: stuartmorgan Date: Fri Nov 1 09:12:59 2024 -0700 [google_maps_flutter] Update Android for non-nullable generics (#7990) Now that Pigeon supports non-nullable generics, update the Pigeon definition to remove all the unnecessary nullability in generics. This is largely a no-op for non-test code because these types are mostly for passing from Dart to Java, and Java doesn't support non-nullable generics so nothing changes on the native side. Part of https://github.com/flutter/flutter/issues/155891 commit 02b20bf25958ff2175ca39c7486201b11f608c54 Author: stuartmorgan Date: Fri Nov 1 09:11:16 2024 -0700 [various] Minor cleanup in recently imported packages (#7995) Fixes a few minor things from the recent import of dnfield's vector-graphics-related packages: - Fixes a bad copy/paste in the `path_parsing` CHANGELOG so future versions of the CHANGELOG will be less confusing. - Removes a coverage link from the `flutter_svg` README that is no longer correct. - Disabled publishing of `vector_graphics*` until a new versioning plan is made. Because these are extremely minor, I'm overriding our usual versioning policy; it's fine for the CHANGELOG and README fixes to go out the next time we happen to publish rather than immediately. commit 53469f31edcfa610a14811b6dba64fc712007cbf Author: stuartmorgan Date: Fri Nov 1 08:57:12 2024 -0700 [go_router] Update example app to Kotlin 1.9.0 (#7997) The tree is currently closed on an out-of-band failure in the build of this example app: e: .../transformed/jetified-kotlin-stdlib-1.9.24.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: /b/s/w/ir/cache/gradle/caches/transforms-4/6cce2b947fc9e43cca6b44ff30180b61/transformed/jetified-kotlin-stdlib-1.9.24.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: .../transformed/jetified-kotlin-stdlib-1.9.24.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: .../transformed/jetified-annotation-jvm-1.9.1.jar!/META-INF/annotation.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. It appears that this is caused by https://github.com/flutter/packages/pull/7986 as this example app does depend on `url_launcher`, and that PR therefore change a transitive dependency of this example app, and as Reid discovered that version bump [changed the Kotlin version](https://android.googlesource.com/platform/frameworks/support/+log/2e6556166965445a8a129114765a3903c063735c..87b88ad088cc9b18d4ab75611fc8b74e8b01c24a/annotation) There was a Flutter Fix that contained the correct instructions for resolving this, which is what this PR does. commit ee43c7eb37ebf3e0b8911814db5513f0fa4a417e Author: engine-flutter-autoroll Date: Thu Oct 31 19:51:18 2024 -0400 Manual roll Flutter from fe71cadf1959 to 0fe615343bd9 (18 revisions) (#7989) Manual roll requested by tarrinneal@google.com https://github.com/flutter/flutter/compare/fe71cadf1959...0fe615343bd9 2024-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from c40b0b602822 to f2154ef3e31c (8 revisions) (flutter/flutter#157926) 2024-10-31 47866232+chunhtai@users.noreply.github.com Hides added routes before top-most route finishes pushing (flutter/flutter#156104) 2024-10-31 26356162+BenjiFarquhar@users.noreply.github.com Fix cursor on hover expand/collapse icon (#155207) (flutter/flutter#155209) 2024-10-31 32538273+ValentinVignal@users.noreply.github.com Add test for `media_query_data.system_gesture_insets.0.dart` (flutter/flutter#157854) 2024-10-31 matanlurey@users.noreply.github.com Add and plumb `useImplicitPubspecResolution` across `flutter_tools`. (flutter/flutter#157879) 2024-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 090c33aeae83 to c40b0b602822 (1 revision) (flutter/flutter#157896) 2024-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9295eeb6d3ce to 090c33aeae83 (4 revisions) (flutter/flutter#157893) 2024-10-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 2bd854e23b61 to 9295eeb6d3ce (5 revisions) (flutter/flutter#157882) 2024-10-30 louisehsu@google.com Adds a new helpful tool exit message for SocketExceptions thrown during mdns discovery (flutter/flutter#157638) 2024-10-30 miechoo@users.noreply.github.com Fix `GlowingOverscrollIndicator` examples (flutter/flutter#155203) 2024-10-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 906a7ad88052 to 2bd854e23b61 (1 revision) (flutter/flutter#157878) 2024-10-30 34871572+gmackall@users.noreply.github.com Upgrade templates to AGP 8.7/Gradle 8.10.2 (flutter/flutter#157872) 2024-10-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 57ed5d338e7e to 906a7ad88052 (13 revisions) (flutter/flutter#157875) 2024-10-30 tessertaha@gmail.com Update Material 3 `LinearProgressIndicator` for new visual style (flutter/flutter#154817) 2024-10-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 999797a2f690 to 57ed5d338e7e (5 revisions) (flutter/flutter#157833) 2024-10-30 matanlurey@users.noreply.github.com Add hidden `--no-implicit-pubspec-resolution` flag for one stable release. (flutter/flutter#157635) 2024-10-30 engine-flutter-autoroll@skia.org Roll Packages from 028027e6b1f1 to 7cc1caa0cc36 (5 revisions) (flutter/flutter#157864) 2024-10-30 stuartmorgan@google.com Mention partial PRs in the contributing docs (flutter/flutter#157863) 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 Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 2fd909bcc25a929d9a1e49044f1100aa144662d0 Author: Kevin Moore Date: Thu Oct 31 13:53:52 2024 -0700 [vector_garphics] fix execution on the web with WebAssembly (#7991) The `dart.library.html` variable is not available with wasm Since the web version is (currently) a no-op, flip the condition to check for dart:io instead commit 7287c7b7f1d51e8842f49df46dbd0af3bd1c1077 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu Oct 31 20:28:54 2024 +0000 [url_launcher]: Bump androidx.annotation:annotation from 1.9.0 to 1.9.1 in /packages/url_launcher/url_launcher_android/android (#7986) Bumps androidx.annotation:annotation from 1.9.0 to 1.9.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.9.0&new-version=1.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit dcf47df88e4cd7225a9a5261421980b192ab538d Merge: 92238bf6b 760b8df4a Author: stuartmorgan Date: Thu Oct 31 10:36:08 2024 -0700 [flutter_svg] Initial import (#7944) Imports https://github.com/dnfield/flutter_svg into this repository, with history, and updates it to follow repository conventions: - Updates min SDKs. - Removes analysis options and fixes resulting warnings. - Autoformats. - Updates pubspecs to follow repo standard. - Updates repo tooling to allow the `flutter_svg_test` non-dev dependency on `flutter_test`. - Adds repo metadata. - Adds METADATA files. - Bumps versions and slightly relax version constraints for vector_graphics* to allow the new versions. commit 92238bf6bc896bb0d28300178cf55ecee9085bb1 Merge: ed7ee79e4 a1bfadf6f Author: stuartmorgan Date: Thu Oct 31 10:35:33 2024 -0700 [vector_graphics] Initial import (#7941) Imports https://github.com/dnfield/vector_graphics into this repository, with history, and updates it to follow repository conventions: - Adds missing licence headers. - Removes analysis options and fixes resulting warnings. - Updates min SDKs. - Autoformats. - Updates pubspecs to follow repo standard, including updating the metadata to point to the Flutter repositories. - Allows `xml` as a pinned dependency, and relaxes the pinning requirement in the repo tools to allow an explicit, inclusive-endpoint range. - Skips some unit tests on unsupported platforms. - Adds repo metadata. - Bumps versions and slightly relax version constraints to allow the new versions. commit ed7ee79e4c90cf54b8ab175d87365e4bfab05257 Author: stuartmorgan Date: Wed Oct 30 16:10:15 2024 -0700 [ci] Ensure repo tool is autoformatted (#7963) Currently the autoformatter check is run per-package, so doesn't include script/tool. This adds a new CI step to check the formatting of the repo tooling, just as we have for running its unit tests. commit e55be9676ec6d519598dc716c5ec8c6dcb0e7973 Author: Zachary Anderson Date: Wed Oct 30 15:56:06 2024 -0700 Updates path_parsing README.md with a note about Dan (#7949) commit cd7a8104446dcb99453f01f26477a9bdd4186c3c Author: stuartmorgan Date: Wed Oct 30 15:51:05 2024 -0700 [tool] Support third_party for --current-package (#7967) Fixes `--current-package` so that when run on a package in third_party/packages/ in works as expected, rather than failing with an error message saying that it must be run from inside a package. commit 030dd4eafaae6a09a21fe311dc011082799e50df Author: stuartmorgan Date: Wed Oct 30 15:36:55 2024 -0700 [tool] Fix third_party dependency overrides (#7966) `made-deps-path-based` would sometimes create invalid relative paths when `third_party/packages` was involved because it was using the sibling directory of `packages` as the base. This updates the logic to always make the paths relative to the repository root; this is often a longer relative path than necessary, but that's harmless, and always using the repo root makes it easier to reason about. Also fixes the fact that paths that were already path based (which is always the case for `some_package/example`'s dependency on `some_package`) were being overridden, causing CI to do some unnecessary duplicate analysis work. commit 4feddffcfa77f6954c0e3a03bdd812193441d1de Author: jesswrd Date: Wed Oct 30 12:38:55 2024 -0700 Applied Gradle Plugins Declaratively for `path_provider` (#7822) Updated applying gradle plugins from usage of imperative apply to usage of declarative blocks {} apply. Intending on updating all android example apps under packages. Did one more as a proof of concept before doing more. More information on Flutter Gradle Plugin Apply [here](https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply) Partially addresses [#152656](https://github.com/flutter/flutter/issues/152656) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [x] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests --------- Co-authored-by: Reid Baker commit bce9735f1cefef3bdffe1e8ad01b90ecdbe67e0c Author: stuartmorgan Date: Wed Oct 30 09:54:24 2024 -0700 [palette_generator] Remove unmanaged code snippet (#7962) Simplifies the README so that it no longer uses a code snippet, as the snippet was not adding any value over pub.dev instructions, and removes it from the code-excerpt exclusion list. Part of https://github.com/flutter/flutter/issues/102679 commit a4c7bf529f513fa106d557e3a2c8dbdbcd4170ac Author: engine-flutter-autoroll Date: Wed Oct 30 11:50:17 2024 -0400 Roll Flutter from 42132e879b42 to fe71cadf1959 (12 revisions) (#7961) https://github.com/flutter/flutter/compare/42132e879b42...fe71cadf1959 2024-10-30 reidbaker@google.com Update CHANGELOG.md to correct ios vs macos issue (flutter/flutter#157822) 2024-10-30 tessertaha@gmail.com Add ability to customize the default `Slider` padding (flutter/flutter#156143) 2024-10-30 11473691+YeungKC@users.noreply.github.com Fix menu anchor state handling (flutter/flutter#157612) 2024-10-30 32538273+ValentinVignal@users.noreply.github.com Add test for `interactive_viewer.0.dart` (flutter/flutter#157773) 2024-10-30 32538273+ValentinVignal@users.noreply.github.com Add test for `scroll_metrics_notification.0.dart` (flutter/flutter#157768) 2024-10-30 ybz975218925@gmail.com Add boundary feature to the drag gesture. (flutter/flutter#147521) 2024-10-30 nate.w5687@gmail.com Fix `ResizeImage` documentation (flutter/flutter#157619) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from 795b5492f1b9 to 999797a2f690 (1 revision) (flutter/flutter#157825) 2024-10-29 magder@google.com Avoid labeling all PRs as 'text-input' (flutter/flutter#157805) 2024-10-29 engine-flutter-autoroll@skia.org Roll Packages from e0c4f55cd355 to 028027e6b1f1 (8 revisions) (flutter/flutter#157813) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from 725c8e4bc379 to 795b5492f1b9 (5 revisions) (flutter/flutter#157820) 2024-10-29 matanlurey@users.noreply.github.com Fix and remove a few `no-shuffle` tags in `flutter_tools`. (flutter/flutter#157656) 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 Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 7cc1caa0cc361c38ef1e040958304da3ffa88dbf Author: stuartmorgan Date: Wed Oct 30 02:50:04 2024 -0700 [tool] Update build-all app creation (#7955) Minor cleanup of the script to create the build-all app, mostly for Android: - Don't override the minSdk to 21, since the Flutter-provided value is now 21 already. - Don't enable multidex, since that isn't necessary for minSdk 20+. - Remove camera_android_camerax from the direct dependency list, not camera_android, now that the endorsement has switched. This will return us to the previous, intended behavior of testing that both versions build together. - If for some reason the Dart SDK isn't detected, use 3.0.0+ instead of 2.12.0+. commit e12e073a0197eab14203891ea9260b4fff31b20d Author: Sam Rawlins Date: Tue Oct 29 19:29:15 2024 -0700 Disable two lint rules which are being removed. (#7959) Each of these are going to be removed soon. * avoid_null_checks_in_equality_operators * unsafe_html Work towards https://github.com/dart-lang/linter/issues/5063 and https://github.com/dart-lang/linter/issues/5001 commit d13a53bbd0d2b11ca79bee2f39363c89eecd8ad2 Author: Matan Lurey Date: Tue Oct 29 12:31:37 2024 -0700 Bump `path_provider_android` to `^2.2.5` due to Android v1 embedder. (#7935) https://github.com/flutter/engine/pull/52022 removed the Android v1 embedder. I'm seeing locally that older versions of `path_provider_android` fail due to missing symbols: ```txt flutter run Launching lib/main.dart on sdk gphone64 arm64 in debug mode... You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/to/flutter-gradle-plugin-apply Warning: This project is still reading the deprecated '.flutter-plugins. file. In an upcoming stable release support for this file will be completely removed and your build will fail. See https:/flutter.dev/to/flutter-plugins-configuration. /Users/matanl/.pub-cache/hosted/pub.dev/path_provider_android-2.2.2/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java:39: error: cannot find symbol @NonNull io.flutter.plugin.common.PluginRegistry.Registrar registrar) { ^ symbol: class Registrar location: interface PluginRegistry 1 error FAILURE: Build failed with an exception. ``` To be a good citizen, let's make sure users of `path_provider` get a good `path_provider_android`. commit f61542802d5ef4625c652e319b6aa40bbfb57389 Author: engine-flutter-autoroll Date: Tue Oct 29 15:13:48 2024 -0400 Roll Flutter from 3fb95c7dd21d to 42132e879b42 (19 revisions) (#7958) https://github.com/flutter/flutter/compare/3fb95c7dd21d...42132e879b42 2024-10-29 34871572+gmackall@users.noreply.github.com Reland "Upgrade tests to AGP 8.7/Gradle 8.10.2/Kotlin 1.8.10" (flutter/flutter#157617) 2024-10-29 jonahwilliams@google.com [impeller] re-enable impeller shard. (flutter/flutter#157806) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4cb4478016b5 to 725c8e4bc379 (1 revision) (flutter/flutter#157808) 2024-10-29 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Avoid labeling 'context' PRs as 'text-input' (#157650)" (flutter/flutter#157812) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from b95da8106b98 to 4cb4478016b5 (1 revision) (flutter/flutter#157792) 2024-10-29 koji.wakamiya@gmail.com Remove unused import from kt plugin template (flutter/flutter#157220) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5fa7a123b14a to b95da8106b98 (1 revision) (flutter/flutter#157787) 2024-10-29 tessertaha@gmail.com Fix `TabBar` tab icons not respecting custom `IconTheme` (flutter/flutter#157724) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0c8f0bf4d740 to 5fa7a123b14a (1 revision) (flutter/flutter#157780) 2024-10-29 105786499+syedaniq@users.noreply.github.com Allow customizing entry mode icons in TimePicker (flutter/flutter#157151) 2024-10-29 32538273+ValentinVignal@users.noreply.github.com Add test for `focus_scope.0.dart` (flutter/flutter#157772) 2024-10-29 32538273+ValentinVignal@users.noreply.github.com Add test for `page_storage.0.dart` (flutter/flutter#157770) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from c05af6f939fc to 0c8f0bf4d740 (1 revision) (flutter/flutter#157774) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from b394e0c98fa0 to c05af6f939fc (1 revision) (flutter/flutter#157767) 2024-10-29 32538273+ValentinVignal@users.noreply.github.com Add test for `nested_scroll_view_state.0.dart` (flutter/flutter#157714) 2024-10-29 zanderso@users.noreply.github.com Pin Mac tool_integration_test shards to arm64 (flutter/flutter#157760) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from ed587dcf61fd to b394e0c98fa0 (4 revisions) (flutter/flutter#157766) 2024-10-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from 70671baabbba to ed587dcf61fd (10 revisions) (flutter/flutter#157751) 2024-10-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from 23b2c6d3b3b1 to 70671baabbba (1 revision) (flutter/flutter#157740) 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 Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit ab404b553ec18034955633ca0de89a17aa064c27 Author: stuartmorgan Date: Tue Oct 29 10:53:33 2024 -0700 [webview_flutter] Fix macOS 14+ test hangs (#7953) Starting in macOS 14, webview_flutter integration tests hang due to being unable to connect to the test server. Based on local experimentation, in appears that we are not able to connect when binding to the "any" address, which gives us an IP address of 0.0.0.0, but using the loopback address (which is all we should need; the point is to accept local connections from the test itself) does work. Since our test fleet is a mixed macOS 13/14 fleet, this should fix flaky timeouts of macOS platform tests in CI, in addition to fixing local runs. Fixes https://github.com/flutter/flutter/issues/157449 commit 028027e6b1f1bba781ced46b2b1804d4cac062d6 Author: stuartmorgan Date: Tue Oct 29 10:20:16 2024 -0700 [various] Remove multiDexEnabled (#7956) We had manually added `multiDexEnabled` to various plugin example apps over time to fix build failures, but it's not needed for plugins with a `minSdk` of 20+ ([reference](https://developer.android.com/build/multidex)), and Flutter (and thus all of our plugins) requires 21+, so the setting is just cruft. commit 760b8df4a7ce388ff910e4cddaea24c8de530675 Author: Stuart Morgan Date: Mon Oct 28 10:39:30 2024 -0400 [flutter_svg] Initial import Imports https://github.com/dnfield/flutter_svg into this repository, with history, and updates it to follow repository conventions: - Updates min SDKs. - Removes analysis options and fixes resulting warnings. - Autoformats. - Updates pubspecs to follow repo standard. - Updates repo tooling to allow the `flutter_svg_test` non-dev dependency on `flutter_test`. - Adds repo metadata. - Adds METADATA files. - Adds commemoration to README. - Updates example app Android build files to current standards. - Bumps versions and slightly relax version constraints for vector_graphics* to allow the new versions. - Moves gitignore of golden test diffs into the package. commit 85c4934bda545beff36133dc63e47de5b5c5c56b Author: engine-flutter-autoroll Date: Mon Oct 28 15:11:17 2024 -0400 Roll Flutter from 5a11904383d1 to 3fb95c7dd21d (16 revisions) (#7948) https://github.com/flutter/flutter/compare/5a11904383d1...3fb95c7dd21d 2024-10-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from bf5bfeebf89f to 23b2c6d3b3b1 (3 revisions) (flutter/flutter#157736) 2024-10-28 magder@google.com Avoid labeling 'context' PRs as 'text-input' (flutter/flutter#157650) 2024-10-28 32538273+ValentinVignal@users.noreply.github.com Add test for `restorable_route_future.0.dart` (flutter/flutter#157708) 2024-10-28 reidbaker@google.com Update .ci.yaml have android sdk be 35v1 (flutter/flutter#157621) 2024-10-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from 2522789c4199 to bf5bfeebf89f (1 revision) (flutter/flutter#157713) 2024-10-28 32538273+ValentinVignal@users.noreply.github.com Add test for `restoration_mixin.0.dart` (flutter/flutter#157709) 2024-10-28 32538273+ValentinVignal@users.noreply.github.com Add test for `navigator.restorable_push_replacement.0.dart` (flutter/flutter#157704) 2024-10-28 32538273+ValentinVignal@users.noreply.github.com Add test for `focus_node.unfocus.0.dart` (flutter/flutter#157673) 2024-10-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9226b089d634 to 2522789c4199 (2 revisions) (flutter/flutter#157710) 2024-10-28 32538273+ValentinVignal@users.noreply.github.com Add tests for `navigator_state.restorable_push.0.dart` (flutter/flutter#157667) 2024-10-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from 10e50bd42c42 to 9226b089d634 (1 revision) (flutter/flutter#157702) 2024-10-28 32538273+ValentinVignal@users.noreply.github.com Add test for `navigator_state.restorable_push_replacement.0.dart` (flutter/flutter#157668) 2024-10-28 srawlins@google.com Remove unsafe_html lint rule (flutter/flutter#157531) 2024-10-27 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3162aaad0086 to 10e50bd42c42 (1 revision) (flutter/flutter#157690) 2024-10-27 ybz975218925@gmail.com Fix Scaffold extend body (flutter/flutter#157441) 2024-10-26 engine-flutter-autoroll@skia.org Roll Flutter Engine from c9b8ac96f6ce to 3162aaad0086 (3 revisions) (flutter/flutter#157681) 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 Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit a1bfadf6fdfbc35138982dc8d78ee0da68748837 Author: Stuart Morgan Date: Fri Oct 25 13:32:33 2024 -0400 Update vector_graphics to match repo conventions - Add missing licence headers. - Remove analysis options fix new warnings. - Update min SDKs. - Autoformat. - Update pubspecs to follow repo standard. - Includes removing dependency overrides for inter-package path pinning as a default state; this can be added temporarily in PRs with repo tooling. - Allow xml dependency, and relax the pinning requirement to allow an explicit, inclusive-endpoint range. - Skip tests on unsupported platforms. - Switch vector_graphics_codec from flutter_test to test. - Add repo metadata. - Add commemoration to the README. - Add AUTHORS files. - Bump versions and slightly relax version constraints to allow the new versions. commit c658ca2d3055af90fb787b7e5c4535be62128506 Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Mon Oct 28 10:36:04 2024 -0600 [interactive_media_ads] Adds internal wrapper for iOS native `IMACompanionAdSlot` and `IMACompanionDelegate` (#7889) commit c6d2d826a1ca1f7aaaac8e67ee9e6896a13a8433 Merge: c8cbd2371 57a250f63 Author: Stuart Morgan Date: Mon Oct 28 12:03:13 2024 -0400 [flutter_svg] Repository merge Initial merge commit from dnfield/flutter_svg with no changes other than file locations. commit 16dfc4703645873f91b74464a51d71cdaf532ee1 Merge: c8cbd2371 cd6b96c4a Author: Stuart Morgan Date: Mon Oct 28 10:01:21 2024 -0400 Merge remote-tracking branch 'vector_graphics/main' into import-vector-graphics commit c8cbd237133a94573f92fda5acf08c410b7510a6 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun Oct 27 01:56:31 2024 +0000 Bump actions/checkout from 4.2.1 to 4.2.2 (#7919) Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.1 to 4.2.2.
Release notes

Sourced from actions/checkout's releases.

v4.2.2

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.2.1...v4.2.2

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.2.1&new-version=4.2.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 4fd562d6ee58a20b5f556ad1d3125807372ac100 Author: engine-flutter-autoroll Date: Sat Oct 26 14:23:39 2024 -0400 Roll Flutter from 4faa4a415ec9 to 5a11904383d1 (67 revisions) (#7937) Roll Flutter from 4faa4a415ec9 to 5a11904383d1 (67 revisions) https://github.com/flutter/flutter/compare/4faa4a415ec9...5a11904383d1 2024-10-26 30870216+gaaclarke@users.noreply.github.com Relands "Wide gamut framework gradient test (#153976)" (flutter/flutter#157643) 2024-10-26 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7c5c5fe5c84d to c9b8ac96f6ce (3 revisions) (flutter/flutter#157662) 2024-10-26 32538273+ValentinVignal@users.noreply.github.com Add test for `navigator_state.restorable_push_and_remove_until.0.dart` (flutter/flutter#157595) 2024-10-26 matanlurey@users.noreply.github.com Tighten up `throwToolExit`, explain when to use it. (flutter/flutter#157561) 2024-10-26 matanlurey@users.noreply.github.com Remove extraneous `throw`. (flutter/flutter#157658) 2024-10-26 32538273+ValentinVignal@users.noreply.github.com Add tests for `navigator.restorable_push.0.dart` (flutter/flutter#157492) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from 43e4d9a30666 to 7c5c5fe5c84d (1 revision) (flutter/flutter#157644) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5061358e255f to 43e4d9a30666 (1 revision) (flutter/flutter#157637) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from eb867e055790 to 5061358e255f (2 revisions) (flutter/flutter#157623) 2024-10-25 polinach@google.com Create flutter specific leak troubleshooting guidance. (flutter/flutter#157396) 2024-10-25 katelovett@google.com Update CupertinoNavigationBar to support large layout (flutter/flutter#157133) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from 38e9be1f74fa to eb867e055790 (3 revisions) (flutter/flutter#157613) 2024-10-25 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Wide gamut framework gradient test (#153976)" (flutter/flutter#157615) 2024-10-25 30870216+gaaclarke@users.noreply.github.com Wide gamut framework gradient test (flutter/flutter#153976) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from b413d9996c86 to 38e9be1f74fa (2 revisions) (flutter/flutter#157604) 2024-10-25 engine-flutter-autoroll@skia.org Roll Packages from a556f0f52825 to e0c4f55cd355 (2 revisions) (flutter/flutter#157605) 2024-10-25 jonahwilliams@google.com Support backdrop key in flutter framework. (flutter/flutter#157278) 2024-10-25 reidbaker@google.com Add 3.24.4 changelog to master (flutter/flutter#157600) 2024-10-25 mohellebiabdessalem@gmail.com Update flutter.groovy to catch unknown task exception when finding api task (flutter/flutter#157282) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from c4b0184c8783 to b413d9996c86 (1 revision) (flutter/flutter#157580) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from b1c2ba8c4d52 to c4b0184c8783 (1 revision) (flutter/flutter#157578) 2024-10-25 32538273+ValentinVignal@users.noreply.github.com Add test for `build_owner.0.dart` (flutter/flutter#157499) 2024-10-25 32538273+ValentinVignal@users.noreply.github.com Add tests for `focusable_action_detector.0.dart` (flutter/flutter#157575) 2024-10-25 32538273+ValentinVignal@users.noreply.github.com Add test for `navigator.restorable_push_and_remove_until.0.dart` (flutter/flutter#157487) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from 29440ed1e225 to b1c2ba8c4d52 (1 revision) (flutter/flutter#157572) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from 88716d804aef to 29440ed1e225 (1 revision) (flutter/flutter#157569) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from b8b28c80a737 to 88716d804aef (2 revisions) (flutter/flutter#157567) 2024-10-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 48ff670d256b to b8b28c80a737 (2 revisions) (flutter/flutter#157564) 2024-10-24 matanlurey@users.noreply.github.com Use discenrable characters (replace `' 🙙 🙛 '` in error logs) (flutter/flutter#157548) 2024-10-24 matanlurey@users.noreply.github.com Remove unused `PubDependenciesProjectValidator`. (flutter/flutter#157516) 2024-10-24 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Upgrade tests to AGP 8.7/Gradle 8.10.2/Kotlin 1.8.10 (#157032)" (flutter/flutter#157559) 2024-10-24 jonahwilliams@google.com Mark mac impeller as bringup. (flutter/flutter#157551) 2024-10-24 tessertaha@gmail.com Deprecate `ThemeData.dialogBackgroundColor` in favor of `DialogThemeData.backgroundColor` (flutter/flutter#155072) 2024-10-24 34871572+gmackall@users.noreply.github.com Upgrade tests to AGP 8.7/Gradle 8.10.2/Kotlin 1.8.10 (flutter/flutter#157032) 2024-10-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 246344f26edc to 48ff670d256b (2 revisions) (flutter/flutter#157544) 2024-10-24 matanlurey@users.noreply.github.com Allow opting out of `.flutter-plugins`, opt-out in `refreshPluginsList`. (flutter/flutter#157527) 2024-10-24 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reverts "Added a warning if `flutter.groovy` uses a `.flutter-plugins` file. (#157388)" (#157541)" (flutter/flutter#157549) 2024-10-24 50643541+Mairramer@users.noreply.github.com Changes the offset computation to first item for RenderSliverMainAxisGroup (flutter/flutter#154688) 2024-10-24 engine-flutter-autoroll@skia.org Roll Packages from 5e03bb1da411 to a556f0f52825 (7 revisions) (flutter/flutter#157539) 2024-10-24 737941+loic-sharma@users.noreply.github.com Add partial test for flutter build ios-framework on non-module (flutter/flutter#157482) 2024-10-24 737941+loic-sharma@users.noreply.github.com Add example to SafeArea docs (flutter/flutter#157228) 2024-10-24 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Added a warning if `flutter.groovy` uses a `.flutter-plugins` file. (#157388)" (flutter/flutter#157541) 2024-10-24 matanlurey@users.noreply.github.com Added a warning if `flutter.groovy` uses a `.flutter-plugins` file. (flutter/flutter#157388) 2024-10-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from be56084344d1 to 246344f26edc (2 revisions) (flutter/flutter#157504) 2024-10-24 104349824+huycozy@users.noreply.github.com Add ability to disable CupertinoSegmentedControl (flutter/flutter#152813) 2024-10-24 tessertaha@gmail.com Update `Tab.height` parameter doc for tab height lower than default (flutter/flutter#157443) ... commit 839de2d8fc97505554cefeaf552aaba86a0360e8 Author: Kevin Moore Date: Fri Oct 25 14:12:04 2024 -0700 Drop deprecated web library (#7926) Fixes https://github.com/flutter/flutter/issues/148219 override reason: There is no user benefit for publishing this now. commit 5c5e399ad67f284e4a82facac60a560a3459bd4b Author: Ahmed Bilal <127771428+ahmedbilal008@users.noreply.github.com> Date: Sat Oct 26 01:37:13 2024 +0500 [video_player_web] Don't modify volume when muting video (#7845) Modifies the `setVolume` function for video elements to properly handle muting without resetting the volume. When the volume is set to 0.0, the video is muted without changing the volume itself, preventing issues with unmuting in certain browsers (like Chrome with Tap Emulation). This ensures the user can mute and unmute videos as expected without affecting the volume settings. Fixes: https://github.com/flutter/flutter/issues/156444 commit ec515825b13e20b881b801701fc7f14dfbe89d6b Author: engine-flutter-autoroll Date: Fri Oct 25 16:22:09 2024 -0400 Roll Flutter (stable) from 2663184aa790 to 603104015dd6 (3 revisions) (#7930) https://github.com/flutter/flutter/compare/2663184aa790...603104015dd6 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-stable-packages Please CC stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter (stable): https://github.com/flutter/flutter/issues/new/choose To file a bug in Packages: 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 commit e0c4f55cd355a704981b96914edf9e93c50a76af Merge: ca8cb6670 7f0a596f8 Author: stuartmorgan Date: Fri Oct 25 08:01:22 2024 -0700 [path_parsing] Initial import (#7908) Imports https://github.com/dnfield/dart_path_parsing into this repository, with history, and updates it to follow repository conventions: - Updates minimum SDK support to match our minimum - Switches to repository analysis options, fixing or suppressing all resulting warnings - Standardizes pubspec.yaml to follow our style/conventions - Removes the use of pubspec.lock, per repo conventions commit 7f0a596f81cb67c2eb12213ac93e92c9a08daf43 Merge: ccafa75f9 ca8cb6670 Author: stuartmorgan Date: Fri Oct 25 06:23:48 2024 -0700 Merge branch 'main' into import-path-parsing commit ccafa75f96f0b9e67ab293d21721e1ae1f987222 Author: Stuart Morgan Date: Fri Oct 25 09:23:27 2024 -0400 README EOL commit ca8cb667042bdf485601be2a51eccde4692d54b3 Author: stuartmorgan Date: Thu Oct 24 15:59:13 2024 -0700 [video_player] Simplify Pigeon API on Android (#7909) The Pigeon API for `video_player_android` dates back to the earliest versions of Pigeon, when methods had to take only a single class parameter, and return a class. This updates the API surface to modern Pigeon style, eliminating wrapper classes (except for `CreateMessage`, which is complex enough that the class is useful). commit 3727fa0af58e66c2fa769b3652b58b4d5d344c94 Merge: f4e409a0b a556f0f52 Author: stuartmorgan Date: Thu Oct 24 12:36:49 2024 -0700 Merge branch 'main' into import-path-parsing commit f4e409a0bc7819ce39555de5cc57883f37fac7f9 Author: Stuart Morgan Date: Thu Oct 24 14:29:52 2024 -0400 Autolabeler commit dade4c7479fd32a00e1594469bfb3e76df363015 Author: Stuart Morgan Date: Thu Oct 24 13:10:31 2024 -0400 Update license check to find and recognize this license commit 299d7afa787609e132a2b75c0012272d57b763c5 Author: Stuart Morgan Date: Thu Oct 24 12:40:27 2024 -0400 METADATA file commit e7525a13a728255271e16b099119de0699f9ea0b Author: Stuart Morgan Date: Thu Oct 24 12:23:48 2024 -0400 CODEOWNER commit a556f0f5282552a9ec892be3ac2b5f657032eec8 Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Thu Oct 24 09:17:17 2024 -0600 [camera] Manual roll and skip failing tests (#7891) See https://github.com/flutter/flutter/issues/157181 Also updates the `build_all_packages` test to handle `android/app/build.gradle(.kts)` filename. commit a87eddf0c281d5d017093125c1a8d9161257741f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Oct 23 21:48:06 2024 +0000 [image_picker]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/image_picker/image_picker_android/android (#7898) Bumps androidx.annotation:annotation from 1.8.2 to 1.9.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.8.2&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 1269ed8fc14f370c674ec61da95dda174db5768b Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Oct 23 21:38:51 2024 +0000 [url_launcher]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/url_launcher/url_launcher_android/android (#7906) Bumps androidx.annotation:annotation from 1.8.2 to 1.9.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.8.2&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit ff8299546c2b40654f0120279ed7ee58021cb61a Author: Mason Nguyen <48524817+wamynobe@users.noreply.github.com> Date: Thu Oct 24 04:29:10 2024 +0700 [pigeon] Allows swift generator to skip error class generation (#7849) Since the Kotlin generator allows skipping error class generation, it makes sense for the Swift generator to have the same option. Related to: #6183 https://github.com/flutter/flutter/issues/142099 commit 567b0e1c62301b9eb6cf1dff54fddd3357e4cca0 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Oct 23 21:29:08 2024 +0000 [in_app_pur]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/in_app_purchase/in_app_purchase_android/android (#7903) Bumps androidx.annotation:annotation from 1.8.2 to 1.9.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.8.2&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit fe32b5b0cc513bbc7d3f74d82748356b09d2bffb Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Oct 23 21:18:06 2024 +0000 [file_selector]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/file_selector/file_selector_android/android (#7900) Bumps androidx.annotation:annotation from 1.8.2 to 1.9.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.8.2&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 3ce96baade5fa6fbe19938bbd21ea752d1c34b78 Author: Camille Simon <43054281+camsim99@users.noreply.github.com> Date: Wed Oct 23 13:41:51 2024 -0700 [video_player_android] Give `can pause` integration test range to test for (#7913) Gives the `can pause` integration test some leeway since there seems to be lag between the time the video player is paused on the Dart side and when it is actually paused on the native side. Fixes https://github.com/flutter/flutter/issues/157307. ## Pre-launch Checklist - [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [ ] I read the [Tree Hygiene] page, which explains my responsibilities. - [ ] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [ ] I signed the [CLA]. - [ ] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [ ] I [linked to at least one issue that this PR fixes] in the description above. - [ ] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [ ] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] All existing and new tests are passing. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests commit 5e03bb1da411c99d80727f46e1821c4fdc6ea12c Author: Camille Simon <43054281+camsim99@users.noreply.github.com> Date: Mon Oct 21 16:42:13 2024 -0700 [video_player_android] Correct rotation of videos recorded by the camera (#7846) Hopefully 🤞 corrects the calculation used to determine the rotation correction of the video being played. These are the different cases this addresses: 1. **Strictly below Android API 22:** Kept this calculation the same as before because I was not able to test it. For context, it uses an unapplied rotation degrees reported by the video's size to correct the rotation. Note that this is always 0 after Android API 22+ (see [its docs](https://github.com/google/ExoPlayer/blob/dd430f7053a1a3958deea3ead6a0565150c06bfc/library/common/src/main/java/com/google/android/exoplayer2/video/VideoSize.java#L65)) 2. **Above Android API 22, strictly below Android API 29:** The `SurfaceTexture` Impeller backend is used. From my testing, I see the preview is correctly rotated and sized without any further intervention, so the correction is set 0. 3. **Android API 29+:** The `ImageReader` Impelled backend is used and a preview correction was noticed by the community (see https://github.com/flutter/flutter/issues/154696). To fix this, we now use the rotation correction reported by the video's format. We also now use this rotation to make the fix for a swapped = width and height when the correction is 90 or 270 degrees (indicating that the video is landscape) as the logic did before but instead with the unapplied rotation degrees (see case 1 for context). Tested this on Android APIs 28, 30, 32, and 35. A fix attempt for https://github.com/flutter/flutter/issues/154696. commit aad3fd00f2fb1563783d53783897265a2ba0af5b Author: Greg Spencer Date: Mon Oct 21 13:20:18 2024 -0700 Allow custom blocks to be something other than `Column` or `SizedBox` (#7859) # Description This adds support for allowing block tags recognized by the Markdown processor to insert something other than just a `Column` or a `SizedBox` (the defaults for blocks with children, and without). Without this ability, custom builders can't insert their own widgets to, say, make it be a colored container instead. This addresses a customer request. Fixes https://github.com/flutter/flutter/issues/135848 commit cc3de83fe443f23cd5c12033e64ecb276f91eda6 Author: Stuart Morgan Date: Mon Oct 21 14:05:25 2024 -0400 README commit d258416273e7d0765ecb2b80da7aad2ae23b6002 Author: Stuart Morgan Date: Mon Oct 21 13:59:08 2024 -0400 Version bump commit 8c35dc4eaf95d17fe92a89d7b8d63c791cbbd4bd Author: Stuart Morgan Date: Mon Oct 21 13:56:23 2024 -0400 Pubspec validation commit c0a1530ee98b85befa073372b8fc897a6640c5f0 Author: Stuart Morgan Date: Mon Oct 21 13:48:09 2024 -0400 No pubspec lock files checked in, per repo convention commit ca49442260c0e4458981bd9605135604bec6bf2b Author: Stuart Morgan Date: Mon Oct 21 13:46:14 2024 -0400 Remove analysis options, update code accordingly commit fb82a4bd12dd85edbffafdfc57d2fb37618627fc Author: Stuart Morgan Date: Mon Oct 21 13:23:06 2024 -0400 CHANGELOG format commit 6fd4a9eb98962625fa48787c004f4528d5fcfc94 Author: Stuart Morgan Date: Mon Oct 21 13:21:10 2024 -0400 Remove Cirrus config commit b89a5640b810cd32f1d44a22f35ee03ef6b6ad30 Merge: 2c1b4a787 ebafccec2 Author: Stuart Morgan Date: Mon Oct 21 13:18:58 2024 -0400 Merge remote-tracking branch 'path-parsing/master' into import-path-parsing commit 2c1b4a7876f9564fe6f5cf75c386992c69645108 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Oct 21 16:04:52 2024 +0000 [camera]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/camera/camera_android/android (#7905) Bumps androidx.annotation:annotation from 1.8.2 to 1.9.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.8.2&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit b6f7e47c75869f9271280afd674405ec71ffd175 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Oct 21 15:58:59 2024 +0000 [path_provider]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/path_provider/path_provider_android/android (#7895) Bumps androidx.annotation:annotation from 1.8.2 to 1.9.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.8.2&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit dafd7530115768e56abc576a6c58dfb96f8f767f Author: stuartmorgan Date: Fri Oct 18 15:35:16 2024 -0700 [in_app_purchase] Update iOS Pigeon for non-nullable generics (#7820) Updates the Pigeon definition to uses non-nullable generics now that it's possible. Leaves a few nullable value types in maps where that corresponds to the public API of the collections passed in, so reflects an API decision rather than a Pigeon limitation. While updating this, also fixes the fact that the Obj-C Pigeon generation wasn't configured to use a prefix, which created the possibility of collision with Apple code due to using an Apple-reserved prefix on all the Pigeon-generated code. Part of https://github.com/flutter/flutter/issues/155891 commit 3b7ee860b1f960657a5816f633bd1dea062ec739 Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Fri Oct 18 13:34:55 2024 -0600 [interactive_media_ads] Adds internal wrapper for Android native `Ad` (#7880) commit b2cc3132f1644530026335da54e4b53f7aaa9c5d Author: stuartmorgan Date: Fri Oct 18 12:25:58 2024 -0700 [video_player] Remove Android API 19 SSL handling (#7876) `video_player_android` has special code for API level 19 to enable some TLS versions that are supported but not enabled by default in that version (starting in 20, they are enabled by default). It has a min Flutter SDK version of 3.24 now, however, and 3.24 no longer supports API version 19, so we no longer need this code. See discussion in https://github.com/flutter/flutter/issues/143649 commit 8be261cd6d12dac412912914c464b5646f0d5f01 Author: yaakovschectman <109111084+yaakovschectman@users.noreply.github.com> Date: Fri Oct 18 14:01:53 2024 -0400 [google_maps_android_flutter] Convert `Config.sdk` to `minSdk` in Robolectric tests and lower to `LOLLIPOP` (#7805) Tests in the title package that are run using the Robolectric test runner will now run on all SDKs level >= LOLLIPOP (i.e. 21). Raises max heap size to 1G. Affects only tests, should be version-bump exempt. Fixes https://github.com/flutter/flutter/issues/152931 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [ ] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests commit 2a1c477a788c1e0cd3e48c96fec97ffcbe5874e0 Author: yaakovschectman <109111084+yaakovschectman@users.noreply.github.com> Date: Fri Oct 18 12:37:36 2024 -0400 [camera_android] Convert Dart to native calls to use Pigeon (#7874) Add structured types and convert implementations to use typesafe method calls for platform methods from Dart to native side. Android analog of https://github.com/flutter/packages/pull/6601 Part of https://github.com/flutter/flutter/issues/117905 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [ ] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests commit c23f4be3d66c8f300043ca51d28e55d6e33b8326 Author: ftsui Date: Thu Oct 17 16:48:06 2024 -0700 [url_launcher] Decode file URLs before passing it to ShellExecuteW (#7774) - ShellExecuteW does not handle file: urls that contain %-encoded UTF-8 strings correctly. %-encoded ASCII strings are handled correctly, as are file "urls" that contain Unicode strings in its path component. - This change perform URL decode on file: urls before passing to ShellExecuteW. Fixes https://github.com/flutter/flutter/issues/156790 commit e19503e86f911ce26127291e25ba63a54401ba27 Author: LouiseHsu Date: Thu Oct 17 15:23:20 2024 -0700 [in_app_purchase_storekit] Add support for purchase and transactions (#7887) This PR contains the preliminary implementations for handling [purchases](https://developer.apple.com/documentation/storekit/product/3791971-purchase) and [transactions](https://developer.apple.com/documentation/storekit/transaction) Of note, as of StoreKit 2, the [result of a call to a purchase will only return a Transaction](https://developer.apple.com/documentation/storekit/product/purchaseresult) when the purchase is successful. If the status of purchase is pending, or cancelled, nothing will be returned. This is in contrast to StoreKit 1, where developers could check the state of a Transaction with [TransactionState](https://developer.apple.com/documentation/storekit/skpaymenttransaction/1411275-transactionstate). This means that migrating to StoreKit 2 will require developers to update their handling of transactions accordingly. Relands https://github.com/flutter/packages/pull/7574 commit a99f9e6e64a3d88f936bbfa6269a42e7ef298a9e Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Thu Oct 17 13:01:39 2024 -0600 [interactive_media_ads] Adds internal wrapper for iOS native `IMACompanionAd` (#7873) commit 5582669ac6d0899e60d2811eb42cea0a7aa84298 Author: Mairramer <50643541+Mairramer@users.noreply.github.com> Date: Thu Oct 17 15:10:21 2024 -0300 [two_dimensional_scrollables] Fixes TreeViewNode collapsing not working (#7474) Fixes [154295](https://github.com/flutter/flutter/issues/154295) This change addresses bug [#154295](https://github.com/flutter/flutter/issues/154295) by ensuring that nodes are handled correctly when closing their children. commit 870114d7aeeacafc7e4a7e98637bf79ee06a0962 Author: stuartmorgan Date: Thu Oct 17 10:32:23 2024 -0700 Revert "[in_app_purchase_storekit] Add support for purchase and transactions #7574" (#7886) Reverts flutter/packages#7812 See https://github.com/flutter/packages/pull/7812#issuecomment-2419280873 commit f12eda7db7ce02861cd0bbe91404a8f5920a64c7 Author: yaakovschectman <109111084+yaakovschectman@users.noreply.github.com> Date: Thu Oct 17 12:48:23 2024 -0400 [camera_android] Mark `description` in `sendCameraErrorEvent` as `@NonNull` (#7877) `sendCameraErrorEvent` is package-visible and only called in `Camera.java` and `CameraTest.java`. This should be test- and version-exempt, as it is essentially just an annotation change. Fixes https://github.com/flutter/flutter/issues/156729 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [ ] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests commit 6a4b660482cbd2a04e55c26ccff61f404b1cbbc1 Author: Chris Bracken Date: Thu Oct 17 03:29:17 2024 -0700 [image_picker_web] Loosen mime dep to >=1.0.4 <3.0.0 (#7879) Provides version interop for projects that depend on mime version 2.0.0 and later. The breaking version change was due to a change in the return value of `extensionFromMime`, which is unused in `image_picker`. See: https://github.com/dart-lang/tools/blob/main/pkgs/mime/CHANGELOG.md#200 Fixes: https://github.com/flutter/flutter/issues/156905 commit e973bf3d08a71ca922280d6d837ce68b140cce0e Author: FMorschel <52160996+FMorschel@users.noreply.github.com> Date: Thu Oct 17 07:17:39 2024 -0300 Removing unnecessary parenthesis (#7881) This is simply removing unnecessary parenthesis from various places inside the packages. This change is because of a change to the unnecessary_parentesis lint that will trigger in these places. Here is the CL https://dart-review.googlesource.com/c/sdk/+/390161. - https://github.com/dart-lang/linter/issues/4996 If anything else is needed please let me know. I'd like to ask for this PR to wait a bit until the bots are run again on that CL so that I can be sure nothing else will trigger, I will come back here and update this whenever everything is complete. Thanks! commit c1435edc9c5444eb255ca18f1e879fc7a02d0959 Author: LouiseHsu Date: Thu Oct 17 03:17:36 2024 -0700 [in_app_purchase_storekit] Add support for purchase and transactions #7574 (#7812) This PR contains the preliminary implementations for handling [purchases](https://developer.apple.com/documentation/storekit/product/3791971-purchase) and [transactions](https://developer.apple.com/documentation/storekit/transaction) Of note, as of StoreKit 2, the [result of a call to a purchase will only return a Transaction](https://developer.apple.com/documentation/storekit/product/purchaseresult) when the purchase is successful. If the status of purchase is pending, or cancelled, nothing will be returned. This is in contrast to StoreKit 1, where developers could check the state of a Transaction with [TransactionState](https://developer.apple.com/documentation/storekit/skpaymenttransaction/1411275-transactionstate). This means that migrating to StoreKit 2 will require developers to update their handling of transactions accordingly. Relands https://github.com/flutter/packages/pull/7574 commit a35f02d79d0e1d8267f2a31e35124f1ce6bde998 Author: Matan Lurey Date: Tue Oct 15 15:58:58 2024 -0700 Convert use of `mini_player` in the `video_player_android` test to `AndroidVideoPlayer`. (#7847) Closes https://github.com/flutter/flutter/issues/156424. Also improved an error message that came up as a result. commit 11adfdef7a7e1dd9932796f265e71bc03a8560dc Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Tue Oct 15 15:54:01 2024 -0600 [interactive_media_ads] Adds internal wrapper for Android native `UniversalAdId` (#7833) commit 57a250f63afcca07601f7bc3b919b04c4d58c5b1 Author: Dan Field Date: Tue Feb 20 10:26:07 2024 -0800 Relax http (#1041) * Relax http * update test package too * format; commit cd6b96c4a017b4a7741750c2ad34c1cef10bf58b Author: Dan Field Date: Tue Feb 20 10:13:01 2024 -0800 relax http (#235) commit 821cd418f317825d8331a958fd99e0fdbddeb5e6 Author: Dan Field Date: Tue Feb 20 08:54:04 2024 -0800 Use package:http, drop dart:html (#1038) * Use package:http, drop dart:html * Format commit 8d419a7e3d2f453dc3eeae4f8961e1ae82957eba Author: Dan Field Date: Tue Feb 20 08:23:16 2024 -0800 Use package http (#234) * Use package http * delete test commit 79f23b98a7c45f3b44899d69bacf7a0242dc651d Author: Dan Field Date: Tue Feb 6 11:34:03 2024 -0800 Save before clip (#232) commit cf8ca2a8f05d054dc4e27e06d75013be63d30ea1 Author: Dan Field Date: Mon Feb 5 10:28:39 2024 -0800 Get Github back up to date, update versions for latest publication prep (#230) commit e1cbf127a0b1c409c4a28e9fdc14e15db4370da9 Author: Jason Simmons Date: Mon Feb 5 09:55:29 2024 -0800 Apply a clip rectangle if a color filter is used (#229) Skia's SkCanvas::saveLayer does not implicitly clip to the bounds rect. See https://github.com/flutter/flutter/issues/142620 commit 347e0626588ea933f9e58ee59a9464b6b5545db1 Author: Dan Field Date: Mon Jan 8 09:58:40 2024 -0800 Scientific notation should not be case sensitive on the `e` parameter. (#227) * oops * Fix scientific notation parsing * Update packages/vector_graphics_compiler/test/parsers_test.dart Co-authored-by: Jonah Williams * Fix up analysis issues and half implemented test --------- Co-authored-by: Jonah Williams commit ab9bf4fcf89228004de50f069e007b438ab77b64 Author: Sam Rawlins Date: Tue Dec 5 13:49:41 2023 -0800 Avoid expanding the parameter type of operator== (#1017) Object.operator== takes an `Object`, and no Dart runtime passes a `null` value to an `==` implementation. SvgTheme's implementation should not have an expanded parameter type of `dynamic`. See https://github.com/flutter/flutter/issues/117838 for the overarching issue for Flutter. Co-authored-by: Dan Field commit 8fdc7acd853e4492cf7397b36cb14e1cf0a942b2 Author: Dan Field Date: Tue Dec 5 13:44:13 2023 -0800 ignore unnecessary cast commit 77fabaac88890b292009a44389c1bdba97c54b1f Author: Dan Field Date: Tue Dec 5 13:39:07 2023 -0800 skip out of date test commit 9dc43db4ec3f056f0b40a873d09738b4c034467c Author: Dan Field Date: Tue Oct 31 15:10:12 2023 -0700 Fix semver violation for SvgPicture (#1008) * Fix semver violation for SvgPicture * fix for older versions of flutter? commit 2663a4324f380aad0d1da8feffbbcb635710bb12 Author: Dan Field Date: Tue Oct 24 16:06:04 2023 -0700 missing file commit e82a974492f4ef37fc3091314c6bcba9ede4c4fa Author: Dan Field Date: Tue Oct 24 16:04:47 2023 -0700 fixes commit 30dcccf20582a674dd728a6aafb3e570e06905f3 Author: Andrew Brampton Date: Tue Oct 17 14:38:28 2023 -0700 Fixes issue where a incorrect key was being given to the ImageCache (#1000) * Fixed the hashcode in SvgStringLoader and SvgBytesLoader. It was accidently using the svg global object, instead of a local field. This caused caches (such as PaintingBinding.instance.imageCache) to misbehave. * Add a test which ensures the embedded image in a SvgPicture is not incorrectly cached and carried over. commit 00c6ee5d4642fac59df4f043e0de4021c4bf87eb Author: Andrew Brampton Date: Tue Oct 17 13:42:08 2023 -0700 Fixed formatting broken in https://github.com/dnfield/flutter_svg/pull/999 (#1001) I originally didn't format the debugFillProperties because that seems to be what happens in the main flutter library (presumably for better readability), but here it breaks the presubmits. So here is a quick `dart format`. commit 9869ae19d3ea9e20628ced04b435ba40d6d8df6f Author: Andrew Brampton Date: Mon Oct 16 09:58:13 2023 -0700 Added debugFillProperties to SvgPicture to enable easier debugging. (#999) commit 7d7e4f5d53569507c113e22203fff7054a0bdb73 Author: Levente Morva Date: Fri Oct 13 18:53:11 2023 +0200 Fix parsing transforms with scientific notation (#220) commit 2ecf14dd5ffb21f16aafe33a3a8628660a070bac Author: Dan Field Date: Wed Oct 11 20:15:16 2023 -0700 Avoid stack overflow when self-referential elemetns present, only use… (#218) * Avoid stack overflow when self-referential elemetns present, only use first ID * bumps commit d933650da8ec0d1a331d4a4f1f92b5a017c84b6a Author: Dan Field Date: Wed Oct 11 14:51:12 2023 -0700 fix analysis issues commit 9f85305ec1b3021f822b295a0d483c0f18261e90 Author: Andrew Brampton Date: Tue Oct 10 15:50:00 2023 -0700 Improve the error message every so little. (#216) commit 2873b3b1c50df59f177ce2b72d6bd1c426f2103d Author: fursan abdulhak <65540215+FursanAbdulhak@users.noreply.github.com> Date: Thu Sep 21 19:33:22 2023 +0300 add option --out-dir to packge vector_graphics_compiler (#215) * add option --out-dir to packge vector_graphics_compiler * reflect code to use path package * add unit test to option --out-dir * Lower path constraint --------- Co-authored-by: Dan Field commit 6cf1dfbb50486e28ad677d097c5dc42c5340f2cd Author: GP4cK Date: Fri Jul 14 00:57:12 2023 +0800 Adds DefaultSvgTheme (#964) commit dd0ba28d996a2ce1920e0e98b025e90b16c7fbf3 Author: Dan Field Date: Thu Jun 15 09:03:48 2023 -0700 Transform parser bugs (#208) * Fix parsing bugs in transform parser commit e4afb7b5331f70b49f1a3f8b025e6273b1aa5123 Author: Dan Field Date: Mon Jun 12 10:29:59 2023 -0700 Fix broken textDirection (#940) commit 5e4c73fef4e248fc303e432499357c1f25a4078e Author: Dan Field Date: Mon Jun 12 10:21:24 2023 -0700 Support matching text direction (#207) commit 5e696837b73f35d2a7536f7cb0abea55d92b9560 Author: tattuu Date: Sun May 28 04:12:34 2023 +0900 Fix typo in README.md (#929) commit e0d175cc957bde8af3037aa9da89d563342745a6 Author: Dan Field Date: Fri May 26 20:58:10 2023 -0700 License for _test commit fa4df358ae7910f18aa01efdd877d6da44777c3c Author: Dan Field Date: Thu May 18 11:20:44 2023 -0700 License file commit fe604e59981a73003a2e9d070f80a391b75589c4 Author: Dan Field Date: Thu May 18 11:19:24 2023 -0700 Fix analysis for CI, update changelog, roll v_g further (#924) * Fix analysis for CI, update changelog, roll v_g further * Update goldens commit 4e716d6fe6d09e7f1e5b9ef8e9a13335ba816967 Author: Dan Field Date: Thu May 18 10:35:53 2023 -0700 Fix text position computation (#206) * Fix text position computation * Bumps commit 1373fc3508988fd15d2571380ddcffd4c40c3ed6 Author: Mr John <38257989+MrJohnDev@users.noreply.github.com> Date: Thu May 18 08:33:28 2023 +0700 [deps] update vector_graphics to 1.1.5+1 (#923) commit a35d8a2a1b6bc73f330174974f20a2f9801cdf9d Author: Carlos Humberto Date: Mon May 15 16:38:57 2023 -0300 - fixed bug of Unhandled Exception: Null check operator used on a nul… (#204) * - fixed bug of Unhandled Exception: Null check operator used on a null value - which was caused by the href! of the function static void use(SvgParser parserState, bool warningsAsErrors) in parser.dart * - added test of use circle without href * - added forgotten update of test * format --------- Co-authored-by: Dan Field commit 71a764d3a9e3adfbc05a9c376b13898240e5508d Author: Dan Field Date: Thu May 11 16:06:03 2023 -0700 Update widget_svg_test.dart commit 4499792d13fe403550c2f55f21080e06ab834728 Author: Dan Field Date: Mon May 1 09:20:45 2023 -0700 rework example commit ce0cb4a4b0ff5b38a38601c5f5f5dc8636b5ddc2 Author: Dan Field Date: Thu Apr 27 09:07:21 2023 -0700 Fix optimization bugs in mask and overdraw optimizers (#203) commit 29214ebfb8ce2c453075909b19f4da62d1fb7220 Author: Dan Field Date: Mon Apr 24 10:57:33 2023 -0700 Fix assertions about image formats (#202) * Remove stray assert about image formats that is no longer valid * fix test, fix deprecations, bump xml package dep commit 85292f14e80ba397324146031b06fa61c56a6ca1 Author: Jason Simmons Date: Thu Apr 20 09:58:37 2023 -0700 Update test golden images for the latest Skia roll (#908) commit c841da48983cfddb189e2261225dc6a27828c7ab Author: Dan Field Date: Wed Apr 19 15:20:10 2023 -0700 Update README.md commit 3080b52d45672e6878954d98314044f4d8e433b1 Author: Dan Field Date: Wed Apr 12 10:17:02 2023 -0700 Fix text positioning when transform but no x/y or dx/dy (#201) * Fix text positioning when transform but no x/y or dx/dy * format * avoid encoding identity commit a0a25cd06f39d3a47532f29c3460097828754e45 Author: Dan Field Date: Wed Apr 12 09:25:46 2023 -0700 Support whitespace in transforms (#200) commit 9042f34d97f1f3d385700e9c9d922d88eb133a57 Author: Dan Field Date: Tue Apr 11 09:21:42 2023 -0700 update changelogs commit 2a4b2ce68ab8ed81e4637319e718d1f7873b8baa Author: SimonWeidemann <79831243+SimonWeidemann@users.noreply.github.com> Date: Tue Apr 11 18:16:18 2023 +0200 Add svg finder (#880) * Extract flutter svg to package * Add flutter svg test library * Adjust readme * Update and rename ci.yml to flutter_svg.yml * Create flutter_svg_test.yml --------- Co-authored-by: Dan Field commit 5822336666b995db65cda6a7635cbd82c772b040 Author: Marco Domingos <66222324+Marco4763@users.noreply.github.com> Date: Mon Apr 10 18:59:19 2023 +0100 Added support for a default error widget in case of any exception. (#196) * Added support for a default error widget in case of any exception. Co-authored-by: Dan Field commit bbeaf77ff896609365a8fa97eb348bb12d5124cd Author: Dan Field Date: Mon Apr 10 09:42:51 2023 -0700 Bumps for 2.0.5 commit bab2ce02e7b9df33142d32023ff36d89b762b36e Author: Dan Field Date: Fri Apr 7 20:49:14 2023 -0700 Consider colorMapper for cache key data (#902) * Consider colorMapper for cache key data * format commit ed44dca07a01d15e84a3c2e6a68799c0ced693e7 Author: chunhtai <47866232+chunhtai@users.noreply.github.com> Date: Wed Apr 5 09:48:48 2023 -0700 Migrates test to extends DefaultWidgetsLocalizations (#198) * Migrates test to extends DefaultWidgetsLocalizations * changelog * Update CHANGELOG.md commit d031806c8068058541673809a2b5b578ba997763 Author: Jonah Williams Date: Mon Apr 3 10:46:52 2023 -0700 Add support for encoding control points as half precision floating point (#197) commit 82eaa81ce249ee59735f0f1b4a81737efffef3d5 Author: Dan Field Date: Thu Mar 16 10:57:01 2023 -0700 Make cache respect SvgTheme (#890) commit 685758f430a0711e920cfe3aa0ce85a0d520ddb4 Author: Dan Field Date: Thu Mar 16 09:54:06 2023 -0700 Allow malformed UTF-8 (#889) commit a1a16a3d4dbd541777b79a100baa79b21f9aef0a Author: Dan Field Date: Tue Mar 14 15:07:56 2023 -0700 Remove unecessary file commit 246f5e4547c2b2affa19708876e36321bb238bd6 Author: Dan Field Date: Tue Mar 14 14:34:13 2023 -0700 bumps commit a8e36a2252bef6fdf12a7ccd74c0c15df9578f07 Author: Dan Field Date: Tue Mar 14 14:32:34 2023 -0700 Manage cache count correctly (#885) * Manage cache count correctly * Fix breakage commit 6c97d26443c1f4c4abd5c864704452205cbdc149 Author: Dan Field Date: Tue Mar 14 10:18:14 2023 -0700 Support more image formats, be more tolerant of badly formed MIME types (#195) * Support more image formats, be more tolerant of badly formed MIME types * Bumps commit 6c5b503b8dd2820597c60ddab4e7d892e31c1a2a Author: Dan Field Date: Mon Mar 13 10:45:30 2023 -0700 Fix fill rule inheritence, fix default fill application (#194) * Fix fill rule inheritence, fix default fill application * format commit e9819c64787e815adbccc0fe282f5a31d8395c37 Author: Fabian Klöckner Date: Mon Mar 13 17:18:38 2023 +0100 Reintroduce clip behavior (#860) * Reintroduce clipBehavior See https://github.com/dnfield/vector_graphics/pull/180 * Use vector_graphics PR, revert before merge * Update pubspec.yaml --------- Co-authored-by: Fabian Klöckner Co-authored-by: Dan Field commit c98bc778b78c731f09876fb32c3be8bbb6174b1b Author: Dan Field Date: Thu Mar 9 09:12:19 2023 -0800 Fix faulty cache assertion, bump vg (#879) * Fix faulty cache assertion, bump vg * fixes commit 8658728101454d6afe7a64b81d76c9b6ed233f24 Author: Dan Field Date: Wed Mar 8 19:04:54 2023 -0800 Improve text whitespace handling (#192) * Improve text whitespace handling * Format, update all pubspecs/changelogs commit 72cf2b4c5b7c3ab5c4527006e1ecfa8a0d71af40 Author: Dan Field Date: Tue Mar 7 09:07:14 2023 -0800 v1.1.2 commit b64e124083e8c304890b222de0ef5d98773c9793 Author: Dan Field Date: Mon Mar 6 19:38:27 2023 -0800 Make sure that attributes are inherited down all nodes with children, and handle "none" correctly. (#191) commit 04f70aa64df26637c517e002d0377c3f366e1f68 Author: Dan Field Date: Fri Mar 3 18:37:07 2023 -0800 Version bumps commit 82cd325f581f1382d7eff46a94506ba787dc0acd Author: Dan Field Date: Fri Mar 3 14:00:28 2023 -0800 Fix text parsing (#189) Track text positioning Properly inherit attributes from text/tspan Handle whitespace more like the browser does. commit 1212fc93c68020f169b7674dab42d762ee10357c Author: Dan Field Date: Wed Mar 1 10:03:01 2023 -0800 Preserve stroke-opacity (#190) commit 0fb0be1f06cf561b331f8c7b3b74d491b1e5e57d Author: Dan Field Date: Tue Feb 21 22:22:24 2023 -0800 Consume new vector_graphics commit 54709b8e0ed507216ea4ee628d53c1fc181bda1c Author: Dan Field Date: Tue Feb 21 21:58:54 2023 -0800 Fix currentColor, version bumps/changelogs (#188) commit 7e7e127d4ce5bc01957531de5d152d50bfb4d3db Author: Dan Field Date: Tue Feb 21 20:44:11 2023 -0800 correctly handle opacity and blending when in a saveLayer (#187) commit f43051b76a861f43871bb0abc5c24d083ca481a4 Author: Dan Field Date: Tue Feb 21 14:42:00 2023 -0800 Missing resolution when saveLayer or viewport is involved (#186) commit 1aaafbb2fccf7a514b34067504ae70b1485f48d9 Author: Dan Field Date: Sat Feb 18 08:53:16 2023 -0800 fix opacity on default fills (#185) commit 9ed6f7d221311344112d0f093829089bd7372fb5 Author: Dan Field Date: Fri Feb 17 17:40:46 2023 -0800 Scale stroke width when transforms are applied (#184) * Scale stroke widths * format * fix scale * format commit 4883e2936a0f6c9787a754de9acec1ae92019fdc Author: Dan Field Date: Fri Feb 17 16:00:00 2023 -0800 Fix inheritence for strokes and fills, particularly the w3 svg logo test (#183) commit 1ee57c57f617231c38fbd4af14fedb111b0be876 Author: Dan Field Date: Mon Feb 13 14:06:30 2023 -0800 Fix pattern tracking and application (#181) commit 786cb483d3a0e2380c54c94b77dfe06bd95f748e Author: Fabian Klöckner Date: Mon Feb 13 20:14:22 2023 +0100 Reintroduce clipBehavior (#180) * Reintroduce clipBehavior clipBehavior was deprecated in 2.0.0 without any notice in the changelog. It still works fine so this PR reintroduces the parameter. * Add tests to ensure clipBehavior is being passed correctly --------- Co-authored-by: Fabian Klöckner commit c27cac9c251cee14c8675f0e9dfcd85dddd6fdb4 Author: Dan Field Date: Mon Feb 13 09:35:29 2023 -0800 bumps for 2.0.1 commit 7f2b2bc8e23ae4d7ed0e62e0c94862b800aafc5e Author: Jonah Williams Date: Mon Feb 13 09:34:32 2023 -0800 disable isolate parsing in debug mode (#854) Co-authored-by: Dan Field commit 748001681bd73b58590a45cc2ef7155e29483927 Author: Jonah Williams Date: Mon Feb 13 09:09:31 2023 -0800 Hide vector_graphics_compiler types (#853) commit b11e216ecacf626866188da5aafeeabcb2ecd46b Author: Jonah Williams Date: Thu Feb 9 21:02:35 2023 -0800 Fix opacity peephole with complex nested groups + clip (#179) commit 093956c1e6deef5272c091866e83efee2f39a317 Author: Xavier H Date: Thu Feb 9 19:18:10 2023 +0100 Respect packageName in AssetBytesLoader (#178) commit 84a6550b5cf41ddf7751ced9f295fa36f7c04144 Author: Tomasz Gucio <72562119+tgucio@users.noreply.github.com> Date: Tue Feb 7 19:02:43 2023 +0100 Fix alpha channel parsing in hex colors (#172) commit 823a7517c68cf1b6647f219603107b5247e05225 Author: Dan Field Date: Mon Feb 6 11:14:33 2023 -0800 fix gradle versions commit 70c14b6bb93d8dfd493e870ed4773259d4aea7c7 Author: Dan Field Date: Thu Feb 2 22:06:49 2023 -0800 Packages (#838) commit 97d8e148731aea11949203f7b6061ab8793aa871 Author: Dan Field Date: Thu Feb 2 10:18:43 2023 -0800 Fix CI (#835) commit 8e62b6bed8ee3cba17cfc4a7b617f84ba4ec5d6a Author: Dan Field Date: Thu Feb 2 10:02:09 2023 -0800 more commit e8ec6c387bf6291c03c7c612dc8efcd2d42e95bd Author: Dan Field Date: Thu Feb 2 09:57:59 2023 -0800 Fix CI commit 4ec85378df67c285d6901f93b25f9f93e0eb89a5 Author: Dan Field Date: Thu Feb 2 09:53:16 2023 -0800 bumps commit 96e65c67cf577b3164c9637d6d9d04e9292ef04a Author: Dan Field Date: Thu Feb 2 09:11:03 2023 -0800 pub bumps commit 7db7c017c44867942dbbab91bd1fff22de401068 Author: Dan Field Date: Thu Jan 26 16:24:37 2023 -0800 Avoid defaulting to black fill for non-shape/text content. (#176) commit 78dc13ea229b8a0c645a71ae95d7f31140d79c3a Author: Dan Field Date: Fri Jan 20 11:09:05 2023 -0800 readme commit 0fe50dd6f7c453631841096d6216d9fafb89677f Author: Dan Field Date: Fri Jan 20 11:06:34 2023 -0800 fix pubspec commit e92e719ba4be1e3c63e245c5cf2d8d2f5e4d72d1 Author: Dan Field Date: Fri Jan 20 11:01:22 2023 -0800 more commit 1fdf4f5f89b749c609520298bc0958a94a0a9102 Author: Dan Field Date: Fri Jan 20 10:59:35 2023 -0800 changelogs commit 7d6702ebff5878bed1b61376629ac4be15ce45c4 Author: Dan Field Date: Thu Jan 19 15:04:19 2023 -0800 Correct matrix operation order for unusual combination (#175) commit c5e384c9ac802c17f21e08e23edbabce6cbbcdfe Author: Dan Field Date: Tue Jan 17 12:40:21 2023 -0800 Patterns work at runtime (#174) * Patterns work at runtime * fix analysis commit 3b8f0a08b547beb8c1accc3e7e4c7f11783193dc Author: Dan Field Date: Sun Dec 11 14:27:31 2022 -0800 Avoid anon closure (#817) commit 2bfb5e89e92b598957e20da737e6af59bb932749 Author: Jonah Williams Date: Fri Dec 9 18:25:07 2022 -0800 update readme to add more details about precompiliation (#816) * update readme * update versions for prelease and remove unused code * re-word and combine commit 857527280b266774ad8e052521c69dafe5dd1a2f Author: Dan Field Date: Mon Nov 21 09:27:57 2022 -0800 Drop unused deps (#808) * Drop unnecessary deps * Remove unused deps * MORE commit 078738d2f0cf890353c9a480bc5167c8675209c1 Author: Dan Field Date: Fri Nov 18 14:57:08 2022 -0800 Start using VG (#782) Use vector_graphics. Flutter_svg 2.0! commit 67a83fa0e0fbd39359116df365a403506fd73f79 Author: Dan Field Date: Fri Nov 18 14:22:56 2022 -0800 Version 1.0 bumps (#169) commit e727bb6af9c93523394b11c454e8ef9818133744 Author: Dan Field Date: Thu Nov 17 13:38:30 2022 -0800 Use the ImageCache for images in the SVG (#168) * Use the ImageCache for images in the SVG * finally commit b4dcd9cde0894e06762709b67949083437d4c4c9 Author: Dan Field Date: Wed Nov 16 16:59:15 2022 -0800 Support golden testing (#167) commit 1f66577d7cf76698530b619a59acd05b83aed5f2 Author: Dan Field Date: Fri Nov 11 23:08:54 2022 -0800 N'SYNC (#166) commit 13657b2ca5867995a07b83d09b1b0d5ce22d4017 Author: Dan Field Date: Thu Nov 10 13:39:09 2022 -0800 EVEN MORE SYNC (#165) commit 4fa00a14639a0b345139bd24f694729179f7cd2c Author: Dan Field Date: Wed Nov 9 20:26:00 2022 -0800 Make parsing synchronous? (#164) commit 115250509c84fb3c5269a3adf20dc778805ca9f4 Author: Dan Field Date: Wed Nov 9 11:38:41 2022 -0800 Scale images correctly (#163) commit ba536d22f11e5675b3634b60a55f344607afe362 Author: Dan Field Date: Tue Nov 8 16:47:36 2022 -0800 Images in defs (#162) commit b5801cd4cf6309d763bf5bf3eaa146fb3acab4c3 Author: Dan Field Date: Tue Nov 8 12:08:43 2022 -0800 Add clipViewbox parameter (#161) commit 88036ebe90ae3de93e02a2c47ad9059019d3a576 Author: Dan Field Date: Mon Nov 7 14:54:39 2022 -0800 All compile-time color remapping. (#160) commit 06e9cc9382ba6c010d4a053daf3011d6034ac30d Author: Dan Field Date: Sat Nov 5 13:33:22 2022 -0700 Add tool to validate pubspecs (#156) commit 88a7f7bfabb47b4af7e19d21ca443bb85ddb7861 Author: Jonah Williams Date: Sat Nov 5 13:33:00 2022 -0700 remove pool dependency (#157) commit 519a6c8472ee5a03cd049382c70475fbc54a853d Author: Dan Field Date: Sat Nov 5 11:21:39 2022 -0700 more... commit c5f0d44701cfb3d3e956b5c29258f5046ff59d3a Author: Dan Field Date: Sat Nov 5 11:16:52 2022 -0700 fix pool commit 3d7cd1b23476757399007284f6693f8d1941a2fd Merge: 9a97a1331 8d9dcb814 Author: Dan Field Date: Sat Nov 5 11:15:12 2022 -0700 Merge remote-tracking branch 'origin/main' commit 9a97a13318b31ac220cca5a212b5bf5039e6eda9 Author: Dan Field Date: Sat Nov 5 11:14:46 2022 -0700 pubspecs commit 8d9dcb814b2e78ba4567e37366ed4000f0a67183 Author: Dan Field Date: Fri Nov 4 18:45:47 2022 -0700 Allow build context to be nullable (#155) * Allow build context to be nullable * format commit f50b98a7a07bb8c120a511be71666b09c3845a38 Author: Dan Field Date: Fri Nov 4 13:20:49 2022 -0700 Make compiler safer for web (#154) * Make compiler safer for web * missing file commit 6c59070d24b89a880e3a91d0b4b0afd151ab5a85 Author: Ahmed Ashour Date: Tue Nov 1 16:22:55 2022 +0100 Remove `dead code` for uninitialized variable `definitionPaint` (#153) commit c6b9871b20002b00bc7f6e6eac367fbcca042543 Author: Jonah Williams Date: Thu Oct 27 13:26:33 2022 -0700 fix bounds of saveLayer (#152) commit b65cb97c4614ce1d148b4afc013403d06880613c Author: Dan Field Date: Tue Oct 25 10:21:26 2022 -0700 Apply transforms to more nodes, fix bugs in image transforms (#150) commit 56ca1d3550f771ce5d17db69c7e8859047f10f09 Author: Dawid Wysocki <62249621+TortillaZHawaii@users.noreply.github.com> Date: Tue Oct 25 10:48:07 2022 +0200 Fix typo (#799) commit 9e15bb80b37da9872c2681e94e5da95159adb7fd Author: Dan Field Date: Tue Oct 25 00:37:19 2022 -0700 version bumps commit bd5377a01e820220da60cf3ea317603bb2ed8ab2 Author: Feodor Fitsner Date: Mon Oct 24 22:09:32 2022 -0700 Apply image transform before translate and scale (#790) * Apply image transform before translate and scale * Added golden test * Fix SVG * Update image.png commit dfa0ca699e6a4ffba620388a569bfb01b5a230a4 Author: Dan Field Date: Mon Oct 24 12:00:29 2022 -0700 Fix clip transforms (#149) * Fix clip transforms * format commit c11458171734bb1657f0c94983624373f7a86644 Author: Feodor Fitsner Date: Mon Oct 24 10:24:30 2022 -0700 Transform clip path when applied to a group (#794) * Transform clip path when applied to a group Fix #136, #343, #566 * Golden test added commit 8cd544557388dc1d5dcbfd6e83f162b8299499e8 Author: Dan Field Date: Sat Oct 22 14:30:48 2022 -0700 Fix zero width strokes (#148) * Fix zero width strokes * format commit b2e20fccdddfd3e2f0e8324655c5603411656f0f Author: Feodor Fitsner Date: Sat Oct 22 13:25:39 2022 -0700 Strokes with zero width should not be painted (#798) Fix #797 commit 80e8d244b2dcfee805813c10f778f58e67acb774 Author: Dan Field Date: Fri Oct 21 20:54:21 2022 -0700 Support text-anchoring (#147) * Support text-anchoring * fix incorrect comment commit 30547c8ee0fcd3da9c7ad2246b5c49688582b519 Author: Dan Field Date: Fri Oct 21 16:52:51 2022 -0700 Support text decorations (#146) commit 30288dd20f0b6d303b7f20d76294f14f8e03a3e5 Author: Dan Field Date: Thu Oct 20 20:53:18 2022 -0700 missed commit 9adc819f6ef7a2e6c3898b2717255cad0f4412f1 Author: Dan Field Date: Thu Oct 20 20:51:48 2022 -0700 version bumps for 0.0.3 (#143) * version bumps * delete outdated test commit e8f278c77db8b4b1c3d3f3cb119dcaccba98cc57 Author: Dan Field Date: Thu Oct 20 08:20:17 2022 -0700 Wire up SVG theme related properties to compiler (#142) commit bcc89665f02fe69297f5c1de98d5f1521523efe4 Author: Jonah Williams Date: Thu Oct 13 16:36:07 2022 -0500 Add support for drawPicture rasterization strategy (#141) * Add support for drawPicture rasterization strategy * ++ * ++ commit ebafccec209fb096fc6f829fd4036228f58aed46 Author: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Wed Oct 5 16:52:21 2022 -0700 inlined the reading of code units (#10) commit 5c729ebdbc1f2cb6de6d3f5d52c769b05a0945f2 Author: Jonah Williams Date: Tue Sep 27 21:47:55 2022 -0700 HTML backend compatibility (#138) commit 83a07ee0132af5ccb2af5a78c09d06c3d55e54a3 Author: Dan Field Date: Fri Sep 23 23:37:39 2022 -0700 Avoid emitting empty paths (#137) commit 49c97ec7aa99f0b7fb8fbe2dd9ac234fdfdb5bd0 Author: Jonah Williams Date: Fri Sep 23 11:32:24 2022 -0700 add a hidden debugging format --dump-debug (#136) commit d1561e21338ebca0278ce9bbbbfe86aa4e11c761 Author: Jonah Williams Date: Thu Sep 22 17:01:17 2022 -0700 Allow processing SVGs in parallel with Isolate.run (#135) commit ddf18dc7c6bba4c9ea5ed691f4ff419d6e830ec6 Author: Dan Field Date: Wed Sep 14 14:23:51 2022 -0700 Fix fill type for applyOp (#134) * Fix fill type for applyOp * format * fix incorrect tests commit 2fcc58a8814ddac7f8c2920a73789b2d65ae2a61 Author: Dan Field Date: Fri Sep 9 10:10:57 2022 -0700 Be more permissive when parsing colors (#132) commit 20b909f99f6bc1ba6816ead8fe1838dd7e5c7439 Author: Dan Field Date: Fri Sep 9 10:09:46 2022 -0700 Colors (#773) * be more permissive about color strings * fix test * update goldens commit 1b142fcd7d92e9114fe3845600f181c0b30253d7 Author: Dan Field Date: Thu Sep 8 12:11:49 2022 -0700 Dispose paragraphs! (#131) commit 703a9a6bc6d1626e184c05bc3d957adab8a13eee Author: Dan Field Date: Tue Sep 6 10:06:13 2022 -0700 Dispose vertices (#130) commit 78b325e5beffd70aafdd88c61db5e6fc8058aaf9 Author: Joachim Nohl <43643339+nohli@users.noreply.github.com> Date: Tue Sep 6 16:36:04 2022 +0200 Update pub.dev links (#767) Co-authored-by: Daniel Flores Medina <78251680+Dev-dfm@users.noreply.github.com> Co-authored-by: Daniel Flores Medina <78251680+Dev-dfm@users.noreply.github.com> commit 291ca057f396e7c5543df051e7e1db84adff658b Author: Dan Field Date: Wed Aug 31 16:40:04 2022 -0700 Handle quads (#128) * Handle quads * missing case commit 2afe05271da29184b85d582d42f2c06966aaf8a2 Author: Dan Field Date: Wed Aug 31 10:05:24 2022 -0700 dispose things after using them (#127) commit b0417041a1e263746af4dfb0447421b348190011 Author: Dan Field Date: Thu Aug 25 13:33:51 2022 -0700 Fix typos, make exception more helpful if decoding fails (#126) commit 691613075602bd83fd052d0424c6cb3efb598c40 Author: Dan Field Date: Tue Aug 23 20:57:02 2022 -0700 Do not draw strokes unless a stroke color, pattern, or gradient is specified (#124) commit 16a1e6117e09fa479d79d2f7dd6bf2a45ea2c31c Author: Chiamaka Chukwuka <106709586+c-h-i-a-m-a-k-a-2@users.noreply.github.com> Date: Thu Aug 18 22:07:31 2022 -0700 Support (#110) commit 55d6f39b9dcfbf4b59f4d0294820826e915ad641 Author: Jonah Williams Date: Wed Aug 17 12:44:58 2022 -0700 correctly default image width and height (#120) commit 715b06326914b0419ac5d7bb143b9f0cee456bcc Author: Dan Field Date: Wed Aug 17 11:40:36 2022 -0700 Default image width/height correclty (#750) commit 2c9b87b8a6232cee399edf9223a6a3983e629725 Author: Jonah Williams Date: Thu Aug 11 13:38:38 2022 -0700 move native library tests into optimizer test suites (#118) commit 72f140c583e6461a2d5392d86495a1256465a5eb Author: Jonah Williams Date: Wed Aug 10 12:49:53 2022 -0700 updates for publishing (#116) commit 7275b98a17299b7faf923ec9105cf59d38d773c9 Author: Jonah Williams Date: Tue Aug 9 15:49:00 2022 -0700 make vector_graphics_compiler compile on the web again (#115) commit a00a31ee9891aa528099424d338e269c263fbdc2 Author: Dan Field Date: Fri Aug 5 11:23:51 2022 -0700 bumps commit f5f8ec9120ef5d4feea46f5d00a91be7ee9b7ea3 Author: Dan Field Date: Fri Aug 5 11:22:57 2022 -0700 handle PT values (#747) commit 8140201497076f30c3d3ac28ea8800bc05b34dc0 Author: Dan Field Date: Thu Aug 4 09:27:50 2022 -0700 Support point values (#114) commit 6ba8bed8466a14675958e2fec332e168e7e50d7f Author: Dan Field Date: Thu Aug 4 00:30:15 2022 -0700 Bump path_parsing (#113) commit 384c8eb960ce8ad66da3b03e34c39e2d425cfd56 Author: Dan Field Date: Wed Aug 3 17:58:24 2022 -0700 update goldens commit 509416f3c168bf9350bb34ac41695d389e634dae Author: Dan Field Date: Wed Aug 3 17:41:49 2022 -0700 bump path_parsing commit 74a10e99332e4bff0e4fdc14c3710e0b171b575f Author: Dan Field Date: Wed Aug 3 17:31:01 2022 -0700 Use radians when rotating matrix (#9) * Use radians when rotating matrix * less precision in tests commit 8c4b70b6a67a0abd264cfa4d2fa133804a82873d Author: Dan Field Date: Tue Aug 2 15:09:48 2022 -0700 Make examples work again (#111) commit 7003f59b77b81397e03d9141c7db82edc789b4f2 Author: Jonah Williams Date: Mon Aug 1 14:32:15 2022 -0700 add transform to image and replace transformRect implementation (#109) commit d36b725ab419f664a00e3658a207f6f23d54d190 Author: Chiamaka Chukwuka <106709586+c-h-i-a-m-a-k-a-2@users.noreply.github.com> Date: Mon Aug 1 10:44:24 2022 -0700 Overdraw Optimizer (#105) Avoids overdraw where possible for fills. commit 113d8c9f69001cfa45fef04342f7e9929b12b77c Author: Jonah Williams Date: Thu Jul 28 10:44:02 2022 -0700 Fix Transform and make encoding double (#107) commit 2bf9dc1c47f7c62b28c613abab8f13581d71c624 Author: Jonah Williams Date: Thu Jul 28 10:20:55 2022 -0700 Add compiler support for base64 encoded PNG image data (#104) commit 85ddede66bfe82c61ce320cb994b434da057dba5 Author: Jonah Williams Date: Wed Jul 27 17:43:02 2022 -0700 Codec and runtime support for images (#102) * Codec and runtime support for images commit 5661d3906ff9ce4d7bea4935f9c96d844c85ff56 Author: Chiamaka Chukwuka <106709586+c-h-i-a-m-a-k-a-2@users.noreply.github.com> Date: Wed Jul 27 16:19:24 2022 -0700 Removing uncessesary tesselator variables in path ops files (#103) * pushing all local work 7.6 * The rest of the files * applies mask to every node in group, started including clip node * Solves issue when of when mask's path nodes are embedded * Applies mask in visitPathnode, quits optimizing if stroke property set or empty intersection * some unit tests added * last test * Added path_ops to deps * Removed unused imports * fixed merge * tweaks: c * initial commit for ClippingOptimizer * .. * ... * fixed all issues from PR * .. * Added tests * ... * visitChildren * fixed PR round 2 issues * Update packages/vector_graphics_compiler/lib/src/svg/parser.dart Co-authored-by: Dan Field * .. * removes hard coded pathOps path * fixed analysis issue * fixed enum issue * fixed ci issue * Update packages/vector_graphics_compiler/lib/src/svg/path_ops.dart Co-authored-by: Dan Field * removed masking optimizer from parser.dart * Update packages/vector_graphics_compiler/test/masking_optimizer_test.dart Co-authored-by: Jonah Williams * Update packages/vector_graphics_compiler/lib/src/svg/masking_optimizer.dart Co-authored-by: Jonah Williams * fixed some issues * fixed issues * fixe d * fixed test string * Update packages/vector_graphics_compiler/lib/src/svg/masking_optimizer.dart Co-authored-by: Jonah Williams * removed dart core import * fixed import * ..." " * added command line maskingoptimizer flag fixed path ops dylib issue * . * .. * . * fixed dylib issue in masking_optimizer_test * fixed dylib issue in parser test * adds optimize-clips command line flag, allows for dylib to be loaded when needed for clipping optimier * removed ArgConfig * Update main.dart * Update end_to_end_test.dart * . * fixed ci issue * adds named parameters, fixes some of parser tests * All parser tests fixed * moved ffi components into separate file * fix named parameter * .. * updated parser tests * fixed formatting * Update packages/vector_graphics_compiler/lib/src/svg/clipping_optimizer.dart Co-authored-by: Dan Field * Update packages/vector_graphics_compiler/test/clipping_optimizer_test.dart Co-authored-by: Jonah Williams * fixed all PR issues * fixed dylib loading issue in end_to_end_test.dart * removing un needed path_ops variables Co-authored-by: Dan Field Co-authored-by: Jonah Williams commit 2b40be6c6e75e38319e47e9d2ddad3d0511db09c Author: Chiamaka Chukwuka <106709586+c-h-i-a-m-a-k-a-2@users.noreply.github.com> Date: Wed Jul 27 16:00:04 2022 -0700 Clipping Optimizer (#97) commit bb926228cd0cbaa7dc1691dde906e17df08246a2 Author: Chiamaka Chukwuka <106709586+c-h-i-a-m-a-k-a-2@users.noreply.github.com> Date: Tue Jul 26 22:13:49 2022 -0700 Added command line option for masking optimizer, and corrected dylib loading issue (#100) commit ec950bafd1e3d0baae50e295d7926c24e0f39c22 Author: Jonah Williams Date: Tue Jul 26 17:29:32 2022 -0700 update to 0.0.1 (#101) * update to 0.0.1 * Update pubspec.yaml commit f23a4e7b69d9cf7b37317eb4cf80c9baa16611af Author: Chiamaka Chukwuka <106709586+c-h-i-a-m-a-k-a-2@users.noreply.github.com> Date: Wed Jul 20 13:32:38 2022 -0700 Mask optimizer (#96) Optimize several cases of masking to avoid save layer. commit 28b73e5ffb581ed5f0e4387397fea9eadc5d718e Author: Chiamaka Chukwuka <106709586+c-h-i-a-m-a-k-a-2@users.noreply.github.com> Date: Tue Jul 19 14:02:08 2022 -0700 Migrate PathOps Lib to VectorGraphics (#99) Adds support for consumption of path_ops in the compiler. commit e0bd5b8201de1df8659bb4665e29d7939117eafc Author: Jonah Williams Date: Fri Jul 8 17:08:23 2022 -0700 Use toImageSync and remove tester workaround (#95) commit e6cf981b3ad6a20ae37b5631c5b123f55fbc64eb Author: Dan Field Date: Fri Jul 8 12:46:56 2022 -0700 Make analysis happy (#94) * Make analysis happy * mount check commit 31d3789d045166147cc1b4e46c46fa776ff315e7 Merge: 2ca00500f 7ce79b680 Author: Dan Field Date: Fri Jul 8 11:44:01 2022 -0700 Merge remote-tracking branch 'origin/main' commit 2ca00500f7c987b357364b80ea42275d3bb63d21 Author: Dan Field Date: Fri Jul 8 11:43:20 2022 -0700 Add a more interesting example, bump XML commit beec38545a8fe6d7332024514106b00e7d4a4554 Merge: 7d29bed8f 0cd3cb881 Author: Dan Field Date: Wed Jul 6 14:38:59 2022 -0700 Merge branch 'master' of github.com:dnfield/flutter_svg commit 7d29bed8ffc7490e94f0a890c5bbd3580026d956 Author: Dan Field Date: Wed Jul 6 14:38:44 2022 -0700 missing unused import commit 0cd3cb881d46da3f3ab7bf9915c75063346809af Author: matthewyan Date: Mon Jul 4 15:36:36 2022 +0800 format code (#554) commit 353c2cfeaab36266f56b928d0a4a451cf81e5079 Author: Dan Field Date: Fri Jul 1 20:10:06 2022 -0700 Update currentColor handling. (#730) * Update currentColor handling. Default currentColor to black, mirroring Chrome's behavior. Update callsites to parseColor so that they account for currentColor. Avoid setting a default currentColor on the root element when parsing. Avoid painting when Paint.color == null. commit 7ce79b6802cb0c98862a3b9c16bb0064662be2ce Author: Jonah Williams Date: Wed Jun 29 22:34:25 2022 -0700 use toGPU image (#93) * use toGPU image * update commit 7d886d4f0b933d3b29ff310e4ef24b4a808d6215 Author: Dan Field Date: Tue Jun 28 11:16:47 2022 -0700 fix whitespace, update simple example to be simpler commit 19bccf2ea84cc2e6e54d62707b6bdc4bdda8739f Author: Dan Field Date: Tue Jun 28 09:59:12 2022 -0700 version bumps commit 99fdddb2f94f7a158f5540b2da69c68d68c161e1 Author: Jonah Williams Date: Tue Jun 21 12:56:48 2022 -0700 make disposal non-fatal (#92) commit 43a81ae375dfb8ffdd7217d2e4c35e7c08b75bb9 Author: Dan Field Date: Tue Jun 21 10:46:28 2022 -0700 Fix 720 (#724) * Fix 720 * use Object.hash commit 15332b8c1bf9ac3310191e9139159f601452182b Author: Aliaksandr Luferau Date: Tue Jun 21 19:33:44 2022 +0300 Added the flutter_lints to the development dependency for project 'example' (#723) Co-authored-by: aluferau commit c1e31ab703b2f6d82064d2d66160fa46d876eb89 Author: Jonah Williams Date: Tue Jun 21 08:52:16 2022 -0700 add imperative picture loader (#89) commit 2198e41a2215291cef37099eb1ac3a0bb5355714 Author: Jonah Williams Date: Fri Jun 17 14:37:39 2022 -0700 update goldens for fractional translation (#721) Co-authored-by: Jonah commit 6992b374198d8d549f263430dccef2fb70f9e006 Author: Jonah Williams Date: Fri Jun 17 13:04:44 2022 -0700 prevent double dispoal (#90) commit 754fcad3c655177b676e10109dd91d92345db62a Author: Jonah Williams Date: Thu Jun 16 11:18:13 2022 -0700 Fix typos and create a version of the tessellator optimization that no-ops on web (#88) commit 6bdf45b11343112ed82c2fe08e044d5ed70cb067 Author: Jonah Williams Date: Thu Jun 9 20:42:25 2022 -0700 Add caching system for pictures and rasters (#87) commit 0da866fd4e112200dca22fb55904a3e66cf09b0e Author: Dan Field Date: Fri May 27 08:54:47 2022 -0700 Handle empty dash arrays (#83) commit 9c18d04d544298e8ebde2471a03fb9978ba9e1fe Author: Jonah Williams Date: Tue May 24 16:12:43 2022 -0700 use the same paint color as drawImage (#80) commit 82cb8ee8d8516debc0a8b023e867286113f8c53b Author: Dan Field Date: Mon May 23 22:20:33 2022 -0700 Avoid calling setState on a disposed state (#79) commit 5799cff9731ee70335bb0e659e40a95d1a4bc837 Author: Jonah Williams Date: Mon May 23 19:51:46 2022 -0700 cleanups (#78) commit 1b3fdebc672237714db1ff607794cc2a91d342cd Author: Jonah Williams Date: Mon May 23 10:57:34 2022 -0700 correct scaling approximation and ensure raster has sufficient resolution (#75) commit 3abf2865f77f20cbb0f9bf58174f171237d91ea1 Author: Jonah Williams Date: Mon May 23 10:37:05 2022 -0700 switch to animation for opacity, update docs (#77) commit 2b0e9f22fe84a14fa9e173f0c5f8774e4aeaf91d Author: Dan Field Date: Mon May 23 09:21:49 2022 -0700 remove stale files commit 40abd181fa21bf5006fe476f8ab4263526f898f1 Author: Dan Field Date: Mon May 23 09:20:21 2022 -0700 changelog commit 8c3522a8824554960abaf0dfa65c003f0d27e31f Author: Jonah Williams Date: Sat May 21 14:27:59 2022 -0700 Skip drawing anything if VECTOR_GRAPHICS_SKIP_RASTER is true in debug mode (#74) commit f8f6d75ace774af302d1285a82279993fa45186f Author: Dan Field Date: Fri May 20 16:21:24 2022 -0700 Super parameters are neat (#73) commit a46477dc4b79c36e0a2d747632d49f8007b4f03a Author: Jonah Williams Date: Fri May 20 11:32:54 2022 -0700 Filter/Opacity support and eager rasterization (#71) commit b9e8379f207f4f9a88bfd871ef5cda2f9371ff65 Author: Erdem Yerebasmaz Date: Fri May 20 00:33:11 2022 +0300 Update project to support flutter 3.0 (#713) * Update project to support flutter 3.0 - [Removed deprecated splash screen](https://docs.flutter.dev/development/ui/advanced/splash-screen#migrating-from-manifest--activity-defined-custom-splash-screens) - [Removed deprecated new in comment reference](https://dart.dev/tools/diagnostic-messages#deprecated_new_in_comment_reference) * Update pubspec.yaml * Update pubspec.yaml Upon review, the CI error appears to be in beta channel. I propose we use 2.11.0-0.1.pre as lower bound as it's the version that switches over to Dart 2.17. Co-authored-by: Dan Field commit a9396c79cff73459554a5248e47a3a3fabcecd5e Author: Jonah Williams Date: Wed May 4 20:15:07 2022 -0700 dont force extra compositing (#70) commit 1ee759da89bf47a15cebf25594eade0ddd49236c Author: Fabian Freund Date: Sat Apr 30 22:41:10 2022 -0500 Remove redundant canvas.restore() (#701) commit 6e9dce116c6d0f6854ff67979d42f425505100cf Author: Jonah Williams Date: Wed Apr 27 09:10:52 2022 -0700 Update tesselator to use args and visitor (#57) commit b9ae14af0fb5d903e3791948117b2381cd8df59d Author: Jonah Williams Date: Mon Apr 25 21:53:07 2022 -0700 Don't align float32 and encode control points and control point types separately (#66) commit 696a600d9d652102dc2a9da4d566813509759b19 Author: Dan Field Date: Mon Apr 25 20:58:20 2022 -0700 Clip the fitted box if it would overflow (#69) commit 4b89e8c4f6b332d78e158eca7a99828e983dabfa Author: Jonah Williams Date: Tue Apr 19 23:07:30 2022 -0700 add placeholder builder (#68) commit 2f7aea4075799142b2f517ec651f0a73698cd81a Author: Jonah Williams Date: Mon Apr 18 16:02:07 2022 -0700 Wrap picture in repaint boundary (#67) commit 1a330a513d7b3a04ba71e9dc7311d812b2b79e86 Author: Dan Field Date: Wed Apr 13 09:13:35 2022 -0700 Defer resolving paths for clips, add test for clips with use (#65) commit df786bcff5d851da6fe4322a97eb15fbfb8afd4d Author: Dan Field Date: Tue Apr 12 21:12:41 2022 -0700 Fix sizing, drive by fix for visitchildren on some resolved node types (#64) commit 7b8a89b857b79ccb08350cb1ec95fbb0ce7d16cf Author: Dan Field Date: Tue Apr 12 16:54:26 2022 -0700 Update vector_graphics_compiler.dart (#63) commit 4e973848bce14d2578a51e18ab6a952526eafce2 Author: Jonah Williams Date: Tue Apr 12 15:36:02 2022 -0700 Add semantic properties (#62) * Add semantic properties * is image * format commit 3e1b2c8192798d59f63115eb0d014b8ea860ea79 Author: Dan Field Date: Mon Apr 11 15:38:16 2022 -0700 Licenses (#61) * use Flutter BSD-3 and docstrings commit f67cd0bd612c5284c3a4f4d0714d82d60643893b Author: Dan Field Date: Mon Apr 11 13:54:12 2022 -0700 Fix for importing (#60) commit 37d336c747eb188d5a5e9cc1c13821e12070d671 Author: Dan Field Date: Fri Apr 8 16:22:05 2022 -0700 Cleanup and support web (#59) * Cleanup * delete ImageData * analyzer * jonah review commit a00f990266bf3734ddd70e7d66e9d6abb97dc61b Author: Jonah Williams Date: Thu Apr 7 17:54:52 2022 -0700 Forward opacity and blend mode down the tree (#53) commit cbf6848e473f0373f7825348f6704bae57d1ab56 Author: Jonah Williams Date: Thu Apr 7 16:40:45 2022 -0700 use arg parser to parse input options (#55) commit 7cd09a996c04ea7edd0fb8e041467930cf76b6e7 Author: Dan Field Date: Thu Apr 7 16:36:07 2022 -0700 Update path.dart (#56) commit 8184de97d225aa1893ebbc195628295be76a67af Author: Dan Field Date: Thu Apr 7 16:17:44 2022 -0700 Dashed paths (#54) commit 424198be4e4493f515d408d4a08a1cb84dbe0ea3 Author: Jonah Williams Date: Wed Apr 6 15:02:33 2022 -0700 Add Visitor API, use to implement resolution phase (#51) commit 8d9dce1d4ed91e4f9fd02c42fb8352d01fdcdffe Author: Dan Field Date: Mon Apr 4 09:33:52 2022 -0700 encode text transforms (#50) commit 7869abcdc251f8e7b1537213acb0ea77e9cacd98 Author: Jonah Williams Date: Fri Apr 1 12:45:18 2022 -0700 Add support for text (#40) commit d190056e4dda600eda39025927b0d30b2d4ddf82 Author: Dan Field Date: Fri Apr 1 11:08:44 2022 -0700 Tolerate missing references (#48) commit 33ef4d6c6f542e57deba8f765b0d8d6251c205d1 Author: Jonah Williams Date: Thu Mar 31 23:45:18 2022 -0700 create separate picture layer for vector graphics widget (#47) Should help with raster caching and DRM commit 0297ac3201934e4ad7212bbaa72df4c62ee2159b Author: Dan Field Date: Thu Mar 31 17:06:01 2022 -0700 Make sure that the loadBytes method gets called when dependencies change, add tests, make it easier use context from loaders while still being const (#42) * Make sure that the loadBytes method gets called when dependencies change, add tests, make it easier use context from loaders while still being const * Format, update analysis rules commit 77d132acbd2ba716fc3800dd5c7fcf8153ef95a2 Author: Dan Field Date: Tue Mar 29 17:27:54 2022 -0700 Update tiger.bin, update example, ignore platform folders in example (#39) * Update tiger.bin, update example, ignore platform folders in example * Update pubspec.yaml commit 1e90075ae2ce7480627fee52f321e3d47a572944 Author: Dan Field Date: Tue Mar 29 09:15:50 2022 -0700 Strokes can have shaders too (#38) commit 3dc2ce45f0bea4e27b7c3dc0d0a6c628323ac7cb Author: Dan Field Date: Mon Mar 28 23:08:31 2022 -0700 Reduce precision to save binary size (#37) * Reduce precision to save binary size * assertions commit e8040cca5030961c63b6ea0f39bc24cd95779099 Author: Dan Field Date: Mon Mar 28 21:38:14 2022 -0700 Gradient tranfsorm bounds (#36) commit 218c0f528d040b4ecfa24cb9a071c5e20f6f757c Author: Dan Field Date: Mon Mar 28 11:26:47 2022 -0700 Do not ignore blend mode when deciding whether to save a layer (#35) commit e4f0b67149001b59bebf9e13fe3927813cae80f4 Author: Dan Field Date: Mon Mar 28 09:25:14 2022 -0700 Fix missing stroke join (#32) commit b26bf0e9f688fc3aafd62d454268d17a34b6d910 Author: Dan Field Date: Mon Mar 28 08:09:10 2022 -0700 Fix gradient regressions, OoO support for use/gradients (#30) * Fix gradient regressions, OoO support for use/gradients - Defer resolution to build and assert resolution doesn't happen during parsing. - Fix regressions introduced in the last commit around userSpaceOnUse with transforms for linear gradients, and regressions around radial gradients in general. - Tests Things that are still wrong: - I noticed while working on flutter_svg's "devil" SVG test that blends are not being accurately applied to individual paths. I'll try to address that in a separate PR. - userSpaceOnUse gradients with transforms are not being applied correctly. This has been an issue in this repo forever, not a regression. Gotta figure out how to properly transform the gradient to the transformed path coordinate space. See https://github.com/dnfield/flutter_svg/pull/54/files#r216222991 and the test files added in that PR, which do not compile correctly today. * fix inheritence for gradient properties commit 78761ee83c29c79efa16f6cd11688cba6b193376 Author: Dan Field Date: Sat Mar 26 20:35:48 2022 -0700 Refactor parsing, start blend mode support, improve attribute inheritence/processing (#29) * Start supporting blends, major refactor * fix default stroke width, blend mode with masks, tests * better support for unordered elements. * docs * Test, save layer for opacity, make stops non-null commit be4662f6f28ffc7d95d564d01c77ae3f365ac33f Author: Dan Field Date: Thu Mar 24 14:37:57 2022 -0700 Remove linear gradient tranfsorms from codec (#28) * Remove linear gradient tranfsorms from codec * fix radial gradient with no matrix commit 54113fe1c9293118a997fc4532b3193645c4c54b Author: Jonah Williams Date: Thu Mar 24 13:32:32 2022 -0700 Allow encoding transforms for radial gradient, respect user space mode, and pre-transform linear gradients (#27) commit fb69efcd70cf24086ee52b692c22d04616a26122 Author: Dan Field Date: Thu Mar 24 09:19:55 2022 -0700 Support masks, refactor related code. (#25) * Support masks, refactor related code. - Move PathFillType off of Paint - Rename encodeSVG to encodeSvg - Update some slightly incomplete documentation - Refactor DrawCommand to use nullable ids instead of -1 - Add more tests. This makes about 30 or 40 more internal test cases pass. commit 2d6f3eebb7cdd7e8fe239f3601bcd69898f08be6 Author: Dan Field Date: Wed Mar 23 16:26:09 2022 -0700 Fix RRect parsing, make PathBuilder chainable (#20) commit 4f080687ab1047a5baff7af59e901dac1a8fa31e Author: Dan Field Date: Wed Mar 23 15:28:52 2022 -0700 Support clips (#19) * Support clips * Update tests, make deduplication part of builder * Update docs, asserts * match flutter_svg behavior for ooo clips commit b30635b2dab72ad2bd718d6db4e40f05aeb302a9 Author: Jonah Williams Date: Wed Mar 23 15:28:33 2022 -0700 compute correct scaling (#17) * compute correct scaling * remove set identity commit e1831f86b4261508ef628d4a2bba710d4864d025 Author: Jonah Williams Date: Tue Mar 22 18:48:37 2022 -0700 Remove assert (#18) commit b5a86b8b18409a4019aa66a6011df15ac05d1b03 Author: Jonah Williams Date: Tue Mar 22 17:44:03 2022 -0700 encode viewport into codec and correctly size widget (#16) * encode viewport into codec and correctly size widget * remove extra params * add more unit tests * format * just encode size commit 2b3368e3689dfbe8b410f2b4bb60450c799da0a9 Author: Dan Field Date: Mon Mar 21 16:28:28 2022 -0700 Small bugs (#15) * Small bugs * fix assert commit 1138ecc26ffcbdfcb614891709b9cbaa3b7fa0ee Author: Jonah Williams Date: Mon Mar 21 13:58:21 2022 -0700 correctly encode Uint16Lists (#14) commit c70e0d78990a9a46f825d03bf5022a36f177a21d Author: Jonah Williams Date: Thu Mar 17 12:30:28 2022 -0700 transform shaders into correct coordinate space (#12) commit cdb483f4bfbe6dfc4abd0e9b47ab8f5f1005bedc Author: Jonah Williams Date: Mon Mar 14 11:50:35 2022 -0700 add support for linear and radial gradient (#11) commit 55debbdaf7b1544ed9db411a2c576a63ff9efb70 Author: Jonah Williams Date: Thu Mar 10 13:42:14 2022 -0800 Add support for saveLayer/restore (#10) Adds support for encoding saveLayer and restore in the vector_graphics_codec. Makes the transform property of nodes in the compiler lazy, and re-arranges how nodes are built in order to make it easier to determine if a saveLayer is required. commit 881812b2a35f46fb8b0d0215a47b04034ee38d45 Author: Jonah Williams Date: Mon Mar 7 16:09:12 2022 -0800 Add support for encoding in the compiler, add basic example to package:vector_graphics (#8) commit 542f437a32cadf21e7edec869b676698ab86258b Author: Dan Field Date: Mon Mar 7 15:15:32 2022 -0800 Add some missing tests, fix bugs (#9) * Add some missing tests, fix bugs * format commit 542214984f4212b8f5ac643c6be3b36fa084c093 Merge: 9b6f415ce 2ec362363 Author: Dan Field Date: Mon Mar 7 11:25:47 2022 -0800 Merge pull request #6 from dnfield/ast Parsing, a few test cases commit 2ec3623636e70fbcf32ddbc82ad0a66f782120c4 Author: Dan Field Date: Mon Mar 7 11:18:23 2022 -0800 docs, light refactoring commit bb22019509d18059c33218f2da281cc92efef5db Author: Dan Field Date: Mon Mar 7 09:38:23 2022 -0800 Fix bug in optimizer and add tests commit bfc06f2ae6748de8071f0298753a2e11df4fb426 Author: Dan Field Date: Sun Mar 6 21:14:11 2022 -0800 .. commit 9d4d7d554f70e7e7c6f78155a4d140add17e5b4d Author: Dan Field Date: Sun Mar 6 21:11:52 2022 -0800 Remove unused code, add simpler test commit a7d5867b1edd51c060dbcd20c1ef1977570eed2b Author: Dan Field Date: Sun Mar 6 20:46:38 2022 -0800 bugs, tests commit 1d4eddd125dbf7e54bccbfd16c2f1ced17476ee0 Author: Dan Field Date: Sun Mar 6 16:54:25 2022 -0800 analysis options and cleanup commit c1373388d871680ff57aa7b5c928970802e757a7 Author: Dan Field Date: Sun Mar 6 16:33:21 2022 -0800 remove some commented out code, add some tests commit 1e01d5e41291780e19f3ec17c9d69a2919029a7a Author: Dan Field Date: Sat Mar 5 20:43:59 2022 -0800 Get prsing up and running, sort of commit 96131ebb527d77a86373690b513c3428516c06d2 Author: Dan Field Date: Fri Mar 4 20:21:21 2022 -0800 Make sure the SvgPictureState holds on to a handle (#674) commit 5b2d73257a11ae2b84c70c4259fc1414af3c310f Author: Dan Field Date: Wed Mar 2 17:00:51 2022 -0800 .. commit 9b6f415ce39a4c51c966e6eb51a62c7836aa3e0e Merge: 2dd336091 f112baf94 Author: Dan Field Date: Wed Mar 2 12:58:00 2022 -0800 Merge pull request #5 from dnfield/paint Add paint, vertices, indexed vertices, and tests commit f112baf944822d4fd2cbca6e48e375fe9d84382e Author: Dan Field Date: Tue Mar 1 23:02:04 2022 -0800 format commit 4e529fca002e39ecad3cb23f3619bb5909772186 Author: Dan Field Date: Tue Mar 1 22:25:30 2022 -0800 nit commit 79036fd43e38ba22b32b79fb7d60516cbe025230 Author: Dan Field Date: Tue Mar 1 22:24:54 2022 -0800 fix logic, update test commit 801a235f854a1ec087faa7b2db7d96b8a02a04df Author: Dan Field Date: Tue Mar 1 22:13:20 2022 -0800 Add paint, vertices, indexed vertices, and tests commit 2dd33609189a70ad1801bb717d4f8c6703b07562 Merge: f3b5c35cc b872ed1ec Author: Dan Field Date: Tue Mar 1 16:17:44 2022 -0800 Merge pull request #3 from dnfield/geom Add geometry classes commit f3b5c35cc1c33a67371cd68b245bfb777db0cca0 Merge: abe1c174f 7b3feeee6 Author: Jonah Williams Date: Tue Mar 1 16:12:36 2022 -0800 Merge pull request #2 from jonahwilliams/runtime add basic vector graphics asset commit b872ed1ec7e88f35559e2afac1e9c2223c8c19e8 Author: Dan Field Date: Tue Mar 1 16:06:31 2022 -0800 Format, update rules, jonah review commit e438d322e377085b7a71b8300fcb07d6c7161eab Merge: 9d07f48d3 abe1c174f Author: Dan Field Date: Tue Mar 1 16:02:50 2022 -0800 doc, merge, enable tests commit abe1c174f05dc36384a83b975f2f7d772b643de9 Merge: 66afbacc8 a2e472100 Author: Dan Field Date: Tue Mar 1 16:00:28 2022 -0800 Merge pull request #4 from dnfield/actions CI commit a2e4721005d5c7348bcb799c1b1a93f78d507c41 Merge: 074db4605 66afbacc8 Author: Dan Field Date: Tue Mar 1 15:53:54 2022 -0800 merge commit 074db46052d16e39891663ceda28de0be533d865 Author: Dan Field Date: Tue Mar 1 15:51:53 2022 -0800 .. commit 9d07f48d3e50dae4105a953079791cbf1b6d4bc1 Author: Dan Field Date: Tue Mar 1 15:45:10 2022 -0800 Update packages/vector_graphics_compiler/test/util_test.dart Co-authored-by: Jonah Williams commit 6fcce396f70f9a8413d8e2645d6fdfabe51a61e1 Author: Dan Field Date: Tue Mar 1 15:45:02 2022 -0800 Update packages/vector_graphics_compiler/test/basic_types_test.dart Co-authored-by: Jonah Williams commit af68ea260f1f4c97c65d10673c6adf393c7752e2 Author: Dan Field Date: Tue Mar 1 15:33:48 2022 -0800 Add geometry classes commit 7b3feeee65a2fe1d36ad3944a69bfbdac4abad8c Author: Jonah Williams Date: Tue Mar 1 14:42:40 2022 -0800 fix pubspec and CHANGELOG commit 6b0ae22f5f5c9c2da7a9bec4d357baf3362142ae Author: Jonah Williams Date: Tue Mar 1 14:24:41 2022 -0800 Remove equality and add more doc comments commit f2ea3d0247163488886454f0ced68290e566d626 Author: Jonah Williams Date: Tue Mar 1 13:41:59 2022 -0800 update paint construction commit f179ecb0be37e79fef7e89dbca68be454b664b30 Author: Jonah Williams Date: Tue Mar 1 13:23:14 2022 -0800 add more examples commit 87659e027288ed1ebebaf248eb7fd28159f0768b Author: Jonah Williams Date: Tue Mar 1 12:57:09 2022 -0800 example of controller commit 80857cbe43a9edc39b0f3efcdb8c01ad8ec5b051 Author: Jonah Williams Date: Tue Mar 1 11:42:34 2022 -0800 add basic vector graphics asset commit 66afbacc8de08cabf48c9f9f07793404b5895be5 Merge: 7713a4cc2 d6917b6db Author: Dan Field Date: Tue Mar 1 10:06:29 2022 -0800 Merge pull request #1 from jonahwilliams/encoder_decoder Add VectorGraphics codec and assorted classes commit d6917b6dbd50f26b2eff2fe51cca8bdf63a9abe0 Author: Jonah Williams Date: Tue Mar 1 09:25:51 2022 -0800 Add more tests and fix bugs commit 20677f1d5a4aeaaa2f60467ef6345b4263ff2d63 Author: Dan Field Date: Mon Feb 28 22:03:15 2022 -0800 Update .cirrus.yml commit 9215a66958e17a75661c300c8c09a446628dfec6 Author: Dan Field Date: Mon Feb 28 22:02:54 2022 -0800 Fix stroke attribute handling when gradients or groups are involved (#671) commit 06ee03a2511d2933e536a95cba4d22a23eb37c35 Author: Jonah Williams Date: Mon Feb 28 20:47:33 2022 -0800 remove package:typed_data commit fed0aaa4412081729b59a09f3b74cdc791096dc5 Author: Jonah Williams Date: Mon Feb 28 20:08:43 2022 -0800 Address review comments commit 8d9b990e54af8d1e8ea1ec9e4ea2c080f7f062c5 Author: jonahwilliams Date: Mon Feb 28 17:00:40 2022 -0800 add basic codec support commit 7713a4cc247276e08247c805f24dde6127d09f2f Author: Dan Field Date: Mon Feb 28 12:49:24 2022 -0800 Initial commit commit d5288a66cf8eee5a50002143c6695542d8e05eac Author: Dan Field Date: Tue Feb 15 12:15:44 2022 -0800 Fix bugs in picture disposal (#664) commit 01b7daff0385c6998bf3099809c53ffa2aabd2f7 Author: Jason Simmons Date: Mon Jan 24 16:45:33 2022 -0800 Update golden images for SkParagraph text rendering (#658) commit 8ee83041c5ba2990e390f01561681b2667957d13 Author: Dan Field Date: Fri Jan 21 11:44:27 2022 -0800 Make sure setting a render equal picture does not result in paint updates (#656) commit e47327d6665aae32d867f46637efbd78bdd6e364 Author: Dan Field Date: Tue Jan 18 15:57:11 2022 -0800 update changelog commit 51147218091afb3bd5ea1f58f1d09b2dfb774ae6 Author: Niklas Schulze Date: Wed Jan 19 00:56:31 2022 +0100 Paragraphs: Use longestLine instead of minIntrinsicWidth (#621) commit 10b145563179fff8eb15913206a4dfd8b3cc48d1 Author: Dan Field Date: Tue Jan 18 14:09:04 2022 -0800 bumps commit 9e56cd6de1018afc033fdeda27e2305c71471f9a Author: Dan Field Date: Tue Jan 18 14:07:35 2022 -0800 Avoid cache invalidation when currentColor/em/rem units change but do not affect SVG (#652) Track changes to currentColor and em/rem/ex units only if applicable to the SVG. commit c087399e4c61f543dec8f12aef81311795e5841a Author: Boluwatifẹ Date: Thu Jan 13 19:49:44 2022 +0100 Added support for "rem" units (#647) * Added tests for "support for rem units" * Added support for "rem" units commit 6ec438d0d0f50faea43e4fca45fba9358dd7f94c Author: Dan Field Date: Tue Jan 11 20:18:00 2022 -0800 drop mocktail dependency commit 20ac9f4c61b732456ac0a45eb52911a1d768e7f3 Author: Dan Field Date: Tue Jan 11 15:38:57 2022 -0800 Fix nested g in defs; sync*; v1.0.1 commit fbcc7aefe761c0e14e7599e4d92bcd0de03f4f03 Author: Dan Field Date: Tue Jan 11 11:36:23 2022 -0800 Fix bug in dash array update: zero values should be acceptable in some cases commit 12950f7524dbd1702c41978f51a75d9257a44942 Author: Dan Field Date: Mon Jan 10 16:41:02 2022 -0800 Avoid invalid dasharrays commit b2a5a91e387d23892d8fc3e4b243d80a583f3d00 Author: Dan Field Date: Mon Jan 10 16:13:45 2022 -0800 oops commit 6f76375949402a05176aa8c2aea277dadcdf438b Author: Dan Field Date: Mon Jan 10 16:12:24 2022 -0800 Fix bug where empty group can affect rendering commit fd2d37d309421f10cc42b9ea7067b4897785dc62 Merge: 00eee0af1 a5c9a2b6a Author: Dan Field Date: Mon Jan 10 13:04:22 2022 -0800 Merge branch 'master' of github.com:dnfield/flutter_svg commit 00eee0af1243c25c287e019af8a8c974ea00bcbe Author: Dan Field Date: Mon Jan 10 13:03:56 2022 -0800 Fix but in element fills, analysis cleanup commit a5c9a2b6a48e44efb776ffd8d549b223f4f6ba3c Author: Bartosz Selwesiuk Date: Wed Dec 8 18:31:31 2021 +0100 Add support for ex units (#618) * feat: add xHeight to SvgTheme * test: add SvgTheme xHeight tests * feat: use xHeight when updating PictureProvider in SvgPicture * test: add xHeight to DefaultSvgTheme and PictureProvider tests * feat: add support for parsing ex units * test: fix existing tests after introducing xHeight * test: add DefaultSvgTheme xHeight tests * test: add parseStyle xHeight tests (stroke width, dash array, dash offset) * test: add SvgParser xHeight tests (svg, use, text, radialGradient, linearGradient, image) * test: add SvgPicture xHeight tests for shapes (circle, rect, ellipse, line) * test: PictureProvider rebuilds a decoder when the theme changes * test: fix relative font size tests * test: add ex font size tests * test: fix DefaultSvgTheme tests * revert: SvgTheme equals operator should use runtimeType commit 371db5bd760a4e5b2ff7bac84e6938863cd1f8e7 Author: Đào Hoàng Sơn Date: Fri Dec 3 22:37:21 2021 +0700 Requires Flutter >=2.4.0 for LayerHandle usage. (#611) See https://github.com/flutter/flutter/commit/025397ae3f925b316991912977367d3263cc4432 commit e91e5915a589eac33d25951345309f32d7a0cce0 Author: Dan Field Date: Thu Dec 2 10:37:30 2021 -0800 Version bump information commit 94c7958f30b6ec9d9ff697f5c2e035efc62884e3 Author: Dan Field Date: Thu Dec 2 10:14:41 2021 -0800 1.0.0 commit a8ba7fecd10cf0ea3c31939660cd2a9e6fa9c3a1 Author: Dan Field Date: Tue Nov 30 11:29:13 2021 -0800 Update xml_parsers.dart commit 559face505686568543d59bbfd6f7a50dcf4dab9 Author: Dan Field Date: Mon Nov 29 23:07:35 2021 -0800 Update picture_provider.dart commit 77513856cc629bc3f051e332423a969227a305e7 Author: Dan Field Date: Mon Nov 29 16:47:37 2021 -0800 Update picture_provider.dart commit f76c1d8d2f0a2e3fb5e25b665c3c613123e3718f Author: Bartosz Selwesiuk Date: Thu Nov 18 21:37:40 2021 +0100 Add support for em units (#605) * feat: add parseDoubleWithUnits to calculate em values * feat: add fontSize to SvgTheme * feat: add fontSize to SvgPicture and PictureProvider * feat: use parseDoubleWithUnits with SVG elements that support em/ex * fix: PictureProvider should rebuild if currentColor is null * test: fix tests after introducing fontSize * test: add DefaultSvgTheme fontSize tests * fix: update SvgTheme hashCode to include fontSize * refactor: replace currentColor and fontSize SvgPicture properties with SvgTheme * test: fix parseDashOffset tests * test: add parseStyle fontSize tests (stroke width, dash array, dash offset) * test: update parseStyle test names * test: add missing DefaultSvgTheme tests * fix: do not print a warning when using em units on the root svg width/height * test: add SvgParser fontSize tests (svg, use, text, radialGradient, linearGradient, image) * test: add SvgPicture fontSize tests for shapes (circle, rect, ellipse, line) * test: PictureProvider rebuilds a decoder when fontSize changes * test: use SvgTheme.empty in tests * test: add relative font size tests * build: update path_drawing to ^0.5.1+1 * feat: use default SvgTheme * fix: typo * refactor: make PictureInfoDecoderBuilder receive an SvgTheme rather than a list of properties * test: fix PictureProvider tests that use SvgTheme * fix: initialize default decoder when PictureProvider is created * feat: PictureProvider loadAsync should return non-nullable PictureInfo * feat: fallback to default SvgTheme if null theme is set * feat: make PictureProvider theme non nullable commit 7520174eaf7a4afcb6010aeaa7ba282f97b83988 Author: Dan Field Date: Sun Nov 7 20:39:44 2021 -0800 Fix issues with hashing mutable objects commit 1e63469e3e184dd239d63810f79bbe19b0999c85 Author: Dan Field Date: Wed Nov 3 17:04:56 2021 -0700 version bumps commit 8dffeb7130e1d0f8ce941ac8d83bc638c62e100b Author: Dan Field Date: Wed Nov 3 17:03:55 2021 -0700 Remove difficult to use flag commit 7c646a2a5a23920121afa007d0bead68c0fa8660 Author: Sarbagya Dhaubanjar Date: Thu Oct 28 22:41:42 2021 +0545 Conditionally import `File` from `dart:io` (#613) * added conditional `File` * replaced usage of `dart:io` with conditional file commit e4ecef6bfc79ed83967c996d8557a937f4a48641 Author: Dan Field Date: Fri Oct 15 21:11:31 2021 -0700 Make new painting method opt in to allow migration commit 700a145a441fa9e32c497bd78a6949ce64a1643f Author: Dan Field Date: Wed Oct 13 00:36:34 2021 -0700 Fix layer reuse, add regression test (#608) * Fix layer reuse, add regression test * Make golden a little more tolerant commit 0442e13ac30dab90c2f842c1dcf06358012cd932 Author: Dan Field Date: Tue Oct 12 22:39:03 2021 -0700 Improve performance when an animation is present over the SVG (#592) - Use repaint boundaries and layers to make sure that SVGs are more raster cache friendly with current limitations in Flutter - Avoid repatining SVG every time an overlapping animation moves - Release picture memory eagerly commit 5c3992eacd2da543bc39a95fb233d78ca8884338 Author: Dan Field Date: Tue Oct 12 22:16:25 2021 -0700 Bump again commit 0ef6944464bb6cfdbe8a3dad138195e8bdc9d6aa Merge: 10564fc55 ecde86537 Author: Dan Field Date: Tue Oct 12 22:14:16 2021 -0700 Merge remote-tracking branch 'origin/master' commit 10564fc55127e7e3a1d73b46589bdc53c95da32f Author: Dan Field Date: Tue Oct 12 22:12:47 2021 -0700 bumps commit ecde865370fb17057235c55377e2f6f4b5870c16 Author: Dan Field Date: Mon Oct 11 11:56:39 2021 -0700 Make the SvgTheme change less breaking (#606) commit c444f12b65f2649de1e76a227bbabcebc55f28a4 Author: Dan Field Date: Fri Oct 8 16:15:54 2021 -0700 Update flutter_svg.dart commit 07cd7f3670fdbdadc986e3f776411dbf29a96383 Author: Bartosz Selwesiuk Date: Sat Oct 2 00:15:50 2021 +0200 Add support for `currentColor` to `SvgPicture` (#602) commit 950e720e149d84f247979b5ca4add16b7c8bf6dd Author: Lee Standen Date: Tue Sep 14 17:05:55 2021 -0700 Add hacky support for currentColor (#588) * add support for currentColor * refactor to support passing colors down from parent * add another circle to show override works * revert strokeColor change for avd Co-authored-by: Lee Standen commit cafa69ef0718b97d922e7cbf9d15fa733b51ffc9 Author: Dan Field Date: Mon Aug 23 10:55:59 2021 -0700 update opacity commit b1531dd511b37ade9595ce58cceb7415bfbd4f6a Author: Dan Field Date: Mon Aug 16 12:21:24 2021 -0700 ignore avoid_classe_with_only_static_members for now commit ae4354c89bb8e3809a074931320f8d1a39074522 Author: Jim Graham Date: Mon Aug 16 12:17:12 2021 -0700 add a simple scrolling benchmark for the example (#583) * add a simple scrolling benchmark for the example * fix analyzer errors and remove print statements * pub get Co-authored-by: Dan Field commit e414bbf2aa2e2ed9c313e1864dcf7d1b5d5a0083 Author: Nikita Mishkov Date: Mon Aug 16 21:29:43 2021 +0300 Unused parameter `bounds` of method draw() (#584) * updated README commit a2deca0d60c1ff1bb55c66d8548b4c5884cd1127 Author: Dan Field Date: Mon Aug 16 11:09:30 2021 -0700 pub get commit d22408531b9828120e243969dbeb28f7e068dc3b Author: Jim Graham Date: Thu Jul 15 09:31:40 2021 -0700 change golden file compares to allow +/- 1 in color components (#575) * change golden file compares to allow +/- 1 in color components * accept format results (only for files changed here) * explicitly require rawRgba bytes commit 1ee9864b7fb8454a93d8c013bbdf9c65d01a112a Author: Niklas Schulze Date: Tue Jun 1 17:59:12 2021 +0200 Add support for xml:space (#563) commit 04b15f4f0a1a8f50bc849d3980b6e839acf597ec Author: Niklas Schulze Date: Thu May 27 19:58:46 2021 +0200 Add text-decoration support (#562) * Add text-decoration support * add golden Co-authored-by: Dan Field commit db087a11165657a151c644997dcd3dd9af850482 Author: André Sousa Date: Sun May 23 13:04:17 2021 -0300 Implemented text-style parser (#556) * font-style attribute parser commit 1e7976cd2cfa4dda60fe220b5b5cc3401948ab5d Author: Jason Simmons Date: Tue May 18 12:25:29 2021 -0700 Update for the latest Dart analyze unnecessary_import check (#555) commit 09c1753b600f1d91ef4c4e523d27979a781ff2e6 Author: Dan Field Date: Mon May 10 16:44:48 2021 -0700 skip golden test on non-linux commit c47e261903ff91a06a36d76f3a2a9dbe9f15a99f Author: Dan Field Date: Mon May 10 10:08:45 2021 -0700 sort directives commit 2c5faf2ab08ce3b350db20c93a23938a0e461f47 Author: Dan Field Date: Wed May 5 01:52:22 2021 -0700 missing bump commit 2136ce7d05154cb6760764f9cb14cb0c12ac27a0 Author: Dan Field Date: Wed May 5 01:51:18 2021 -0700 version bumps (#547) * version bumps * fix coverage for non-write users commit fffa330bd4698c0f9a976142a98fbf7077d35337 Author: jefflim-google <52889965+jefflim-google@users.noreply.github.com> Date: Wed May 5 16:15:54 2021 +0800 Improve performance of SVG parsing (#546) * Improve performance of SVG parsing The previous code used to iterate through a list of XmlEventAttributes for every call to getAttribute. The newer code constructs a Map, and looks up the attribute name directly. This seems to show a 30% overall reduction to svg parsing costs. * Fix lint issues highlighted by github * Fix typo commit 787fa6ca4c42c175c468899b2c202dde4dbb7858 Author: Dan Field Date: Wed May 5 00:42:40 2021 -0700 versioning bump commit 9eb9ad5cf0d603dd41956f3fbbe2716b9155ed49 Author: jefflim-google <52889965+jefflim-google@users.noreply.github.com> Date: Wed May 5 15:41:32 2021 +0800 Improve path_parsing performance. (#6) * Improve path_parsing performance. This code: * Avoiding String.codeUnits. * Reduces lookups to String.codeUnitAt * Caches _length * Builds integer value in a single pass. String.codeUnits on both JS and VM returns a forwarding CodeUnits class defined here, so all lookups to codeUnits[index] actually go through an extra layer of dispatch. Combined, all of these changes improve the parsing speed by ~25% when measured with real SVG path data. parseSvgPathData() timing, measured on a Nexus 2 downclocked to 1GHz. Before: Run1: 76,124,392 us Run2: 75,103,426 us Run3: 75,481,128 us After: Run1: 59,319,622 us Run2: 58,435,315 us Run3: 58,478,007 us * analysis cleanup Co-authored-by: Dan Field commit 1c57912fe6048f18abca5d1618f13bf5c567287f Author: Dan Field Date: Wed May 5 00:34:05 2021 -0700 Update .cirrus.yml (#7) commit 066de3dd4d175d141a85b094d79266b9597cba09 Author: Dan Field Date: Wed Apr 21 22:58:22 2021 -0700 expose cache on PictureProvider so that users can change the limit (#538) commit d81c688aaa593224e99e2fb8125b55f4d8442f30 Author: Dan Field Date: Wed Apr 7 11:48:32 2021 -0700 Fix alignment issues again (#530) commit 4660e079b4f2c4aff7a89c2542ccc13b318441d1 Author: Dan Field Date: Tue Apr 6 16:15:54 2021 -0700 stable nullsafe release commit d1739c414d89cb2a110c1b2ad5c2c95920c8df6b Author: Dan Field Date: Tue Apr 6 16:10:46 2021 -0700 Nullsafe stable release commit cc99d58446c07122ea81a3648f4658088972b5f4 Author: Dan Field Date: Tue Apr 6 16:07:14 2021 -0700 Fix sizing issues (#529) commit d270754f397f031b08770b595a798c5f7af0cad2 Author: Dan Field Date: Mon Apr 5 11:24:22 2021 -0700 missing docs commit db9ff7eb4f9add46401b6b806761cdbdbc907136 Author: Meiwin Fu Date: Thu Apr 1 01:59:02 2021 +0800 Refactor attribute localName check (#525) Existing implementation uses replaceFirst API which will create a new String. This change replaces it with `localName` API of XmlEventAttribute which internally uses substring. The end result is overall faster parsing. commit d1cafd619c661546f7df0cbe03e471d052b62fd4 Author: Dan Field Date: Tue Feb 23 20:15:42 2021 -0800 version bump/cleanup commit a9ec352cd905ed94a49efdf7a7944460f8bbcb73 Author: Dan Field Date: Tue Feb 23 14:13:16 2021 -0800 Fix sizing when no width or height are specified (#500) * Fix issue with the SvgPicture widget sizing when no width and height are specified Co-authored-by: ramsestom commit ed0a6b4eac02200cc11c4621e6c17a9b869fd62e Author: Dan Field Date: Mon Feb 22 10:29:03 2021 -0800 put key into errors (#497) commit b629bc1ca9082aa545fe69660efce3fe452ea6b2 Author: Dan Field Date: Fri Feb 5 15:56:14 2021 -0800 recreate example project commit b72bc02718d3c1f2db7fa7488e3102f9989d651e Author: Sam Rawlins Date: Fri Jan 22 09:40:39 2021 -0800 Remove return stmts from Future.catchError (#477) * Remove return stmt from Future.catchError * Remove one more return statement * Replace empty return for control flow commit 2bee4e1642e8e097c8c8841563570e02a5d897ad Author: Dennis Kugelmann Date: Tue Jan 19 21:34:32 2021 +0100 Add warningsAsErrors option for parsing SVGs (#474) Add a flag to treat unhandled elements as errors rather than warnings. commit f3d4f00ef8c88f73d80945c157e9bd23574fe998 Author: Sam Rawlins Date: Tue Dec 22 10:27:18 2020 -0800 eturn valid type from Future.catchError. (#469) An upcoming feature to the Dart analyzer [0] will report Future.catchError [1] `onError` handlers which return values of invalid type. Currently this is not reported because the `onError` handler function type cannot be accurately expressed. An `onError` handler for `Future.catchError` must be either `FutureOr Function(dynamic)` or `FutureOr Function(dynamic, StackTrace)`. In either case, the return type of the function is `FutureOr`. This CL corrects `onError` handler(s) to return a value of a valid type. [0]: https://github.com/dart-lang/sdk/issues/35825 [1]: https://api.dart.dev/dev/2.12.0-149.0.dev/dart-async/Future/catchError.html commit 531934712f3d7a5e1c9287343b21671b514371b8 Author: Paul Berry Date: Wed Dec 16 17:59:45 2020 -0800 Remove dead code. (#465) commit 6ef73049a6b7e10c62ac01efefeb4eb82bbf7f1b Author: Dan Field Date: Wed Dec 16 11:03:29 2020 -0800 typo commit 22f1a9f17838897ae9ebbbe7bed6d1ee0902de42 Author: Dan Field Date: Wed Dec 16 10:46:17 2020 -0800 broken image link commit 1c19d14b574dfb4e0cea565d9e7dd3dcf8259636 Author: Max Oehme Date: Wed Dec 9 19:30:46 2020 +0100 Fix Issue #317 headers were not passed to http client. (#342) * Using SvgPicture.network with headers was not possible since headers were not passed to the http get request function * test * bump versions Co-authored-by: Max Oehme Co-authored-by: Dan Field commit 49f6a71bec54738aa0997cf7de501227b935728f Author: Greg Spencer Date: Fri Dec 4 12:15:26 2020 -0800 Switch to using maybeLocaleOf instead of localeOf (#443) commit 1bbdbb1815b053bcc4e2914774258265f9605cbb Author: Dan Field Date: Thu Dec 3 10:20:30 2020 -0800 remove unnecessary package:collection dep commit 0d2b1282b2e5b28f892f21bce0752a731783bf0a Author: Dan Field Date: Thu Dec 3 09:50:03 2020 -0800 changelog commit e665f27203333cdfb77af024043c150885db951b Author: Dan Field Date: Thu Dec 3 09:48:14 2020 -0800 Nullsafety migration (#454) Remove mockito usages Use the dart migrate tool Remove one instance found of a dead function (mergeOpacity) Fix up usages of catchError commit a5da1d1145c2aaac475b93ad74134ed84c2b09f6 Author: Jason Simmons Date: Mon Nov 30 12:31:04 2020 -0800 Update golden images for the latest Skia roll (#461) commit bd987eef8c8e35123c998369fbfbabfb8b7f6110 Author: Michael Goderbauer Date: Fri Nov 20 15:53:28 2020 -0800 Prepare for dry layout feature (#450) commit 9f004d365857fbd87fd2941319be75d6821b10ed Author: Dan Field Date: Thu Nov 19 16:49:12 2020 -0800 version bump commit 6e9d914f4aa557cb4ab476e25fc9750037b528b1 Merge: ed54eb548 69bb7ad78 Author: Dan Field Date: Thu Nov 19 16:48:38 2020 -0800 Merge branch 'master' of github.com:dnfield/flutter_svg commit ed54eb5485cf650442252b8ad2680c9f7a9cbf4c Author: Dan Field Date: Thu Nov 19 16:48:36 2020 -0800 tests commit 69bb7ad78841e84a7035c7612fb6cc488245d1b8 Author: Dan Field Date: Thu Nov 19 16:48:27 2020 -0800 revert golden commit d9f212cde9321eb2d83e1b6a3cb496eb1792f94a Author: Dan Field Date: Thu Nov 19 16:37:36 2020 -0800 bug in last one commit 5148828275dc9db555ede71c86c4d149c589463d Author: Dan Field Date: Thu Nov 19 15:30:19 2020 -0800 Allow options around caching for color filter(s) (#452) * Allow for a global override of how color filtering is handled wrt to the cache, and allow individual widgets to opt in or out * update golden commit d4971c2d17f08c192f5dafb961d1f7124bd08eec Merge: c892738db 95bd4b54a Author: Dan Field Date: Mon Nov 9 13:54:03 2020 -0800 Merge branch 'master' of github.com:dnfield/flutter_svg commit c892738db1cdb14808ae60ea0a294e09861c838f Author: Dan Field Date: Mon Nov 9 13:53:57 2020 -0800 make example unpublishable commit efb8ea7bc8d422e5f5dae2c269bff9f2e1b5412e Author: Dan Field Date: Mon Nov 9 13:52:02 2020 -0800 cirrus commit 6d0d265c7e07d9d5a2c8fabda9b52940f17f3a49 Author: Dan Field Date: Mon Nov 9 09:36:14 2020 -0800 Null safe (#4) commit f0df45aeb7964b432c87e9de15586d1240725712 Author: Dan Field Date: Mon Nov 9 09:32:00 2020 -0800 Null safe (#3) commit 95bd4b54a3adc9c4a1e719bff2d38cdb06c98084 Merge: 326d14c4b 8018e3954 Author: Dan Field Date: Fri Oct 30 13:27:53 2020 -0700 Merge pull request #435 from goderbauer/maybeOf Migrate to Directionality.maybeOf commit 8018e395443f6ed9a94d58dbb78d221522140a08 Author: Michael Goderbauer Date: Fri Oct 30 13:01:49 2020 -0700 Update flutter version commit 326d14c4bdc6de136dad281f549750614224ada3 Merge: a30871b96 763006a41 Author: Dan Field Date: Tue Oct 27 16:21:38 2020 -0700 Merge pull request #437 from dnfield/cirrus master too commit 763006a415aad3b9e730c85c16f4a5485bc34998 Author: Dan Field Date: Tue Oct 27 16:16:45 2020 -0700 upgrade commit 7a88251f537df00568457e101065ea047ebef967 Author: Dan Field Date: Tue Oct 27 16:13:31 2020 -0700 master too commit a30871b96354ad8f89e8e83d9c337c161ee6bf2a Author: Dan Field Date: Tue Oct 27 16:07:36 2020 -0700 drop Travis commit bdc443bccddaa569cbe8b34d952692847db5e176 Merge: 8e8c61ecf 1294a4f13 Author: Dan Field Date: Tue Oct 27 16:06:56 2020 -0700 Merge pull request #436 from dnfield/cirru cirrus CI commit 1294a4f13dfd6f3b904d3fdc6f5fc25d19379dff Author: Dan Field Date: Tue Oct 27 16:00:00 2020 -0700 coverage.. commit aa431cda9db6788b56a51cd6dc571c9e95561712 Author: Dan Field Date: Tue Oct 27 15:55:34 2020 -0700 coveralls? commit c73aa872c6a641c5e7a4a7085052692a962be3b6 Author: Dan Field Date: Tue Oct 27 15:48:32 2020 -0700 cirrus CI commit e22b7624fe8b98fddebaf37ae88482c0ab329bd7 Author: Michael Goderbauer Date: Tue Oct 27 14:59:44 2020 -0700 [WIP] Migrate to Directionality.maybeOf commit 8e8c61ecfec7c6f5dcbf6da27cf15b70486fb033 Merge: b801431fc 4094318ae Author: Dan Field Date: Mon Oct 19 12:52:01 2020 -0700 Merge pull request #432 from dnfield/fix_cf Fix colorfilter when BlendMode.color is used commit 4094318ae488d935915ab706701e0407e59bec70 Author: Dan Field Date: Mon Oct 19 12:51:50 2020 -0700 sort deps commit 23684230782243af8ec6cf3a61716d4bee786a00 Author: Dan Field Date: Mon Oct 19 12:44:23 2020 -0700 Fix colorfilter when BlendMode.color is used commit b801431fc8cb169b55e0c73353d7a9c147a3fa14 Merge: c08547885 2b3fffe8d Author: Dan Field Date: Fri Sep 25 13:04:16 2020 -0700 Merge pull request #427 from jason-simmons/fix_test_092520 Provide a value for HttpResponse.compressionState in the network test commit 2b3fffe8d03036f135bcaab07170856d1ccbd36d Author: Jason Simmons Date: Fri Sep 25 12:43:29 2020 -0700 Provide a value for HttpResponse.compressionState in the network test commit c08547885159156a9408830d0aad90c4b73c6222 Merge: 48c27905d 584bf98bf Author: Dan Field Date: Wed Sep 23 14:37:58 2020 -0700 Merge pull request #422 from MichaelRFairhurst/remove-unused-imports Remove unused dart:async imports commit 584bf98bfcc7a908e3649fcdcf74be6fa24ddb36 Author: Mike Fairhurst Date: Mon Sep 21 23:23:30 2020 -0700 Remove unused dart:async imports As of Dart 2.1, Future and Stream are exported by dart:core commit 48c27905dfe090ab0849c6acc5b656ecf3428c61 Author: Dan Field Date: Fri Sep 11 12:40:49 2020 -0700 Changelog for 0.19.0 commit a5bffd80e07158ee70a80a6f7525cf99fa579fb3 Merge: ed549149e e36d4d44a Author: Dan Field Date: Fri Sep 11 12:39:56 2020 -0700 Merge pull request #417 from dnfield/cache_color_filter Cache color filter commit ed549149e8b6786202326888ca6b4651f1b09fc1 Merge: 0eb0bca2d 897f27d1b Author: Dan Field Date: Fri Sep 11 12:37:48 2020 -0700 Merge pull request #416 from omidraha/patch-1 Fixes matchTextDirection for RTL commit e36d4d44a044c95ed972203c6c3b3f512a5437ef Author: Dan Field Date: Fri Sep 11 12:33:53 2020 -0700 more test commit 641f7cff12fb4ef2d4092770a86b39076b9ea33f Author: Dan Field Date: Fri Sep 11 11:49:50 2020 -0700 test commit 86ed4cdba1588d97de4d7379f19dc2da489e7558 Author: Dan Field Date: Fri Sep 11 11:33:01 2020 -0700 Avoid cache invalidation when color filter changes commit 897f27d1b521a51c53798d3f92aae9dafb83e815 Author: Omid Raha Date: Fri Sep 11 21:57:45 2020 +0430 #416 Fixes matchTextDirection for RTL commit 96f29547d3a803123b8ecd97e070c3c278346b21 Author: Omid Raha Date: Fri Sep 11 16:10:03 2020 +0430 Fixes matchTextDirection for RTL Fixes #414 commit afcdb3fee775ac80c2d9ccb222ff84752286d2b5 Author: Dan Field Date: Fri Aug 21 16:47:18 2020 -0700 version bumps commit 0eb0bca2dd440050dce40b977bdd0a73f67d12ab Merge: 989a6b51d 3e85bd91b Author: Dan Field Date: Mon Aug 17 20:21:36 2020 -0700 Merge pull request #402 from liyuqian/clip Expose clipBehavior from FittedBox commit 3e85bd91ba88dd92a00c82931377196c84128836 Author: Yuqian Li Date: Mon Aug 17 20:19:16 2020 -0700 Expose clipBehavior from FittedBox Fixes https://github.com/dnfield/flutter_svg/issues/384 commit 989a6b51d75a35d307130b5dc01372fb715071c2 Merge: 912a4b126 efe6a1a4b Author: Dan Field Date: Sat Aug 15 14:06:36 2020 -0700 Merge pull request #392 from zl910627/feature/support_id support id commit efe6a1a4bdcf6c0328e2715813c7ab632c08ff67 Author: ZL Date: Sat Aug 15 08:26:10 2020 +0800 add documents & test cases commit 5be2d4da541f84b4ef146d3b780a40e214b70174 Author: ZL Date: Wed Aug 5 22:03:57 2020 +0800 support id commit 912a4b1266a2b9c8955b3ebff20695386ce95b26 Author: Dan Field Date: Fri Jul 31 11:11:53 2020 -0700 fix test commit 6cf4f86a03753663ce7776f2a38a62a00b337ee8 Author: Dan Field Date: Fri Jul 31 11:05:28 2020 -0700 Alignment -> AlignmentGeometry commit 049c2a4b218dae8143d3be00ba6a6fac8b9c9b2d Merge: 20932d606 a36ea62b6 Author: Dan Field Date: Wed Jul 8 10:53:12 2020 -0700 Merge pull request #378 from SiiaEngineering/multiple_transform_fix Allow multiple transforms in an attribute commit a36ea62b69185d3e25e9512608e08763dea20425 Author: Mustafa Sezgin Date: Wed Jul 8 19:43:13 2020 +0200 Fix the bug in the regular expression for multiple transforms by excluding commas. Tests included commit 20932d606513915f13059d8a14254022d94945e7 Merge: 712f4562e 28a8578e4 Author: Dan Field Date: Thu Jun 18 12:00:49 2020 -0700 Merge pull request #356 from luanpotter/luan.update-dependencies Updating dependencies commit 712f4562e29b3db7fbfa0f7688dd79bfc0b8bcb2 Author: Dan Field Date: Mon Jun 8 14:27:54 2020 -0700 bump commit 9a9dae7ddaf1e8a931c8228cc5623b8fa1ceb1e7 Merge: 622298c7c e5a9f8e0d Author: Dan Field Date: Tue Jun 2 17:09:23 2020 -0700 Merge pull request #359 from gspencergoog/diagnosticable Switch to Diagnosticable from DiagnosticableMixin commit e5a9f8e0de053591896f154dc66c5e1e1aae91b6 Author: Greg Spencer Date: Tue Jun 2 17:05:11 2020 -0700 Switch to Diagnosticable from DiagnosticableMixin commit 28a8578e419f468fc2a1734b4d875dd3b03b3b06 Author: Luan Nico Date: Sat May 30 22:28:36 2020 -0400 Updating dependencies commit 622298c7cd79a305c295ff9701ca4c04065c2a6f Merge: 111c709ef b126861e9 Author: Dan Field Date: Fri May 29 17:09:27 2020 -0700 Merge pull request #355 from dnfield/xml_parse Update avd.dart commit b126861e9c2030d443afb9889b1e771d898f2535 Author: Dan Field Date: Fri May 29 17:01:25 2020 -0700 Update avd.dart commit 111c709eff6e8aa120db37378009e14452d3060d Merge: 66e5e6fcc d746038a2 Author: Dan Field Date: Fri May 29 16:59:03 2020 -0700 Merge pull request #354 from mehmetf/patch-1 await runZoned Futures in the tests commit d746038a22bd916498be83a4dc60e55c362467c9 Author: Mehmet Fidanboylu Date: Fri May 29 16:53:34 2020 -0700 await runZoned Futures in the tests With an upcoming change to widget tester, this will cause failures. See: https://github.com/flutter/flutter/pull/57894 commit 66e5e6fcce7ebcb2e84689826a934ce3f3628b15 Author: Dan Field Date: Wed May 6 13:31:42 2020 -0700 bump flutter version for XML constraint commit 67e742a65ed04dcffb8c30f8af7b3256b4524320 Merge: 5a84567a8 02b75acbe Author: Dan Field Date: Wed May 6 13:12:02 2020 -0700 Merge branch 'master' of github.com:dnfield/flutter_svg commit 02b75acbe3f9d99e4913cc57bd699165f4fc33a7 Merge: 124962100 961f1aa78 Author: Dan Field Date: Tue May 5 06:55:07 2020 -0700 Merge pull request #339 from Zazo032/master Upgrade xml dependency commit 961f1aa7817392ab2d72e4356b76beea78387924 Author: Cristian Zazo Date: Tue May 5 10:57:22 2020 +0200 Upgrade `xml` commit 5a84567a8bcf59a163a46dc6e78cce17b3537197 Author: Dan Field Date: Mon Apr 6 21:41:22 2020 -0700 null context for pictureCache commit 1249621002fc3ee47d9d7c5b3266446bddda1475 Merge: 06f089ddb f8879110d Author: Dan Field Date: Tue Mar 31 15:29:52 2020 -0700 Merge pull request #322 from dnfield/throw_multiroot throw if nested SVG encountered commit f8879110d49f7d57b1b5e7d30637366245ed7b12 Author: Dan Field Date: Tue Mar 31 15:26:16 2020 -0700 throw if nested SVG encountered commit 06f089ddb11586fdfc207d277dd68deea46eb0da Author: Dan Field Date: Sun Mar 15 07:31:51 2020 -0700 .. commit 60086359e4a8161c1b9933774e37893745fc4dce Author: Dan Field Date: Sun Mar 15 07:30:17 2020 -0700 http changes commit 0d09b001a96bdb5e31be116d81085924ad364c94 Author: Dan Field Date: Sat Mar 14 20:11:07 2020 -0700 start web support commit 0d52a03f2c75b0cd292d55adcb670c9396044a37 Author: Dan Field Date: Mon Mar 9 14:45:11 2020 -0700 Fix implicit fill color for shapes with explicit opacity commit 22934eb13db15b1282deddcd3750e0335473d563 Author: Dan Field Date: Mon Mar 9 07:03:55 2020 -0700 Bump commit 91e00537ee93accbbfa49b707b4b44c2ee8299a4 Merge: 051f94e74 3cd597bed Author: Dan Field Date: Mon Mar 9 07:01:18 2020 -0700 Merge pull request #306 from pento/fix/296-use-fill Don't default to black when no colour is defined. commit 3cd597bedb84c485f567a40e174431d590f92f28 Author: Gary Date: Mon Mar 9 18:38:01 2020 +1100 Don't default to black when we don't have to. commit 051f94e74dbb0e7f0fc050e08632ee41d4d4a875 Merge: 434bc7a3b bae8d8883 Author: Dan Field Date: Sun Mar 8 21:44:55 2020 -0700 Merge pull request #305 from pento/fix/transform-whitespace Allow additional whitespace between transform commands. commit bae8d8883353596d089127210e16fdb24e584f86 Author: Gary Date: Mon Mar 9 15:28:55 2020 +1100 Whitespace. commit 0b601b32cd7cb668538a184e5ec9f692dd42568e Author: Gary Date: Mon Mar 9 15:28:02 2020 +1100 Allow additional whitespace between transform definitions. commit 434bc7a3b60a23073529322c8d96d77dc85b1f11 Author: Dan Field Date: Thu Feb 27 09:39:04 2020 -0800 changelog commit 25836feeb1a9c799b017940d917785afe4a0a12d Merge: ff648556c 8dee35cc7 Author: Dan Field Date: Mon Feb 24 09:50:24 2020 -0800 Merge pull request #299 from gspencergoog/diagnosticable Diagnosticable => DiagnosticableMixin commit 8dee35cc7c925ece660845630549e46a64f2d7c2 Author: Greg Spencer Date: Mon Feb 24 09:36:42 2020 -0800 Bump minimum Flutter version commit ff648556c704b5ee77229163dee42df4f6a7310d Merge: b56a90fed a189fc860 Author: Dan Field Date: Sun Feb 23 14:31:20 2020 -0800 Merge pull request #298 from danielbalke/base64-strip-whitespace Strip all whitespace instead of only spaces from base64 encoded images. commit a189fc8608074c89ecd0ab27bf00c02a8aa2b6c2 Author: Daniel Balke Date: Sun Feb 23 20:14:22 2020 +0100 Strip all whitespace instead of only spaces from base64 encoded images before decoding them. commit ea570668e44bef81f9a579f93c3ea797c0ff14a7 Author: Greg Spencer Date: Fri Feb 21 18:07:09 2020 -0800 Diagnosticable => DiagnosticableMixin commit b56a90fedb1e22bcc11447c34470f1c9f254dec8 Merge: 6ae63faa6 cf2dd3aa3 Author: Dan Field Date: Fri Jan 31 07:05:48 2020 -0800 Merge pull request #287 from domesticmouse/master Entitlements for network access on macOS, and a typo. commit cf2dd3aa362661943de573cc9fa3a64cff7b10b4 Author: Brett Morgan Date: Fri Jan 31 22:24:43 2020 +1100 Entitlements for network access on macOS, and a typo. commit 6ae63faa60c90bce20435a7d729c3549f8f288ca Merge: 98c660f4c 91ad1056d Author: Dan Field Date: Wed Jan 29 20:13:58 2020 -0800 Merge pull request #286 from dnfield/use_group Fix for use with groups commit 91ad1056d824166e241cf96689376b56102d23f7 Author: Dan Field Date: Wed Jan 29 20:10:49 2020 -0800 format, fix image commit ff9f0d43e52374b0c4d867ee6df841eb3ea1fd9a Author: Dan Field Date: Wed Jan 29 20:07:07 2020 -0800 Fix for use with groups commit 98c660f4cd93785879317fb71d262d36c67158a3 Merge: e015aab78 5562b1744 Author: Dan Field Date: Thu Jan 23 22:16:29 2020 -0800 Merge pull request #279 from dnfield/color_filter fix color filtering commit 5562b174493a81602fa7578ce26b8efa7fe84836 Author: Dan Field Date: Thu Jan 23 22:13:12 2020 -0800 linux commit f0e1c2233f418c21c3447b03ae089d8e2d572d84 Author: Dan Field Date: Thu Jan 23 22:03:31 2020 -0800 fix color filtering commit e015aab7864a829e5db0068bc1fc2e3e092ac392 Author: Dan Field Date: Sun Jan 19 20:04:31 2020 -0800 deprecated field from pubspec commit 94bfd172b889bd93db128e323f79cabcd639b27c Author: Dan Field Date: Sun Jan 19 19:59:42 2020 -0800 rerun test commit 06daac976d021f91ce50c1a6437f982b123831fa Author: Dan Field Date: Sun Jan 19 19:54:02 2020 -0800 Fix image references commit dfc31db167137a39d0b0f0708f2c2be32b19305e Merge: f27839e21 7d3a68d8f Author: Dan Field Date: Sat Jan 18 23:19:57 2020 -0800 Merge pull request #276 from dnfield/use_transform support transform on use commit 7d3a68d8f52948b9e786807a05552c0b75acdcd3 Author: Dan Field Date: Sat Jan 18 23:14:27 2020 -0800 support transform on use commit f27839e211d35b8bc5db06d445a960f5cad67097 Author: Dan Field Date: Sat Jan 18 20:14:42 2020 -0800 macos for example commit 1a542efa43f2b53f02d4aad9488f326c59193a42 Merge: ed21c5624 ba2ce3a09 Author: Dan Field Date: Mon Dec 16 13:29:17 2019 -0800 Merge pull request #265 from dnfield/nnbd_prep implicit-cast commit ba2ce3a09ba748748e418f60e2acd518fe4b6fc4 Author: Dan Field Date: Mon Dec 16 13:23:58 2019 -0800 implicit-cast commit ed21c56249a8277f7e9cc80832c6dc8f10f3ee61 Author: Dan Field Date: Tue Nov 19 21:32:50 2019 -0800 format commit f96c1ff34b1baf9c1e76735e9d6a0f172fe44076 Author: Dan Field Date: Tue Nov 19 21:31:19 2019 -0800 bump commit 643db60568fe048c18ce54729213b3e705e4da36 Author: Dan Field Date: Tue Nov 19 21:27:05 2019 -0800 image improvement, mask/blendmode improvement for shapes commit 0d2ea27fea88d4cfd7931f0341f3d1766649b47d Author: Dan Field Date: Thu Nov 7 00:06:04 2019 -0800 support for masks on groups commit 40eafac31dac7bc4b23be89a9703ebd20c9ce9cc Author: Dan Field Date: Mon Oct 21 17:36:00 2019 -0700 Blend mode support commit df817ab4c838c23f0654c7ce93a8501137a98d87 Author: Dan Field Date: Mon Oct 14 15:23:17 2019 -0700 regression test for afa27e7 commit 648e24d34e03652ed601ed913055061c14f18f57 Author: Dan Field Date: Mon Oct 14 11:18:34 2019 -0700 reformat :( commit 72a067871b3adf31c735a37b274a1433d470124f Author: Dan Field Date: Mon Oct 14 11:15:57 2019 -0700 fix for empty text elements commit afa27e741e51db7865a708a9dc614552c0c776c3 Author: Dan Field Date: Mon Oct 14 09:37:02 2019 -0700 trim matrix strings commit f7846f04c5353c2bf7b73c312ff37e20dac5cb7e Author: Dan Field Date: Wed Oct 9 11:09:54 2019 -0700 open up obtainKey commit 6b76c70046248bc8f6ccda8659b6f1daecb77070 Author: Dan Field Date: Wed Oct 9 11:09:01 2019 -0700 Remove @protected from obtainKey commit 4874de2e8cd34e6066c12741bbd7498ceb7463f6 Author: Dan Field Date: Wed Sep 25 15:06:13 2019 -0700 dartfmt, const commit 3eeb7cff4551c53032b9b275b3fa0cba09f8aadc Author: Dan Field Date: Tue Sep 3 12:53:09 2019 -0700 0.14.1 bump commit cefc5a4f13426be64156f08ea83406e6d1ea9849 Merge: 3d0257c98 a6d1347d3 Author: Dan Field Date: Mon Sep 2 01:16:34 2019 -0700 Merge pull request #219 from christianalfoni/hsl-transparent add support for hsl, hsla and transparent fill value commit a6d1347d355e291a4b4b62308eb2fbf40e3c3503 Author: christianalfoni Date: Mon Sep 2 07:58:19 2019 +0200 more tests commit 645b69d9a0711ae1e500cfc6ba9ae742dc615bd3 Author: christianalfoni Date: Mon Sep 2 07:52:39 2019 +0200 formatting, typing and additional tests commit 71f93208e3e2b7355968a429b930898c77d813c0 Author: christianalfoni Date: Sun Sep 1 17:30:33 2019 +0200 fix missing type commit ecc93c450b7dc739ec19aaa0e0474f6480eeb7dc Author: christianalfoni Date: Sun Sep 1 08:17:18 2019 +0200 add support for hsl, hsla and transparent fill value commit 3d0257c98b35bf61368d39ba67bc237a7645e65c Author: Dan Field Date: Fri Aug 9 13:04:33 2019 -0700 Fix use with no id, fix desc/title commit a763ad781d876bdb8248b8a653c0799ed4c758b0 Author: Dan Field Date: Wed Jul 31 10:39:07 2019 -0700 version bump commit 3f2276555882b47650077695d997c345805e2ba4 Merge: 2f015d613 578e82499 Author: Dan Field Date: Wed Jul 31 06:28:00 2019 -0700 Merge pull request #204 from phanirithvij/patch-2 Update clip_path_3.svg commit 2f015d613098b20623f5a193497c09375267e167 Merge: beb42d0a1 cade37291 Author: Dan Field Date: Wed Jul 31 06:27:40 2019 -0700 Merge pull request #205 from phanirithvij/patch-1 Update clip_path_2.svg commit 578e82499555d6c1309fe6352025eaff52eed3b6 Author: Phani Rithvij Date: Wed Jul 31 12:49:02 2019 +0530 Update clip_path_3.svg Added xmlns attribute that allows svg preview on github and vscode. commit cade3729140f3c8fea3d88cdcddb509355e95832 Author: Phani Rithvij Date: Wed Jul 31 12:47:56 2019 +0530 Update clip_path_2.svg Added xmlns attribute that allows svg preview on github and vscode. commit beb42d0a10da24684eea23c54d1fb6721adb3423 Merge: 11d26472e 2752e94f4 Author: Dan Field Date: Mon Jul 29 06:24:05 2019 -0700 Merge pull request #199 from krispypen/master Adding mask support commit 2752e94f4f135f4236b20777202861b521787f06 Author: Kris Pypen Date: Mon Jul 29 11:07:10 2019 +0200 Implement remarks from PR #199 commit 11d26472e835c4fb1401bac8b6d25229ea31af9a Merge: 72b4e4d1b f81b8d987 Author: Dan Field Date: Sat Jul 27 07:40:47 2019 -0700 Merge branch 'master' of github.com:dnfield/flutter_svg commit 72b4e4d1b4ee49a21d46d93d504d9f4dc8f7ed8d Author: Dan Field Date: Sat Jul 27 07:40:39 2019 -0700 Allow clearing the cache commit 75518f547b8676c5d1eee2b7cd26ec1490a1c8d0 Merge: 8fbed81dd f81b8d987 Author: Kris Pypen Date: Fri Jul 26 16:29:28 2019 +0200 Merge pull request #1 from dnfield/master merge #200 commit f81b8d9873aac49d8837ab75977eb4bf1db0ca3e Merge: 9a216b208 d0319ada1 Author: Dan Field Date: Fri Jul 26 07:03:43 2019 -0700 Merge pull request #200 from krispypen/patch-1 Fix travis build failed commit d0319ada1af0062cff8ac9da30d52565866e0327 Author: Kris Pypen Date: Fri Jul 26 11:02:54 2019 +0200 @virtual is deprecated commit 6cc87c6c2623185a26a810fedd68665d95bf9c3e Author: Kris Pypen Date: Fri Jul 26 10:54:05 2019 +0200 Fix travis build failed "Package 'fonts-droid' has no installation candidate" commit 8fbed81dda07ab16730d302f8e27565e1d4b7461 Author: Kris Pypen Date: Fri Jul 26 10:38:47 2019 +0200 Adding mask support commit 9a216b20839a3acaf5334e9ae096090b38b66786 Author: Dan Field Date: Wed Jul 10 16:07:01 2019 -0700 Fix for color filter commit a299347ba7e3b6a06224ddc2ae6595f56c6d5132 Author: Dan Field Date: Tue Jul 9 18:24:38 2019 -0700 skip golden tests on non-linux commit d6f46c41ae3e2e98e79a96a0db0c0d9121f77ce6 Author: Dan Field Date: Sun Jun 30 20:58:44 2019 -0700 fix test for semantics commit 42e1228453161b9376065b22e0f5c8db4eb01dcb Merge: 48420aece c1e709f07 Author: Dan Field Date: Tue Jun 4 14:36:04 2019 -0700 merge commit c1e709f07f88276ef208c71cea42219565555430 Author: Dan Field Date: Tue Jun 4 14:29:55 2019 -0700 fix ci commit e38a84aeaaddd8415168c61aef993cddc7d42654 Author: Dan Field Date: Tue Jun 4 14:02:32 2019 -0700 Fix groupOpacity when transform used commit 9479c89fcf9ea04781d62c10dd63be79ea393e74 Author: Dan Field Date: Mon May 6 19:40:11 2019 -0700 dev commit f62584cd440c6401456622bcb412952cc9f3aff3 Author: Dan Field Date: Mon May 6 19:34:06 2019 -0700 stable for ci commit 83d4e51b965494d993a9f9e670a8e6a92a86ef53 Author: Dan Field Date: Mon May 6 19:33:13 2019 -0700 bump for stable commit 48420aecedd7d43e1653e947c6bf45c2bf5c4d50 Author: Dan Field Date: Mon May 6 19:31:41 2019 -0700 bump path_drawing dep commit a74a6f7ea74a9d9eba5830580d8de2a3ea7bafc1 Author: Dan Field Date: Mon May 6 19:14:40 2019 -0700 Fixes and bump commit dfbaaeec317d4554e1f5e77a577f188790b9789e Author: Dan Field Date: Thu May 2 11:23:40 2019 -0700 version commit 49a52608d401dc4fcd0b0ec3d9b61d7254e2066b Author: Dan Field Date: Thu May 2 11:17:49 2019 -0700 bump commit a3f1d31aeb4e22d3e5e53b3b96fe6e51492fec92 Merge: 7057a0c0d 318667d31 Author: Dan Field Date: Thu May 2 11:12:04 2019 -0700 Merge pull request #158 from jacob314/error_refactor Refactor error messages. commit 318667d31b34f8d2c5e1ea7a0176ed7b8ccde60f Author: Jacob Richman Date: Wed May 1 21:30:43 2019 -0700 Refactor error messages. commit 7057a0c0dad07a8f82670ffddf631d9d48a83c3d Author: Dan Field Date: Tue Apr 9 01:20:26 2019 -0700 fix drawable root test commit 3467e6425a4d5db357d73c12baa846d0535adf6e Author: Dan Field Date: Tue Apr 9 01:14:08 2019 -0700 save before commit :( commit 623ded9712187d6109d39f53097126061519e68a Author: Dan Field Date: Tue Apr 9 01:08:26 2019 -0700 fix font logic commit 0de14c46fe52703d182cc30c4638f91bae3d7c7b Author: Dan Field Date: Tue Apr 9 00:57:40 2019 -0700 update docs, format commit 63cf57380a1dfb53d611a5509f0db2d4c0ad2cf3 Author: Dan Field Date: Tue Apr 9 00:51:50 2019 -0700 allow px for font size commit 3c969674d8777e77f0eba5605b4f53c80a519c5c Merge: 1596b5362 628fbf6b7 Author: Dan Field Date: Tue Apr 9 00:49:42 2019 -0700 Merge branch 'master' of github.com:dnfield/flutter_svg commit 1596b5362e9deaa12faf5d5e904ee965521ca5d3 Author: Dan Field Date: Tue Apr 9 00:49:37 2019 -0700 Fix group opacity commit 628fbf6b7f594a86d6f48830480fc081cb8b359b Author: Dan Field Date: Mon Apr 8 23:20:04 2019 -0700 update goldens commit eb64bce89c7e939cfd2a7ba10d3b749ce0b77d4d Author: Dan Field Date: Mon Apr 8 23:04:53 2019 -0700 excludeFromSemantics commit e6781ff0ebb48c2ed4cdc19e521974fe7ae03cbc Author: Dan Field Date: Thu Apr 4 09:17:35 2019 -0700 Add new golden, update pubspec and changelog commit d412a7524dc79430ae8f1fcc6b031debdbb2622e Merge: 6dd48b2dc 8af91b6da Author: Dan Field Date: Thu Apr 4 09:04:41 2019 -0700 Merge pull request #142 from aschiavon91/master handle rgba colors with alpha as double commit 6dd48b2dc981738047bc8f6f7fba7681a91d2ba4 Author: Dan Field Date: Thu Apr 4 09:03:30 2019 -0700 Fix listener removal, fix NPE commit 8665a19150a27b8762106b82b6c93a2322a34355 Author: Dan Field Date: Wed Apr 3 22:27:18 2019 -0700 fix text transform commit ec3b7f4ee2c3a6762476ab405ae865e3cb5a85e9 Author: Dan Field Date: Wed Apr 3 10:57:15 2019 -0700 remove unintended change, format commit 60f8008140b1279a1a78934dba6fe415975b62d6 Author: Dan Field Date: Wed Apr 3 10:55:51 2019 -0700 bump commit e61af2c46dd6f21b4f84ad188526bdd0bc137bf3 Author: Dan Field Date: Tue Apr 2 20:56:26 2019 -0700 Fix avdPictureStringDecoder commit 8af91b6daeaa6b8f28d556b3abab1e9d8a1750fe Author: Antonio Schiavon Date: Mon Apr 1 15:05:51 2019 -0300 improve implementation of rgba parse commit eeebd9a929ca36aaf6d50103241e0a27289509cb Author: Antonio Schiavon Date: Mon Apr 1 13:15:14 2019 -0300 improved parser of rgb to avoid color mismatch in rgba case commit 6336ddb1fab7fbd3e382b8d5937c2a63359f77ae Author: Antonio Schiavon Date: Mon Apr 1 12:16:44 2019 -0300 handle rgba colors with alpha as double commit 338b37ee6faba378874e8a6a84917ce37f64ffc5 Author: Dan Field Date: Sun Mar 31 00:58:14 2019 -0700 Add warning commit c73c910d1445503d5db042353a1839e4f7ad9a7f Author: Dan Field Date: Sun Mar 31 00:49:53 2019 -0700 Support display none and visibility hidden commit 2202723bede58ec183f9ce634fd8dd48ddc3b84e Author: Dan Field Date: Wed Mar 6 12:38:51 2019 -0800 Fix typo in CHANGELOG commit 9d4fd4bac8a99db6e09d97d748bf76f36f535683 Author: Dan Field Date: Tue Mar 5 10:16:41 2019 -0800 bump version commit f80bb326276d3bde234c9bd52a121dea8a2bb259 Merge: a708ee117 3d410bf84 Author: Dan Field Date: Tue Mar 5 10:13:21 2019 -0800 Merge pull request #131 from dnfield/gahms-fix_svg_widget_size Don't use devicePixelRatio to scale the SVG. It causes problems and inconsistencies. commit 3d410bf847d6c824e0bc52ad8fc64d3dbf236dba Author: Dan Field Date: Tue Mar 5 10:02:12 2019 -0800 Remove errant references to devicePixelRatio commit b05b8bef360db7b3d06a0cd876d2071cae103abc Merge: a708ee117 9ffb2a96a Author: Dan Field Date: Tue Mar 5 09:50:05 2019 -0800 Merge branch 'fix_svg_widget_size' of git://github.com/gahms/flutter_svg into gahms-fix_svg_widget_size commit a708ee117d2c75989fd115b3e59b0041433f556b Author: Dan Field Date: Sun Mar 3 22:29:01 2019 -0800 initial implementation of precaching images (#129) * initial implementation * remove duplicated code * test; * Use correct matcher now * error handling for real commit 7b40751d27a23ef91fe4d6db734d89d320b21aad Author: Dan Field Date: Wed Feb 27 10:58:03 2019 -0800 update version commit cf2b352378ae0d3bf2bc11457f4eb685f4a04023 Author: Dan Field Date: Wed Feb 27 10:57:07 2019 -0800 remove unintentionally commited file from bad merge commit 1a7a6912e65b6d5477a284b74a5bcca949066be8 Author: Dan Field Date: Wed Feb 27 02:16:55 2019 -0800 format commit 5ba5d7ba649975c814fd0db4b966d771deaf62b4 Author: Dan Field Date: Wed Feb 27 02:04:07 2019 -0800 update changelog, do y version bump commit e7ac8c49ad11e7655138dc73906328250d6f3b64 Author: Dan Field Date: Wed Feb 27 02:02:06 2019 -0800 consume unsupported elements commit 71d9c2662a7f2b31b73c640e19aa2b065ba0874b Author: Dan Field Date: Tue Feb 26 20:59:15 2019 -0800 Svg parser update (#125) * Unpin xml * update pubspec commit 37bf18823fadfb001a8acd7ac1096dc8a2351b08 Author: Diego Ballesteros Villamizar Date: Mon Feb 25 19:15:24 2019 +0100 Fix title in Changelog (#123) * Fix title in Changelog * Move the line of support 'px' to the right release commit 11c7e75fb8033745dbe71f812e1a9f51bf1f7aeb Author: Dan Field Date: Mon Feb 25 09:39:19 2019 -0800 bump version commit d0a1aa6e73cebf8fa19af06695c1a7d9f001592a Author: Dan Field Date: Mon Feb 25 09:36:02 2019 -0800 Fix transform logic commit 8b96c1c52a29e2a9c2da2e1a1bf303f7ec2e04d0 Author: Diego Ballesteros Villamizar Date: Thu Feb 21 23:55:14 2019 +0100 Pass the PictureConfiguration to obtainKey (#118) This way the ExactAssetPicture can use the DefaultAssetBundle derived from context through the LocalPictureConfiguration instead of always defaulting to the rootBundle. This is helpful for tests and for local widget context assets. All other provides just ignore the configuration. This analogous to the implementation of Image.asset in Flutter. commit afdf2fc5ae615822db8705a0dd99604357a69941 Author: Dan Field Date: Thu Feb 21 10:17:09 2019 -0800 Update parser_state.dart commit d97be73bb107af4fb65f4b47bf6ca547849640d7 Author: Diego Ballesteros Villamizar Date: Thu Feb 21 19:02:09 2019 +0100 Fix CI by changing linter options (#119) * Fix CI by changing linter options Remove a deprecated one and comment out one that is triggering on new language features. * Add a linter ignore to the Set literal Restores the prefer_collection_literals commit 9ffb2a96aeb047fa3759ad0652559d74fde99c50 Author: Nicolai Henriksen Date: Sat Feb 16 13:13:52 2019 +0100 Added test of SVG with viewport smaller than drawing. commit 328d718d47d2c65a2b68312ed0c84c3b651c0416 Author: Nicolai Henriksen Date: Sat Feb 16 12:55:54 2019 +0100 Changed clipping to use same size as SVG and not use devicePixelRatio commit 648f5d1dc131fd9157e001b004e33d38bc41b727 Author: Nicolai Henriksen Date: Sat Feb 16 12:55:17 2019 +0100 Added test for rendering SVG in ‘natural size’. Natural size as in the size specified in the SVG width and height. commit 1feea2487a3389af2daa9207d7e807b8f4f6d1db Author: Nicolai Henriksen Date: Sat Feb 9 15:11:30 2019 +0100 Removed unused import. commit 1f9512817cb115f237822ba17feed8dbe9bb25c0 Author: Nicolai Henriksen Date: Thu Feb 7 07:59:41 2019 +0100 Fixed SVG widget size. The widget created for a SVG file should have the same point-size as the SVG viewport size. commit 8c7a37bc948f004e32b6000c8eba9b785a818ef9 Author: Kevin Moore Date: Tue Jan 29 18:22:38 2019 -0800 Should not commit pubspec.lock in publish packages (#109) * Should not commit pubspec.lock in publish packages https://www.dartlang.org/guides/libraries/private-files#pubspeclock * Delete pubspec.lock * Delete pubspec.lock commit c96ac2c47b1e1aa847691a0f5a249a88503dd774 Author: Dan Field Date: Fri Jan 25 11:19:22 2019 -0800 text commit 98785b5809b2a55e5fb62370945ca1c8f25a8be8 Author: Dan Field Date: Fri Jan 25 09:09:35 2019 -0800 update more goldens commit d6c35fd25c7c2a885879e7c32724df5a7ae00a8b Author: Dan Field Date: Fri Jan 25 07:50:19 2019 -0800 update goldnes, pin xml, fix parseDouble commit f4ffe42502e1ceeb9eb245165076ee9ac18b19bc Author: Dan Field Date: Sun Jan 20 16:29:33 2019 -0800 Allow parsing numbers with postfixes. commit 01b245bb8f0a8bceaaf1280608d93932b3ed0914 Author: Dan Field Date: Thu Jan 17 10:30:14 2019 -0800 update goldens commit 3283bb19470f97550f65a39c8c33c8288cd4c683 Author: Dan Field Date: Thu Jan 17 10:12:52 2019 -0800 make it easier to use semantics commit 70834f3c8fe200116f53ed477ef821bc7da94c11 Author: Dan Field Date: Mon Jan 14 15:06:17 2019 -0800 proper rev, ignore public docs in main.dart commit 6bb4a56f0b89bdd92207a1582f8fc8405e716961 Author: Dan Field Date: Mon Jan 14 15:03:03 2019 -0800 clarify changelog commit b19d1fe805f3b4fa221439d1f0f7e4344119f5ef Author: Dan Field Date: Mon Jan 14 10:37:39 2019 -0800 fixes for ref gradients commit 0b8ad1516436bdbb75a357e72cc7fa5dabed9898 Author: Dan Field Date: Mon Jan 14 09:32:14 2019 -0800 Fix parsing error for non-self-closing stops and clipPath children commit 4be9b191ec1b06d2d3016b9dd13599ba147649f1 Author: Dan Field Date: Mon Jan 14 01:27:57 2019 -0800 add docs, remove dead code commit 7015f32cdd0a953da50ac838d9c7c1835b63c08b Author: Dan Field Date: Sun Jan 13 23:50:00 2019 -0800 Support `xlink:href` on gradients commit 0f66b78d9f8d189d7223f2ceedff474b5811124d Author: Dan Field Date: Sun Jan 13 09:41:40 2019 -0800 fix empty defs commit 92d2e5e1d37dced2b4680719d6765493a31f31d3 Author: Dan Field Date: Fri Jan 11 21:09:46 2019 -0800 loosen xml constraint commit 95c13de3322d3ecd2bd5bc2656a7ef7909ac3272 Author: Dan Field Date: Fri Jan 11 21:08:46 2019 -0800 prep for publishing v0.10.0 commit 26a5c9b376d16a777f620402595b8f95526af6e9 Author: Dan Field Date: Fri Jan 11 15:58:40 2019 -0800 Format commit 24dcd58eae47db810d2487535ff1355518f7a85e Author: Dan Field Date: Tue Jan 8 21:35:17 2019 -0800 Parsing rewrite (#85) Use push based reader for XML parsing commit 824786df8490ff6ea75cf65ad518a53dbfd0e3c4 Author: Dan Field Date: Mon Dec 31 00:57:03 2018 -0800 Text improvements (#95) * text improvements -need goldens * add golden, clean up analysis commit 58949fa47447117d0f3d8507b60e06a9f483a719 Author: Dan Field Date: Mon Dec 31 00:02:25 2018 -0800 v0.9.0 commit 16b35e2cc28de8f81800c07135a79d8294578bfe Merge: bb9645f52 fc0571328 Author: Dan Field Date: Mon Dec 31 00:00:12 2018 -0800 Merge branch 'master' of github.com:dnfield/flutter_svg commit fc05713285d45e27c3faf510801933d2c4f722c8 Author: Dan Field Date: Sun Dec 30 16:06:46 2018 -0800 update goldens commit de98dbf351ec9de1e4cbd30ce892b5dff59679b9 Author: Kris Pypen Date: Mon Dec 31 01:03:14 2018 +0100 Text support improvements (#92) * Text support improvements: * font-weight is now parsed to flutter font-weight values * font-family is now inherited * dx-dy-x-y fixed, also with tspan support * fill without stroke was broken commit bb9645f52827f707584081910a1bee7fe4eb4237 Merge: 77dc909d1 aa0bb903c Author: Dan Field Date: Sun Dec 30 15:55:42 2018 -0800 Merge branch 'master' of https://github.com/krispypen/flutter_svg commit 77dc909d140f7ba0fb16215028f30321bcf1ed33 Author: Dan Field Date: Fri Dec 28 19:52:11 2018 -0800 v0.8.3 commit 78f65a2aeff4bd91924fe513d00248cb76c0c2cf Author: Dan Field Date: Fri Dec 28 19:45:04 2018 -0800 fix group processing for clipPath use commit 9c7c0e2e9ef388909db644aea6531d19d2c9bbdf Author: Dan Field Date: Fri Dec 28 19:27:23 2018 -0800 remove unused import commit 921b729cc81648c1e06e03a4c1f537db865ef0f7 Author: Dan Field Date: Fri Dec 28 19:23:47 2018 -0800 Support non-def clipPath and `use` in clipPath commit 1769cce96d3975e8864671a56d9649d413d0fc7f Author: Dan Field Date: Fri Dec 28 18:55:42 2018 -0800 Prefer usvg to svgcleaner now commit aa0bb903cad6ecb1c50d9fe4ad63a1f6c71f94b0 Author: Kris Pypen Date: Fri Dec 28 19:11:34 2018 +0100 changes for comments commit e64e04bca1cf03a7a031415962c98d035b3ef439 Author: Kris Pypen Date: Fri Dec 28 19:07:50 2018 +0100 changes for comments commit fb806d2605754506cfabf36393c3b5fb06e176d9 Author: Kris Pypen Date: Sat Dec 22 17:58:24 2018 +0100 fixed some analyzer issues commit 8a9c87eb831af116f39a89a22fb671d0b640204d Author: Kris Pypen Date: Sat Dec 22 14:14:14 2018 +0100 ignore text tests because it makes no sense at the moment commit b1163c9697a14f8897fa775e07fec2a38e5d3606 Author: Kris Pypen Date: Sat Dec 22 13:37:50 2018 +0100 Text support improvements: * font-weight is now parsed to flutter font-weight values * font-family is now inherited * dx-dy-x-y fixed, also with tspan support * fill without stroke was broken commit 4b8577ab4cad8653dcb2db5b261e735fd035efc2 Author: Dan Field Date: Tue Dec 18 09:46:04 2018 -0800 revert unintentional change commit 19ad168b896cef649172cc63f6e16340b92f4e20 Author: Dan Field Date: Tue Dec 18 09:38:52 2018 -0800 bump version commit 05d85884e7ab251b1bc443c8446249d2feb7e6ec Author: Dan Field Date: Tue Dec 18 09:36:40 2018 -0800 fix crasher for DrawableNoop, improve error reporting commit 2ed2b91d742d1be9c74e296e6907479e326fa8a0 Author: Dan Field Date: Mon Dec 17 10:32:08 2018 -0800 revert width/height update doc commit 4673e2f77cb3c1ec1cd4acfb5c7af1504b911804 Author: Dan Field Date: Mon Dec 10 21:56:55 2018 -0800 revert faulty scaling logic commit 7b0dc98c3020b79f4eac1b9fa6f77b789ad40ada Author: Dan Field Date: Mon Dec 10 21:56:21 2018 -0800 revert faulty scaling logic commit 8498d2b4ee3191dcc7f8a335f88f1d2484f9a4ba Author: Dan Field Date: Wed Nov 28 19:34:51 2018 -0800 support for commit 4bece57c4ef1fd5ab2b7ebad5bcdb600143e65b4 Author: Dan Field Date: Wed Nov 28 14:15:53 2018 -0800 fix test commit a6ccc999cdd871d05c975c02ddd1a0c041b17b4f Author: Dan Field Date: Wed Nov 28 13:03:18 2018 -0800 Cache by default commit d6fe97c1b93cce0e0ab1e98c872bbb7a4ad00afd Author: Dan Field Date: Wed Nov 28 10:02:25 2018 -0800 Cleanup, start image commit e65aa1519fc7537f514566c73d16ed4668333854 Author: Dan Field Date: Mon Nov 26 15:45:07 2018 -0800 update changelog/readme commit b78e2071717165bbdb61673439710200df198de2 Author: Dan Field Date: Mon Nov 26 14:09:57 2018 -0800 test def with id commit df768579afb7ec45976aeb7679a12420b182bb98 Author: Dan Field Date: Mon Nov 26 13:40:58 2018 -0800 support symbol in or out of def commit 0c2e616ef389bee9156472fd60b27e685ca10676 Merge: 61b37be79 3cd119e32 Author: Dan Field Date: Mon Nov 26 13:00:05 2018 -0800 Merge branch 'master' of github.com:dnfield/flutter_svg commit 61b37be791774e3fb23d3c7a8e5e4fadd8007a64 Merge: fc8fc118f 6133bd0cd Author: Dan Field Date: Mon Nov 26 12:57:46 2018 -0800 Merge branch 'shape_ref' commit fc8fc118fcbebf319255271ae0b823fa6c1e2192 Author: Dan Field Date: Mon Nov 26 12:57:42 2018 -0800 more test, format, remove temp code from example commit 3cd119e32b5eb22e724e8ad356bb64cf8d6c1ba6 Author: Dan Field Date: Mon Nov 26 00:15:35 2018 -0800 linux gen text commit b9875f1d38ed18a0c2f77f7155124e5403db2f7b Author: Dan Field Date: Mon Nov 26 00:07:49 2018 -0800 include text test commit 05d5f811580555fd4fdce5a61e24bcd38acddcb1 Author: Dan Field Date: Sun Nov 25 23:36:15 2018 -0800 add some tests, minor fixes commit 6133bd0cdcff9e427ef7c029cf4f0f30d2f18184 Author: Dan Field Date: Sun Nov 25 22:58:11 2018 -0800 initial impl for `use` commit a4219acf9d6343db4e3b5b1f429330acfc71edaf Author: Dan Field Date: Sun Nov 25 16:17:35 2018 -0800 partial for symbols commit 152f39de514a8daa825bd2d68b074a7d511e0eb3 Author: Dan Field Date: Sat Nov 24 15:32:15 2018 -0800 refer to shapes commit de86cb49d98f38122274b9c04eb15353fae4e98e Author: Dan Field Date: Fri Nov 23 22:41:53 2018 -0800 fix width/height bugs commit 8afc718844b9fb89d6b44d95106bd5e0cec8cdc4 Author: Dan Field Date: Sat Nov 17 21:19:00 2018 -0800 update goldens commit a4bd2841613cf781066da6cc637e9780833ad81a Author: Dan Field Date: Sat Nov 17 21:07:32 2018 -0800 Update pubspec.yaml commit 4ccae69c6bac32a930da57df29d4af8b7474f36c Author: Dan Field Date: Mon Nov 5 00:48:48 2018 -0800 Avoid window.devicePixelRatio commit 23b3dbde3f1fe63fef60f90e5d0299a90ce2ddd1 Author: Dan Field Date: Sun Nov 4 23:00:31 2018 -0800 fix travis commit 10ac30f4da1a2567d64741511bf9659798194787 Author: Dan Field Date: Sun Nov 4 22:21:15 2018 -0800 Correct width/height processing, update lints commit 154281e79e35e266913ca66d1abdf1a5e46f33b1 Author: Dan Field Date: Sun Nov 4 19:55:51 2018 -0800 fix fill-rule, bump path_drawing commit 942d5977a8ba0655dba52630de3c93213546d44d Author: Dan Field Date: Sat Nov 3 00:41:50 2018 -0700 remove deprecated analyzer portion, bump path_drawing commit 998b9ca5bcbb646e2e14665584c04c0321a7422e Author: Dan Field Date: Sat Nov 3 00:36:31 2018 -0700 add coverage back commit 4fe680149f038950bb13141b178e7ed1c10bcfe1 Author: Dan Field Date: Thu Oct 25 11:13:12 2018 -0700 uncomment example commit ae71f6901802bc75dfeccc56e2e38ac70584b731 Author: Dan Field Date: Thu Oct 25 11:04:53 2018 -0700 update golden widget tests commit 4f6fa209ad26e37787c5c3c59e164247097fd53d Author: Dan Field Date: Thu Oct 25 10:59:49 2018 -0700 update drawing dep, update goldens commit 11687b409d77bc3908b239e2014f4d67e4d9ed20 Author: Dan Field Date: Thu Oct 25 10:43:35 2018 -0700 uncomment/format tests commit a95496f630c1ed67469d70e6e03b839955d71898 Author: Dan Field Date: Thu Oct 25 10:27:25 2018 -0700 Fix decomposeCubic logic commit 02811b6ec0d791516c1b625e11b52c8028844905 Author: Dan Field Date: Sat Oct 6 22:10:45 2018 -0700 remove coverage .. broken? commit 2641e68e00cf5e24d8d2bcf19c147fb40349c960 Author: Dan Field Date: Sat Oct 6 21:31:33 2018 -0700 fix stroke/fill commit 3ca677d1e3782569cf663a9819eefb7e9f5e6c2b Author: Dan Field Date: Wed Sep 26 15:05:48 2018 -0700 better error for invalid viewBox/width/height commit e4fdd88b278412ecfaf7a5bd59437cc2a0a620e7 Author: Dan Field Date: Tue Sep 18 10:23:31 2018 -0700 version bump commit ca4b4da7286d8a1d640bed618860f64419d5bd15 Author: Dan Field Date: Mon Sep 17 21:33:14 2018 -0700 add test, print errors once commit 93938caa8b0f620a47d561c7eafc637d179f9924 Author: Stefano Rodriguez Date: Mon Sep 17 21:23:59 2018 +0200 Improve SvgPicture size handling (#60) * Improve SvgPicture size handling * Fix formatting * Fix behaviour * Fix missing fields in initializer * Add docs commit 2e847f64a80bd55f9b495dad04fc5d563ae0930c Author: Dan Field Date: Tue Sep 11 09:05:06 2018 -0700 update tests, try to fix travis commit f5e034b91d84bfdaa05b5c226a115f6f0572f24e Author: Dan Field Date: Mon Sep 10 20:50:24 2018 -0700 fix viewport for non-zero min-x min-y commit f00a3430535ca8d962b9063ca73fa4c3f323e3a8 Author: Dan Field Date: Mon Sep 10 20:23:08 2018 -0700 Fix another spot for DrawablePaint/Paint commit 5c9635795acb69dcfb4fde23ea7f221e23a64d9d Author: Dan Field Date: Mon Sep 10 20:18:33 2018 -0700 make drawableTextStyle use DrawablePaint commit 1c165f85d88afa43a9ac7429de265284351f1e96 Author: Dan Field Date: Mon Sep 10 20:12:54 2018 -0700 format/analyzer fix commit 5dda1393c560640decea6a5555f365a5b34c0276 Author: Dan Field Date: Mon Sep 10 20:11:50 2018 -0700 restructure for newer flutter versions, update goldens commit 9f13160931a6dcf4d03ea7696fa5038897edc859 Author: Dan Field Date: Mon Sep 10 20:02:36 2018 -0700 move stuff around commit 8fc63994809b9dcb21a32db433ef4c4c31fd5ef0 Author: Stefano Rodriguez Date: Mon Sep 10 18:20:24 2018 +0200 Improve Gradients (#54) * Add support for gradientTransform. * PR changes. * Update deps * Fix linear gradients behaviour with decimal offsets * Fix linearGradient * Partial fix for radialGradient * Fix support for mockito 3.0 * Correctly apply transforms to the whole canvas rather than only to the path * Add NoopShader to handle unsupported shaders * Add linear and radial gradient svg assets with transforms * Improve gradient svg test assets * Add regenerated golden pngs * Make affineMatrix function public * Fix handling of gradientTransforms * Fix deprecation warning * Add support for percentage gradients with userSpaceOnUse commit fc215708c457b0c8baf0a3fb492a309e718b3033 Merge: fdb9cbbfd 4de6cce8f Author: Dan Field Date: Fri Sep 7 10:00:01 2018 -0700 Merge pull request #56 from sroddy/hotfix/merge_paint Fix merge paint edge case commit 4de6cce8f66e02da647b8e8d379581c2396020f4 Author: Stefano Rodriguez Date: Fri Sep 7 17:09:51 2018 +0200 Fix NPE commit 8a306a4b72fc8a30e8307cf2a87df251e01efb5f Author: Stefano Rodriguez Date: Fri Sep 7 14:00:10 2018 +0200 Fix merge style edge case commit fdb9cbbfd166a667c64fa3e83571db667783bab5 Author: Dan Field Date: Wed Aug 8 14:44:11 2018 -0400 adjust pubspec commit 3b3b23ecafcdbdc15684ca04c37e2322fbaa85f2 Author: Dan Field Date: Wed Aug 8 14:43:28 2018 -0400 fix for flutter beta channel commit 9deee8ad6c0d5c3291da0f09a7f7f05b5c3dcb4a Author: Dan Field Date: Wed Aug 8 14:10:42 2018 -0400 Fix painting inheritence commit 5fa13b51853c9b2e333de28efa11bcecca8a5705 Merge: a562a3a4e 7993bbde6 Author: Dan Field Date: Mon Aug 6 11:33:03 2018 -0400 Merge pull request #41 from gmlewis/rounded-rectangle Fix rounded rect when rx or ry is missing commit 7993bbde6a03a6abb5abac507940872f0c0ee984 Author: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> Date: Fri Aug 3 20:55:46 2018 -0400 Fix rounded rect when rx or ry is missing commit a562a3a4e053bdb32942bf0b57d93520cab04b47 Merge: 8ed7a6fe4 0b5435681 Author: Dan Field Date: Fri Aug 3 20:34:39 2018 -0400 Merge pull request #40 from gmlewis/master Run "flutter format" and "analyze" and clean up deprecated warning commit 0b543568172278e68f8e900dbe6e45aaa24ff0f7 Author: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> Date: Fri Aug 3 20:23:33 2018 -0400 Revert HttpStatus.ok change commit cd3291934f8688d7fbd851b66c58b62905e0e3a5 Author: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> Date: Fri Aug 3 20:13:10 2018 -0400 Run "flutter format" and "analyze" and clean up deprecated warning commit 8ed7a6fe477d6df8165ba76561ad92c768eb1c19 Author: Dan Field Date: Wed Aug 1 22:23:46 2018 -0400 update changelog commit a95d65510460cf1a534d3695ae268b80ddae3fc0 Author: Dan Field Date: Wed Aug 1 22:22:55 2018 -0400 Consume latest path_drawing package to fix parsing issue commit 0f00ef2ec5b6923a194a5c8da6e9aa107ea67749 Author: Dan Field Date: Wed Aug 1 22:10:13 2018 -0400 fix smooth command parsing commit 27747231a14b9b6896fb11b3212044b66fffa6fc Author: Dan Field Date: Tue Jul 31 16:02:07 2018 -0400 update package commit 89ad74cf0dcdc1aa14597641d8224ea6fd0cd732 Author: Dan Field Date: Tue Jul 31 16:01:10 2018 -0400 fix issue for master :( commit 6407d0d83cbdb7d758b51a377e8d20d9ccc251c3 Author: Dan Field Date: Tue Jul 31 15:53:49 2018 -0400 reformat commit 3e76aa0a5b36428af95511f84a5ecf8ba6cd92ab Merge: 257815f9e 7ca1ddf96 Author: Dan Field Date: Tue Jul 31 15:53:30 2018 -0400 Merge branch 'master' of github.com:dnfield/flutter_svg commit 257815f9ed0b94be31df5337e3b442ac7db13d07 Author: Dan Field Date: Tue Jul 31 15:53:21 2018 -0400 update changelog/pubspec commit cbba590de4b910c712233a79d19c2700539f9f6e Author: Dan Field Date: Tue Jul 31 15:51:29 2018 -0400 fix stroke commit e6c506baa8e55f845ab4b123b1f520aa5a9bee60 Author: Dan Field Date: Tue Jul 31 14:32:47 2018 -0400 Fix opacity for fill with inheritence commit a5ff723c49c208f0adf84d6645f665ac937409dc Author: Dan Field Date: Mon Jul 30 11:22:42 2018 -0400 add example, fix link commit a42c76620175a949665f63bef671697160a78b54 Author: Dan Field Date: Mon Jul 30 10:48:51 2018 -0400 initial commit commit 7ca1ddf961386ff8e0e4d24da37a7cf6a8306fe4 Merge: b181e216b 04f2e609c Author: Dan Field Date: Thu Jul 19 09:23:24 2018 -0400 Merge pull request #37 from cjrams/useHeaders Use the headers to get the file commit 04f2e609c11f38a255854392dffa842ac00fa1ce Author: Carlos Jimenez Rams Date: Thu Jul 19 14:42:55 2018 +0200 Fixed warnings and empty headers commit ade74a1c190d644971ac36ffdfedf252e869c286 Author: Carlos Jimenez Rams Date: Thu Jul 19 12:55:44 2018 +0200 Use the headers to get the file commit 35eca1b1d14a8dd608cb459340dcaa3e40edaa81 Author: Dan Field Date: Mon Jul 2 08:20:22 2018 -0400 version bump for exponents commit b181e216ba6359ee8db334bab2ac82d48a761634 Author: Dan Field Date: Wed Jun 27 09:23:37 2018 -0400 Fix typos... commit 83fd74c7c8fe2008817c648b57c5b554154cf90b Author: Dan Field Date: Mon Jun 25 22:10:04 2018 -0400 0.5.0 commit eea855ac1e058a23f98e5c03ad5578887f3d3a43 Author: Dan Field Date: Mon Jun 25 21:58:36 2018 -0400 save before committing... commit cb70ea2853dd2a693dd51e30cfd05d92f7c9a98c Author: Dan Field Date: Mon Jun 25 21:55:54 2018 -0400 support nested tspans, but no dx/dy/x/y yet commit 2c13ff97671dc1f49985717a47447c434bfc56e1 Author: Dan Field Date: Fri Jun 22 21:37:21 2018 -0400 update tests commit b4454befed46eeedd5a4ebbdf17398a00a442f95 Author: Dan Field Date: Fri Jun 22 21:34:58 2018 -0400 Fix ellipse parsing commit 0b95960bcbb03fa2e1054159cff3060279df91ea Author: Dan Field Date: Wed Jun 20 21:37:58 2018 -0400 fix analysis; remove dead code commit de2da02dd41252b3ea454b1b6f9c9a07f94b0ba7 Author: Dan Field Date: Wed Jun 20 20:42:40 2018 -0400 beta usable for testing commit 95c1eaf356a2889233fb0087d863e21408926b3e Author: Dan Field Date: Wed Jun 20 20:42:11 2018 -0400 add support for focal, update pubspec commit a52bac4ef1de334dba3e10dc1921f2d4a9d10a4c Author: Dan Field Date: Wed Jun 20 13:16:03 2018 -0400 Fix polyline parsing commit 03aca8da2190ef66d6dc18aeb7232314955117d7 Author: Dan Field Date: Tue Jun 19 18:53:46 2018 -0400 bump version commit b495e65ea0a946bff1ed44e721c55c265c99b068 Author: Dan Field Date: Tue Jun 19 18:53:17 2018 -0400 Fix width/height in flex scenarios commit 47809d16441517416ce5e32f569156fde0b6b0cc Author: Dan Field Date: Mon Jun 18 19:48:52 2018 -0400 format commit aef2c3aec18783ea8cfa89bbee2313a8f2e612ba Author: Dan Field Date: Mon Jun 18 19:41:05 2018 -0400 back to dev commit 10d2be030de779a4c76dec1390a619170a946323 Merge: b881eeb7b 5e8213d3d Author: Dan Field Date: Mon Jun 18 19:38:18 2018 -0400 v0.4.0 commit b881eeb7b89e052f35db45a2450c2712bea9cf04 Author: Dan Field Date: Mon Jun 18 19:30:04 2018 -0400 remove dead code, make sure this runs on beta in travis commit 627972dbd2452e9447ceba65b8911720c2163833 Author: Dan Field Date: Mon Jun 18 19:28:04 2018 -0400 version bump commit 532fe9fec06e135d98e03c68e9e0d5fe75042a89 Author: Dan Field Date: Mon Jun 18 19:07:25 2018 -0400 Print error when encountering unresolved definition commit 5e8213d3dfd8994354d33739e3cb868f91d5706c Author: Dan Field Date: Sat Jun 16 15:45:18 2018 -0400 Support for text-anchor commit d826e860650387cd8b4c343c5f64e55003782dac Author: Dan Field Date: Fri Jun 15 10:48:52 2018 -0400 update travis for this branch commit c600f78ea2885f8a3e2a4ccd490e6ccddd341b8c Author: Dan Field Date: Fri Jun 15 10:38:48 2018 -0400 Support text stroke and fill commit 7109f7f3dc68f860882c81f263513f0838fdb95c Author: Dan Field Date: Thu Jun 14 09:50:12 2018 -0400 improve tests, improve coverage commit 8973c2c22baaf3b6d61a7e886ee6ab5fd5e6cbbb Author: Dan Field Date: Wed Jun 13 22:15:56 2018 -0400 fix directionality commit e65bdaa2d50e90271fbe14339e4dc01b998c6ac4 Author: Dan Field Date: Wed Jun 13 21:50:07 2018 -0400 documentation for SVG, add width/height commit 099ee77fd3020108ac1fcf50aba85e316387bfb5 Author: Dan Field Date: Tue Jun 12 11:40:57 2018 -0400 missing update to golden generator, analyzer nits commit fb02d555080230587fe8b5159b013c7548a159f8 Author: Dan Field Date: Tue Jun 12 11:37:11 2018 -0400 remove deprecated code. add better error reporting for unsupported style element commit 9d6b2e042df558f4600890a92640532861278198 Author: Dan Field Date: Sun Jun 10 14:19:57 2018 -0400 bump version to v0.3.3 commit 3fa872df63ee08ab78932a3367af788436ce3086 Merge: 3255ca15a e0fe5a544 Author: Dan Field Date: Sat Jun 9 19:17:27 2018 -0400 Merge pull request #18 from wkornewald/fix-color-parsing color percentages can be floats and there can be whitespace everywhere commit e0fe5a544f61aa5c5e05ad2b8e8fd83662e99844 Author: Waldemar Kornewald Date: Sat Jun 9 08:15:40 2018 +0200 color percentages can be floats, rgb is case-insensitive, allow whitespace commit 3255ca15a4323f81bbcacd02f218ad7f54ffcfb0 Merge: 8cd88516e 1528f4c3f Author: Dan Field Date: Fri Jun 8 15:52:16 2018 -0400 Merge pull request #17 from wkornewald/fix-path-on-windows fixed path handling on Windows commit 1528f4c3f40701926b5bb0cc3f85e16fc25c54de Author: Waldemar Kornewald Date: Fri Jun 8 21:30:18 2018 +0200 fixed path handling on Windows You have to use Platform.script.toFilePath() instead of Platform.script.path because the latter is the path part of a Uri, but we want an actual file system path. commit 8cd88516e04997d755731540608be887bc5e8cd4 Merge: d59ecbb0b b04554693 Author: Dan Field Date: Fri Jun 8 14:50:46 2018 -0400 Merge pull request #16 from wkornewald/fix-centering fixed centering of image in scaleCanvasToViewBox() commit b045546933ae566eb56ab89fa383b84618c3005c Author: Waldemar Kornewald Date: Thu Jun 7 16:44:31 2018 +0200 fixed centering of image in scaleCanvasToViewBox() commit d59ecbb0b286a82aef543933cfe1d4d595f84742 Author: Dan Field Date: Tue May 29 07:27:08 2018 -0400 bump ver commit 15aceff6c6a72d7014ea83f79b2306c8c568c367 Author: Dan Field Date: Mon May 28 19:33:09 2018 -0400 color as part of hash/equals commit d1d2193b7b215341069c9e6fb0bb99beb2f99aaa Author: Dan Field Date: Mon May 28 09:13:02 2018 -0400 ver bump commit 69ca4bb07b5e18b882c2087777766da4aa59ce52 Author: Dan Field Date: Sun May 27 15:21:51 2018 -0400 color filtering! commit 9722f7d5024885e6dcce39060250ce55696336a4 Author: Dan Field Date: Sun May 27 00:26:40 2018 -0400 update changelog commit 1bc3e2613b211af1734957d6fae8279f5a9fcebd Author: Dan Field Date: Sun May 27 00:22:31 2018 -0400 bump ver commit a0bad842df31016b452b550c28c00acd6b03e48d Author: Dan Field Date: Sun May 27 00:21:44 2018 -0400 update readme, changelog commit 4516446dfbf45e953eaf315e6a616346734179c7 Author: Dan Field Date: Sat May 26 23:29:06 2018 -0400 pref const commit 8ed43e1245d91a5ba39948cafd58b6e9f717083c Author: Dan Field Date: Sat May 26 23:25:06 2018 -0400 allow drawing outside viewbox on picture commit b2255b0d7cbda07a41a0830d9269fa0404ee7e16 Author: Dan Field Date: Sat May 26 23:07:37 2018 -0400 update PictureConfiguration commit 3dcffdb60024b01ec259959fe0947f807d50b133 Author: Dan Field Date: Sat May 26 22:58:41 2018 -0400 allow drawing outside of viewbox commit 5cc51e561d9fdf881e637e31e7ed83a8c8ddddd6 Author: Dan Field Date: Fri May 25 15:02:44 2018 -0400 format commit 1bf4e0d9698d70f10c269fb590b51fe4e7fc7ec8 Author: Dan Field Date: Fri May 25 14:57:47 2018 -0400 Update pubspec.yaml commit 346680a20c3a011aed53be9e1c4b7a1b17b3308a Author: Dan Field Date: Fri May 25 14:50:47 2018 -0400 initial caching commit 0ab3f45a009eb0d40b9a5b157b703cdffc51e076 Author: Dan Field Date: Fri May 25 11:34:14 2018 -0400 update tests, add String version commit e3bc3d67cdf58af8be79c7de8345c6bd139c036f Author: Dan Field Date: Fri May 25 09:11:01 2018 -0400 more refactoring, getting closer, deprecate old classes commit 34a85aad7e924330aa98da94cab5ad05b5a87511 Author: Dan Field Date: Fri May 25 00:13:59 2018 -0400 Major refactor of widgets - WIP commit 73f5571ff5e34d76840df7238e1c2cfac3d031ff Author: Dan Field Date: Thu May 24 09:31:09 2018 -0400 Revert colorReplacer commit 8c1bac3d8265d65ec45da917a9872b39a017a7e6 Author: Dan Field Date: Sun May 20 15:07:30 2018 -0400 improve example commit 928306f050be46dfe999c2f8a64f2d210624bb2f Author: Dan Field Date: Sun May 20 15:02:05 2018 -0400 support color replacement, rename enum values to match dart style commit f41a4400d96f82980b184cf451c668bbb1ca55e0 Author: Dan Field Date: Sun May 20 07:27:34 2018 -0400 add golden file commit e30ac227085232ab76bc852411f64797505a749d Author: Dan Field Date: Sun May 20 07:26:01 2018 -0400 uncomment code commit c2ac7bd4846447bce895c68bea9f4b4ece08e2dd Author: Dan Field Date: Sun May 20 07:23:14 2018 -0400 support multiple clips commit 5d9801ab38a8b75135e2292bc1b98820da40ec23 Author: Dan Field Date: Sat May 19 20:57:49 2018 -0400 remove temporary testing code commit a7a079f632044e2e1bf6b751262ec411e8549dec Author: Dan Field Date: Sat May 19 20:54:06 2018 -0400 initial clip path support; fix bug in inherit; update tiger golden commit d7f415f0ae6b26da97c0179b3d8d1a4e5fb23076 Author: Dan Field Date: Sat May 19 16:06:38 2018 -0400 move path parsing out for clippath commit 7a469dfeec528ef4b99f60e396f4853b3889ff79 Author: Dan Field Date: Sat May 19 14:15:07 2018 -0400 Refactor in prep for clipPath commit d64ee3d10ad713877e074771fc12de652eeb4b5e Author: Dan Field Date: Thu May 17 10:12:37 2018 -0400 CHANGELOG updates... commit 3ccdc13431a6d87c1828588f91865d4be8e235d9 Author: Dan Field Date: Thu May 17 10:08:43 2018 -0400 bump ver commit 03d0bf593a395cab1d4bf84bd633cf970837dc6e Author: Dan Field Date: Thu May 17 10:06:12 2018 -0400 README and docs, formatting commit bc3daa626b9d93eff27695f06ca2e617cec41007 Author: Dan Field Date: Thu May 17 09:15:20 2018 -0400 more tests commit 8ebcedbb75d77fd3a3a5a9d053959db4f8ed8ee1 Author: Dan Field Date: Wed May 16 21:14:48 2018 -0400 update golden image for flutter logo commit a53bb514e16c2a59ff020e3f38b9902186d9b7d7 Author: Dan Field Date: Wed May 16 21:06:02 2018 -0400 add missing gradient to flutter logo commit ecc27bc9aef4816a7791fd0bbb1df66a32e81832 Author: Dan Field Date: Wed May 16 14:15:56 2018 -0400 more tests commit be4d50311dda5620d1b51a69a40f6a49ef03ba19 Author: Dan Field Date: Wed May 16 00:59:18 2018 -0400 support for radial gradient pct commit 7efec9bde6d3ee3fd1fc24a5ddcc30a14f05bbd0 Author: Dan Field Date: Tue May 15 22:08:59 2018 -0400 customize error and loading in widget commit fc264c99ac97295829979bb62ead6cdde12bde60 Author: Dan Field Date: Tue May 15 10:56:36 2018 -0400 use ErrorWidget on error commit a5da18c138309a26c01ee6f1781b4836eb1b8e2b Author: Dan Field Date: Tue May 15 00:48:01 2018 -0400 single branch travis commit 26114430204cb1a19a55c35149f25d9939a07875 Author: Dan Field Date: Tue May 15 00:35:29 2018 -0400 format updates commit 3ebfd28085bcaac4e6bfef7e5cf6cfb3061eee6f Author: Dan Field Date: Tue May 15 00:32:12 2018 -0400 doc updates commit 0c9c34d1dcae8c1e958e876c178711b0275c45ce Author: Dan Field Date: Tue May 15 00:02:16 2018 -0400 add more unit tests, minor bug fixes from unit testing commit c216bc835ee04ca01a024b8d5ea9e5b48cede755 Author: Dan Field Date: Mon May 14 22:23:15 2018 -0400 coverage commit eb7a998d8b6713489be908a910de15f2fe543055 Author: Dan Field Date: Mon May 14 22:15:16 2018 -0400 add coverage commit c4f0c2148007c03345012ca9a3eca4820bd12f93 Author: Dan Field Date: Mon May 14 22:08:48 2018 -0400 support different spreadModes commit db430ab7aeb9b08ee9c18c27949a933ddd0ac5f9 Author: Dan Field Date: Mon May 14 21:36:08 2018 -0400 render tests! commit 167ca5a12c89f75dc2f8a846f7db635f93eeb625 Author: Dan Field Date: Sun May 13 23:52:11 2018 -0400 Fix arc, better none handling commit 045095f56a48d240e57a16401bca8b30df0b9c15 Author: Dan Field Date: Fri May 11 22:06:00 2018 -0400 add flutter analyze to travis commit 3b7a2e7db837c0bc51a49ac80acb5dd44d6ee3f5 Author: Dan Field Date: Fri May 11 01:43:27 2018 -0400 stricter analysis options commit 14002bf10e1c58dc7a3b85e3b644276df73ddb6e Author: Dan Field Date: Fri May 11 01:08:55 2018 -0400 update docs commit 00ec89f2c55d954d9511dfd04750cae2470b1a72 Author: Dan Field Date: Fri May 11 00:48:08 2018 -0400 uncomment code commit 51e48b54ed6cf84f15f698e49c0d5935d0e7e65c Author: Dan Field Date: Fri May 11 00:34:58 2018 -0400 move example, improved inheritence, improved opacity handling commit 058264a692d3e9f981ff8c499972e30e758c8d7e Author: Dan Field Date: Thu May 10 16:22:39 2018 -0400 comment after experimenting with optimizations commit e74d8081d063a9757880af9c42c35661a2efea59 Author: Dan Field Date: Thu May 10 16:15:01 2018 -0400 add some tests, update travis to point to dev commit 925f0b7e63bb0920dfef48068197b9ab0eb5852d Author: Dan Field Date: Thu May 10 16:02:48 2018 -0400 basic support for style attribute, better inheritence, bump version commit a731b17a262d58c7c2aeb56071cb34e8971f5698 Author: Dan Field Date: Tue May 8 23:02:16 2018 -0400 initial dash path support; fix bug with line commit a961ced286581cdb6e640e867c600ecbff8cb36c Author: Dan Field Date: Sun May 6 19:11:48 2018 -0400 add changelog commit eacafd1095e1196758a152369730b5bb09743744 Author: Dan Field Date: Sun May 6 19:10:24 2018 -0400 remove network test commit 63b5a37593c6da9c6145218d30f46828615e5773 Author: Dan Field Date: Sun May 6 19:04:49 2018 -0400 initial text support, treat as , flutter version fix commit 9756650d5fc7df16f2a78d4bd223515dc88d4d4d Author: Dan Field Date: Tue May 1 14:32:45 2018 -0400 update pubspec commit b8b16653e1dc114c9dfd1f5219be3562d42b7eea Author: Dan Field Date: Tue May 1 14:24:04 2018 -0400 inheritance improvements commit 6cbd2ecccc4ca9286d7a46be20eb59a58e88685d Merge: 19ea0282d caf5602a8 Author: Dan Field Date: Tue May 1 08:27:59 2018 -0400 Merge pull request #6 from fmatosqg/master Fix error on slider value > max, update flutter min version commit caf5602a8f2cbe46c713666334e20a5fff01644f Author: Fabio de Matos Date: Tue May 1 11:30:51 2018 +1000 Fix error on slider value > max, update flutter min version commit 19ea0282dc4a4c007d50a233f4a6f143a3fee781 Author: Dan Field Date: Mon Apr 30 20:58:05 2018 -0400 light refactoring of svg, add initial android drawable support commit 9cfd0ddf8b18efe94d131414efc0866c6c79500f Author: Dan Field Date: Mon Apr 30 00:37:50 2018 -0400 initial radial gradient implementation commit 58a3fe62357b13d4bf0547230103139aefd14756 Author: Dan Field Date: Sun Apr 29 23:16:26 2018 -0400 remove unintended comment outs, remove debug printing, rename var commit 72714282867f8f6f30269113e841d91237948b39 Author: Dan Field Date: Sun Apr 29 23:10:43 2018 -0400 fix linear gradients commit 735892d0d33dd0e763f43def3ad13476a6d3dd9c Author: Dan Field Date: Sun Apr 29 20:40:32 2018 -0400 use master commit 910e6020316b73978ad10353c975bfd3d6f00ebb Author: Dan Field Date: Sun Apr 29 20:38:11 2018 -0400 fix travis name commit 04513a69e3eeb186ecb506622e6ffae5cc86133a Author: Dan Field Date: Sun Apr 29 20:35:16 2018 -0400 remove unused import commit 65a2347ee218d8af4d90052d6d91b9b148c8c146 Author: Dan Field Date: Sun Apr 29 20:29:06 2018 -0400 Minor refactoring, document more methods/classes commit 673ac964d6da6ec04e108e2f42a972e588e2fb90 Author: Dan Field Date: Sun Apr 29 19:47:03 2018 -0400 Further separation, use RepaintBoundary commit 3c99255746149d86ff19f376db806272bb8ef72b Author: Dan Field Date: Sun Apr 29 17:57:14 2018 -0400 refactor to start decoupling parsing from drawing commit 23e20463b06e147c39178f46a014c7a6cc7aa74e Author: Dan Field Date: Sun Apr 29 11:57:01 2018 -0400 default to background commit 92c08f370d867f4b651a3b0fee2e6f392a168453 Author: Dan Field Date: Sun Apr 29 08:24:41 2018 -0400 allow user to decide foreground or background for painting commit e0e6b4f33b3c7ba41d5b2183004638ac5de9872a Author: Dan Field Date: Sat Apr 28 21:15:00 2018 -0400 fix for scaling, better gradients, flutter logo close commit abda74357453fc832aa7fd511e318a04b13389aa Author: Dan Field Date: Sat Apr 28 11:58:49 2018 -0400 gradients better, but scaling wrong commit 8ec7690dc5c03d7b235d83257c4a6530fdf6be33 Author: Dan Field Date: Sat Apr 28 08:25:38 2018 -0400 support RRects, minor refactoring, gradients WIP commit cdeba7958f53a36145c1b9416d6df0178632c985 Merge: 7baa65d82 f49f887e1 Author: Dan Field Date: Fri Apr 27 08:48:51 2018 -0400 Merge pull request #1 from fmatosqg/patch-1 Update pubspec.yaml commit 7baa65d8203d296ebe924260d85744f71d848f3b Author: Dan Field Date: Fri Apr 27 01:03:56 2018 -0400 fix travis.yml commit 843fe520de7ff8c172997ab081c3b9aee871c53c Author: Dan Field Date: Fri Apr 27 01:01:55 2018 -0400 travis commit f49f887e184d4c4db4131717655cdd6da6ef8fa3 Author: fmatosqg Date: Fri Apr 27 14:22:43 2018 +1000 Update pubspec.yaml Enforce flutter version is >= 0.3.5 commit 086a0a0b3abab814854ea4c49b23032a298532bc Author: Dan Field Date: Thu Apr 26 12:27:45 2018 -0400 update path ver commit 7547a38b39e12a00b1c7d5d88ea2bab21237b422 Author: Dan Field Date: Thu Apr 26 12:26:21 2018 -0400 fix transform bug, comment out network for now commit 98c0dcfef788b72c9ec25e1d579854e4c0c43e55 Author: Dan Field Date: Thu Apr 26 11:24:33 2018 -0400 fixes, add tiger, consume package, add license commit 2f3858c9c4fc14c20272604a717e37a0afa2de71 Author: Dan Field Date: Wed Apr 25 23:38:54 2018 -0400 make analyzer happy commit ce07f0d4873e4c4e3b8470fcb335c8c0c809bbff Author: Dan Field Date: Wed Apr 25 23:37:22 2018 -0400 path parsing commit 85d40073c124e7ae4727bf7c30c41b290db5a200 Author: Dan Field Date: Tue Mar 13 19:28:19 2018 -0400 refactor to use paths/simplify code commit a5b91cf4846171d5bc4681dfca88ed2b04d34750 Author: Dan Field Date: Tue Mar 13 16:03:07 2018 -0400 improve stroke attribute handling commit c704ea72c6baa536f341d97104f8097f92c639d6 Author: Dan Field Date: Tue Mar 13 15:26:10 2018 -0400 normalize stroke and fill handling commit eb719a6f754175cd88d52b64796c0bc05a62edc5 Author: Dan Field Date: Tue Mar 13 14:32:34 2018 -0400 refactor parsers, better support for fill and stroke, still wip on that commit 4a3a1333aff26dedb038680fe56496b542f7c67d Author: Dan Field Date: Mon Mar 12 16:51:42 2018 -0400 start making room for better async support for loading commit 221e0e3b0b6bbca7216e41ef587faaad786b16ca Author: Dan Field Date: Mon Mar 12 15:01:24 2018 -0400 fix polygon, add polyline commit d8ee930b09687bb031bb1fbc57172f7b9c34af54 Author: Dan Field Date: Mon Mar 12 14:43:06 2018 -0400 better transform support, start refactoring widget commit f72ccfcc135740517fafa21424971eb6fd4e370d Author: Dan Field Date: Mon Mar 12 10:59:25 2018 -0400 update readme commit 10e5569c87076cf67c78dc44c0ca0629f502cc79 Author: Dan Field Date: Mon Mar 12 10:56:11 2018 -0400 add ellipse commit d00cc10024a50e586883f0b705e85fad7e960e4b Author: Dan Field Date: Mon Mar 12 10:19:54 2018 -0400 add more shapes, add more samples, start parsing transforms commit 35cbd867d6ccdfd975ec9ae77b5ef9ccf271ee44 Author: Dan Field Date: Mon Mar 12 00:21:12 2018 -0400 initial commit --- .../adsense_test_js_interop.dart | 90 +++++++++++++ .../lib/src/js_interop/adsbygoogle.dart | 36 +++++ .../src/js_interop/package_web_tweaks.dart | 47 +++++++ .../lib/src/messages.g.dart | 8 +- .../pigeons/messages.dart | 4 +- .../ios/Classes/GoogleMapMarkerController.m | 17 +++ .../ios/Classes/messages.g.m | 30 +---- .../lib/src/google_maps_flutter_ios.dart | 123 ++++++++++++++++++ .../path_provider/path_provider/CHANGELOG.md | 2 +- .../two_dimensional_scrollables/CHANGELOG.md | 4 +- 10 files changed, 326 insertions(+), 35 deletions(-) create mode 100644 packages/google_adsense/example/integration_test/adsense_test_js_interop.dart create mode 100644 packages/google_adsense/lib/src/js_interop/adsbygoogle.dart create mode 100644 packages/google_adsense/lib/src/js_interop/package_web_tweaks.dart diff --git a/packages/google_adsense/example/integration_test/adsense_test_js_interop.dart b/packages/google_adsense/example/integration_test/adsense_test_js_interop.dart new file mode 100644 index 00000000000..aff8a4f4a55 --- /dev/null +++ b/packages/google_adsense/example/integration_test/adsense_test_js_interop.dart @@ -0,0 +1,90 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +@JS() +library; + +import 'dart:async'; +import 'dart:js_interop'; +import 'dart:ui'; + +import 'package:google_adsense/src/adsense/ad_unit_params.dart'; +import 'package:web/web.dart' as web; + +typedef VoidFn = void Function(); + +// window.adsbygoogle uses "duck typing", so let us set anything to it. +@JS('adsbygoogle') +external set _adsbygoogle(JSAny? value); + +/// Mocks `adsbygoogle` [push] function. +/// +/// `push` will run in the next tick (`Timer.run`) to ensure async behavior. +void mockAdsByGoogle(VoidFn push) { + _adsbygoogle = { + 'push': () { + Timer.run(push); + }.toJS, + }.jsify(); +} + +/// Sets `adsbygoogle` to null. +void clearAdsByGoogleMock() { + _adsbygoogle = null; +} + +typedef MockAdConfig = ({Size size, String adStatus}); + +/// Returns a function that generates a "push" function for [mockAdsByGoogle]. +VoidFn mockAd({ + Size size = Size.zero, + String adStatus = AdStatus.FILLED, +}) { + return mockAds( + [(size: size, adStatus: adStatus)], + ); +} + +/// Returns a function that handles a bunch of ad units at once. Can be used with [mockAdsByGoogle]. +VoidFn mockAds(List adConfigs) { + return () { + final List foundTargets = + web.document.querySelectorAll('div[id^=adUnit] ins').toList; + + for (int i = 0; i < foundTargets.length; i++) { + final web.HTMLElement adTarget = foundTargets[i]; + if (adTarget.children.length > 0) { + continue; + } + + final (:Size size, :String adStatus) = adConfigs[i]; + + final web.HTMLElement fakeAd = web.HTMLDivElement() + ..style.width = '${size.width}px' + ..style.height = '${size.height}px' + ..style.background = '#fabada'; + + // AdSense seems to be setting the width/height on the `ins` of the injected ad too. + adTarget + ..style.width = '${size.width}px' + ..style.height = '${size.height}px' + ..style.display = 'block' + ..appendChild(fakeAd) + ..setAttribute('data-ad-status', adStatus); + } + }; +} + +extension on web.NodeList { + List get toList { + final List result = []; + for (int i = 0; i < length; i++) { + final web.Node? node = item(i); + if (node != null && node.isA()) { + result.add(node as web.HTMLElement); + } + } + return result; + } +} diff --git a/packages/google_adsense/lib/src/js_interop/adsbygoogle.dart b/packages/google_adsense/lib/src/js_interop/adsbygoogle.dart new file mode 100644 index 00000000000..bf97d23e978 --- /dev/null +++ b/packages/google_adsense/lib/src/js_interop/adsbygoogle.dart @@ -0,0 +1,36 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +@JS() +library; + +import 'dart:js_interop'; + +/// JS-interop mappings to the window.adsbygoogle object. +extension type AdsByGoogle._(JSObject _) implements JSObject { + /// Pushes some `params` to the `window.adsbygoogle` object. + external void push(JSObject params); +} + +// window.adsbygoogle may be null if this package runs before the JS SDK loads. +@JS('adsbygoogle') +external AdsByGoogle? get _adsbygoogle; + +// window.adsbygoogle uses "duck typing", so let us set anything to it. +@JS('adsbygoogle') +external set _adsbygoogle(JSAny? value); + +/// Whether or not the `window.adsbygoogle` object is defined and not null. +bool get adsbygooglePresent => _adsbygoogle.isDefinedAndNotNull; + +/// Binding to the `adsbygoogle` JS global. +/// +/// See: https://support.google.com/adsense/answer/9274516?hl=en&ref_topic=28893&sjid=11495822575537499409-EU +AdsByGoogle get adsbygoogle { + if (!adsbygooglePresent) { + // Initialize _adsbygoole to "something that has a push method". + _adsbygoogle = JSArray(); + } + return _adsbygoogle!; +} diff --git a/packages/google_adsense/lib/src/js_interop/package_web_tweaks.dart b/packages/google_adsense/lib/src/js_interop/package_web_tweaks.dart new file mode 100644 index 00000000000..7f819dc6b9c --- /dev/null +++ b/packages/google_adsense/lib/src/js_interop/package_web_tweaks.dart @@ -0,0 +1,47 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:js_interop'; + +import 'package:web/web.dart' as web; + +// Re-use of https://github.com/flutter/packages/blob/main/packages/google_identity_services_web/lib/src/js_interop/package_web_tweaks.dart + +/// This extension gives web.window a nullable getter to the `trustedTypes` +/// property, which needs to be used to check for feature support. +extension NullableTrustedTypesGetter on web.Window { + /// (Nullable) Bindings to window.trustedTypes. + /// + /// This may be null if the browser doesn't support the Trusted Types API. + /// + /// See: https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API + @JS('trustedTypes') + external web.TrustedTypePolicyFactory? get nullableTrustedTypes; +} + +/// Allows setting a TrustedScriptURL as the src of a script element. +extension TrustedTypeSrcAttribute on web.HTMLScriptElement { + @JS('src') + external set trustedSrc(web.TrustedScriptURL value); +} + +/// Allows creating a script URL only from a string, with no arguments. +extension CreateScriptUrlNoArgs on web.TrustedTypePolicy { + /// Allows calling `createScriptURL` with only the `input` argument. + @JS('createScriptURL') + external web.TrustedScriptURL createScriptURLNoArgs(String input); +} + +/// Exception thrown if the Trusted Types feature is supported, enabled, and it +/// has prevented this loader from injecting the JS SDK. +class TrustedTypesException implements Exception { + /// + TrustedTypesException(this.message); + + /// The message of the exception + final String message; + + @override + String toString() => 'TrustedTypesException: $message'; +} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart index ba3189b0a08..d77cb4b83ea 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart @@ -1192,7 +1192,7 @@ class PlatformMapConfiguration { this.trafficEnabled, this.buildingsEnabled, this.liteModeEnabled, - this.mapId, + this.cloudMapId, this.style, }); @@ -1232,7 +1232,7 @@ class PlatformMapConfiguration { bool? liteModeEnabled; - String? mapId; + String? cloudMapId; String? style; @@ -1256,7 +1256,7 @@ class PlatformMapConfiguration { trafficEnabled, buildingsEnabled, liteModeEnabled, - mapId, + cloudMapId, style, ]; } @@ -1282,7 +1282,7 @@ class PlatformMapConfiguration { trafficEnabled: result[15] as bool?, buildingsEnabled: result[16] as bool?, liteModeEnabled: result[17] as bool?, - mapId: result[18] as String?, + cloudMapId: result[18] as String?, style: result[19] as String?, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart index 82b9d37f15c..cf94c9f2a05 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart @@ -465,9 +465,7 @@ class PlatformMapViewCreationParams { } enum PlatformMarkerType { - marker, - advancedMarker, -} +marker, advancedMarker,} /// Pigeon equivalent of MapConfiguration. class PlatformMapConfiguration { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m index 51afca23f58..ceab3b2cb0f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m @@ -107,6 +107,23 @@ - (void)setZIndex:(int)zIndex { self.marker.zIndex = zIndex; } +- (void)updateFromPlatformMarker:(FGMPlatformMarker *)platformMarker + registrar:(NSObject *)registrar + screenScale:(CGFloat)screenScale { + [self setAlpha:platformMarker.alpha]; + [self setAnchor:FGMGetCGPointForPigeonPoint(platformMarker.anchor)]; + [self setDraggable:platformMarker.draggable]; + UIImage *image = [self iconFromBitmap:platformMarker.icon + registrar:registrar + screenScale:screenScale]; + [self setIcon:image]; + [self setFlat:platformMarker.flat]; + [self setConsumeTapEvents:platformMarker.consumeTapEvents]; + [self setPosition:FGMGetCoordinateForPigeonLatLng(platformMarker.position)]; + [self setRotation:platformMarker.rotation]; + [self setVisible:platformMarker.visible]; + [self setZIndex:platformMarker.zIndex]; +} - (void)setCollisionBehavior:(int)collisionBehavior { if ([self.marker isKindOfClass:[GMSAdvancedMarker class]]) { GMSCollisionBehavior collitionBehaviorValue = (GMSCollisionBehavior)collisionBehavior; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m index 1ea8a4a3f7a..ccf0735ec94 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m @@ -1232,7 +1232,7 @@ + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled trafficEnabled:(nullable NSNumber *)trafficEnabled buildingsEnabled:(nullable NSNumber *)buildingsEnabled - mapId:(nullable NSString *)mapId + cloudMapId:(nullable NSString *)cloudMapId style:(nullable NSString *)style { FGMPlatformMapConfiguration *pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; pigeonResult.compassEnabled = compassEnabled; @@ -1250,7 +1250,7 @@ + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled pigeonResult.indoorViewEnabled = indoorViewEnabled; pigeonResult.trafficEnabled = trafficEnabled; pigeonResult.buildingsEnabled = buildingsEnabled; - pigeonResult.mapId = mapId; + pigeonResult.cloudMapId = cloudMapId; pigeonResult.style = style; return pigeonResult; } @@ -1271,7 +1271,7 @@ + (FGMPlatformMapConfiguration *)fromList:(NSArray *)list { pigeonResult.indoorViewEnabled = GetNullableObjectAtIndex(list, 12); pigeonResult.trafficEnabled = GetNullableObjectAtIndex(list, 13); pigeonResult.buildingsEnabled = GetNullableObjectAtIndex(list, 14); - pigeonResult.mapId = GetNullableObjectAtIndex(list, 15); + pigeonResult.cloudMapId = GetNullableObjectAtIndex(list, 15); pigeonResult.style = GetNullableObjectAtIndex(list, 16); return pigeonResult; } @@ -1295,7 +1295,7 @@ + (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray *)list { self.indoorViewEnabled ?: [NSNull null], self.trafficEnabled ?: [NSNull null], self.buildingsEnabled ?: [NSNull null], - self.mapId ?: [NSNull null], + self.cloudMapId ?: [NSNull null], self.style ?: [NSNull null], ]; } @@ -2510,28 +2510,6 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, [channel setMessageHandler:nil]; } } - /// Returns true if the map supports advanced markers - { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.isAdvancedMarkersAvailable", - messageChannelSuffix] - binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; - if (api) { - NSCAssert([api respondsToSelector:@selector(isAdvancedMarkersAvailable:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(isAdvancedMarkersAvailable:)", - api); - [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { - FlutterError *error; - NSNumber *output = [api isAdvancedMarkersAvailable:&error]; - callback(wrapResult(output, error)); - }]; - } else { - [channel setMessageHandler:nil]; - } - } } @interface FGMMapsCallbackApi () @property(nonatomic, strong) NSObject *binaryMessenger; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index e6c74736394..846f0f9371d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -775,6 +775,129 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { identifier: clusterManager.clusterManagerId.value); } + static PlatformCameraUpdate _platformCameraUpdateFromCameraUpdate( + CameraUpdate update) { + switch (update.updateType) { + case CameraUpdateType.newCameraPosition: + update as CameraUpdateNewCameraPosition; + return PlatformCameraUpdate( + cameraUpdate: PlatformCameraUpdateNewCameraPosition( + cameraPosition: _platformCameraPositionFromCameraPosition( + update.cameraPosition))); + case CameraUpdateType.newLatLng: + update as CameraUpdateNewLatLng; + return PlatformCameraUpdate( + cameraUpdate: PlatformCameraUpdateNewLatLng( + latLng: _platformLatLngFromLatLng(update.latLng))); + case CameraUpdateType.newLatLngZoom: + update as CameraUpdateNewLatLngZoom; + return PlatformCameraUpdate( + cameraUpdate: PlatformCameraUpdateNewLatLngZoom( + latLng: _platformLatLngFromLatLng(update.latLng), + zoom: update.zoom)); + case CameraUpdateType.newLatLngBounds: + update as CameraUpdateNewLatLngBounds; + return PlatformCameraUpdate( + cameraUpdate: PlatformCameraUpdateNewLatLngBounds( + bounds: _platformLatLngBoundsFromLatLngBounds(update.bounds)!, + padding: update.padding)); + case CameraUpdateType.zoomTo: + update as CameraUpdateZoomTo; + return PlatformCameraUpdate( + cameraUpdate: PlatformCameraUpdateZoomTo(zoom: update.zoom)); + case CameraUpdateType.zoomBy: + update as CameraUpdateZoomBy; + final Offset? focus = update.focus; + return PlatformCameraUpdate( + cameraUpdate: PlatformCameraUpdateZoomBy( + amount: update.amount, + focus: focus == null ? null : _platformPointFromOffset(focus))); + case CameraUpdateType.zoomIn: + update as CameraUpdateZoomIn; + return PlatformCameraUpdate( + cameraUpdate: PlatformCameraUpdateZoom(out: false)); + case CameraUpdateType.zoomOut: + update as CameraUpdateZoomOut; + return PlatformCameraUpdate( + cameraUpdate: PlatformCameraUpdateZoom(out: true)); + case CameraUpdateType.scrollBy: + update as CameraUpdateScrollBy; + return PlatformCameraUpdate( + cameraUpdate: + PlatformCameraUpdateScrollBy(dx: update.dx, dy: update.dy)); + } + } + + /// Converts [MapBitmapScaling] from platform interface to [PlatformMapBitmapScaling] Pigeon. + @visibleForTesting + static PlatformMapBitmapScaling platformMapBitmapScalingFromScaling( + MapBitmapScaling scaling) { + switch (scaling) { + case MapBitmapScaling.auto: + return PlatformMapBitmapScaling.auto; + case MapBitmapScaling.none: + return PlatformMapBitmapScaling.none; + } + + // The enum comes from a different package, which could get a new value at + // any time, so provide a fallback that ensures this won't break when used + // with a version that contains new values. This is deliberately outside + // the switch rather than a `default` so that the linter will flag the + // switch as needing an update. + // ignore: dead_code + return PlatformMapBitmapScaling.auto; + } + + /// Converts [BitmapDescriptor] from platform interface to [PlatformBitmap] pigeon. + @visibleForTesting + static PlatformBitmap platformBitmapFromBitmapDescriptor( + BitmapDescriptor bitmap) { + switch (bitmap) { + case final DefaultMarker marker: + return PlatformBitmap( + bitmap: PlatformBitmapDefaultMarker(hue: marker.hue?.toDouble())); + // Clients may still use this deprecated format, so it must be supported. + // ignore: deprecated_member_use + case final BytesBitmap bytes: + final Size? size = bytes.size; + return PlatformBitmap( + bitmap: PlatformBitmapBytes( + byteData: bytes.byteData, + size: (size == null) ? null : _platformSizeFromSize(size))); + case final AssetBitmap asset: + return PlatformBitmap( + bitmap: PlatformBitmapAsset(name: asset.name, pkg: asset.package)); + // Clients may still use this deprecated format, so it must be supported. + // ignore: deprecated_member_use + case final AssetImageBitmap asset: + final Size? size = asset.size; + return PlatformBitmap( + bitmap: PlatformBitmapAssetImage( + name: asset.name, + scale: asset.scale, + size: (size == null) ? null : _platformSizeFromSize(size))); + case final AssetMapBitmap asset: + return PlatformBitmap( + bitmap: PlatformBitmapAssetMap( + assetName: asset.assetName, + bitmapScaling: + platformMapBitmapScalingFromScaling(asset.bitmapScaling), + imagePixelRatio: asset.imagePixelRatio, + width: asset.width, + height: asset.height)); + case final BytesMapBitmap bytes: + return PlatformBitmap( + bitmap: PlatformBitmapBytesMap( + byteData: bytes.byteData, + bitmapScaling: + platformMapBitmapScalingFromScaling(bytes.bitmapScaling), + imagePixelRatio: bytes.imagePixelRatio, + width: bytes.width, + height: bytes.height)); + default: + throw ArgumentError( + 'Unrecognized type of bitmap ${bitmap.runtimeType}', 'bitmap'); + } static PlatformMarkerType _platformMarkerTypeFromMarkerType( MarkerType markerType) { return switch (markerType) { diff --git a/packages/path_provider/path_provider/CHANGELOG.md b/packages/path_provider/path_provider/CHANGELOG.md index 1c8d48672e4..e5a275c3bf6 100644 --- a/packages/path_provider/path_provider/CHANGELOG.md +++ b/packages/path_provider/path_provider/CHANGELOG.md @@ -1,4 +1,4 @@ -## NEXT +## 2.1.5 * Updates minimum supported SDK version to Flutter 3.22/Dart 3.4. diff --git a/packages/two_dimensional_scrollables/CHANGELOG.md b/packages/two_dimensional_scrollables/CHANGELOG.md index cb4b895d584..4cc1a94ce15 100644 --- a/packages/two_dimensional_scrollables/CHANGELOG.md +++ b/packages/two_dimensional_scrollables/CHANGELOG.md @@ -1,4 +1,6 @@ -## NEXT +## 0.3.3 + +* Fixes an issue where collapsing nodes in the TreeView didn't work correctly. * Updates minimum supported SDK version to Flutter 3.22/Dart 3.4. From a4e36c124e1265f98f9f5b4c2963981f5e7f7bd1 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 12 Dec 2024 13:40:24 +0200 Subject: [PATCH 050/130] Fix merge issues on iOS --- .../ios/Classes/GoogleMapMarkerController.m | 12 +++++---- .../lib/src/google_maps_flutter_ios.dart | 2 ++ .../pigeons/messages.dart | 27 +++++++++++++++++++ 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m index ceab3b2cb0f..6525577cc31 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m @@ -123,12 +123,14 @@ - (void)updateFromPlatformMarker:(FGMPlatformMarker *)platformMarker [self setRotation:platformMarker.rotation]; [self setVisible:platformMarker.visible]; [self setZIndex:platformMarker.zIndex]; + [self setCollisionBehavior:platformMarker.collisionBehavior]; + } -- (void)setCollisionBehavior:(int)collisionBehavior { - if ([self.marker isKindOfClass:[GMSAdvancedMarker class]]) { - GMSCollisionBehavior collitionBehaviorValue = (GMSCollisionBehavior)collisionBehavior; - [(GMSAdvancedMarker *)self.marker setCollisionBehavior:(collitionBehaviorValue)]; - } +- (void)setCollisionBehavior:(FGMMarkerCollisionBehaviorBox*)collisionBehavior { + if ([self.marker isKindOfClass:[GMSAdvancedMarker class]]) { + GMSCollisionBehavior collitionBehaviorValue = (GMSCollisionBehavior)collisionBehavior.value; + [(GMSAdvancedMarker *)self.marker setCollisionBehavior:(collitionBehaviorValue)]; + } } - (void)updateFromPlatformMarker:(FGMPlatformMarker *)platformMarker diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index 846f0f9371d..1c68147626c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -898,6 +898,8 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { throw ArgumentError( 'Unrecognized type of bitmap ${bitmap.runtimeType}', 'bitmap'); } + } + static PlatformMarkerType _platformMarkerTypeFromMarkerType( MarkerType markerType) { return switch (markerType) { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index 1087691392d..3b1d2e1976f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -189,6 +189,7 @@ class PlatformMarker { this.visible = true, this.zIndex = 0.0, this.clusterManagerId, + this.collisionBehavior, }); final double alpha; @@ -205,6 +206,13 @@ class PlatformMarker { final double zIndex; final String markerId; final String? clusterManagerId; + final MarkerCollisionBehavior? collisionBehavior; +} + +enum MarkerCollisionBehavior { + required, + optionalAndHidesLowerPriority, + requiredAndHidesOptional, } /// Pigeon equivalent of the Polygon class. @@ -584,6 +592,25 @@ enum PlatformMapBitmapScaling { none, } +class PlatformBitmapPinConfig { + PlatformBitmapPinConfig({ + required this.backgroundColor, + required this.borderColor, + required this.glyphColor, + required this.glyphTextColor, + required this.glyphText, + required this.glyphBitmap, + }); + + final int? backgroundColor; + final int? borderColor; + + final int? glyphColor; + final int? glyphTextColor; + final String? glyphText; + final PlatformBitmap? glyphBitmap; +} + /// Interface for non-test interactions with the native SDK. /// /// For test-only state queries, see [MapsInspectorApi]. From 2da7188fb25d87bc6e0c98cbee72c45d2347c585 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 12 Dec 2024 13:47:00 +0200 Subject: [PATCH 051/130] Fix merge issues on Android --- .../google_maps_flutter_android/pigeons/messages.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart index cf94c9f2a05..82b9d37f15c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart @@ -465,7 +465,9 @@ class PlatformMapViewCreationParams { } enum PlatformMarkerType { -marker, advancedMarker,} + marker, + advancedMarker, +} /// Pigeon equivalent of MapConfiguration. class PlatformMapConfiguration { From cf7866b0b3ae445eee5f1dfcf01cd672523f1452 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:18:47 +0200 Subject: [PATCH 052/130] Fix comments --- .../google_maps_flutter/README.md | 4 +- .../example/lib/advanced_marker_icons.dart | 4 +- .../example/lib/clustering.dart | 6 +-- .../google_maps_flutter/example/lib/main.dart | 2 +- .../example/lib/marker_icons.dart | 4 +- .../example/lib/place_advanced_marker.dart | 10 ++--- .../example/lib/place_marker.dart | 8 ++-- .../lib/readme_sample_advanced_markers.dart | 4 +- .../lib/src/google_map.dart | 4 +- .../googlemaps/ClusterManagersController.java | 6 +-- .../example/lib/advanced_marker_icons.dart | 4 +- .../example/lib/clustering.dart | 6 +-- .../example/lib/example_google_map.dart | 2 +- .../example/lib/main.dart | 2 +- .../example/lib/marker_icons.dart | 4 +- .../example/lib/place_advanced_marker.dart | 10 ++--- .../example/lib/place_marker.dart | 8 ++-- .../lib/src/google_maps_flutter_android.dart | 2 +- .../google_maps_flutter_android_test.dart | 2 +- .../example/ios14/lib/main.dart | 2 +- .../example/ios15/lib/main.dart | 2 +- .../lib/advanced_marker_icons.dart | 6 +-- .../lib/advanced_markers_clustering.dart | 4 +- .../maps_example_dart/lib/clustering.dart | 6 +-- .../lib/example_google_map.dart | 4 +- .../maps_example_dart/lib/marker_icons.dart | 4 +- .../lib/place_advanced_marker.dart | 12 +++--- .../maps_example_dart/lib/place_marker.dart | 6 +-- .../google_maps_flutter_platform.dart | 2 +- .../lib/src/types/advanced_marker.dart | 41 ++++++------------- .../lib/src/types/bitmap.dart | 6 +-- .../lib/src/types/glyph.dart | 6 +-- .../lib/src/types/map_configuration.dart | 4 +- .../src/types/map_widget_configuration.dart | 8 ++-- .../advanced_markers_test.dart | 16 ++++---- .../lib/src/convert.dart | 18 ++++---- .../lib/src/google_maps_controller.dart | 6 +-- .../lib/src/marker.dart | 4 +- 38 files changed, 115 insertions(+), 134 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/README.md b/packages/google_maps_flutter/google_maps_flutter/README.md index 7aab92be89b..89647a15679 100644 --- a/packages/google_maps_flutter/google_maps_flutter/README.md +++ b/packages/google_maps_flutter/google_maps_flutter/README.md @@ -124,10 +124,10 @@ in an unbounded widget will cause the application to throw a Flutter exception. ```dart body: GoogleMap( - // Set your Map Id + // Set your Map ID. mapId: 'my-map-id', - // Let map know that you're using Advanced Markers + // // Enable support for Advanced Markers. markerType: MarkerType.advancedMarker, ``` diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart index 0d57006942b..9e85eb3860e 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart @@ -9,9 +9,9 @@ import 'main.dart' as main; import 'marker_icons.dart'; import 'page.dart'; -/// Page that demonstrates how to use custom [AdvanceMarker] icons +/// Page that demonstrates how to use custom [AdvanceMarker] icons. class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { - /// Default constructor + /// Default constructor. const AdvancedMarkerIconsPage({Key? key}) : super( key: key, diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart index c777e9e57dc..514b570f193 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart @@ -30,7 +30,7 @@ class ClusteringBody extends StatefulWidget { @override State createState() => ClusteringBodyState(); - /// Create a marker that is later added to a cluster + /// Creates a marker that is later added to a cluster Marker createMarker({ required MarkerId markerId, required ClusterManagerId clusterManagerId, @@ -47,7 +47,7 @@ class ClusteringBody extends StatefulWidget { ); } - /// Return selected or unselected state of the given [marker] + /// Returns selected or unselected state of the given [marker]. Marker getSelectedMarker(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected @@ -56,7 +56,7 @@ class ClusteringBody extends StatefulWidget { ); } - /// Return the mapId to use for the GoogleMap + /// Returns the mapId to use for the GoogleMap String? get mapId => null; } diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart index 33b83e09c8c..721a7d6b114 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart @@ -32,7 +32,7 @@ import 'scrolling_map.dart'; import 'snapshot.dart'; import 'tile_overlay.dart'; -/// Map Id is required for some examples to use advanced markers +/// Map ID is required for some examples to use advanced markers. // ignore: unnecessary_nullable_for_final_variable_declarations, unreachable_from_main const String? mapId = null; diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart index 140c4d220c6..bfcc6fc55fc 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart @@ -31,10 +31,10 @@ class MarkerIconsBody extends StatefulWidget { @override State createState() => MarkerIconsBodyState(); - /// Return the mapId to use for the GoogleMap + /// Returns the mapId to use for the GoogleMap String? get mapId => null; - /// Create a marker to be displayed on the map + /// Creates a marker to be displayed on the map Marker createMarker( MarkerId markerId, LatLng position, diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart index 0969c362c61..4b8220cd7fa 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart @@ -9,9 +9,9 @@ import 'main.dart' as main; import 'page.dart'; import 'place_marker.dart'; -/// Page demonstrating how to use Advanced [Marker] class +/// Page demonstrating how to use Advanced [Marker] class. class PlaceAdvancedMarkerPage extends GoogleMapExampleAppPage { - /// Default constructor + /// Default constructor. const PlaceAdvancedMarkerPage({Key? key}) : super(const Icon(Icons.place_outlined), 'Place advanced marker', key: key); @@ -69,7 +69,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { } /// Whether map supports advanced markers. Null indicates capability check - /// is in progress + /// is in progress. bool? _isAdvancedMarkersAvailable; @override @@ -82,7 +82,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { true => 'Map capabilities check result:\nthis map supports advanced markers', false => - "Map capabilities check result:\nthis map doesn't support advanced markers. Please check that map Id is provided and correct map renderer is used", + "Map capabilities check result:\nthis map doesn't support advanced markers. Please check that map ID is provided and correct map renderer is used", }, textAlign: TextAlign.center, style: Theme.of(context).textTheme.bodyLarge?.copyWith( @@ -98,7 +98,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { @override Widget build(BuildContext context) { - // Check if map is capable of showing advanced markers + // Check if map is capable of showing advanced markers. if (controller != null) { GoogleMapsFlutterPlatform.instance .isAdvancedMarkersAvailable(mapId: controller!.mapId) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart index e80842f877d..65ef2a4e472 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart @@ -270,10 +270,10 @@ class PlaceMarkerBodyState extends State { return BytesMapBitmap(bytes.buffer.asUint8List()); } - /// Return the mapId to use for the GoogleMap + /// Returns the mapId to use for the GoogleMap String? get mapId => null; - /// Create a marker with given parameters + /// Creates a marker with given parameters Marker createMarker({ required MarkerId markerId, required LatLng position, @@ -292,7 +292,7 @@ class PlaceMarkerBodyState extends State { ); } - /// Perform customizations of the [marker] to mark it as selected or not + /// Performs customizations of the [marker] to mark it as selected or not. Marker getSelectedMarker(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected @@ -301,7 +301,7 @@ class PlaceMarkerBodyState extends State { ); } - /// Optional header to be displayed above the map + /// Returns a header to be displayed above the map. Widget getHeader() => const SizedBox.shrink(); @override diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart index 4e5aa6f973a..749b396c8a7 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart @@ -35,10 +35,10 @@ class AdvancedMarkersSample extends StatelessWidget { return const Scaffold( // #docregion AdvancedMarkersSample body: GoogleMap( - // Set your Map Id + // Set your Map ID. mapId: 'my-map-id', - // Let map know that you're using Advanced Markers + // Enable support for Advanced Markers. markerType: MarkerType.advancedMarker, // #enddocregion AdvancedMarkersSample initialCameraPosition: _kGooglePlex, diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index 31a9eaa614f..8ddebefc9b6 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -129,7 +129,7 @@ class GoogleMap extends StatefulWidget { this.onLongPress, this.mapId, this.markerType = MarkerType.marker, - @Deprecated('cloudMapId is deprecated. Use mapId instead') this.cloudMapId, + @Deprecated('cloudMapId is deprecated. Use mapId instead.') this.cloudMapId, }); /// Callback method for when the map is ready to be used. @@ -361,7 +361,7 @@ class GoogleMap extends StatefulWidget { /// /// See https://developers.google.com/maps/documentation/get-map-id /// for more details. - @Deprecated('cloudMapId is deprecated. Use mapId instead') + @Deprecated('cloudMapId is deprecated. Use mapId instead.') final String? cloudMapId; /// Indicates whether map should use [AdvancedMarker]s or [Marker]s. diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java index 9809d32a591..41b9657302e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java @@ -107,8 +107,8 @@ void addClusterManager(String clusterManagerId) { } /** - * Initialize cluster renderer if it hasn't been initialized before. ClusterManager uses default - * renderer which should be changed to (legacy) renderer or advanced renderer + * Initializes cluster renderer if it hasn't been initialized before. ClusterManager uses default + * renderer which should be changed to (legacy) renderer or advanced renderer. */ private void initializeRenderer(ClusterManager clusterManager) { final ClusterRenderer renderer = clusterManager.getRenderer(); @@ -256,7 +256,7 @@ protected void onClusterItemRendered(@NonNull T item, @NonNull Marker marker) { } } - /** AdvancedMarkerClusterRenderer is a ClusterRenderer that supports AdvancedMarkers */ + /** AdvancedMarkerClusterRenderer is a ClusterRenderer that supports AdvancedMarkers. */ @VisibleForTesting static class AdvancedMarkerClusterRenderer extends DefaultAdvancedMarkersClusterRenderer { diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart index 0d57006942b..9e85eb3860e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart @@ -9,9 +9,9 @@ import 'main.dart' as main; import 'marker_icons.dart'; import 'page.dart'; -/// Page that demonstrates how to use custom [AdvanceMarker] icons +/// Page that demonstrates how to use custom [AdvanceMarker] icons. class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { - /// Default constructor + /// Default constructor. const AdvancedMarkerIconsPage({Key? key}) : super( key: key, diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart index 7dd26cd3ba2..3f14f49a4fa 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart @@ -30,7 +30,7 @@ class ClusteringBody extends StatefulWidget { @override State createState() => ClusteringBodyState(); - /// Create a marker that is later added to a cluster + /// Creates a marker that is later added to a cluster Marker createMarker( MarkerId markerId, ClusterManagerId clusterManagerId, @@ -47,7 +47,7 @@ class ClusteringBody extends StatefulWidget { ); } - /// Return selected or unselected state of the given [marker] + /// Returns selected or unselected state of the given [marker]. Marker getSelectedMarker(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected @@ -56,7 +56,7 @@ class ClusteringBody extends StatefulWidget { ); } - /// Return the mapId to use for the GoogleMap + /// Returns the mapId to use for the GoogleMap String? get mapId => null; } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart index dc0b8fda675..6cc90af473d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart @@ -386,7 +386,7 @@ class ExampleGoogleMap extends StatefulWidget { /// The locally configured style for the map. final String? style; - /// The type of marker to use (legacy or advanced) + /// The type of marker to use (legacy or advanced). final MarkerType markerType; /// Creates a [State] for this [ExampleGoogleMap]. diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart index 89b243daddc..83fde1da8ba 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart @@ -31,7 +31,7 @@ import 'scrolling_map.dart'; import 'snapshot.dart'; import 'tile_overlay.dart'; -/// Map Id is required for some examples to use advanced markers +/// Map ID is required for some examples to use advanced markers. // ignore: unnecessary_nullable_for_final_variable_declarations, unreachable_from_main const String? mapId = null; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart index 3ab47dbcb61..00404ec5141 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart @@ -31,10 +31,10 @@ class MarkerIconsBody extends StatefulWidget { @override State createState() => MarkerIconsBodyState(); - /// Return the mapId to use for the GoogleMap + /// Returns the mapId to use for the GoogleMap String? get mapId => null; - /// Create a marker to be displayed on the map + /// Creates a marker to be displayed on the map Marker createMarker( MarkerId markerId, LatLng position, diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart index 0969c362c61..4b8220cd7fa 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart @@ -9,9 +9,9 @@ import 'main.dart' as main; import 'page.dart'; import 'place_marker.dart'; -/// Page demonstrating how to use Advanced [Marker] class +/// Page demonstrating how to use Advanced [Marker] class. class PlaceAdvancedMarkerPage extends GoogleMapExampleAppPage { - /// Default constructor + /// Default constructor. const PlaceAdvancedMarkerPage({Key? key}) : super(const Icon(Icons.place_outlined), 'Place advanced marker', key: key); @@ -69,7 +69,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { } /// Whether map supports advanced markers. Null indicates capability check - /// is in progress + /// is in progress. bool? _isAdvancedMarkersAvailable; @override @@ -82,7 +82,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { true => 'Map capabilities check result:\nthis map supports advanced markers', false => - "Map capabilities check result:\nthis map doesn't support advanced markers. Please check that map Id is provided and correct map renderer is used", + "Map capabilities check result:\nthis map doesn't support advanced markers. Please check that map ID is provided and correct map renderer is used", }, textAlign: TextAlign.center, style: Theme.of(context).textTheme.bodyLarge?.copyWith( @@ -98,7 +98,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { @override Widget build(BuildContext context) { - // Check if map is capable of showing advanced markers + // Check if map is capable of showing advanced markers. if (controller != null) { GoogleMapsFlutterPlatform.instance .isAdvancedMarkersAvailable(mapId: controller!.mapId) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart index b87764cf838..cb86d0ef939 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart @@ -270,10 +270,10 @@ class PlaceMarkerBodyState extends State { return BytesMapBitmap(bytes.buffer.asUint8List()); } - /// Return the mapId to use for the GoogleMap + /// Returns the mapId to use for the GoogleMap String? get mapId => null; - /// Create a marker with given parameters + /// Creates a marker with given parameters Marker createMarker({ required MarkerId markerId, required LatLng position, @@ -292,7 +292,7 @@ class PlaceMarkerBodyState extends State { ); } - /// Perform customizations of the [marker] to mark it as selected or not + /// Performs customizations of the [marker] to mark it as selected or not. Marker getSelectedMarker(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected @@ -301,7 +301,7 @@ class PlaceMarkerBodyState extends State { ); } - /// Optional header to be shown above the map + /// Returns a header to be displayed above the map. Widget getHeader() => const SizedBox.shrink(); @override diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index 44f71ced985..1b62fb7c91d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -1462,7 +1462,7 @@ PlatformPatternItem platformPatternItemFromPatternItem(PatternItem item) { } /// Converts a MarkerCollisionBehavior to Pigeon's -/// PlatformMarkerCollisionBehavior +/// PlatformMarkerCollisionBehavior. @visibleForTesting PlatformMarkerCollisionBehavior platformMarkerCollisionBehaviorFromMarkerCollisionBehavior( diff --git a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart index 1d39c58c7f4..b9d8c9e580f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart @@ -1387,7 +1387,7 @@ void main() { markerType: MarkerType.marker, ), // Here deprecated cloudMapId is used to test that creation params have - // the correct mapId + // the correct mapId. mapConfiguration: const MapConfiguration(cloudMapId: cloudMapId))); expect( diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart index 1905bd03a07..c5f75b6486b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart @@ -27,7 +27,7 @@ import 'package:maps_example_dart/scrolling_map.dart'; import 'package:maps_example_dart/snapshot.dart'; import 'package:maps_example_dart/tile_overlay.dart'; -/// Map Id is required for some examples to use advanced markers +/// Map ID is required for some examples to use advanced markers. // ignore: unnecessary_nullable_for_final_variable_declarations, unreachable_from_main const String? mapId = null; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart index 1905bd03a07..c5f75b6486b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart @@ -27,7 +27,7 @@ import 'package:maps_example_dart/scrolling_map.dart'; import 'package:maps_example_dart/snapshot.dart'; import 'package:maps_example_dart/tile_overlay.dart'; -/// Map Id is required for some examples to use advanced markers +/// Map ID is required for some examples to use advanced markers. // ignore: unnecessary_nullable_for_final_variable_declarations, unreachable_from_main const String? mapId = null; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart index 5059eb8cbbb..5cfacba0f06 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart @@ -8,9 +8,9 @@ import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platf import 'marker_icons.dart'; import 'page.dart'; -/// Page that demonstrates how to use custom [AdvanceMarker] icons +/// Page that demonstrates how to use custom [AdvanceMarker] icons. class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { - /// Default constructor + /// Default constructor. const AdvancedMarkerIconsPage({Key? key, required this.mapId}) : super( key: key, @@ -18,7 +18,7 @@ class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { 'Advanced marker icons', ); - /// Map Id to use for the GoogleMap + /// Map ID to use for the GoogleMap final String? mapId; @override diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart index cc35dc426cb..a1601e834b9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart @@ -19,7 +19,7 @@ class AdvancedMarkersClusteringPage extends GoogleMapExampleAppPage { 'Manage clusters of advanced markers', ); - /// Map Id to use for the GoogleMap + /// Map ID to use for the GoogleMap final String? mapId; @override @@ -34,7 +34,7 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { final String? providedMapId; - /// Return the mapId to use for the GoogleMap + /// Returns the mapId to use for the GoogleMap @override String? get mapId => providedMapId; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart index 82eb7efcf9a..92d0020511a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart @@ -30,10 +30,10 @@ class ClusteringBody extends StatefulWidget { @override State createState() => ClusteringBodyState(); - /// Map Id to use for the GoogleMap + /// Map ID to use for the GoogleMap. String? get mapId => null; - /// Create a marker that is later added to a cluster + /// Creates a marker that is later added to a cluster. Marker createMarker({ required MarkerId markerId, required ClusterManagerId clusterManagerId, @@ -50,7 +50,7 @@ class ClusteringBody extends StatefulWidget { ); } - /// Return selected or unselected state of the given [marker] + /// Returns selected or unselected state of the given [marker]. Marker getSelectedMarker(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart index 487dfdb27d2..1ed322d3dd6 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart @@ -215,7 +215,7 @@ class ExampleGoogleMapController { return GoogleMapsFlutterPlatform.instance.getStyleError(mapId: mapId); } - /// Returns true if [AdvancedMarker]s can be used with this map + /// Returns true if [AdvancedMarker]s can be used with this map. Future isAdvancedMarkersAvailable() { return GoogleMapsFlutterPlatform.instance .isAdvancedMarkersAvailable(mapId: mapId); @@ -384,7 +384,7 @@ class ExampleGoogleMap extends StatefulWidget { /// The locally configured style for the map. final String? style; - /// The type of marker to use (legacy or advanced) + /// The type of marker to use (legacy or advanced). final MarkerType markerType; /// Creates a [State] for this [ExampleGoogleMap]. diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/marker_icons.dart index 5c9f22324bf..6623aef686f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/marker_icons.dart @@ -31,10 +31,10 @@ class MarkerIconsBody extends StatefulWidget { @override State createState() => MarkerIconsBodyState(); - /// Return the mapId to use for the GoogleMap + /// Returns the mapId to use for the GoogleMap String? get mapId => null; - /// Create a marker to be displayed on the map + /// Creates a marker to be displayed on the map Marker createMarker( MarkerId markerId, LatLng position, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart index e91d14fa995..efe747b82c9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart @@ -8,16 +8,16 @@ import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platf import 'page.dart'; import 'place_marker.dart'; -/// Page demonstrating how to use Advanced [Marker] class +/// Page demonstrating how to use Advanced [Marker] class. class PlaceAdvancedMarkerPage extends GoogleMapExampleAppPage { - /// Default constructor + /// Default constructor. const PlaceAdvancedMarkerPage({ Key? key, required this.mapId, }) : super(const Icon(Icons.place_outlined), 'Place advanced marker', key: key); - /// Map Id to use for the GoogleMap + /// Map ID to use for the GoogleMap final String? mapId; @override @@ -72,7 +72,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { } /// Whether map supports advanced markers. Null indicates capability check - /// is in progress + /// is in progress. bool? _isAdvancedMarkersAvailable; @override @@ -85,7 +85,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { true => 'Map capabilities check result:\nthis map supports advanced markers', false => - "Map capabilities check result:\nthis map doesn't support advanced markers. Please check that map Id is provided and correct map renderer is used", + "Map capabilities check result:\nthis map doesn't support advanced markers. Please check that map ID is provided and correct map renderer is used", }, textAlign: TextAlign.center, style: Theme.of(context).textTheme.bodyLarge?.copyWith( @@ -101,7 +101,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { @override Widget build(BuildContext context) { - // Check if map is capable of showing advanced markers + // Check if map is capable of showing advanced markers. if (controller != null) { GoogleMapsFlutterPlatform.instance .isAdvancedMarkersAvailable(mapId: controller!.mapId) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart index 406744c3900..18e07702b47 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart @@ -291,7 +291,7 @@ class PlaceMarkerBodyState extends State { return BytesMapBitmap(bytes.buffer.asUint8List()); } - /// Create a marker with given parameters + /// Creates a marker with given parameters Marker createMarker({ required MarkerId markerId, required LatLng position, @@ -312,7 +312,7 @@ class PlaceMarkerBodyState extends State { ); } - /// Perform customizations of the [marker] to mark it as selected or not + /// Performs customizations of the [marker] to mark it as selected or not. Marker getSelectedMarker(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected @@ -321,7 +321,7 @@ class PlaceMarkerBodyState extends State { ); } - /// Optional header to be shown above the map + /// Returns a header to be displayed above the map. Widget getHeader() => const SizedBox.shrink(); @override diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart index bf2d76a6424..624d20f6b17 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart @@ -430,7 +430,7 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface { return null; } - /// Returns true if [AdvancedMarker]s can be used with this map + /// Returns true if [AdvancedMarker]s can be used with this map. Future isAdvancedMarkersAvailable({required int mapId}) async { throw UnimplementedError( 'isAdvancedMarkersAvailable() has not been implemented.', diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart index ef9cb32dc71..1026896d587 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart @@ -9,30 +9,13 @@ import '../../google_maps_flutter_platform_interface.dart'; /// Marks a geographical location on the map. /// -/// Extends [Marker] and provides additional features +/// Extends [Marker] and provides additional features. @immutable class AdvancedMarker extends Marker { /// Creates a set of marker configuration options. /// - /// Default marker options. - /// - /// Specifies a marker that - /// * is fully opaque; [alpha] is 1.0 - /// * uses icon bottom center to indicate map position; [anchor] is (0.5, 1.0) - /// * has default tap handling; [consumeTapEvents] is false - /// * is stationary; [draggable] is false - /// * is drawn against the screen, not the map; [flat] is false - /// * has a default icon; [icon] is `BitmapDescriptor.defaultMarker` - /// * anchors the info window at top center; [infoWindowAnchor] is (0.5, 0.0) - /// * has no info window text; [infoWindowText] is `InfoWindowText.noText` - /// * is positioned at 0, 0; [position] is `LatLng(0.0, 0.0)` - /// * has an axis-aligned icon; [rotation] is 0.0 - /// * is visible; [visible] is true - /// * is placed at the base of the drawing order; [zIndex] is 0.0 - /// * reports [onTap] events - /// * reports [onDragEnd] events - /// * is always displayed on the map regardless of collision with other - /// markers; [collisionBehavior] is [MarkerCollisionBehavior.required] + /// Specifies a marker with a given [collisionBehavior]. Default is + /// [MarkerCollisionBehavior.required]. const AdvancedMarker({ required super.markerId, super.alpha, @@ -54,11 +37,11 @@ class AdvancedMarker extends Marker { this.collisionBehavior = MarkerCollisionBehavior.required, }); - /// Indicates how the marker behaves when it collides with other markers + /// Indicates how the marker behaves when it collides with other markers. final MarkerCollisionBehavior collisionBehavior; - /// Creates a new [Marker] object whose values are the same as this instance, - /// unless overwritten by the specified parameters. + /// Creates a new [AdvancedMarker] object whose values are the same as this + /// instance, unless overwritten by the specified parameters. @override AdvancedMarker copyWith({ double? alphaParam, @@ -160,7 +143,7 @@ class AdvancedMarker extends Marker { @override String toString() { - return 'Marker{markerId: $markerId, alpha: $alpha, anchor: $anchor, ' + return 'AdvancedMarker{markerId: $markerId, alpha: $alpha, anchor: $anchor, ' 'consumeTapEvents: $consumeTapEvents, draggable: $draggable, flat: $flat, ' 'icon: $icon, infoWindow: $infoWindow, position: $position, rotation: $rotation, ' 'visible: $visible, zIndex: $zIndex, onTap: $onTap, onDragStart: $onDragStart, ' @@ -169,19 +152,19 @@ class AdvancedMarker extends Marker { } } -/// Indicates how the marker behaves when it collides with other markers +/// Indicates how the marker behaves when it collides with other markers. enum MarkerCollisionBehavior { - /// (default) Always display the marker regardless of collision + /// (default) Always display the marker regardless of collision. required, /// Display the marker only if it does not overlap with other markers. /// If two markers of this type would overlap, the one with the higher zIndex /// is shown. If they have the same zIndex, the one with the lower vertical - /// screen position is shown + /// screen position is shown. optionalAndHidesLowerPriority, /// Always display the marker regardless of collision, and hide any - /// ´optionalAndHidesLowerPriority´ markers or labels that would overlap with - /// the marker + /// [optionalAndHidesLowerPriority] markers or labels that would overlap with + /// the marker. requiredAndHidesOptional, } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart index 80f9f6a026e..00017e22e89 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart @@ -338,10 +338,8 @@ abstract class BitmapDescriptor { ); } - /// Creates a [BitmapDescriptor] from a pin configuration. - /// - /// This methods helps customizing default marker pins. Works with - /// [AdvancedMarker]s. + /// Creates a [BitmapDescriptor] that can be used to customize + /// [AdvancedMarker]'s pin. /// /// [backgroundColor] is the color of the pin's background. /// [borderColor] is the color of the pin's border. diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart index 8792c1fb6dd..7503ed55f8f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart @@ -12,17 +12,17 @@ import '../../google_maps_flutter_platform_interface.dart'; /// some text or bitmap @immutable class Glyph { - /// Create a glyph with a circle of the specified [color] + /// Creates a glyph with a circle of the specified [color] factory Glyph.color(Color color) { return Glyph._(color: color); } - /// Create a glyph with a bitmap image + /// Creates a glyph with a bitmap image factory Glyph.bitmap(BitmapDescriptor bitmapDescriptor) { return Glyph._(bitmapDescriptor: bitmapDescriptor); } - /// Create a glyph with a [text] of the specified [textColor] + /// Creates a glyph with a [text] of the specified [textColor] factory Glyph.text(String text, {Color? textColor}) { return Glyph._( text: text, diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart index 710b61c6be7..5d7c913365e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart @@ -36,7 +36,7 @@ class MapConfiguration { this.trafficEnabled, this.buildingsEnabled, this.mapId, - @Deprecated('cloudMapId is deprecated. Use mapId instead') this.cloudMapId, + @Deprecated('cloudMapId is deprecated. Use mapId instead.') this.cloudMapId, this.style, }); @@ -119,7 +119,7 @@ class MapConfiguration { /// /// See https://developers.google.com/maps/documentation/get-map-id /// for more details. - @Deprecated('cloudMapId is deprecated. Use mapId instead') + @Deprecated('cloudMapId is deprecated. Use mapId instead.') final String? cloudMapId; /// Locally configured JSON style. diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart index 9521892e01f..d0a26b73e4b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart @@ -31,7 +31,7 @@ class MapWidgetConfiguration { /// Gesture recognizers to add to the widget. final Set> gestureRecognizers; - /// The type of marker that map should use. + /// The type of marker that the map should use. /// /// Advanced and legacy markers could be handled differently by platform /// implementations. This property indicates which type of marker should be @@ -39,12 +39,12 @@ class MapWidgetConfiguration { final MarkerType markerType; } -/// Indicates the type of marker that map should use +/// Indicates the type of marker that the map should use. enum MarkerType { /// Represents the default marker type, [Marker]. This marker type is - /// deprecated on the web + /// deprecated on the web. marker, - /// Represents the advanced marker type, [AdvancedMarker] + /// Represents the advanced marker type, [AdvancedMarker]. advancedMarker, } diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart index e1af4430c6a..79a1fd75b8a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart @@ -75,13 +75,13 @@ void main() { expect(marker, isNotNull); expect(marker!.gmpDraggable, isFalse); - // By default, markers fall in LatLng(0, 0) + // By default, markers fall in LatLng(0, 0). position = marker.position! as gmaps.LatLngLiteral; expect(position, isNotNull); expect(position.lat, equals(0)); expect(position.lng, equals(0)); - // Update the marker with draggable and position + // Update the marker with draggable and position. final Set updatedMarkers = { const AdvancedMarker( markerId: MarkerId('1'), @@ -125,7 +125,7 @@ void main() { expect(position.lat, equals(42)); expect(position.lng, equals(54)); - // Update the marker without position + // Update the marker without position. final Set updatedMarkers = { const AdvancedMarker( markerId: MarkerId('1'), @@ -156,7 +156,7 @@ void main() { expect(controller.markers.length, 3); - // Remove some markers... + // Remove some markers. final Set markerIdsToRemove = { const MarkerId('1'), const MarkerId('3'), @@ -241,7 +241,7 @@ void main() { final String assetUrl = icon!.src; expect(assetUrl, endsWith('assets/red_square.png')); - // asset size is 48x48 physical pixels + // Asset size is 48x48 physical pixels. expect(icon.style.width, '48px'); expect(icon.style.height, '48px'); }); @@ -440,7 +440,7 @@ void main() { // Query nodes and check colors. This is a bit fragile as it depends on // the implementation details of the icon which is not part of the public - // API + // API. final NodeList backgroundNodes = icon!.querySelectorAll("[class*='maps-pin-view-background']"); final NodeList borderNodes = @@ -496,7 +496,7 @@ void main() { // Query pin nodes and find text element. This is a bit fragile as it // depends on the implementation details of the icon which is not part of - // the public API + // the public API. dom.Element? paragraphElement; final NodeList paragraphs = icon!.querySelectorAll('p'); for (int i = 0; i < paragraphs.length; i++) { @@ -544,7 +544,7 @@ void main() { // Query pin nodes and find text element. This is a bit fragile as it // depends on the implementation details of the icon which is not part of - // the public API + // the public API. HTMLImageElement? imgElement; final NodeList imgElements = icon!.querySelectorAll('img'); for (int i = 0; i < imgElements.length; i++) { diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index 1209d27c97b..48bae385bc1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -298,7 +298,7 @@ Size? _sizeFromIconConfig(List iconConfig, int sizeIndex) { return size; } -/// Sets the size and style of the [icon] element +/// Sets the size and style of the [icon] element. void _setIconStyle({ required web.Element icon, required Size? size, @@ -413,8 +413,8 @@ void _cleanUpBitmapConversionCaches() { _bitmapBlobUrlCache.clear(); } -/// Converts a [BitmapDescriptor] into a [Node] that can be used as Advanced -/// Marker icon +/// Converts a [BitmapDescriptor] into a [Node] that can be used as +/// [AdvancedMarker]'s icon. Future _advancedMarkerIconFromBitmapDescriptor( BitmapDescriptor bitmapDescriptor, { required double? opacity, @@ -435,7 +435,7 @@ Future _advancedMarkerIconFromBitmapDescriptor( final Glyph? glyph = bitmapDescriptor.glyph; if (glyph != null) { if (glyph.text != null) { - // Set glyph text and text color + // Set glyph text and text color. final web.Element element = document.createElement('p'); element.innerHTML = glyph.text!.toJS; if (glyph.textColor != null) { @@ -447,12 +447,12 @@ Future _advancedMarkerIconFromBitmapDescriptor( options.glyph = element; } else if (glyph.bitmapDescriptor != null) { - // Create glyph from bitmap + // Create glyph from bitmap. final Node? glyphBitmap = await _advancedMarkerIconFromBitmapDescriptor( glyph.bitmapDescriptor!, - // Always opaque, opacity is handled by the parent marker + // Always opaque, opacity is handled by the parent marker. opacity: 1.0, - // Always visible, as the visibility is handled by the parent marker + // Always visible, as the visibility is handled by the parent marker. isVisible: true, ); options.glyph = glyphBitmap; @@ -511,9 +511,9 @@ Future _advancedMarkerIconFromBitmapDescriptor( icon: icon, size: size, opacity: opacity, isVisible: isVisible); return icon; } else if (iconConfig[0] == 'fromBytes') { - // Grab the bytes, and put them into a blob + // Grab the bytes, and put them into a blob. final List bytes = iconConfig[1]! as List; - // Create a Blob from bytes, but let the browser figure out the encoding + // Create a Blob from bytes, but let the browser figure out the encoding. final Blob blob; assert( diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index 674cb0ff3c4..93790099503 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -40,7 +40,7 @@ class GoogleMapController { _polylinesController = PolylinesController(stream: _streamController); // Check if all markers are of the same type. Mixing marker types is not - // allowed + // allowed. final Set markerTypes = _markers.map((Marker e) => e.runtimeType).toSet(); if (markerTypes.isNotEmpty) { @@ -63,7 +63,7 @@ class GoogleMapController { } // Advanced and legacy markers are handled differently so markers controller - // and cluster manager need be initialized with the correct marker type + // and cluster manager need be initialized with the correct marker type. _clusterManagersController = switch (widgetConfiguration.markerType) { MarkerType.marker => ClusterManagersController(stream: _streamController), @@ -613,7 +613,7 @@ class GoogleMapController { return _markersController?.isInfoWindowShown(markerId) ?? false; } - /// Returns true if this map supports [AdvancedMarker]s + /// Returns true if this map supports [AdvancedMarker]s. bool isAdvancedMarkersAvailable() { assert(_googleMap != null, 'Cannot get map capabilities of a null map.'); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart index e0a10f205e9..45ad8e212c4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart @@ -220,7 +220,7 @@ class MarkerController { } } -/// Check marker type and call [legacy] or [advanced] +/// Check marker type and call [legacy] or [advanced]. void _doOnMarkerType({ required dynamic marker, required void Function(gmaps.Marker marker) legacy, @@ -238,7 +238,7 @@ void _doOnMarkerType({ } } -/// Check [marker] type and return result of [legacy] or [advanced] function +/// Check [marker] type and return result of [legacy] or [advanced]. R getOnMarkerType({ required dynamic marker, required R Function(gmaps.Marker marker) legacy, From d4980e1fce5d0b56763089e432fc5ef6c11aca01 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 13 Dec 2024 10:28:45 +0200 Subject: [PATCH 053/130] Make mapId not global (examples) --- .../example/lib/advanced_marker_icons.dart | 17 +++++++++----- .../lib/advanced_markers_clustering.dart | 17 +++++++++----- .../google_maps_flutter/example/lib/main.dart | 9 ++++---- .../example/lib/place_advanced_marker.dart | 22 +++++++++++-------- .../example/lib/place_marker.dart | 18 +++++++++------ .../example/ios14/lib/main.dart | 9 ++++---- .../example/ios15/lib/main.dart | 9 ++++---- .../lib/advanced_marker_icons.dart | 2 +- .../lib/advanced_markers_clustering.dart | 2 +- .../lib/place_advanced_marker.dart | 2 +- 10 files changed, 61 insertions(+), 46 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart index 9e85eb3860e..dd8a710c441 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart @@ -5,31 +5,36 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; -import 'main.dart' as main; import 'marker_icons.dart'; import 'page.dart'; /// Page that demonstrates how to use custom [AdvanceMarker] icons. class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { /// Default constructor. - const AdvancedMarkerIconsPage({Key? key}) - : super( + const AdvancedMarkerIconsPage({ + Key? key, + required this.mapId, + }) : super( key: key, const Icon(Icons.image_outlined), 'Advanced marker icons', ); + /// Map ID to use for the GoogleMap. + final String? mapId; + @override Widget build(BuildContext context) { - return const _AdvancedMarkerIconsBody(); + return _AdvancedMarkerIconsBody(mapId); } } class _AdvancedMarkerIconsBody extends MarkerIconsBody { - const _AdvancedMarkerIconsBody(); + const _AdvancedMarkerIconsBody(this.mapId); + /// Map ID to use for the GoogleMap. @override - String? get mapId => main.mapId; + final String? mapId; @override Marker createMarker( diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart index 8ef99b62094..eb822a99906 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart @@ -6,32 +6,37 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; import 'clustering.dart'; -import 'main.dart' as main; import 'page.dart'; /// Page for demonstrating advanced marker clustering support. /// Same as [ClusteringPage] but works with [AdvancedMarker]. class AdvancedMarkersClustering extends GoogleMapExampleAppPage { /// Default constructor. - const AdvancedMarkersClustering({Key? key}) - : super( + const AdvancedMarkersClustering({ + Key? key, + required this.mapId, + }) : super( key: key, const Icon(Icons.place_outlined), 'Manage clusters of advanced markers', ); + /// Map ID to use for the GoogleMap. + final String? mapId; + @override Widget build(BuildContext context) { - return const _AdvancedMarkerClusteringBody(); + return _AdvancedMarkerClusteringBody(mapId); } } /// Same as [ClusteringBody] but works with [AdvancedMarker]. class _AdvancedMarkerClusteringBody extends ClusteringBody { - const _AdvancedMarkerClusteringBody(); + const _AdvancedMarkerClusteringBody(this.mapId); + /// Map ID to use for the GoogleMap. @override - String? get mapId => main.mapId; + final String? mapId; @override Marker createMarker({ diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart index 721a7d6b114..d2fb855a2b0 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart @@ -33,8 +33,7 @@ import 'snapshot.dart'; import 'tile_overlay.dart'; /// Map ID is required for some examples to use advanced markers. -// ignore: unnecessary_nullable_for_final_variable_declarations, unreachable_from_main -const String? mapId = null; +const String? _mapId = null; final List _allPages = [ const MapUiPage(), @@ -43,9 +42,9 @@ final List _allPages = [ const AnimateCameraPage(), const MoveCameraPage(), const PlaceMarkerPage(), - const PlaceAdvancedMarkerPage(), + const PlaceAdvancedMarkerPage(mapId: _mapId), const MarkerIconsPage(), - const AdvancedMarkerIconsPage(), + const AdvancedMarkerIconsPage(mapId: _mapId), const ScrollingMapPage(), const PlacePolylinePage(), const PlacePolygonPage(), @@ -56,7 +55,7 @@ final List _allPages = [ const TileOverlayPage(), const GroundOverlayPage(), const ClusteringPage(), - const AdvancedMarkersClustering(), + const AdvancedMarkersClustering(mapId: _mapId), const MapIdPage(), const HeatmapPage(), ]; diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart index 4b8220cd7fa..6fef0ad32b2 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart @@ -5,34 +5,38 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; -import 'main.dart' as main; import 'page.dart'; import 'place_marker.dart'; /// Page demonstrating how to use Advanced [Marker] class. class PlaceAdvancedMarkerPage extends GoogleMapExampleAppPage { /// Default constructor. - const PlaceAdvancedMarkerPage({Key? key}) - : super(const Icon(Icons.place_outlined), 'Place advanced marker', - key: key); + const PlaceAdvancedMarkerPage({ + Key? key, + required this.mapId, + }) : super( + const Icon(Icons.place_outlined), + 'Place advanced marker', + key: key, + ); + + /// Map ID to use for the GoogleMap. + final String? mapId; @override Widget build(BuildContext context) { - return const _PlaceAdvancedMarkerBody(); + return _PlaceAdvancedMarkerBody(mapId: mapId); } } class _PlaceAdvancedMarkerBody extends PlaceMarkerBody { - const _PlaceAdvancedMarkerBody(); + const _PlaceAdvancedMarkerBody({required super.mapId}); @override State createState() => _PlaceAdvancedMarkerBodyState(); } class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { - @override - String? get mapId => main.mapId; - @override Marker createMarker({ required MarkerId markerId, diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart index 65ef2a4e472..e4cafed6382 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart @@ -26,7 +26,13 @@ class PlaceMarkerPage extends GoogleMapExampleAppPage { } class PlaceMarkerBody extends StatefulWidget { - const PlaceMarkerBody({super.key}); + const PlaceMarkerBody({ + super.key, + this.mapId, + }); + + /// Map ID to use for the GoogleMap. + final String? mapId; @override State createState() => PlaceMarkerBodyState(); @@ -270,9 +276,6 @@ class PlaceMarkerBodyState extends State { return BytesMapBitmap(bytes.buffer.asUint8List()); } - /// Returns the mapId to use for the GoogleMap - String? get mapId => null; - /// Creates a marker with given parameters Marker createMarker({ required MarkerId markerId, @@ -315,9 +318,10 @@ class PlaceMarkerBodyState extends State { getHeader(), Expanded( child: GoogleMap( - mapId: mapId, - markerType: - mapId != null ? MarkerType.advancedMarker : MarkerType.marker, + mapId: widget.mapId, + markerType: widget.mapId != null + ? MarkerType.advancedMarker + : MarkerType.marker, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.211), diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart index c5f75b6486b..02734701d52 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart @@ -28,8 +28,7 @@ import 'package:maps_example_dart/snapshot.dart'; import 'package:maps_example_dart/tile_overlay.dart'; /// Map ID is required for some examples to use advanced markers. -// ignore: unnecessary_nullable_for_final_variable_declarations, unreachable_from_main -const String? mapId = null; +const String? _mapId = null; void main() { runApp(const MaterialApp( @@ -40,9 +39,9 @@ void main() { AnimateCameraPage(), MoveCameraPage(), PlaceMarkerPage(), - PlaceAdvancedMarkerPage(mapId: mapId), + PlaceAdvancedMarkerPage(mapId: _mapId), MarkerIconsPage(), - AdvancedMarkerIconsPage(mapId: mapId), + AdvancedMarkerIconsPage(mapId: _mapId), ScrollingMapPage(), PlacePolylinePage(), PlacePolygonPage(), @@ -53,7 +52,7 @@ void main() { TileOverlayPage(), GroundOverlayPage(), ClusteringPage(), - AdvancedMarkersClusteringPage(mapId: mapId), + AdvancedMarkersClusteringPage(mapId: _mapId), MapIdPage(), ]))); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart index c5f75b6486b..02734701d52 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart @@ -28,8 +28,7 @@ import 'package:maps_example_dart/snapshot.dart'; import 'package:maps_example_dart/tile_overlay.dart'; /// Map ID is required for some examples to use advanced markers. -// ignore: unnecessary_nullable_for_final_variable_declarations, unreachable_from_main -const String? mapId = null; +const String? _mapId = null; void main() { runApp(const MaterialApp( @@ -40,9 +39,9 @@ void main() { AnimateCameraPage(), MoveCameraPage(), PlaceMarkerPage(), - PlaceAdvancedMarkerPage(mapId: mapId), + PlaceAdvancedMarkerPage(mapId: _mapId), MarkerIconsPage(), - AdvancedMarkerIconsPage(mapId: mapId), + AdvancedMarkerIconsPage(mapId: _mapId), ScrollingMapPage(), PlacePolylinePage(), PlacePolygonPage(), @@ -53,7 +52,7 @@ void main() { TileOverlayPage(), GroundOverlayPage(), ClusteringPage(), - AdvancedMarkersClusteringPage(mapId: mapId), + AdvancedMarkersClusteringPage(mapId: _mapId), MapIdPage(), ]))); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart index 5cfacba0f06..cc57d0380b0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart @@ -18,7 +18,7 @@ class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { 'Advanced marker icons', ); - /// Map ID to use for the GoogleMap + /// Map ID to use for the GoogleMap. final String? mapId; @override diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart index a1601e834b9..f5dc2fe76a1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart @@ -19,7 +19,7 @@ class AdvancedMarkersClusteringPage extends GoogleMapExampleAppPage { 'Manage clusters of advanced markers', ); - /// Map ID to use for the GoogleMap + /// Map ID to use for the GoogleMap. final String? mapId; @override diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart index efe747b82c9..8dbfa968b74 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart @@ -17,7 +17,7 @@ class PlaceAdvancedMarkerPage extends GoogleMapExampleAppPage { }) : super(const Icon(Icons.place_outlined), 'Place advanced marker', key: key); - /// Map ID to use for the GoogleMap + /// Map ID to use for the GoogleMap. final String? mapId; @override From 25c3ea643c7dd40007a9652cd3daeb446d2bafa2 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 13 Dec 2024 10:31:18 +0200 Subject: [PATCH 054/130] Rename getSelectedMarker to copyWithSelectedStated --- .../example/lib/advanced_markers_clustering.dart | 2 +- .../google_maps_flutter/example/lib/clustering.dart | 7 ++++--- .../example/lib/place_advanced_marker.dart | 2 +- .../google_maps_flutter/example/lib/place_marker.dart | 6 +++--- .../example/lib/advanced_markers_clustering.dart | 2 +- .../example/lib/clustering.dart | 7 ++++--- .../example/lib/place_advanced_marker.dart | 2 +- .../example/lib/place_marker.dart | 6 +++--- .../maps_example_dart/lib/advanced_markers_clustering.dart | 2 +- .../example/shared/maps_example_dart/lib/clustering.dart | 7 ++++--- .../maps_example_dart/lib/place_advanced_marker.dart | 2 +- .../example/shared/maps_example_dart/lib/place_marker.dart | 6 +++--- 12 files changed, 27 insertions(+), 24 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart index eb822a99906..5c8fda4bdd8 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart @@ -61,7 +61,7 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { } @override - Marker getSelectedMarker(Marker marker, bool isSelected) { + Marker copyWithSelectedStated(Marker marker, bool isSelected) { assert(marker is AdvancedMarker); return (marker as AdvancedMarker).copyWith( iconParam: isSelected diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart index 514b570f193..523396cac23 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart @@ -48,7 +48,7 @@ class ClusteringBody extends StatefulWidget { } /// Returns selected or unselected state of the given [marker]. - Marker getSelectedMarker(Marker marker, bool isSelected) { + Marker copyWithSelectedStated(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) @@ -126,11 +126,12 @@ class ClusteringBodyState extends State { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { final Marker resetOld = - widget.getSelectedMarker(markers[previousMarkerId]!, false); + widget.copyWithSelectedStated(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = widget.getSelectedMarker(tappedMarker, true); + final Marker newMarker = + widget.copyWithSelectedStated(tappedMarker, true); markers[markerId] = newMarker; }); } diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart index 6fef0ad32b2..d3c933f140a 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart @@ -58,7 +58,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { } @override - Marker getSelectedMarker(Marker marker, bool isSelected) { + Marker copyWithSelectedStated(Marker marker, bool isSelected) { return marker.copyWith( iconParam: _getMarkerBitmapDescriptor(isSelected: isSelected), ); diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart index e4cafed6382..20db8018945 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart @@ -68,11 +68,11 @@ class PlaceMarkerBodyState extends State { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { final Marker resetOld = - getSelectedMarker(markers[previousMarkerId]!, false); + copyWithSelectedStated(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = getSelectedMarker(tappedMarker, true); + final Marker newMarker = copyWithSelectedStated(tappedMarker, true); markers[markerId] = newMarker; markerPosition = null; @@ -296,7 +296,7 @@ class PlaceMarkerBodyState extends State { } /// Performs customizations of the [marker] to mark it as selected or not. - Marker getSelectedMarker(Marker marker, bool isSelected) { + Marker copyWithSelectedStated(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart index 6c252477fad..0f467fd35d6 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart @@ -56,7 +56,7 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { } @override - Marker getSelectedMarker(Marker marker, bool isSelected) { + Marker copyWithSelectedStated(Marker marker, bool isSelected) { assert(marker is AdvancedMarker); return (marker as AdvancedMarker).copyWith( iconParam: isSelected diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart index 3f14f49a4fa..14bb97ac851 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart @@ -48,7 +48,7 @@ class ClusteringBody extends StatefulWidget { } /// Returns selected or unselected state of the given [marker]. - Marker getSelectedMarker(Marker marker, bool isSelected) { + Marker copyWithSelectedStated(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) @@ -131,11 +131,12 @@ class ClusteringBodyState extends State { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { final Marker resetOld = - widget.getSelectedMarker(markers[previousMarkerId]!, false); + widget.copyWithSelectedStated(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = widget.getSelectedMarker(tappedMarker, true); + final Marker newMarker = + widget.copyWithSelectedStated(tappedMarker, true); markers[markerId] = newMarker; }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart index 4b8220cd7fa..4f7ae5ed57c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart @@ -54,7 +54,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { } @override - Marker getSelectedMarker(Marker marker, bool isSelected) { + Marker copyWithSelectedStated(Marker marker, bool isSelected) { return marker.copyWith( iconParam: _getMarkerBitmapDescriptor(isSelected: isSelected), ); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart index cb86d0ef939..f4b6fe7b7b8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart @@ -62,11 +62,11 @@ class PlaceMarkerBodyState extends State { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { final Marker resetOld = - getSelectedMarker(markers[previousMarkerId]!, false); + copyWithSelectedStated(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = getSelectedMarker(tappedMarker, true); + final Marker newMarker = copyWithSelectedStated(tappedMarker, true); markers[markerId] = newMarker; markerPosition = null; @@ -293,7 +293,7 @@ class PlaceMarkerBodyState extends State { } /// Performs customizations of the [marker] to mark it as selected or not. - Marker getSelectedMarker(Marker marker, bool isSelected) { + Marker copyWithSelectedStated(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart index f5dc2fe76a1..454b4c15c58 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart @@ -61,7 +61,7 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { } @override - Marker getSelectedMarker(Marker marker, bool isSelected) { + Marker copyWithSelectedStated(Marker marker, bool isSelected) { assert(marker is AdvancedMarker); return (marker as AdvancedMarker).copyWith( iconParam: isSelected diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart index 92d0020511a..aaebc00e6f4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart @@ -51,7 +51,7 @@ class ClusteringBody extends StatefulWidget { } /// Returns selected or unselected state of the given [marker]. - Marker getSelectedMarker(Marker marker, bool isSelected) { + Marker copyWithSelectedStated(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) @@ -125,11 +125,12 @@ class ClusteringBodyState extends State { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { final Marker resetOld = - widget.getSelectedMarker(markers[previousMarkerId]!, false); + widget.copyWithSelectedStated(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = widget.getSelectedMarker(tappedMarker, true); + final Marker newMarker = + widget.copyWithSelectedStated(tappedMarker, true); markers[markerId] = newMarker; }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart index 8dbfa968b74..99f048324e9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart @@ -57,7 +57,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { } @override - Marker getSelectedMarker(Marker marker, bool isSelected) { + Marker copyWithSelectedStated(Marker marker, bool isSelected) { return marker.copyWith( iconParam: _getMarkerBitmapDescriptor(isSelected: isSelected), ); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart index 18e07702b47..7c45ec73fa5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart @@ -66,11 +66,11 @@ class PlaceMarkerBodyState extends State { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { final Marker resetOld = - getSelectedMarker(markers[previousMarkerId]!, false); + copyWithSelectedStated(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = getSelectedMarker(tappedMarker, true); + final Marker newMarker = copyWithSelectedStated(tappedMarker, true); markers[markerId] = newMarker; markerPosition = null; @@ -313,7 +313,7 @@ class PlaceMarkerBodyState extends State { } /// Performs customizations of the [marker] to mark it as selected or not. - Marker getSelectedMarker(Marker marker, bool isSelected) { + Marker copyWithSelectedStated(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) From 09a29763f80bedb6913fc7082a42f7b84494087f Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 13 Dec 2024 11:16:30 +0200 Subject: [PATCH 055/130] Remove cloudMapId field --- .../lib/src/google_maps_flutter_android.dart | 2 +- .../lib/src/types/map_configuration.dart | 19 ++++--------------- .../map_configuration_serialization.dart | 1 - .../test/types/map_configuration_test.dart | 2 +- .../lib/src/convert.dart | 2 +- 5 files changed, 7 insertions(+), 19 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index 1b62fb7c91d..49d4ce97218 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -1307,7 +1307,7 @@ PlatformMapConfiguration _platformMapConfigurationFromMapConfiguration( trafficEnabled: config.trafficEnabled, buildingsEnabled: config.buildingsEnabled, liteModeEnabled: config.liteModeEnabled, - mapId: config.mapId ?? config.cloudMapId, + mapId: config.mapId, style: config.style, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart index 5d7c913365e..674b2493d62 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart @@ -35,10 +35,11 @@ class MapConfiguration { this.indoorViewEnabled, this.trafficEnabled, this.buildingsEnabled, - this.mapId, - @Deprecated('cloudMapId is deprecated. Use mapId instead.') this.cloudMapId, + String? mapId, + @Deprecated('cloudMapId is deprecated. Use mapId instead.') + String? cloudMapId, this.style, - }); + }) : mapId = mapId ?? cloudMapId; /// This setting controls how the API handles gestures on the map. Web only. /// @@ -115,13 +116,6 @@ class MapConfiguration { /// for more details. final String? mapId; - /// Identifier that's associated with a specific cloud-based map style. - /// - /// See https://developers.google.com/maps/documentation/get-map-id - /// for more details. - @Deprecated('cloudMapId is deprecated. Use mapId instead.') - final String? cloudMapId; - /// Locally configured JSON style. /// /// To clear a previously set style, set this to an empty string. @@ -188,7 +182,6 @@ class MapConfiguration { buildingsEnabled: buildingsEnabled != other.buildingsEnabled ? buildingsEnabled : null, mapId: mapId != other.mapId ? mapId : null, - cloudMapId: cloudMapId != other.cloudMapId ? cloudMapId : null, style: style != other.style ? style : null, ); } @@ -222,7 +215,6 @@ class MapConfiguration { trafficEnabled: diff.trafficEnabled ?? trafficEnabled, buildingsEnabled: diff.buildingsEnabled ?? buildingsEnabled, mapId: diff.mapId ?? mapId, - cloudMapId: diff.cloudMapId ?? cloudMapId, style: diff.style ?? style, ); } @@ -250,7 +242,6 @@ class MapConfiguration { trafficEnabled == null && buildingsEnabled == null && mapId == null && - cloudMapId == null && style == null; @override @@ -283,7 +274,6 @@ class MapConfiguration { trafficEnabled == other.trafficEnabled && buildingsEnabled == other.buildingsEnabled && mapId == other.mapId && - cloudMapId == other.cloudMapId && style == other.style; } @@ -310,7 +300,6 @@ class MapConfiguration { trafficEnabled, buildingsEnabled, mapId, - cloudMapId, style, ]); } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart index 3775d34555d..8367facce8e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart @@ -59,7 +59,6 @@ Map jsonForMapConfiguration(MapConfiguration config) { if (config.buildingsEnabled != null) 'buildingsEnabled': config.buildingsEnabled!, if (config.mapId != null) 'mapId': config.mapId!, - if (config.cloudMapId != null) 'cloudMapId': config.cloudMapId!, if (config.style != null) 'style': config.style!, }; } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart index 0b7ab5825cd..8bf3758e496 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart @@ -405,7 +405,7 @@ void main() { // The diff from empty options should be the diff itself. expect(diff.diffFrom(empty), diff); // A diff applied to non-empty options should update that field. - expect(updated.cloudMapId, _kMapId); + expect(updated.mapId, _kMapId); // The hash code should change. expect(empty.hashCode, isNot(diff.hashCode)); }); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index 48bae385bc1..47b3bec84df 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -101,7 +101,7 @@ gmaps.MapOptions _configurationAndStyleToGmapsOptions( // See updateMapConfiguration for why this is not using configuration.style. options.styles = styles; - options.mapId = configuration.mapId ?? configuration.cloudMapId; + options.mapId = configuration.mapId; return options; } From 04734544b37d9992a1ca70f5c1a3d39ec43236c3 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 13 Dec 2024 12:15:11 +0200 Subject: [PATCH 056/130] Make offsetToJson private --- .../lib/src/types/advanced_marker.dart | 7 ++++++- .../lib/src/types/marker.dart | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart index 1026896d587..70d52b08aa7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart @@ -98,7 +98,7 @@ class AdvancedMarker extends Marker { addIfPresent('markerId', markerId.value); addIfPresent('alpha', alpha); - addIfPresent('anchor', offsetToJson(anchor)); + addIfPresent('anchor', _offsetToJson(anchor)); addIfPresent('consumeTapEvents', consumeTapEvents); addIfPresent('draggable', draggable); addIfPresent('flat', flat); @@ -168,3 +168,8 @@ enum MarkerCollisionBehavior { /// the marker. requiredAndHidesOptional, } + +/// Convert [Offset] to JSON object. +Object _offsetToJson(Offset offset) { + return [offset.dx, offset.dy]; +} diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart index 88c817fa7d3..76f35c05fdb 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart @@ -10,7 +10,7 @@ import 'package:flutter/foundation.dart' import 'types.dart'; /// Convert [Offset] to JSON object. -Object offsetToJson(Offset offset) { +Object _offsetToJson(Offset offset) { return [offset.dx, offset.dy]; } @@ -77,7 +77,7 @@ class InfoWindow { addIfPresent('title', title); addIfPresent('snippet', snippet); - addIfPresent('anchor', offsetToJson(anchor)); + addIfPresent('anchor', _offsetToJson(anchor)); return json; } @@ -295,7 +295,7 @@ class Marker implements MapsObject { addIfPresent('markerId', markerId.value); addIfPresent('alpha', alpha); - addIfPresent('anchor', offsetToJson(anchor)); + addIfPresent('anchor', _offsetToJson(anchor)); addIfPresent('consumeTapEvents', consumeTapEvents); addIfPresent('draggable', draggable); addIfPresent('flat', flat); From ea564e969aa4b32527be9369f2370fb5b1af3430 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:59:36 +0200 Subject: [PATCH 057/130] Convert Glyph class to 3 different bitmap descriptor classes --- .../lib/advanced_markers_clustering.dart | 6 +- .../example/lib/place_advanced_marker.dart | 2 +- .../integration_test/google_maps_tests.dart | 2 +- .../lib/advanced_markers_clustering.dart | 6 +- .../example/lib/place_advanced_marker.dart | 2 +- .../lib/src/google_maps_flutter_android.dart | 25 ++++- .../integration_test/google_maps_test.dart | 2 +- .../lib/advanced_markers_clustering.dart | 6 +- .../lib/place_advanced_marker.dart | 2 +- .../lib/src/types/bitmap.dart | 93 ++++++++++++++++--- .../lib/src/types/glyph.dart | 50 ---------- .../test/types/bitmap_test.dart | 13 +-- .../advanced_markers_test.dart | 12 +-- .../lib/src/convert.dart | 48 +++++----- 14 files changed, 150 insertions(+), 119 deletions(-) delete mode 100644 packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart index 5c8fda4bdd8..ad7d913c421 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart @@ -55,7 +55,7 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { icon: BitmapDescriptor.pinConfig( backgroundColor: Colors.white, borderColor: Colors.blue, - glyph: Glyph.color(Colors.blue), + glyph: const CircleGlyph(color: Colors.blue), ), ); } @@ -68,12 +68,12 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { ? BitmapDescriptor.pinConfig( backgroundColor: Colors.blue, borderColor: Colors.white, - glyph: Glyph.color(Colors.white), + glyph: const CircleGlyph(color: Colors.white), ) : BitmapDescriptor.pinConfig( backgroundColor: Colors.white, borderColor: Colors.blue, - glyph: Glyph.color(Colors.blue), + glyph: const CircleGlyph(color: Colors.blue), ), ); } diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart index d3c933f140a..43a1b1a1d84 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart @@ -68,7 +68,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { return BitmapDescriptor.pinConfig( backgroundColor: isSelected ? Colors.blue : Colors.white, borderColor: isSelected ? Colors.white : Colors.blue, - glyph: Glyph.color(isSelected ? Colors.white : Colors.blue), + glyph: CircleGlyph(color: isSelected ? Colors.white : Colors.blue), ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart index 29983363fa3..b29ec0ad85d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart @@ -2048,7 +2048,7 @@ void googleMapsTests() { icon: BitmapDescriptor.pinConfig( backgroundColor: Colors.green, borderColor: Colors.greenAccent, - glyph: Glyph.text('A', textColor: Colors.white), + glyph: const TextGlyph(text: 'A', textColor: Colors.white), ), ), }; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart index 0f467fd35d6..c342ad00794 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart @@ -50,7 +50,7 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { icon: BitmapDescriptor.pinConfig( backgroundColor: Colors.white, borderColor: Colors.blue, - glyph: Glyph.color(Colors.blue), + glyph: const CircleGlyph(color: Colors.blue), ), ); } @@ -63,12 +63,12 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { ? BitmapDescriptor.pinConfig( backgroundColor: Colors.blue, borderColor: Colors.white, - glyph: Glyph.color(Colors.white), + glyph: const CircleGlyph(color: Colors.white), ) : BitmapDescriptor.pinConfig( backgroundColor: Colors.white, borderColor: Colors.blue, - glyph: Glyph.color(Colors.blue), + glyph: const CircleGlyph(color: Colors.blue), ), ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart index 4f7ae5ed57c..f317547fb6b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart @@ -64,7 +64,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { return BitmapDescriptor.pinConfig( backgroundColor: isSelected ? Colors.blue : Colors.white, borderColor: isSelected ? Colors.white : Colors.blue, - glyph: Glyph.color(isSelected ? Colors.white : Colors.blue), + glyph: CircleGlyph(color: isSelected ? Colors.white : Colors.blue), ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index 49d4ce97218..0ed4ddbaecf 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -1023,15 +1023,30 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { width: bytes.width, height: bytes.height)); case final PinConfig pinConfig: - final BitmapDescriptor? glyphBitmapDescriptor = - pinConfig.glyph?.bitmapDescriptor; + final AdvancedMarkerGlyph? glyph = pinConfig.glyph; + Color? glyphColor; + String? glyphText; + Color? glyphTextColor; + BitmapDescriptor? glyphBitmapDescriptor; + if (glyph != null) { + switch (glyph.runtimeType) { + case final CircleGlyph circleGlyph: + glyphColor = circleGlyph.color; + case final TextGlyph textGlyph: + glyphText = textGlyph.text; + glyphTextColor = textGlyph.textColor; + case final BitmapGlyph bitmapGlyph: + glyphBitmapDescriptor = bitmapGlyph.bitmap; + } + } + return PlatformBitmap( bitmap: PlatformBitmapPinConfig( backgroundColor: pinConfig.backgroundColor?.value, borderColor: pinConfig.borderColor?.value, - glyphColor: pinConfig.glyph?.color?.value, - glyphText: pinConfig.glyph?.text, - glyphTextColor: pinConfig.glyph?.textColor?.value, + glyphColor: glyphColor?.value, + glyphText: glyphText, + glyphTextColor: glyphTextColor?.value, glyphBitmap: glyphBitmapDescriptor != null ? platformBitmapFromBitmapDescriptor(glyphBitmapDescriptor) : null, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart index b6c33884ff2..41e69ce479a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart @@ -1890,7 +1890,7 @@ void main() { icon: BitmapDescriptor.pinConfig( backgroundColor: Colors.green, borderColor: Colors.greenAccent, - glyph: Glyph.text('A', textColor: Colors.white), + glyph: const TextGlyph(text: 'A', textColor: Colors.white), ), ), }; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart index 454b4c15c58..714ad88d476 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart @@ -55,7 +55,7 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { icon: BitmapDescriptor.pinConfig( backgroundColor: Colors.white, borderColor: Colors.blue, - glyph: Glyph.color(Colors.blue), + glyph: const CircleGlyph(color: Colors.blue), ), ); } @@ -68,12 +68,12 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { ? BitmapDescriptor.pinConfig( backgroundColor: Colors.blue, borderColor: Colors.white, - glyph: Glyph.color(Colors.white), + glyph: const CircleGlyph(color: Colors.white), ) : BitmapDescriptor.pinConfig( backgroundColor: Colors.white, borderColor: Colors.blue, - glyph: Glyph.color(Colors.blue), + glyph: const CircleGlyph(color: Colors.blue), ), ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart index 99f048324e9..82244330a41 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart @@ -67,7 +67,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { return BitmapDescriptor.pinConfig( backgroundColor: isSelected ? Colors.blue : Colors.white, borderColor: isSelected ? Colors.white : Colors.blue, - glyph: Glyph.color(isSelected ? Colors.white : Colors.blue), + glyph: CircleGlyph(color: isSelected ? Colors.white : Colors.blue), ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart index 00017e22e89..59be371d205 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart @@ -17,8 +17,6 @@ import 'package:flutter/material.dart' createLocalImageConfiguration; import 'package:flutter/services.dart' show AssetBundle; -import 'glyph.dart'; - /// Type of bitmap scaling to use on BitmapDescriptor creation. enum MapBitmapScaling { /// Automatically scale image with devices pixel ratio or to given size, @@ -351,7 +349,7 @@ abstract class BitmapDescriptor { static BitmapDescriptor pinConfig({ Color? backgroundColor, Color? borderColor, - Glyph? glyph, + AdvancedMarkerGlyph? glyph, }) { return PinConfig( backgroundColor: backgroundColor, @@ -1049,14 +1047,14 @@ class PinConfig extends BitmapDescriptor { /// The type of the MapBitmap object, used for the JSON serialization. static const String type = 'pinConfig'; - /// The background color of the pin + /// The background color of the pin. final Color? backgroundColor; - /// The border color of the pin + /// The border color of the pin. final Color? borderColor; - /// The glyph that is displayed on the pin marker - final Glyph? glyph; + /// The glyph that is displayed on the pin marker. + final AdvancedMarkerGlyph? glyph; @override Object toJson() => [ @@ -1065,12 +1063,81 @@ class PinConfig extends BitmapDescriptor { if (backgroundColor != null) 'backgroundColor': backgroundColor?.value, if (borderColor != null) 'borderColor': borderColor?.value, - if (glyph?.text != null) 'glyphText': glyph?.text, - if (glyph?.textColor != null) - 'glyphTextColor': glyph?.textColor?.value, - if (glyph?.color != null) 'glyphColor': glyph?.color?.value, - if (glyph?.bitmapDescriptor != null) - 'glyphBitmapDescriptor': glyph?.bitmapDescriptor?.toJson(), + if (glyph != null) 'glyph': glyph?.toJson(), + } + ]; +} + +/// Defines a glyph (the element at the center of an [AdvancedMarker] icon). +abstract class AdvancedMarkerGlyph extends BitmapDescriptor { + const AdvancedMarkerGlyph._() : super._(); +} + +/// Defines a glyph using the default circle, but with a custom color. +class CircleGlyph extends AdvancedMarkerGlyph { + /// Constructs a glyph instance, using the default circle, but with + /// a custom color. + const CircleGlyph({ + required this.color, + }) : super._(); + + /// Color of the circular icon. + final Color color; + + @override + Object toJson() => [ + 'circleGlyph', + { + 'color': color.value, } ]; } + +/// Defines a glyph instance with a specified bitmap. +class BitmapGlyph extends AdvancedMarkerGlyph { + /// Constructs a glyph with the specified [bitmap]. + const BitmapGlyph({ + required this.bitmap, + }) : assert( + bitmap is! AdvancedMarkerGlyph, + 'BitmapDescriptor cannot be an AdvancedMarkerGlyph.', + ), + super._(); + + /// Bitmap image to be displayed in the center of the glyph. + final BitmapDescriptor bitmap; + + @override + Object toJson() => [ + 'bitmapGlyph', + { + 'bitmap': bitmap.toJson(), + } + ]; +} + +/// Defines a glyph instance with a specified text and color. +class TextGlyph extends AdvancedMarkerGlyph { + /// Constructs a glyph with the specified [text] and [textColor]. + const TextGlyph({ + required this.text, + required this.textColor, + }) : super._(); + + /// Text to be displayed in the glyph. + final String text; + + /// Color of the text. + final Color? textColor; + + @override + Object toJson() { + return [ + 'textGlyph', + { + 'text': text, + if (textColor != null) 'textColor': textColor!.value, + } + ]; + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart deleted file mode 100644 index 7503ed55f8f..00000000000 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/glyph.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart' show Color; - -import '../../google_maps_flutter_platform_interface.dart'; - -/// Defines a glyph (the element at the center of an [AdvancedMarker] icon). -/// Default glyph is a circle but can be configured to have a different color, -/// some text or bitmap -@immutable -class Glyph { - /// Creates a glyph with a circle of the specified [color] - factory Glyph.color(Color color) { - return Glyph._(color: color); - } - - /// Creates a glyph with a bitmap image - factory Glyph.bitmap(BitmapDescriptor bitmapDescriptor) { - return Glyph._(bitmapDescriptor: bitmapDescriptor); - } - - /// Creates a glyph with a [text] of the specified [textColor] - factory Glyph.text(String text, {Color? textColor}) { - return Glyph._( - text: text, - textColor: textColor, - ); - } - const Glyph._({ - this.text, - this.textColor, - this.bitmapDescriptor, - this.color, - }); - - /// Text to be displayed in the glyph - final String? text; - - /// Color of the text - final Color? textColor; - - /// Bitmap image to be displayed in center of the glyph - final BitmapDescriptor? bitmapDescriptor; - - /// Color of the default glyph (circle) - final Color? color; -} diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart index ac284cec37b..b9258256585 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart @@ -707,13 +707,14 @@ void main() { }); test('construct with glyph text', () { - final PinConfig pinConfig = PinConfig( + const PinConfig pinConfig = PinConfig( backgroundColor: Colors.green, borderColor: Colors.blue, - glyph: Glyph.text('Hello', textColor: Colors.red), + glyph: TextGlyph(text: 'Hello', textColor: Colors.red), ); - expect(pinConfig.glyph?.text, 'Hello'); - expect(pinConfig.glyph?.textColor, Colors.red); + expect(pinConfig.glyph, isA()); + expect((pinConfig.glyph! as TextGlyph).text, 'Hello'); + expect((pinConfig.glyph! as TextGlyph).textColor, Colors.red); expect( pinConfig.toJson(), [ @@ -730,10 +731,10 @@ void main() { test('construct with glyph bitmap', () async { const BitmapDescriptor bitmap = AssetBitmap(name: 'red_square.png'); - final PinConfig pinConfig = PinConfig( + const PinConfig pinConfig = PinConfig( backgroundColor: Colors.black, borderColor: Colors.red, - glyph: Glyph.bitmap(bitmap), + glyph: BitmapGlyph(bitmap: bitmap), ); expect(pinConfig.backgroundColor, Colors.black); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart index 79a1fd75b8a..bebb7df08d3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart @@ -427,7 +427,7 @@ void main() { icon: BitmapDescriptor.pinConfig( backgroundColor: const Color(0xFF00FF00), borderColor: const Color(0xFFFF0000), - glyph: Glyph.color(const Color(0xFFFFFFFF)), + glyph: const CircleGlyph(color: Color(0xFFFFFFFF)), ), ), }; @@ -480,9 +480,9 @@ void main() { icon: BitmapDescriptor.pinConfig( backgroundColor: Colors.black, borderColor: Colors.black, - glyph: Glyph.text( - 'Hey', - textColor: const Color(0xFF0000FF), + glyph: const TextGlyph( + text: 'Hey', + textColor: Color(0xFF0000FF), ), ), ), @@ -524,8 +524,8 @@ void main() { icon: BitmapDescriptor.pinConfig( backgroundColor: Colors.black, borderColor: Colors.black, - glyph: Glyph.bitmap( - await BitmapDescriptor.asset( + glyph: BitmapGlyph( + bitmap: await BitmapDescriptor.asset( const ImageConfiguration( size: Size.square(12), ), diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index 47b3bec84df..6f4cf5352ed 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -427,35 +427,33 @@ Future _advancedMarkerIconFromBitmapDescriptor( : null ..borderColor = bitmapDescriptor.borderColor != null ? _getCssColor(bitmapDescriptor.borderColor!) - : null - ..glyphColor = bitmapDescriptor.glyph?.color != null - ? _getCssColor(bitmapDescriptor.glyph!.color!) : null; - final Glyph? glyph = bitmapDescriptor.glyph; + final AdvancedMarkerGlyph? glyph = bitmapDescriptor.glyph; if (glyph != null) { - if (glyph.text != null) { - // Set glyph text and text color. - final web.Element element = document.createElement('p'); - element.innerHTML = glyph.text!.toJS; - if (glyph.textColor != null) { - element.setAttribute( - 'style', - 'color: ${_getCssColor(bitmapDescriptor.glyph!.textColor!)}', + switch (glyph.runtimeType) { + case final CircleGlyph circleGlyph: + options.glyphColor = _getCssColor(circleGlyph.color); + case final TextGlyph textGlyph: + final web.Element element = document.createElement('p'); + element.innerHTML = textGlyph.text.toJS; + if (textGlyph.textColor != null) { + element.setAttribute( + 'style', + 'color: ${_getCssColor(textGlyph.textColor!)}', + ); + } + options.glyph = element; + case final BitmapGlyph bitmapGlyph: + final Node? glyphBitmap = + await _advancedMarkerIconFromBitmapDescriptor( + bitmapGlyph.bitmap, + // Always opaque, opacity is handled by the parent marker. + opacity: 1.0, + // Always visible, as the visibility is handled by the parent marker. + isVisible: true, ); - } - - options.glyph = element; - } else if (glyph.bitmapDescriptor != null) { - // Create glyph from bitmap. - final Node? glyphBitmap = await _advancedMarkerIconFromBitmapDescriptor( - glyph.bitmapDescriptor!, - // Always opaque, opacity is handled by the parent marker. - opacity: 1.0, - // Always visible, as the visibility is handled by the parent marker. - isVisible: true, - ); - options.glyph = glyphBitmap; + options.glyph = glyphBitmap; } } From bfa5b44b60a91cdee9c9284f8615cc3e830158ea Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:53:50 +0200 Subject: [PATCH 058/130] Remove cloudMapId field --- .../google_maps_flutter/lib/src/google_map.dart | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index 8ddebefc9b6..4225d5ae62c 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -127,10 +127,11 @@ class GoogleMap extends StatefulWidget { this.onCameraIdle, this.onTap, this.onLongPress, - this.mapId, this.markerType = MarkerType.marker, - @Deprecated('cloudMapId is deprecated. Use mapId instead.') this.cloudMapId, - }); + String? mapId, + @Deprecated('cloudMapId is deprecated. Use mapId instead.') + String? cloudMapId, + }) : mapId = mapId ?? cloudMapId; /// Callback method for when the map is ready to be used. /// @@ -357,13 +358,6 @@ class GoogleMap extends StatefulWidget { /// for more details. final String? mapId; - /// Identifier that's associated with a specific cloud-based map style. - /// - /// See https://developers.google.com/maps/documentation/get-map-id - /// for more details. - @Deprecated('cloudMapId is deprecated. Use mapId instead.') - final String? cloudMapId; - /// Indicates whether map should use [AdvancedMarker]s or [Marker]s. final MarkerType markerType; @@ -685,7 +679,7 @@ MapConfiguration _configurationFromMapWidget(GoogleMap map) { indoorViewEnabled: map.indoorViewEnabled, trafficEnabled: map.trafficEnabled, buildingsEnabled: map.buildingsEnabled, - mapId: map.mapId ?? map.cloudMapId, + mapId: map.mapId, // A null style in the widget means no style, which is expressed as '' in // the configuration to distinguish from no change (null). style: map.style ?? '', From 5e665784811d9f4fabb02daa2f7d684168b24aa7 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:00:11 +0200 Subject: [PATCH 059/130] Assert that (legacy) marker's icon is not a PinConfig --- .../lib/src/types/marker.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart index 76f35c05fdb..5bd3da41900 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart @@ -160,7 +160,11 @@ class Marker implements MapsObject { this.onDrag, this.onDragStart, this.onDragEnd, - }) : assert(0.0 <= alpha && alpha <= 1.0); + }) : assert(0.0 <= alpha && alpha <= 1.0), + assert( + icon is! PinConfig, + 'Icon must not be a PinConfig. PinConfig is only supported by AdvancedMarker.', + ); /// Uniquely identifies a [Marker]. final MarkerId markerId; From a9261a3b7008d6485a08b25e3343a2a2cd4984e9 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:19:33 +0200 Subject: [PATCH 060/130] Update PinConfig examples --- .../lib/src/types/bitmap.dart | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart index 59be371d205..e1fc7c18020 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart @@ -999,7 +999,7 @@ class BytesMapBitmap extends MapBitmap { /// PinConfig( /// backgroundColor: Colors.blue, /// borderColor: Colors.white, -/// glyph: Glyph.color(Colors.blue) +/// glyph: CircleGlyph(color: Colors.blue) /// ) /// ``` /// @@ -1009,7 +1009,7 @@ class BytesMapBitmap extends MapBitmap { /// ```dart /// PinConfig( /// backgroundColor: Colors.blue, -/// glyph: Glyph.text('Pin', Colors.white) +/// glyph: TextGlyph(text: 'Pin', textColor: Colors.white) /// ) /// ``` /// @@ -1018,8 +1018,8 @@ class BytesMapBitmap extends MapBitmap { /// /// ```dart /// PinConfig( -/// glyph: Glyph.bitmapDescriptor( -/// BitmapDescriptor.asset( +/// glyph: BitmapGlyph( +/// bitmap: BitmapDescriptor.asset( /// ImageConfiguration(size: Size(12, 12)), /// 'assets/cat.png' /// ) @@ -1053,7 +1053,13 @@ class PinConfig extends BitmapDescriptor { /// The border color of the pin. final Color? borderColor; - /// The glyph that is displayed on the pin marker. + /// The glyph that is displayed on the pin marker. If null, the default + /// circular glyph is used. + /// + /// Can be one of the following: + /// * [CircleGlyph] to define a circular glyph with a custom color. + /// * [BitmapGlyph] to define a glyph with a specified bitmap. + /// * [TextGlyph] to define a glyph with a specified text and its color. final AdvancedMarkerGlyph? glyph; @override @@ -1073,7 +1079,7 @@ abstract class AdvancedMarkerGlyph extends BitmapDescriptor { const AdvancedMarkerGlyph._() : super._(); } -/// Defines a glyph using the default circle, but with a custom color. +/// Defines a circular glyph with a given color. class CircleGlyph extends AdvancedMarkerGlyph { /// Constructs a glyph instance, using the default circle, but with /// a custom color. From fe2475f7316db418ad6d49648281dd998b84ca13 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:15:44 +0200 Subject: [PATCH 061/130] Move MarkerType to MapConfiguration --- .../example/lib/clustering.dart | 1 - .../example/lib/marker_icons.dart | 1 - .../example/lib/place_marker.dart | 1 - .../lib/readme_sample_advanced_markers.dart | 1 - .../lib/google_maps_flutter.dart | 2 ++ .../lib/src/google_map.dart | 14 +++++++-- .../example/lib/example_google_map.dart | 1 - .../lib/src/google_maps_flutter_android.dart | 29 ++++++++++++------- .../pigeons/messages.dart | 2 ++ .../google_maps_flutter_android_test.dart | 12 +++----- .../lib/example_google_map.dart | 1 - .../lib/src/google_maps_flutter_ios.dart | 10 ++++++- .../pigeons/messages.dart | 2 ++ .../test/google_maps_flutter_ios_test.dart | 1 - .../method_channel_google_maps_flutter.dart | 5 ---- .../google_maps_flutter_platform.dart | 4 --- .../lib/src/types/bitmap.dart | 2 +- .../lib/src/types/map_configuration.dart | 27 +++++++++++++++-- .../src/types/map_widget_configuration.dart | 18 ------------ .../lib/src/types/marker.dart | 6 +--- .../map_configuration_serialization.dart | 1 + .../google_maps_flutter_platform_test.dart | 1 - .../google_maps_controller_test.dart | 1 - .../google_maps_plugin_test.dart | 3 -- .../marker_clustering_test.dart | 1 - .../lib/src/google_maps_controller.dart | 16 ++++++---- 26 files changed, 87 insertions(+), 76 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart index 523396cac23..440ad6f6fdd 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart @@ -6,7 +6,6 @@ import 'dart:math'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; import 'page.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart index bfcc6fc55fc..67659e3d3bc 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart @@ -10,7 +10,6 @@ import 'dart:async'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; import 'custom_marker_icon.dart'; import 'page.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart index 20db8018945..7f12cdac849 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart @@ -10,7 +10,6 @@ import 'dart:typed_data'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; import 'custom_marker_icon.dart'; import 'page.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart index 749b396c8a7..574e4436431 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart @@ -6,7 +6,6 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; void main() => runApp(const MyApp()); diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart index d24f6f0995f..5fb20d02e78 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart @@ -9,6 +9,7 @@ import 'dart:async'; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:google_maps_flutter_android/google_maps_flutter_android.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; @@ -45,6 +46,7 @@ export 'package:google_maps_flutter_platform_interface/google_maps_flutter_platf MapType, Marker, MarkerId, + MarkerType, MinMaxZoomPreference, PatternItem, Polygon, diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index 4225d5ae62c..1a4b7ce3bc4 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -358,7 +358,18 @@ class GoogleMap extends StatefulWidget { /// for more details. final String? mapId; - /// Indicates whether map should use [AdvancedMarker]s or [Marker]s. + /// Indicates whether map uses [AdvancedMarker]s or [Marker]s. + /// + /// [AdvancedMarker] and [Marker]s classes might not be related to each other + /// in the platform implementation. It's important to set the correct + /// [MarkerType] so that the platform implementation can handle the markers: + /// * If [MarkerType.advancedMarker] is used, all markers must be of type + /// [AdvancedMarker]. + /// * If [MarkerType.marker] is used, markers cannot be of type + /// [AdvancedMarker]. + /// + /// While some features work with either type, using the incorrect type + /// may result in unexpected behavior. final MarkerType markerType; /// Creates a [State] for this [GoogleMap]. @@ -394,7 +405,6 @@ class _GoogleMapState extends State { TextDirection.ltr, initialCameraPosition: widget.initialCameraPosition, gestureRecognizers: widget.gestureRecognizers, - markerType: widget.markerType, ), mapObjects: MapObjects( markers: widget.markers, diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart index 6cc90af473d..07a7160f18f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart @@ -421,7 +421,6 @@ class _ExampleGoogleMapState extends State { TextDirection.ltr, initialCameraPosition: widget.initialCameraPosition, gestureRecognizers: widget.gestureRecognizers, - markerType: widget.markerType, ), mapObjects: MapObjects( markers: widget.markers, diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index 0ed4ddbaecf..6a4a97fee8d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -550,7 +550,6 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { PlatformViewCreatedCallback onPlatformViewCreated, { required PlatformMapConfiguration mapConfiguration, required MapWidgetConfiguration widgetConfiguration, - required MarkerType markerType, MapObjects mapObjects = const MapObjects(), }) { assert( @@ -647,7 +646,6 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { mapObjects: mapObjects, mapConfiguration: _platformMapConfigurationFromMapConfiguration(mapConfiguration), - markerType: widgetConfiguration.markerType, ); } @@ -673,7 +671,6 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { widgetConfiguration: MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: textDirection, - markerType: markerType, ), mapObjects: MapObjects( markers: markers, @@ -683,7 +680,6 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { clusterManagers: clusterManagers, tileOverlays: tileOverlays), mapConfiguration: _platformMapConfigurationFromOptionsJson(mapOptions), - markerType: markerType, ); } @@ -947,13 +943,6 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { } } - PlatformMarkerType _platformMarkerTypeFromMarkerType(MarkerType markerType) { - return switch (markerType) { - MarkerType.marker => PlatformMarkerType.marker, - MarkerType.advancedMarker => PlatformMarkerType.advancedMarker, - }; - } - /// Convert [MapBitmapScaling] from platform interface to [PlatformMapBitmapScaling] Pigeon. @visibleForTesting static PlatformMapBitmapScaling platformMapBitmapScalingFromScaling( @@ -1299,6 +1288,14 @@ PlatformEdgeInsets? _platformEdgeInsetsFromEdgeInsets(EdgeInsets? insets) { right: insets.right); } +PlatformMarkerType? _platformMarkerTypeFromMarkerType(MarkerType? markerType) { + return switch (markerType) { + null => null, + MarkerType.marker => PlatformMarkerType.marker, + MarkerType.advancedMarker => PlatformMarkerType.advancedMarker, + }; +} + PlatformMapConfiguration _platformMapConfigurationFromMapConfiguration( MapConfiguration config) { return PlatformMapConfiguration( @@ -1322,6 +1319,7 @@ PlatformMapConfiguration _platformMapConfigurationFromMapConfiguration( trafficEnabled: config.trafficEnabled, buildingsEnabled: config.buildingsEnabled, liteModeEnabled: config.liteModeEnabled, + markerType: _platformMarkerTypeFromMarkerType(config.markerType), mapId: config.mapId, style: config.style, ); @@ -1363,6 +1361,7 @@ PlatformMapConfiguration _platformMapConfigurationFromOptionsJson( trafficEnabled: options['trafficEnabled'] as bool?, buildingsEnabled: options['buildingsEnabled'] as bool?, liteModeEnabled: options['liteModeEnabled'] as bool?, + markerType: _platformMarkerTypeFromIndex(options['markerType'] as int?), mapId: options['mapId'] as String?, style: options['style'] as String?, ); @@ -1430,6 +1429,14 @@ PlatformZoomRange? _platformZoomRangeFromMinMaxZoomPreferenceJson( return PlatformZoomRange(min: minMaxZoom[0], max: minMaxZoom[1]); } +PlatformMarkerType _platformMarkerTypeFromIndex(int? index) { + return switch (index) { + 0 => PlatformMarkerType.marker, + 1 => PlatformMarkerType.advancedMarker, + _ => PlatformMarkerType.marker, + }; +} + /// Converts platform interface's JointType to Pigeon's PlatformJointType. @visibleForTesting PlatformJointType platformJointTypeFromJointType(JointType jointType) { diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart index 82b9d37f15c..ef7dd49087d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart @@ -490,6 +490,7 @@ class PlatformMapConfiguration { required this.trafficEnabled, required this.buildingsEnabled, required this.liteModeEnabled, + required this.markerType, required this.mapId, required this.style, }); @@ -512,6 +513,7 @@ class PlatformMapConfiguration { final bool? trafficEnabled; final bool? buildingsEnabled; final bool? liteModeEnabled; + final PlatformMarkerType? markerType; final String? mapId; final String? style; } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart index b9d8c9e580f..d3a39d08769 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart @@ -1083,7 +1083,6 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, - markerType: MarkerType.marker, ), ); @@ -1327,7 +1326,6 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, - markerType: MarkerType.marker, )); expect(widget, isA()); @@ -1342,7 +1340,6 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, - markerType: MarkerType.marker, ), ); @@ -1384,7 +1381,6 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, - markerType: MarkerType.marker, ), // Here deprecated cloudMapId is used to test that creation params have // the correct mapId. @@ -1432,7 +1428,6 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, - markerType: MarkerType.marker, ), mapConfiguration: const MapConfiguration(mapId: mapId))); @@ -1453,7 +1448,6 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, - markerType: MarkerType.advancedMarker, ), ); @@ -1461,7 +1455,9 @@ void main() { final dynamic creationParams = (widget as AndroidView).creationParams; expect(creationParams, isA()); expect( - (creationParams as PlatformMapViewCreationParams).markerType, + (creationParams as PlatformMapViewCreationParams) + .mapConfiguration + .markerType, PlatformMarkerType.advancedMarker, ); @@ -1471,13 +1467,13 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, - markerType: MarkerType.marker, ), ); expect(widget2, isA()); expect( ((widget2 as AndroidView).creationParams as PlatformMapViewCreationParams) + .mapConfiguration .markerType, PlatformMarkerType.marker, ); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart index 1ed322d3dd6..b67419518f6 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart @@ -419,7 +419,6 @@ class _ExampleGoogleMapState extends State { TextDirection.ltr, initialCameraPosition: widget.initialCameraPosition, gestureRecognizers: widget.gestureRecognizers, - markerType: widget.markerType, ), mapObjects: MapObjects( markers: widget.markers, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index 1c68147626c..a3ffab5761b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -576,7 +576,6 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { widgetConfiguration: MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: textDirection, - markerType: markerType, ), mapObjects: MapObjects( markers: markers, @@ -1307,6 +1306,7 @@ PlatformMapConfiguration _platformMapConfigurationFromOptionsJson( indoorViewEnabled: options['indoorEnabled'] as bool?, trafficEnabled: options['trafficEnabled'] as bool?, buildingsEnabled: options['buildingsEnabled'] as bool?, + markerType: _platformMarkerTypeFromIndex(options['markerType'] as int?), mapId: options['mapId'] as String?, style: options['style'] as String?, ); @@ -1374,6 +1374,14 @@ PlatformZoomRange? _platformZoomRangeFromMinMaxZoomPreferenceJson( return PlatformZoomRange(min: minMaxZoom[0], max: minMaxZoom[1]); } +PlatformMarkerType _platformMarkerTypeFromIndex(int? index) { + return switch (index) { + 0 => PlatformMarkerType.marker, + 1 => PlatformMarkerType.advancedMarker, + _ => PlatformMarkerType.marker, + }; +} + /// Converts platform interface's JointType to Pigeon's PlatformJointType. @visibleForTesting PlatformJointType platformJointTypeFromJointType(JointType jointType) { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index 3b1d2e1976f..7050a4b7847 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -446,6 +446,7 @@ class PlatformMapConfiguration { required this.indoorViewEnabled, required this.trafficEnabled, required this.buildingsEnabled, + required this.markerType, required this.mapId, required this.style, }); @@ -465,6 +466,7 @@ class PlatformMapConfiguration { final bool? indoorViewEnabled; final bool? trafficEnabled; final bool? buildingsEnabled; + final PlatformMarkerType? markerType; final String? mapId; final String? style; } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart index 5c2890c780c..39046c171e4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart @@ -1189,7 +1189,6 @@ void main() { initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, - markerType: MarkerType.marker, ), mapConfiguration: const MapConfiguration(mapId: cloudMapId)))); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart index 5178c603995..3db472c92d2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart @@ -556,7 +556,6 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { 'circlesToAdd': serializeCircleSet(mapObjects.circles), 'heatmapsToAdd': serializeHeatmapSet(mapObjects.heatmaps), 'tileOverlaysToAdd': serializeTileOverlaySet(mapObjects.tileOverlays), - 'markerType': widgetConfiguration.markerType.index, }; if (defaultTargetPlatform == TargetPlatform.android) { @@ -648,7 +647,6 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { Set clusterManagers = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, - MarkerType markerType = MarkerType.marker, }) { return _buildView( creationId, @@ -656,7 +654,6 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { widgetConfiguration: MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: textDirection, - markerType: markerType, ), mapObjects: MapObjects( markers: markers, @@ -682,7 +679,6 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { Set clusterManagers = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, - MarkerType markerType = MarkerType.marker, }) { return buildViewWithTextDirection( creationId, @@ -697,7 +693,6 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { clusterManagers: clusterManagers, gestureRecognizers: gestureRecognizers, mapOptions: mapOptions, - markerType: markerType, ); } } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart index 624d20f6b17..7fa8172c439 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart @@ -453,7 +453,6 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface { // TODO(stuartmorgan): Replace with a structured type that's part of the // interface. See https://github.com/flutter/flutter/issues/70330. Map mapOptions = const {}, - MarkerType markerType = MarkerType.marker, }) { throw UnimplementedError('buildView() has not been implemented.'); } @@ -480,7 +479,6 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface { Set circles = const {}, Set tileOverlays = const {}, Map mapOptions = const {}, - MarkerType markerType = MarkerType.marker, }) { return buildView( creationId, @@ -493,7 +491,6 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface { tileOverlays: tileOverlays, gestureRecognizers: gestureRecognizers, mapOptions: mapOptions, - markerType: markerType, ); } @@ -517,7 +514,6 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface { tileOverlays: mapObjects.tileOverlays, gestureRecognizers: widgetConfiguration.gestureRecognizers, mapOptions: jsonForMapConfiguration(mapConfiguration), - markerType: widgetConfiguration.markerType, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart index e1fc7c18020..f496452b874 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart @@ -1127,7 +1127,7 @@ class TextGlyph extends AdvancedMarkerGlyph { /// Constructs a glyph with the specified [text] and [textColor]. const TextGlyph({ required this.text, - required this.textColor, + this.textColor, }) : super._(); /// Text to be displayed in the glyph. diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart index 674b2493d62..f44a1a8b15b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart @@ -39,6 +39,7 @@ class MapConfiguration { @Deprecated('cloudMapId is deprecated. Use mapId instead.') String? cloudMapId, this.style, + this.markerType, }) : mapId = mapId ?? cloudMapId; /// This setting controls how the API handles gestures on the map. Web only. @@ -121,6 +122,13 @@ class MapConfiguration { /// To clear a previously set style, set this to an empty string. final String? style; + /// The type of marker that the map should use. + /// + /// Advanced and legacy markers could be handled differently by platform + /// implementations. This property indicates which type of marker should be + /// used. + final MarkerType? markerType; + /// Returns a new options object containing only the values of this instance /// that are different from [other]. MapConfiguration diffFrom(MapConfiguration other) { @@ -183,6 +191,7 @@ class MapConfiguration { buildingsEnabled != other.buildingsEnabled ? buildingsEnabled : null, mapId: mapId != other.mapId ? mapId : null, style: style != other.style ? style : null, + markerType: markerType != other.markerType ? markerType : null, ); } @@ -216,6 +225,7 @@ class MapConfiguration { buildingsEnabled: diff.buildingsEnabled ?? buildingsEnabled, mapId: diff.mapId ?? mapId, style: diff.style ?? style, + markerType: diff.markerType ?? markerType, ); } @@ -242,7 +252,8 @@ class MapConfiguration { trafficEnabled == null && buildingsEnabled == null && mapId == null && - style == null; + style == null && + markerType == null; @override bool operator ==(Object other) { @@ -274,7 +285,8 @@ class MapConfiguration { trafficEnabled == other.trafficEnabled && buildingsEnabled == other.buildingsEnabled && mapId == other.mapId && - style == other.style; + style == other.style && + markerType == other.markerType; } @override @@ -301,5 +313,16 @@ class MapConfiguration { buildingsEnabled, mapId, style, + markerType, ]); } + +/// Indicates the type of marker that the map should use. +enum MarkerType { + /// Represents the default marker type, [Marker]. This marker type is + /// deprecated on the web. + marker, + + /// Represents the advanced marker type, [AdvancedMarker]. + advancedMarker, +} diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart index d0a26b73e4b..029af990166 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_widget_configuration.dart @@ -18,7 +18,6 @@ class MapWidgetConfiguration { const MapWidgetConfiguration({ required this.initialCameraPosition, required this.textDirection, - required this.markerType, this.gestureRecognizers = const >{}, }); @@ -30,21 +29,4 @@ class MapWidgetConfiguration { /// Gesture recognizers to add to the widget. final Set> gestureRecognizers; - - /// The type of marker that the map should use. - /// - /// Advanced and legacy markers could be handled differently by platform - /// implementations. This property indicates which type of marker should be - /// used. - final MarkerType markerType; -} - -/// Indicates the type of marker that the map should use. -enum MarkerType { - /// Represents the default marker type, [Marker]. This marker type is - /// deprecated on the web. - marker, - - /// Represents the advanced marker type, [AdvancedMarker]. - advancedMarker, } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart index 5bd3da41900..76f35c05fdb 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/marker.dart @@ -160,11 +160,7 @@ class Marker implements MapsObject { this.onDrag, this.onDragStart, this.onDragEnd, - }) : assert(0.0 <= alpha && alpha <= 1.0), - assert( - icon is! PinConfig, - 'Icon must not be a PinConfig. PinConfig is only supported by AdvancedMarker.', - ); + }) : assert(0.0 <= alpha && alpha <= 1.0); /// Uniquely identifies a [Marker]. final MarkerId markerId; diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart index 8367facce8e..5d5dcde2c83 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart @@ -60,5 +60,6 @@ Map jsonForMapConfiguration(MapConfiguration config) { 'buildingsEnabled': config.buildingsEnabled!, if (config.mapId != null) 'mapId': config.mapId!, if (config.style != null) 'style': config.style!, + if (config.markerType != null) 'markerType': config.markerType!.index, }; } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart index dbd0bee927c..0324117581b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart @@ -77,7 +77,6 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: CameraPosition(target: LatLng(0.0, 0.0)), textDirection: TextDirection.ltr, - markerType: MarkerType.marker, ), ), isA(), diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart index 58d89518100..364d09d0af1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart @@ -68,7 +68,6 @@ void main() { widgetConfiguration: MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: TextDirection.ltr, - markerType: MarkerType.marker, ), mapObjects: mapObjects, mapConfiguration: mapConfiguration, diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart index f5ba9b5b4ad..1e02f576a08 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart @@ -83,7 +83,6 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: TextDirection.ltr, - markerType: MarkerType.marker, ), ); @@ -122,7 +121,6 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: TextDirection.ltr, - markerType: MarkerType.marker, ), ); @@ -142,7 +140,6 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: TextDirection.ltr, - markerType: MarkerType.marker, ), ); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_clustering_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_clustering_test.dart index 4cbd6e240ae..1ad5c6844bc 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_clustering_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_clustering_test.dart @@ -54,7 +54,6 @@ void main() { widgetConfiguration: const MapWidgetConfiguration( initialCameraPosition: initialCameraPosition, textDirection: TextDirection.ltr, - markerType: MarkerType.marker, ), mapObjects: MapObjects( clusterManagers: clusterManagers, markers: initialMarkers))); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index 93790099503..9f90b4d93a7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -46,33 +46,37 @@ class GoogleMapController { if (markerTypes.isNotEmpty) { assert(markerTypes.length == 1, 'All markers must be of the same type.'); - switch (widgetConfiguration.markerType) { + switch (mapConfiguration.markerType) { + case null: case MarkerType.marker: assert( markerTypes.first == Marker, 'All markers must be of type Marker because ' - 'widgetConfiguration.markerType is MarkerType.legacy', + 'mapConfiguration.markerType is MarkerType.legacy', ); case MarkerType.advancedMarker: assert( markerTypes.first == AdvancedMarker, 'All markers must be of type AdvancedMarker because ' - 'widgetConfiguration.markerType is MarkerType.advanced', + 'mapConfiguration.markerType is MarkerType.advanced', ); } } // Advanced and legacy markers are handled differently so markers controller // and cluster manager need be initialized with the correct marker type. - _clusterManagersController = switch (widgetConfiguration.markerType) { + _clusterManagersController = switch (mapConfiguration.markerType) { + null || MarkerType.marker => ClusterManagersController(stream: _streamController), MarkerType.advancedMarker => ClusterManagersController( stream: _streamController), }; - _markersController = switch (widgetConfiguration.markerType) { - MarkerType.marker => MarkersController( + _markersController = switch (mapConfiguration.markerType) { + null || + MarkerType.marker => + MarkersController( stream: _streamController, clusterManagersController: _clusterManagersController! as ClusterManagersController, From b2d67c53560303cd51696db23791594ffa8de00f Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 19 Dec 2024 13:56:20 +0200 Subject: [PATCH 062/130] Fix marker type in platform implementation --- .../lib/src/google_map.dart | 1 + .../plugins/googlemaps/GoogleMapFactory.java | 2 +- .../example/lib/example_google_map.dart | 1 + .../lib/src/google_maps_flutter_android.dart | 3 -- .../lib/example_google_map.dart | 1 + .../ios/Classes/GoogleMapController.m | 4 +- .../lib/src/google_maps_flutter_ios.dart | 39 +++++++++++++++++++ 7 files changed, 45 insertions(+), 6 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index 1a4b7ce3bc4..ca40d402795 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -689,6 +689,7 @@ MapConfiguration _configurationFromMapWidget(GoogleMap map) { indoorViewEnabled: map.indoorViewEnabled, trafficEnabled: map.trafficEnabled, buildingsEnabled: map.buildingsEnabled, + markerType: map.markerType, mapId: map.mapId, // A null style in the widget means no style, which is expressed as '' in // the configuration to distinguish from no change (null). diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java index 68e235247dc..ff1352955e3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java @@ -53,6 +53,6 @@ public PlatformView create(@NonNull Context context, int id, @Nullable Object ar builder.setMapId(mapId); } - return builder.build(id, context, binaryMessenger, lifecycleProvider, params.getMarkerType()); + return builder.build(id, context, binaryMessenger, lifecycleProvider, mapConfig.getMarkerType()); } } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart index 07a7160f18f..b50df06c0b0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart @@ -608,6 +608,7 @@ MapConfiguration _configurationFromMapWidget(ExampleGoogleMap map) { indoorViewEnabled: map.indoorViewEnabled, trafficEnabled: map.trafficEnabled, buildingsEnabled: map.buildingsEnabled, + markerType: map.markerType, mapId: map.mapId, style: map.style, ); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index 6a4a97fee8d..eb2338551ce 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -663,7 +663,6 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { Set clusterManagers = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, - MarkerType markerType = MarkerType.marker, }) { return _buildView( creationId, @@ -696,7 +695,6 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { Set clusterManagers = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, - MarkerType markerType = MarkerType.marker, }) { return buildViewWithTextDirection( creationId, @@ -711,7 +709,6 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { clusterManagers: clusterManagers, gestureRecognizers: gestureRecognizers, mapOptions: mapOptions, - markerType: markerType, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart index b67419518f6..7afd2b958ec 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart @@ -604,6 +604,7 @@ MapConfiguration _configurationFromMapWidget(ExampleGoogleMap map) { indoorViewEnabled: map.indoorViewEnabled, trafficEnabled: map.trafficEnabled, buildingsEnabled: map.buildingsEnabled, + markerType: map.markerType, mapId: map.mapId, style: map.style, ); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m index cbd5f4a9d12..3aff84a98d7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m @@ -162,7 +162,7 @@ - (instancetype)initWithMapView:(GMSMapView *_Nonnull)mapView NSString *pigeonSuffix = [NSString stringWithFormat:@"%lld", viewId]; _dartCallbackHandler = [[FGMMapsCallbackApi alloc] initWithBinaryMessenger:registrar.messenger messageChannelSuffix:pigeonSuffix]; - FGMPlatformMarkerType markerType = creationParameters.markerType; + FGMPlatformMarkerTypeBox* markerType = creationParameters.mapConfiguration.markerType; _mapView.delegate = self; _mapView.paddingAdjustmentBehavior = kGMSMapViewPaddingAdjustmentBehaviorNever; _registrar = registrar; @@ -173,7 +173,7 @@ - (instancetype)initWithMapView:(GMSMapView *_Nonnull)mapView callbackHandler:_dartCallbackHandler clusterManagersController:_clusterManagersController registrar:registrar - markerType:markerType]; + markerType:markerType.value]; _polygonsController = [[FLTPolygonsController alloc] initWithMapView:_mapView callbackHandler:_dartCallbackHandler registrar:registrar]; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index a3ffab5761b..7b89857f633 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -893,6 +893,45 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { imagePixelRatio: bytes.imagePixelRatio, width: bytes.width, height: bytes.height)); + case final PinConfig pinConfig: + final int? backgroundColor = pinConfig.backgroundColor?.value; + final int? borderColor = pinConfig.borderColor?.value; + switch (pinConfig.glyph) { + case final CircleGlyph circleGlyph: + return PlatformBitmap( + bitmap: PlatformBitmapPinConfig( + backgroundColor: backgroundColor, + borderColor: borderColor, + glyphColor: circleGlyph.color.value, + ), + ); + case final TextGlyph textGlyph: + return PlatformBitmap( + bitmap: PlatformBitmapPinConfig( + backgroundColor: backgroundColor, + borderColor: borderColor, + glyphText: textGlyph.text, + glyphTextColor: textGlyph.textColor?.value, + ), + ); + case final BitmapGlyph bitmapGlyph: + return PlatformBitmap( + bitmap: PlatformBitmapPinConfig( + backgroundColor: backgroundColor, + borderColor: borderColor, + glyphBitmap: platformBitmapFromBitmapDescriptor( + bitmapGlyph.bitmap, + ), + ), + ); + default: + return PlatformBitmap( + bitmap: PlatformBitmapPinConfig( + backgroundColor: backgroundColor, + borderColor: borderColor, + ), + ); + } default: throw ArgumentError( 'Unrecognized type of bitmap ${bitmap.runtimeType}', 'bitmap'); From dee79af519be69e490396fd038d26d5b8d2ea3d5 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:04:59 +0200 Subject: [PATCH 063/130] Remove cluster renderer check --- .../plugins/googlemaps/ClusterManagersController.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java index 41b9657302e..faf37f7f3fb 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java @@ -112,12 +112,6 @@ void addClusterManager(String clusterManagerId) { */ private void initializeRenderer(ClusterManager clusterManager) { final ClusterRenderer renderer = clusterManager.getRenderer(); - if (renderer.getClass() == MarkerClusterRenderer.class - || renderer.getClass() == AdvancedMarkerClusterRenderer.class) { - // Renderer has already been initialized - return; - } - final ClusterRenderer clusterRenderer = markerType == PlatformMarkerType.ADVANCED_MARKER ? new AdvancedMarkerClusterRenderer<>(context, googleMap, clusterManager, this) From 6b0cff27795de3f5a8b024c86a55793c323c4cd8 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:17:50 +0200 Subject: [PATCH 064/130] Add comment for isAdvancedMarkersAvailable --- .../google_maps_flutter_android/pigeons/messages.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart index ef7dd49087d..b60e11f074e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart @@ -750,6 +750,10 @@ abstract class MapsApi { /// is no way to return failures from map initialization. bool didLastStyleSucceed(); + /// Returns true if this map supports advanced markers. + /// + /// This allows checking if the map supports advanced markers before + /// attempting to use them. bool isAdvancedMarkersAvailable(); /// Clears the cache of tiles previously requseted from the tile provider. From 730263020ffd307b093361928a18282c06a8ee22 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 20 Dec 2024 12:33:32 +0200 Subject: [PATCH 065/130] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 3515abab07d0bb2441277f43c2411c9b5e4ecf94 Author: Jenn Magder Date: Wed Dec 18 13:05:07 2024 -0800 Group dependabot updates for some gradle dependencies (#8100) After https://github.com/flutter/packages/pull/8048 I was expecting dependabot to update all packages given a particular dependency bump, but that doesn't seem to be happening. For example https://github.com/flutter/packages/pull/8097 only updated shared_preferences_android. So let's try adding [`groups`](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups) to see if that does it. Group some dependencies together. Fixes https://github.com/flutter/flutter/issues/148098 commit a165b43fcb0a76da4c527097c927c9cdf3f0d89a Author: jesswrd Date: Wed Dec 18 13:01:24 2024 -0800 Applied Gradle Plugins Declaratively All Remaining Example Apps (#8312) Updated applying gradle plugins from usage of imperative apply to usage of declarative blocks {} apply for plugin example apps. All other android example apps under packages have been migrated. Here are previous bulk migrations from imperative apply to declarative apply: https://github.com/flutter/packages/pull/8019 https://github.com/flutter/packages/pull/8037 Previously migrated applying path_provider plugin example app from imperatively to declaratively in this PR https://github.com/flutter/packages/pull/7822. Tests for changes in the linked PR above. More information on Flutter Gradle Pluggin Apply [here](https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply) All instances of minSdkVersion for example plugin apps use flutter.minSdkVersion instead of the hard-coded version https://github.com/flutter/packages/pull/8035. Partially addresses https://github.com/flutter/flutter/issues/152656 commit 738aecb8be3d871fa7e4c0a3c8d1bb7aab4adf5f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Dec 18 16:01:08 2024 +0000 [lifecycle]: Bump androidx.annotation:annotation from 1.7.0 to 1.9.1 in /packages/flutter_plugin_android_lifecycle/android (#7974) Bumps androidx.annotation:annotation from 1.7.0 to 1.9.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.7.0&new-version=1.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 4841b26c129361b09d868f32a3bdc222e75398ff Author: stuartmorgan Date: Wed Dec 18 08:01:05 2024 -0800 [ci] Re-enable macOS sandboxing (#8293) Revert "Disable sandboxing directly for macOS tests (#6880)", commit 4a178f1ad9004e61fc58e5e8b704cee20e0b45d2, now that the `flutter`-level changes have reached `stable`. Fixes https://github.com/flutter/flutter/issues/149844 commit bd13b367c1c2423274247ff6c95303bb770c7f2c Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Dec 18 15:45:28 2024 +0000 [espresso]: Bump com.android.tools.build:gradle from 7.4.1 to 8.7.2 in /packages/espresso/android (#8013) Bumps com.android.tools.build:gradle from 7.4.1 to 8.7.2. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.android.tools.build:gradle&package-manager=gradle&previous-version=7.4.1&new-version=8.7.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 9a435ddfe337f7c07f967ea82a23f09b08bf44e1 Author: Reid Baker Date: Wed Dec 18 10:33:37 2024 -0500 [shared_preferences] Increase minimum android endorsed version (#8318) **Bump shared preferences android version that is endorsed so that more devs pick up the security change** ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [x] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [ ] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. commit 7632d2c7acbbd6ed1151339173dbc8dc06d64d39 Author: stuartmorgan Date: Tue Dec 17 08:07:53 2024 -0800 Revert "[shared_preferences] Add shared preferences devtools" (#8314) Reverts flutter/packages#6749 This is failing the publish step: ``` Running 'build_and_copy' in shared_preferences_tool [build_and_copy] Building the extension Flutter web app... Could not find an option named "--web-renderer". Run 'flutter -h' (or 'flutter -h') for available flutter commands and options. Unhandled exception: ProcessException: Failed with exit code: 64 Command: flutter build web --web-renderer canvaskit --pwa-strategy=offline-first --release --no-tree-shake-icons #0 BuildExtensionCommand._runProcess (file:///b/s/w/ir/x/w/.pub-cache/hosted/pub.dev/devtools_extensions-0.2.2/bin/_build_and_copy.dart:134:7) #1 BuildExtensionCommand.run (file:///b/s/w/ir/x/w/.pub-cache/hosted/pub.dev/devtools_extensions-0.2.2/bin/_build_and_copy.dart:57:5) #2 CommandRunner.runCommand (package:args/command_runner.dart:212:13) #3 SharedStdIn.terminate (package:io/src/shared_stdin.dart:91:3) #4 main (file:///b/s/w/ir/x/w/.pub-cache/hosted/pub.dev/devtools_extensions-0.2.2/bin/devtools_extensions.dart:16:3) ``` commit 2fc33901afebe555266430a10f1f0b58a1ca33ae Author: adsonpleal Date: Mon Dec 16 20:48:24 2024 -0300 [shared_preferences] Add shared preferences devtools (#6749) This PR adds the shared_preferences_tools package. This package user the [devtools_extension](https://pub.dev/packages/devtools_extensions) tooling to create a tool for shared preferences. The idea of this PR came from @kenzieschmoll on this [issue](https://github.com/flutter/flutter/issues/145433). Initially I've published this tool as a [separate package](https://pub.dev/packages/shared_preferences_tools), but this PR aims to bring the functionality to the main shared_preferences package. Once this PR gets merged I'll archive the `shared_preferences_tools` package. https://github.com/flutter/packages/assets/11666470/fcf71145-c330-4397-b62e-c0c4c8bc9f01 commit 645621eb8113574be1740ff1c419c340e9d4e6b3 Author: David Iglesias Date: Mon Dec 16 14:08:52 2024 -0800 [google_adsense] Add optional init parameters. (#8297) Adds `AdSenseCodeParameters` configuration object for `adSense.initialize`. Adds a 100ms delay to `adBreak` and `showAdFn` so on tap devices, when an ad renders on top of the flutter element that triggered the ad, the pointer up event doesn't trigger the ad immediately. Fixes a typo in the `MATCHED_CONTENT_ROWS_NUM` and `MATCHED_CONTENT_COLUMNS_NUM` constants, that would have resulted in passing the wrong parameter name to the AdSense JS. Continues the tightening of exports by making all the `export`s from barrel files **explicit**, so it's harder to accidentally expose any unintended API surface. ## Issues * Continuation of: https://github.com/flutter/packages/pull/8233 * Part of: https://github.com/flutter/flutter/issues/40376 commit eb7358231e43cd3682fbc701570a25f6b1e50bd0 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Dec 16 09:26:12 2024 +0000 [dependabot]: Bump org.jetbrains.kotlin:kotlin-gradle-plugin from 1.7.10 to 2.1.0 in /packages/shared_preferences/shared_preferences_android/example/android/app (#8306) Bumps [org.jetbrains.kotlin:kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 1.7.10 to 2.1.0.
Release notes

Sourced from org.jetbrains.kotlin:kotlin-gradle-plugin's releases.

Kotlin 2.1.0

Changelog

Analysis API

New Features

  • KT-68603 KotlinDirectInheritorsProvider: add an option to ignore non-kotlin results

Performance Improvements

  • KT-70757 Performance problem in KaFirVisibilityChecker for KaFirPsiJavaClassSymbol

Fixes

  • KT-70437 Class reference is not resolvable
  • KT-57733 Analysis API: Use optimized ModuleWithDependenciesScopes in combined symbol providers
  • KT-72389 K2: False positive "Redundant 'protected' modifier" for protected property inside protected constructor from private or internal class
  • KT-69190 K2: False-positive "redundant private modifier"
  • KT-64984 Analysis API: Support Wasm target
  • KT-70375 K2: NPE at org.jetbrains.kotlin.analysis.api.fir.symbols.KaFirNamedClassSymbolBase.createPointer
  • KT-71259 K2 evaluator: Invalid smart cast info collecting for Code Fragments
  • KT-69360 Lack of implicit receiver for the last statement under lambda in scripts
  • KT-70890 Analysis API: Experiment with weak references to LL FIR/analysis sessions in session caches
  • KT-70657 Analysis API: Inner types from classes with generics are incorrectly represented by the compiled jars
  • KT-71055 Suspend calls inside 'analyze()' break the block guarantees
  • KT-70815 Analysis API: Implement stop-the-world session invalidation
  • KT-69819 K2 IDE: LHS type in callable references is unresolved when it has type arguments and is qualified
  • KT-68761 Analysis API: Experiment with limited-size cache in KaFirSessionProvider
  • KT-70384 Analysis API Standalone: The same class in the same two renamed jars is unresolved
  • KT-71067 Exceptions from references cancel Find Usages
  • KT-69535 Redesign 'containingSymbol'
  • KT-71025 K2 IDE: Scopes in "importingScopeContext" have reversed ordering and "indexInTower" values
  • KT-67483 K2 IDE: Serializable plugin causes infinite resolve recursion when there is a star import from a class with annotation call
  • KT-69416 K2 IDE / Completion: “No classifier found” on simple value creating
  • KT-70257 CCE: class kotlin.UInt cannot be cast to class java.lang.Number
  • KT-70376 K2 IDE / Kotlin Debugger: IAE “Only componentN functions should be cached this way, but got: toString” on evaluating toString() method for value class
  • KT-70264 AA: service registration via XML fails with AbstractMethodError in Lint CLI
  • KT-69950 Analysis API: Introduce isSubtypeOf(ClassId)
  • KT-68625 K2: “lazyResolveToPhase(STATUS) cannot be called from a transformer with a phase STATUS.”
  • KT-67665 K2: contract violation for value class with a constructor parameter with an implicit type
  • KT-67009 Analysis API: Add abbreviated type tests for type aliases from source modules
  • KT-69977 KaFirFunctionalType#getAbbreviation is always null
  • KT-68341 Analysis API: Expanded function types from libraries don't have an abbreviated type
  • KT-68857 Analysis API: Refactor annotations
  • KT-70386 Do not filter out overloads from different libraries in dangling files
  • KT-65552 K2: CANNOT_CHECK_FOR_ERASED in KtTypeCodeFragment
  • KT-65803 K2: Analysis API: KtFirTypeProvider#getSubstitutedSuperTypes throws an exception in the case of "Wrong number of type arguments"
  • KT-68896 Support VirtualFile binary dependency inputs to Analysis API modules
  • KT-69395 K2 IDE: incorrect overload selection from binary dependencies in a shared native source set

... (truncated)

Changelog

Sourced from org.jetbrains.kotlin:kotlin-gradle-plugin's changelog.

2.1.0

Analysis API

New Features

  • KT-68603 KotlinDirectInheritorsProvider: add an option to ignore non-kotlin results

Performance Improvements

  • KT-70757 Performance problem in KaFirVisibilityChecker for KaFirPsiJavaClassSymbol

Fixes

  • KT-70437 Class reference is not resolvable
  • KT-57733 Analysis API: Use optimized ModuleWithDependenciesScopes in combined symbol providers
  • KT-72389 K2: False positive "Redundant 'protected' modifier" for protected property inside protected constructor from private or internal class
  • KT-69190 K2: False-positive "redundant private modifier"
  • KT-64984 Analysis API: Support Wasm target
  • KT-70375 K2: NPE at org.jetbrains.kotlin.analysis.api.fir.symbols.KaFirNamedClassSymbolBase.createPointer
  • KT-71259 K2 evaluator: Invalid smart cast info collecting for Code Fragments
  • KT-69360 Lack of implicit receiver for the last statement under lambda in scripts
  • KT-70890 Analysis API: Experiment with weak references to LL FIR/analysis sessions in session caches
  • KT-70657 Analysis API: Inner types from classes with generics are incorrectly represented by the compiled jars
  • KT-71055 Suspend calls inside 'analyze()' break the block guarantees
  • KT-70815 Analysis API: Implement stop-the-world session invalidation
  • KT-69819 K2 IDE: LHS type in callable references is unresolved when it has type arguments and is qualified
  • KT-68761 Analysis API: Experiment with limited-size cache in KaFirSessionProvider
  • KT-70384 Analysis API Standalone: The same class in the same two renamed jars is unresolved
  • KT-71067 Exceptions from references cancel Find Usages
  • KT-69535 Redesign 'containingSymbol'
  • KT-71025 K2 IDE: Scopes in "importingScopeContext" have reversed ordering and "indexInTower" values
  • KT-67483 K2 IDE: Serializable plugin causes infinite resolve recursion when there is a star import from a class with annotation call
  • KT-69416 K2 IDE / Completion: “No classifier found” on simple value creating
  • KT-70257 CCE: class kotlin.UInt cannot be cast to class java.lang.Number
  • KT-70376 K2 IDE / Kotlin Debugger: IAE “Only componentN functions should be cached this way, but got: toString” on evaluating toString() method for value class
  • KT-70264 AA: service registration via XML fails with AbstractMethodError in Lint CLI
  • KT-69950 Analysis API: Introduce isSubtypeOf(ClassId)
  • KT-68625 K2: “lazyResolveToPhase(STATUS) cannot be called from a transformer with a phase STATUS.”
  • KT-67665 K2: contract violation for value class with a constructor parameter with an implicit type
  • KT-67009 Analysis API: Add abbreviated type tests for type aliases from source modules
  • KT-69977 KaFirFunctionalType#getAbbreviation is always null
  • KT-68341 Analysis API: Expanded function types from libraries don't have an abbreviated type
  • KT-68857 Analysis API: Refactor annotations
  • KT-70386 Do not filter out overloads from different libraries in dangling files
  • KT-65552 K2: CANNOT_CHECK_FOR_ERASED in KtTypeCodeFragment
  • KT-65803 K2: Analysis API: KtFirTypeProvider#getSubstitutedSuperTypes throws an exception in the case of "Wrong number of type arguments"
  • KT-68896 Support VirtualFile binary dependency inputs to Analysis API modules
  • KT-69395 K2 IDE: incorrect overload selection from binary dependencies in a shared native source set
  • KT-68573 ISE: "Unexpected constant value (kotlin/annotation/AnnotationTarget, CLASS)" at Kt1DescUtilsKt.toKtConstantValue()

... (truncated)

Commits
  • 5dd9cea Add ChangeLog for 2.1.0
  • be31f19 [Gradle] Fix documentation publishing to Kotlinlang
  • f959bf2 Add ChangeLog for 2.1.0-RC2
  • b21df7b [Gradle] Update info about versioning
  • a7dabb6 [Gradle] Fix templates extraction
  • 858b914 [Gradle] Add KDoc for KotlinTargetsDsl
  • 1026b47 [Gradle] Add KDoc for KotlinTargetWithTests
  • 54452c0 [Gradle] Add KDoc for KotlinTestRun
  • d10e47a [Gradle] Add KDoc for KotlinExecution
  • 1208eec fix: clarifications and language polishing
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.jetbrains.kotlin:kotlin-gradle-plugin&package-manager=gradle&previous-version=1.7.10&new-version=2.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 1f28a6845d4ea743beda2e280cc3d1068c9bfc1d Author: engine-flutter-autoroll Date: Fri Dec 13 19:24:21 2024 -0500 Manual roll Flutter from 6966a2eef1e9 to 29a6c648ca4d (16 revisions) (#8295) Manual roll requested by tarrinneal@google.com https://github.com/flutter/flutter/compare/6966a2eef1e9...29a6c648ca4d 2024-12-13 christopherfujino@gmail.com precompile generate_gradle_lockfile script BEFORE updating pub dependencies (flutter/flutter#160059) 2024-12-13 47866232+chunhtai@users.noreply.github.com Refactor gradle task runner to share error handler code (flutter/flutter#159452) 2024-12-13 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3c263a38f56b to f0ff4f25bda8 (1 revision) (flutter/flutter#160254) 2024-12-13 nate.w5687@gmail.com Fix `Stepper` connector not being properly displayed (flutter/flutter#160193) 2024-12-13 engine-flutter-autoroll@skia.org Roll Packages from cbdb48a0bcee to 56886ffe11ad (6 revisions) (flutter/flutter#160245) 2024-12-13 bruno.leroux@gmail.com Fix NavigationDrawerDestination backgroundColor obscures interactions (flutter/flutter#160239) 2024-12-13 engine-flutter-autoroll@skia.org Roll Flutter Engine from b9df033311cc to 3c263a38f56b (1 revision) (flutter/flutter#160238) 2024-12-13 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5eedfefe38c1 to b9df033311cc (1 revision) (flutter/flutter#160233) 2024-12-13 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9b51e30a4d37 to 5eedfefe38c1 (12 revisions) (flutter/flutter#160220) 2024-12-12 69054810+M97Chahboun@users.noreply.github.com Adds splashBorderRadius property to TabBarTheme (flutter/flutter#160046) 2024-12-12 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Force automatic ndk download when building for Android (#159756)" (flutter/flutter#160205) 2024-12-12 34871572+gmackall@users.noreply.github.com Force automatic ndk download when building for Android (flutter/flutter#159756) 2024-12-12 dkwingsmt@users.noreply.github.com Make animation and router support simulation, and use Spring for Cupertino (flutter/flutter#155575) 2024-12-12 mdebbar@google.com [web] Enable platform view benchmarks in Skwasm (flutter/flutter#160186) 2024-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0bcea845cd31 to 9b51e30a4d37 (4 revisions) (flutter/flutter#160190) 2024-12-12 andrewrkolos@gmail.com Fix analytics enabled/disabled event not being sent when the user enables/disables analytics (flutter/flutter#160060) 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 Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 2f78047265ee1e7a669f9f1e23b76d4918d7ea0e Author: jesswrd Date: Fri Dec 13 12:51:06 2024 -0800 Bump Camera Example Plugin Apps Targetsdk Versions (#8193) Bumped targetsdk versions of example app plugins for `camera`, `camera_android`, and `camera_android_camerax`. Deleted `Capture specific image resolutions` integration. The Android CameraX team confirmed the result coming from the CameraX side is correct and works as they expect. This means the supported output sizes cannot fulfill our test case assumptions. For 'camera_android_camerax', we use the automatic selection described [here](https://developer.android.com/media/camera/camerax/configuration#resolution), and it willl automatically choose, so we can't control the outcome. Even if we specify, the resolution is not gauranteed. `camera` would have the same behavior as `camera_android_camerax` because `camera`'s android implementation defaults to `camera_android_camerax` behavior. For `camera_android` we cannot choose the aspect ratio [here](https://developer.android.com/reference/android/media/CamcorderProfile#getAll%28java.lang.String,%20int%29). If there's an unsupported size, it "falls through" to the next smallest size, which means we cannot choose the final resolution. Example high quality aspect ratio [here](https://developer.android.com/reference/android/media/CamcorderProfile#QUALITY_HIGH), and logic for final resolution [here](https://github.com/flutter/packages/blob/a02deb49c1f6bcb8bb895dd67fbf36ac2c9738bd/packages/camera/camera_android/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java#L172). Fixes https://github.com/flutter/flutter/issues/154682 commit cb9ab429e7eeaa42fa443c3f2d33ce28e38138d4 Author: Álvaro Stivi Date: Fri Dec 13 15:48:57 2024 -0500 [google_adsense] Adds H5 Games Ads support to package. (#7747) This PR adds support for the H5 Games Ads (Ad Placement API) product to `package:google_adsense` through a new `h5.dart` library. Product page: * https://adsense.google.com/start/h5-games-ads JS API reference: * https://developers.google.com/ad-placement/apis ## Issues * Continuation of: https://github.com/flutter/packages/pull/6871 * Continuation of: https://github.com/flutter/packages/pull/8233 * Part of: https://github.com/flutter/flutter/issues/40376 commit c3787ff14b6f7c3291cd64fb7bca3607ea2cb60b Author: Christian Padilla Date: Fri Dec 13 13:22:20 2024 -0500 [camera_android_camerax] Remove nonnull annotation from getDefaultPointSize (#8292) The primitive float type cannot be null, so the annotation is meaningless. - [NA] I [linked to at least one issue that this PR fixes] in the description above. - [NA] I added new tests to check the change I am making, or this PR is [test-exempt]. commit 563dd2ca2a05caf5233b26c367065314189703a0 Author: Tarrin Neal Date: Fri Dec 13 07:57:12 2024 -0800 [shared_preferences] Adds Shared preferences as option in shared preferences async android (#7994) Adds the ability to select which Android preferences backend (SharedPreferences or DataStore Preferences) one would like to use. Also adds the ability to pick a file name for the shared preferences backend. fixes https://github.com/flutter/flutter/issues/153300 fixes https://github.com/flutter/flutter/issues/14337 commit 56886ffe11ad677729ffeabcba227c9ad4218635 Author: Rutvik Sanghavi Date: Fri Dec 13 07:31:54 2024 -0700 [webview_flutter_android] Allow configuration of WebView file access through `setAllowFileAccess` (#8228) This pull request updates the `webview_flutter_android` package to allow developers to configure file access permissions for WebViews on Android devices. A new method, `AndroidWebViewController.setAllowFileAccess`, has been introduced, providing developers the ability to explicitly enable or disable file access as needed. Previously, file access permissions were dependent on the platform defaults, which could potentially lead to implicit behavior or unexpected security implications. This change empowers developers to make deliberate decisions about file access based on their app’s needs and security requirements. Addresses Issue [159810](https://github.com/flutter/flutter/issues/159810) commit 4ce4a2119d3ed318606a4576b44df1713b56f875 Author: Valentin Vignal <32538273+ValentinVignal@users.noreply.github.com> Date: Fri Dec 13 12:07:17 2024 +0800 [go_router_builder] Activate leak testing (#8059) commit 5e141f0708872bacf195d75950b9e397bc652446 Author: Vitalii Date: Fri Dec 13 01:34:56 2024 +0200 [go_router] Fix a typo in a comment in the shell_route.dart (#8235) Fixed a typo in a comment in the shell_route.dart. commit a77fb8171c9e9cd7507d91f240d6bfd245128c9b Author: stuartmorgan Date: Thu Dec 12 13:48:38 2024 -0800 [ci] Update for 3.27 stable release (#8284) Updates CI with the steps from [the stable release playbook](https://github.com/flutter/flutter/blob/master/docs/ecosystem/release/Updating-Packages-repo-for-a-stable-release.md) to account for the new 3.27 stable release. commit 4bb45fcc1a843812c555095a416e03342d5a7ac9 Author: engine-flutter-autoroll Date: Thu Dec 12 15:45:18 2024 -0500 Manual roll Flutter from f559e16010a0 to 6966a2eef1e9 (5 revisions) (#8283) Manual roll requested by tarrinneal@google.com https://github.com/flutter/flutter/compare/f559e16010a0...6966a2eef1e9 2024-12-12 engine-flutter-autoroll@skia.org Roll Packages from 16616ad588d7 to cbdb48a0bcee (4 revisions) (flutter/flutter#160170) 2024-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4d8488f02cd8 to 0bcea845cd31 (1 revision) (flutter/flutter#160171) 2024-12-12 sstrickl@google.com Add entry-point annotations for test-only code. (flutter/flutter#160158) 2024-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 847deb2089a3 to 4d8488f02cd8 (2 revisions) (flutter/flutter#160165) 2024-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 92de3d0f8830 to 847deb2089a3 (2 revisions) (flutter/flutter#160134) 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 Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 2ad45023cbc4183a3ed798f0a8b2137fd2c74815 Author: engine-flutter-autoroll Date: Thu Dec 12 10:40:57 2024 -0500 Roll Flutter (stable) from dec2ee5c1f98 to 8495dee1fd4a (1318 revisions) (#8280) https://github.com/flutter/flutter/compare/dec2ee5c1f98...8495dee1fd4a If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-stable-packages Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter (stable): https://github.com/flutter/flutter/issues/new/choose To file a bug in Packages: 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 commit cbdb48a0bcee5865e6e5d29826d6f44cc1f0984d Author: engine-flutter-autoroll Date: Wed Dec 11 23:50:26 2024 -0500 Manual roll Flutter from 918b2b9ddb43 to f559e16010a0 (4 revisions) (#8277) Manual roll requested by tarrinneal@google.com https://github.com/flutter/flutter/compare/918b2b9ddb43...f559e16010a0 2024-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from e3524615fb69 to 92de3d0f8830 (1 revision) (flutter/flutter#160132) 2024-12-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from b8034f152711 to e3524615fb69 (2 revisions) (flutter/flutter#160128) 2024-12-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from ba7ad8719733 to b8034f152711 (3 revisions) (flutter/flutter#160126) 2024-12-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3cdd84160baa to ba7ad8719733 (1 revision) (flutter/flutter#160117) 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 Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 26373787d5c768a21befaec34300efb2df84cb52 Author: Tarrin Neal Date: Wed Dec 11 18:40:10 2024 -0800 disable maps test and manual roll (#8275) Disables failing test while we wait for framework to look into bug https://github.com/flutter/flutter/issues/160115 manual roll commit 8238e1c5ada8c6a99f7fb6087484b52face33721 Author: Sinyu Date: Thu Dec 12 02:57:58 2024 +0800 [quick_actions] add localizedSubtitle for iOS (#8038) Add the localizedSubtitle field on quick actions for iOS https://github.com/flutter/flutter/issues/129759 Pre-launch Checklist I read and followed the [relevant style guides](https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style) and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.) commit 374d1bef1033688165359ee7b76330139d9c3cb8 Author: Naomi Watanabe Date: Thu Dec 12 02:43:26 2024 +0900 [video_player_avfoundation] Support the audio-only HLS (.m3u8) on iOS (#7890) Supports the audio-only HLS on iOS. After through https://github.com/flutter/plugins/pull/4639 and https://github.com/flutter/plugins/pull/4727, we can play HLS videos and audios, but it does not support audio-only HLS. When attempting to play that on iOS, it never finishes initialization. Show the before/after demonstration here: https://github.com/flutter/flutter/issues/156589#issuecomment-2408846446 Fixes: https://github.com/flutter/flutter/issues/156589 Test with https://github.com/flutter/assets-for-api-docs/pull/252 commit 16616ad588d7ad9c00958ec61022e5b5dde5f5dd Author: engine-flutter-autoroll Date: Tue Dec 10 16:13:19 2024 -0500 Manual roll Flutter from ab5b20c16d56 to 456366232af9 (10 revisions) (#8264) Manual roll requested by tarrinneal@google.com https://github.com/flutter/flutter/compare/ab5b20c16d56...456366232af9 2024-12-05 ditman@gmail.com [ci] Add google_adsense to 9_first_party_packages.yml (flutter/flutter#159827) 2024-12-05 jonahwilliams@google.com [flutter_tools] configure shader compiler to output GLES3 shaders for Android. (flutter/flutter#159857) 2024-12-05 tessertaha@gmail.com Introduce Material 3 `year2023` flag to `ProgressIndicatorThemeData` (flutter/flutter#159720) 2024-12-05 tessertaha@gmail.com Updated Material 3 `Slider` Samples (flutter/flutter#159795) 2024-12-05 tessertaha@gmail.com Updated Material 3 Progress Indicators Samples (flutter/flutter#158925) 2024-12-05 andrewrkolos@gmail.com Remove some usages of package:usage (flutter/flutter#159705) 2024-12-05 anis.alibegic@gmail.com Fixed typos (flutter/flutter#159331) 2024-12-05 bruno.leroux@gmail.com Reland Fix Date picker overlay colors aren't applied on selected state (flutter/flutter#159839) 2024-12-05 mohellebiabdessalem@gmail.com fix failing lint in MainActivity.kt.tmpl (flutter/flutter#159441) 2024-12-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 05e2d6597cb2 to b4f52b275535 (1 revision) (flutter/flutter#159842) 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 Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit a02deb49c1f6bcb8bb895dd67fbf36ac2c9738bd Author: Sinyu Date: Tue Dec 10 23:59:05 2024 +0800 [quick_action_ios] add localizedSubtitle for iOS (#8149) This is prequel PR for: https://github.com/flutter/packages/pull/8038 Containing only changes to quick_action_ios package. Add the localizedSubtitle field on quick actions for iOS https://github.com/flutter/flutter/issues/129759 commit 0f1fd493b893c02ac37544cfd31f5c4f184202db Author: Camille Simon <43054281+camsim99@users.noreply.github.com> Date: Mon Dec 9 15:58:25 2024 -0500 [dependabot] Generalizes dependabot commit message prefix (#8255) Changes dependabot commit message prefix from "[gradle]" to "[dependabot]" since dependabot handles more than Gradle updates. Also updates dependabot configuration docs link since the one included didn't work for me. commit 2dc8b98a2c0da9e7f44eaed385cca98e62c3093e Author: David Iglesias Date: Mon Dec 9 11:03:04 2024 -0800 [google_adsense] Tighten exports and docs. (#8233) * **Breaking changes**: Reshuffles API exports: * Removes the `adUnit` method, and instead exports the `AdUnitWidget` directly. * Renames `experimental/google_adsense` to `experimental/ad_unit_widget.dart`. * Removes the `AdStatus` and `AdUnitParams` exports. * Removes the "stub" files, so this package is now web-only and must be used through a conditional import. * Tweaks several documentation pages to remove references to internal APIs. * Splits tests to reflect the new code structure. ## Issue * Continuation of: https://github.com/flutter/packages/pull/6871 * Part of: https://github.com/flutter/flutter/issues/40376 commit 9f6d5998784826a0741be8370c95a5ab458bba41 Author: stuartmorgan Date: Mon Dec 9 09:44:19 2024 -0800 [path_provider] Clean up Java code (#8240) Minor cleanup in the native implementation code: - Removes a utility to map from index integers to directories, which hasn't been used since the Pigeon conversion but was accidentally left. - Inlines all the implementations of path getters; many methods were pointlessly delegating their implementation to another private method, which is a relic of the pre-Pigeon structure. All of the method implementations were moved without any changes. commit ebe5367e4d31150718db4de23c0448efaa501ef9 Author: stuartmorgan Date: Mon Dec 9 09:44:17 2024 -0800 [google_sign_in] Clean up Java code (#8241) Removes the legacy public native interface to the sign-in plugin, which was inherently linked to raw method channels (which we no longer use) and the structure of the Google Sign-In native SDK (which is deprecated), so we don't want to continue supporting. I (unsurprisingly, as native->native plugin dependencies are very rare) can't find any evidence that any public plugin has ever directly used this Java code. The original use case this was added for was internal, and no longer exists (see b/158361263). The test file being deleted is specific to the legacy interface. There is already an almost-exact duplicate of that test file that tests the Pigeon interface. commit 45bcc3210fcc24011bc7f88de1ca61528d9e5cbc Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Thu Dec 5 13:54:59 2024 -0800 [various] Add Swift Package Manager integration to Google sign in example apps (#8230) This migrates the following plugins' example apps to have Swift Package Manager integration: 1. google_sign_in 2. google_sign_in_ios This also checks-in CocoaPods integration stuff that was missing. This raises the example apps' Flutter SDK requirement to 3.24.0 or higher. I will get a text exemption for this change. The example apps were migrated using the following commands: ``` dart run script/tool/bin/flutter_plugin_tools.dart build-examples --ios --swift-package-manager dart run script/tool/bin/flutter_plugin_tools.dart build-examples --macos --swift-package-manager ``` Completes: https://github.com/flutter/flutter/issues/159173 commit 824d91ab4858d16f24e010cd8691670d83ceb0f3 Author: engine-flutter-autoroll Date: Thu Dec 5 10:55:06 2024 -0500 Roll Flutter from e1e4ee9a016e to ab5b20c16d56 (7 revisions) (#8236) https://github.com/flutter/flutter/compare/e1e4ee9a016e...ab5b20c16d56 2024-12-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 8d3c71840069 to 05e2d6597cb2 (4 revisions) (flutter/flutter#159836) 2024-12-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9e8fcad4eaf6 to 8d3c71840069 (3 revisions) (flutter/flutter#159818) 2024-12-04 bkonyi@google.com Add `flutter widget-preview {start, clean}` commands (flutter/flutter#159510) 2024-12-04 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1f7f37e264b0 to 9e8fcad4eaf6 (2 revisions) (flutter/flutter#159808) 2024-12-04 engine-flutter-autoroll@skia.org Roll Flutter Engine from 29d66405e6df to 1f7f37e264b0 (2 revisions) (flutter/flutter#159805) 2024-12-04 11473691+YeungKC@users.noreply.github.com Fix: Update PopupMenu position when layout changes (flutter/flutter#157983) 2024-12-04 43054281+camsim99@users.noreply.github.com [Android] Removes dev dependency plugins from release builds (flutter/flutter#158026) 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 Please CC stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 8522c9e82f4ef0d1317d69dbc2eeadfefefce263 Author: stuartmorgan Date: Thu Dec 5 07:29:22 2024 -0500 [various] Update iOS/macOS Pigeon versions (#8226) Updates iOS and macOS plugin implementations that were still using Pigeon 10/11 to the latest version (22). This picks up some minor improvements to serialization, as well as newer dependencies that can avoid resolver issues in flutter/flutter tests (see linked issue). Most of this PR is auto-generated via the repo tool's `update-dependency` command; only minor manual updates were required (mostly to test code). Fixes https://github.com/flutter/flutter/issues/159803 commit 953c683ca2bc4d6a497ccc78d6b3e66e9fa2e287 Author: David Iglesias Date: Thu Dec 5 04:25:09 2024 -0800 [ci] Adds google_adsense to labeler.yml (#8231) Updates some CI config for `package:google_adsense`: * Configures `labeler.yaml` to add `p: google_adsense` to PRs with changes to `packages/google_adsense` * Adds me to CODEOWNERS of the package. commit 71a2e703a9de3afc450b4ffcf54064ba21cc0f4d Author: Tarrin Neal Date: Wed Dec 4 19:32:11 2024 -0800 [pigeon] adds event channel support for kotlin and swift (#7892) adds event channel support for kotlin and swift work towards https://github.com/flutter/flutter/issues/66711 adds sealed classes with extensions (empty base classes only) fixes https://github.com/flutter/flutter/issues/155859 (Fix a small inconsistency with Pigeon docs) adds some convenience methods to Root fixes generation/format tests to include test pigeons Makes swift codec class names upper camel case commit ea902186e4db7b1c91372d0b87914a74a5e68e3d Author: Vitaly Sokolov <50541317+sokoloff06@users.noreply.github.com> Date: Thu Dec 5 01:08:10 2024 +0200 [google_adsense] (Experimental) AdSense plugin for Flutter Web (#6871) Google Adsense plugin should allow Flutter Web developers to integrate Adsense more easily and monetize web project. *List which issues are fixed by this PR. You must list at least one issue.* https://github.com/flutter/flutter/issues/40376 commit 71c9e77b68367fc6d493a2d0c3a827539a31bb1f Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Wed Dec 4 14:25:08 2024 -0800 [various] Add Swift Package Manager integration to image picker examp… (#8227) This migrates the following plugins' example apps to have Swift Package Manager integration: 1. image_picker 2. image_picker_ios 3. image_picker_macos This also checks-in CocoaPods integration stuff that was missing. This raises the example apps' Flutter SDK requirement to 3.24.0 or higher. I will get a text exemption for this change. The example apps were migrated using the following commands: ``` dart run script/tool/bin/flutter_plugin_tools.dart build-examples --ios --swift-package-manager dart run script/tool/bin/flutter_plugin_tools.dart build-examples --macos --swift-package-manager ``` Part of: https://github.com/flutter/flutter/issues/159173 commit 012fae8f1dd6930d776aa602df9de8343dc25e76 Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Wed Dec 4 14:23:11 2024 -0800 [pigeon] Add Swift Package Manager integration to example app (#8225) This migrates Pigeon's example app to have Swift Package Manager integration. This raises the example apps' Flutter SDK requirement to 3.24.0 or higher. This also checks-in CocoaPods integration stuff that was missing. I will get a text exemption for this change. The example apps were migrated using the following commands: ``` dart run script/tool/bin/flutter_plugin_tools.dart build-examples --ios --swift-package-manager dart run script/tool/bin/flutter_plugin_tools.dart build-examples --macos --swift-package-manager ``` Part of: https://github.com/flutter/flutter/issues/159173 commit d34f32dfaa6ac2e0af22208e1d1116d38ba47235 Author: Paweł Jakubowski Date: Wed Dec 4 22:07:24 2024 +0100 [video_player_avfoundation] Split iOS native code into multiple files (#8171) This PR splits iOS native code into multiple files. Specifically, it extracts `FVPVideoPlayer` and `FVPFrameUpdater` from `FVPVideoPlayerPlugin.m` file, and puts them into separate files (.h and .m). This should make it easier to maintain the code and add new features in the future (e.g. support for platform views which is mentioned in [86613](https://github.com/flutter/flutter/issues/86613). In order for the code to compile, I had to add some methods to the interface of `FVPVideoPlayer`. I also added doc comments for them. No tests were added as this PR does not introduce any new functionality. Related issues: - [86613](https://github.com/flutter/flutter/issues/86613) This PR does not fix the issue, it only refactors some parts of the code, so that it is easier in the future to add support for platform views (the git diff will be cleaner when we modify the code to support it - only related changes would show up then). If you'd like me to create a new issue, specifically for splitting the native code into files, let me know. commit 264d920a4ce617436eeee46a8f5fa35d971f39c1 Author: engine-flutter-autoroll Date: Wed Dec 4 14:17:07 2024 -0500 Roll Flutter from e64ee5de7cdd to e1e4ee9a016e (18 revisions) (#8224) https://github.com/flutter/flutter/compare/e64ee5de7cdd...e1e4ee9a016e 2024-12-04 ybz975218925@gmail.com Fix `DropdownMenu` focus (flutter/flutter#156412) 2024-12-04 bkonyi@google.com Add deprecation notice for Android x86 when building for the target (flutter/flutter#159750) 2024-12-04 fluttergithubbot@gmail.com Marks Mac_benchmark flutter_view_macos__start_up to be flaky (flutter/flutter#159541) 2024-12-04 bruno.leroux@gmail.com Reland Fix InkWell overlayColor resolution ignores selected state (flutter/flutter#159784) 2024-12-04 engine-flutter-autoroll@skia.org Roll Flutter Engine from ee1b6ed65677 to 29d66405e6df (2 revisions) (flutter/flutter#159783) 2024-12-04 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1e6864c489c8 to ee1b6ed65677 (1 revision) (flutter/flutter#159778) 2024-12-04 38378650+hgraceb@users.noreply.github.com Format controller.dart of flutter_test (flutter/flutter#159667) 2024-12-04 32538273+ValentinVignal@users.noreply.github.com Add `mouseCursor` parameter to `Chip`s (flutter/flutter#159422) 2024-12-04 engine-flutter-autoroll@skia.org Roll Flutter Engine from 938f8163b526 to 1e6864c489c8 (6 revisions) (flutter/flutter#159776) 2024-12-03 katelovett@google.com Increase timeout of Devtools tests (flutter/flutter#159759) 2024-12-03 tessertaha@gmail.com Add `IconAlignment` to `ButtonStyle` and `styleFrom` methods (flutter/flutter#158503) 2024-12-03 21270878+elliette@users.noreply.github.com [Widget Inspector] Only include `truncated` field in JSON response if `true` (flutter/flutter#159701) 2024-12-03 mohellebiabdessalem@gmail.com fix fialing lint `Consider using 'register' to avoid unnecessary configuration` (flutter/flutter#159137) 2024-12-03 8218910+TheJoeSchr@users.noreply.github.com Fix typo in flutter_command.dart (flutter/flutter#159398) 2024-12-03 codefu@google.com Mark Mac_ios microbenchmarks_ios as flakey (flutter/flutter#158540) 2024-12-03 engine-flutter-autoroll@skia.org Roll Flutter Engine from c7f553eb6a30 to 938f8163b526 (1 revision) (flutter/flutter#159742) 2024-12-03 mohellebiabdessalem@gmail.com remove unnecessary semicolon in module_plugin_loader.radle (flutter/flutter#159303) 2024-12-03 737941+loic-sharma@users.noreply.github.com [SwiftPM] Rename `SWIFT_PACKAGE_MANAGER` environment variable to `FLUTTER_SWIFT_PACKAGE_MANAGER` (flutter/flutter#159502) 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 Please CC stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit bd8dafac67c2dd30abc648cbec375937099209c0 Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Wed Dec 4 10:37:15 2024 -0800 [various] Add Swift Package Manager integration to example apps (#8219) This migrates various example apps to have Swift Package Manager integration. This raises the example apps' Flutter SDK requirement to 3.24.0 or higher. I will get a text exemption for this change. The example apps were migrated using the following commands: ``` dart run script/tool/bin/flutter_plugin_tools.dart build-examples --ios --swift-package-manager dart run script/tool/bin/flutter_plugin_tools.dart build-examples --macos --swift-package-manager ``` ⚠️ The following plugins' example apps are **not* included in this change as their migration included non-SPM changes that require closer review: 1. google_sign_in 1. google_sign_in_ios 1. image_picker 1. image_picker_ios 1. image_picker_macos 1. pigeon Part of: https://github.com/flutter/flutter/issues/159173 commit 67291a378c270ba61641406c1991c0f432600307 Author: stuartmorgan Date: Wed Dec 4 10:38:57 2024 -0500 [google_maps_flutter] Annotate deprecated member usage (#8214) There are several intentional uses of deprecated members from other packages within the plugin group, so annotate them so that they don't show up in the regular team audits: - App-facing package integration tests of the deprecated style method. - Handling of deprecated marker bitmap formats. These turned up in the [routine repo audit](https://github.com/flutter/flutter/blob/main/docs/infra/Packages-Gardener-Rotation.md#deprecations). commit 74963062fb0bb244dbc4cfd1036432a132d20fb2 Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Tue Dec 3 21:28:51 2024 -0700 [pigeon] Fixes channel names of the named constructors of ProxyApis. (#8201) commit 28160caa64eaaebd300dd494720a5b1e1afd0d9c Author: stuartmorgan Date: Tue Dec 3 17:01:21 2024 -0500 [local_auth] Add compatibility with intl 0.20 (#8217) Nothing in `intl` 0.20 breaks `local_auth` usage, so expand the compatibility window to include 0.20.x for better ecosystem compatibility. Fixes https://github.com/flutter/flutter/issues/159591 commit d44156691131583f6cddf47d23655a3471ff2634 Author: stuartmorgan Date: Tue Dec 3 13:52:21 2024 -0500 [various] Replaces deprecated `whereNotNull()` (#8215) Replaces the `whereNotNull()` method from `pkg:collection` with the Dart core `nonNulls`. `nonNulls` has been available in Dart since 3.0, so no dependency or SDK requirement changes are necessary. Fixes https://github.com/flutter/flutter/issues/159738 commit bf4194590e460405a948aa39cd714e03c88ae718 Author: engine-flutter-autoroll Date: Tue Dec 3 12:00:18 2024 -0500 Roll Flutter from 08e26a3ffcd7 to e64ee5de7cdd (20 revisions) (#8213) https://github.com/flutter/flutter/compare/08e26a3ffcd7...e64ee5de7cdd 2024-12-03 engine-flutter-autoroll@skia.org Roll Flutter Engine from f9d4f744e088 to c7f553eb6a30 (1 revision) (flutter/flutter#159722) 2024-12-03 kustermann@google.com Make native asset tests more robust against flutter upgrading its pinned dependencies (flutter/flutter#159715) 2024-12-03 engine-flutter-autoroll@skia.org Roll Flutter Engine from 089071a726d5 to f9d4f744e088 (1 revision) (flutter/flutter#159713) 2024-12-03 bruno.leroux@gmail.com Fix DropdownMenu menu is detached from the text field (flutter/flutter#159665) 2024-12-03 engine-flutter-autoroll@skia.org Roll Flutter Engine from 349ad277b574 to 089071a726d5 (1 revision) (flutter/flutter#159708) 2024-12-03 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5001e2a490db to 349ad277b574 (4 revisions) (flutter/flutter#159706) 2024-12-03 engine-flutter-autoroll@skia.org Roll Flutter Engine from 05fdaa6edc12 to 5001e2a490db (6 revisions) (flutter/flutter#159702) 2024-12-02 fluttergithubbot@gmail.com Marks Linux build_tests_4_5 to be unflaky (flutter/flutter#154994) 2024-12-02 37028599+EArminjon@users.noreply.github.com doc/improve-hint-text-doc (flutter/flutter#156313) 2024-12-02 31859944+LongCatIsLooong@users.noreply.github.com Ignore exhaustiveness check for some semantics tests, for now (flutter/flutter#159517) 2024-12-02 engine-flutter-autoroll@skia.org Roll Flutter Engine from e0900f83a0c8 to 05fdaa6edc12 (9 revisions) (flutter/flutter#159694) 2024-12-02 linxunfeng@yeah.net Fix output path for --appSizeBase (flutter/flutter#158302) 2024-12-02 bkonyi@google.com [ Tool ] Fix "Error: Unable to find git in your PATH" when Command Processor `AutoRun` registry key is defined (flutter/flutter#159424) 2024-12-02 ditman@gmail.com [tool] Removes deprecated --web-renderer parameter. (flutter/flutter#159314) 2024-12-02 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1f6312df6d75 to e0900f83a0c8 (3 revisions) (flutter/flutter#159684) 2024-12-02 jmccandless@google.com iPad Scribble flicker and crash (flutter/flutter#159508) 2024-12-02 engine-flutter-autoroll@skia.org Roll Flutter Engine from d7be573a5ee5 to 1f6312df6d75 (1 revision) (flutter/flutter#159676) 2024-11-29 120297255+PurplePolyhedron@users.noreply.github.com improve `ContainerRenderObjectMixin` error message when `parentData` is not set up properly (flutter/flutter#157846) 2024-11-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from d7c0bcfe7a30 to d7be573a5ee5 (1 revision) (flutter/flutter#159595) 2024-11-28 engine-flutter-autoroll@skia.org Roll Packages from e6932b77a183 to bc0c22d57910 (2 revisions) (flutter/flutter#159592) 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 Please CC stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 15501ece235684a3bdddad089345fc3e33dc1df3 Author: stuartmorgan Date: Mon Dec 2 14:32:19 2024 -0500 [shared_preferences] Limit Android decoding (#8187) When decoding stored preferences for `List` support, only allow lists and strings to avoid potentially instantiating other object types. commit a4ac811b752571de0764b07c83031807ed9bd647 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Dec 2 17:14:48 2024 +0000 [camera_android]: Bump androidx.annotation:annotation from 1.9.0 to 1.9.1 in /packages/camera/camera_android/android (#8164) Bumps androidx.annotation:annotation from 1.9.0 to 1.9.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.9.0&new-version=1.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 6c7a61d1fc30e28edd7851ce6c558fafa0f82603 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Dec 2 09:59:24 2024 +0000 [gradle]: Bump org.jetbrains.kotlin:kotlin-gradle-plugin from 2.0.21 to 2.1.0 in /packages/pigeon/platform_tests/test_plugin/android (#8205) Bumps [org.jetbrains.kotlin:kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 2.0.21 to 2.1.0.
Release notes

Sourced from org.jetbrains.kotlin:kotlin-gradle-plugin's releases.

Kotlin 2.1.0

Changelog

Analysis API

New Features

  • KT-68603 KotlinDirectInheritorsProvider: add an option to ignore non-kotlin results

Performance Improvements

  • KT-70757 Performance problem in KaFirVisibilityChecker for KaFirPsiJavaClassSymbol

Fixes

  • KT-70437 Class reference is not resolvable
  • KT-57733 Analysis API: Use optimized ModuleWithDependenciesScopes in combined symbol providers
  • KT-72389 K2: False positive "Redundant 'protected' modifier" for protected property inside protected constructor from private or internal class
  • KT-69190 K2: False-positive "redundant private modifier"
  • KT-64984 Analysis API: Support Wasm target
  • KT-70375 K2: NPE at org.jetbrains.kotlin.analysis.api.fir.symbols.KaFirNamedClassSymbolBase.createPointer
  • KT-71259 K2 evaluator: Invalid smart cast info collecting for Code Fragments
  • KT-69360 Lack of implicit receiver for the last statement under lambda in scripts
  • KT-70890 Analysis API: Experiment with weak references to LL FIR/analysis sessions in session caches
  • KT-70657 Analysis API: Inner types from classes with generics are incorrectly represented by the compiled jars
  • KT-71055 Suspend calls inside 'analyze()' break the block guarantees
  • KT-70815 Analysis API: Implement stop-the-world session invalidation
  • KT-69819 K2 IDE: LHS type in callable references is unresolved when it has type arguments and is qualified
  • KT-68761 Analysis API: Experiment with limited-size cache in KaFirSessionProvider
  • KT-70384 Analysis API Standalone: The same class in the same two renamed jars is unresolved
  • KT-71067 Exceptions from references cancel Find Usages
  • KT-69535 Redesign 'containingSymbol'
  • KT-71025 K2 IDE: Scopes in "importingScopeContext" have reversed ordering and "indexInTower" values
  • KT-67483 K2 IDE: Serializable plugin causes infinite resolve recursion when there is a star import from a class with annotation call
  • KT-69416 K2 IDE / Completion: “No classifier found” on simple value creating
  • KT-70257 CCE: class kotlin.UInt cannot be cast to class java.lang.Number
  • KT-70376 K2 IDE / Kotlin Debugger: IAE “Only componentN functions should be cached this way, but got: toString” on evaluating toString() method for value class
  • KT-70264 AA: service registration via XML fails with AbstractMethodError in Lint CLI
  • KT-69950 Analysis API: Introduce isSubtypeOf(ClassId)
  • KT-68625 K2: “lazyResolveToPhase(STATUS) cannot be called from a transformer with a phase STATUS.”
  • KT-67665 K2: contract violation for value class with a constructor parameter with an implicit type
  • KT-67009 Analysis API: Add abbreviated type tests for type aliases from source modules
  • KT-69977 KaFirFunctionalType#getAbbreviation is always null
  • KT-68341 Analysis API: Expanded function types from libraries don't have an abbreviated type
  • KT-68857 Analysis API: Refactor annotations
  • KT-70386 Do not filter out overloads from different libraries in dangling files
  • KT-65552 K2: CANNOT_CHECK_FOR_ERASED in KtTypeCodeFragment
  • KT-65803 K2: Analysis API: KtFirTypeProvider#getSubstitutedSuperTypes throws an exception in the case of "Wrong number of type arguments"
  • KT-68896 Support VirtualFile binary dependency inputs to Analysis API modules
  • KT-69395 K2 IDE: incorrect overload selection from binary dependencies in a shared native source set

... (truncated)

Changelog

Sourced from org.jetbrains.kotlin:kotlin-gradle-plugin's changelog.

2.1.0

Analysis API

New Features

  • KT-68603 KotlinDirectInheritorsProvider: add an option to ignore non-kotlin results

Performance Improvements

  • KT-70757 Performance problem in KaFirVisibilityChecker for KaFirPsiJavaClassSymbol

Fixes

  • KT-70437 Class reference is not resolvable
  • KT-57733 Analysis API: Use optimized ModuleWithDependenciesScopes in combined symbol providers
  • KT-72389 K2: False positive "Redundant 'protected' modifier" for protected property inside protected constructor from private or internal class
  • KT-69190 K2: False-positive "redundant private modifier"
  • KT-64984 Analysis API: Support Wasm target
  • KT-70375 K2: NPE at org.jetbrains.kotlin.analysis.api.fir.symbols.KaFirNamedClassSymbolBase.createPointer
  • KT-71259 K2 evaluator: Invalid smart cast info collecting for Code Fragments
  • KT-69360 Lack of implicit receiver for the last statement under lambda in scripts
  • KT-70890 Analysis API: Experiment with weak references to LL FIR/analysis sessions in session caches
  • KT-70657 Analysis API: Inner types from classes with generics are incorrectly represented by the compiled jars
  • KT-71055 Suspend calls inside 'analyze()' break the block guarantees
  • KT-70815 Analysis API: Implement stop-the-world session invalidation
  • KT-69819 K2 IDE: LHS type in callable references is unresolved when it has type arguments and is qualified
  • KT-68761 Analysis API: Experiment with limited-size cache in KaFirSessionProvider
  • KT-70384 Analysis API Standalone: The same class in the same two renamed jars is unresolved
  • KT-71067 Exceptions from references cancel Find Usages
  • KT-69535 Redesign 'containingSymbol'
  • KT-71025 K2 IDE: Scopes in "importingScopeContext" have reversed ordering and "indexInTower" values
  • KT-67483 K2 IDE: Serializable plugin causes infinite resolve recursion when there is a star import from a class with annotation call
  • KT-69416 K2 IDE / Completion: “No classifier found” on simple value creating
  • KT-70257 CCE: class kotlin.UInt cannot be cast to class java.lang.Number
  • KT-70376 K2 IDE / Kotlin Debugger: IAE “Only componentN functions should be cached this way, but got: toString” on evaluating toString() method for value class
  • KT-70264 AA: service registration via XML fails with AbstractMethodError in Lint CLI
  • KT-69950 Analysis API: Introduce isSubtypeOf(ClassId)
  • KT-68625 K2: “lazyResolveToPhase(STATUS) cannot be called from a transformer with a phase STATUS.”
  • KT-67665 K2: contract violation for value class with a constructor parameter with an implicit type
  • KT-67009 Analysis API: Add abbreviated type tests for type aliases from source modules
  • KT-69977 KaFirFunctionalType#getAbbreviation is always null
  • KT-68341 Analysis API: Expanded function types from libraries don't have an abbreviated type
  • KT-68857 Analysis API: Refactor annotations
  • KT-70386 Do not filter out overloads from different libraries in dangling files
  • KT-65552 K2: CANNOT_CHECK_FOR_ERASED in KtTypeCodeFragment
  • KT-65803 K2: Analysis API: KtFirTypeProvider#getSubstitutedSuperTypes throws an exception in the case of "Wrong number of type arguments"
  • KT-68896 Support VirtualFile binary dependency inputs to Analysis API modules
  • KT-69395 K2 IDE: incorrect overload selection from binary dependencies in a shared native source set
  • KT-68573 ISE: "Unexpected constant value (kotlin/annotation/AnnotationTarget, CLASS)" at Kt1DescUtilsKt.toKtConstantValue()

... (truncated)

Commits
  • 5dd9cea Add ChangeLog for 2.1.0
  • be31f19 [Gradle] Fix documentation publishing to Kotlinlang
  • f959bf2 Add ChangeLog for 2.1.0-RC2
  • b21df7b [Gradle] Update info about versioning
  • a7dabb6 [Gradle] Fix templates extraction
  • 858b914 [Gradle] Add KDoc for KotlinTargetsDsl
  • 1026b47 [Gradle] Add KDoc for KotlinTargetWithTests
  • 54452c0 [Gradle] Add KDoc for KotlinTestRun
  • d10e47a [Gradle] Add KDoc for KotlinExecution
  • 1208eec fix: clarifications and language polishing
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.jetbrains.kotlin:kotlin-gradle-plugin&package-manager=gradle&previous-version=2.0.21&new-version=2.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 3458b423386e9cb0a0f421b98996bd5b91c7820f Author: engine-flutter-autoroll Date: Thu Nov 28 10:52:29 2024 -0500 Roll Flutter from fae695ed6198 to 08e26a3ffcd7 (19 revisions) (#8197) https://github.com/flutter/flutter/compare/fae695ed6198...08e26a3ffcd7 2024-11-28 bruno.leroux@gmail.com Revert "Fix InkWell overlayColor resolution ignores selected state (#159072) (flutter/flutter#159589) 2024-11-28 bruno.leroux@gmail.com Revert "Fix Date picker overlay colors aren't applied on selected sta… (flutter/flutter#159583) 2024-11-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from dd0ef5ba7d9a to d7c0bcfe7a30 (1 revision) (flutter/flutter#159579) 2024-11-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from ba112add5d98 to dd0ef5ba7d9a (2 revisions) (flutter/flutter#159574) 2024-11-28 1961493+harryterkelsen@users.noreply.github.com [web] On the web platform, use an tag to show an image if it can't be accessed with CORS (flutter/flutter#157755) 2024-11-28 60013060+azizChebbi@users.noreply.github.com Fix: Announce only the first error message for better accessibility (flutter/flutter#156399) 2024-11-27 engine-flutter-autoroll@skia.org Roll Flutter Engine from ed4e13cefb45 to ba112add5d98 (1 revision) (flutter/flutter#159563) 2024-11-27 engine-flutter-autoroll@skia.org Roll Packages from 8ecf4b010143 to e6932b77a183 (3 revisions) (flutter/flutter#159561) 2024-11-27 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4121287c360a to ed4e13cefb45 (1 revision) (flutter/flutter#159559) 2024-11-27 fluttergithubbot@gmail.com Marks Mac_benchmark hello_world_macos__compile to be flaky (flutter/flutter#159543) 2024-11-27 dacoharkes@google.com [native assets] Create `NativeAssetsManifest.json` instead of kernel embedding (flutter/flutter#159322) 2024-11-27 engine-flutter-autoroll@skia.org Roll Flutter Engine from b9474a99694c to 4121287c360a (1 revision) (flutter/flutter#159530) 2024-11-27 engine-flutter-autoroll@skia.org Roll Flutter Engine from da71729651d8 to b9474a99694c (2 revisions) (flutter/flutter#159527) 2024-11-27 engine-flutter-autoroll@skia.org Roll Flutter Engine from bd165dc27166 to da71729651d8 (7 revisions) (flutter/flutter#159523) 2024-11-27 59215665+davidhicks980@users.noreply.github.com Reland CupertinoPopupSurface (flutter/flutter#159272) 2024-11-26 58190796+MitchellGoodwin@users.noreply.github.com Suppress previous route transition if current route is fullscreenDialog (flutter/flutter#159312) 2024-11-26 engine-flutter-autoroll@skia.org Roll Flutter Engine from fe45a6608651 to bd165dc27166 (23 revisions) (flutter/flutter#159504) 2024-11-26 21270878+elliette@users.noreply.github.com [Widget Inspector] Fix stack overflow error for Flutter web when requesting a large widget tree (flutter/flutter#159454) 2024-11-26 matanlurey@users.noreply.github.com Report usage of `deferred-components` to analytics. (flutter/flutter#159307) 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 Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit bc0c22d57910047fff7569ccb4413cf031304c7d Author: Gray Mackall <34871572+gmackall@users.noreply.github.com> Date: Wed Nov 27 14:12:22 2024 -0800 [image_picker_android] Refactor interactions with ContentProvider provided filenames (#8188) https://developer.android.com/privacy-and-security/risks/untrustworthy-contentprovider-provided-filename#don%27t-trust-user-input Adapted from this option https://developer.android.com/privacy-and-security/risks/untrustworthy-contentprovider-provided-filename#sanitize-provided-filenames Based on the PR for `file_selector_android` https://github.com/flutter/packages/pull/8184. commit f7667a655bc603fa996c9b4a4c8f7f525d52eef7 Author: Gray Mackall <34871572+gmackall@users.noreply.github.com> Date: Wed Nov 27 13:29:15 2024 -0800 [file_selector_android] Refactor interactions with `ContentProvider` provided filenames (#8184) https://developer.android.com/privacy-and-security/risks/untrustworthy-contentprovider-provided-filename#don%27t-trust-user-input Adapted from this option https://developer.android.com/privacy-and-security/risks/untrustworthy-contentprovider-provided-filename#sanitize-provided-filenames commit e6932b77a183661e19136993094c3cc268900562 Author: stuartmorgan Date: Tue Nov 26 16:28:07 2024 -0500 [flutter_svg] Adopt code excerpts (#8181) Converts the README from unmanaged code examples to code excerpted from analyzed and compiled code. Part of https://github.com/flutter/flutter/issues/102679 commit 20331195daf4673832420726c7085d800a1641aa Author: Navaron Bracke Date: Tue Nov 26 22:02:06 2024 +0100 [flutter_markdown] fix invalid URI's causing unhandled image errors (#8058) This PR adds an error builder for images, so that any errors from those are caught. *List which issues are fixed by this PR. You must list at least one issue.* Fixes https://github.com/flutter/flutter/issues/158428 commit e9a6e246ffb4c433f8587e27b4d9050ca56c4676 Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Tue Nov 26 13:42:31 2024 -0700 [ci][webview_flutter_android] Manual Roll and skip tests (#8186) Manual Roll and skip failing `webview_flutter_android` test. See https://github.com/flutter/flutter/issues/159500 commit 8ecf4b010143d331461aa466f371a4f6f7f58d83 Author: stuartmorgan Date: Mon Nov 25 19:31:07 2024 -0500 [file_selector] Update Pigeon version for Linux (#8172) Updates to the latest version of Pigeon, picking up the change to make the declarations of some classes public rather than in the implementation file. Fixes https://github.com/flutter/flutter/issues/158900 commit e2e55cf72e6827da6b72c402e158adb02a5152e2 Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Mon Nov 25 11:49:14 2024 -0800 [various] Migrate example apps' AppDelegate.swift (#8155) Migrated by running: ``` dart run script/tool/bin/flutter_plugin_tools.dart build-examples --ios --swift-package-manager dart run script/tool/bin/flutter_plugin_tools.dart build-examples --macos --swift-package-manager ``` Tests aren't updated as this change should not affect semantics. I will get a test exemption. Part of https://github.com/flutter/flutter/issues/159173 commit d91f1389716bc7185f5535817185822d3ffd5d30 Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Mon Nov 25 11:11:39 2024 -0800 [various] Update example apps' .gitignore (#8156) Migrated by running: ``` dart run script/tool/bin/flutter_plugin_tools.dart build-examples --ios --swift-package-manager dart run script/tool/bin/flutter_plugin_tools.dart build-examples --macos --swift-package-manager ``` No test changes as this is a configuration change. I will get a test exemption. Part of https://github.com/flutter/flutter/issues/159173 commit e78838ec1c299e5f8f2f61301685d2e7efa5dc52 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Nov 25 18:20:04 2024 +0000 [gradle]: Bump androidx.annotation:annotation from 1.9.0 to 1.9.1 in /packages/path_provider/path_provider_android/android (#8170) Bumps androidx.annotation:annotation from 1.9.0 to 1.9.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.9.0&new-version=1.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit bc18995a266edbe0f3d1c2dad7111091e488130e Author: Fransdhinta D. Prianggoro <37843020+fransdhinta@users.noreply.github.com> Date: Mon Nov 25 22:39:07 2024 +0700 [vector_graphics_compiler] fix: handle parsing stroke-width with an invalid value (#8004) There is some issue while calling parseDouble from the original repo of this package [issue link](https://github.com/dnfield/vector_graphics/issues/209#issue-1784058965). I suggest a fix to change the return of **parseDouble** to always double.tryParse so that it will return `null` instead of throwing an error if it parses an invalid String Fixes https://github.com/flutter/flutter/issues/158819 Issue: [link](https://github.com/dnfield/vector_graphics/issues/209#issue-1784058965) commit 46aeb2b29d60d3b0492b716baaeed4c803890078 Author: Reid Baker Date: Fri Nov 22 18:53:19 2024 -0500 Update avd_cipd_version (#8135) Aligns with framework https://github.com/flutter/flutter/pull/158017/ and Engine https://github.com/flutter/engine/pull/56313 Related to b/371020223 commit 0be7cbe2517471e57a9d989daf27d725dfb46048 Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Fri Nov 22 14:10:01 2024 -0700 [interactive_media_ads] Adds internal wrapper for Android native `CompanionAdSlot` and `CompanionAdSlot.ClickListener` (#8131) commit 35f9c6e894a24a452d88472fc6fd9ff88d61cfec Author: engine-flutter-autoroll Date: Fri Nov 22 13:30:00 2024 -0500 Roll Flutter from 93d772c5cdd8 to 793569f621f7 (5 revisions) (#8152) https://github.com/flutter/flutter/compare/93d772c5cdd8...793569f621f7 2024-11-22 hello@lamnhan.dev Add `columnWidth` Property to `DataTable` for Customizable Column Widths (flutter/flutter#159279) 2024-11-22 engine-flutter-autoroll@skia.org Roll Flutter Engine from d1a08064e193 to 6f941c961b05 (5 revisions) (flutter/flutter#159308) 2024-11-22 zanderso@users.noreply.github.com Move Linux packages_autoroller to bringup (flutter/flutter#159336) 2024-11-21 166132265+dtscalac@users.noreply.github.com Fix `--web-header` flag for `flutter drive` (flutter/flutter#159039) 2024-11-21 jason-simmons@users.noreply.github.com Do a clean shutdown of the flutter_tools processes started by observatory_port_test (flutter/flutter#159169) 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 Please CC louisehsu@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 920321356e4507f1471bb00413d84b846a3c2697 Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Fri Nov 22 08:42:53 2024 -0800 Reland "[url_launcher] Add Swift Package Manager integration to example app" (#8148) Relands https://github.com/flutter/packages/pull/8128 which had been reverted due to license check errors (see https://github.com/flutter/packages/pull/8137). ### Original PR description This migrates the example app to have Swift Package Manager integration. This raises the example app's Flutter SDK requirement to 3.24.0 or higher. Scenarios: 1. **Run the example app using Flutter 3.24 or higher with SwiftPM feature on**: Plugin is added using Swift Package Manager. 2. **Run the example app using Flutter 3.24 or higher with SwiftPM feature off**: Plugin is added using CocoaPods. The tool generates an empty `FlutterGeneratedPluginSwiftPackage` local package. 3. **Run the example app using Flutter version lower than 3.24**: you get a build error because the example app's Xcode project expects a `FlutterGeneratedPluginSwiftPackage` local package but cannot find it. Part of: https://github.com/flutter/flutter/issues/159173 ### Tests Current tests build the example apps twice: once with SwiftPM on, once with SwiftPM off. Currently, the tests with SwiftPM on also migrate the example app to add SwiftPM integration. After this change, these tests will no longer need to migrate the example app as it is already migrated. In other words, this change is covered by existing tests. ### Migration steps The app was migrated using these steps: ```console flutter channel master flutter upgrade flutter config --enable-swift-package-manager flutter build ios --config-only flutter build macos --config-only ``` commit 14a822fc38781b8eb8499e54311edc689913a6ab Author: Meliksah Cakir Date: Fri Nov 22 17:42:50 2024 +0100 [webview_flutter_wkwebview] Webkit webview controller multiple registration fix (#8078) Fixes re-registering existing channels while removing Javascript channels in iOS environment. Android works as expected. Fixes https://github.com/flutter/flutter/issues/158648 commit 761812665448c7e5a1bd5810aeabfac1ac027038 Author: Sinyu <1341156974@qq.com> Date: Fri Nov 22 10:24:07 2024 +0800 [quick_actions_plaform_interface] add localizedSubtitle (#8112) This is prequel PR for: https://github.com/flutter/packages/pull/8038 Containing only changes to quick_action_platform_interface package. Add the localizedSubtitle field on quick actions for iOS https://github.com/flutter/flutter/issues/129759 commit fb8a5e17d134168b867abf4407e871db0306a183 Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Thu Nov 21 18:00:23 2024 -0800 [tools] Don't check license of generated Swift package (#8137) This updates the license check to ignore any file contained in a `FlutterGeneratedPluginSwiftPackage` directory. https://github.com/flutter/packages/pull/8128 was reverted as it caused the license check to [fail](https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8730732827684094689/+/u/Run_package_tests/license_validation/stdout): ``` The license block for these files is missing or incorrect: /b/s/w/ir/x/w/packages/packages/url_launcher/url_launcher/example/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift /b/s/w/ir/x/w/packages/packages/url_launcher/url_launcher/example/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Sources/FlutterGeneratedPluginSwiftPackage/FlutterGeneratedPluginSwiftPackage.swift /b/s/w/ir/x/w/packages/packages/url_launcher/url_launcher/example/macos/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift /b/s/w/ir/x/w/packages/packages/url_launcher/url_launcher/example/macos/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Sources/FlutterGeneratedPluginSwiftPackage/FlutterGeneratedPluginSwiftPackage.swift If this third-party code, move it to a "third_party/" directory, otherwise ensure that you are using the exact copyright and license text used by all first-party files in this repository. ``` Part of https://github.com/flutter/flutter/issues/159173 commit 0dac30a24e6689cff8c5f4b8675d9837ffb0aff3 Author: engine-flutter-autoroll Date: Thu Nov 21 18:55:14 2024 -0500 Roll Flutter from 8536b96ebb3e to 93d772c5cdd8 (37 revisions) (#8147) Roll Flutter from 8536b96ebb3e to 93d772c5cdd8 (37 revisions) https://github.com/flutter/flutter/compare/8536b96ebb3e...93d772c5cdd8 2024-11-21 bkonyi@google.com Added additional logging to `_listCoreDevices` (flutter/flutter#159275) 2024-11-21 engine-flutter-autoroll@skia.org Roll Flutter Engine from 78b87f3fe023 to d1a08064e193 (1 revision) (flutter/flutter#159280) 2024-11-21 jason-simmons@users.noreply.github.com Shut down DevTools and DDS processes if flutter_tools is killed by a signal (flutter/flutter#159238) 2024-11-21 matanlurey@users.noreply.github.com Remove `RepaintBoundary` that is no longer needed. (flutter/flutter#159232) 2024-11-21 matanlurey@users.noreply.github.com Try a speculative fix for Gradle OOMs. (flutter/flutter#159234) 2024-11-21 21270878+elliette@users.noreply.github.com On-device Widget Inspector button exits widget selection (flutter/flutter#158219) 2024-11-21 engine-flutter-autoroll@skia.org Roll Flutter Engine from 523d381893c8 to 78b87f3fe023 (2 revisions) (flutter/flutter#159270) 2024-11-21 jessiewong401@gmail.com Remove `firebase_abstract_method_smoke_test` (flutter/flutter#159145) 2024-11-21 engine-flutter-autoroll@skia.org Roll Packages from e95f6d8fce58 to 913b99ed8542 (7 revisions) (flutter/flutter#159268) 2024-11-21 engine-flutter-autoroll@skia.org Roll Flutter Engine from 69c325513a65 to 523d381893c8 (3 revisions) (flutter/flutter#159263) 2024-11-21 jonahwilliams@google.com [flutter_tools] opt iOS/macOS apps out of Metal API validation via migrator, update templates in repo. (flutter/flutter#159228) 2024-11-21 jmccandless@google.com Scribe Android handwriting text input (flutter/flutter#148784) 2024-11-21 matanlurey@users.noreply.github.com Terminate non-detached test devices on `flutter run` completion (flutter/flutter#159170) 2024-11-21 matanlurey@users.noreply.github.com Un-skip tests that use `flutter build apk`. (flutter/flutter#159231) 2024-11-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from 2d32cf3a7971 to 69c325513a65 (1 revision) (flutter/flutter#159229) 2024-11-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3828681d1f86 to 2d32cf3a7971 (3 revisions) (flutter/flutter#159226) 2024-11-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3245c8976976 to 3828681d1f86 (1 revision) (flutter/flutter#159217) 2024-11-20 matanlurey@users.noreply.github.com Add `--dry-run` to `dev/bots/test.dart`. (flutter/flutter#158956) 2024-11-20 34871572+gmackall@users.noreply.github.com Add docs for setting up Android Studio to auto format Kotlin code (flutter/flutter#159209) 2024-11-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from 80d77505fdde to 3245c8976976 (1 revision) (flutter/flutter#159214) 2024-11-20 stanleycocoa@gmail.com Fix: The enableFeedback property of InkWell cannot be set to a nullab… (flutter/flutter#158907) 2024-11-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3f19207e820e to 80d77505fdde (1 revision) (flutter/flutter#159210) 2024-11-20 engine-flutter-autoroll@skia.org Roll Packages from fc4adc78aa24 to e95f6d8fce58 (6 revisions) (flutter/flutter#159201) 2024-11-20 kustermann@google.com Remove dependency on [Target] and instead operate on [Architecture] (flutter/flutter#159196) 2024-11-20 63278936+hongeSunCoder@users.noreply.github.com Fix git command in Quality-Assurance.md (flutter/flutter#155146) 2024-11-20 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7eb87547cbc6 to 3f19207e820e (4 revisions) (flutter/flutter#159176) 2024-11-20 matanlurey@users.noreply.github.com Make `runner` non-nullable as it always is. (flutter/flutter#159156) 2024-11-19 tessertaha@gmail.com Update Material 3 `CircularProgressIndicator` for new visual style (flutter/flutter#158104) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4ff696b555dc to 7eb87547cbc6 (3 revisions) (flutter/flutter#159168) 2024-11-19 magder@google.com Add platform-android label for all flutter_tools *android* files (flutter/flutter#159166) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from d5820a638885 to 4ff696b555dc (1 revision) (flutter/flutter#159164) 2024-11-19 bernaferrari2@gmail.com Reland Add UI Benchmarks (flutter/flutter#153368) 2024-11-19 mohellebiabdessalem@gmail.com fix lint usage of `task` inside `resolve_dependecies.gradle` file (flutter/flutter#158022) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from cff1e751f853 to d5820a638885 (5 revisions) (flutter/flutter#159155) 2024-11-19 mohellebiabdessalem@gmail.com Removing redundant backticks in `flutter\packages\flutter_tools\gradle\gradle.kts` (flutter/flutter#159051) 2024-11-19 50643541+Mairramer@users.noreply.github.com Fixes initial validation with AutovalidateMode.always on first build (flutter/flutter#156708) 2024-11-19 tessertaha@gmail.com Introduce new Material 3 `Slider` shapes (flutter/flutter#152237) 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 Please CC louisehsu@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose ... commit 41c39ba587cae7ff1b9be2e8a3ad9f29c6f68d97 Author: Omar Khaled Date: Fri Nov 22 01:05:31 2024 +0200 [go_router] Fix: Consistent PopScope Handling on Root Routes issue #140869 (#8045) **Description:** This PR addresses issue [#140869](https://github.com/flutter/flutter/issues/140869) related to back button handling on root routes in `GoRouterDelegate`. The current `_findCurrentNavigator()` function only assigns `NavigatorState` when it can pop, which prevents `PopScope` and custom back button logic from triggering on root routes, especially on Android. Additionally, the `onExit` callbacks on routes requiring custom exit handling are affected. **What This PR Changes:** 1. **Modification of `_findCurrentNavigator()`**: - Removed the conditional `canPop` check, setting `state = navigatorKey.currentState;` directly to ensure `NavigatorState` is always non-null, allowing consistent `PopScope` handling on root routes. 2. **Adjustment of `popRoute()` to Preserve `onExit` Logic**: - Updated `popRoute()` to call `maybePop()` unconditionally to make sure `PopScope` can handle back button actions on root pages. - Added fallback to `onExit` logic in `popRoute()` if `maybePop()` does not handle the pop, this way, any route-specific exit callbacks are still functional. **Impact**: - **Resolves Inconsistent Back Button Handling**: The fix enables `PopScope` and back button handling on root pages without affecting nested routes or shell routes. - **Maintains `onExit` Callback Functionality**: `onExit` is invoked when `maybePop()` doesn’t handle the pop, preserving custom exit behaviors. --- commit c4fc0e0c61567d8316766e0eb8c58d456050d173 Author: LouiseHsu Date: Thu Nov 21 13:30:31 2024 -0800 [in_app_purchase_storekit] fix price displayed with wrong precision (#8127) Fixes https://github.com/flutter/flutter/issues/159080 commit 5180c03b8a0492defec2eae1677199dc29d308a7 Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Thu Nov 21 14:26:29 2024 -0700 [pigeon] Removes the `@protected` annotation from the InstanceManager field of the `PigeonInternalProxyApiBaseClass` (#8125) It's common to access the `InstanceManager` when creating platform views, so this removes the `@protected` annotation to prevent lint warnings. See https://github.com/flutter/packages/pull/7794#discussion_r1828288959 commit c55e398dad5630097be15d32625c2818d7b83142 Author: stuartmorgan Date: Thu Nov 21 13:06:16 2024 -0500 [google_maps_flutter] Use structured Pigeon data on iOS (#8142) Converts most of the maps objects that were still using pre-Pigeon JSON serializations to use structured Pigeon classes instead, mirroring the recent work in the Android implementation: - Copies the Pigeon definitions from Android, with minor modifications. - Copies the Dart conversion code and tests from Android, with minor modifications. - Updates the native code to eliminate a lot of JSON boilerplate. In addition to adding type safety, this mostly finishes addressing technical debt dating back to the initial federation of the plugin, where native code in the implementation package is relying on the JSON serialization of objects that is implemented in the platform interface package, meaning that the stringly-typed data had to match *across packages* in addition to languages. This also backports some Dart unit test improvements to the Android implementation. While bringing the test code over I noticed that the expectations were based on running the Pigeon serialization and then asserting things about the results, which I missed in review. That approach is very fragile because the Pigeon serialization is an internal implementation detail of Pigeon and subject to change at any time. Instead the tests should be using the object directly. Part of https://github.com/flutter/flutter/issues/117907 commit 913b99ed8542052266b260517bde75d549bd629f Author: Navaron Bracke Date: Thu Nov 21 02:36:53 2024 +0100 [vector_graphics] handle errors from bytes loader (#8080) This PR updates the VectorGraphicsWidget to handle errors from the underlying bytes loader using the existing error handling in its implementation. *List which issues are fixed by this PR. You must list at least one issue.* Fixes https://github.com/flutter/flutter/issues/158862 commit 013cc248b4a253bcb435c051f0b0a0b5632c9ac0 Author: derdilla <82763757+derdilla@users.noreply.github.com> Date: Thu Nov 21 02:04:14 2024 +0100 [flutter_svg] Fix SvgNetworkLoader not closing internal http client (#8126) closes https://github.com/flutter/flutter/issues/158928 Ensures that if a Client is created in `prepareMessage` it is closed after getting the resource. commit 2703b67eb4ee143f8a04a5d10cc3cf622588aa8c Author: misos1 <30872003+misos1@users.noreply.github.com> Date: Wed Nov 20 23:20:10 2024 +0100 [video_player_avfoundation] send video load failure even when eventsink was initialized late (#7194) Event `initialized` is sent from `onListenWithArguments` by calling `setupEventSinkIfReadyToPlay` if event sink was `nil` during `observeValueForKeyPath`. This change also sends failure in a similar way. Adds more details to the error message returned by `VideoPlayerController.initialize()`. - https://github.com/flutter/flutter/issues/151475 - https://github.com/flutter/flutter/issues/147707 - https://github.com/flutter/flutter/issues/56665 - now error message may look like: `Failed to load video: Operation Stopped: The server is not correctly configured.: The operation couldn’t be completed. (CoreMediaErrorDomain error -12939 - byte range and no content length - error code is 200)` Tests `testSeekToWhilePausedStartsDisplayLinkTemporarily` and `testSeekToWhilePlayingDoesNotStopDisplayLink` are failing on the main branch on ios. Seems position is correctly set to 1234 in `seekTo` completion handler but right after `[mockDisplayLink setRunning:YES]` is set again to 0 and after some time back to 1234 so those two tests sometimes fail (seems more often when running all tests). commit 1cd499ec0c7164afb6ecf951565ff30c4ee42ce5 Author: Kevin Moore Date: Wed Nov 20 13:33:24 2024 -0800 [flutter_markdown] enable Wasm support (#8120) Fix directive in widget code commit c53e5c4f37f1d6697d71f837ad1ca4e08e65e332 Author: auto-submit[bot] <98614782+auto-submit[bot]@users.noreply.github.com> Date: Wed Nov 20 21:25:26 2024 +0000 Reverts "[url_launcher] Add Swift Package Manager integration to example app (#8128)" (#8136) Reverts: flutter/packages#8128 Initiated by: loic-sharma Reason for reverting: this caused the license checker to [error](https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8730732827684094689/+/u/Run_package_tests/license_validation/stdout): ``` The license block for these files is missing or incorrect: /b/s/w/ir/x/w/packages/packages/url_launcher/url_launcher/example/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift /b Original PR Author: loic-sharma Reviewed By: {stuartmorgan} This change reverts the following previous change: This migrates the example app to have Swift Package Manager integration. This raises the example app's Flutter SDK requirement to 3.24.0 or higher. Scenarios: 1. **Run the example app using Flutter 3.24 or higher with SwiftPM feature on**: Plugin is added using Swift Package Manager. 2. **Run the example app using Flutter 3.24 or higher with SwiftPM feature off**: Plugin is added using CocoaPods. The tool generates an empty `FlutterGeneratedPluginSwiftPackage` local package. 3. **Run the example app using Flutter version lower than 3.24**: you get a build error because the example app's Xcode project expects a `FlutterGeneratedPluginSwiftPackage` local package but cannot find it. Part of: https://github.com/flutter/flutter/issues/159173 ### Tests Current tests build the example apps twice: once with SwiftPM on, once with SwiftPM off. Currently, the tests with SwiftPM on also migrate the example app to add SwiftPM integration. After this change, these tests will no longer need to migrate the example app as it is already migrated. In other words, this change is covered by existing tests. ### Migration steps The app was migrated using these steps: ```console flutter channel master flutter upgrade flutter config --enable-swift-package-manager flutter build ios --config-only flutter build macos --config-only ``` commit 59a1067db64aad91ba1b56c77d6dbc1aa5cf2481 Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Wed Nov 20 08:48:18 2024 -0800 [url_launcher] Add Swift Package Manager integration to example app (#8128) This migrates the example app to have Swift Package Manager integration. This raises the example app's Flutter SDK requirement to 3.24.0 or higher. Scenarios: 1. **Run the example app using Flutter 3.24 or higher with SwiftPM feature on**: Plugin is added using Swift Package Manager. 2. **Run the example app using Flutter 3.24 or higher with SwiftPM feature off**: Plugin is added using CocoaPods. The tool generates an empty `FlutterGeneratedPluginSwiftPackage` local package. 3. **Run the example app using Flutter version lower than 3.24**: you get a build error because the example app's Xcode project expects a `FlutterGeneratedPluginSwiftPackage` local package but cannot find it. Part of: https://github.com/flutter/flutter/issues/159173 ### Tests Current tests build the example apps twice: once with SwiftPM on, once with SwiftPM off. Currently, the tests with SwiftPM on also migrate the example app to add SwiftPM integration. After this change, these tests will no longer need to migrate the example app as it is already migrated. In other words, this change is covered by existing tests. ### Migration steps The app was migrated using these steps: ```console flutter channel master flutter upgrade flutter config --enable-swift-package-manager flutter build ios --config-only flutter build macos --config-only ``` commit 0d92794cecdf9e4d3093983bedbc7d0531dced17 Author: stuartmorgan Date: Wed Nov 20 11:34:08 2024 -0500 [pigeon] Enable example app build in CI (#8119) Removes example/pubspec.yaml, which is no longer needed since the excerpt system was rewritten not to use `build_runner`, so that the repo tooling recognizes `example/app/` as the actual example, enabling all the standard CI steps (build example for each platform, run integration test, etc.) to run for it. commit e95f6d8fce589a6dfbd8ceb6f2ddaa537ec2b2e6 Author: LouiseHsu Date: Tue Nov 19 15:42:58 2024 -0800 [in_app_purchase_storekit] disallow ios versions lower than supported from enabling storekit (#8110) Fixes https://github.com/flutter/flutter/issues/158894 Checks device version before enabling storekit 2. commit fc80137ff42a6957f8bac91c8a310776c939ffd7 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Nov 19 23:05:33 2024 +0000 [interactive_media_ads]: Bump com.google.ads.interactivemedia.v3:interactivemedia from 3.35.1 to 3.36.0 in /packages/interactive_media_ads/android (#8046) Bumps com.google.ads.interactivemedia.v3:interactivemedia from 3.35.1 to 3.36.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.google.ads.interactivemedia.v3:interactivemedia&package-manager=gradle&previous-version=3.35.1&new-version=3.36.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 1bbf83bfba8bd8335d46e678b77e6b0d254f5b7b Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Nov 19 20:27:58 2024 +0000 [interactive_media_ads]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.1 in /packages/interactive_media_ads/android (#7980) Bumps androidx.annotation:annotation from 1.8.2 to 1.9.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.8.2&new-version=1.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 6003bfebfe0d1ef6e587424025c48c0b1b03e256 Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Tue Nov 19 13:16:07 2024 -0700 [webview_flutter_android] Updates plugin to use `ProxyApis`s (#7794) commit 0e73a05715f61ccfcab25fd08aab2cb26370603b Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Tue Nov 19 12:37:23 2024 -0700 [interactive_media_ads] Adds support to define parameters that control the rendering of ads (#8057) Changes `PlatformAdsManager.init(AdsManagerInitParams)` to the correct shared `PlatformAdsManager.init(PlatformAdsRenderingSettings?)` feature. **Android:** https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/api/reference/com/google/ads/interactivemedia/v3/api/BaseManager.html#init(com.google.ads.interactivemedia.v3.api.AdsRenderingSettings) **iOS:** https://developers.google.com/interactive-media-ads/docs/sdks/ios/client-side/reference/Classes/IMAAdsManager#/c:objc(cs)IMAAdsManager(im)initializeWithAdsRenderingSettings: The platform interface and implementation aren't exposed yet, so this change should not be breaking. Fixes https://github.com/flutter/flutter/issues/152253 commit fb3a936b275e91676312a29e727c38536d0296be Author: engine-flutter-autoroll Date: Tue Nov 19 13:26:08 2024 -0500 Roll Flutter from b3818f6b5979 to 8536b96ebb3e (22 revisions) (#8124) https://github.com/flutter/flutter/compare/b3818f6b5979...8536b96ebb3e 2024-11-19 matanlurey@users.noreply.github.com Terminate `flutter test` when no longer needed in integration test. (flutter/flutter#159117) 2024-11-19 matanlurey@users.noreply.github.com Terminate the test device if the `flutter` tool is signal-killed. (flutter/flutter#159115) 2024-11-19 engine-flutter-autoroll@skia.org Roll Packages from c1eabf5e32cc to fc4adc78aa24 (10 revisions) (flutter/flutter#159143) 2024-11-19 reidbaker@google.com Deflake api 35 emulator tests by updating emulator definitions version to latest available from chrome infra (flutter/flutter#158017) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from b6723e33b858 to cff1e751f853 (1 revision) (flutter/flutter#159141) 2024-11-19 bruno.leroux@gmail.com Fix InkWell overlayColor resolution ignores selected state (flutter/flutter#159072) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from 983b7b85d122 to b6723e33b858 (3 revisions) (flutter/flutter#159134) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from c1b0e18a70b3 to 983b7b85d122 (2 revisions) (flutter/flutter#159124) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from 878f593802e1 to c1b0e18a70b3 (13 revisions) (flutter/flutter#159118) 2024-11-19 737941+loic-sharma@users.noreply.github.com [SwiftPM] Move where the migration checks feature flags (flutter/flutter#159110) 2024-11-18 gspencergoog@users.noreply.github.com Plumbs `scrollBehavior` into `SelectableText` so that the scrollbar may be hidden (flutter/flutter#158887) 2024-11-18 matanlurey@users.noreply.github.com Add a tag and assert some state in FlutterTestDriver tests. (flutter/flutter#159099) 2024-11-18 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.6.0 to 5.0.2 in the all-github-actions group (flutter/flutter#159104) 2024-11-18 nate.w5687@gmail.com Add `@protected` to public `State` method overrides (flutter/flutter#157313) 2024-11-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9686de154114 to 878f593802e1 (5 revisions) (flutter/flutter#159097) 2024-11-18 bkonyi@google.com Fix flaky failure related to core_device_list.json not being found (flutter/flutter#158946) 2024-11-18 katelovett@google.com Prettier merge_queue.md (flutter/flutter#158969) 2024-11-18 matanlurey@users.noreply.github.com Define and use `flutterBin` consistently across `integration.shard`. (flutter/flutter#159007) 2024-11-18 matanlurey@users.noreply.github.com No longer download `android-x86-jit-release`. (flutter/flutter#159011) 2024-11-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from e1f4e7d9bfc4 to 9686de154114 (1 revision) (flutter/flutter#159082) 2024-11-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from f365c9f5dce3 to e1f4e7d9bfc4 (4 revisions) (flutter/flutter#159078) 2024-11-18 engine-flutter-autoroll@skia.org Roll Packages from b164be312ca2 to c1eabf5e32cc (6 revisions) (flutter/flutter#159077) 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 Please CC louisehsu@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit fc4adc78aa2417fad51c776dc54cc35115635080 Author: Jenn Magder Date: Mon Nov 18 15:37:04 2024 -0800 [ci] Take screenshot when native drive test is taking longer than 10 minutes (#8050) If the `flutter test` run takes more than 10 minutes (default timeout is 12 minutes) take a screenshot and attach to the logs directory. Helped debug https://github.com/flutter/flutter/issues/153578#issuecomment-2465941063. Probably `flutter test` should have a screenshot option similar to `flutter drive`, but at the moment it doesn't. commit afb1aff77198240a1efd7b772beb31c73fa41397 Author: jesswrd Date: Mon Nov 18 15:51:25 2024 -0600 Applied Gradle Plugins Declaratively for Most Remaining Plugin Example Apps (Part 3) (#8037) Updated applying gradle plugins from usage of imperative apply to usage of declarative blocks {} apply for 25 remaining plugin example apps. Intending on updating all android example apps under packages. Here are previous bulk migrations from imperative apply to declarative apply: https://github.com/flutter/packages/pull/7968 https://github.com/flutter/packages/pull/8019 Previously migrated applying path_provider plugin example app from imperatively to declaratively in this PR [here](https://github.com/flutter/packages/pull/7822). Tests for changes in the linked PR above. More information on Flutter Gradle Pluggin Apply [here](https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply) All instances of `minSdkVersion` for example plugin apps use `flutter.minSdkVersion` instead of the hard-coded version https://github.com/flutter/packages/pull/8035. Partially addresses [#152656](https://github.com/flutter/flutter/issues/152656) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [x] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests commit 237846b7634853f08099f6e84efa735ea0a7443f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Nov 18 17:27:03 2024 +0000 [pigeon]: Bump org.jetbrains.kotlin:kotlin-bom from 1.8.10 to 2.0.21 in /packages/pigeon/platform_tests/test_plugin/android (#7867) Bumps [org.jetbrains.kotlin:kotlin-bom](https://github.com/JetBrains/kotlin) from 1.8.10 to 2.0.21.
Release notes

Sourced from org.jetbrains.kotlin:kotlin-bom's releases.

Kotlin 2.0.21

Changelog

Apple Ecosystem

Backend. Native. Debug

  • KT-71374 lldb: step out breaks breaking in Xcode 16

Compiler

Fixes

  • KT-69735 K2: Static fields are missing from the declaration list of corresponding IrClass for java class
  • KT-71122 Regression in Kotlin Compiler 2.0 causing NPE in the runtime
  • KT-70931 K2 / Scripts: "cannot convert IrExpression to ConstantValue" when using function annotation
  • KT-70584 K2: "IllegalStateException: flow for PostponedLambdaExitNode not initialized - traversing nodes in wrong order?"
  • KT-70808 K2: "node has already been visited" with anonymous object in dead code
  • KT-69985 K2: Classifier declarations from root package are resolved without imports in non-root packages
  • KT-70683 K2: Internal compiler error in IrFakeOverrideSymbolBase.getOwner
  • KT-70901 False positive Public-API inline function cannot access non-public-API property accessor
  • KT-70930 K2: Java annotations not present on ENUM_ENTRY IR elements
  • KT-70194 K2 IDE: exception on a very red file
  • KT-69399 Native: IllegalStateException: "Failed to build cache"

Compose compiler

Fixes

  • b/329477544 Force open / overridden Composable functions to be non-restartable.
  • b/361652128 Disable live literal transform if the corresponding flag is disabled

IR. Actualizer

  • KT-70894 IR crash. Unprocessed IrFunctionFakeOverrideSymbol when actualize to Java

IR. Tree

  • KT-71191 SymbolTable: Check if the provided signature is public before adding a symbol to the SymbolTable

Native. Build Infrastructure

  • KT-71485 K/N runtime parts don't build due to _Float16 issues on x86_64 macOS

Native. C Export

  • KT-69507 LLVM 11 clang with Xcode 16 headers: standard c++ headers

Native. C and ObjC Import

  • KT-71029 Investigate why stdarg.h declarations leak into testModuleA

Native. Platform Libraries

  • KT-70566 LLVM 11 clang with Xcode 16 headers: 'sys/cdefs.h' file not found
  • KT-71624 Eliminate remaining UIKit/AppKit removed signatures
  • KT-70031 Rebuild platform libraries in 2.0.21 with Xcode 16

Native. Testing

  • KT-70603 C++ with -fmodules: cyclic dependency in module 'std': std -> _wctype -> __wctype -> std in dev llvm toolchains

Tools. CLI. Native

  • KT-71262 KotlinNativeLink tasks fetching from network despite -Xoverride-konan-properties=dependenciesUrl= being set

Tools. Compiler Plugins

  • KT-71038 PowerAssert: Constant on RHS of elvis operator leads to compiler crash

Tools. Daemon

  • KT-35381 Get rid of the native-platform usage in kotlin compiler

Tools. Gradle. Multiplatform

  • KT-71444 Certain POMs produced by Kotlin 2.0.20 cannot be consumed by KMP projects with Android targets
  • KT-70700 Gradle 8.10: The value for task ':commonizeNativeDistribution' property 'kotlinNativeBundleBuildService' cannot be changed any further
  • KT-71396 Gradle client side JVM explodes with OOM due to xcodebuild logs

Tools. Gradle. Native

... (truncated)

Changelog

Sourced from org.jetbrains.kotlin:kotlin-bom's changelog.

2.0.21-RC

Apple Ecosystem

Backend. Native. Debug

  • KT-71374 lldb: step out breaks breaking in Xcode 16

Compiler

Fixes

  • KT-69735 K2: Static fields are missing from the declaration list of corresponding IrClass for java class
  • KT-71122 Regression in Kotlin Compiler 2.0 causing NPE in the runtime
  • KT-70931 K2 / Scripts: "cannot convert IrExpression to ConstantValue" when using function annotation
  • KT-70584 K2: "IllegalStateException: flow for PostponedLambdaExitNode not initialized - traversing nodes in wrong order?"
  • KT-70808 K2: "node has already been visited" with anonymous object in dead code
  • KT-69985 K2: Classifier declarations from root package are resolved without imports in non-root packages
  • KT-70683 K2: Internal compiler error in IrFakeOverrideSymbolBase.getOwner
  • KT-70901 False positive Public-API inline function cannot access non-public-API property accessor
  • KT-70930 K2: Java annotations not present on ENUM_ENTRY IR elements
  • KT-70194 K2 IDE: exception on a very red file
  • KT-69399 Native: IllegalStateException: "Failed to build cache"

Compose compiler

Fixes

  • b/329477544 Force open / overridden Composable functions to be non-restartable.
  • b/361652128 Disable live literal transform if the corresponding flag is disabled

IR. Actualizer

  • KT-70894 IR crash. Unprocessed IrFunctionFakeOverrideSymbol when actualize to Java

IR. Tree

  • KT-71191 SymbolTable: Check if the provided signature is public before adding a symbol to the SymbolTable

Native. Build Infrastructure

  • KT-71485 K/N runtime parts don't build due to _Float16 issues on x86_64 macOS

Native. C Export

  • KT-69507 LLVM 11 clang with Xcode 16 headers: standard c++ headers

Native. C and ObjC Import

... (truncated)

Commits
  • 284e9b4 Add ChangeLog for 2.0.21-RC
  • 38084f0 Enable source information for getters and other special-named functions
  • 9fcd247 Move source information of default parameters to the default group
  • 4bad11d Add source markers to @​ExplicitGroupsComposable
  • fcc1075 Bump IntelliJ platform to 233.13135.128
  • 1499254 [FIR2IR] Add static fields to the list of declarations of lazy IR java class
  • 8f121bc Derelocate NSTextAttachment and NSTextContainer methods
  • cc0919d Allow using categories in the def file to reintroduce methods in the class
  • b1504e7 [IC] Add synchronized clean methods to storage classes
  • 273abb8 Derelocate deprecated DOMElement APIs
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.jetbrains.kotlin:kotlin-bom&package-manager=gradle&previous-version=1.8.10&new-version=2.0.21)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 44a1745a862b528c323fe0e6aa1e95f5e3a24dde Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Nov 18 17:27:01 2024 +0000 [gradle]: Bump androidx.test.ext:junit-ktx from 1.1.5 to 1.2.1 in /packages/shared_preferences/shared_preferences_android/android (#8097) Bumps androidx.test.ext:junit-ktx from 1.1.5 to 1.2.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.test.ext:junit-ktx&package-manager=gradle&previous-version=1.1.5&new-version=1.2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 0cc2ca226fe214841f18f3fca355612a1b4ba948 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Nov 18 17:23:51 2024 +0000 [pigeon]: Bump org.jetbrains.kotlin:kotlin-gradle-plugin from 2.0.20 to 2.0.21 in /packages/pigeon/platform_tests/test_plugin/android (#7869) Bumps [org.jetbrains.kotlin:kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 2.0.20 to 2.0.21.
Release notes

Sourced from org.jetbrains.kotlin:kotlin-gradle-plugin's releases.

Kotlin 2.0.21

Changelog

Apple Ecosystem

Backend. Native. Debug

  • KT-71374 lldb: step out breaks breaking in Xcode 16

Compiler

Fixes

  • KT-69735 K2: Static fields are missing from the declaration list of corresponding IrClass for java class
  • KT-71122 Regression in Kotlin Compiler 2.0 causing NPE in the runtime
  • KT-70931 K2 / Scripts: "cannot convert IrExpression to ConstantValue" when using function annotation
  • KT-70584 K2: "IllegalStateException: flow for PostponedLambdaExitNode not initialized - traversing nodes in wrong order?"
  • KT-70808 K2: "node has already been visited" with anonymous object in dead code
  • KT-69985 K2: Classifier declarations from root package are resolved without imports in non-root packages
  • KT-70683 K2: Internal compiler error in IrFakeOverrideSymbolBase.getOwner
  • KT-70901 False positive Public-API inline function cannot access non-public-API property accessor
  • KT-70930 K2: Java annotations not present on ENUM_ENTRY IR elements
  • KT-70194 K2 IDE: exception on a very red file
  • KT-69399 Native: IllegalStateException: "Failed to build cache"

Compose compiler

Fixes

  • b/329477544 Force open / overridden Composable functions to be non-restartable.
  • b/361652128 Disable live literal transform if the corresponding flag is disabled

IR. Actualizer

  • KT-70894 IR crash. Unprocessed IrFunctionFakeOverrideSymbol when actualize to Java

IR. Tree

  • KT-71191 SymbolTable: Check if the provided signature is public before adding a symbol to the SymbolTable

Native. Build Infrastructure

  • KT-71485 K/N runtime parts don't build due to _Float16 issues on x86_64 macOS

Native. C Export

  • KT-69507 LLVM 11 clang with Xcode 16 headers: standard c++ headers

Native. C and ObjC Import

  • KT-71029 Investigate why stdarg.h declarations leak into testModuleA

Native. Platform Libraries

  • KT-70566 LLVM 11 clang with Xcode 16 headers: 'sys/cdefs.h' file not found
  • KT-71624 Eliminate remaining UIKit/AppKit removed signatures
  • KT-70031 Rebuild platform libraries in 2.0.21 with Xcode 16

Native. Testing

  • KT-70603 C++ with -fmodules: cyclic dependency in module 'std': std -> _wctype -> __wctype -> std in dev llvm toolchains

Tools. CLI. Native

  • KT-71262 KotlinNativeLink tasks fetching from network despite -Xoverride-konan-properties=dependenciesUrl= being set

Tools. Compiler Plugins

  • KT-71038 PowerAssert: Constant on RHS of elvis operator leads to compiler crash

Tools. Daemon

  • KT-35381 Get rid of the native-platform usage in kotlin compiler

Tools. Gradle. Multiplatform

  • KT-71444 Certain POMs produced by Kotlin 2.0.20 cannot be consumed by KMP projects with Android targets
  • KT-70700 Gradle 8.10: The value for task ':commonizeNativeDistribution' property 'kotlinNativeBundleBuildService' cannot be changed any further
  • KT-71396 Gradle client side JVM explodes with OOM due to xcodebuild logs

Tools. Gradle. Native

... (truncated)

Changelog

Sourced from org.jetbrains.kotlin:kotlin-gradle-plugin's changelog.

2.0.21-RC

Apple Ecosystem

Backend. Native. Debug

  • KT-71374 lldb: step out breaks breaking in Xcode 16

Compiler

Fixes

  • KT-69735 K2: Static fields are missing from the declaration list of corresponding IrClass for java class
  • KT-71122 Regression in Kotlin Compiler 2.0 causing NPE in the runtime
  • KT-70931 K2 / Scripts: "cannot convert IrExpression to ConstantValue" when using function annotation
  • KT-70584 K2: "IllegalStateException: flow for PostponedLambdaExitNode not initialized - traversing nodes in wrong order?"
  • KT-70808 K2: "node has already been visited" with anonymous object in dead code
  • KT-69985 K2: Classifier declarations from root package are resolved without imports in non-root packages
  • KT-70683 K2: Internal compiler error in IrFakeOverrideSymbolBase.getOwner
  • KT-70901 False positive Public-API inline function cannot access non-public-API property accessor
  • KT-70930 K2: Java annotations not present on ENUM_ENTRY IR elements
  • KT-70194 K2 IDE: exception on a very red file
  • KT-69399 Native: IllegalStateException: "Failed to build cache"

Compose compiler

Fixes

  • b/329477544 Force open / overridden Composable functions to be non-restartable.
  • b/361652128 Disable live literal transform if the corresponding flag is disabled

IR. Actualizer

  • KT-70894 IR crash. Unprocessed IrFunctionFakeOverrideSymbol when actualize to Java

IR. Tree

  • KT-71191 SymbolTable: Check if the provided signature is public before adding a symbol to the SymbolTable

Native. Build Infrastructure

  • KT-71485 K/N runtime parts don't build due to _Float16 issues on x86_64 macOS

Native. C Export

  • KT-69507 LLVM 11 clang with Xcode 16 headers: standard c++ headers

Native. C and ObjC Import

... (truncated)

Commits
  • 284e9b4 Add ChangeLog for 2.0.21-RC
  • 38084f0 Enable source information for getters and other special-named functions
  • 9fcd247 Move source information of default parameters to the default group
  • 4bad11d Add source markers to @​ExplicitGroupsComposable
  • fcc1075 Bump IntelliJ platform to 233.13135.128
  • 1499254 [FIR2IR] Add static fields to the list of declarations of lazy IR java class
  • 8f121bc Derelocate NSTextAttachment and NSTextContainer methods
  • cc0919d Allow using categories in the def file to reintroduce methods in the class
  • b1504e7 [IC] Add synchronized clean methods to storage classes
  • 273abb8 Derelocate deprecated DOMElement APIs
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.jetbrains.kotlin:kotlin-gradle-plugin&package-manager=gradle&previous-version=2.0.20&new-version=2.0.21)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 4880077c73ee9a8944a2486dcc2c2dc0f8d89ac7 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Nov 18 17:23:48 2024 +0000 [gradle]: Bump org.hamcrest:hamcrest from 2.2 to 3.0 in /packages/espresso/android (#8092) Bumps [org.hamcrest:hamcrest](https://github.com/hamcrest/JavaHamcrest) from 2.2 to 3.0.
Release notes

Sourced from org.hamcrest:hamcrest's releases.

Hamcrest v3.0

Breaking Changes

  • From version 3.0, the jar distributed to Maven Central is now compiled to Java 1.8 bytecode, and is not compatible with previous versions of Java. See [Issue #331](hamcrest/JavaHamcrest#331) and [PR #411](hamcrest/JavaHamcrest#411) for details. Developers who use Java 1.7 earlier can still depend upon hamcrest-2.2.jar.

Improvements

Hamcrest v3.0-rc1

Breaking Changes

  • From version 3.0, the jar distributed to Maven Central is now compiled to Java 1.8 bytecode, and is not compatible with previous versions of Java. See [Issue #331](hamcrest/JavaHamcrest#331) and [PR #411](hamcrest/JavaHamcrest#411) for details. Developers who use Java 1.7 earlier can still depend upon hamcrest-2.2.jar.

Improvements

Changelog

Sourced from org.hamcrest:hamcrest's changelog.

Version 3.0 (1st August 2024)

Breaking Changes

  • From version 3.0, the jar distributed to Maven Central is now compiled to Java 1.8 bytecode, and is not compatible with previous versions of Java. See [Issue #331](hamcrest/JavaHamcrest#331) and [PR #411](hamcrest/JavaHamcrest#411) for details. Developers who use Java 1.7 earlier can still depend upon hamcrest-2.2.jar.

Improvements

Commits
  • 68984b8 Version 3.0
  • 1adc351 Fix javadoc title
  • 4e2b71c Add instructions for releasing to Maven Central
  • 3fa841d Revert version to 3.0-SNAPSHOT
  • 750dc36 Prepare for version 3.0-rc1
  • 1703e95 Fix broken tutorial link in README
  • c4578ef Upgrade Gradle 8.8 -> 8.9
  • a9923af Remove old, unused build definitions
  • cf25e14 Cleanup README, fix broken links
  • bc4769e Upgrade to GitHub-native Dependabot (#342)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.hamcrest:hamcrest&package-manager=gradle&previous-version=2.2&new-version=3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 6f8613dd991f31c98ac12b406b5c258e9cf213f8 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Nov 18 17:23:45 2024 +0000 [pigeon]: Bump io.mockk:mockk from 1.13.12 to 1.13.13 in /packages/pigeon/platform_tests/test_plugin/android (#7868) Bumps [io.mockk:mockk](https://github.com/mockk/mockk) from 1.13.12 to 1.13.13.
Release notes

Sourced from io.mockk:mockk's releases.

1.13.13

What's Changed

New Contributors

Full Changelog: https://github.com/mockk/mockk/compare/1.13.11...1.13.13

Commits
  • a81fe33 Version bump
  • edf9f95 Merge pull request #1297 from erikhuizinga/erikhuizinga-bench-junit-api
  • ba215b8 Merge pull request #1298 from MGaetan89/update_calls_bounds_msg
  • c841e51 Improve error message on unexpected calls count
  • 6688d6a Respect JUnit 5 test instance lifecycle
  • 7314083 Add Gradle wrapper validation
  • 92d1d0d Dump API
  • e1c2de7 Reformat
  • 9f1c5b2 Unmock after each test
  • b1d3dc0 Benchmark clearAllMocks and unmockkAll
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=io.mockk:mockk&package-manager=gradle&previous-version=1.13.12&new-version=1.13.13)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit fe887cb7987b4887ad0b35f3b786be04ba9920af Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Nov 18 17:22:12 2024 +0000 [shared_pref]: Bump io.mockk:mockk from 1.13.12 to 1.13.13 in /packages/shared_preferences/shared_preferences_android/android (#7866) Bumps [io.mockk:mockk](https://github.com/mockk/mockk) from 1.13.12 to 1.13.13.
Release notes

Sourced from io.mockk:mockk's releases.

1.13.13

What's Changed

New Contributors

Full Changelog: https://github.com/mockk/mockk/compare/1.13.11...1.13.13

Commits
  • a81fe33 Version bump
  • edf9f95 Merge pull request #1297 from erikhuizinga/erikhuizinga-bench-junit-api
  • ba215b8 Merge pull request #1298 from MGaetan89/update_calls_bounds_msg
  • c841e51 Improve error message on unexpected calls count
  • 6688d6a Respect JUnit 5 test instance lifecycle
  • 7314083 Add Gradle wrapper validation
  • 92d1d0d Dump API
  • e1c2de7 Reformat
  • 9f1c5b2 Unmock after each test
  • b1d3dc0 Benchmark clearAllMocks and unmockkAll
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=io.mockk:mockk&package-manager=gradle&previous-version=1.13.12&new-version=1.13.13)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit a076baea2f16d4a5eefc5e511ace69c5261ef370 Author: Jenn Magder Date: Mon Nov 18 09:08:16 2024 -0800 Add autosubmit label to dependabot PRs (#8101) The [flutter/flutter](https://github.com/flutter/flutter/blob/09941e7b4781b81adeb7bce8b389e5b8b45325ca/.github/dependabot.yml#L19) and [flutter/engine](https://github.com/flutter/engine/blob/5f8e6e465584599bef234b5fea4320cf78041cc2/.github/dependabot.yml#L12-L13) repo put the `autosubmit` label on dependabot PRs so if all checks pass then no review is necessary and it will merge. For example, https://github.com/flutter/flutter/pull/156024 merged without any human intervention. In packages this is rarer (due to CHANGELOG and version bumps), but still happens, for example https://github.com/flutter/packages/pull/8097 bumps a `testImplementation` dependency and passed all checks. Add `autosubmit` to the packages repo for dependabot PRs so if all checks pass they just merge. If checks don't pass, the bot will remove the label and we'll be back to manual review required. commit 7b6583c8dc0efb8edac3bc1f7e4f5db9fba19c3e Author: engine-flutter-autoroll Date: Mon Nov 18 10:50:57 2024 -0500 Roll Flutter from 0e2d55e0e7b2 to b3818f6b5979 (23 revisions) (#8118) https://github.com/flutter/flutter/compare/0e2d55e0e7b2...b3818f6b5979 2024-11-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from a63841d0c64b to f365c9f5dce3 (1 revision) (flutter/flutter#159064) 2024-11-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4878f1c9ed1c to a63841d0c64b (8 revisions) (flutter/flutter#159057) 2024-11-17 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4c1eb8cacb95 to 4878f1c9ed1c (1 revision) (flutter/flutter#159050) 2024-11-17 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9d0720a7b0ec to 4c1eb8cacb95 (1 revision) (flutter/flutter#159049) 2024-11-17 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6f9854ad6ed7 to 9d0720a7b0ec (2 revisions) (flutter/flutter#159047) 2024-11-17 engine-flutter-autoroll@skia.org Roll Flutter Engine from 40000c742910 to 6f9854ad6ed7 (2 revisions) (flutter/flutter#159041) 2024-11-16 yaostyle@gmail.com Fix NavigationBar example overflow alignment (flutter/flutter#159034) 2024-11-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from 908061196148 to 40000c742910 (1 revision) (flutter/flutter#159038) 2024-11-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from 85d445e3cf78 to 908061196148 (3 revisions) (flutter/flutter#159032) 2024-11-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1800193ba961 to 85d445e3cf78 (1 revision) (flutter/flutter#159020) 2024-11-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from 98c3b7f8d1a7 to 1800193ba961 (1 revision) (flutter/flutter#159019) 2024-11-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from f23832175b7a to 98c3b7f8d1a7 (1 revision) (flutter/flutter#159017) 2024-11-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from f649330affa8 to f23832175b7a (1 revision) (flutter/flutter#159016) 2024-11-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from 619804c0fbb7 to f649330affa8 (47 revisions) (flutter/flutter#159015) 2024-11-16 fluttergithubbot@gmail.com Marks Linux web_benchmarks_skwasm_st to be unflaky (flutter/flutter#158563) 2024-11-16 fluttergithubbot@gmail.com Marks Windows windows_desktop_impeller to be unflaky (flutter/flutter#158565) 2024-11-15 yjbanov@google.com [flutter triage] Update list of frequent web contributors (flutter/flutter#159008) 2024-11-15 matanlurey@users.noreply.github.com Switch `flutter_build_apk_health_tests` to use a subset of current tests. (flutter/flutter#159004) 2024-11-15 gspencergoog@users.noreply.github.com Make the focus node on SelectableRegion optional. (flutter/flutter#158994) 2024-11-15 yjbanov@google.com Style change in Flutter-Web-Triage.md (flutter/flutter#159006) 2024-11-15 kustermann@google.com Refactor native asset integration into flutter tools (flutter/flutter#158932) 2024-11-15 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Try running historically flaky tests first to make `flutter build apk` health tests time out more often? (#158967)" (flutter/flutter#158993) 2024-11-15 mdebbar@google.com [web] Remove the benchmarks of the HTML renderer (flutter/flutter#158520) 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 Please CC louisehsu@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit c1eabf5e32cccfe54474726584ea1c2cf5a0a269 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat Nov 16 21:42:45 2024 +0000 [gradle]: Bump org.mockito.kotlin:mockito-kotlin from 4.1.0 to 5.4.0 in /packages/interactive_media_ads/android (#8095) Bumps [org.mockito.kotlin:mockito-kotlin](https://github.com/mockito/mockito-kotlin) from 4.1.0 to 5.4.0.
Release notes

Sourced from org.mockito.kotlin:mockito-kotlin's releases.

5.4.0

5.4.0

5.3.1

5.3.1

5.3.0

This release has not been published to maven-central

5.3.0

5.2.1

5.2.1

5.2.0

5.2.0

5.1.0

5.1.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.mockito.kotlin:mockito-kotlin&package-manager=gradle&previous-version=4.1.0&new-version=5.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 38b100c0c5326680e300b787ec7812bf178a055f Author: Kevin Moore Date: Fri Nov 15 16:28:23 2024 -0800 [google_identity_services_web] Migrate all types to JSObject (#8053) And cleanup other legacy JS-interop Also update tests so they pass with WebAssembly commit 58d1e6bff3aa0e37b99f28bb94ef4dc381a08bb0 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Nov 15 23:37:57 2024 +0000 [file_selector]: Bump androidx.annotation:annotation from 1.9.0 to 1.9.1 in /packages/file_selector/file_selector_android/android (#7982) Bumps androidx.annotation:annotation from 1.9.0 to 1.9.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.9.0&new-version=1.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 5bf6ac248535c2d9e980b2e962382ad2874884e9 Author: David Iglesias Date: Fri Nov 15 12:13:10 2024 -0800 [web_benchmarks] Remove `WebRenderer` enum. (#8103) Removes the `WebRenderer` enum, and its uses in the `CompilationOptions` class. This is a breaking change because it's removing public API (`CompilationOptions.renderer`, `WebRenderer`), but in *practice* people shouldn't need any changes to their code (since the `CompilationOptions` class is used through named constructors). In any case, labeling as `v4.0.0`. Related: https://github.com/flutter/flutter/issues/145954 commit 7dd395e8fb0e04317897ee20f60c7ac1ea874722 Author: Kevin Moore Date: Fri Nov 15 10:26:25 2024 -0800 [google_maps_flutter] Fix detection of WebAssembly compatibility (#8102) commit 319fe77dd14a69be06b74bdb7efbad16b2df2b8b Author: engine-flutter-autoroll Date: Fri Nov 15 11:46:20 2024 -0500 Roll Flutter from ed553d10cf63 to 0e2d55e0e7b2 (40 revisions) (#8106) Roll Flutter from ed553d10cf63 to 0e2d55e0e7b2 (40 revisions) https://github.com/flutter/flutter/compare/ed553d10cf63...0e2d55e0e7b2 2024-11-15 engine-flutter-autoroll@skia.org Roll Packages from b9ac917daeb0 to b164be312ca2 (4 revisions) (flutter/flutter#158986) 2024-11-15 magder@google.com Label PRs with gradle and Android paths "platform-android" (flutter/flutter#158970) 2024-11-15 kustermann@google.com Fix code asset copying logic in native asset code (flutter/flutter#158984) 2024-11-15 kustermann@google.com Fix duplicate work in native assets release builds (flutter/flutter#158980) 2024-11-15 matanlurey@users.noreply.github.com Stop generate both `.kts` and non-`.kts` gradle files for a test project. (flutter/flutter#158965) 2024-11-15 matanlurey@users.noreply.github.com Further skip `native_assets_test`(s) that runs `flutter build apk`. (flutter/flutter#158966) 2024-11-15 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 4.2.1 to 4.2.2 (flutter/flutter#157473) 2024-11-15 matanlurey@users.noreply.github.com Try running historically flaky tests first to make `flutter build apk` health tests time out more often? (flutter/flutter#158967) 2024-11-15 bkonyi@google.com [ tool ] Don't throw StateError when DDS fails to start (flutter/flutter#158744) 2024-11-14 katelovett@google.com Create merge_queue.md (flutter/flutter#158959) 2024-11-14 fluttergithubbot@gmail.com Marks Mac_x64 hot_mode_dev_cycle_macos_target__benchmark to be flaky (flutter/flutter#158569) 2024-11-14 fluttergithubbot@gmail.com Marks Mac_arm64 mac_desktop_impeller to be unflaky (flutter/flutter#158564) 2024-11-14 gengesa@gmail.com [gen_l10n] When localizing a message, prefer placeholder definitions defined by the current locale rather than the template locale (flutter/flutter#153459) 2024-11-14 august.oberhauser@swissinfo.ch feat: Include web 1.x.x in plugin template (flutter/flutter#156947) 2024-11-14 andrewrkolos@gmail.com hide members where possible (flutter/flutter#158492) 2024-11-14 andrewrkolos@gmail.com Move platform-specific log-reading implementation details from `ResidentRunner`/`FlutterDevice` to `DeviceLogReader` implementations (flutter/flutter#156181) 2024-11-14 98221114+Neutrino2711@users.noreply.github.com Updated document to clarify Clip Behaviour (flutter/flutter#157719) 2024-11-14 bkonyi@google.com Enable --verbose for android_plugin_skip_unsupported_test tests (flutter/flutter#158933) 2024-11-14 engine-flutter-autoroll@skia.org Roll Packages from 26e123a6ce03 to b9ac917daeb0 (5 revisions) (flutter/flutter#158938) 2024-11-14 43054281+camsim99@users.noreply.github.com Add `dev_dependency` attribute to plugins in `.flutter-plugins-dependencies` (flutter/flutter#158009) 2024-11-14 matanlurey@users.noreply.github.com No longer pass `--verbose` to implicit `pub` calls when `flutter --verbose` is set. (flutter/flutter#158898) 2024-11-14 stuartmorgan@google.com Update triage flow chart for SVG packages (flutter/flutter#158670) 2024-11-14 bruno.leroux@gmail.com Add one MenuAnchor alignment test (flutter/flutter#158915) 2024-11-14 32538273+ValentinVignal@users.noreply.github.com Reland Add test for dynamic_content_color.0.dart (flutter/flutter#158547) 2024-11-14 engine-flutter-autoroll@skia.org Roll Flutter Engine from e97b148e796d to 619804c0fbb7 (1 revision) (flutter/flutter#158905) 2024-11-14 engine-flutter-autoroll@skia.org Roll Flutter Engine from 82940a9aa714 to e97b148e796d (1 revision) (flutter/flutter#158901) 2024-11-14 matanlurey@users.noreply.github.com Move explicit package dependencies to a feature flag (flutter/flutter#158016) 2024-11-14 matanlurey@users.noreply.github.com Try with `bringup: true` debugging why `flutter build apk` often times out. (flutter/flutter#158895) 2024-11-14 rexios@rexios.dev Add constraint options to `SearchAnchor` suggestions builder (flutter/flutter#148856) 2024-11-14 50643541+Mairramer@users.noreply.github.com Adjusts the Hindi TimeOfDayFormat to display in a LTR orientation in localizations. (flutter/flutter#157998) 2024-11-14 38378650+hgraceb@users.noreply.github.com Fix update order of SliverAppBar (flutter/flutter#158159) 2024-11-13 42980667+srivats22@users.noreply.github.com #154792 - CupertinoActionSheetAction cursor doesn't change to clickable on desktop (flutter/flutter#158470) 2024-11-13 58190796+MitchellGoodwin@users.noreply.github.com Adds a skip message for analyzer (flutter/flutter#158890) 2024-11-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Marks Mac_arm64_ios hot_mode_dev_cycle_ios__benchmark to be flaky (#158242)" (flutter/flutter#158891) 2024-11-13 737941+loic-sharma@users.noreply.github.com [SwiftPM] Move the logic for SwiftPM enablement to the platform project (flutter/flutter#158213) 2024-11-13 matanlurey@users.noreply.github.com Temporarily skip flutter build apk for native_assets tests. (flutter/flutter#158880) 2024-11-13 me@alestiago.com docs: include Human Interface haptic information in HapticFeedback (flutter/flutter#158587) 2024-11-13 engine-flutter-autoroll@skia.org Roll Flutter Engine from db3e5af2ca22 to 82940a9aa714 (2 revisions) (flutter/flutter#158799) 2024-11-13 matanlurey@users.noreply.github.com Stream the output of `flutter build` for debugging. (flutter/flutter#158757) 2024-11-13 nate.w5687@gmail.com "Fix failing checks" wiki page for new contributors (flutter/flutter#154629) 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 Please CC dit@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. ... commit b164be312ca2e45ea332e38dd278ac84abe7658f Author: Jenn Magder Date: Thu Nov 14 15:52:19 2024 -0800 Remove packages/platform from dependabot config (#8099) Package was removed in https://github.com/flutter/packages/pull/6898. However the path was still being passed to dependabot, which made it mad: ``` ERROR Error during file fetching; aborting: No files found in /packages/platform/example/android/app ``` https://github.com/flutter/packages/actions/runs/11845225387/job/33010210199 I don't understand why this only started failing on https://github.com/flutter/packages/pull/8044 and not when the package was removed (since it moved that path from one place to another https://github.com/flutter/packages/pull/8036/files#diff-dd4fbda47e51f1e35defb9275a9cd9c212ecde0b870cba89ddaaae65c5f3cd28L571) commit 24752909e58c7be4a49c195d98a784ce10189ad9 Author: Jenn Magder Date: Thu Nov 14 12:45:26 2024 -0800 Ignore dependabot minor and patch updates of Kotlin mocking library (#8056) The dependabot version bumps are set up to ignore minor and patch "testing" dependencies bumps. Add Kotlin mocking library [io.mockk:mockk:](https://mockk.io/) to that list. Example where the patch was bumped https://github.com/flutter/packages/pull/7866 This isn't particularly a noisy dependency, but I noticed it when working on https://github.com/flutter/packages/pull/8048. Also delete `/packages/image_picker/image_picker/android` since that path doesn't exist. commit 4e1942e04937cfa13d2c53045acadc0f59f924ee Author: Paul Berry Date: Thu Nov 14 12:23:36 2024 -0800 [google_identity_services_web] Set nonce properly in loadWebSdk(). (#8069) This PR adds logic to `google_identity_services_web/lib/src/js_loader.dart` to cause the `nonce` property to be property set when creating new script elements. commit 4d0673ceaf6a202d24d5a0f107921e27037f6396 Author: engine-flutter-autoroll Date: Thu Nov 14 13:20:53 2024 -0500 Roll Flutter (stable) from 603104015dd6 to dec2ee5c1f98 (4 revisions) (#8084) https://github.com/flutter/flutter/compare/603104015dd6...dec2ee5c1f98 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-stable-packages Please CC dit@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter (stable): https://github.com/flutter/flutter/issues/new/choose To file a bug in Packages: 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 commit b9ac917daeb0fbf5bd6ad4a7d2a69ab81749d767 Author: LouiseHsu Date: Wed Nov 13 13:51:05 2024 -0800 [in_app_purchase_storekit] Fixes manual invocation of `finishTransaction()` triggering fatal crash (#8071) Fixes https://github.com/flutter/flutter/issues/154763 From the Apple docs: https://developer.apple.com/documentation/storekit/skpaymentqueue/1506003-finishtransaction `If you call finishTransaction(_:) on a transaction that is in the [SKPaymentTransactionState.purchasing](https://developer.apple.com/documentation/storekit/skpaymenttransactionstate/purchasing) state, StoreKit raises an exception.` For some reason even though the old Obj-C implementation didn't have this check, it didn't crash. This adds an explicit check for the purchasing state. commit d6f5e1b7c17f3961dad5d5a97bc7fb0cffc4c3a3 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Nov 13 21:43:07 2024 +0000 [webview]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.1 in /packages/webview_flutter/webview_flutter_android/android (#7988) Bumps androidx.annotation:annotation from 1.8.2 to 1.9.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.8.2&new-version=1.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 3af3b9e773e5445aeb4b334cf0a26a4037ed96a2 Author: LouiseHsu Date: Wed Nov 13 11:24:51 2024 -0800 [in_app_purchase_storekit] Remove unneeded platform annotations (#7914) Fixes https://github.com/flutter/flutter/issues/155213 commit d1992a442e53815db40e952328e0b9c63b9f85a8 Author: stuartmorgan Date: Wed Nov 13 14:21:21 2024 -0500 [tool] Improve Swift lint error message (#8074) If the Swift linter finds issues, log a message that communicates that rather than sounding like the linter failed to run. commit d345826a1919938bf355f10aea0a04eaa78cfef1 Author: engine-flutter-autoroll Date: Wed Nov 13 14:03:12 2024 -0500 Roll Flutter from c8510f29ccc2 to ed553d10cf63 (48 revisions) (#8076) Roll Flutter from c8510f29ccc2 to ed553d10cf63 (48 revisions) https://github.com/flutter/flutter/compare/c8510f29ccc2...ed553d10cf63 2024-11-13 matanlurey@users.noreply.github.com Avoid using platform `ProcessInfo.maxRss` in test. (flutter/flutter#158526) 2024-11-13 engine-flutter-autoroll@skia.org Roll Packages from 72356fda4684 to 26e123a6ce03 (19 revisions) (flutter/flutter#158626) 2024-11-13 matanlurey@users.noreply.github.com Move `dart pub deps` call to `.deps` and use it accordingly (flutter/flutter#158524) 2024-11-13 engine-flutter-autoroll@skia.org Roll Flutter Engine from 05c14d8b4cd7 to db3e5af2ca22 (1 revision) (flutter/flutter#158553) 2024-11-13 engine-flutter-autoroll@skia.org Roll Flutter Engine from ef760d6e1f13 to 05c14d8b4cd7 (3 revisions) (flutter/flutter#158551) 2024-11-13 engine-flutter-autoroll@skia.org Roll Flutter Engine from 08348c9eebcc to ef760d6e1f13 (1 revision) (flutter/flutter#158545) 2024-11-13 fluttergithubbot@gmail.com Marks Mac_arm64_ios hot_mode_dev_cycle_ios__benchmark to be flaky (flutter/flutter#158242) 2024-11-13 engine-flutter-autoroll@skia.org Roll Flutter Engine from 877abb9ad6ff to 08348c9eebcc (8 revisions) (flutter/flutter#158541) 2024-11-13 matanlurey@users.noreply.github.com Allow `devDependencies` to be omitted and not cause a tool crash. (flutter/flutter#158518) 2024-11-13 matanlurey@users.noreply.github.com Explain how to use `flutter channel`. (flutter/flutter#158533) 2024-11-13 magder@google.com Clean up dependabot config, add github-action group (flutter/flutter#158408) 2024-11-12 reidbaker@google.com Update test to include more complete instructions for how to run tests locally, add example to andoid 11 tests as well (flutter/flutter#158528) 2024-11-12 christopherfujino@gmail.com force Linux plugin_test to run on Ubuntu 20.04 (flutter/flutter#158529) 2024-11-12 jhy03261997@gmail.com Support materialTapTargetSize in PopupMenuButton (flutter/flutter#158357) 2024-11-12 737941+loic-sharma@users.noreply.github.com [SwiftPM] Update .flutter-plugin-dependencies format (flutter/flutter#158138) 2024-11-12 andrewrkolos@gmail.com add filesystem error handling to `systemTempDirectory` (flutter/flutter#158481) 2024-11-12 jiten.pateljp2001@gmail.com Made Cupertino dialog more like a native dialog in dark mode (flutter/flutter#157218) 2024-11-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from b0a4ca92c49e to 877abb9ad6ff (2 revisions) (flutter/flutter#158506) 2024-11-12 tessertaha@gmail.com Fix `NavigationBar` label style customization on the widget level (flutter/flutter#158510) 2024-11-12 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Add test for `dynamic_content_color.0.dart` (#158309)" (flutter/flutter#158511) 2024-11-12 32538273+ValentinVignal@users.noreply.github.com Add test for `dynamic_content_color.0.dart` (flutter/flutter#158309) 2024-11-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from a672f971c659 to b0a4ca92c49e (2 revisions) (flutter/flutter#158488) 2024-11-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 35041f118744 to a672f971c659 (1 revision) (flutter/flutter#158487) 2024-11-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7b3eacd20eb6 to 35041f118744 (9 revisions) (flutter/flutter#158485) 2024-11-11 737941+loic-sharma@users.noreply.github.com [SwiftPM] Simplify logic that determines if CocoaPods is used (flutter/flutter#158409) 2024-11-11 tessertaha@gmail.com Fix Chip draws `InkWell.hoverColor` is drawn on top of the provided background color with `hovered` state (flutter/flutter#158454) 2024-11-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3cb6f4de89b6 to 7b3eacd20eb6 (1 revision) (flutter/flutter#158464) 2024-11-11 engine-flutter-autoroll@skia.org Roll Packages from bb5a25815cae to 72356fda4684 (8 revisions) (flutter/flutter#158378) 2024-11-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from e9a44820f302 to 3cb6f4de89b6 (3 revisions) (flutter/flutter#158456) 2024-11-11 bkonyi@google.com Replace custom `RPCErrorCodes` with `RPCErrorKind` from `package:vm_service` (flutter/flutter#158379) 2024-11-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from d90e9f4718b8 to e9a44820f302 (1 revision) (flutter/flutter#158453) 2024-11-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 01c76e42c20f to d90e9f4718b8 (1 revision) (flutter/flutter#158443) 2024-11-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9b4c3b3d5518 to 01c76e42c20f (3 revisions) (flutter/flutter#158438) 2024-11-11 proddam@gmail.com Remove block and line comments when detecting '.flutter-plugins' in settings.gradle(.kts) (flutter/flutter#155488) 2024-11-11 nate.w5687@gmail.com Add `SafeArea` DartPad sample (flutter/flutter#158019) 2024-11-10 fluttergithubbot@gmail.com Marks Linux analyzer_benchmark to be flaky (flutter/flutter#158244) 2024-11-10 andrewrkolos@gmail.com remove `bringup` status for recently re-subsharded targets (flutter/flutter#158217) 2024-11-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 690cdfd09beb to 9b4c3b3d5518 (1 revision) (flutter/flutter#158418) 2024-11-09 fluttergithubbot@gmail.com Marks Mac_benchmark complex_layout_scroll_perf_macos__timeline_summary to be flaky (flutter/flutter#158252) 2024-11-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from ca6f5110d9d3 to 690cdfd09beb (1 revision) (flutter/flutter#158414) 2024-11-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 2f097cfd3d2d to ca6f5110d9d3 (3 revisions) (flutter/flutter#158411) 2024-11-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 54df0b8a4784 to 2f097cfd3d2d (1 revision) (flutter/flutter#158407) 2024-11-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from b7134d373ef8 to 54df0b8a4784 (2 revisions) (flutter/flutter#158405) 2024-11-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6b77347edfc5 to b7134d373ef8 (3 revisions) (flutter/flutter#158402) 2024-11-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1b567e80386e to 6b77347edfc5 (4 revisions) (flutter/flutter#158398) 2024-11-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from a08bd5a07c2a to 1b567e80386e (1 revision) (flutter/flutter#158393) ... commit 26e123a6ce039da6b75fe4248e93c8aeeb6d395b Author: Danang Rahmatullah Date: Wed Nov 13 16:12:06 2024 +0100 [camera_windows] Set device media type for video preview explicitly (#7447) Fixes preview aspect ratio on Windows on some webcams (See https://github.com/flutter/flutter/issues/122966). Before (main branch 7c1a05c8b12274e940e39adcb42896a32f57df32): ![image](https://github.com/user-attachments/assets/cca93da9-dd94-486e-930f-5c5aa73922a9) After: ![image](https://github.com/user-attachments/assets/05c5c460-21ed-40d8-93eb-1e75da7c929c) commit 67d8b50c1796eefa948a1367c1184b0e71753e44 Author: Thang Vu <39979207+ThangVuNguyenViet@users.noreply.github.com> Date: Wed Nov 13 07:27:24 2024 +0700 [go_router] Add support for relative routes (#6825) Add supports for relative routes by allowing going to a path relatively, like go('./$path') This PR doesn't fully resolve any issue, but it's mandatory to further add examples & tests for `TypedRelativeGoRoute` (see [#7174](https://github.com/flutter/packages/pull/6823)), which will resolves [#108177](https://github.com/flutter/flutter/issues/108177) commit e547e7af63ef4bc593d6419156e46be2c36b22c2 Author: Phil Quitslund Date: Tue Nov 12 16:01:30 2024 -0800 [vector_graphics_compiler] fix a renamed method parameter lint (#8070) An upcoming fix to `avoid_renaming_method_parameters` will flag this rename. (I updated the base class since that seems more correct.) For references, here's the fix in flight: https://dart-review.googlesource.com/c/sdk/+/394662 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [x] I signed the [CLA]. - [ ] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [ ] I [linked to at least one issue that this PR fixes] in the description above. - [ ] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [ ] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests commit c77ab99ab8385690f31e72b6a66f01f9c75dd60e Author: Michel Feinstein Date: Wed Nov 13 08:50:09 2024 +1100 [in_app_purchase] Add expiration date to Transaction (#8030) Closes https://github.com/flutter/flutter/issues/158226 Exposes the Transaction's expiration date, so this information can be used on the dart side. commit 1d142513086793bc35487dfc459590cc663be8f7 Author: stuartmorgan Date: Tue Nov 12 16:08:22 2024 -0500 [various] Clean up contributing guides (#8032) Several packages had documentation about how to use Pigeon or Mockito generation; this made sense when those were rare, but they are both now extremely common in our packages. Instead, https://github.com/flutter/flutter/pull/158326 adds this information to the general documentation for contribuing to flutter/packages, so it no longer needs to be in (a random subset of) specific packages. This also removes Contributing sections from several READMEs, as READMEs should be client-focused rather than developer-focused, and puts content in CONTRIBUTING.md where needed. commit 4a7b3853225f43d0c0a864748e0441638d967f63 Author: David Iglesias Date: Tue Nov 12 11:21:21 2024 -0800 [ci] Remove web renderer option from tools. (#8055) Removes the `--web-renderer` option from the "drive examples" and "dart test" commands. Fixes https://github.com/flutter/flutter/issues/151869 commit 53c1ff2b2aa48d20b6888dfdcbe1250510fc4b32 Author: stuartmorgan Date: Tue Nov 12 14:21:19 2024 -0500 [url_launcher] Update Pigeon version for Linux (#8065) Updates to the latest version of Pigeon, picking up the change to make the declarations of some classes public rather than in the implementation file. Fixes https://github.com/flutter/flutter/issues/153083 commit 9c294efb9eb4646336f18696ab2c1f3fe13c7bba Author: Tobias Löfstrand Date: Tue Nov 12 18:18:08 2024 +0100 [go_router] Add support for preloading branches of StatefulShellRoute (revised solution) (#6467) Adds support for preloading branches in a `StatefulShellRoute`. This functionality was initially part of an early implementation of flutter/packages#2650, however it was decided to implement this in a separate PR. The current implementation is a rewrite of the original implementation to better fit the final version of `StatefulShellRoute` (and go_router in general). **NOTE**: this is a revised version of the initial solution (see flutter/packages#4251), containing a substantially simpler implementation made possible thanks to recent refactoring in go_router. This fixes issue flutter/flutter#127804. commit 5e90ce258e33a8e9335a1eda7685eb81ee385529 Author: stuartmorgan Date: Mon Nov 11 19:50:02 2024 -0500 [pigeon] Make Linux type declarations public (#8040) Moves codec and HostAPI class declarations to the header to work around a glib bug. We could instead add an unnecessary call to the type check method, but we will need the codec to be public eventually anyway, and HostApi is conceptually a public class (it just isn't strictly necessary to declare it in the header due to the way abstract interfaces work in gobject) so may as well be declared publicly. Part of https://github.com/flutter/flutter/issues/153083 commit 366310328b97956c52b22563715e76ff4399652e Author: engine-flutter-autoroll Date: Mon Nov 11 17:46:31 2024 -0500 Roll Flutter from 73546b3b71a7 to c8510f29ccc2 (30 revisions) (#8042) https://github.com/flutter/flutter/compare/73546b3b71a7...c8510f29ccc2 2024-11-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from 44d788f4651b to a08bd5a07c2a (3 revisions) (flutter/flutter#158375) 2024-11-08 tessertaha@gmail.com Add ability to override `NavigationDestination.label` padding for `NavigationBar` (flutter/flutter#158260) 2024-11-08 stuartmorgan@google.com Add flutter/package code generation instructions (flutter/flutter#158326) 2024-11-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from 8e19915c19fc to 44d788f4651b (3 revisions) (flutter/flutter#158362) 2024-11-08 engine-flutter-autoroll@skia.org Roll Flutter Engine from bcb281cde579 to 8e19915c19fc (4 revisions) (flutter/flutter#158354) 2024-11-07 rmolivares@renzo-olivares.dev Make `_SelectableRegionSelectionContainerDelegate` public (flutter/flutter#147080) 2024-11-07 jason-simmons@users.noreply.github.com Manual roll Flutter Engine from 371c86fb6b49 to bcb281cde579 (flutter/flutter#158346) 2024-11-07 katelovett@google.com Add clarification on review timelines in PR template (flutter/flutter#158345) 2024-11-07 bkonyi@google.com Increase Java heap limit to 8GB for plugin integration tests using deferred components (flutter/flutter#158330) 2024-11-07 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#158337) 2024-11-07 engine-flutter-autoroll@skia.org Roll Flutter Engine from ac50b20ae5c9 to 371c86fb6b49 (5 revisions) (flutter/flutter#158336) 2024-11-07 matanlurey@users.noreply.github.com Fix a breakage caused by the test being unskipped. (flutter/flutter#158335) 2024-11-07 engine-flutter-autoroll@skia.org Roll Flutter Engine from 8a963cfc134c to ac50b20ae5c9 (1 revision) (flutter/flutter#158308) 2024-11-07 matanlurey@users.noreply.github.com `Plugin.isDevDependency` if exclusively in `dev_dependencies` (flutter/flutter#157462) 2024-11-07 stuartmorgan@google.com Add recently imported packages to issue template (flutter/flutter#158324) 2024-11-07 engine-flutter-autoroll@skia.org Roll Flutter Engine from 076688d95818 to 8a963cfc134c (1 revision) (flutter/flutter#158304) 2024-11-07 engine-flutter-autoroll@skia.org Roll Flutter Engine from 94dac953a95f to 076688d95818 (2 revisions) (flutter/flutter#158303) 2024-11-07 polinach@google.com Make leak tracking bots blocking. (flutter/flutter#157866) 2024-11-07 engine-flutter-autoroll@skia.org Roll Flutter Engine from b36ca3319825 to 94dac953a95f (1 revision) (flutter/flutter#158297) 2024-11-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from 58ac1dadd69d to b36ca3319825 (9 revisions) (flutter/flutter#158295) 2024-11-06 5593189+p-salmon@users.noreply.github.com Added cusor control properties to CupertinoSearchTextField and tests (flutter/flutter#158240) 2024-11-06 bkonyi@google.com Fix flakiness in hot_reload_test.dart (flutter/flutter#158271) 2024-11-06 34871572+gmackall@users.noreply.github.com Fix use of deprecated `buildDir` in Android templates/tests/examples (flutter/flutter#157560) 2024-11-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from f03f11300a9d to 58ac1dadd69d (5 revisions) (flutter/flutter#158283) 2024-11-06 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#158281) 2024-11-06 magder@google.com Delete firebase_android_embedding_v2_smoke_test (flutter/flutter#158223) 2024-11-06 yjbanov@google.com [web] fix --ab option for web benchmarks (flutter/flutter#154574) 2024-11-06 47866232+chunhtai@users.noreply.github.com excluding website-cms from critical pr triage (flutter/flutter#158220) 2024-11-06 32538273+ValentinVignal@users.noreply.github.com Add test for `image.frame_builder.0.dart` (flutter/flutter#158247) 2024-11-06 engine-flutter-autoroll@skia.org Roll Packages from 721943194945 to bb5a25815cae (6 revisions) (flutter/flutter#158267) 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 Please CC camillesimon@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 3a9226ab2ff89afc9129262b0d5161f2733f1694 Author: Jenn Magder Date: Mon Nov 11 12:04:50 2024 -0800 Use dependabot multi-directory configuration for Android package updates (#8048) Follow up to https://github.com/flutter/packages/pull/8036#issuecomment-2465781953. [Multi-directory config](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#directories) allows duplicated dependabot configs can be removed in favor of one that specifies multiple directories. Update Android packages so the same gradle dependencies can be updated all at once across packages. > The directories option in the dependabot.yml file allows you to apply Dependabot updates to multiple directories at the same time. It's unclear whether this is a good idea. > I'm a bit skeptical that grouping all the non-example ones together will be easier in practice, since usually some plugins are fine and some need changes, but I know the current system has some issues too. https://github.com/flutter/packages/pull/8036#pullrequestreview-2424660637 The consensus seems to be we should try it, and revert or adjust if it makes the current system worse. Part of https://github.com/flutter/flutter/issues/148098 commit df0f42318422a94e8e09a5bc26fa5aeae82b45f6 Author: stuartmorgan Date: Mon Nov 11 14:55:30 2024 -0500 [tools] Run `pub get` before `format` (#8052) The new Dart formatter needs to know the Dart language version of the code it is formatting, and it reads that from a file in `.dart_tool`, not `pubspec.yaml` directly. To avoid it failing to determine the version and assuming the latest (which will almost always be wrong in this repo): - Adds a step to the `format` repo command to ensure that `pub get` appears to have been run, and runs it if not, and - To avoid `pub get` running in `format` in CI, adds a deps-fetching step to the `repo_checks` task, as we have in other tasks that need to `pub get`. This should unblock the roll. commit d681e4e404e8a1099d825c4e099f096d5bcad616 Author: stuartmorgan Date: Mon Nov 11 12:42:59 2024 -0500 [file_selector] Fix Linux cancel regression (#8051) Fixes a regression introduced during the Pigeon conversion where canceling a dialog would fail assertions due to accidentally returning a null list instead of an empty list. Fixes https://github.com/flutter/flutter/issues/158430 commit a9b71408355210efdc1549db82c472db6a8430fe Author: stuartmorgan Date: Fri Nov 8 22:39:24 2024 -0500 [shared_preferences] Fix confusing language in README (#8049) One use of "class" instead of "plugin" to refer to the `SharedPreferences` class specifically slipped through review. This updates it to make it clear that it's talking about a specific class, not the plugin. Also updates the `setPrefix:` doc comment to clarify that it only applies to that class, now that the addition of other classes to the API surface has made that ambiguous. Fixes https://github.com/flutter/flutter/issues/158404 commit 2eedd7d7916da4a9a66cf8dfa0c30ef54002f559 Author: Jenn Magder Date: Fri Nov 8 15:20:28 2024 -0800 Use dependabot multi-directory configuration for Android example gradle updates (#8036) [Multi-directory config](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#configuration-options-for-the-dependabotyml-file) allows duplicated dependabot configs can be removed in favor of one that specifies multiple directories. Update the Android example apps so they can be updated all at once. Also updated the dependabot CI command to look for either `directory` or `directories` key. Part of https://github.com/flutter/flutter/issues/148098 commit a3ea39db04eef2f6a713635ede0889060ab93ed5 Author: Camille Simon <43054281+camsim99@users.noreply.github.com> Date: Fri Nov 8 13:53:19 2024 -0800 [animations] Remove `.flutter-plugins` reference from example app (#8002) Removes `.flutter-plugins` reference from example by (1) deleting the `packages/animations/example/android` directory, (2) running (in the `packages/animations` directory) ``` flutter create example --platforms android -a kotlin --org "dev.flutter.packages.animations" ``` and then (3) manually made the following changes: - Added back `packages/animations/example/android/.pluginToolsConfig.yaml` (removed by command) - Updated the Gradle version from 8.7 to 8.3 (downgraded by command) - Deleted `example/analysis_options.yaml` (added by command) - Deleted `example/test/` (added by command) - Added back artifact hub - Removed template TODOs - Bumped Kotlin Gradle version to 1.9.0 - Bumped AGP version from 8.1.0 to 8.5.1. Part of https://github.com/flutter/flutter/issues/157660. commit 036d1bd67621d46a481ac24924d447a385fb23b5 Author: Jenn Magder Date: Fri Nov 8 11:51:22 2024 -0800 Group dependabot github-action update PRs, delete dead docker updates (#8044) Dependabot now supports [grouping dependencies](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups) into one PR instead of one per dependency. Group github-action updates into one PR. Make github-actions update weekly instead of daily. Remove docker since it was removed in #4822 This means a PR like https://github.com/flutter/packages/pull/7813 will instead be grouped into one. Here's an example of what that will look like: https://github.com/kubernetes-sigs/cluster-api/pull/11347 __________ Screenshot 2024-11-08 at 11 08 52 AM __________ https://github.com/kubernetes-sigs/cluster-api/blob/e13abeaed2bd3d7b04abd9c9823e2f4185fa6599/.github/dependabot.yaml#L10-L12 I also updated the reviewers to stop the "One or more of the users or teams you specified is not a collaborator" [error](https://github.com/flutter/packages/pull/7813#issuecomment-2399244249). Part of https://github.com/flutter/flutter/issues/148098 commit dcbac07b6ef487564b9c49a3ae90358f6e1b4fd2 Author: Enguerrand ARMINJON <37028599+EArminjon@users.noreply.github.com> Date: Fri Nov 8 19:34:08 2024 +0100 [vector_graphics_compiler] fix-null-exception (#8006) The following SVG throw an exception (when using flutter_svg) : https://sweden.a.bigcontent.io/v1/static/10000199. This SVG contain an empty tag : which lead to the issue. This PR check if path is null to avoid the issue. PR from https://github.com/dnfield/vector_graphics/pull/254 commit 94d13ae41bff2b15dc50baa7622f4f7916bfb470 Author: stuartmorgan Date: Fri Nov 8 13:31:14 2024 -0500 [tools] Format Dart per-package (#8043) Instead of running Dart formatting on the whole repo at once, run it per package, from the package's directory. This is slower, but necessary since the new formatter behaves differently depending on the package's min SDK version. commit 72356fda4684035d1a015f1ba16bc2f37d954d1e Author: stuartmorgan Date: Thu Nov 7 20:03:21 2024 -0500 [various] Update example app minSdkVersions (#8035) Updates all examples apps that haven't yet switch to using `flutter.minSdkVersion` as their value to use that instead of a hard-coded version, as none currently need a version higher than Flutter stable's min version. commit 6d6cc9a9345578844b2066cd3a067aeebb3fbe9c Author: Valentin Vignal <32538273+ValentinVignal@users.noreply.github.com> Date: Fri Nov 8 07:23:07 2024 +0800 [go_router] Activate leak testing (#7546) commit 01050136b26c5d60058b412b60b73cee4949d4ab Author: LouiseHsu Date: Thu Nov 7 12:37:18 2024 -0800 [in_app_purchase_storekit] Add restore purchases and receipts (#7964) Add ability to restore purchases using StoreKit 2 apis. commit 31859c029f5a0c9f7202621d7996a6dad939de3c Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Thu Nov 7 13:32:56 2024 -0700 [interactive_media_ads] Adds remaining methods for internal wrapper of the Android native `BaseManager` (#7943) commit 4b2132f394c6002e3533970d164dc58222e8a330 Author: Srujan Gaddam <58529443+srujzs@users.noreply.github.com> Date: Thu Nov 7 09:40:41 2024 -0800 [google_sign_in/google_identity_services] Clear-up documentation of callbacks in various APIs and uses of those APIs (#8029) These APIs used to accept allowInterop'd callbacks. When the implementation was migrated to use dart:js_interop, they were wrapped with toJS. However, starting in 3.5, to be consistent with dart2wasm, double-wrapping a function is an error. The documentation should be clear that it accepts only Dart functions and uses should be cleaned up to not use allowInterop and type the callbacks' parameter and return value correctly. commit da51281bbc3e1d22777246c029ab7c9ce58ea3bb Author: Alexandru Mariuti Date: Thu Nov 7 13:34:29 2024 +0100 [flutter_svg] wasm compatibility (#8014) Make `flutter_svg` wasm compatible commit f0b38adff180d00114f93a816be3dce913f6094a Author: jesswrd Date: Wed Nov 6 11:34:29 2024 -0800 Applied Gradle Plugins Declaratively for Multiple Plugin Example Apps (Part 2) (#8019) Updated applying gradle plugins from usage of imperative apply to usage of declarative blocks {} apply for 7 plugins. Intending on updating all android example apps under packages. The first migration was completed in this PR [here](https://github.com/flutter/packages/pull/7968) Previously migrated applying `path_provider` plugin example app from imperatively to declaratively in this PR [here](https://github.com/flutter/packages/pull/7822). Tests for changes in the linked PR above. More information on Flutter Gradle Pluggin Apply [here](https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply) Partially addresses [#152656](https://github.com/flutter/flutter/issues/152656) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [x] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests commit 1636da72a68c9dd27dfce855c82084e56dede5ae Author: engine-flutter-autoroll Date: Wed Nov 6 12:43:24 2024 -0500 Roll Flutter from 29d40f7f6826 to 73546b3b71a7 (20 revisions) (#8028) https://github.com/flutter/flutter/compare/29d40f7f6826...73546b3b71a7 2024-11-06 32538273+ValentinVignal@users.noreply.github.com Add test for `image.loading_builder.0.dart` (flutter/flutter#158248) 2024-11-06 kustermann@google.com Make flutter_tools use newest package:{native_assets_builder,native_assets_cli,native_toolchain_c} (flutter/flutter#158214) 2024-11-06 bruno.leroux@gmail.com Fix RawScrollbar examples and desktop test (flutter/flutter#158237) 2024-11-06 bruno.leroux@gmail.com Cleanup MenuAnchor and Improve DropdownMenu tests readability (flutter/flutter#158175) 2024-11-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from a3741d6248b7 to f03f11300a9d (2 revisions) (flutter/flutter#158222) 2024-11-06 louisehsu@google.com Update error message for Cocoapods support for synchronized groups/folders (flutter/flutter#158206) 2024-11-06 matanlurey@users.noreply.github.com Restore skipped iOS test by looping over `FakeAsync` elapse. (flutter/flutter#158204) 2024-11-06 41366638+kirya355@users.noreply.github.com fix: ensure draggable_scrollable_sheet respects shouldCloseOnMinExten… (flutter/flutter#156338) 2024-11-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from e5e06c97c33c to a3741d6248b7 (14 revisions) (flutter/flutter#158218) 2024-11-06 matanlurey@users.noreply.github.com Forward fix `CupertinoDynamicColor` by adding `toARGB32()`. (flutter/flutter#158145) 2024-11-05 matanlurey@users.noreply.github.com Remove unused `enableObservatory` flag. (flutter/flutter#158202) 2024-11-05 matanlurey@users.noreply.github.com Remove observatory related TODO that is already fixed. (flutter/flutter#158205) 2024-11-05 nate.w5687@gmail.com Factor out "shaker" class (flutter/flutter#157748) 2024-11-05 fluttergithubbot@gmail.com Marks Mac_benchmark animated_complex_opacity_perf_macos__e2e_summary to be flaky (flutter/flutter#157424) 2024-11-05 andrewrkolos@gmail.com Increase subsharding for `Linux tool_integration_tests` (flutter/flutter#158196) 2024-11-05 32538273+ValentinVignal@users.noreply.github.com Add test for `raw_scrollbar.2.dart` (flutter/flutter#158161) 2024-11-05 andrewrkolos@gmail.com use root directory as the default for rootOverride in Cache.test constructor (flutter/flutter#158201) 2024-11-05 magder@google.com Kill interactive script job `xcdevice observe` processes on tool/daemon shutdown (flutter/flutter#157646) 2024-11-05 34465683+rkishan516@users.noreply.github.com Fix: Gap between prefix and suffix icon and input field in input deco… (flutter/flutter#152069) 2024-11-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from f56401062e42 to e5e06c97c33c (1 revision) (flutter/flutter#158194) 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 Please CC camillesimon@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit bb5a25815cae4125f2a5903a2b376db58cff2e66 Author: Jenn Magder Date: Tue Nov 5 22:58:26 2024 -0800 [ci] Upload screenshots, logs, and Xcode test results for drive and integration_test runs (#7430) 1. Native Xcode tests will output a helpful "xcresult" package on failure containing logs, screenshots, and screen recordings. Zip and upload these results when tests fail. 2. Pass `flutter test --debug-logs-dir` flag to upload logs like https://github.com/flutter/flutter/pull/142643. 3. Pass `flutter drive --screenshot` flag to upload screenshots on timeout like https://github.com/flutter/flutter/pull/96973. Example of [failing Xcode analyzer build](https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20ios_platform_tests_shard_5%20master/17374/overview) has the [zipped xcresult](https://storage.googleapis.com/flutter_logs/flutter/ff98c32e-18ca-4ad4-a910-9db1d7f7e4b0/xcode%20analyze/ff98c32e-18ca-4ad4-a910-9db1d7f7e4b0/xcodebuild-2024-10-25T09:56:46.440913.zip) attached as a log. ![Screenshot 2024-10-25 at 10 10 36 AM](https://github.com/user-attachments/assets/dd7ae9bc-6161-4381-8a4f-f10b8c981801) The unzipped xcresult looks like this in Xcode: ![Screenshot 2024-10-25 at 10 11 55 AM](https://github.com/user-attachments/assets/d4dd8420-f272-459c-9785-ab0c03887a74) A [failing "native test" step build](https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20macos_platform_tests%20master%20-%20packages/17315/overview): ![Screenshot 2024-10-25 at 10 19 55 AM](https://github.com/user-attachments/assets/76a86a15-2150-482a-8b15-e3e7ac90485e) Fixes https://github.com/flutter/flutter/issues/144795 commit d3d563de5a2689abc06854bc093532d3833448e2 Author: Loïc Sharma <737941+loic-sharma@users.noreply.github.com> Date: Tue Nov 5 13:33:54 2024 -0800 Remove use_modular_headers! from Podfiles (#7796) ⚠️ _This PR does not update packages' versions as it only affects unpublished parts of example apps and tests._ We added `use_modular_headers!` to our `Podfile`s as we originally planned to phase out `use_frameworks!` (see https://github.com/flutter/flutter/pull/42204). However, our plans have now changed and we are instead phasing out CocoaPods entirely in favor of Swift Package Manager. CocoaPods's `use_frameworks!` and `use_modular_headers!` are two different overlapping options that should not be used together. This change removes the `use_modular_headers!` from example apps' `Podfile`s. This change does not affect packages themselves. Part of https://github.com/flutter/flutter/issues/156259 commit 719bd8434b50008e263505317c6b661d3bcaf422 Author: misos1 <30872003+misos1@users.noreply.github.com> Date: Tue Nov 5 21:54:14 2024 +0100 [camera_avfoundation] enable more than 30 fps (#7394) Camera plugin was crashing when I tried to set fps to 60 on most media presets (except maybe on 1280x720, although tested device supports 60 fps for up to 1920x1440 and can do 240 fps on 1280x720) because when is `activeVideoMinFrameDuration` and `activeVideoMaxFrameDuration` set to fps outside of what active format supports it throws exception. Now it tries to find a format which supports fps closest to wanted fps and clamps it if it cannot be set to exact value to prevent crashes. It searches for formats with the exact same resolution. For example in format list it can be like "1920x1080 { 3- 30 fps}", "1920x1080 { 3- 60 fps}" and "1920x1080 { 6-120 fps}, but when setting `sessionPreset` then "1920x1080 { 3- 30 fps}" is selected by default. On the tested device there are 2 "media subtypes" `420f` and `420v` for each format where the first is denoted as "supports wide color" in debug description and the system has tendency to choose this one. So it tries to preserve the media subtype to what is preferred by the system and this is also added to `highestResolutionFormatForCaptureDevice` (with lower priority than max resolution/fps). Also there was nested `lockForConfiguration` and `unlockForConfiguration` when using `ResolutionPreset.max` together with setting up fps. commit 5d419d101a55757d06d5bf0999f5dfe8f450d714 Author: engine-flutter-autoroll Date: Tue Nov 5 14:25:32 2024 -0500 Roll Flutter from 8591d0c16a6c to 29d40f7f6826 (25 revisions) (#8027) https://github.com/flutter/flutter/compare/8591d0c16a6c...29d40f7f6826 2024-11-05 andrewrkolos@gmail.com increase subsharding for `Windows build_tests` from 8 to 9 (flutter/flutter#158146) 2024-11-05 polinach@google.com Reland2: Revert "Revert "Add a warning/additional handlers for parsing`synthetic-package`."" (flutter/flutter#158184) 2024-11-05 polinach@google.com Reland1: "Revert "Add and plumb `useImplicitPubspecResolution` across `flutter_tools`."" (flutter/flutter#158126) 2024-11-05 engine-flutter-autoroll@skia.org Roll Packages from 796afa35071d to 721943194945 (11 revisions) (flutter/flutter#158179) 2024-11-05 kustermann@google.com Make native asset integration test more robust, thereby allowing smooth auto-update of packages via `flutter update-packages` (flutter/flutter#158170) 2024-11-05 mohellebiabdessalem@gmail.com Readability change to `flutter.groovy`, align on null assignment, reduce unused scope for some methods, apply static where possible (flutter/flutter#157471) 2024-11-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7207a8fbec93 to f56401062e42 (1 revision) (flutter/flutter#158169) 2024-11-05 32538273+ValentinVignal@users.noreply.github.com Add test for `raw_scrollbar.shape.0.dart` (flutter/flutter#158094) 2024-11-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 418609dd5b58 to 7207a8fbec93 (1 revision) (flutter/flutter#158156) 2024-11-05 bruno.leroux@gmail.com Refactor DropdownMenu tests (flutter/flutter#157913) 2024-11-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6271a92a376f to 418609dd5b58 (3 revisions) (flutter/flutter#158152) 2024-11-05 fluttergithubbot@gmail.com Marks Linux_pixel_7pro flavors_test to be flaky (flutter/flutter#156956) 2024-11-05 matanlurey@users.noreply.github.com Further remove web-only considerations that are no longer necessary (flutter/flutter#158143) 2024-11-05 polinach@google.com Add optional parameter to FlutterTesterDevices. (flutter/flutter#158133) 2024-11-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 75acceedca41 to 6271a92a376f (2 revisions) (flutter/flutter#158148) 2024-11-05 matanlurey@users.noreply.github.com Extract and restore a test that a blank native assets project still builds (flutter/flutter#158141) 2024-11-04 matanlurey@users.noreply.github.com Remove references to the HTML renderer in public docs. (flutter/flutter#158035) 2024-11-04 engine-flutter-autoroll@skia.org Roll Flutter Engine from f880b56b6ede to 75acceedca41 (1 revision) (flutter/flutter#158137) 2024-11-04 nate.w5687@gmail.com Fix `WidgetStateProperty` documentation (flutter/flutter#154298) 2024-11-04 engine-flutter-autoroll@skia.org Roll Flutter Engine from 25c7e471e2ef to f880b56b6ede (5 revisions) (flutter/flutter#158132) 2024-11-04 engine-flutter-autoroll@skia.org Roll Flutter Engine from 05cb5d7f7939 to 25c7e471e2ef (12 revisions) (flutter/flutter#158127) 2024-11-04 737941+loic-sharma@users.noreply.github.com Remove use_modular_headers! from Swift Podfiles (flutter/flutter#156257) 2024-11-04 victorsanniay@gmail.com Disable failing native assets test (flutter/flutter#158119) 2024-11-04 nate.w5687@gmail.com Fix `NestedScrollView` inner position logic (flutter/flutter#157756) 2024-11-04 jacksongardner@google.com Add benchmarks for single-threaded Skwasm. (flutter/flutter#158027) 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 Please CC camillesimon@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 220f29966fab690c1235871167fd3de7bc12948a Author: stuartmorgan Date: Tue Nov 5 12:48:25 2024 -0500 [ci] Add vector_graphics and flutter_svg to autolabeler (#8025) Adds autolabel rules for the new packages. commit cb08b93d5f88d24f9d34010c74a369fcf097138b Author: Alexandru Mariuti Date: Tue Nov 5 18:45:00 2024 +0100 [vector_graphics_compiler] wasm compatibility (#8021) Make vector_graphics_compiler WASM compatible. - x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. commit 721943194945623062792dd3356f1ad1cbe070e2 Author: Jonah Williams Date: Tue Nov 5 08:00:10 2024 -0800 [vector_graphics*] Relax dependency constraints of vector_graphics, vector_graphics_codec, vector_graphics_compiler, flutter_svg (#8018) Relax the dependency constrraints of the vector graphics packages. Since there are no actual changes to the vector_graphics_codec package and the listed version is already published, I don't think it needs a version bump to remove the publish key. Fixes https://github.com/flutter/flutter/issues/157626 commit 79f8b0b6655132ac8d11a50243afe85867a09405 Author: Kallen Tu Date: Mon Nov 4 14:24:38 2024 -0800 [various] Add `missing_code_block_language_in_doc_comment` lint to flutter/packages. (#6473) Adds this Dartdoc-related lint to the flutter repository, in replacement of the Dartdoc warning (missingCodeBlockLanguage) because it will be deprecated and removed soon. flutter/flutter already has this lint as well. Adding to flutter/engine with https://github.com/flutter/engine/pull/51944. Lint Proposal: https://github.com/dart-lang/linter/issues/4904 Issue covering future work removing the `// ignore:`s: https://github.com/flutter/flutter/issues/157620 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [x] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#version-and-changelog-updates [following repository CHANGELOG style]: https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#changelog-style [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests commit abadfb54fc7aa327ae6ca0b5a928b2cff194db5c Author: stuartmorgan Date: Mon Nov 4 17:06:27 2024 -0500 [various] Update example apps to Kotlin 1.9.0 (#7998) Follow-up to https://github.com/flutter/packages/pull/7997 to update all example apps to 1.9.0 to protect us from similar OOB failures as other transitive dependencies in the ecosystem update to newer versions of Kotlin. commit da4c3eedb5e70d47452088d8cb30c02c058052a7 Author: cedvdb Date: Mon Nov 4 20:15:05 2024 +0100 [go_router] add current state getter (#7651) Adds a current state getter that returns `GoRouterState`. I've no idea if this is correct but the added tests seem to be passing. Rebuilding the state may be expensive too ? Fix: https://github.com/flutter/flutter/issues/129833 fixes https://github.com/flutter/flutter/issues/148215 commit 62762107c08b1b41fe068c81f7593ffac982a6d1 Author: jesswrd Date: Mon Nov 4 11:05:59 2024 -0800 Applied Gradle Plugins Declaratively for Multiple Plugin Example Apps (#7968) Updated applying gradle plugins from usage of imperative apply to usage of declarative blocks {} apply for 7 plugins. Intending on updating all android example apps under packages. Previously migrated applying `path_provider` plugin example app from imperatively to declaratively in this PR [here](https://github.com/flutter/packages/pull/7822). Tests for changes in the linked PR above. More information on Flutter Gradle Pluggin Apply [here](https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply) Partially addresses [#152656](https://github.com/flutter/flutter/issues/152656) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [x] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests commit aaa1b3f0746630cc5afbb835b7579f0e7b15eb29 Author: engine-flutter-autoroll Date: Mon Nov 4 11:09:14 2024 -0500 Roll Flutter from f86b77721524 to 8591d0c16a6c (16 revisions) (#8015) https://github.com/flutter/flutter/compare/f86b77721524...8591d0c16a6c 2024-11-04 32538273+ValentinVignal@users.noreply.github.com Remove null from flex documentation (flutter/flutter#158086) 2024-11-04 32538273+ValentinVignal@users.noreply.github.com Add test for `raw_scrollbar.1.dart` (flutter/flutter#158069) 2024-11-04 32538273+ValentinVignal@users.noreply.github.com Add test for `interactive_viewer.constrained.0.dart` (flutter/flutter#158044) 2024-11-03 polinach@google.com Revert "Add and plumb `useImplicitPubspecResolution` across `flutter_tools`." (flutter/flutter#158076) 2024-11-03 polinach@google.com Revert "Add a warning/additional handlers for parsing`synthetic-package`." (flutter/flutter#158078) 2024-11-03 jiten.pateljp2001@gmail.com Fixes typos & spelling error in changelog.md file (flutter/flutter#157438) 2024-11-02 32538273+ValentinVignal@users.noreply.github.com Add test for `raw_scrollbar.0.dart` (flutter/flutter#157989) 2024-11-02 engine-flutter-autoroll@skia.org Roll Flutter Engine from 38b6165f137d to 05cb5d7f7939 (4 revisions) (flutter/flutter#158038) 2024-11-02 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7dfdcacd8ae4 to 38b6165f137d (5 revisions) (flutter/flutter#158034) 2024-11-02 matanlurey@users.noreply.github.com Delete unused references to dev.flutter.plugins.e2e. (flutter/flutter#158031) 2024-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7b176f4f25da to 7dfdcacd8ae4 (1 revision) (flutter/flutter#158021) 2024-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3a090b46dd35 to 7b176f4f25da (2 revisions) (flutter/flutter#158018) 2024-11-01 737941+loic-sharma@users.noreply.github.com Make SwiftPM integration tests even MORE idiomatic (flutter/flutter#158014) 2024-11-01 737941+loic-sharma@users.noreply.github.com Improve consistency of code snippets in basic.dart (flutter/flutter#158015) 2024-11-01 matanlurey@users.noreply.github.com Remove unnecessary `kCliAnimationsFeatureName` that is available as `.configSetting`. (flutter/flutter#158013) 2024-11-01 737941+loic-sharma@users.noreply.github.com Make the SwiftPM integration tests more idiomatic (flutter/flutter#157971) 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 Please CC camillesimon@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit b3a5e33f1cf39c62e187cb3060814bae4e2efff2 Author: stuartmorgan Date: Mon Nov 4 10:48:07 2024 -0500 [camera_windows] Revert: Support image streams on Windows platform (#7951) This reverts commit b31a279641283f1ef75ee2cc586b53de559148e4 (https://github.com/flutter/packages/pull/7067) The implementation had significant bugs: - It had asynchronous results, but never responded to them, violating the engine API contract and preventing futures from completing. - It `std::move`d pointers between classes, while still keeping them as ivars and global references and referring to them from long-lived handlers. commit 2c8f22670812996a00e45e6304f79f1fd9b02fa1 Author: stuartmorgan Date: Sat Nov 2 05:56:05 2024 -0400 [camera] Use Pigeon for Windows C++->Dart (#8001) Replaces direct method channel usage with Pigeon for C++-to-Dart communication. On the Dart side, this re-uses the same structure used in other platform implementations. Part of http://github.com/flutter/flutter/issues/117905 commit 195b2d62a0514d018f3d8e1c71fe68a5220aa206 Author: Kevin Moore Date: Fri Nov 1 20:51:27 2024 -0700 [script/tool] update dependencies (#7992) commit 1d00782b90d4c57f03c7b6b1b4e4f91d39a0426b Author: engine-flutter-autoroll Date: Fri Nov 1 14:08:07 2024 -0400 Roll Flutter from 0fe615343bd9 to f86b77721524 (16 revisions) (#8000) https://github.com/flutter/flutter/compare/0fe615343bd9...f86b77721524 2024-11-01 engine-flutter-autoroll@skia.org Roll Packages from 7cc1caa0cc36 to 796afa35071d (15 revisions) (flutter/flutter#158003) 2024-11-01 fluttergithubbot@gmail.com Marks Linux_pixel_7pro service_extensions_test to be flaky (flutter/flutter#157853) 2024-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0a0d5c9be6ff to 3a090b46dd35 (1 revision) (flutter/flutter#157994) 2024-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from bacc5e1e73b7 to 0a0d5c9be6ff (3 revisions) (flutter/flutter#157991) 2024-11-01 32538273+ValentinVignal@users.noreply.github.com Add test for `interactive_viewer.transformation_controller.0.dart` (flutter/flutter#157986) 2024-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from d7e928911ac2 to bacc5e1e73b7 (1 revision) (flutter/flutter#157982) 2024-11-01 32538273+ValentinVignal@users.noreply.github.com Add test for `notification.0.dart` (flutter/flutter#157909) 2024-11-01 lammenspaolo@gmail.com performance: Override .elementAt in CachingIterable (flutter/flutter#152477) 2024-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from cd46383cd55e to d7e928911ac2 (4 revisions) (flutter/flutter#157978) 2024-11-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from bb77cf867aef to cd46383cd55e (11 revisions) (flutter/flutter#157972) 2024-11-01 matanlurey@users.noreply.github.com Add a warning/additional handlers for parsing`synthetic-package`. (flutter/flutter#157934) 2024-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from f2154ef3e31c to bb77cf867aef (6 revisions) (flutter/flutter#157960) 2024-10-31 matanlurey@users.noreply.github.com Renames `injectBuildTimePluginFilesForWebPlatform` and removes unused named parameter. (flutter/flutter#157944) 2024-10-31 jonahwilliams@google.com [flutter_driver] use mostly public screenshot API. (flutter/flutter#157888) 2024-10-31 sarbagyastha@gmail.com Made insetPadding configurable for Date Picker Dialog (flutter/flutter#155651) 2024-10-31 bruno.leroux@gmail.com Fix showSnackBar can't access useMaterial3 from the theme (flutter/flutter#157707) 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 Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 3c3181c2cfcd0557e12a95ace0e347141f63e384 Author: Kevin Moore Date: Fri Nov 1 10:11:51 2024 -0700 [path_parsing] deprecate utility functions that should be private (#7993) Towards https://github.com/flutter/flutter/issues/157940 commit 796afa35071dd836c7ac6a845cf21ccc7890ae29 Author: stuartmorgan Date: Fri Nov 1 09:12:59 2024 -0700 [google_maps_flutter] Update Android for non-nullable generics (#7990) Now that Pigeon supports non-nullable generics, update the Pigeon definition to remove all the unnecessary nullability in generics. This is largely a no-op for non-test code because these types are mostly for passing from Dart to Java, and Java doesn't support non-nullable generics so nothing changes on the native side. Part of https://github.com/flutter/flutter/issues/155891 commit 02b20bf25958ff2175ca39c7486201b11f608c54 Author: stuartmorgan Date: Fri Nov 1 09:11:16 2024 -0700 [various] Minor cleanup in recently imported packages (#7995) Fixes a few minor things from the recent import of dnfield's vector-graphics-related packages: - Fixes a bad copy/paste in the `path_parsing` CHANGELOG so future versions of the CHANGELOG will be less confusing. - Removes a coverage link from the `flutter_svg` README that is no longer correct. - Disabled publishing of `vector_graphics*` until a new versioning plan is made. Because these are extremely minor, I'm overriding our usual versioning policy; it's fine for the CHANGELOG and README fixes to go out the next time we happen to publish rather than immediately. commit 53469f31edcfa610a14811b6dba64fc712007cbf Author: stuartmorgan Date: Fri Nov 1 08:57:12 2024 -0700 [go_router] Update example app to Kotlin 1.9.0 (#7997) The tree is currently closed on an out-of-band failure in the build of this example app: e: .../transformed/jetified-kotlin-stdlib-1.9.24.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: /b/s/w/ir/cache/gradle/caches/transforms-4/6cce2b947fc9e43cca6b44ff30180b61/transformed/jetified-kotlin-stdlib-1.9.24.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: .../transformed/jetified-kotlin-stdlib-1.9.24.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: .../transformed/jetified-annotation-jvm-1.9.1.jar!/META-INF/annotation.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. It appears that this is caused by https://github.com/flutter/packages/pull/7986 as this example app does depend on `url_launcher`, and that PR therefore change a transitive dependency of this example app, and as Reid discovered that version bump [changed the Kotlin version](https://android.googlesource.com/platform/frameworks/support/+log/2e6556166965445a8a129114765a3903c063735c..87b88ad088cc9b18d4ab75611fc8b74e8b01c24a/annotation) There was a Flutter Fix that contained the correct instructions for resolving this, which is what this PR does. commit ee43c7eb37ebf3e0b8911814db5513f0fa4a417e Author: engine-flutter-autoroll Date: Thu Oct 31 19:51:18 2024 -0400 Manual roll Flutter from fe71cadf1959 to 0fe615343bd9 (18 revisions) (#7989) Manual roll requested by tarrinneal@google.com https://github.com/flutter/flutter/compare/fe71cadf1959...0fe615343bd9 2024-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from c40b0b602822 to f2154ef3e31c (8 revisions) (flutter/flutter#157926) 2024-10-31 47866232+chunhtai@users.noreply.github.com Hides added routes before top-most route finishes pushing (flutter/flutter#156104) 2024-10-31 26356162+BenjiFarquhar@users.noreply.github.com Fix cursor on hover expand/collapse icon (#155207) (flutter/flutter#155209) 2024-10-31 32538273+ValentinVignal@users.noreply.github.com Add test for `media_query_data.system_gesture_insets.0.dart` (flutter/flutter#157854) 2024-10-31 matanlurey@users.noreply.github.com Add and plumb `useImplicitPubspecResolution` across `flutter_tools`. (flutter/flutter#157879) 2024-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 090c33aeae83 to c40b0b602822 (1 revision) (flutter/flutter#157896) 2024-10-31 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9295eeb6d3ce to 090c33aeae83 (4 revisions) (flutter/flutter#157893) 2024-10-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 2bd854e23b61 to 9295eeb6d3ce (5 revisions) (flutter/flutter#157882) 2024-10-30 louisehsu@google.com Adds a new helpful tool exit message for SocketExceptions thrown during mdns discovery (flutter/flutter#157638) 2024-10-30 miechoo@users.noreply.github.com Fix `GlowingOverscrollIndicator` examples (flutter/flutter#155203) 2024-10-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 906a7ad88052 to 2bd854e23b61 (1 revision) (flutter/flutter#157878) 2024-10-30 34871572+gmackall@users.noreply.github.com Upgrade templates to AGP 8.7/Gradle 8.10.2 (flutter/flutter#157872) 2024-10-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 57ed5d338e7e to 906a7ad88052 (13 revisions) (flutter/flutter#157875) 2024-10-30 tessertaha@gmail.com Update Material 3 `LinearProgressIndicator` for new visual style (flutter/flutter#154817) 2024-10-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 999797a2f690 to 57ed5d338e7e (5 revisions) (flutter/flutter#157833) 2024-10-30 matanlurey@users.noreply.github.com Add hidden `--no-implicit-pubspec-resolution` flag for one stable release. (flutter/flutter#157635) 2024-10-30 engine-flutter-autoroll@skia.org Roll Packages from 028027e6b1f1 to 7cc1caa0cc36 (5 revisions) (flutter/flutter#157864) 2024-10-30 stuartmorgan@google.com Mention partial PRs in the contributing docs (flutter/flutter#157863) 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 Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 2fd909bcc25a929d9a1e49044f1100aa144662d0 Author: Kevin Moore Date: Thu Oct 31 13:53:52 2024 -0700 [vector_garphics] fix execution on the web with WebAssembly (#7991) The `dart.library.html` variable is not available with wasm Since the web version is (currently) a no-op, flip the condition to check for dart:io instead commit 7287c7b7f1d51e8842f49df46dbd0af3bd1c1077 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu Oct 31 20:28:54 2024 +0000 [url_launcher]: Bump androidx.annotation:annotation from 1.9.0 to 1.9.1 in /packages/url_launcher/url_launcher_android/android (#7986) Bumps androidx.annotation:annotation from 1.9.0 to 1.9.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.9.0&new-version=1.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit dcf47df88e4cd7225a9a5261421980b192ab538d Merge: 92238bf6b 760b8df4a Author: stuartmorgan Date: Thu Oct 31 10:36:08 2024 -0700 [flutter_svg] Initial import (#7944) Imports https://github.com/dnfield/flutter_svg into this repository, with history, and updates it to follow repository conventions: - Updates min SDKs. - Removes analysis options and fixes resulting warnings. - Autoformats. - Updates pubspecs to follow repo standard. - Updates repo tooling to allow the `flutter_svg_test` non-dev dependency on `flutter_test`. - Adds repo metadata. - Adds METADATA files. - Bumps versions and slightly relax version constraints for vector_graphics* to allow the new versions. commit 92238bf6bc896bb0d28300178cf55ecee9085bb1 Merge: ed7ee79e4 a1bfadf6f Author: stuartmorgan Date: Thu Oct 31 10:35:33 2024 -0700 [vector_graphics] Initial import (#7941) Imports https://github.com/dnfield/vector_graphics into this repository, with history, and updates it to follow repository conventions: - Adds missing licence headers. - Removes analysis options and fixes resulting warnings. - Updates min SDKs. - Autoformats. - Updates pubspecs to follow repo standard, including updating the metadata to point to the Flutter repositories. - Allows `xml` as a pinned dependency, and relaxes the pinning requirement in the repo tools to allow an explicit, inclusive-endpoint range. - Skips some unit tests on unsupported platforms. - Adds repo metadata. - Bumps versions and slightly relax version constraints to allow the new versions. commit ed7ee79e4c90cf54b8ab175d87365e4bfab05257 Author: stuartmorgan Date: Wed Oct 30 16:10:15 2024 -0700 [ci] Ensure repo tool is autoformatted (#7963) Currently the autoformatter check is run per-package, so doesn't include script/tool. This adds a new CI step to check the formatting of the repo tooling, just as we have for running its unit tests. commit e55be9676ec6d519598dc716c5ec8c6dcb0e7973 Author: Zachary Anderson Date: Wed Oct 30 15:56:06 2024 -0700 Updates path_parsing README.md with a note about Dan (#7949) commit cd7a8104446dcb99453f01f26477a9bdd4186c3c Author: stuartmorgan Date: Wed Oct 30 15:51:05 2024 -0700 [tool] Support third_party for --current-package (#7967) Fixes `--current-package` so that when run on a package in third_party/packages/ in works as expected, rather than failing with an error message saying that it must be run from inside a package. commit 030dd4eafaae6a09a21fe311dc011082799e50df Author: stuartmorgan Date: Wed Oct 30 15:36:55 2024 -0700 [tool] Fix third_party dependency overrides (#7966) `made-deps-path-based` would sometimes create invalid relative paths when `third_party/packages` was involved because it was using the sibling directory of `packages` as the base. This updates the logic to always make the paths relative to the repository root; this is often a longer relative path than necessary, but that's harmless, and always using the repo root makes it easier to reason about. Also fixes the fact that paths that were already path based (which is always the case for `some_package/example`'s dependency on `some_package`) were being overridden, causing CI to do some unnecessary duplicate analysis work. commit 4feddffcfa77f6954c0e3a03bdd812193441d1de Author: jesswrd Date: Wed Oct 30 12:38:55 2024 -0700 Applied Gradle Plugins Declaratively for `path_provider` (#7822) Updated applying gradle plugins from usage of imperative apply to usage of declarative blocks {} apply. Intending on updating all android example apps under packages. Did one more as a proof of concept before doing more. More information on Flutter Gradle Plugin Apply [here](https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply) Partially addresses [#152656](https://github.com/flutter/flutter/issues/152656) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [x] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests --------- Co-authored-by: Reid Baker commit bce9735f1cefef3bdffe1e8ad01b90ecdbe67e0c Author: stuartmorgan Date: Wed Oct 30 09:54:24 2024 -0700 [palette_generator] Remove unmanaged code snippet (#7962) Simplifies the README so that it no longer uses a code snippet, as the snippet was not adding any value over pub.dev instructions, and removes it from the code-excerpt exclusion list. Part of https://github.com/flutter/flutter/issues/102679 commit a4c7bf529f513fa106d557e3a2c8dbdbcd4170ac Author: engine-flutter-autoroll Date: Wed Oct 30 11:50:17 2024 -0400 Roll Flutter from 42132e879b42 to fe71cadf1959 (12 revisions) (#7961) https://github.com/flutter/flutter/compare/42132e879b42...fe71cadf1959 2024-10-30 reidbaker@google.com Update CHANGELOG.md to correct ios vs macos issue (flutter/flutter#157822) 2024-10-30 tessertaha@gmail.com Add ability to customize the default `Slider` padding (flutter/flutter#156143) 2024-10-30 11473691+YeungKC@users.noreply.github.com Fix menu anchor state handling (flutter/flutter#157612) 2024-10-30 32538273+ValentinVignal@users.noreply.github.com Add test for `interactive_viewer.0.dart` (flutter/flutter#157773) 2024-10-30 32538273+ValentinVignal@users.noreply.github.com Add test for `scroll_metrics_notification.0.dart` (flutter/flutter#157768) 2024-10-30 ybz975218925@gmail.com Add boundary feature to the drag gesture. (flutter/flutter#147521) 2024-10-30 nate.w5687@gmail.com Fix `ResizeImage` documentation (flutter/flutter#157619) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from 795b5492f1b9 to 999797a2f690 (1 revision) (flutter/flutter#157825) 2024-10-29 magder@google.com Avoid labeling all PRs as 'text-input' (flutter/flutter#157805) 2024-10-29 engine-flutter-autoroll@skia.org Roll Packages from e0c4f55cd355 to 028027e6b1f1 (8 revisions) (flutter/flutter#157813) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from 725c8e4bc379 to 795b5492f1b9 (5 revisions) (flutter/flutter#157820) 2024-10-29 matanlurey@users.noreply.github.com Fix and remove a few `no-shuffle` tags in `flutter_tools`. (flutter/flutter#157656) 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 Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit 7cc1caa0cc361c38ef1e040958304da3ffa88dbf Author: stuartmorgan Date: Wed Oct 30 02:50:04 2024 -0700 [tool] Update build-all app creation (#7955) Minor cleanup of the script to create the build-all app, mostly for Android: - Don't override the minSdk to 21, since the Flutter-provided value is now 21 already. - Don't enable multidex, since that isn't necessary for minSdk 20+. - Remove camera_android_camerax from the direct dependency list, not camera_android, now that the endorsement has switched. This will return us to the previous, intended behavior of testing that both versions build together. - If for some reason the Dart SDK isn't detected, use 3.0.0+ instead of 2.12.0+. commit e12e073a0197eab14203891ea9260b4fff31b20d Author: Sam Rawlins Date: Tue Oct 29 19:29:15 2024 -0700 Disable two lint rules which are being removed. (#7959) Each of these are going to be removed soon. * avoid_null_checks_in_equality_operators * unsafe_html Work towards https://github.com/dart-lang/linter/issues/5063 and https://github.com/dart-lang/linter/issues/5001 commit d13a53bbd0d2b11ca79bee2f39363c89eecd8ad2 Author: Matan Lurey Date: Tue Oct 29 12:31:37 2024 -0700 Bump `path_provider_android` to `^2.2.5` due to Android v1 embedder. (#7935) https://github.com/flutter/engine/pull/52022 removed the Android v1 embedder. I'm seeing locally that older versions of `path_provider_android` fail due to missing symbols: ```txt flutter run Launching lib/main.dart on sdk gphone64 arm64 in debug mode... You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/to/flutter-gradle-plugin-apply Warning: This project is still reading the deprecated '.flutter-plugins. file. In an upcoming stable release support for this file will be completely removed and your build will fail. See https:/flutter.dev/to/flutter-plugins-configuration. /Users/matanl/.pub-cache/hosted/pub.dev/path_provider_android-2.2.2/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java:39: error: cannot find symbol @NonNull io.flutter.plugin.common.PluginRegistry.Registrar registrar) { ^ symbol: class Registrar location: interface PluginRegistry 1 error FAILURE: Build failed with an exception. ``` To be a good citizen, let's make sure users of `path_provider` get a good `path_provider_android`. commit f61542802d5ef4625c652e319b6aa40bbfb57389 Author: engine-flutter-autoroll Date: Tue Oct 29 15:13:48 2024 -0400 Roll Flutter from 3fb95c7dd21d to 42132e879b42 (19 revisions) (#7958) https://github.com/flutter/flutter/compare/3fb95c7dd21d...42132e879b42 2024-10-29 34871572+gmackall@users.noreply.github.com Reland "Upgrade tests to AGP 8.7/Gradle 8.10.2/Kotlin 1.8.10" (flutter/flutter#157617) 2024-10-29 jonahwilliams@google.com [impeller] re-enable impeller shard. (flutter/flutter#157806) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4cb4478016b5 to 725c8e4bc379 (1 revision) (flutter/flutter#157808) 2024-10-29 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Avoid labeling 'context' PRs as 'text-input' (#157650)" (flutter/flutter#157812) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from b95da8106b98 to 4cb4478016b5 (1 revision) (flutter/flutter#157792) 2024-10-29 koji.wakamiya@gmail.com Remove unused import from kt plugin template (flutter/flutter#157220) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5fa7a123b14a to b95da8106b98 (1 revision) (flutter/flutter#157787) 2024-10-29 tessertaha@gmail.com Fix `TabBar` tab icons not respecting custom `IconTheme` (flutter/flutter#157724) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0c8f0bf4d740 to 5fa7a123b14a (1 revision) (flutter/flutter#157780) 2024-10-29 105786499+syedaniq@users.noreply.github.com Allow customizing entry mode icons in TimePicker (flutter/flutter#157151) 2024-10-29 32538273+ValentinVignal@users.noreply.github.com Add test for `focus_scope.0.dart` (flutter/flutter#157772) 2024-10-29 32538273+ValentinVignal@users.noreply.github.com Add test for `page_storage.0.dart` (flutter/flutter#157770) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from c05af6f939fc to 0c8f0bf4d740 (1 revision) (flutter/flutter#157774) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from b394e0c98fa0 to c05af6f939fc (1 revision) (flutter/flutter#157767) 2024-10-29 32538273+ValentinVignal@users.noreply.github.com Add test for `nested_scroll_view_state.0.dart` (flutter/flutter#157714) 2024-10-29 zanderso@users.noreply.github.com Pin Mac tool_integration_test shards to arm64 (flutter/flutter#157760) 2024-10-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from ed587dcf61fd to b394e0c98fa0 (4 revisions) (flutter/flutter#157766) 2024-10-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from 70671baabbba to ed587dcf61fd (10 revisions) (flutter/flutter#157751) 2024-10-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from 23b2c6d3b3b1 to 70671baabbba (1 revision) (flutter/flutter#157740) 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 Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit ab404b553ec18034955633ca0de89a17aa064c27 Author: stuartmorgan Date: Tue Oct 29 10:53:33 2024 -0700 [webview_flutter] Fix macOS 14+ test hangs (#7953) Starting in macOS 14, webview_flutter integration tests hang due to being unable to connect to the test server. Based on local experimentation, in appears that we are not able to connect when binding to the "any" address, which gives us an IP address of 0.0.0.0, but using the loopback address (which is all we should need; the point is to accept local connections from the test itself) does work. Since our test fleet is a mixed macOS 13/14 fleet, this should fix flaky timeouts of macOS platform tests in CI, in addition to fixing local runs. Fixes https://github.com/flutter/flutter/issues/157449 commit 028027e6b1f1bba781ced46b2b1804d4cac062d6 Author: stuartmorgan Date: Tue Oct 29 10:20:16 2024 -0700 [various] Remove multiDexEnabled (#7956) We had manually added `multiDexEnabled` to various plugin example apps over time to fix build failures, but it's not needed for plugins with a `minSdk` of 20+ ([reference](https://developer.android.com/build/multidex)), and Flutter (and thus all of our plugins) requires 21+, so the setting is just cruft. commit 760b8df4a7ce388ff910e4cddaea24c8de530675 Author: Stuart Morgan Date: Mon Oct 28 10:39:30 2024 -0400 [flutter_svg] Initial import Imports https://github.com/dnfield/flutter_svg into this repository, with history, and updates it to follow repository conventions: - Updates min SDKs. - Removes analysis options and fixes resulting warnings. - Autoformats. - Updates pubspecs to follow repo standard. - Updates repo tooling to allow the `flutter_svg_test` non-dev dependency on `flutter_test`. - Adds repo metadata. - Adds METADATA files. - Adds commemoration to README. - Updates example app Android build files to current standards. - Bumps versions and slightly relax version constraints for vector_graphics* to allow the new versions. - Moves gitignore of golden test diffs into the package. commit 85c4934bda545beff36133dc63e47de5b5c5c56b Author: engine-flutter-autoroll Date: Mon Oct 28 15:11:17 2024 -0400 Roll Flutter from 5a11904383d1 to 3fb95c7dd21d (16 revisions) (#7948) https://github.com/flutter/flutter/compare/5a11904383d1...3fb95c7dd21d 2024-10-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from bf5bfeebf89f to 23b2c6d3b3b1 (3 revisions) (flutter/flutter#157736) 2024-10-28 magder@google.com Avoid labeling 'context' PRs as 'text-input' (flutter/flutter#157650) 2024-10-28 32538273+ValentinVignal@users.noreply.github.com Add test for `restorable_route_future.0.dart` (flutter/flutter#157708) 2024-10-28 reidbaker@google.com Update .ci.yaml have android sdk be 35v1 (flutter/flutter#157621) 2024-10-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from 2522789c4199 to bf5bfeebf89f (1 revision) (flutter/flutter#157713) 2024-10-28 32538273+ValentinVignal@users.noreply.github.com Add test for `restoration_mixin.0.dart` (flutter/flutter#157709) 2024-10-28 32538273+ValentinVignal@users.noreply.github.com Add test for `navigator.restorable_push_replacement.0.dart` (flutter/flutter#157704) 2024-10-28 32538273+ValentinVignal@users.noreply.github.com Add test for `focus_node.unfocus.0.dart` (flutter/flutter#157673) 2024-10-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9226b089d634 to 2522789c4199 (2 revisions) (flutter/flutter#157710) 2024-10-28 32538273+ValentinVignal@users.noreply.github.com Add tests for `navigator_state.restorable_push.0.dart` (flutter/flutter#157667) 2024-10-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from 10e50bd42c42 to 9226b089d634 (1 revision) (flutter/flutter#157702) 2024-10-28 32538273+ValentinVignal@users.noreply.github.com Add test for `navigator_state.restorable_push_replacement.0.dart` (flutter/flutter#157668) 2024-10-28 srawlins@google.com Remove unsafe_html lint rule (flutter/flutter#157531) 2024-10-27 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3162aaad0086 to 10e50bd42c42 (1 revision) (flutter/flutter#157690) 2024-10-27 ybz975218925@gmail.com Fix Scaffold extend body (flutter/flutter#157441) 2024-10-26 engine-flutter-autoroll@skia.org Roll Flutter Engine from c9b8ac96f6ce to 3162aaad0086 (3 revisions) (flutter/flutter#157681) 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 Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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 commit a1bfadf6fdfbc35138982dc8d78ee0da68748837 Author: Stuart Morgan Date: Fri Oct 25 13:32:33 2024 -0400 Update vector_graphics to match repo conventions - Add missing licence headers. - Remove analysis options fix new warnings. - Update min SDKs. - Autoformat. - Update pubspecs to follow repo standard. - Includes removing dependency overrides for inter-package path pinning as a default state; this can be added temporarily in PRs with repo tooling. - Allow xml dependency, and relax the pinning requirement to allow an explicit, inclusive-endpoint range. - Skip tests on unsupported platforms. - Switch vector_graphics_codec from flutter_test to test. - Add repo metadata. - Add commemoration to the README. - Add AUTHORS files. - Bump versions and slightly relax version constraints to allow the new versions. commit c658ca2d3055af90fb787b7e5c4535be62128506 Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Mon Oct 28 10:36:04 2024 -0600 [interactive_media_ads] Adds internal wrapper for iOS native `IMACompanionAdSlot` and `IMACompanionDelegate` (#7889) commit c6d2d826a1ca1f7aaaac8e67ee9e6896a13a8433 Merge: c8cbd2371 57a250f63 Author: Stuart Morgan Date: Mon Oct 28 12:03:13 2024 -0400 [flutter_svg] Repository merge Initial merge commit from dnfield/flutter_svg with no changes other than file locations. commit 16dfc4703645873f91b74464a51d71cdaf532ee1 Merge: c8cbd2371 cd6b96c4a Author: Stuart Morgan Date: Mon Oct 28 10:01:21 2024 -0400 Merge remote-tracking branch 'vector_graphics/main' into import-vector-graphics commit c8cbd237133a94573f92fda5acf08c410b7510a6 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun Oct 27 01:56:31 2024 +0000 Bump actions/checkout from 4.2.1 to 4.2.2 (#7919) Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.1 to 4.2.2.
Release notes

Sourced from actions/checkout's releases.

v4.2.2

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.2.1...v4.2.2

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.2.1&new-version=4.2.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 4fd562d6ee58a20b5f556ad1d3125807372ac100 Author: engine-flutter-autoroll Date: Sat Oct 26 14:23:39 2024 -0400 Roll Flutter from 4faa4a415ec9 to 5a11904383d1 (67 revisions) (#7937) Roll Flutter from 4faa4a415ec9 to 5a11904383d1 (67 revisions) https://github.com/flutter/flutter/compare/4faa4a415ec9...5a11904383d1 2024-10-26 30870216+gaaclarke@users.noreply.github.com Relands "Wide gamut framework gradient test (#153976)" (flutter/flutter#157643) 2024-10-26 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7c5c5fe5c84d to c9b8ac96f6ce (3 revisions) (flutter/flutter#157662) 2024-10-26 32538273+ValentinVignal@users.noreply.github.com Add test for `navigator_state.restorable_push_and_remove_until.0.dart` (flutter/flutter#157595) 2024-10-26 matanlurey@users.noreply.github.com Tighten up `throwToolExit`, explain when to use it. (flutter/flutter#157561) 2024-10-26 matanlurey@users.noreply.github.com Remove extraneous `throw`. (flutter/flutter#157658) 2024-10-26 32538273+ValentinVignal@users.noreply.github.com Add tests for `navigator.restorable_push.0.dart` (flutter/flutter#157492) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from 43e4d9a30666 to 7c5c5fe5c84d (1 revision) (flutter/flutter#157644) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5061358e255f to 43e4d9a30666 (1 revision) (flutter/flutter#157637) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from eb867e055790 to 5061358e255f (2 revisions) (flutter/flutter#157623) 2024-10-25 polinach@google.com Create flutter specific leak troubleshooting guidance. (flutter/flutter#157396) 2024-10-25 katelovett@google.com Update CupertinoNavigationBar to support large layout (flutter/flutter#157133) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from 38e9be1f74fa to eb867e055790 (3 revisions) (flutter/flutter#157613) 2024-10-25 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Wide gamut framework gradient test (#153976)" (flutter/flutter#157615) 2024-10-25 30870216+gaaclarke@users.noreply.github.com Wide gamut framework gradient test (flutter/flutter#153976) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from b413d9996c86 to 38e9be1f74fa (2 revisions) (flutter/flutter#157604) 2024-10-25 engine-flutter-autoroll@skia.org Roll Packages from a556f0f52825 to e0c4f55cd355 (2 revisions) (flutter/flutter#157605) 2024-10-25 jonahwilliams@google.com Support backdrop key in flutter framework. (flutter/flutter#157278) 2024-10-25 reidbaker@google.com Add 3.24.4 changelog to master (flutter/flutter#157600) 2024-10-25 mohellebiabdessalem@gmail.com Update flutter.groovy to catch unknown task exception when finding api task (flutter/flutter#157282) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from c4b0184c8783 to b413d9996c86 (1 revision) (flutter/flutter#157580) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from b1c2ba8c4d52 to c4b0184c8783 (1 revision) (flutter/flutter#157578) 2024-10-25 32538273+ValentinVignal@users.noreply.github.com Add test for `build_owner.0.dart` (flutter/flutter#157499) 2024-10-25 32538273+ValentinVignal@users.noreply.github.com Add tests for `focusable_action_detector.0.dart` (flutter/flutter#157575) 2024-10-25 32538273+ValentinVignal@users.noreply.github.com Add test for `navigator.restorable_push_and_remove_until.0.dart` (flutter/flutter#157487) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from 29440ed1e225 to b1c2ba8c4d52 (1 revision) (flutter/flutter#157572) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from 88716d804aef to 29440ed1e225 (1 revision) (flutter/flutter#157569) 2024-10-25 engine-flutter-autoroll@skia.org Roll Flutter Engine from b8b28c80a737 to 88716d804aef (2 revisions) (flutter/flutter#157567) 2024-10-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 48ff670d256b to b8b28c80a737 (2 revisions) (flutter/flutter#157564) 2024-10-24 matanlurey@users.noreply.github.com Use discenrable characters (replace `' 🙙 🙛 '` in error logs) (flutter/flutter#157548) 2024-10-24 matanlurey@users.noreply.github.com Remove unused `PubDependenciesProjectValidator`. (flutter/flutter#157516) 2024-10-24 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Upgrade tests to AGP 8.7/Gradle 8.10.2/Kotlin 1.8.10 (#157032)" (flutter/flutter#157559) 2024-10-24 jonahwilliams@google.com Mark mac impeller as bringup. (flutter/flutter#157551) 2024-10-24 tessertaha@gmail.com Deprecate `ThemeData.dialogBackgroundColor` in favor of `DialogThemeData.backgroundColor` (flutter/flutter#155072) 2024-10-24 34871572+gmackall@users.noreply.github.com Upgrade tests to AGP 8.7/Gradle 8.10.2/Kotlin 1.8.10 (flutter/flutter#157032) 2024-10-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from 246344f26edc to 48ff670d256b (2 revisions) (flutter/flutter#157544) 2024-10-24 matanlurey@users.noreply.github.com Allow opting out of `.flutter-plugins`, opt-out in `refreshPluginsList`. (flutter/flutter#157527) 2024-10-24 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reverts "Added a warning if `flutter.groovy` uses a `.flutter-plugins` file. (#157388)" (#157541)" (flutter/flutter#157549) 2024-10-24 50643541+Mairramer@users.noreply.github.com Changes the offset computation to first item for RenderSliverMainAxisGroup (flutter/flutter#154688) 2024-10-24 engine-flutter-autoroll@skia.org Roll Packages from 5e03bb1da411 to a556f0f52825 (7 revisions) (flutter/flutter#157539) 2024-10-24 737941+loic-sharma@users.noreply.github.com Add partial test for flutter build ios-framework on non-module (flutter/flutter#157482) 2024-10-24 737941+loic-sharma@users.noreply.github.com Add example to SafeArea docs (flutter/flutter#157228) 2024-10-24 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Added a warning if `flutter.groovy` uses a `.flutter-plugins` file. (#157388)" (flutter/flutter#157541) 2024-10-24 matanlurey@users.noreply.github.com Added a warning if `flutter.groovy` uses a `.flutter-plugins` file. (flutter/flutter#157388) 2024-10-24 engine-flutter-autoroll@skia.org Roll Flutter Engine from be56084344d1 to 246344f26edc (2 revisions) (flutter/flutter#157504) 2024-10-24 104349824+huycozy@users.noreply.github.com Add ability to disable CupertinoSegmentedControl (flutter/flutter#152813) 2024-10-24 tessertaha@gmail.com Update `Tab.height` parameter doc for tab height lower than default (flutter/flutter#157443) ... commit 839de2d8fc97505554cefeaf552aaba86a0360e8 Author: Kevin Moore Date: Fri Oct 25 14:12:04 2024 -0700 Drop deprecated web library (#7926) Fixes https://github.com/flutter/flutter/issues/148219 override reason: There is no user benefit for publishing this now. commit 5c5e399ad67f284e4a82facac60a560a3459bd4b Author: Ahmed Bilal <127771428+ahmedbilal008@users.noreply.github.com> Date: Sat Oct 26 01:37:13 2024 +0500 [video_player_web] Don't modify volume when muting video (#7845) Modifies the `setVolume` function for video elements to properly handle muting without resetting the volume. When the volume is set to 0.0, the video is muted without changing the volume itself, preventing issues with unmuting in certain browsers (like Chrome with Tap Emulation). This ensures the user can mute and unmute videos as expected without affecting the volume settings. Fixes: https://github.com/flutter/flutter/issues/156444 commit ec515825b13e20b881b801701fc7f14dfbe89d6b Author: engine-flutter-autoroll Date: Fri Oct 25 16:22:09 2024 -0400 Roll Flutter (stable) from 2663184aa790 to 603104015dd6 (3 revisions) (#7930) https://github.com/flutter/flutter/compare/2663184aa790...603104015dd6 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-stable-packages Please CC stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter (stable): https://github.com/flutter/flutter/issues/new/choose To file a bug in Packages: 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 commit e0c4f55cd355a704981b96914edf9e93c50a76af Merge: ca8cb6670 7f0a596f8 Author: stuartmorgan Date: Fri Oct 25 08:01:22 2024 -0700 [path_parsing] Initial import (#7908) Imports https://github.com/dnfield/dart_path_parsing into this repository, with history, and updates it to follow repository conventions: - Updates minimum SDK support to match our minimum - Switches to repository analysis options, fixing or suppressing all resulting warnings - Standardizes pubspec.yaml to follow our style/conventions - Removes the use of pubspec.lock, per repo conventions commit 7f0a596f81cb67c2eb12213ac93e92c9a08daf43 Merge: ccafa75f9 ca8cb6670 Author: stuartmorgan Date: Fri Oct 25 06:23:48 2024 -0700 Merge branch 'main' into import-path-parsing commit ccafa75f96f0b9e67ab293d21721e1ae1f987222 Author: Stuart Morgan Date: Fri Oct 25 09:23:27 2024 -0400 README EOL commit ca8cb667042bdf485601be2a51eccde4692d54b3 Author: stuartmorgan Date: Thu Oct 24 15:59:13 2024 -0700 [video_player] Simplify Pigeon API on Android (#7909) The Pigeon API for `video_player_android` dates back to the earliest versions of Pigeon, when methods had to take only a single class parameter, and return a class. This updates the API surface to modern Pigeon style, eliminating wrapper classes (except for `CreateMessage`, which is complex enough that the class is useful). commit 3727fa0af58e66c2fa769b3652b58b4d5d344c94 Merge: f4e409a0b a556f0f52 Author: stuartmorgan Date: Thu Oct 24 12:36:49 2024 -0700 Merge branch 'main' into import-path-parsing commit f4e409a0bc7819ce39555de5cc57883f37fac7f9 Author: Stuart Morgan Date: Thu Oct 24 14:29:52 2024 -0400 Autolabeler commit dade4c7479fd32a00e1594469bfb3e76df363015 Author: Stuart Morgan Date: Thu Oct 24 13:10:31 2024 -0400 Update license check to find and recognize this license commit 299d7afa787609e132a2b75c0012272d57b763c5 Author: Stuart Morgan Date: Thu Oct 24 12:40:27 2024 -0400 METADATA file commit e7525a13a728255271e16b099119de0699f9ea0b Author: Stuart Morgan Date: Thu Oct 24 12:23:48 2024 -0400 CODEOWNER commit a556f0f5282552a9ec892be3ac2b5f657032eec8 Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Thu Oct 24 09:17:17 2024 -0600 [camera] Manual roll and skip failing tests (#7891) See https://github.com/flutter/flutter/issues/157181 Also updates the `build_all_packages` test to handle `android/app/build.gradle(.kts)` filename. commit a87eddf0c281d5d017093125c1a8d9161257741f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Oct 23 21:48:06 2024 +0000 [image_picker]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/image_picker/image_picker_android/android (#7898) Bumps androidx.annotation:annotation from 1.8.2 to 1.9.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.8.2&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 1269ed8fc14f370c674ec61da95dda174db5768b Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Oct 23 21:38:51 2024 +0000 [url_launcher]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/url_launcher/url_launcher_android/android (#7906) Bumps androidx.annotation:annotation from 1.8.2 to 1.9.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.8.2&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit ff8299546c2b40654f0120279ed7ee58021cb61a Author: Mason Nguyen <48524817+wamynobe@users.noreply.github.com> Date: Thu Oct 24 04:29:10 2024 +0700 [pigeon] Allows swift generator to skip error class generation (#7849) Since the Kotlin generator allows skipping error class generation, it makes sense for the Swift generator to have the same option. Related to: #6183 https://github.com/flutter/flutter/issues/142099 commit 567b0e1c62301b9eb6cf1dff54fddd3357e4cca0 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Oct 23 21:29:08 2024 +0000 [in_app_pur]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/in_app_purchase/in_app_purchase_android/android (#7903) Bumps androidx.annotation:annotation from 1.8.2 to 1.9.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.8.2&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit fe32b5b0cc513bbc7d3f74d82748356b09d2bffb Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Oct 23 21:18:06 2024 +0000 [file_selector]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/file_selector/file_selector_android/android (#7900) Bumps androidx.annotation:annotation from 1.8.2 to 1.9.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.8.2&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit 3ce96baade5fa6fbe19938bbd21ea752d1c34b78 Author: Camille Simon <43054281+camsim99@users.noreply.github.com> Date: Wed Oct 23 13:41:51 2024 -0700 [video_player_android] Give `can pause` integration test range to test for (#7913) Gives the `can pause` integration test some leeway since there seems to be lag between the time the video player is paused on the Dart side and when it is actually paused on the native side. Fixes https://github.com/flutter/flutter/issues/157307. ## Pre-launch Checklist - [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [ ] I read the [Tree Hygiene] page, which explains my responsibilities. - [ ] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [ ] I signed the [CLA]. - [ ] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [ ] I [linked to at least one issue that this PR fixes] in the description above. - [ ] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [ ] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] All existing and new tests are passing. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests commit 5e03bb1da411c99d80727f46e1821c4fdc6ea12c Author: Camille Simon <43054281+camsim99@users.noreply.github.com> Date: Mon Oct 21 16:42:13 2024 -0700 [video_player_android] Correct rotation of videos recorded by the camera (#7846) Hopefully 🤞 corrects the calculation used to determine the rotation correction of the video being played. These are the different cases this addresses: 1. **Strictly below Android API 22:** Kept this calculation the same as before because I was not able to test it. For context, it uses an unapplied rotation degrees reported by the video's size to correct the rotation. Note that this is always 0 after Android API 22+ (see [its docs](https://github.com/google/ExoPlayer/blob/dd430f7053a1a3958deea3ead6a0565150c06bfc/library/common/src/main/java/com/google/android/exoplayer2/video/VideoSize.java#L65)) 2. **Above Android API 22, strictly below Android API 29:** The `SurfaceTexture` Impeller backend is used. From my testing, I see the preview is correctly rotated and sized without any further intervention, so the correction is set 0. 3. **Android API 29+:** The `ImageReader` Impelled backend is used and a preview correction was noticed by the community (see https://github.com/flutter/flutter/issues/154696). To fix this, we now use the rotation correction reported by the video's format. We also now use this rotation to make the fix for a swapped = width and height when the correction is 90 or 270 degrees (indicating that the video is landscape) as the logic did before but instead with the unapplied rotation degrees (see case 1 for context). Tested this on Android APIs 28, 30, 32, and 35. A fix attempt for https://github.com/flutter/flutter/issues/154696. commit aad3fd00f2fb1563783d53783897265a2ba0af5b Author: Greg Spencer Date: Mon Oct 21 13:20:18 2024 -0700 Allow custom blocks to be something other than `Column` or `SizedBox` (#7859) # Description This adds support for allowing block tags recognized by the Markdown processor to insert something other than just a `Column` or a `SizedBox` (the defaults for blocks with children, and without). Without this ability, custom builders can't insert their own widgets to, say, make it be a colored container instead. This addresses a customer request. Fixes https://github.com/flutter/flutter/issues/135848 commit cc3de83fe443f23cd5c12033e64ecb276f91eda6 Author: Stuart Morgan Date: Mon Oct 21 14:05:25 2024 -0400 README commit d258416273e7d0765ecb2b80da7aad2ae23b6002 Author: Stuart Morgan Date: Mon Oct 21 13:59:08 2024 -0400 Version bump commit 8c35dc4eaf95d17fe92a89d7b8d63c791cbbd4bd Author: Stuart Morgan Date: Mon Oct 21 13:56:23 2024 -0400 Pubspec validation commit c0a1530ee98b85befa073372b8fc897a6640c5f0 Author: Stuart Morgan Date: Mon Oct 21 13:48:09 2024 -0400 No pubspec lock files checked in, per repo convention commit ca49442260c0e4458981bd9605135604bec6bf2b Author: Stuart Morgan Date: Mon Oct 21 13:46:14 2024 -0400 Remove analysis options, update code accordingly commit fb82a4bd12dd85edbffafdfc57d2fb37618627fc Author: Stuart Morgan Date: Mon Oct 21 13:23:06 2024 -0400 CHANGELOG format commit 6fd4a9eb98962625fa48787c004f4528d5fcfc94 Author: Stuart Morgan Date: Mon Oct 21 13:21:10 2024 -0400 Remove Cirrus config commit b89a5640b810cd32f1d44a22f35ee03ef6b6ad30 Merge: 2c1b4a787 ebafccec2 Author: Stuart Morgan Date: Mon Oct 21 13:18:58 2024 -0400 Merge remote-tracking branch 'path-parsing/master' into import-path-parsing commit 2c1b4a7876f9564fe6f5cf75c386992c69645108 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Oct 21 16:04:52 2024 +0000 [camera]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/camera/camera_android/android (#7905) Bumps androidx.annotation:annotation from 1.8.2 to 1.9.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.8.2&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit b6f7e47c75869f9271280afd674405ec71ffd175 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Oct 21 15:58:59 2024 +0000 [path_provider]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/path_provider/path_provider_android/android (#7895) Bumps androidx.annotation:annotation from 1.8.2 to 1.9.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.annotation:annotation&package-manager=gradle&previous-version=1.8.2&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
commit dafd7530115768e56abc576a6c58dfb96f8f767f Author: stuartmorgan Date: Fri Oct 18 15:35:16 2024 -0700 [in_app_purchase] Update iOS Pigeon for non-nullable generics (#7820) Updates the Pigeon definition to uses non-nullable generics now that it's possible. Leaves a few nullable value types in maps where that corresponds to the public API of the collections passed in, so reflects an API decision rather than a Pigeon limitation. While updating this, also fixes the fact that the Obj-C Pigeon generation wasn't configured to use a prefix, which created the possibility of collision with Apple code due to using an Apple-reserved prefix on all the Pigeon-generated code. Part of https://github.com/flutter/flutter/issues/155891 commit 3b7ee860b1f960657a5816f633bd1dea062ec739 Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Fri Oct 18 13:34:55 2024 -0600 [interactive_media_ads] Adds internal wrapper for Android native `Ad` (#7880) commit b2cc3132f1644530026335da54e4b53f7aaa9c5d Author: stuartmorgan Date: Fri Oct 18 12:25:58 2024 -0700 [video_player] Remove Android API 19 SSL handling (#7876) `video_player_android` has special code for API level 19 to enable some TLS versions that are supported but not enabled by default in that version (starting in 20, they are enabled by default). It has a min Flutter SDK version of 3.24 now, however, and 3.24 no longer supports API version 19, so we no longer need this code. See discussion in https://github.com/flutter/flutter/issues/143649 commit 8be261cd6d12dac412912914c464b5646f0d5f01 Author: yaakovschectman <109111084+yaakovschectman@users.noreply.github.com> Date: Fri Oct 18 14:01:53 2024 -0400 [google_maps_android_flutter] Convert `Config.sdk` to `minSdk` in Robolectric tests and lower to `LOLLIPOP` (#7805) Tests in the title package that are run using the Robolectric test runner will now run on all SDKs level >= LOLLIPOP (i.e. 21). Raises max heap size to 1G. Affects only tests, should be version-bump exempt. Fixes https://github.com/flutter/flutter/issues/152931 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [ ] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests commit 2a1c477a788c1e0cd3e48c96fec97ffcbe5874e0 Author: yaakovschectman <109111084+yaakovschectman@users.noreply.github.com> Date: Fri Oct 18 12:37:36 2024 -0400 [camera_android] Convert Dart to native calls to use Pigeon (#7874) Add structured types and convert implementations to use typesafe method calls for platform methods from Dart to native side. Android analog of https://github.com/flutter/packages/pull/6601 Part of https://github.com/flutter/flutter/issues/117905 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [ ] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests commit c23f4be3d66c8f300043ca51d28e55d6e33b8326 Author: ftsui Date: Thu Oct 17 16:48:06 2024 -0700 [url_launcher] Decode file URLs before passing it to ShellExecuteW (#7774) - ShellExecuteW does not handle file: urls that contain %-encoded UTF-8 strings correctly. %-encoded ASCII strings are handled correctly, as are file "urls" that contain Unicode strings in its path component. - This change perform URL decode on file: urls before passing to ShellExecuteW. Fixes https://github.com/flutter/flutter/issues/156790 commit e19503e86f911ce26127291e25ba63a54401ba27 Author: LouiseHsu Date: Thu Oct 17 15:23:20 2024 -0700 [in_app_purchase_storekit] Add support for purchase and transactions (#7887) This PR contains the preliminary implementations for handling [purchases](https://developer.apple.com/documentation/storekit/product/3791971-purchase) and [transactions](https://developer.apple.com/documentation/storekit/transaction) Of note, as of StoreKit 2, the [result of a call to a purchase will only return a Transaction](https://developer.apple.com/documentation/storekit/product/purchaseresult) when the purchase is successful. If the status of purchase is pending, or cancelled, nothing will be returned. This is in contrast to StoreKit 1, where developers could check the state of a Transaction with [TransactionState](https://developer.apple.com/documentation/storekit/skpaymenttransaction/1411275-transactionstate). This means that migrating to StoreKit 2 will require developers to update their handling of transactions accordingly. Relands https://github.com/flutter/packages/pull/7574 commit a99f9e6e64a3d88f936bbfa6269a42e7ef298a9e Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Thu Oct 17 13:01:39 2024 -0600 [interactive_media_ads] Adds internal wrapper for iOS native `IMACompanionAd` (#7873) commit 5582669ac6d0899e60d2811eb42cea0a7aa84298 Author: Mairramer <50643541+Mairramer@users.noreply.github.com> Date: Thu Oct 17 15:10:21 2024 -0300 [two_dimensional_scrollables] Fixes TreeViewNode collapsing not working (#7474) Fixes [154295](https://github.com/flutter/flutter/issues/154295) This change addresses bug [#154295](https://github.com/flutter/flutter/issues/154295) by ensuring that nodes are handled correctly when closing their children. commit 870114d7aeeacafc7e4a7e98637bf79ee06a0962 Author: stuartmorgan Date: Thu Oct 17 10:32:23 2024 -0700 Revert "[in_app_purchase_storekit] Add support for purchase and transactions #7574" (#7886) Reverts flutter/packages#7812 See https://github.com/flutter/packages/pull/7812#issuecomment-2419280873 commit f12eda7db7ce02861cd0bbe91404a8f5920a64c7 Author: yaakovschectman <109111084+yaakovschectman@users.noreply.github.com> Date: Thu Oct 17 12:48:23 2024 -0400 [camera_android] Mark `description` in `sendCameraErrorEvent` as `@NonNull` (#7877) `sendCameraErrorEvent` is package-visible and only called in `Camera.java` and `CameraTest.java`. This should be test- and version-exempt, as it is essentially just an annotation change. Fixes https://github.com/flutter/flutter/issues/156729 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [ ] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version [following repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style [exempt from CHANGELOG changes]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests commit 6a4b660482cbd2a04e55c26ccff61f404b1cbbc1 Author: Chris Bracken Date: Thu Oct 17 03:29:17 2024 -0700 [image_picker_web] Loosen mime dep to >=1.0.4 <3.0.0 (#7879) Provides version interop for projects that depend on mime version 2.0.0 and later. The breaking version change was due to a change in the return value of `extensionFromMime`, which is unused in `image_picker`. See: https://github.com/dart-lang/tools/blob/main/pkgs/mime/CHANGELOG.md#200 Fixes: https://github.com/flutter/flutter/issues/156905 commit e973bf3d08a71ca922280d6d837ce68b140cce0e Author: FMorschel <52160996+FMorschel@users.noreply.github.com> Date: Thu Oct 17 07:17:39 2024 -0300 Removing unnecessary parenthesis (#7881) This is simply removing unnecessary parenthesis from various places inside the packages. This change is because of a change to the unnecessary_parentesis lint that will trigger in these places. Here is the CL https://dart-review.googlesource.com/c/sdk/+/390161. - https://github.com/dart-lang/linter/issues/4996 If anything else is needed please let me know. I'd like to ask for this PR to wait a bit until the bots are run again on that CL so that I can be sure nothing else will trigger, I will come back here and update this whenever everything is complete. Thanks! commit c1435edc9c5444eb255ca18f1e879fc7a02d0959 Author: LouiseHsu Date: Thu Oct 17 03:17:36 2024 -0700 [in_app_purchase_storekit] Add support for purchase and transactions #7574 (#7812) This PR contains the preliminary implementations for handling [purchases](https://developer.apple.com/documentation/storekit/product/3791971-purchase) and [transactions](https://developer.apple.com/documentation/storekit/transaction) Of note, as of StoreKit 2, the [result of a call to a purchase will only return a Transaction](https://developer.apple.com/documentation/storekit/product/purchaseresult) when the purchase is successful. If the status of purchase is pending, or cancelled, nothing will be returned. This is in contrast to StoreKit 1, where developers could check the state of a Transaction with [TransactionState](https://developer.apple.com/documentation/storekit/skpaymenttransaction/1411275-transactionstate). This means that migrating to StoreKit 2 will require developers to update their handling of transactions accordingly. Relands https://github.com/flutter/packages/pull/7574 commit a35f02d79d0e1d8267f2a31e35124f1ce6bde998 Author: Matan Lurey Date: Tue Oct 15 15:58:58 2024 -0700 Convert use of `mini_player` in the `video_player_android` test to `AndroidVideoPlayer`. (#7847) Closes https://github.com/flutter/flutter/issues/156424. Also improved an error message that came up as a result. commit 11adfdef7a7e1dd9932796f265e71bc03a8560dc Author: Maurice Parrish <10687576+bparrishMines@users.noreply.github.com> Date: Tue Oct 15 15:54:01 2024 -0600 [interactive_media_ads] Adds internal wrapper for Android native `UniversalAdId` (#7833) commit 57a250f63afcca07601f7bc3b919b04c4d58c5b1 Author: Dan Field Date: Tue Feb 20 10:26:07 2024 -0800 Relax http (#1041) * Relax http * update test package too * format; commit cd6b96c4a017b4a7741750c2ad34c1cef10bf58b Author: Dan Field Date: Tue Feb 20 10:13:01 2024 -0800 relax http (#235) commit 821cd418f317825d8331a958fd99e0fdbddeb5e6 Author: Dan Field Date: Tue Feb 20 08:54:04 2024 -0800 Use package:http, drop dart:html (#1038) * Use package:http, drop dart:html * Format commit 8d419a7e3d2f453dc3eeae4f8961e1ae82957eba Author: Dan Field Date: Tue Feb 20 08:23:16 2024 -0800 Use package http (#234) * Use package http * delete test commit 79f23b98a7c45f3b44899d69bacf7a0242dc651d Author: Dan Field Date: Tue Feb 6 11:34:03 2024 -0800 Save before clip (#232) commit cf8ca2a8f05d054dc4e27e06d75013be63d30ea1 Author: Dan Field Date: Mon Feb 5 10:28:39 2024 -0800 Get Github back up to date, update versions for latest publication prep (#230) commit e1cbf127a0b1c409c4a28e9fdc14e15db4370da9 Author: Jason Simmons Date: Mon Feb 5 09:55:29 2024 -0800 Apply a clip rectangle if a color filter is used (#229) Skia's SkCanvas::saveLayer does not implicitly clip to the bounds rect. See https://github.com/flutter/flutter/issues/142620 commit 347e0626588ea933f9e58ee59a9464b6b5545db1 Author: Dan Field Date: Mon Jan 8 09:58:40 2024 -0800 Scientific notation should not be case sensitive on the `e` parameter. (#227) * oops * Fix scientific notation parsing * Update packages/vector_graphics_compiler/test/parsers_test.dart Co-authored-by: Jonah Williams * Fix up analysis issues and half implemented test --------- Co-authored-by: Jonah Williams commit ab9bf4fcf89228004de50f069e007b438ab77b64 Author: Sam Rawlins Date: Tue Dec 5 13:49:41 2023 -0800 Avoid expanding the parameter type of operator== (#1017) Object.operator== takes an `Object`, and no Dart runtime passes a `null` value to an `==` implementation. SvgTheme's implementation should not have an expanded parameter type of `dynamic`. See https://github.com/flutter/flutter/issues/117838 for the overarching issue for Flutter. Co-authored-by: Dan Field commit 8fdc7acd853e4492cf7397b36cb14e1cf0a942b2 Author: Dan Field Date: Tue Dec 5 13:44:13 2023 -0800 ignore unnecessary cast commit 77fabaac88890b292009a44389c1bdba97c54b1f Author: Dan Field Date: Tue Dec 5 13:39:07 2023 -0800 skip out of date test commit 9dc43db4ec3f056f0b40a873d09738b4c034467c Author: Dan Field Date: Tue Oct 31 15:10:12 2023 -0700 Fix semver violation for SvgPicture (#1008) * Fix semver violation for SvgPicture * fix for older versions of flutter? commit 2663a4324f380aad0d1da8feffbbcb635710bb12 Author: Dan Field Date: Tue Oct 24 16:06:04 2023 -0700 missing file commit e82a974492f4ef37fc3091314c6bcba9ede4c4fa Author: Dan Field Date: Tue Oct 24 16:04:47 2023 -0700 fixes commit 30dcccf20582a674dd728a6aafb3e570e06905f3 Author: Andrew Brampton Date: Tue Oct 17 14:38:28 2023 -0700 Fixes issue where a incorrect key was being given to the ImageCache (#1000) * Fixed the hashcode in SvgStringLoader and SvgBytesLoader. It was accidently using the svg global object, instead of a local field. This caused caches (such as PaintingBinding.instance.imageCache) to misbehave. * Add a test which ensures the embedded image in a SvgPicture is not incorrectly cached and carried over. commit 00c6ee5d4642fac59df4f043e0de4021c4bf87eb Author: Andrew Brampton Date: Tue Oct 17 13:42:08 2023 -0700 Fixed formatting broken in https://github.com/dnfield/flutter_svg/pull/999 (#1001) I originally didn't format the debugFillProperties because that seems to be what happens in the main flutter library (presumably for better readability), but here it breaks the presubmits. So here is a quick `dart format`. commit 9869ae19d3ea9e20628ced04b435ba40d6d8df6f Author: Andrew Brampton Date: Mon Oct 16 09:58:13 2023 -0700 Added debugFillProperties to SvgPicture to enable easier debugging. (#999) commit 7d7e4f5d53569507c113e22203fff7054a0bdb73 Author: Levente Morva Date: Fri Oct 13 18:53:11 2023 +0200 Fix parsing transforms with scientific notation (#220) commit 2ecf14dd5ffb21f16aafe33a3a8628660a070bac Author: Dan Field Date: Wed Oct 11 20:15:16 2023 -0700 Avoid stack overflow when self-referential elemetns present, only use… (#218) * Avoid stack overflow when self-referential elemetns present, only use first ID * bumps commit d933650da8ec0d1a331d4a4f1f92b5a017c84b6a Author: Dan Field Date: Wed Oct 11 14:51:12 2023 -0700 fix analysis issues commit 9f85305ec1b3021f822b295a0d483c0f18261e90 Author: Andrew Brampton Date: Tue Oct 10 15:50:00 2023 -0700 Improve the error message every so little. (#216) commit 2873b3b1c50df59f177ce2b72d6bd1c426f2103d Author: fursan abdulhak <65540215+FursanAbdulhak@users.noreply.github.com> Date: Thu Sep 21 19:33:22 2023 +0300 add option --out-dir to packge vector_graphics_compiler (#215) * add option --out-dir to packge vector_graphics_compiler * reflect code to use path package * add unit test to option --out-dir * Lower path constraint --------- Co-authored-by: Dan Field commit 6cf1dfbb50486e28ad677d097c5dc42c5340f2cd Author: GP4cK Date: Fri Jul 14 00:57:12 2023 +0800 Adds DefaultSvgTheme (#964) commit dd0ba28d996a2ce1920e0e98b025e90b16c7fbf3 Author: Dan Field Date: Thu Jun 15 09:03:48 2023 -0700 Transform parser bugs (#208) * Fix parsing bugs in transform parser commit e4afb7b5331f70b49f1a3f8b025e6273b1aa5123 Author: Dan Field Date: Mon Jun 12 10:29:59 2023 -0700 Fix broken textDirection (#940) commit 5e4c73fef4e248fc303e432499357c1f25a4078e Author: Dan Field Date: Mon Jun 12 10:21:24 2023 -0700 Support matching text direction (#207) commit 5e696837b73f35d2a7536f7cb0abea55d92b9560 Author: tattuu Date: Sun May 28 04:12:34 2023 +0900 Fix typo in README.md (#929) commit e0d175cc957bde8af3037aa9da89d563342745a6 Author: Dan Field Date: Fri May 26 20:58:10 2023 -0700 License for _test commit fa4df358ae7910f18aa01efdd877d6da44777c3c Author: Dan Field Date: Thu May 18 11:20:44 2023 -0700 License file commit fe604e59981a73003a2e9d070f80a391b75589c4 Author: Dan Field Date: Thu May 18 11:19:24 2023 -0700 Fix analysis for CI, update changelog, roll v_g further (#924) * Fix analysis for CI, update changelog, roll v_g further * Update goldens commit 4e716d6fe6d09e7f1e5b9ef8e9a13335ba816967 Author: Dan Field Date: Thu May 18 10:35:53 2023 -0700 Fix text position computation (#206) * Fix text position computation * Bumps commit 1373fc3508988fd15d2571380ddcffd4c40c3ed6 Author: Mr John <38257989+MrJohnDev@users.noreply.github.com> Date: Thu May 18 08:33:28 2023 +0700 [deps] update vector_graphics to 1.1.5+1 (#923) commit a35d8a2a1b6bc73f330174974f20a2f9801cdf9d Author: Carlos Humberto Date: Mon May 15 16:38:57 2023 -0300 - fixed bug of Unhandled Exception: Null check operator used on a nul… (#204) * - fixed bug of Unhandled Exception: Null check operator used on a null value - which was caused by the href! of the function static void use(SvgParser parserState, bool warningsAsErrors) in parser.dart * - added test of use circle without href * - added forgotten update of test * format --------- Co-authored-by: Dan Field commit 71a764d3a9e3adfbc05a9c376b13898240e5508d Author: Dan Field Date: Thu May 11 16:06:03 2023 -0700 Update widget_svg_test.dart commit 4499792d13fe403550c2f55f21080e06ab834728 Author: Dan Field Date: Mon May 1 09:20:45 2023 -0700 rework example commit ce0cb4a4b0ff5b38a38601c5f5f5dc8636b5ddc2 Author: Dan Field Date: Thu Apr 27 09:07:21 2023 -0700 Fix optimization bugs in mask and overdraw optimizers (#203) commit 29214ebfb8ce2c453075909b19f4da62d1fb7220 Author: Dan Field Date: Mon Apr 24 10:57:33 2023 -0700 Fix assertions about image formats (#202) * Remove stray assert about image formats that is no longer valid * fix test, fix deprecations, bump xml package dep commit 85292f14e80ba397324146031b06fa61c56a6ca1 Author: Jason Simmons Date: Thu Apr 20 09:58:37 2023 -0700 Update test golden images for the latest Skia roll (#908) commit c841da48983cfddb189e2261225dc6a27828c7ab Author: Dan Field Date: Wed Apr 19 15:20:10 2023 -0700 Update README.md commit 3080b52d45672e6878954d98314044f4d8e433b1 Author: Dan Field Date: Wed Apr 12 10:17:02 2023 -0700 Fix text positioning when transform but no x/y or dx/dy (#201) * Fix text positioning when transform but no x/y or dx/dy * format * avoid encoding identity commit a0a25cd06f39d3a47532f29c3460097828754e45 Author: Dan Field Date: Wed Apr 12 09:25:46 2023 -0700 Support whitespace in transforms (#200) commit 9042f34d97f1f3d385700e9c9d922d88eb133a57 Author: Dan Field Date: Tue Apr 11 09:21:42 2023 -0700 update changelogs commit 2a4b2ce68ab8ed81e4637319e718d1f7873b8baa Author: SimonWeidemann <79831243+SimonWeidemann@users.noreply.github.com> Date: Tue Apr 11 18:16:18 2023 +0200 Add svg finder (#880) * Extract flutter svg to package * Add flutter svg test library * Adjust readme * Update and rename ci.yml to flutter_svg.yml * Create flutter_svg_test.yml --------- Co-authored-by: Dan Field commit 5822336666b995db65cda6a7635cbd82c772b040 Author: Marco Domingos <66222324+Marco4763@users.noreply.github.com> Date: Mon Apr 10 18:59:19 2023 +0100 Added support for a default error widget in case of any exception. (#196) * Added support for a default error widget in case of any exception. Co-authored-by: Dan Field commit bbeaf77ff896609365a8fa97eb348bb12d5124cd Author: Dan Field Date: Mon Apr 10 09:42:51 2023 -0700 Bumps for 2.0.5 commit bab2ce02e7b9df33142d32023ff36d89b762b36e Author: Dan Field Date: Fri Apr 7 20:49:14 2023 -0700 Consider colorMapper for cache key data (#902) * Consider colorMapper for cache key data * format commit ed44dca07a01d15e84a3c2e6a68799c0ced693e7 Author: chunhtai <47866232+chunhtai@users.noreply.github.com> Date: Wed Apr 5 09:48:48 2023 -0700 Migrates test to extends DefaultWidgetsLocalizations (#198) * Migrates test to extends DefaultWidgetsLocalizations * changelog * Update CHANGELOG.md commit d031806c8068058541673809a2b5b578ba997763 Author: Jonah Williams Date: Mon Apr 3 10:46:52 2023 -0700 Add support for encoding control points as half precision floating point (#197) commit 82eaa81ce249ee59735f0f1b4a81737efffef3d5 Author: Dan Field Date: Thu Mar 16 10:57:01 2023 -0700 Make cache respect SvgTheme (#890) commit 685758f430a0711e920cfe3aa0ce85a0d520ddb4 Author: Dan Field Date: Thu Mar 16 09:54:06 2023 -0700 Allow malformed UTF-8 (#889) commit a1a16a3d4dbd541777b79a100baa79b21f9aef0a Author: Dan Field Date: Tue Mar 14 15:07:56 2023 -0700 Remove unecessary file commit 246f5e4547c2b2affa19708876e36321bb238bd6 Author: Dan Field Date: Tue Mar 14 14:34:13 2023 -0700 bumps commit a8e36a2252bef6fdf12a7ccd74c0c15df9578f07 Author: Dan Field Date: Tue Mar 14 14:32:34 2023 -0700 Manage cache count correctly (#885) * Manage cache count correctly * Fix breakage commit 6c97d26443c1f4c4abd5c864704452205cbdc149 Author: Dan Field Date: Tue Mar 14 10:18:14 2023 -0700 Support more image formats, be more tolerant of badly formed MIME types (#195) * Support more image formats, be more tolerant of badly formed MIME types * Bumps commit 6c5b503b8dd2820597c60ddab4e7d892e31c1a2a Author: Dan Field Date: Mon Mar 13 10:45:30 2023 -0700 Fix fill rule inheritence, fix default fill application (#194) * Fix fill rule inheritence, fix default fill application * format commit e9819c64787e815adbccc0fe282f5a31d8395c37 Author: Fabian Klöckner Date: Mon Mar 13 17:18:38 2023 +0100 Reintroduce clip behavior (#860) * Reintroduce clipBehavior See https://github.com/dnfield/vector_graphics/pull/180 * Use vector_graphics PR, revert before merge * Update pubspec.yaml --------- Co-authored-by: Fabian Klöckner Co-authored-by: Dan Field commit c98bc778b78c731f09876fb32c3be8bbb6174b1b Author: Dan Field Date: Thu Mar 9 09:12:19 2023 -0800 Fix faulty cache assertion, bump vg (#879) * Fix faulty cache assertion, bump vg * fixes commit 8658728101454d6afe7a64b81d76c9b6ed233f24 Author: Dan Field Date: Wed Mar 8 19:04:54 2023 -0800 Improve text whitespace handling (#192) * Improve text whitespace handling * Format, update all pubspecs/changelogs commit 72cf2b4c5b7c3ab5c4527006e1ecfa8a0d71af40 Author: Dan Field Date: Tue Mar 7 09:07:14 2023 -0800 v1.1.2 commit b64e124083e8c304890b222de0ef5d98773c9793 Author: Dan Field Date: Mon Mar 6 19:38:27 2023 -0800 Make sure that attributes are inherited down all nodes with children, and handle "none" correctly. (#191) commit 04f70aa64df26637c517e002d0377c3f366e1f68 Author: Dan Field Date: Fri Mar 3 18:37:07 2023 -0800 Version bumps commit 82cd325f581f1382d7eff46a94506ba787dc0acd Author: Dan Field Date: Fri Mar 3 14:00:28 2023 -0800 Fix text parsing (#189) Track text positioning Properly inherit attributes from text/tspan Handle whitespace more like the browser does. commit 1212fc93c68020f169b7674dab42d762ee10357c Author: Dan Field Date: Wed Mar 1 10:03:01 2023 -0800 Preserve stroke-opacity (#190) commit 0fb0be1f06cf561b331f8c7b3b74d491b1e5e57d Author: Dan Field Date: Tue Feb 21 22:22:24 2023 -0800 Consume new vector_graphics commit 54709b8e0ed507216ea4ee628d53c1fc181bda1c Author: Dan Field Date: Tue Feb 21 21:58:54 2023 -0800 Fix currentColor, version bumps/changelogs (#188) commit 7e7e127d4ce5bc01957531de5d152d50bfb4d3db Author: Dan Field Date: Tue Feb 21 20:44:11 2023 -0800 correctly handle opacity and blending when in a saveLayer (#187) commit f43051b76a861f43871bb0abc5c24d083ca481a4 Author: Dan Field Date: Tue Feb 21 14:42:00 2023 -0800 Missing resolution when saveLayer or viewport is involved (#186) commit 1aaafbb2fccf7a514b34067504ae70b1485f48d9 Author: Dan Field Date: Sat Feb 18 08:53:16 2023 -0800 fix opacity on default fills (#185) commit 9ed6f7d221311344112d0f093829089bd7372fb5 Author: Dan Field Date: Fri Feb 17 17:40:46 2023 -0800 Scale stroke width when transforms are applied (#184) * Scale stroke widths * format * fix scale * format commit 4883e2936a0f6c9787a754de9acec1ae92019fdc Author: Dan Field Date: Fri Feb 17 16:00:00 2023 -0800 Fix inheritence for strokes and fills, particularly the w3 svg logo test (#183) commit 1ee57c57f617231c38fbd4af14fedb111b0be876 Author: Dan Field Date: Mon Feb 13 14:06:30 2023 -0800 Fix pattern tracking and application (#181) commit 786cb483d3a0e2380c54c94b77dfe06bd95f748e Author: Fabian Klöckner Date: Mon Feb 13 20:14:22 2023 +0100 Reintroduce clipBehavior (#180) * Reintroduce clipBehavior clipBehavior was deprecated in 2.0.0 without any notice in the changelog. It still works fine so this PR reintroduces the parameter. * Add tests to ensure clipBehavior is being passed correctly --------- Co-authored-by: Fabian Klöckner commit c27cac9c251cee14c8675f0e9dfcd85dddd6fdb4 Author: Dan Field Date: Mon Feb 13 09:35:29 2023 -0800 bumps for 2.0.1 commit 7f2b2bc8e23ae4d7ed0e62e0c94862b800aafc5e Author: Jonah Williams Date: Mon Feb 13 09:34:32 2023 -0800 disable isolate parsing in debug mode (#854) Co-authored-by: Dan Field commit 748001681bd73b58590a45cc2ef7155e29483927 Author: Jonah Williams Date: Mon Feb 13 09:09:31 2023 -0800 Hide vector_graphics_compiler types (#853) commit b11e216ecacf626866188da5aafeeabcb2ecd46b Author: Jonah Williams Date: Thu Feb 9 21:02:35 2023 -0800 Fix opacity peephole with complex nested groups + clip (#179) commit 093956c1e6deef5272c091866e83efee2f39a317 Author: Xavier H Date: Thu Feb 9 19:18:10 2023 +0100 Respect packageName in AssetBytesLoader (#178) commit 84a6550b5cf41ddf7751ced9f295fa36f7c04144 Author: Tomasz Gucio <72562119+tgucio@users.noreply.github.com> Date: Tue Feb 7 19:02:43 2023 +0100 Fix alpha channel parsing in hex colors (#172) commit 823a7517c68cf1b6647f219603107b5247e05225 Author: Dan Field Date: Mon Feb 6 11:14:33 2023 -0800 fix gradle versions commit 70c14b6bb93d8dfd493e870ed4773259d4aea7c7 Author: Dan Field Date: Thu Feb 2 22:06:49 2023 -0800 Packages (#838) commit 97d8e148731aea11949203f7b6061ab8793aa871 Author: Dan Field Date: Thu Feb 2 10:18:43 2023 -0800 Fix CI (#835) commit 8e62b6bed8ee3cba17cfc4a7b617f84ba4ec5d6a Author: Dan Field Date: Thu Feb 2 10:02:09 2023 -0800 more commit e8ec6c387bf6291c03c7c612dc8efcd2d42e95bd Author: Dan Field Date: Thu Feb 2 09:57:59 2023 -0800 Fix CI commit 4ec85378df67c285d6901f93b25f9f93e0eb89a5 Author: Dan Field Date: Thu Feb 2 09:53:16 2023 -0800 bumps commit 96e65c67cf577b3164c9637d6d9d04e9292ef04a Author: Dan Field Date: Thu Feb 2 09:11:03 2023 -0800 pub bumps commit 7db7c017c44867942dbbab91bd1fff22de401068 Author: Dan Field Date: Thu Jan 26 16:24:37 2023 -0800 Avoid defaulting to black fill for non-shape/text content. (#176) commit 78dc13ea229b8a0c645a71ae95d7f31140d79c3a Author: Dan Field Date: Fri Jan 20 11:09:05 2023 -0800 readme commit 0fe50dd6f7c453631841096d6216d9fafb89677f Author: Dan Field Date: Fri Jan 20 11:06:34 2023 -0800 fix pubspec commit e92e719ba4be1e3c63e245c5cf2d8d2f5e4d72d1 Author: Dan Field Date: Fri Jan 20 11:01:22 2023 -0800 more commit 1fdf4f5f89b749c609520298bc0958a94a0a9102 Author: Dan Field Date: Fri Jan 20 10:59:35 2023 -0800 changelogs commit 7d6702ebff5878bed1b61376629ac4be15ce45c4 Author: Dan Field Date: Thu Jan 19 15:04:19 2023 -0800 Correct matrix operation order for unusual combination (#175) commit c5e384c9ac802c17f21e08e23edbabce6cbbcdfe Author: Dan Field Date: Tue Jan 17 12:40:21 2023 -0800 Patterns work at runtime (#174) * Patterns work at runtime * fix analysis commit 3b8f0a08b547beb8c1accc3e7e4c7f11783193dc Author: Dan Field Date: Sun Dec 11 14:27:31 2022 -0800 Avoid anon closure (#817) commit 2bfb5e89e92b598957e20da737e6af59bb932749 Author: Jonah Williams Date: Fri Dec 9 18:25:07 2022 -0800 update readme to add more details about precompiliation (#816) * update readme * update versions for prelease and remove unused code * re-word and combine commit 857527280b266774ad8e052521c69dafe5dd1a2f Author: Dan Field Date: Mon Nov 21 09:27:57 2022 -0800 Drop unused deps (#808) * Drop unnecessary deps * Remove unused deps * MORE commit 078738d2f0cf890353c9a480bc5167c8675209c1 Author: Dan Field Date: Fri Nov 18 14:57:08 2022 -0800 Start using VG (#782) Use vector_graphics. Flutter_svg 2.0! commit 67a83fa0e0fbd39359116df365a403506fd73f79 Author: Dan Field Date: Fri Nov 18 14:22:56 2022 -0800 Version 1.0 bumps (#169) commit e727bb6af9c93523394b11c454e8ef9818133744 Author: Dan Field Date: Thu Nov 17 13:38:30 2022 -0800 Use the ImageCache for images in the SVG (#168) * Use the ImageCache for images in the SVG * finally commit b4dcd9cde0894e06762709b67949083437d4c4c9 Author: Dan Field Date: Wed Nov 16 16:59:15 2022 -0800 Support golden testing (#167) commit 1f66577d7cf76698530b619a59acd05b83aed5f2 Author: Dan Field Date: Fri Nov 11 23:08:54 2022 -0800 N'SYNC (#166) commit 13657b2ca5867995a07b83d09b1b0d5ce22d4017 Author: Dan Field Date: Thu Nov 10 13:39:09 2022 -0800 EVEN MORE SYNC (#165) commit 4fa00a14639a0b345139bd24f694729179f7cd2c Author: Dan Field Date: Wed Nov 9 20:26:00 2022 -0800 Make parsing synchronous? (#164) commit 115250509c84fb3c5269a3adf20dc778805ca9f4 Author: Dan Field Date: Wed Nov 9 11:38:41 2022 -0800 Scale images correctly (#163) commit ba536d22f11e5675b3634b60a55f344607afe362 Author: Dan Field Date: Tue Nov 8 16:47:36 2022 -0800 Images in defs (#162) commit b5801cd4cf6309d763bf5bf3eaa146fb3acab4c3 Author: Dan Field Date: Tue Nov 8 12:08:43 2022 -0800 Add clipViewbox parameter (#161) commit 88036ebe90ae3de93e02a2c47ad9059019d3a576 Author: Dan Field Date: Mon Nov 7 14:54:39 2022 -0800 All compile-time color remapping. (#160) commit 06e9cc9382ba6c010d4a053daf3011d6034ac30d Author: Dan Field Date: Sat Nov 5 13:33:22 2022 -0700 Add tool to validate pubspecs (#156) commit 88a7f7bfabb47b4af7e19d21ca443bb85ddb7861 Author: Jonah Williams Date: Sat Nov 5 13:33:00 2022 -0700 remove pool dependency (#157) commit 519a6c8472ee5a03cd049382c70475fbc54a853d Author: Dan Field Date: Sat Nov 5 11:21:39 2022 -0700 more... commit c5f0d44701cfb3d3e956b5c29258f5046ff59d3a Author: Dan Field Date: Sat Nov 5 11:16:52 2022 -0700 fix pool commit 3d7cd1b23476757399007284f6693f8d1941a2fd Merge: 9a97a1331 8d9dcb814 Author: Dan Field Date: Sat Nov 5 11:15:12 2022 -0700 Merge remote-tracking branch 'origin/main' commit 9a97a13318b31ac220cca5a212b5bf5039e6eda9 Author: Dan Field Date: Sat Nov 5 11:14:46 2022 -0700 pubspecs commit 8d9dcb814b2e78ba4567e37366ed4000f0a67183 Author: Dan Field Date: Fri Nov 4 18:45:47 2022 -0700 Allow build context to be nullable (#155) * Allow build context to be nullable * format commit f50b98a7a07bb8c120a511be71666b09c3845a38 Author: Dan Field Date: Fri Nov 4 13:20:49 2022 -0700 Make compiler safer for web (#154) * Make compiler safer for web * missing file commit 6c59070d24b89a880e3a91d0b4b0afd151ab5a85 Author: Ahmed Ashour Date: Tue Nov 1 16:22:55 2022 +0100 Remove `dead code` for uninitialized variable `definitionPaint` (#153) commit c6b9871b20002b00bc7f6e6eac367fbcca042543 Author: Jonah Williams Date: Thu Oct 27 13:26:33 2022 -0700 fix bounds of saveLayer (#152) commit b65cb97c4614ce1d148b4afc013403d06880613c Author: Dan Field Date: Tue Oct 25 10:21:26 2022 -0700 Apply transforms to more nodes, fix bugs in image transforms (#150) commit 56ca1d3550f771ce5d17db69c7e8859047f10f09 Author: Dawid Wysocki <62249621+TortillaZHawaii@users.noreply.github.com> Date: Tue Oct 25 10:48:07 2022 +0200 Fix typo (#799) commit 9e15bb80b37da9872c2681e94e5da95159adb7fd Author: Dan Field Date: Tue Oct 25 00:37:19 2022 -0700 version bumps commit bd5377a01e820220da60cf3ea317603bb2ed8ab2 Author: Feodor Fitsner Date: Mon Oct 24 22:09:32 2022 -0700 Apply image transform before translate and scale (#790) * Apply image transform before translate and scale * Added golden test * Fix SVG * Update image.png commit dfa0ca699e6a4ffba620388a569bfb01b5a230a4 Author: Dan Field Date: Mon Oct 24 12:00:29 2022 -0700 Fix clip transforms (#149) * Fix clip transforms * format commit c11458171734bb1657f0c94983624373f7a86644 Author: Feodor Fitsner Date: Mon Oct 24 10:24:30 2022 -0700 Transform clip path when applied to a group (#794) * Transform clip path when applied to a group Fix #136, #343, #566 * Golden test added commit 8cd544557388dc1d5dcbfd6e83f162b8299499e8 Author: Dan Field Date: Sat Oct 22 14:30:48 2022 -0700 Fix zero width strokes (#148) * Fix zero width strokes * format commit b2e20fccdddfd3e2f0e8324655c5603411656f0f Author: Feodor Fitsner Date: Sat Oct 22 13:25:39 2022 -0700 Strokes with zero width should not be painted (#798) Fix #797 commit 80e8d244b2dcfee805813c10f778f58e67acb774 Author: Dan Field Date: Fri Oct 21 20:54:21 2022 -0700 Support text-anchoring (#147) * Support text-anchoring * fix incorrect comment commit 30547c8ee0fcd3da9c7ad2246b5c49688582b519 Author: Dan Field Date: Fri Oct 21 16:52:51 2022 -0700 Support text decorations (#146) commit 30288dd20f0b6d303b7f20d76294f14f8e03a3e5 Author: Dan Field Date: Thu Oct 20 20:53:18 2022 -0700 missed commit 9adc819f6ef7a2e6c3898b2717255cad0f4412f1 Author: Dan Field Date: Thu Oct 20 20:51:48 2022 -0700 version bumps for 0.0.3 (#143) * version bumps * delete outdated test commit e8f278c77db8b4b1c3d3f3cb119dcaccba98cc57 Author: Dan Field Date: Thu Oct 20 08:20:17 2022 -0700 Wire up SVG theme related properties to compiler (#142) commit bcc89665f02fe69297f5c1de98d5f1521523efe4 Author: Jonah Williams Date: Thu Oct 13 16:36:07 2022 -0500 Add support for drawPicture rasterization strategy (#141) * Add support for drawPicture rasterization strategy * ++ * ++ commit ebafccec209fb096fc6f829fd4036228f58aed46 Author: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Wed Oct 5 16:52:21 2022 -0700 inlined the reading of code units (#10) commit 5c729ebdbc1f2cb6de6d3f5d52c769b05a0945f2 Author: Jonah Williams Date: Tue Sep 27 21:47:55 2022 -0700 HTML backend compatibility (#138) commit 83a07ee0132af5ccb2af5a78c09d06c3d55e54a3 Author: Dan Field Date: Fri Sep 23 23:37:39 2022 -0700 Avoid emitting empty paths (#137) commit 49c97ec7aa99f0b7fb8fbe2dd9ac234fdfdb5bd0 Author: Jonah Williams Date: Fri Sep 23 11:32:24 2022 -0700 add a hidden debugging format --dump-debug (#136) commit d1561e21338ebca0278ce9bbbbfe86aa4e11c761 Author: Jonah Williams Date: Thu Sep 22 17:01:17 2022 -0700 Allow processing SVGs in parallel with Isolate.run (#135) commit ddf18dc7c6bba4c9ea5ed691f4ff419d6e830ec6 Author: Dan Field Date: Wed Sep 14 14:23:51 2022 -0700 Fix fill type for applyOp (#134) * Fix fill type for applyOp * format * fix incorrect tests commit 2fcc58a8814ddac7f8c2920a73789b2d65ae2a61 Author: Dan Field Date: Fri Sep 9 10:10:57 2022 -0700 Be more permissive when parsing colors (#132) commit 20b909f99f6bc1ba6816ead8fe1838dd7e5c7439 Author: Dan Field Date: Fri Sep 9 10:09:46 2022 -0700 Colors (#773) * be more permissive about color strings * fix test * update goldens commit 1b142fcd7d92e9114fe3845600f181c0b30253d7 Author: Dan Field Date: Thu Sep 8 12:11:49 2022 -0700 Dispose paragraphs! (#131) commit 703a9a6bc6d1626e184c05bc3d957adab8a13eee Author: Dan Field Date: Tue Sep 6 10:06:13 2022 -0700 Dispose vertices (#130) commit 78b325e5beffd70aafdd88c61db5e6fc8058aaf9 Author: Joachim Nohl <43643339+nohli@users.noreply.github.com> Date: Tue Sep 6 16:36:04 2022 +0200 Update pub.dev links (#767) Co-authored-by: Daniel Flores Medina <78251680+Dev-dfm@users.noreply.github.com> Co-authored-by: Daniel Flores Medina <78251680+Dev-dfm@users.noreply.github.com> commit 291ca057f396e7c5543df051e7e1db84adff658b Author: Dan Field Date: Wed Aug 31 16:40:04 2022 -0700 Handle quads (#128) * Handle quads * missing case commit 2afe05271da29184b85d582d42f2c06966aaf8a2 Author: Dan Field Date: Wed Aug 31 10:05:24 2022 -0700 dispose things after using them (#127) commit b0417041a1e263746af4dfb0447421b348190011 Author: Dan Field Date: Thu Aug 25 13:33:51 2022 -0700 Fix typos, make exception more helpful if decoding fails (#126) commit 691613075602bd83fd052d0424c6cb3efb598c40 Author: Dan Field Date: Tue Aug 23 20:57:02 2022 -0700 Do not draw strokes unless a stroke color, pattern, or gradient is specified (#124) commit 16a1e6117e09fa479d79d2f7dd6bf2a45ea2c31c Author: Chiamaka Chukwuka <106709586+c-h-i-a-m-a-k-a-2@users.noreply.github.com> Date: Thu Aug 18 22:07:31 2022 -0700 Support (#110) commit 55d6f39b9dcfbf4b59f4d0294820826e915ad641 Author: Jonah Williams Date: Wed Aug 17 12:44:58 2022 -0700 correctly default image width and height (#120) commit 715b06326914b0419ac5d7bb143b9f0cee456bcc Author: Dan Field Date: Wed Aug 17 11:40:36 2022 -0700 Default image width/height correclty (#750) commit 2c9b87b8a6232cee399edf9223a6a3983e629725 Author: Jonah Williams Date: Thu Aug 11 13:38:38 2022 -0700 move native library tests into optimizer test suites (#118) commit 72f140c583e6461a2d5392d86495a1256465a5eb Author: Jonah Williams Date: Wed Aug 10 12:49:53 2022 -0700 updates for publishing (#116) commit 7275b98a17299b7faf923ec9105cf59d38d773c9 Author: Jonah Williams Date: Tue Aug 9 15:49:00 2022 -0700 make vector_graphics_compiler compile on the web again (#115) commit a00a31ee9891aa528099424d338e269c263fbdc2 Author: Dan Field Date: Fri Aug 5 11:23:51 2022 -0700 bumps commit f5f8ec9120ef5d4feea46f5d00a91be7ee9b7ea3 Author: Dan Field Date: Fri Aug 5 11:22:57 2022 -0700 handle PT values (#747) commit 8140201497076f30c3d3ac28ea8800bc05b34dc0 Author: Dan Field Date: Thu Aug 4 09:27:50 2022 -0700 Support point values (#114) commit 6ba8bed8466a14675958e2fec332e168e7e50d7f Author: Dan Field Date: Thu Aug 4 00:30:15 2022 -0700 Bump path_parsing (#113) commit 384c8eb960ce8ad66da3b03e34c39e2d425cfd56 Author: Dan Field Date: Wed Aug 3 17:58:24 2022 -0700 update goldens commit 509416f3c168bf9350bb34ac41695d389e634dae Author: Dan Field Date: Wed Aug 3 17:41:49 2022 -0700 bump path_parsing commit 74a10e99332e4bff0e4fdc14c3710e0b171b575f Author: Dan Field Date: Wed Aug 3 17:31:01 2022 -0700 Use radians when rotating matrix (#9) * Use radians when rotating matrix * less precision in tests commit 8c4b70b6a67a0abd264cfa4d2fa133804a82873d Author: Dan Field Date: Tue Aug 2 15:09:48 2022 -0700 Make examples work again (#111) commit 7003f59b77b81397e03d9141c7db82edc789b4f2 Author: Jonah Williams Date: Mon Aug 1 14:32:15 2022 -0700 add transform to image and replace transformRect implementation (#109) commit d36b725ab419f664a00e3658a207f6f23d54d190 Author: Chiamaka Chukwuka <106709586+c-h-i-a-m-a-k-a-2@users.noreply.github.com> Date: Mon Aug 1 10:44:24 2022 -0700 Overdraw Optimizer (#105) Avoids overdraw where possible for fills. commit 113d8c9f69001cfa45fef04342f7e9929b12b77c Author: Jonah Williams Date: Thu Jul 28 10:44:02 2022 -0700 Fix Transform and make encoding double (#107) commit 2bf9dc1c47f7c62b28c613abab8f13581d71c624 Author: Jonah Williams Date: Thu Jul 28 10:20:55 2022 -0700 Add compiler support for base64 encoded PNG image data (#104) commit 85ddede66bfe82c61ce320cb994b434da057dba5 Author: Jonah Williams Date: Wed Jul 27 17:43:02 2022 -0700 Codec and runtime support for images (#102) * Codec and runtime support for images commit 5661d3906ff9ce4d7bea4935f9c96d844c85ff56 Author: Chiamaka Chukwuka <106709586+c-h-i-a-m-a-k-a-2@users.noreply.github.com> Date: Wed Jul 27 16:19:24 2022 -0700 Removing uncessesary tesselator variables in path ops files (#103) * pushing all local work 7.6 * The rest of the files * applies mask to every node in group, started including clip node * Solves issue when of when mask's path nodes are embedded * Applies mask in visitPathnode, quits optimizing if stroke property set or empty intersection * some unit tests added * last test * Added path_ops to deps * Removed unused imports * fixed merge * tweaks: c * initial commit for ClippingOptimizer * .. * ... * fixed all issues from PR * .. * Added tests * ... * visitChildren * fixed PR round 2 issues * Update packages/vector_graphics_compiler/lib/src/svg/parser.dart Co-authored-by: Dan Field * .. * removes hard coded pathOps path * fixed analysis issue * fixed enum issue * fixed ci issue * Update packages/vector_graphics_compiler/lib/src/svg/path_ops.dart Co-authored-by: Dan Field * removed masking optimizer from parser.dart * Update packages/vector_graphics_compiler/test/masking_optimizer_test.dart Co-authored-by: Jonah Williams * Update packages/vector_graphics_compiler/lib/src/svg/masking_optimizer.dart Co-authored-by: Jonah Williams * fixed some issues * fixed issues * fixe d * fixed test string * Update packages/vector_graphics_compiler/lib/src/svg/masking_optimizer.dart Co-authored-by: Jonah Williams * removed dart core import * fixed import * ..." " * added command line maskingoptimizer flag fixed path ops dylib issue * . * .. * . * fixed dylib issue in masking_optimizer_test * fixed dylib issue in parser test * adds optimize-clips command line flag, allows for dylib to be loaded when needed for clipping optimier * removed ArgConfig * Update main.dart * Update end_to_end_test.dart * . * fixed ci issue * adds named parameters, fixes some of parser tests * All parser tests fixed * moved ffi components into separate file * fix named parameter * .. * updated parser tests * fixed formatting * Update packages/vector_graphics_compiler/lib/src/svg/clipping_optimizer.dart Co-authored-by: Dan Field * Update packages/vector_graphics_compiler/test/clipping_optimizer_test.dart Co-authored-by: Jonah Williams * fixed all PR issues * fixed dylib loading issue in end_to_end_test.dart * removing un needed path_ops variables Co-authored-by: Dan Field Co-authored-by: Jonah Williams commit 2b40be6c6e75e38319e47e9d2ddad3d0511db09c Author: Chiamaka Chukwuka <106709586+c-h-i-a-m-a-k-a-2@users.noreply.github.com> Date: Wed Jul 27 16:00:04 2022 -0700 Clipping Optimizer (#97) commit bb926228cd0cbaa7dc1691dde906e17df08246a2 Author: Chiamaka Chukwuka <106709586+c-h-i-a-m-a-k-a-2@users.noreply.github.com> Date: Tue Jul 26 22:13:49 2022 -0700 Added command line option for masking optimizer, and corrected dylib loading issue (#100) commit ec950bafd1e3d0baae50e295d7926c24e0f39c22 Author: Jonah Williams Date: Tue Jul 26 17:29:32 2022 -0700 update to 0.0.1 (#101) * update to 0.0.1 * Update pubspec.yaml commit f23a4e7b69d9cf7b37317eb4cf80c9baa16611af Author: Chiamaka Chukwuka <106709586+c-h-i-a-m-a-k-a-2@users.noreply.github.com> Date: Wed Jul 20 13:32:38 2022 -0700 Mask optimizer (#96) Optimize several cases of masking to avoid save layer. commit 28b73e5ffb581ed5f0e4387397fea9eadc5d718e Author: Chiamaka Chukwuka <106709586+c-h-i-a-m-a-k-a-2@users.noreply.github.com> Date: Tue Jul 19 14:02:08 2022 -0700 Migrate PathOps Lib to VectorGraphics (#99) Adds support for consumption of path_ops in the compiler. commit e0bd5b8201de1df8659bb4665e29d7939117eafc Author: Jonah Williams Date: Fri Jul 8 17:08:23 2022 -0700 Use toImageSync and remove tester workaround (#95) commit e6cf981b3ad6a20ae37b5631c5b123f55fbc64eb Author: Dan Field Date: Fri Jul 8 12:46:56 2022 -0700 Make analysis happy (#94) * Make analysis happy * mount check commit 31d3789d045166147cc1b4e46c46fa776ff315e7 Merge: 2ca00500f 7ce79b680 Author: Dan Field Date: Fri Jul 8 11:44:01 2022 -0700 Merge remote-tracking branch 'origin/main' commit 2ca00500f7c987b357364b80ea42275d3bb63d21 Author: Dan Field Date: Fri Jul 8 11:43:20 2022 -0700 Add a more interesting example, bump XML commit beec38545a8fe6d7332024514106b00e7d4a4554 Merge: 7d29bed8f 0cd3cb881 Author: Dan Field Date: Wed Jul 6 14:38:59 2022 -0700 Merge branch 'master' of github.com:dnfield/flutter_svg commit 7d29bed8ffc7490e94f0a890c5bbd3580026d956 Author: Dan Field Date: Wed Jul 6 14:38:44 2022 -0700 missing unused import commit 0cd3cb881d46da3f3ab7bf9915c75063346809af Author: matthewyan Date: Mon Jul 4 15:36:36 2022 +0800 format code (#554) commit 353c2cfeaab36266f56b928d0a4a451cf81e5079 Author: Dan Field Date: Fri Jul 1 20:10:06 2022 -0700 Update currentColor handling. (#730) * Update currentColor handling. Default currentColor to black, mirroring Chrome's behavior. Update callsites to parseColor so that they account for currentColor. Avoid setting a default currentColor on the root element when parsing. Avoid painting when Paint.color == null. commit 7ce79b6802cb0c98862a3b9c16bb0064662be2ce Author: Jonah Williams Date: Wed Jun 29 22:34:25 2022 -0700 use toGPU image (#93) * use toGPU image * update commit 7d886d4f0b933d3b29ff310e4ef24b4a808d6215 Author: Dan Field Date: Tue Jun 28 11:16:47 2022 -0700 fix whitespace, update simple example to be simpler commit 19bccf2ea84cc2e6e54d62707b6bdc4bdda8739f Author: Dan Field Date: Tue Jun 28 09:59:12 2022 -0700 version bumps commit 99fdddb2f94f7a158f5540b2da69c68d68c161e1 Author: Jonah Williams Date: Tue Jun 21 12:56:48 2022 -0700 make disposal non-fatal (#92) commit 43a81ae375dfb8ffdd7217d2e4c35e7c08b75bb9 Author: Dan Field Date: Tue Jun 21 10:46:28 2022 -0700 Fix 720 (#724) * Fix 720 * use Object.hash commit 15332b8c1bf9ac3310191e9139159f601452182b Author: Aliaksandr Luferau Date: Tue Jun 21 19:33:44 2022 +0300 Added the flutter_lints to the development dependency for project 'example' (#723) Co-authored-by: aluferau commit c1e31ab703b2f6d82064d2d66160fa46d876eb89 Author: Jonah Williams Date: Tue Jun 21 08:52:16 2022 -0700 add imperative picture loader (#89) commit 2198e41a2215291cef37099eb1ac3a0bb5355714 Author: Jonah Williams Date: Fri Jun 17 14:37:39 2022 -0700 update goldens for fractional translation (#721) Co-authored-by: Jonah commit 6992b374198d8d549f263430dccef2fb70f9e006 Author: Jonah Williams Date: Fri Jun 17 13:04:44 2022 -0700 prevent double dispoal (#90) commit 754fcad3c655177b676e10109dd91d92345db62a Author: Jonah Williams Date: Thu Jun 16 11:18:13 2022 -0700 Fix typos and create a version of the tessellator optimization that no-ops on web (#88) commit 6bdf45b11343112ed82c2fe08e044d5ed70cb067 Author: Jonah Williams Date: Thu Jun 9 20:42:25 2022 -0700 Add caching system for pictures and rasters (#87) commit 0da866fd4e112200dca22fb55904a3e66cf09b0e Author: Dan Field Date: Fri May 27 08:54:47 2022 -0700 Handle empty dash arrays (#83) commit 9c18d04d544298e8ebde2471a03fb9978ba9e1fe Author: Jonah Williams Date: Tue May 24 16:12:43 2022 -0700 use the same paint color as drawImage (#80) commit 82cb8ee8d8516debc0a8b023e867286113f8c53b Author: Dan Field Date: Mon May 23 22:20:33 2022 -0700 Avoid calling setState on a disposed state (#79) commit 5799cff9731ee70335bb0e659e40a95d1a4bc837 Author: Jonah Williams Date: Mon May 23 19:51:46 2022 -0700 cleanups (#78) commit 1b3fdebc672237714db1ff607794cc2a91d342cd Author: Jonah Williams Date: Mon May 23 10:57:34 2022 -0700 correct scaling approximation and ensure raster has sufficient resolution (#75) commit 3abf2865f77f20cbb0f9bf58174f171237d91ea1 Author: Jonah Williams Date: Mon May 23 10:37:05 2022 -0700 switch to animation for opacity, update docs (#77) commit 2b0e9f22fe84a14fa9e173f0c5f8774e4aeaf91d Author: Dan Field Date: Mon May 23 09:21:49 2022 -0700 remove stale files commit 40abd181fa21bf5006fe476f8ab4263526f898f1 Author: Dan Field Date: Mon May 23 09:20:21 2022 -0700 changelog commit 8c3522a8824554960abaf0dfa65c003f0d27e31f Author: Jonah Williams Date: Sat May 21 14:27:59 2022 -0700 Skip drawing anything if VECTOR_GRAPHICS_SKIP_RASTER is true in debug mode (#74) commit f8f6d75ace774af302d1285a82279993fa45186f Author: Dan Field Date: Fri May 20 16:21:24 2022 -0700 Super parameters are neat (#73) commit a46477dc4b79c36e0a2d747632d49f8007b4f03a Author: Jonah Williams Date: Fri May 20 11:32:54 2022 -0700 Filter/Opacity support and eager rasterization (#71) commit b9e8379f207f4f9a88bfd871ef5cda2f9371ff65 Author: Erdem Yerebasmaz Date: Fri May 20 00:33:11 2022 +0300 Update project to support flutter 3.0 (#713) * Update project to support flutter 3.0 - [Removed deprecated splash screen](https://docs.flutter.dev/development/ui/advanced/splash-screen#migrating-from-manifest--activity-defined-custom-splash-screens) - [Removed deprecated new in comment reference](https://dart.dev/tools/diagnostic-messages#deprecated_new_in_comment_reference) * Update pubspec.yaml * Update pubspec.yaml Upon review, the CI error appears to be in beta channel. I propose we use 2.11.0-0.1.pre as lower bound as it's the version that switches over to Dart 2.17. Co-authored-by: Dan Field commit a9396c79cff73459554a5248e47a3a3fabcecd5e Author: Jonah Williams Date: Wed May 4 20:15:07 2022 -0700 dont force extra compositing (#70) commit 1ee759da89bf47a15cebf25594eade0ddd49236c Author: Fabian Freund Date: Sat Apr 30 22:41:10 2022 -0500 Remove redundant canvas.restore() (#701) commit 6e9dce116c6d0f6854ff67979d42f425505100cf Author: Jonah Williams Date: Wed Apr 27 09:10:52 2022 -0700 Update tesselator to use args and visitor (#57) commit b9ae14af0fb5d903e3791948117b2381cd8df59d Author: Jonah Williams Date: Mon Apr 25 21:53:07 2022 -0700 Don't align float32 and encode control points and control point types separately (#66) commit 696a600d9d652102dc2a9da4d566813509759b19 Author: Dan Field Date: Mon Apr 25 20:58:20 2022 -0700 Clip the fitted box if it would overflow (#69) commit 4b89e8c4f6b332d78e158eca7a99828e983dabfa Author: Jonah Williams Date: Tue Apr 19 23:07:30 2022 -0700 add placeholder builder (#68) commit 2f7aea4075799142b2f517ec651f0a73698cd81a Author: Jonah Williams Date: Mon Apr 18 16:02:07 2022 -0700 Wrap picture in repaint boundary (#67) commit 1a330a513d7b3a04ba71e9dc7311d812b2b79e86 Author: Dan Field Date: Wed Apr 13 09:13:35 2022 -0700 Defer resolving paths for clips, add test for clips with use (#65) commit df786bcff5d851da6fe4322a97eb15fbfb8afd4d Author: Dan Field Date: Tue Apr 12 21:12:41 2022 -0700 Fix sizing, drive by fix for visitchildren on some resolved node types (#64) commit 7b8a89b857b79ccb08350cb1ec95fbb0ce7d16cf Author: Dan Field Date: Tue Apr 12 16:54:26 2022 -0700 Update vector_graphics_compiler.dart (#63) commit 4e973848bce14d2578a51e18ab6a952526eafce2 Author: Jonah Williams Date: Tue Apr 12 15:36:02 2022 -0700 Add semantic properties (#62) * Add semantic properties * is image * format commit 3e1b2c8192798d59f63115eb0d014b8ea860ea79 Author: Dan Field Date: Mon Apr 11 15:38:16 2022 -0700 Licenses (#61) * use Flutter BSD-3 and docstrings commit f67cd0bd612c5284c3a4f4d0714d82d60643893b Author: Dan Field Date: Mon Apr 11 13:54:12 2022 -0700 Fix for importing (#60) commit 37d336c747eb188d5a5e9cc1c13821e12070d671 Author: Dan Field Date: Fri Apr 8 16:22:05 2022 -0700 Cleanup and support web (#59) * Cleanup * delete ImageData * analyzer * jonah review commit a00f990266bf3734ddd70e7d66e9d6abb97dc61b Author: Jonah Williams Date: Thu Apr 7 17:54:52 2022 -0700 Forward opacity and blend mode down the tree (#53) commit cbf6848e473f0373f7825348f6704bae57d1ab56 Author: Jonah Williams Date: Thu Apr 7 16:40:45 2022 -0700 use arg parser to parse input options (#55) commit 7cd09a996c04ea7edd0fb8e041467930cf76b6e7 Author: Dan Field Date: Thu Apr 7 16:36:07 2022 -0700 Update path.dart (#56) commit 8184de97d225aa1893ebbc195628295be76a67af Author: Dan Field Date: Thu Apr 7 16:17:44 2022 -0700 Dashed paths (#54) commit 424198be4e4493f515d408d4a08a1cb84dbe0ea3 Author: Jonah Williams Date: Wed Apr 6 15:02:33 2022 -0700 Add Visitor API, use to implement resolution phase (#51) commit 8d9dce1d4ed91e4f9fd02c42fb8352d01fdcdffe Author: Dan Field Date: Mon Apr 4 09:33:52 2022 -0700 encode text transforms (#50) commit 7869abcdc251f8e7b1537213acb0ea77e9cacd98 Author: Jonah Williams Date: Fri Apr 1 12:45:18 2022 -0700 Add support for text (#40) commit d190056e4dda600eda39025927b0d30b2d4ddf82 Author: Dan Field Date: Fri Apr 1 11:08:44 2022 -0700 Tolerate missing references (#48) commit 33ef4d6c6f542e57deba8f765b0d8d6251c205d1 Author: Jonah Williams Date: Thu Mar 31 23:45:18 2022 -0700 create separate picture layer for vector graphics widget (#47) Should help with raster caching and DRM commit 0297ac3201934e4ad7212bbaa72df4c62ee2159b Author: Dan Field Date: Thu Mar 31 17:06:01 2022 -0700 Make sure that the loadBytes method gets called when dependencies change, add tests, make it easier use context from loaders while still being const (#42) * Make sure that the loadBytes method gets called when dependencies change, add tests, make it easier use context from loaders while still being const * Format, update analysis rules commit 77d132acbd2ba716fc3800dd5c7fcf8153ef95a2 Author: Dan Field Date: Tue Mar 29 17:27:54 2022 -0700 Update tiger.bin, update example, ignore platform folders in example (#39) * Update tiger.bin, update example, ignore platform folders in example * Update pubspec.yaml commit 1e90075ae2ce7480627fee52f321e3d47a572944 Author: Dan Field Date: Tue Mar 29 09:15:50 2022 -0700 Strokes can have shaders too (#38) commit 3dc2ce45f0bea4e27b7c3dc0d0a6c628323ac7cb Author: Dan Field Date: Mon Mar 28 23:08:31 2022 -0700 Reduce precision to save binary size (#37) * Reduce precision to save binary size * assertions commit e8040cca5030961c63b6ea0f39bc24cd95779099 Author: Dan Field Date: Mon Mar 28 21:38:14 2022 -0700 Gradient tranfsorm bounds (#36) commit 218c0f528d040b4ecfa24cb9a071c5e20f6f757c Author: Dan Field Date: Mon Mar 28 11:26:47 2022 -0700 Do not ignore blend mode when deciding whether to save a layer (#35) commit e4f0b67149001b59bebf9e13fe3927813cae80f4 Author: Dan Field Date: Mon Mar 28 09:25:14 2022 -0700 Fix missing stroke join (#32) commit b26bf0e9f688fc3aafd62d454268d17a34b6d910 Author: Dan Field Date: Mon Mar 28 08:09:10 2022 -0700 Fix gradient regressions, OoO support for use/gradients (#30) * Fix gradient regressions, OoO support for use/gradients - Defer resolution to build and assert resolution doesn't happen during parsing. - Fix regressions introduced in the last commit around userSpaceOnUse with transforms for linear gradients, and regressions around radial gradients in general. - Tests Things that are still wrong: - I noticed while working on flutter_svg's "devil" SVG test that blends are not being accurately applied to individual paths. I'll try to address that in a separate PR. - userSpaceOnUse gradients with transforms are not being applied correctly. This has been an issue in this repo forever, not a regression. Gotta figure out how to properly transform the gradient to the transformed path coordinate space. See https://github.com/dnfield/flutter_svg/pull/54/files#r216222991 and the test files added in that PR, which do not compile correctly today. * fix inheritence for gradient properties commit 78761ee83c29c79efa16f6cd11688cba6b193376 Author: Dan Field Date: Sat Mar 26 20:35:48 2022 -0700 Refactor parsing, start blend mode support, improve attribute inheritence/processing (#29) * Start supporting blends, major refactor * fix default stroke width, blend mode with masks, tests * better support for unordered elements. * docs * Test, save layer for opacity, make stops non-null commit be4662f6f28ffc7d95d564d01c77ae3f365ac33f Author: Dan Field Date: Thu Mar 24 14:37:57 2022 -0700 Remove linear gradient tranfsorms from codec (#28) * Remove linear gradient tranfsorms from codec * fix radial gradient with no matrix commit 54113fe1c9293118a997fc4532b3193645c4c54b Author: Jonah Williams Date: Thu Mar 24 13:32:32 2022 -0700 Allow encoding transforms for radial gradient, respect user space mode, and pre-transform linear gradients (#27) commit fb69efcd70cf24086ee52b692c22d04616a26122 Author: Dan Field Date: Thu Mar 24 09:19:55 2022 -0700 Support masks, refactor related code. (#25) * Support masks, refactor related code. - Move PathFillType off of Paint - Rename encodeSVG to encodeSvg - Update some slightly incomplete documentation - Refactor DrawCommand to use nullable ids instead of -1 - Add more tests. This makes about 30 or 40 more internal test cases pass. commit 2d6f3eebb7cdd7e8fe239f3601bcd69898f08be6 Author: Dan Field Date: Wed Mar 23 16:26:09 2022 -0700 Fix RRect parsing, make PathBuilder chainable (#20) commit 4f080687ab1047a5baff7af59e901dac1a8fa31e Author: Dan Field Date: Wed Mar 23 15:28:52 2022 -0700 Support clips (#19) * Support clips * Update tests, make deduplication part of builder * Update docs, asserts * match flutter_svg behavior for ooo clips commit b30635b2dab72ad2bd718d6db4e40f05aeb302a9 Author: Jonah Williams Date: Wed Mar 23 15:28:33 2022 -0700 compute correct scaling (#17) * compute correct scaling * remove set identity commit e1831f86b4261508ef628d4a2bba710d4864d025 Author: Jonah Williams Date: Tue Mar 22 18:48:37 2022 -0700 Remove assert (#18) commit b5a86b8b18409a4019aa66a6011df15ac05d1b03 Author: Jonah Williams Date: Tue Mar 22 17:44:03 2022 -0700 encode viewport into codec and correctly size widget (#16) * encode viewport into codec and correctly size widget * remove extra params * add more unit tests * format * just encode size commit 2b3368e3689dfbe8b410f2b4bb60450c799da0a9 Author: Dan Field Date: Mon Mar 21 16:28:28 2022 -0700 Small bugs (#15) * Small bugs * fix assert commit 1138ecc26ffcbdfcb614891709b9cbaa3b7fa0ee Author: Jonah Williams Date: Mon Mar 21 13:58:21 2022 -0700 correctly encode Uint16Lists (#14) commit c70e0d78990a9a46f825d03bf5022a36f177a21d Author: Jonah Williams Date: Thu Mar 17 12:30:28 2022 -0700 transform shaders into correct coordinate space (#12) commit cdb483f4bfbe6dfc4abd0e9b47ab8f5f1005bedc Author: Jonah Williams Date: Mon Mar 14 11:50:35 2022 -0700 add support for linear and radial gradient (#11) commit 55debbdaf7b1544ed9db411a2c576a63ff9efb70 Author: Jonah Williams Date: Thu Mar 10 13:42:14 2022 -0800 Add support for saveLayer/restore (#10) Adds support for encoding saveLayer and restore in the vector_graphics_codec. Makes the transform property of nodes in the compiler lazy, and re-arranges how nodes are built in order to make it easier to determine if a saveLayer is required. commit 881812b2a35f46fb8b0d0215a47b04034ee38d45 Author: Jonah Williams Date: Mon Mar 7 16:09:12 2022 -0800 Add support for encoding in the compiler, add basic example to package:vector_graphics (#8) commit 542f437a32cadf21e7edec869b676698ab86258b Author: Dan Field Date: Mon Mar 7 15:15:32 2022 -0800 Add some missing tests, fix bugs (#9) * Add some missing tests, fix bugs * format commit 542214984f4212b8f5ac643c6be3b36fa084c093 Merge: 9b6f415ce 2ec362363 Author: Dan Field Date: Mon Mar 7 11:25:47 2022 -0800 Merge pull request #6 from dnfield/ast Parsing, a few test cases commit 2ec3623636e70fbcf32ddbc82ad0a66f782120c4 Author: Dan Field Date: Mon Mar 7 11:18:23 2022 -0800 docs, light refactoring commit bb22019509d18059c33218f2da281cc92efef5db Author: Dan Field Date: Mon Mar 7 09:38:23 2022 -0800 Fix bug in optimizer and add tests commit bfc06f2ae6748de8071f0298753a2e11df4fb426 Author: Dan Field Date: Sun Mar 6 21:14:11 2022 -0800 .. commit 9d4d7d554f70e7e7c6f78155a4d140add17e5b4d Author: Dan Field Date: Sun Mar 6 21:11:52 2022 -0800 Remove unused code, add simpler test commit a7d5867b1edd51c060dbcd20c1ef1977570eed2b Author: Dan Field Date: Sun Mar 6 20:46:38 2022 -0800 bugs, tests commit 1d4eddd125dbf7e54bccbfd16c2f1ced17476ee0 Author: Dan Field Date: Sun Mar 6 16:54:25 2022 -0800 analysis options and cleanup commit c1373388d871680ff57aa7b5c928970802e757a7 Author: Dan Field Date: Sun Mar 6 16:33:21 2022 -0800 remove some commented out code, add some tests commit 1e01d5e41291780e19f3ec17c9d69a2919029a7a Author: Dan Field Date: Sat Mar 5 20:43:59 2022 -0800 Get prsing up and running, sort of commit 96131ebb527d77a86373690b513c3428516c06d2 Author: Dan Field Date: Fri Mar 4 20:21:21 2022 -0800 Make sure the SvgPictureState holds on to a handle (#674) commit 5b2d73257a11ae2b84c70c4259fc1414af3c310f Author: Dan Field Date: Wed Mar 2 17:00:51 2022 -0800 .. commit 9b6f415ce39a4c51c966e6eb51a62c7836aa3e0e Merge: 2dd336091 f112baf94 Author: Dan Field Date: Wed Mar 2 12:58:00 2022 -0800 Merge pull request #5 from dnfield/paint Add paint, vertices, indexed vertices, and tests commit f112baf944822d4fd2cbca6e48e375fe9d84382e Author: Dan Field Date: Tue Mar 1 23:02:04 2022 -0800 format commit 4e529fca002e39ecad3cb23f3619bb5909772186 Author: Dan Field Date: Tue Mar 1 22:25:30 2022 -0800 nit commit 79036fd43e38ba22b32b79fb7d60516cbe025230 Author: Dan Field Date: Tue Mar 1 22:24:54 2022 -0800 fix logic, update test commit 801a235f854a1ec087faa7b2db7d96b8a02a04df Author: Dan Field Date: Tue Mar 1 22:13:20 2022 -0800 Add paint, vertices, indexed vertices, and tests commit 2dd33609189a70ad1801bb717d4f8c6703b07562 Merge: f3b5c35cc b872ed1ec Author: Dan Field Date: Tue Mar 1 16:17:44 2022 -0800 Merge pull request #3 from dnfield/geom Add geometry classes commit f3b5c35cc1c33a67371cd68b245bfb777db0cca0 Merge: abe1c174f 7b3feeee6 Author: Jonah Williams Date: Tue Mar 1 16:12:36 2022 -0800 Merge pull request #2 from jonahwilliams/runtime add basic vector graphics asset commit b872ed1ec7e88f35559e2afac1e9c2223c8c19e8 Author: Dan Field Date: Tue Mar 1 16:06:31 2022 -0800 Format, update rules, jonah review commit e438d322e377085b7a71b8300fcb07d6c7161eab Merge: 9d07f48d3 abe1c174f Author: Dan Field Date: Tue Mar 1 16:02:50 2022 -0800 doc, merge, enable tests commit abe1c174f05dc36384a83b975f2f7d772b643de9 Merge: 66afbacc8 a2e472100 Author: Dan Field Date: Tue Mar 1 16:00:28 2022 -0800 Merge pull request #4 from dnfield/actions CI commit a2e4721005d5c7348bcb799c1b1a93f78d507c41 Merge: 074db4605 66afbacc8 Author: Dan Field Date: Tue Mar 1 15:53:54 2022 -0800 merge commit 074db46052d16e39891663ceda28de0be533d865 Author: Dan Field Date: Tue Mar 1 15:51:53 2022 -0800 .. commit 9d07f48d3e50dae4105a953079791cbf1b6d4bc1 Author: Dan Field Date: Tue Mar 1 15:45:10 2022 -0800 Update packages/vector_graphics_compiler/test/util_test.dart Co-authored-by: Jonah Williams commit 6fcce396f70f9a8413d8e2645d6fdfabe51a61e1 Author: Dan Field Date: Tue Mar 1 15:45:02 2022 -0800 Update packages/vector_graphics_compiler/test/basic_types_test.dart Co-authored-by: Jonah Williams commit af68ea260f1f4c97c65d10673c6adf393c7752e2 Author: Dan Field Date: Tue Mar 1 15:33:48 2022 -0800 Add geometry classes commit 7b3feeee65a2fe1d36ad3944a69bfbdac4abad8c Author: Jonah Williams Date: Tue Mar 1 14:42:40 2022 -0800 fix pubspec and CHANGELOG commit 6b0ae22f5f5c9c2da7a9bec4d357baf3362142ae Author: Jonah Williams Date: Tue Mar 1 14:24:41 2022 -0800 Remove equality and add more doc comments commit f2ea3d0247163488886454f0ced68290e566d626 Author: Jonah Williams Date: Tue Mar 1 13:41:59 2022 -0800 update paint construction commit f179ecb0be37e79fef7e89dbca68be454b664b30 Author: Jonah Williams Date: Tue Mar 1 13:23:14 2022 -0800 add more examples commit 87659e027288ed1ebebaf248eb7fd28159f0768b Author: Jonah Williams Date: Tue Mar 1 12:57:09 2022 -0800 example of controller commit 80857cbe43a9edc39b0f3efcdb8c01ad8ec5b051 Author: Jonah Williams Date: Tue Mar 1 11:42:34 2022 -0800 add basic vector graphics asset commit 66afbacc8de08cabf48c9f9f07793404b5895be5 Merge: 7713a4cc2 d6917b6db Author: Dan Field Date: Tue Mar 1 10:06:29 2022 -0800 Merge pull request #1 from jonahwilliams/encoder_decoder Add VectorGraphics codec and assorted classes commit d6917b6dbd50f26b2eff2fe51cca8bdf63a9abe0 Author: Jonah Williams Date: Tue Mar 1 09:25:51 2022 -0800 Add more tests and fix bugs commit 20677f1d5a4aeaaa2f60467ef6345b4263ff2d63 Author: Dan Field Date: Mon Feb 28 22:03:15 2022 -0800 Update .cirrus.yml commit 9215a66958e17a75661c300c8c09a446628dfec6 Author: Dan Field Date: Mon Feb 28 22:02:54 2022 -0800 Fix stroke attribute handling when gradients or groups are involved (#671) commit 06ee03a2511d2933e536a95cba4d22a23eb37c35 Author: Jonah Williams Date: Mon Feb 28 20:47:33 2022 -0800 remove package:typed_data commit fed0aaa4412081729b59a09f3b74cdc791096dc5 Author: Jonah Williams Date: Mon Feb 28 20:08:43 2022 -0800 Address review comments commit 8d9b990e54af8d1e8ea1ec9e4ea2c080f7f062c5 Author: jonahwilliams Date: Mon Feb 28 17:00:40 2022 -0800 add basic codec support commit 7713a4cc247276e08247c805f24dde6127d09f2f Author: Dan Field Date: Mon Feb 28 12:49:24 2022 -0800 Initial commit commit d5288a66cf8eee5a50002143c6695542d8e05eac Author: Dan Field Date: Tue Feb 15 12:15:44 2022 -0800 Fix bugs in picture disposal (#664) commit 01b7daff0385c6998bf3099809c53ffa2aabd2f7 Author: Jason Simmons Date: Mon Jan 24 16:45:33 2022 -0800 Update golden images for SkParagraph text rendering (#658) commit 8ee83041c5ba2990e390f01561681b2667957d13 Author: Dan Field Date: Fri Jan 21 11:44:27 2022 -0800 Make sure setting a render equal picture does not result in paint updates (#656) commit e47327d6665aae32d867f46637efbd78bdd6e364 Author: Dan Field Date: Tue Jan 18 15:57:11 2022 -0800 update changelog commit 51147218091afb3bd5ea1f58f1d09b2dfb774ae6 Author: Niklas Schulze Date: Wed Jan 19 00:56:31 2022 +0100 Paragraphs: Use longestLine instead of minIntrinsicWidth (#621) commit 10b145563179fff8eb15913206a4dfd8b3cc48d1 Author: Dan Field Date: Tue Jan 18 14:09:04 2022 -0800 bumps commit 9e56cd6de1018afc033fdeda27e2305c71471f9a Author: Dan Field Date: Tue Jan 18 14:07:35 2022 -0800 Avoid cache invalidation when currentColor/em/rem units change but do not affect SVG (#652) Track changes to currentColor and em/rem/ex units only if applicable to the SVG. commit c087399e4c61f543dec8f12aef81311795e5841a Author: Boluwatifẹ Date: Thu Jan 13 19:49:44 2022 +0100 Added support for "rem" units (#647) * Added tests for "support for rem units" * Added support for "rem" units commit 6ec438d0d0f50faea43e4fca45fba9358dd7f94c Author: Dan Field Date: Tue Jan 11 20:18:00 2022 -0800 drop mocktail dependency commit 20ac9f4c61b732456ac0a45eb52911a1d768e7f3 Author: Dan Field Date: Tue Jan 11 15:38:57 2022 -0800 Fix nested g in defs; sync*; v1.0.1 commit fbcc7aefe761c0e14e7599e4d92bcd0de03f4f03 Author: Dan Field Date: Tue Jan 11 11:36:23 2022 -0800 Fix bug in dash array update: zero values should be acceptable in some cases commit 12950f7524dbd1702c41978f51a75d9257a44942 Author: Dan Field Date: Mon Jan 10 16:41:02 2022 -0800 Avoid invalid dasharrays commit b2a5a91e387d23892d8fc3e4b243d80a583f3d00 Author: Dan Field Date: Mon Jan 10 16:13:45 2022 -0800 oops commit 6f76375949402a05176aa8c2aea277dadcdf438b Author: Dan Field Date: Mon Jan 10 16:12:24 2022 -0800 Fix bug where empty group can affect rendering commit fd2d37d309421f10cc42b9ea7067b4897785dc62 Merge: 00eee0af1 a5c9a2b6a Author: Dan Field Date: Mon Jan 10 13:04:22 2022 -0800 Merge branch 'master' of github.com:dnfield/flutter_svg commit 00eee0af1243c25c287e019af8a8c974ea00bcbe Author: Dan Field Date: Mon Jan 10 13:03:56 2022 -0800 Fix but in element fills, analysis cleanup commit a5c9a2b6a48e44efb776ffd8d549b223f4f6ba3c Author: Bartosz Selwesiuk Date: Wed Dec 8 18:31:31 2021 +0100 Add support for ex units (#618) * feat: add xHeight to SvgTheme * test: add SvgTheme xHeight tests * feat: use xHeight when updating PictureProvider in SvgPicture * test: add xHeight to DefaultSvgTheme and PictureProvider tests * feat: add support for parsing ex units * test: fix existing tests after introducing xHeight * test: add DefaultSvgTheme xHeight tests * test: add parseStyle xHeight tests (stroke width, dash array, dash offset) * test: add SvgParser xHeight tests (svg, use, text, radialGradient, linearGradient, image) * test: add SvgPicture xHeight tests for shapes (circle, rect, ellipse, line) * test: PictureProvider rebuilds a decoder when the theme changes * test: fix relative font size tests * test: add ex font size tests * test: fix DefaultSvgTheme tests * revert: SvgTheme equals operator should use runtimeType commit 371db5bd760a4e5b2ff7bac84e6938863cd1f8e7 Author: Đào Hoàng Sơn Date: Fri Dec 3 22:37:21 2021 +0700 Requires Flutter >=2.4.0 for LayerHandle usage. (#611) See https://github.com/flutter/flutter/commit/025397ae3f925b316991912977367d3263cc4432 commit e91e5915a589eac33d25951345309f32d7a0cce0 Author: Dan Field Date: Thu Dec 2 10:37:30 2021 -0800 Version bump information commit 94c7958f30b6ec9d9ff697f5c2e035efc62884e3 Author: Dan Field Date: Thu Dec 2 10:14:41 2021 -0800 1.0.0 commit a8ba7fecd10cf0ea3c31939660cd2a9e6fa9c3a1 Author: Dan Field Date: Tue Nov 30 11:29:13 2021 -0800 Update xml_parsers.dart commit 559face505686568543d59bbfd6f7a50dcf4dab9 Author: Dan Field Date: Mon Nov 29 23:07:35 2021 -0800 Update picture_provider.dart commit 77513856cc629bc3f051e332423a969227a305e7 Author: Dan Field Date: Mon Nov 29 16:47:37 2021 -0800 Update picture_provider.dart commit f76c1d8d2f0a2e3fb5e25b665c3c613123e3718f Author: Bartosz Selwesiuk Date: Thu Nov 18 21:37:40 2021 +0100 Add support for em units (#605) * feat: add parseDoubleWithUnits to calculate em values * feat: add fontSize to SvgTheme * feat: add fontSize to SvgPicture and PictureProvider * feat: use parseDoubleWithUnits with SVG elements that support em/ex * fix: PictureProvider should rebuild if currentColor is null * test: fix tests after introducing fontSize * test: add DefaultSvgTheme fontSize tests * fix: update SvgTheme hashCode to include fontSize * refactor: replace currentColor and fontSize SvgPicture properties with SvgTheme * test: fix parseDashOffset tests * test: add parseStyle fontSize tests (stroke width, dash array, dash offset) * test: update parseStyle test names * test: add missing DefaultSvgTheme tests * fix: do not print a warning when using em units on the root svg width/height * test: add SvgParser fontSize tests (svg, use, text, radialGradient, linearGradient, image) * test: add SvgPicture fontSize tests for shapes (circle, rect, ellipse, line) * test: PictureProvider rebuilds a decoder when fontSize changes * test: use SvgTheme.empty in tests * test: add relative font size tests * build: update path_drawing to ^0.5.1+1 * feat: use default SvgTheme * fix: typo * refactor: make PictureInfoDecoderBuilder receive an SvgTheme rather than a list of properties * test: fix PictureProvider tests that use SvgTheme * fix: initialize default decoder when PictureProvider is created * feat: PictureProvider loadAsync should return non-nullable PictureInfo * feat: fallback to default SvgTheme if null theme is set * feat: make PictureProvider theme non nullable commit 7520174eaf7a4afcb6010aeaa7ba282f97b83988 Author: Dan Field Date: Sun Nov 7 20:39:44 2021 -0800 Fix issues with hashing mutable objects commit 1e63469e3e184dd239d63810f79bbe19b0999c85 Author: Dan Field Date: Wed Nov 3 17:04:56 2021 -0700 version bumps commit 8dffeb7130e1d0f8ce941ac8d83bc638c62e100b Author: Dan Field Date: Wed Nov 3 17:03:55 2021 -0700 Remove difficult to use flag commit 7c646a2a5a23920121afa007d0bead68c0fa8660 Author: Sarbagya Dhaubanjar Date: Thu Oct 28 22:41:42 2021 +0545 Conditionally import `File` from `dart:io` (#613) * added conditional `File` * replaced usage of `dart:io` with conditional file commit e4ecef6bfc79ed83967c996d8557a937f4a48641 Author: Dan Field Date: Fri Oct 15 21:11:31 2021 -0700 Make new painting method opt in to allow migration commit 700a145a441fa9e32c497bd78a6949ce64a1643f Author: Dan Field Date: Wed Oct 13 00:36:34 2021 -0700 Fix layer reuse, add regression test (#608) * Fix layer reuse, add regression test * Make golden a little more tolerant commit 0442e13ac30dab90c2f842c1dcf06358012cd932 Author: Dan Field Date: Tue Oct 12 22:39:03 2021 -0700 Improve performance when an animation is present over the SVG (#592) - Use repaint boundaries and layers to make sure that SVGs are more raster cache friendly with current limitations in Flutter - Avoid repatining SVG every time an overlapping animation moves - Release picture memory eagerly commit 5c3992eacd2da543bc39a95fb233d78ca8884338 Author: Dan Field Date: Tue Oct 12 22:16:25 2021 -0700 Bump again commit 0ef6944464bb6cfdbe8a3dad138195e8bdc9d6aa Merge: 10564fc55 ecde86537 Author: Dan Field Date: Tue Oct 12 22:14:16 2021 -0700 Merge remote-tracking branch 'origin/master' commit 10564fc55127e7e3a1d73b46589bdc53c95da32f Author: Dan Field Date: Tue Oct 12 22:12:47 2021 -0700 bumps commit ecde865370fb17057235c55377e2f6f4b5870c16 Author: Dan Field Date: Mon Oct 11 11:56:39 2021 -0700 Make the SvgTheme change less breaking (#606) commit c444f12b65f2649de1e76a227bbabcebc55f28a4 Author: Dan Field Date: Fri Oct 8 16:15:54 2021 -0700 Update flutter_svg.dart commit 07cd7f3670fdbdadc986e3f776411dbf29a96383 Author: Bartosz Selwesiuk Date: Sat Oct 2 00:15:50 2021 +0200 Add support for `currentColor` to `SvgPicture` (#602) commit 950e720e149d84f247979b5ca4add16b7c8bf6dd Author: Lee Standen Date: Tue Sep 14 17:05:55 2021 -0700 Add hacky support for currentColor (#588) * add support for currentColor * refactor to support passing colors down from parent * add another circle to show override works * revert strokeColor change for avd Co-authored-by: Lee Standen commit cafa69ef0718b97d922e7cbf9d15fa733b51ffc9 Author: Dan Field Date: Mon Aug 23 10:55:59 2021 -0700 update opacity commit b1531dd511b37ade9595ce58cceb7415bfbd4f6a Author: Dan Field Date: Mon Aug 16 12:21:24 2021 -0700 ignore avoid_classe_with_only_static_members for now commit ae4354c89bb8e3809a074931320f8d1a39074522 Author: Jim Graham Date: Mon Aug 16 12:17:12 2021 -0700 add a simple scrolling benchmark for the example (#583) * add a simple scrolling benchmark for the example * fix analyzer errors and remove print statements * pub get Co-authored-by: Dan Field commit e414bbf2aa2e2ed9c313e1864dcf7d1b5d5a0083 Author: Nikita Mishkov Date: Mon Aug 16 21:29:43 2021 +0300 Unused parameter `bounds` of method draw() (#584) * updated README commit a2deca0d60c1ff1bb55c66d8548b4c5884cd1127 Author: Dan Field Date: Mon Aug 16 11:09:30 2021 -0700 pub get commit d22408531b9828120e243969dbeb28f7e068dc3b Author: Jim Graham Date: Thu Jul 15 09:31:40 2021 -0700 change golden file compares to allow +/- 1 in color components (#575) * change golden file compares to allow +/- 1 in color components * accept format results (only for files changed here) * explicitly require rawRgba bytes commit 1ee9864b7fb8454a93d8c013bbdf9c65d01a112a Author: Niklas Schulze Date: Tue Jun 1 17:59:12 2021 +0200 Add support for xml:space (#563) commit 04b15f4f0a1a8f50bc849d3980b6e839acf597ec Author: Niklas Schulze Date: Thu May 27 19:58:46 2021 +0200 Add text-decoration support (#562) * Add text-decoration support * add golden Co-authored-by: Dan Field commit db087a11165657a151c644997dcd3dd9af850482 Author: André Sousa Date: Sun May 23 13:04:17 2021 -0300 Implemented text-style parser (#556) * font-style attribute parser commit 1e7976cd2cfa4dda60fe220b5b5cc3401948ab5d Author: Jason Simmons Date: Tue May 18 12:25:29 2021 -0700 Update for the latest Dart analyze unnecessary_import check (#555) commit 09c1753b600f1d91ef4c4e523d27979a781ff2e6 Author: Dan Field Date: Mon May 10 16:44:48 2021 -0700 skip golden test on non-linux commit c47e261903ff91a06a36d76f3a2a9dbe9f15a99f Author: Dan Field Date: Mon May 10 10:08:45 2021 -0700 sort directives commit 2c5faf2ab08ce3b350db20c93a23938a0e461f47 Author: Dan Field Date: Wed May 5 01:52:22 2021 -0700 missing bump commit 2136ce7d05154cb6760764f9cb14cb0c12ac27a0 Author: Dan Field Date: Wed May 5 01:51:18 2021 -0700 version bumps (#547) * version bumps * fix coverage for non-write users commit fffa330bd4698c0f9a976142a98fbf7077d35337 Author: jefflim-google <52889965+jefflim-google@users.noreply.github.com> Date: Wed May 5 16:15:54 2021 +0800 Improve performance of SVG parsing (#546) * Improve performance of SVG parsing The previous code used to iterate through a list of XmlEventAttributes for every call to getAttribute. The newer code constructs a Map, and looks up the attribute name directly. This seems to show a 30% overall reduction to svg parsing costs. * Fix lint issues highlighted by github * Fix typo commit 787fa6ca4c42c175c468899b2c202dde4dbb7858 Author: Dan Field Date: Wed May 5 00:42:40 2021 -0700 versioning bump commit 9eb9ad5cf0d603dd41956f3fbbe2716b9155ed49 Author: jefflim-google <52889965+jefflim-google@users.noreply.github.com> Date: Wed May 5 15:41:32 2021 +0800 Improve path_parsing performance. (#6) * Improve path_parsing performance. This code: * Avoiding String.codeUnits. * Reduces lookups to String.codeUnitAt * Caches _length * Builds integer value in a single pass. String.codeUnits on both JS and VM returns a forwarding CodeUnits class defined here, so all lookups to codeUnits[index] actually go through an extra layer of dispatch. Combined, all of these changes improve the parsing speed by ~25% when measured with real SVG path data. parseSvgPathData() timing, measured on a Nexus 2 downclocked to 1GHz. Before: Run1: 76,124,392 us Run2: 75,103,426 us Run3: 75,481,128 us After: Run1: 59,319,622 us Run2: 58,435,315 us Run3: 58,478,007 us * analysis cleanup Co-authored-by: Dan Field commit 1c57912fe6048f18abca5d1618f13bf5c567287f Author: Dan Field Date: Wed May 5 00:34:05 2021 -0700 Update .cirrus.yml (#7) commit 066de3dd4d175d141a85b094d79266b9597cba09 Author: Dan Field Date: Wed Apr 21 22:58:22 2021 -0700 expose cache on PictureProvider so that users can change the limit (#538) commit d81c688aaa593224e99e2fb8125b55f4d8442f30 Author: Dan Field Date: Wed Apr 7 11:48:32 2021 -0700 Fix alignment issues again (#530) commit 4660e079b4f2c4aff7a89c2542ccc13b318441d1 Author: Dan Field Date: Tue Apr 6 16:15:54 2021 -0700 stable nullsafe release commit d1739c414d89cb2a110c1b2ad5c2c95920c8df6b Author: Dan Field Date: Tue Apr 6 16:10:46 2021 -0700 Nullsafe stable release commit cc99d58446c07122ea81a3648f4658088972b5f4 Author: Dan Field Date: Tue Apr 6 16:07:14 2021 -0700 Fix sizing issues (#529) commit d270754f397f031b08770b595a798c5f7af0cad2 Author: Dan Field Date: Mon Apr 5 11:24:22 2021 -0700 missing docs commit db9ff7eb4f9add46401b6b806761cdbdbc907136 Author: Meiwin Fu Date: Thu Apr 1 01:59:02 2021 +0800 Refactor attribute localName check (#525) Existing implementation uses replaceFirst API which will create a new String. This change replaces it with `localName` API of XmlEventAttribute which internally uses substring. The end result is overall faster parsing. commit d1cafd619c661546f7df0cbe03e471d052b62fd4 Author: Dan Field Date: Tue Feb 23 20:15:42 2021 -0800 version bump/cleanup commit a9ec352cd905ed94a49efdf7a7944460f8bbcb73 Author: Dan Field Date: Tue Feb 23 14:13:16 2021 -0800 Fix sizing when no width or height are specified (#500) * Fix issue with the SvgPicture widget sizing when no width and height are specified Co-authored-by: ramsestom commit ed0a6b4eac02200cc11c4621e6c17a9b869fd62e Author: Dan Field Date: Mon Feb 22 10:29:03 2021 -0800 put key into errors (#497) commit b629bc1ca9082aa545fe69660efce3fe452ea6b2 Author: Dan Field Date: Fri Feb 5 15:56:14 2021 -0800 recreate example project commit b72bc02718d3c1f2db7fa7488e3102f9989d651e Author: Sam Rawlins Date: Fri Jan 22 09:40:39 2021 -0800 Remove return stmts from Future.catchError (#477) * Remove return stmt from Future.catchError * Remove one more return statement * Replace empty return for control flow commit 2bee4e1642e8e097c8c8841563570e02a5d897ad Author: Dennis Kugelmann Date: Tue Jan 19 21:34:32 2021 +0100 Add warningsAsErrors option for parsing SVGs (#474) Add a flag to treat unhandled elements as errors rather than warnings. commit f3d4f00ef8c88f73d80945c157e9bd23574fe998 Author: Sam Rawlins Date: Tue Dec 22 10:27:18 2020 -0800 eturn valid type from Future.catchError. (#469) An upcoming feature to the Dart analyzer [0] will report Future.catchError [1] `onError` handlers which return values of invalid type. Currently this is not reported because the `onError` handler function type cannot be accurately expressed. An `onError` handler for `Future.catchError` must be either `FutureOr Function(dynamic)` or `FutureOr Function(dynamic, StackTrace)`. In either case, the return type of the function is `FutureOr`. This CL corrects `onError` handler(s) to return a value of a valid type. [0]: https://github.com/dart-lang/sdk/issues/35825 [1]: https://api.dart.dev/dev/2.12.0-149.0.dev/dart-async/Future/catchError.html commit 531934712f3d7a5e1c9287343b21671b514371b8 Author: Paul Berry Date: Wed Dec 16 17:59:45 2020 -0800 Remove dead code. (#465) commit 6ef73049a6b7e10c62ac01efefeb4eb82bbf7f1b Author: Dan Field Date: Wed Dec 16 11:03:29 2020 -0800 typo commit 22f1a9f17838897ae9ebbbe7bed6d1ee0902de42 Author: Dan Field Date: Wed Dec 16 10:46:17 2020 -0800 broken image link commit 1c19d14b574dfb4e0cea565d9e7dd3dcf8259636 Author: Max Oehme Date: Wed Dec 9 19:30:46 2020 +0100 Fix Issue #317 headers were not passed to http client. (#342) * Using SvgPicture.network with headers was not possible since headers were not passed to the http get request function * test * bump versions Co-authored-by: Max Oehme Co-authored-by: Dan Field commit 49f6a71bec54738aa0997cf7de501227b935728f Author: Greg Spencer Date: Fri Dec 4 12:15:26 2020 -0800 Switch to using maybeLocaleOf instead of localeOf (#443) commit 1bbdbb1815b053bcc4e2914774258265f9605cbb Author: Dan Field Date: Thu Dec 3 10:20:30 2020 -0800 remove unnecessary package:collection dep commit 0d2b1282b2e5b28f892f21bce0752a731783bf0a Author: Dan Field Date: Thu Dec 3 09:50:03 2020 -0800 changelog commit e665f27203333cdfb77af024043c150885db951b Author: Dan Field Date: Thu Dec 3 09:48:14 2020 -0800 Nullsafety migration (#454) Remove mockito usages Use the dart migrate tool Remove one instance found of a dead function (mergeOpacity) Fix up usages of catchError commit a5da1d1145c2aaac475b93ad74134ed84c2b09f6 Author: Jason Simmons Date: Mon Nov 30 12:31:04 2020 -0800 Update golden images for the latest Skia roll (#461) commit bd987eef8c8e35123c998369fbfbabfb8b7f6110 Author: Michael Goderbauer Date: Fri Nov 20 15:53:28 2020 -0800 Prepare for dry layout feature (#450) commit 9f004d365857fbd87fd2941319be75d6821b10ed Author: Dan Field Date: Thu Nov 19 16:49:12 2020 -0800 version bump commit 6e9d914f4aa557cb4ab476e25fc9750037b528b1 Merge: ed54eb548 69bb7ad78 Author: Dan Field Date: Thu Nov 19 16:48:38 2020 -0800 Merge branch 'master' of github.com:dnfield/flutter_svg commit ed54eb5485cf650442252b8ad2680c9f7a9cbf4c Author: Dan Field Date: Thu Nov 19 16:48:36 2020 -0800 tests commit 69bb7ad78841e84a7035c7612fb6cc488245d1b8 Author: Dan Field Date: Thu Nov 19 16:48:27 2020 -0800 revert golden commit d9f212cde9321eb2d83e1b6a3cb496eb1792f94a Author: Dan Field Date: Thu Nov 19 16:37:36 2020 -0800 bug in last one commit 5148828275dc9db555ede71c86c4d149c589463d Author: Dan Field Date: Thu Nov 19 15:30:19 2020 -0800 Allow options around caching for color filter(s) (#452) * Allow for a global override of how color filtering is handled wrt to the cache, and allow individual widgets to opt in or out * update golden commit d4971c2d17f08c192f5dafb961d1f7124bd08eec Merge: c892738db 95bd4b54a Author: Dan Field Date: Mon Nov 9 13:54:03 2020 -0800 Merge branch 'master' of github.com:dnfield/flutter_svg commit c892738db1cdb14808ae60ea0a294e09861c838f Author: Dan Field Date: Mon Nov 9 13:53:57 2020 -0800 make example unpublishable commit efb8ea7bc8d422e5f5dae2c269bff9f2e1b5412e Author: Dan Field Date: Mon Nov 9 13:52:02 2020 -0800 cirrus commit 6d0d265c7e07d9d5a2c8fabda9b52940f17f3a49 Author: Dan Field Date: Mon Nov 9 09:36:14 2020 -0800 Null safe (#4) commit f0df45aeb7964b432c87e9de15586d1240725712 Author: Dan Field Date: Mon Nov 9 09:32:00 2020 -0800 Null safe (#3) commit 95bd4b54a3adc9c4a1e719bff2d38cdb06c98084 Merge: 326d14c4b 8018e3954 Author: Dan Field Date: Fri Oct 30 13:27:53 2020 -0700 Merge pull request #435 from goderbauer/maybeOf Migrate to Directionality.maybeOf commit 8018e395443f6ed9a94d58dbb78d221522140a08 Author: Michael Goderbauer Date: Fri Oct 30 13:01:49 2020 -0700 Update flutter version commit 326d14c4bdc6de136dad281f549750614224ada3 Merge: a30871b96 763006a41 Author: Dan Field Date: Tue Oct 27 16:21:38 2020 -0700 Merge pull request #437 from dnfield/cirrus master too commit 763006a415aad3b9e730c85c16f4a5485bc34998 Author: Dan Field Date: Tue Oct 27 16:16:45 2020 -0700 upgrade commit 7a88251f537df00568457e101065ea047ebef967 Author: Dan Field Date: Tue Oct 27 16:13:31 2020 -0700 master too commit a30871b96354ad8f89e8e83d9c337c161ee6bf2a Author: Dan Field Date: Tue Oct 27 16:07:36 2020 -0700 drop Travis commit bdc443bccddaa569cbe8b34d952692847db5e176 Merge: 8e8c61ecf 1294a4f13 Author: Dan Field Date: Tue Oct 27 16:06:56 2020 -0700 Merge pull request #436 from dnfield/cirru cirrus CI commit 1294a4f13dfd6f3b904d3fdc6f5fc25d19379dff Author: Dan Field Date: Tue Oct 27 16:00:00 2020 -0700 coverage.. commit aa431cda9db6788b56a51cd6dc571c9e95561712 Author: Dan Field Date: Tue Oct 27 15:55:34 2020 -0700 coveralls? commit c73aa872c6a641c5e7a4a7085052692a962be3b6 Author: Dan Field Date: Tue Oct 27 15:48:32 2020 -0700 cirrus CI commit e22b7624fe8b98fddebaf37ae88482c0ab329bd7 Author: Michael Goderbauer Date: Tue Oct 27 14:59:44 2020 -0700 [WIP] Migrate to Directionality.maybeOf commit 8e8c61ecfec7c6f5dcbf6da27cf15b70486fb033 Merge: b801431fc 4094318ae Author: Dan Field Date: Mon Oct 19 12:52:01 2020 -0700 Merge pull request #432 from dnfield/fix_cf Fix colorfilter when BlendMode.color is used commit 4094318ae488d935915ab706701e0407e59bec70 Author: Dan Field Date: Mon Oct 19 12:51:50 2020 -0700 sort deps commit 23684230782243af8ec6cf3a61716d4bee786a00 Author: Dan Field Date: Mon Oct 19 12:44:23 2020 -0700 Fix colorfilter when BlendMode.color is used commit b801431fc8cb169b55e0c73353d7a9c147a3fa14 Merge: c08547885 2b3fffe8d Author: Dan Field Date: Fri Sep 25 13:04:16 2020 -0700 Merge pull request #427 from jason-simmons/fix_test_092520 Provide a value for HttpResponse.compressionState in the network test commit 2b3fffe8d03036f135bcaab07170856d1ccbd36d Author: Jason Simmons Date: Fri Sep 25 12:43:29 2020 -0700 Provide a value for HttpResponse.compressionState in the network test commit c08547885159156a9408830d0aad90c4b73c6222 Merge: 48c27905d 584bf98bf Author: Dan Field Date: Wed Sep 23 14:37:58 2020 -0700 Merge pull request #422 from MichaelRFairhurst/remove-unused-imports Remove unused dart:async imports commit 584bf98bfcc7a908e3649fcdcf74be6fa24ddb36 Author: Mike Fairhurst Date: Mon Sep 21 23:23:30 2020 -0700 Remove unused dart:async imports As of Dart 2.1, Future and Stream are exported by dart:core commit 48c27905dfe090ab0849c6acc5b656ecf3428c61 Author: Dan Field Date: Fri Sep 11 12:40:49 2020 -0700 Changelog for 0.19.0 commit a5bffd80e07158ee70a80a6f7525cf99fa579fb3 Merge: ed549149e e36d4d44a Author: Dan Field Date: Fri Sep 11 12:39:56 2020 -0700 Merge pull request #417 from dnfield/cache_color_filter Cache color filter commit ed549149e8b6786202326888ca6b4651f1b09fc1 Merge: 0eb0bca2d 897f27d1b Author: Dan Field Date: Fri Sep 11 12:37:48 2020 -0700 Merge pull request #416 from omidraha/patch-1 Fixes matchTextDirection for RTL commit e36d4d44a044c95ed972203c6c3b3f512a5437ef Author: Dan Field Date: Fri Sep 11 12:33:53 2020 -0700 more test commit 641f7cff12fb4ef2d4092770a86b39076b9ea33f Author: Dan Field Date: Fri Sep 11 11:49:50 2020 -0700 test commit 86ed4cdba1588d97de4d7379f19dc2da489e7558 Author: Dan Field Date: Fri Sep 11 11:33:01 2020 -0700 Avoid cache invalidation when color filter changes commit 897f27d1b521a51c53798d3f92aae9dafb83e815 Author: Omid Raha Date: Fri Sep 11 21:57:45 2020 +0430 #416 Fixes matchTextDirection for RTL commit 96f29547d3a803123b8ecd97e070c3c278346b21 Author: Omid Raha Date: Fri Sep 11 16:10:03 2020 +0430 Fixes matchTextDirection for RTL Fixes #414 commit afcdb3fee775ac80c2d9ccb222ff84752286d2b5 Author: Dan Field Date: Fri Aug 21 16:47:18 2020 -0700 version bumps commit 0eb0bca2dd440050dce40b977bdd0a73f67d12ab Merge: 989a6b51d 3e85bd91b Author: Dan Field Date: Mon Aug 17 20:21:36 2020 -0700 Merge pull request #402 from liyuqian/clip Expose clipBehavior from FittedBox commit 3e85bd91ba88dd92a00c82931377196c84128836 Author: Yuqian Li Date: Mon Aug 17 20:19:16 2020 -0700 Expose clipBehavior from FittedBox Fixes https://github.com/dnfield/flutter_svg/issues/384 commit 989a6b51d75a35d307130b5dc01372fb715071c2 Merge: 912a4b126 efe6a1a4b Author: Dan Field Date: Sat Aug 15 14:06:36 2020 -0700 Merge pull request #392 from zl910627/feature/support_id support id commit efe6a1a4bdcf6c0328e2715813c7ab632c08ff67 Author: ZL Date: Sat Aug 15 08:26:10 2020 +0800 add documents & test cases commit 5be2d4da541f84b4ef146d3b780a40e214b70174 Author: ZL Date: Wed Aug 5 22:03:57 2020 +0800 support id commit 912a4b1266a2b9c8955b3ebff20695386ce95b26 Author: Dan Field Date: Fri Jul 31 11:11:53 2020 -0700 fix test commit 6cf4f86a03753663ce7776f2a38a62a00b337ee8 Author: Dan Field Date: Fri Jul 31 11:05:28 2020 -0700 Alignment -> AlignmentGeometry commit 049c2a4b218dae8143d3be00ba6a6fac8b9c9b2d Merge: 20932d606 a36ea62b6 Author: Dan Field Date: Wed Jul 8 10:53:12 2020 -0700 Merge pull request #378 from SiiaEngineering/multiple_transform_fix Allow multiple transforms in an attribute commit a36ea62b69185d3e25e9512608e08763dea20425 Author: Mustafa Sezgin Date: Wed Jul 8 19:43:13 2020 +0200 Fix the bug in the regular expression for multiple transforms by excluding commas. Tests included commit 20932d606513915f13059d8a14254022d94945e7 Merge: 712f4562e 28a8578e4 Author: Dan Field Date: Thu Jun 18 12:00:49 2020 -0700 Merge pull request #356 from luanpotter/luan.update-dependencies Updating dependencies commit 712f4562e29b3db7fbfa0f7688dd79bfc0b8bcb2 Author: Dan Field Date: Mon Jun 8 14:27:54 2020 -0700 bump commit 9a9dae7ddaf1e8a931c8228cc5623b8fa1ceb1e7 Merge: 622298c7c e5a9f8e0d Author: Dan Field Date: Tue Jun 2 17:09:23 2020 -0700 Merge pull request #359 from gspencergoog/diagnosticable Switch to Diagnosticable from DiagnosticableMixin commit e5a9f8e0de053591896f154dc66c5e1e1aae91b6 Author: Greg Spencer Date: Tue Jun 2 17:05:11 2020 -0700 Switch to Diagnosticable from DiagnosticableMixin commit 28a8578e419f468fc2a1734b4d875dd3b03b3b06 Author: Luan Nico Date: Sat May 30 22:28:36 2020 -0400 Updating dependencies commit 622298c7cd79a305c295ff9701ca4c04065c2a6f Merge: 111c709ef b126861e9 Author: Dan Field Date: Fri May 29 17:09:27 2020 -0700 Merge pull request #355 from dnfield/xml_parse Update avd.dart commit b126861e9c2030d443afb9889b1e771d898f2535 Author: Dan Field Date: Fri May 29 17:01:25 2020 -0700 Update avd.dart commit 111c709eff6e8aa120db37378009e14452d3060d Merge: 66e5e6fcc d746038a2 Author: Dan Field Date: Fri May 29 16:59:03 2020 -0700 Merge pull request #354 from mehmetf/patch-1 await runZoned Futures in the tests commit d746038a22bd916498be83a4dc60e55c362467c9 Author: Mehmet Fidanboylu Date: Fri May 29 16:53:34 2020 -0700 await runZoned Futures in the tests With an upcoming change to widget tester, this will cause failures. See: https://github.com/flutter/flutter/pull/57894 commit 66e5e6fcce7ebcb2e84689826a934ce3f3628b15 Author: Dan Field Date: Wed May 6 13:31:42 2020 -0700 bump flutter version for XML constraint commit 67e742a65ed04dcffb8c30f8af7b3256b4524320 Merge: 5a84567a8 02b75acbe Author: Dan Field Date: Wed May 6 13:12:02 2020 -0700 Merge branch 'master' of github.com:dnfield/flutter_svg commit 02b75acbe3f9d99e4913cc57bd699165f4fc33a7 Merge: 124962100 961f1aa78 Author: Dan Field Date: Tue May 5 06:55:07 2020 -0700 Merge pull request #339 from Zazo032/master Upgrade xml dependency commit 961f1aa7817392ab2d72e4356b76beea78387924 Author: Cristian Zazo Date: Tue May 5 10:57:22 2020 +0200 Upgrade `xml` commit 5a84567a8bcf59a163a46dc6e78cce17b3537197 Author: Dan Field Date: Mon Apr 6 21:41:22 2020 -0700 null context for pictureCache commit 1249621002fc3ee47d9d7c5b3266446bddda1475 Merge: 06f089ddb f8879110d Author: Dan Field Date: Tue Mar 31 15:29:52 2020 -0700 Merge pull request #322 from dnfield/throw_multiroot throw if nested SVG encountered commit f8879110d49f7d57b1b5e7d30637366245ed7b12 Author: Dan Field Date: Tue Mar 31 15:26:16 2020 -0700 throw if nested SVG encountered commit 06f089ddb11586fdfc207d277dd68deea46eb0da Author: Dan Field Date: Sun Mar 15 07:31:51 2020 -0700 .. commit 60086359e4a8161c1b9933774e37893745fc4dce Author: Dan Field Date: Sun Mar 15 07:30:17 2020 -0700 http changes commit 0d09b001a96bdb5e31be116d81085924ad364c94 Author: Dan Field Date: Sat Mar 14 20:11:07 2020 -0700 start web support commit 0d52a03f2c75b0cd292d55adcb670c9396044a37 Author: Dan Field Date: Mon Mar 9 14:45:11 2020 -0700 Fix implicit fill color for shapes with explicit opacity commit 22934eb13db15b1282deddcd3750e0335473d563 Author: Dan Field Date: Mon Mar 9 07:03:55 2020 -0700 Bump commit 91e00537ee93accbbfa49b707b4b44c2ee8299a4 Merge: 051f94e74 3cd597bed Author: Dan Field Date: Mon Mar 9 07:01:18 2020 -0700 Merge pull request #306 from pento/fix/296-use-fill Don't default to black when no colour is defined. commit 3cd597bedb84c485f567a40e174431d590f92f28 Author: Gary Date: Mon Mar 9 18:38:01 2020 +1100 Don't default to black when we don't have to. commit 051f94e74dbb0e7f0fc050e08632ee41d4d4a875 Merge: 434bc7a3b bae8d8883 Author: Dan Field Date: Sun Mar 8 21:44:55 2020 -0700 Merge pull request #305 from pento/fix/transform-whitespace Allow additional whitespace between transform commands. commit bae8d8883353596d089127210e16fdb24e584f86 Author: Gary Date: Mon Mar 9 15:28:55 2020 +1100 Whitespace. commit 0b601b32cd7cb668538a184e5ec9f692dd42568e Author: Gary Date: Mon Mar 9 15:28:02 2020 +1100 Allow additional whitespace between transform definitions. commit 434bc7a3b60a23073529322c8d96d77dc85b1f11 Author: Dan Field Date: Thu Feb 27 09:39:04 2020 -0800 changelog commit 25836feeb1a9c799b017940d917785afe4a0a12d Merge: ff648556c 8dee35cc7 Author: Dan Field Date: Mon Feb 24 09:50:24 2020 -0800 Merge pull request #299 from gspencergoog/diagnosticable Diagnosticable => DiagnosticableMixin commit 8dee35cc7c925ece660845630549e46a64f2d7c2 Author: Greg Spencer Date: Mon Feb 24 09:36:42 2020 -0800 Bump minimum Flutter version commit ff648556c704b5ee77229163dee42df4f6a7310d Merge: b56a90fed a189fc860 Author: Dan Field Date: Sun Feb 23 14:31:20 2020 -0800 Merge pull request #298 from danielbalke/base64-strip-whitespace Strip all whitespace instead of only spaces from base64 encoded images. commit a189fc8608074c89ecd0ab27bf00c02a8aa2b6c2 Author: Daniel Balke Date: Sun Feb 23 20:14:22 2020 +0100 Strip all whitespace instead of only spaces from base64 encoded images before decoding them. commit ea570668e44bef81f9a579f93c3ea797c0ff14a7 Author: Greg Spencer Date: Fri Feb 21 18:07:09 2020 -0800 Diagnosticable => DiagnosticableMixin commit b56a90fedb1e22bcc11447c34470f1c9f254dec8 Merge: 6ae63faa6 cf2dd3aa3 Author: Dan Field Date: Fri Jan 31 07:05:48 2020 -0800 Merge pull request #287 from domesticmouse/master Entitlements for network access on macOS, and a typo. commit cf2dd3aa362661943de573cc9fa3a64cff7b10b4 Author: Brett Morgan Date: Fri Jan 31 22:24:43 2020 +1100 Entitlements for network access on macOS, and a typo. commit 6ae63faa60c90bce20435a7d729c3549f8f288ca Merge: 98c660f4c 91ad1056d Author: Dan Field Date: Wed Jan 29 20:13:58 2020 -0800 Merge pull request #286 from dnfield/use_group Fix for use with groups commit 91ad1056d824166e241cf96689376b56102d23f7 Author: Dan Field Date: Wed Jan 29 20:10:49 2020 -0800 format, fix image commit ff9f0d43e52374b0c4d867ee6df841eb3ea1fd9a Author: Dan Field Date: Wed Jan 29 20:07:07 2020 -0800 Fix for use with groups commit 98c660f4cd93785879317fb71d262d36c67158a3 Merge: e015aab78 5562b1744 Author: Dan Field Date: Thu Jan 23 22:16:29 2020 -0800 Merge pull request #279 from dnfield/color_filter fix color filtering commit 5562b174493a81602fa7578ce26b8efa7fe84836 Author: Dan Field Date: Thu Jan 23 22:13:12 2020 -0800 linux commit f0e1c2233f418c21c3447b03ae089d8e2d572d84 Author: Dan Field Date: Thu Jan 23 22:03:31 2020 -0800 fix color filtering commit e015aab7864a829e5db0068bc1fc2e3e092ac392 Author: Dan Field Date: Sun Jan 19 20:04:31 2020 -0800 deprecated field from pubspec commit 94bfd172b889bd93db128e323f79cabcd639b27c Author: Dan Field Date: Sun Jan 19 19:59:42 2020 -0800 rerun test commit 06daac976d021f91ce50c1a6437f982b123831fa Author: Dan Field Date: Sun Jan 19 19:54:02 2020 -0800 Fix image references commit dfc31db167137a39d0b0f0708f2c2be32b19305e Merge: f27839e21 7d3a68d8f Author: Dan Field Date: Sat Jan 18 23:19:57 2020 -0800 Merge pull request #276 from dnfield/use_transform support transform on use commit 7d3a68d8f52948b9e786807a05552c0b75acdcd3 Author: Dan Field Date: Sat Jan 18 23:14:27 2020 -0800 support transform on use commit f27839e211d35b8bc5db06d445a960f5cad67097 Author: Dan Field Date: Sat Jan 18 20:14:42 2020 -0800 macos for example commit 1a542efa43f2b53f02d4aad9488f326c59193a42 Merge: ed21c5624 ba2ce3a09 Author: Dan Field Date: Mon Dec 16 13:29:17 2019 -0800 Merge pull request #265 from dnfield/nnbd_prep implicit-cast commit ba2ce3a09ba748748e418f60e2acd518fe4b6fc4 Author: Dan Field Date: Mon Dec 16 13:23:58 2019 -0800 implicit-cast commit ed21c56249a8277f7e9cc80832c6dc8f10f3ee61 Author: Dan Field Date: Tue Nov 19 21:32:50 2019 -0800 format commit f96c1ff34b1baf9c1e76735e9d6a0f172fe44076 Author: Dan Field Date: Tue Nov 19 21:31:19 2019 -0800 bump commit 643db60568fe048c18ce54729213b3e705e4da36 Author: Dan Field Date: Tue Nov 19 21:27:05 2019 -0800 image improvement, mask/blendmode improvement for shapes commit 0d2ea27fea88d4cfd7931f0341f3d1766649b47d Author: Dan Field Date: Thu Nov 7 00:06:04 2019 -0800 support for masks on groups commit 40eafac31dac7bc4b23be89a9703ebd20c9ce9cc Author: Dan Field Date: Mon Oct 21 17:36:00 2019 -0700 Blend mode support commit df817ab4c838c23f0654c7ce93a8501137a98d87 Author: Dan Field Date: Mon Oct 14 15:23:17 2019 -0700 regression test for afa27e7 commit 648e24d34e03652ed601ed913055061c14f18f57 Author: Dan Field Date: Mon Oct 14 11:18:34 2019 -0700 reformat :( commit 72a067871b3adf31c735a37b274a1433d470124f Author: Dan Field Date: Mon Oct 14 11:15:57 2019 -0700 fix for empty text elements commit afa27e741e51db7865a708a9dc614552c0c776c3 Author: Dan Field Date: Mon Oct 14 09:37:02 2019 -0700 trim matrix strings commit f7846f04c5353c2bf7b73c312ff37e20dac5cb7e Author: Dan Field Date: Wed Oct 9 11:09:54 2019 -0700 open up obtainKey commit 6b76c70046248bc8f6ccda8659b6f1daecb77070 Author: Dan Field Date: Wed Oct 9 11:09:01 2019 -0700 Remove @protected from obtainKey commit 4874de2e8cd34e6066c12741bbd7498ceb7463f6 Author: Dan Field Date: Wed Sep 25 15:06:13 2019 -0700 dartfmt, const commit 3eeb7cff4551c53032b9b275b3fa0cba09f8aadc Author: Dan Field Date: Tue Sep 3 12:53:09 2019 -0700 0.14.1 bump commit cefc5a4f13426be64156f08ea83406e6d1ea9849 Merge: 3d0257c98 a6d1347d3 Author: Dan Field Date: Mon Sep 2 01:16:34 2019 -0700 Merge pull request #219 from christianalfoni/hsl-transparent add support for hsl, hsla and transparent fill value commit a6d1347d355e291a4b4b62308eb2fbf40e3c3503 Author: christianalfoni Date: Mon Sep 2 07:58:19 2019 +0200 more tests commit 645b69d9a0711ae1e500cfc6ba9ae742dc615bd3 Author: christianalfoni Date: Mon Sep 2 07:52:39 2019 +0200 formatting, typing and additional tests commit 71f93208e3e2b7355968a429b930898c77d813c0 Author: christianalfoni Date: Sun Sep 1 17:30:33 2019 +0200 fix missing type commit ecc93c450b7dc739ec19aaa0e0474f6480eeb7dc Author: christianalfoni Date: Sun Sep 1 08:17:18 2019 +0200 add support for hsl, hsla and transparent fill value commit 3d0257c98b35bf61368d39ba67bc237a7645e65c Author: Dan Field Date: Fri Aug 9 13:04:33 2019 -0700 Fix use with no id, fix desc/title commit a763ad781d876bdb8248b8a653c0799ed4c758b0 Author: Dan Field Date: Wed Jul 31 10:39:07 2019 -0700 version bump commit 3f2276555882b47650077695d997c345805e2ba4 Merge: 2f015d613 578e82499 Author: Dan Field Date: Wed Jul 31 06:28:00 2019 -0700 Merge pull request #204 from phanirithvij/patch-2 Update clip_path_3.svg commit 2f015d613098b20623f5a193497c09375267e167 Merge: beb42d0a1 cade37291 Author: Dan Field Date: Wed Jul 31 06:27:40 2019 -0700 Merge pull request #205 from phanirithvij/patch-1 Update clip_path_2.svg commit 578e82499555d6c1309fe6352025eaff52eed3b6 Author: Phani Rithvij Date: Wed Jul 31 12:49:02 2019 +0530 Update clip_path_3.svg Added xmlns attribute that allows svg preview on github and vscode. commit cade3729140f3c8fea3d88cdcddb509355e95832 Author: Phani Rithvij Date: Wed Jul 31 12:47:56 2019 +0530 Update clip_path_2.svg Added xmlns attribute that allows svg preview on github and vscode. commit beb42d0a10da24684eea23c54d1fb6721adb3423 Merge: 11d26472e 2752e94f4 Author: Dan Field Date: Mon Jul 29 06:24:05 2019 -0700 Merge pull request #199 from krispypen/master Adding mask support commit 2752e94f4f135f4236b20777202861b521787f06 Author: Kris Pypen Date: Mon Jul 29 11:07:10 2019 +0200 Implement remarks from PR #199 commit 11d26472e835c4fb1401bac8b6d25229ea31af9a Merge: 72b4e4d1b f81b8d987 Author: Dan Field Date: Sat Jul 27 07:40:47 2019 -0700 Merge branch 'master' of github.com:dnfield/flutter_svg commit 72b4e4d1b4ee49a21d46d93d504d9f4dc8f7ed8d Author: Dan Field Date: Sat Jul 27 07:40:39 2019 -0700 Allow clearing the cache commit 75518f547b8676c5d1eee2b7cd26ec1490a1c8d0 Merge: 8fbed81dd f81b8d987 Author: Kris Pypen Date: Fri Jul 26 16:29:28 2019 +0200 Merge pull request #1 from dnfield/master merge #200 commit f81b8d9873aac49d8837ab75977eb4bf1db0ca3e Merge: 9a216b208 d0319ada1 Author: Dan Field Date: Fri Jul 26 07:03:43 2019 -0700 Merge pull request #200 from krispypen/patch-1 Fix travis build failed commit d0319ada1af0062cff8ac9da30d52565866e0327 Author: Kris Pypen Date: Fri Jul 26 11:02:54 2019 +0200 @virtual is deprecated commit 6cc87c6c2623185a26a810fedd68665d95bf9c3e Author: Kris Pypen Date: Fri Jul 26 10:54:05 2019 +0200 Fix travis build failed "Package 'fonts-droid' has no installation candidate" commit 8fbed81dda07ab16730d302f8e27565e1d4b7461 Author: Kris Pypen Date: Fri Jul 26 10:38:47 2019 +0200 Adding mask support commit 9a216b20839a3acaf5334e9ae096090b38b66786 Author: Dan Field Date: Wed Jul 10 16:07:01 2019 -0700 Fix for color filter commit a299347ba7e3b6a06224ddc2ae6595f56c6d5132 Author: Dan Field Date: Tue Jul 9 18:24:38 2019 -0700 skip golden tests on non-linux commit d6f46c41ae3e2e98e79a96a0db0c0d9121f77ce6 Author: Dan Field Date: Sun Jun 30 20:58:44 2019 -0700 fix test for semantics commit 42e1228453161b9376065b22e0f5c8db4eb01dcb Merge: 48420aece c1e709f07 Author: Dan Field Date: Tue Jun 4 14:36:04 2019 -0700 merge commit c1e709f07f88276ef208c71cea42219565555430 Author: Dan Field Date: Tue Jun 4 14:29:55 2019 -0700 fix ci commit e38a84aeaaddd8415168c61aef993cddc7d42654 Author: Dan Field Date: Tue Jun 4 14:02:32 2019 -0700 Fix groupOpacity when transform used commit 9479c89fcf9ea04781d62c10dd63be79ea393e74 Author: Dan Field Date: Mon May 6 19:40:11 2019 -0700 dev commit f62584cd440c6401456622bcb412952cc9f3aff3 Author: Dan Field Date: Mon May 6 19:34:06 2019 -0700 stable for ci commit 83d4e51b965494d993a9f9e670a8e6a92a86ef53 Author: Dan Field Date: Mon May 6 19:33:13 2019 -0700 bump for stable commit 48420aecedd7d43e1653e947c6bf45c2bf5c4d50 Author: Dan Field Date: Mon May 6 19:31:41 2019 -0700 bump path_drawing dep commit a74a6f7ea74a9d9eba5830580d8de2a3ea7bafc1 Author: Dan Field Date: Mon May 6 19:14:40 2019 -0700 Fixes and bump commit dfbaaeec317d4554e1f5e77a577f188790b9789e Author: Dan Field Date: Thu May 2 11:23:40 2019 -0700 version commit 49a52608d401dc4fcd0b0ec3d9b61d7254e2066b Author: Dan Field Date: Thu May 2 11:17:49 2019 -0700 bump commit a3f1d31aeb4e22d3e5e53b3b96fe6e51492fec92 Merge: 7057a0c0d 318667d31 Author: Dan Field Date: Thu May 2 11:12:04 2019 -0700 Merge pull request #158 from jacob314/error_refactor Refactor error messages. commit 318667d31b34f8d2c5e1ea7a0176ed7b8ccde60f Author: Jacob Richman Date: Wed May 1 21:30:43 2019 -0700 Refactor error messages. commit 7057a0c0dad07a8f82670ffddf631d9d48a83c3d Author: Dan Field Date: Tue Apr 9 01:20:26 2019 -0700 fix drawable root test commit 3467e6425a4d5db357d73c12baa846d0535adf6e Author: Dan Field Date: Tue Apr 9 01:14:08 2019 -0700 save before commit :( commit 623ded9712187d6109d39f53097126061519e68a Author: Dan Field Date: Tue Apr 9 01:08:26 2019 -0700 fix font logic commit 0de14c46fe52703d182cc30c4638f91bae3d7c7b Author: Dan Field Date: Tue Apr 9 00:57:40 2019 -0700 update docs, format commit 63cf57380a1dfb53d611a5509f0db2d4c0ad2cf3 Author: Dan Field Date: Tue Apr 9 00:51:50 2019 -0700 allow px for font size commit 3c969674d8777e77f0eba5605b4f53c80a519c5c Merge: 1596b5362 628fbf6b7 Author: Dan Field Date: Tue Apr 9 00:49:42 2019 -0700 Merge branch 'master' of github.com:dnfield/flutter_svg commit 1596b5362e9deaa12faf5d5e904ee965521ca5d3 Author: Dan Field Date: Tue Apr 9 00:49:37 2019 -0700 Fix group opacity commit 628fbf6b7f594a86d6f48830480fc081cb8b359b Author: Dan Field Date: Mon Apr 8 23:20:04 2019 -0700 update goldens commit eb64bce89c7e939cfd2a7ba10d3b749ce0b77d4d Author: Dan Field Date: Mon Apr 8 23:04:53 2019 -0700 excludeFromSemantics commit e6781ff0ebb48c2ed4cdc19e521974fe7ae03cbc Author: Dan Field Date: Thu Apr 4 09:17:35 2019 -0700 Add new golden, update pubspec and changelog commit d412a7524dc79430ae8f1fcc6b031debdbb2622e Merge: 6dd48b2dc 8af91b6da Author: Dan Field Date: Thu Apr 4 09:04:41 2019 -0700 Merge pull request #142 from aschiavon91/master handle rgba colors with alpha as double commit 6dd48b2dc981738047bc8f6f7fba7681a91d2ba4 Author: Dan Field Date: Thu Apr 4 09:03:30 2019 -0700 Fix listener removal, fix NPE commit 8665a19150a27b8762106b82b6c93a2322a34355 Author: Dan Field Date: Wed Apr 3 22:27:18 2019 -0700 fix text transform commit ec3b7f4ee2c3a6762476ab405ae865e3cb5a85e9 Author: Dan Field Date: Wed Apr 3 10:57:15 2019 -0700 remove unintended change, format commit 60f8008140b1279a1a78934dba6fe415975b62d6 Author: Dan Field Date: Wed Apr 3 10:55:51 2019 -0700 bump commit e61af2c46dd6f21b4f84ad188526bdd0bc137bf3 Author: Dan Field Date: Tue Apr 2 20:56:26 2019 -0700 Fix avdPictureStringDecoder commit 8af91b6daeaa6b8f28d556b3abab1e9d8a1750fe Author: Antonio Schiavon Date: Mon Apr 1 15:05:51 2019 -0300 improve implementation of rgba parse commit eeebd9a929ca36aaf6d50103241e0a27289509cb Author: Antonio Schiavon Date: Mon Apr 1 13:15:14 2019 -0300 improved parser of rgb to avoid color mismatch in rgba case commit 6336ddb1fab7fbd3e382b8d5937c2a63359f77ae Author: Antonio Schiavon Date: Mon Apr 1 12:16:44 2019 -0300 handle rgba colors with alpha as double commit 338b37ee6faba378874e8a6a84917ce37f64ffc5 Author: Dan Field Date: Sun Mar 31 00:58:14 2019 -0700 Add warning commit c73c910d1445503d5db042353a1839e4f7ad9a7f Author: Dan Field Date: Sun Mar 31 00:49:53 2019 -0700 Support display none and visibility hidden commit 2202723bede58ec183f9ce634fd8dd48ddc3b84e Author: Dan Field Date: Wed Mar 6 12:38:51 2019 -0800 Fix typo in CHANGELOG commit 9d4fd4bac8a99db6e09d97d748bf76f36f535683 Author: Dan Field Date: Tue Mar 5 10:16:41 2019 -0800 bump version commit f80bb326276d3bde234c9bd52a121dea8a2bb259 Merge: a708ee117 3d410bf84 Author: Dan Field Date: Tue Mar 5 10:13:21 2019 -0800 Merge pull request #131 from dnfield/gahms-fix_svg_widget_size Don't use devicePixelRatio to scale the SVG. It causes problems and inconsistencies. commit 3d410bf847d6c824e0bc52ad8fc64d3dbf236dba Author: Dan Field Date: Tue Mar 5 10:02:12 2019 -0800 Remove errant references to devicePixelRatio commit b05b8bef360db7b3d06a0cd876d2071cae103abc Merge: a708ee117 9ffb2a96a Author: Dan Field Date: Tue Mar 5 09:50:05 2019 -0800 Merge branch 'fix_svg_widget_size' of git://github.com/gahms/flutter_svg into gahms-fix_svg_widget_size commit a708ee117d2c75989fd115b3e59b0041433f556b Author: Dan Field Date: Sun Mar 3 22:29:01 2019 -0800 initial implementation of precaching images (#129) * initial implementation * remove duplicated code * test; * Use correct matcher now * error handling for real commit 7b40751d27a23ef91fe4d6db734d89d320b21aad Author: Dan Field Date: Wed Feb 27 10:58:03 2019 -0800 update version commit cf2b352378ae0d3bf2bc11457f4eb685f4a04023 Author: Dan Field Date: Wed Feb 27 10:57:07 2019 -0800 remove unintentionally commited file from bad merge commit 1a7a6912e65b6d5477a284b74a5bcca949066be8 Author: Dan Field Date: Wed Feb 27 02:16:55 2019 -0800 format commit 5ba5d7ba649975c814fd0db4b966d771deaf62b4 Author: Dan Field Date: Wed Feb 27 02:04:07 2019 -0800 update changelog, do y version bump commit e7ac8c49ad11e7655138dc73906328250d6f3b64 Author: Dan Field Date: Wed Feb 27 02:02:06 2019 -0800 consume unsupported elements commit 71d9c2662a7f2b31b73c640e19aa2b065ba0874b Author: Dan Field Date: Tue Feb 26 20:59:15 2019 -0800 Svg parser update (#125) * Unpin xml * update pubspec commit 37bf18823fadfb001a8acd7ac1096dc8a2351b08 Author: Diego Ballesteros Villamizar Date: Mon Feb 25 19:15:24 2019 +0100 Fix title in Changelog (#123) * Fix title in Changelog * Move the line of support 'px' to the right release commit 11c7e75fb8033745dbe71f812e1a9f51bf1f7aeb Author: Dan Field Date: Mon Feb 25 09:39:19 2019 -0800 bump version commit d0a1aa6e73cebf8fa19af06695c1a7d9f001592a Author: Dan Field Date: Mon Feb 25 09:36:02 2019 -0800 Fix transform logic commit 8b96c1c52a29e2a9c2da2e1a1bf303f7ec2e04d0 Author: Diego Ballesteros Villamizar Date: Thu Feb 21 23:55:14 2019 +0100 Pass the PictureConfiguration to obtainKey (#118) This way the ExactAssetPicture can use the DefaultAssetBundle derived from context through the LocalPictureConfiguration instead of always defaulting to the rootBundle. This is helpful for tests and for local widget context assets. All other provides just ignore the configuration. This analogous to the implementation of Image.asset in Flutter. commit afdf2fc5ae615822db8705a0dd99604357a69941 Author: Dan Field Date: Thu Feb 21 10:17:09 2019 -0800 Update parser_state.dart commit d97be73bb107af4fb65f4b47bf6ca547849640d7 Author: Diego Ballesteros Villamizar Date: Thu Feb 21 19:02:09 2019 +0100 Fix CI by changing linter options (#119) * Fix CI by changing linter options Remove a deprecated one and comment out one that is triggering on new language features. * Add a linter ignore to the Set literal Restores the prefer_collection_literals commit 9ffb2a96aeb047fa3759ad0652559d74fde99c50 Author: Nicolai Henriksen Date: Sat Feb 16 13:13:52 2019 +0100 Added test of SVG with viewport smaller than drawing. commit 328d718d47d2c65a2b68312ed0c84c3b651c0416 Author: Nicolai Henriksen Date: Sat Feb 16 12:55:54 2019 +0100 Changed clipping to use same size as SVG and not use devicePixelRatio commit 648f5d1dc131fd9157e001b004e33d38bc41b727 Author: Nicolai Henriksen Date: Sat Feb 16 12:55:17 2019 +0100 Added test for rendering SVG in ‘natural size’. Natural size as in the size specified in the SVG width and height. commit 1feea2487a3389af2daa9207d7e807b8f4f6d1db Author: Nicolai Henriksen Date: Sat Feb 9 15:11:30 2019 +0100 Removed unused import. commit 1f9512817cb115f237822ba17feed8dbe9bb25c0 Author: Nicolai Henriksen Date: Thu Feb 7 07:59:41 2019 +0100 Fixed SVG widget size. The widget created for a SVG file should have the same point-size as the SVG viewport size. commit 8c7a37bc948f004e32b6000c8eba9b785a818ef9 Author: Kevin Moore Date: Tue Jan 29 18:22:38 2019 -0800 Should not commit pubspec.lock in publish packages (#109) * Should not commit pubspec.lock in publish packages https://www.dartlang.org/guides/libraries/private-files#pubspeclock * Delete pubspec.lock * Delete pubspec.lock commit c96ac2c47b1e1aa847691a0f5a249a88503dd774 Author: Dan Field Date: Fri Jan 25 11:19:22 2019 -0800 text commit 98785b5809b2a55e5fb62370945ca1c8f25a8be8 Author: Dan Field Date: Fri Jan 25 09:09:35 2019 -0800 update more goldens commit d6c35fd25c7c2a885879e7c32724df5a7ae00a8b Author: Dan Field Date: Fri Jan 25 07:50:19 2019 -0800 update goldnes, pin xml, fix parseDouble commit f4ffe42502e1ceeb9eb245165076ee9ac18b19bc Author: Dan Field Date: Sun Jan 20 16:29:33 2019 -0800 Allow parsing numbers with postfixes. commit 01b245bb8f0a8bceaaf1280608d93932b3ed0914 Author: Dan Field Date: Thu Jan 17 10:30:14 2019 -0800 update goldens commit 3283bb19470f97550f65a39c8c33c8288cd4c683 Author: Dan Field Date: Thu Jan 17 10:12:52 2019 -0800 make it easier to use semantics commit 70834f3c8fe200116f53ed477ef821bc7da94c11 Author: Dan Field Date: Mon Jan 14 15:06:17 2019 -0800 proper rev, ignore public docs in main.dart commit 6bb4a56f0b89bdd92207a1582f8fc8405e716961 Author: Dan Field Date: Mon Jan 14 15:03:03 2019 -0800 clarify changelog commit b19d1fe805f3b4fa221439d1f0f7e4344119f5ef Author: Dan Field Date: Mon Jan 14 10:37:39 2019 -0800 fixes for ref gradients commit 0b8ad1516436bdbb75a357e72cc7fa5dabed9898 Author: Dan Field Date: Mon Jan 14 09:32:14 2019 -0800 Fix parsing error for non-self-closing stops and clipPath children commit 4be9b191ec1b06d2d3016b9dd13599ba147649f1 Author: Dan Field Date: Mon Jan 14 01:27:57 2019 -0800 add docs, remove dead code commit 7015f32cdd0a953da50ac838d9c7c1835b63c08b Author: Dan Field Date: Sun Jan 13 23:50:00 2019 -0800 Support `xlink:href` on gradients commit 0f66b78d9f8d189d7223f2ceedff474b5811124d Author: Dan Field Date: Sun Jan 13 09:41:40 2019 -0800 fix empty defs commit 92d2e5e1d37dced2b4680719d6765493a31f31d3 Author: Dan Field Date: Fri Jan 11 21:09:46 2019 -0800 loosen xml constraint commit 95c13de3322d3ecd2bd5bc2656a7ef7909ac3272 Author: Dan Field Date: Fri Jan 11 21:08:46 2019 -0800 prep for publishing v0.10.0 commit 26a5c9b376d16a777f620402595b8f95526af6e9 Author: Dan Field Date: Fri Jan 11 15:58:40 2019 -0800 Format commit 24dcd58eae47db810d2487535ff1355518f7a85e Author: Dan Field Date: Tue Jan 8 21:35:17 2019 -0800 Parsing rewrite (#85) Use push based reader for XML parsing commit 824786df8490ff6ea75cf65ad518a53dbfd0e3c4 Author: Dan Field Date: Mon Dec 31 00:57:03 2018 -0800 Text improvements (#95) * text improvements -need goldens * add golden, clean up analysis commit 58949fa47447117d0f3d8507b60e06a9f483a719 Author: Dan Field Date: Mon Dec 31 00:02:25 2018 -0800 v0.9.0 commit 16b35e2cc28de8f81800c07135a79d8294578bfe Merge: bb9645f52 fc0571328 Author: Dan Field Date: Mon Dec 31 00:00:12 2018 -0800 Merge branch 'master' of github.com:dnfield/flutter_svg commit fc05713285d45e27c3faf510801933d2c4f722c8 Author: Dan Field Date: Sun Dec 30 16:06:46 2018 -0800 update goldens commit de98dbf351ec9de1e4cbd30ce892b5dff59679b9 Author: Kris Pypen Date: Mon Dec 31 01:03:14 2018 +0100 Text support improvements (#92) * Text support improvements: * font-weight is now parsed to flutter font-weight values * font-family is now inherited * dx-dy-x-y fixed, also with tspan support * fill without stroke was broken commit bb9645f52827f707584081910a1bee7fe4eb4237 Merge: 77dc909d1 aa0bb903c Author: Dan Field Date: Sun Dec 30 15:55:42 2018 -0800 Merge branch 'master' of https://github.com/krispypen/flutter_svg commit 77dc909d140f7ba0fb16215028f30321bcf1ed33 Author: Dan Field Date: Fri Dec 28 19:52:11 2018 -0800 v0.8.3 commit 78f65a2aeff4bd91924fe513d00248cb76c0c2cf Author: Dan Field Date: Fri Dec 28 19:45:04 2018 -0800 fix group processing for clipPath use commit 9c7c0e2e9ef388909db644aea6531d19d2c9bbdf Author: Dan Field Date: Fri Dec 28 19:27:23 2018 -0800 remove unused import commit 921b729cc81648c1e06e03a4c1f537db865ef0f7 Author: Dan Field Date: Fri Dec 28 19:23:47 2018 -0800 Support non-def clipPath and `use` in clipPath commit 1769cce96d3975e8864671a56d9649d413d0fc7f Author: Dan Field Date: Fri Dec 28 18:55:42 2018 -0800 Prefer usvg to svgcleaner now commit aa0bb903cad6ecb1c50d9fe4ad63a1f6c71f94b0 Author: Kris Pypen Date: Fri Dec 28 19:11:34 2018 +0100 changes for comments commit e64e04bca1cf03a7a031415962c98d035b3ef439 Author: Kris Pypen Date: Fri Dec 28 19:07:50 2018 +0100 changes for comments commit fb806d2605754506cfabf36393c3b5fb06e176d9 Author: Kris Pypen Date: Sat Dec 22 17:58:24 2018 +0100 fixed some analyzer issues commit 8a9c87eb831af116f39a89a22fb671d0b640204d Author: Kris Pypen Date: Sat Dec 22 14:14:14 2018 +0100 ignore text tests because it makes no sense at the moment commit b1163c9697a14f8897fa775e07fec2a38e5d3606 Author: Kris Pypen Date: Sat Dec 22 13:37:50 2018 +0100 Text support improvements: * font-weight is now parsed to flutter font-weight values * font-family is now inherited * dx-dy-x-y fixed, also with tspan support * fill without stroke was broken commit 4b8577ab4cad8653dcb2db5b261e735fd035efc2 Author: Dan Field Date: Tue Dec 18 09:46:04 2018 -0800 revert unintentional change commit 19ad168b896cef649172cc63f6e16340b92f4e20 Author: Dan Field Date: Tue Dec 18 09:38:52 2018 -0800 bump version commit 05d85884e7ab251b1bc443c8446249d2feb7e6ec Author: Dan Field Date: Tue Dec 18 09:36:40 2018 -0800 fix crasher for DrawableNoop, improve error reporting commit 2ed2b91d742d1be9c74e296e6907479e326fa8a0 Author: Dan Field Date: Mon Dec 17 10:32:08 2018 -0800 revert width/height update doc commit 4673e2f77cb3c1ec1cd4acfb5c7af1504b911804 Author: Dan Field Date: Mon Dec 10 21:56:55 2018 -0800 revert faulty scaling logic commit 7b0dc98c3020b79f4eac1b9fa6f77b789ad40ada Author: Dan Field Date: Mon Dec 10 21:56:21 2018 -0800 revert faulty scaling logic commit 8498d2b4ee3191dcc7f8a335f88f1d2484f9a4ba Author: Dan Field Date: Wed Nov 28 19:34:51 2018 -0800 support for commit 4bece57c4ef1fd5ab2b7ebad5bcdb600143e65b4 Author: Dan Field Date: Wed Nov 28 14:15:53 2018 -0800 fix test commit a6ccc999cdd871d05c975c02ddd1a0c041b17b4f Author: Dan Field Date: Wed Nov 28 13:03:18 2018 -0800 Cache by default commit d6fe97c1b93cce0e0ab1e98c872bbb7a4ad00afd Author: Dan Field Date: Wed Nov 28 10:02:25 2018 -0800 Cleanup, start image commit e65aa1519fc7537f514566c73d16ed4668333854 Author: Dan Field Date: Mon Nov 26 15:45:07 2018 -0800 update changelog/readme commit b78e2071717165bbdb61673439710200df198de2 Author: Dan Field Date: Mon Nov 26 14:09:57 2018 -0800 test def with id commit df768579afb7ec45976aeb7679a12420b182bb98 Author: Dan Field Date: Mon Nov 26 13:40:58 2018 -0800 support symbol in or out of def commit 0c2e616ef389bee9156472fd60b27e685ca10676 Merge: 61b37be79 3cd119e32 Author: Dan Field Date: Mon Nov 26 13:00:05 2018 -0800 Merge branch 'master' of github.com:dnfield/flutter_svg commit 61b37be791774e3fb23d3c7a8e5e4fadd8007a64 Merge: fc8fc118f 6133bd0cd Author: Dan Field Date: Mon Nov 26 12:57:46 2018 -0800 Merge branch 'shape_ref' commit fc8fc118fcbebf319255271ae0b823fa6c1e2192 Author: Dan Field Date: Mon Nov 26 12:57:42 2018 -0800 more test, format, remove temp code from example commit 3cd119e32b5eb22e724e8ad356bb64cf8d6c1ba6 Author: Dan Field Date: Mon Nov 26 00:15:35 2018 -0800 linux gen text commit b9875f1d38ed18a0c2f77f7155124e5403db2f7b Author: Dan Field Date: Mon Nov 26 00:07:49 2018 -0800 include text test commit 05d5f811580555fd4fdce5a61e24bcd38acddcb1 Author: Dan Field Date: Sun Nov 25 23:36:15 2018 -0800 add some tests, minor fixes commit 6133bd0cdcff9e427ef7c029cf4f0f30d2f18184 Author: Dan Field Date: Sun Nov 25 22:58:11 2018 -0800 initial impl for `use` commit a4219acf9d6343db4e3b5b1f429330acfc71edaf Author: Dan Field Date: Sun Nov 25 16:17:35 2018 -0800 partial for symbols commit 152f39de514a8daa825bd2d68b074a7d511e0eb3 Author: Dan Field Date: Sat Nov 24 15:32:15 2018 -0800 refer to shapes commit de86cb49d98f38122274b9c04eb15353fae4e98e Author: Dan Field Date: Fri Nov 23 22:41:53 2018 -0800 fix width/height bugs commit 8afc718844b9fb89d6b44d95106bd5e0cec8cdc4 Author: Dan Field Date: Sat Nov 17 21:19:00 2018 -0800 update goldens commit a4bd2841613cf781066da6cc637e9780833ad81a Author: Dan Field Date: Sat Nov 17 21:07:32 2018 -0800 Update pubspec.yaml commit 4ccae69c6bac32a930da57df29d4af8b7474f36c Author: Dan Field Date: Mon Nov 5 00:48:48 2018 -0800 Avoid window.devicePixelRatio commit 23b3dbde3f1fe63fef60f90e5d0299a90ce2ddd1 Author: Dan Field Date: Sun Nov 4 23:00:31 2018 -0800 fix travis commit 10ac30f4da1a2567d64741511bf9659798194787 Author: Dan Field Date: Sun Nov 4 22:21:15 2018 -0800 Correct width/height processing, update lints commit 154281e79e35e266913ca66d1abdf1a5e46f33b1 Author: Dan Field Date: Sun Nov 4 19:55:51 2018 -0800 fix fill-rule, bump path_drawing commit 942d5977a8ba0655dba52630de3c93213546d44d Author: Dan Field Date: Sat Nov 3 00:41:50 2018 -0700 remove deprecated analyzer portion, bump path_drawing commit 998b9ca5bcbb646e2e14665584c04c0321a7422e Author: Dan Field Date: Sat Nov 3 00:36:31 2018 -0700 add coverage back commit 4fe680149f038950bb13141b178e7ed1c10bcfe1 Author: Dan Field Date: Thu Oct 25 11:13:12 2018 -0700 uncomment example commit ae71f6901802bc75dfeccc56e2e38ac70584b731 Author: Dan Field Date: Thu Oct 25 11:04:53 2018 -0700 update golden widget tests commit 4f6fa209ad26e37787c5c3c59e164247097fd53d Author: Dan Field Date: Thu Oct 25 10:59:49 2018 -0700 update drawing dep, update goldens commit 11687b409d77bc3908b239e2014f4d67e4d9ed20 Author: Dan Field Date: Thu Oct 25 10:43:35 2018 -0700 uncomment/format tests commit a95496f630c1ed67469d70e6e03b839955d71898 Author: Dan Field Date: Thu Oct 25 10:27:25 2018 -0700 Fix decomposeCubic logic commit 02811b6ec0d791516c1b625e11b52c8028844905 Author: Dan Field Date: Sat Oct 6 22:10:45 2018 -0700 remove coverage .. broken? commit 2641e68e00cf5e24d8d2bcf19c147fb40349c960 Author: Dan Field Date: Sat Oct 6 21:31:33 2018 -0700 fix stroke/fill commit 3ca677d1e3782569cf663a9819eefb7e9f5e6c2b Author: Dan Field Date: Wed Sep 26 15:05:48 2018 -0700 better error for invalid viewBox/width/height commit e4fdd88b278412ecfaf7a5bd59437cc2a0a620e7 Author: Dan Field Date: Tue Sep 18 10:23:31 2018 -0700 version bump commit ca4b4da7286d8a1d640bed618860f64419d5bd15 Author: Dan Field Date: Mon Sep 17 21:33:14 2018 -0700 add test, print errors once commit 93938caa8b0f620a47d561c7eafc637d179f9924 Author: Stefano Rodriguez Date: Mon Sep 17 21:23:59 2018 +0200 Improve SvgPicture size handling (#60) * Improve SvgPicture size handling * Fix formatting * Fix behaviour * Fix missing fields in initializer * Add docs commit 2e847f64a80bd55f9b495dad04fc5d563ae0930c Author: Dan Field Date: Tue Sep 11 09:05:06 2018 -0700 update tests, try to fix travis commit f5e034b91d84bfdaa05b5c226a115f6f0572f24e Author: Dan Field Date: Mon Sep 10 20:50:24 2018 -0700 fix viewport for non-zero min-x min-y commit f00a3430535ca8d962b9063ca73fa4c3f323e3a8 Author: Dan Field Date: Mon Sep 10 20:23:08 2018 -0700 Fix another spot for DrawablePaint/Paint commit 5c9635795acb69dcfb4fde23ea7f221e23a64d9d Author: Dan Field Date: Mon Sep 10 20:18:33 2018 -0700 make drawableTextStyle use DrawablePaint commit 1c165f85d88afa43a9ac7429de265284351f1e96 Author: Dan Field Date: Mon Sep 10 20:12:54 2018 -0700 format/analyzer fix commit 5dda1393c560640decea6a5555f365a5b34c0276 Author: Dan Field Date: Mon Sep 10 20:11:50 2018 -0700 restructure for newer flutter versions, update goldens commit 9f13160931a6dcf4d03ea7696fa5038897edc859 Author: Dan Field Date: Mon Sep 10 20:02:36 2018 -0700 move stuff around commit 8fc63994809b9dcb21a32db433ef4c4c31fd5ef0 Author: Stefano Rodriguez Date: Mon Sep 10 18:20:24 2018 +0200 Improve Gradients (#54) * Add support for gradientTransform. * PR changes. * Update deps * Fix linear gradients behaviour with decimal offsets * Fix linearGradient * Partial fix for radialGradient * Fix support for mockito 3.0 * Correctly apply transforms to the whole canvas rather than only to the path * Add NoopShader to handle unsupported shaders * Add linear and radial gradient svg assets with transforms * Improve gradient svg test assets * Add regenerated golden pngs * Make affineMatrix function public * Fix handling of gradientTransforms * Fix deprecation warning * Add support for percentage gradients with userSpaceOnUse commit fc215708c457b0c8baf0a3fb492a309e718b3033 Merge: fdb9cbbfd 4de6cce8f Author: Dan Field Date: Fri Sep 7 10:00:01 2018 -0700 Merge pull request #56 from sroddy/hotfix/merge_paint Fix merge paint edge case commit 4de6cce8f66e02da647b8e8d379581c2396020f4 Author: Stefano Rodriguez Date: Fri Sep 7 17:09:51 2018 +0200 Fix NPE commit 8a306a4b72fc8a30e8307cf2a87df251e01efb5f Author: Stefano Rodriguez Date: Fri Sep 7 14:00:10 2018 +0200 Fix merge style edge case commit fdb9cbbfd166a667c64fa3e83571db667783bab5 Author: Dan Field Date: Wed Aug 8 14:44:11 2018 -0400 adjust pubspec commit 3b3b23ecafcdbdc15684ca04c37e2322fbaa85f2 Author: Dan Field Date: Wed Aug 8 14:43:28 2018 -0400 fix for flutter beta channel commit 9deee8ad6c0d5c3291da0f09a7f7f05b5c3dcb4a Author: Dan Field Date: Wed Aug 8 14:10:42 2018 -0400 Fix painting inheritence commit 5fa13b51853c9b2e333de28efa11bcecca8a5705 Merge: a562a3a4e 7993bbde6 Author: Dan Field Date: Mon Aug 6 11:33:03 2018 -0400 Merge pull request #41 from gmlewis/rounded-rectangle Fix rounded rect when rx or ry is missing commit 7993bbde6a03a6abb5abac507940872f0c0ee984 Author: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> Date: Fri Aug 3 20:55:46 2018 -0400 Fix rounded rect when rx or ry is missing commit a562a3a4e053bdb32942bf0b57d93520cab04b47 Merge: 8ed7a6fe4 0b5435681 Author: Dan Field Date: Fri Aug 3 20:34:39 2018 -0400 Merge pull request #40 from gmlewis/master Run "flutter format" and "analyze" and clean up deprecated warning commit 0b543568172278e68f8e900dbe6e45aaa24ff0f7 Author: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> Date: Fri Aug 3 20:23:33 2018 -0400 Revert HttpStatus.ok change commit cd3291934f8688d7fbd851b66c58b62905e0e3a5 Author: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> Date: Fri Aug 3 20:13:10 2018 -0400 Run "flutter format" and "analyze" and clean up deprecated warning commit 8ed7a6fe477d6df8165ba76561ad92c768eb1c19 Author: Dan Field Date: Wed Aug 1 22:23:46 2018 -0400 update changelog commit a95d65510460cf1a534d3695ae268b80ddae3fc0 Author: Dan Field Date: Wed Aug 1 22:22:55 2018 -0400 Consume latest path_drawing package to fix parsing issue commit 0f00ef2ec5b6923a194a5c8da6e9aa107ea67749 Author: Dan Field Date: Wed Aug 1 22:10:13 2018 -0400 fix smooth command parsing commit 27747231a14b9b6896fb11b3212044b66fffa6fc Author: Dan Field Date: Tue Jul 31 16:02:07 2018 -0400 update package commit 89ad74cf0dcdc1aa14597641d8224ea6fd0cd732 Author: Dan Field Date: Tue Jul 31 16:01:10 2018 -0400 fix issue for master :( commit 6407d0d83cbdb7d758b51a377e8d20d9ccc251c3 Author: Dan Field Date: Tue Jul 31 15:53:49 2018 -0400 reformat commit 3e76aa0a5b36428af95511f84a5ecf8ba6cd92ab Merge: 257815f9e 7ca1ddf96 Author: Dan Field Date: Tue Jul 31 15:53:30 2018 -0400 Merge branch 'master' of github.com:dnfield/flutter_svg commit 257815f9ed0b94be31df5337e3b442ac7db13d07 Author: Dan Field Date: Tue Jul 31 15:53:21 2018 -0400 update changelog/pubspec commit cbba590de4b910c712233a79d19c2700539f9f6e Author: Dan Field Date: Tue Jul 31 15:51:29 2018 -0400 fix stroke commit e6c506baa8e55f845ab4b123b1f520aa5a9bee60 Author: Dan Field Date: Tue Jul 31 14:32:47 2018 -0400 Fix opacity for fill with inheritence commit a5ff723c49c208f0adf84d6645f665ac937409dc Author: Dan Field Date: Mon Jul 30 11:22:42 2018 -0400 add example, fix link commit a42c76620175a949665f63bef671697160a78b54 Author: Dan Field Date: Mon Jul 30 10:48:51 2018 -0400 initial commit commit 7ca1ddf961386ff8e0e4d24da37a7cf6a8306fe4 Merge: b181e216b 04f2e609c Author: Dan Field Date: Thu Jul 19 09:23:24 2018 -0400 Merge pull request #37 from cjrams/useHeaders Use the headers to get the file commit 04f2e609c11f38a255854392dffa842ac00fa1ce Author: Carlos Jimenez Rams Date: Thu Jul 19 14:42:55 2018 +0200 Fixed warnings and empty headers commit ade74a1c190d644971ac36ffdfedf252e869c286 Author: Carlos Jimenez Rams Date: Thu Jul 19 12:55:44 2018 +0200 Use the headers to get the file commit 35eca1b1d14a8dd608cb459340dcaa3e40edaa81 Author: Dan Field Date: Mon Jul 2 08:20:22 2018 -0400 version bump for exponents commit b181e216ba6359ee8db334bab2ac82d48a761634 Author: Dan Field Date: Wed Jun 27 09:23:37 2018 -0400 Fix typos... commit 83fd74c7c8fe2008817c648b57c5b554154cf90b Author: Dan Field Date: Mon Jun 25 22:10:04 2018 -0400 0.5.0 commit eea855ac1e058a23f98e5c03ad5578887f3d3a43 Author: Dan Field Date: Mon Jun 25 21:58:36 2018 -0400 save before committing... commit cb70ea2853dd2a693dd51e30cfd05d92f7c9a98c Author: Dan Field Date: Mon Jun 25 21:55:54 2018 -0400 support nested tspans, but no dx/dy/x/y yet commit 2c13ff97671dc1f49985717a47447c434bfc56e1 Author: Dan Field Date: Fri Jun 22 21:37:21 2018 -0400 update tests commit b4454befed46eeedd5a4ebbdf17398a00a442f95 Author: Dan Field Date: Fri Jun 22 21:34:58 2018 -0400 Fix ellipse parsing commit 0b95960bcbb03fa2e1054159cff3060279df91ea Author: Dan Field Date: Wed Jun 20 21:37:58 2018 -0400 fix analysis; remove dead code commit de2da02dd41252b3ea454b1b6f9c9a07f94b0ba7 Author: Dan Field Date: Wed Jun 20 20:42:40 2018 -0400 beta usable for testing commit 95c1eaf356a2889233fb0087d863e21408926b3e Author: Dan Field Date: Wed Jun 20 20:42:11 2018 -0400 add support for focal, update pubspec commit a52bac4ef1de334dba3e10dc1921f2d4a9d10a4c Author: Dan Field Date: Wed Jun 20 13:16:03 2018 -0400 Fix polyline parsing commit 03aca8da2190ef66d6dc18aeb7232314955117d7 Author: Dan Field Date: Tue Jun 19 18:53:46 2018 -0400 bump version commit b495e65ea0a946bff1ed44e721c55c265c99b068 Author: Dan Field Date: Tue Jun 19 18:53:17 2018 -0400 Fix width/height in flex scenarios commit 47809d16441517416ce5e32f569156fde0b6b0cc Author: Dan Field Date: Mon Jun 18 19:48:52 2018 -0400 format commit aef2c3aec18783ea8cfa89bbee2313a8f2e612ba Author: Dan Field Date: Mon Jun 18 19:41:05 2018 -0400 back to dev commit 10d2be030de779a4c76dec1390a619170a946323 Merge: b881eeb7b 5e8213d3d Author: Dan Field Date: Mon Jun 18 19:38:18 2018 -0400 v0.4.0 commit b881eeb7b89e052f35db45a2450c2712bea9cf04 Author: Dan Field Date: Mon Jun 18 19:30:04 2018 -0400 remove dead code, make sure this runs on beta in travis commit 627972dbd2452e9447ceba65b8911720c2163833 Author: Dan Field Date: Mon Jun 18 19:28:04 2018 -0400 version bump commit 532fe9fec06e135d98e03c68e9e0d5fe75042a89 Author: Dan Field Date: Mon Jun 18 19:07:25 2018 -0400 Print error when encountering unresolved definition commit 5e8213d3dfd8994354d33739e3cb868f91d5706c Author: Dan Field Date: Sat Jun 16 15:45:18 2018 -0400 Support for text-anchor commit d826e860650387cd8b4c343c5f64e55003782dac Author: Dan Field Date: Fri Jun 15 10:48:52 2018 -0400 update travis for this branch commit c600f78ea2885f8a3e2a4ccd490e6ccddd341b8c Author: Dan Field Date: Fri Jun 15 10:38:48 2018 -0400 Support text stroke and fill commit 7109f7f3dc68f860882c81f263513f0838fdb95c Author: Dan Field Date: Thu Jun 14 09:50:12 2018 -0400 improve tests, improve coverage commit 8973c2c22baaf3b6d61a7e886ee6ab5fd5e6cbbb Author: Dan Field Date: Wed Jun 13 22:15:56 2018 -0400 fix directionality commit e65bdaa2d50e90271fbe14339e4dc01b998c6ac4 Author: Dan Field Date: Wed Jun 13 21:50:07 2018 -0400 documentation for SVG, add width/height commit 099ee77fd3020108ac1fcf50aba85e316387bfb5 Author: Dan Field Date: Tue Jun 12 11:40:57 2018 -0400 missing update to golden generator, analyzer nits commit fb02d555080230587fe8b5159b013c7548a159f8 Author: Dan Field Date: Tue Jun 12 11:37:11 2018 -0400 remove deprecated code. add better error reporting for unsupported style element commit 9d6b2e042df558f4600890a92640532861278198 Author: Dan Field Date: Sun Jun 10 14:19:57 2018 -0400 bump version to v0.3.3 commit 3fa872df63ee08ab78932a3367af788436ce3086 Merge: 3255ca15a e0fe5a544 Author: Dan Field Date: Sat Jun 9 19:17:27 2018 -0400 Merge pull request #18 from wkornewald/fix-color-parsing color percentages can be floats and there can be whitespace everywhere commit e0fe5a544f61aa5c5e05ad2b8e8fd83662e99844 Author: Waldemar Kornewald Date: Sat Jun 9 08:15:40 2018 +0200 color percentages can be floats, rgb is case-insensitive, allow whitespace commit 3255ca15a4323f81bbcacd02f218ad7f54ffcfb0 Merge: 8cd88516e 1528f4c3f Author: Dan Field Date: Fri Jun 8 15:52:16 2018 -0400 Merge pull request #17 from wkornewald/fix-path-on-windows fixed path handling on Windows commit 1528f4c3f40701926b5bb0cc3f85e16fc25c54de Author: Waldemar Kornewald Date: Fri Jun 8 21:30:18 2018 +0200 fixed path handling on Windows You have to use Platform.script.toFilePath() instead of Platform.script.path because the latter is the path part of a Uri, but we want an actual file system path. commit 8cd88516e04997d755731540608be887bc5e8cd4 Merge: d59ecbb0b b04554693 Author: Dan Field Date: Fri Jun 8 14:50:46 2018 -0400 Merge pull request #16 from wkornewald/fix-centering fixed centering of image in scaleCanvasToViewBox() commit b045546933ae566eb56ab89fa383b84618c3005c Author: Waldemar Kornewald Date: Thu Jun 7 16:44:31 2018 +0200 fixed centering of image in scaleCanvasToViewBox() commit d59ecbb0b286a82aef543933cfe1d4d595f84742 Author: Dan Field Date: Tue May 29 07:27:08 2018 -0400 bump ver commit 15aceff6c6a72d7014ea83f79b2306c8c568c367 Author: Dan Field Date: Mon May 28 19:33:09 2018 -0400 color as part of hash/equals commit d1d2193b7b215341069c9e6fb0bb99beb2f99aaa Author: Dan Field Date: Mon May 28 09:13:02 2018 -0400 ver bump commit 69ca4bb07b5e18b882c2087777766da4aa59ce52 Author: Dan Field Date: Sun May 27 15:21:51 2018 -0400 color filtering! commit 9722f7d5024885e6dcce39060250ce55696336a4 Author: Dan Field Date: Sun May 27 00:26:40 2018 -0400 update changelog commit 1bc3e2613b211af1734957d6fae8279f5a9fcebd Author: Dan Field Date: Sun May 27 00:22:31 2018 -0400 bump ver commit a0bad842df31016b452b550c28c00acd6b03e48d Author: Dan Field Date: Sun May 27 00:21:44 2018 -0400 update readme, changelog commit 4516446dfbf45e953eaf315e6a616346734179c7 Author: Dan Field Date: Sat May 26 23:29:06 2018 -0400 pref const commit 8ed43e1245d91a5ba39948cafd58b6e9f717083c Author: Dan Field Date: Sat May 26 23:25:06 2018 -0400 allow drawing outside viewbox on picture commit b2255b0d7cbda07a41a0830d9269fa0404ee7e16 Author: Dan Field Date: Sat May 26 23:07:37 2018 -0400 update PictureConfiguration commit 3dcffdb60024b01ec259959fe0947f807d50b133 Author: Dan Field Date: Sat May 26 22:58:41 2018 -0400 allow drawing outside of viewbox commit 5cc51e561d9fdf881e637e31e7ed83a8c8ddddd6 Author: Dan Field Date: Fri May 25 15:02:44 2018 -0400 format commit 1bf4e0d9698d70f10c269fb590b51fe4e7fc7ec8 Author: Dan Field Date: Fri May 25 14:57:47 2018 -0400 Update pubspec.yaml commit 346680a20c3a011aed53be9e1c4b7a1b17b3308a Author: Dan Field Date: Fri May 25 14:50:47 2018 -0400 initial caching commit 0ab3f45a009eb0d40b9a5b157b703cdffc51e076 Author: Dan Field Date: Fri May 25 11:34:14 2018 -0400 update tests, add String version commit e3bc3d67cdf58af8be79c7de8345c6bd139c036f Author: Dan Field Date: Fri May 25 09:11:01 2018 -0400 more refactoring, getting closer, deprecate old classes commit 34a85aad7e924330aa98da94cab5ad05b5a87511 Author: Dan Field Date: Fri May 25 00:13:59 2018 -0400 Major refactor of widgets - WIP commit 73f5571ff5e34d76840df7238e1c2cfac3d031ff Author: Dan Field Date: Thu May 24 09:31:09 2018 -0400 Revert colorReplacer commit 8c1bac3d8265d65ec45da917a9872b39a017a7e6 Author: Dan Field Date: Sun May 20 15:07:30 2018 -0400 improve example commit 928306f050be46dfe999c2f8a64f2d210624bb2f Author: Dan Field Date: Sun May 20 15:02:05 2018 -0400 support color replacement, rename enum values to match dart style commit f41a4400d96f82980b184cf451c668bbb1ca55e0 Author: Dan Field Date: Sun May 20 07:27:34 2018 -0400 add golden file commit e30ac227085232ab76bc852411f64797505a749d Author: Dan Field Date: Sun May 20 07:26:01 2018 -0400 uncomment code commit c2ac7bd4846447bce895c68bea9f4b4ece08e2dd Author: Dan Field Date: Sun May 20 07:23:14 2018 -0400 support multiple clips commit 5d9801ab38a8b75135e2292bc1b98820da40ec23 Author: Dan Field Date: Sat May 19 20:57:49 2018 -0400 remove temporary testing code commit a7a079f632044e2e1bf6b751262ec411e8549dec Author: Dan Field Date: Sat May 19 20:54:06 2018 -0400 initial clip path support; fix bug in inherit; update tiger golden commit d7f415f0ae6b26da97c0179b3d8d1a4e5fb23076 Author: Dan Field Date: Sat May 19 16:06:38 2018 -0400 move path parsing out for clippath commit 7a469dfeec528ef4b99f60e396f4853b3889ff79 Author: Dan Field Date: Sat May 19 14:15:07 2018 -0400 Refactor in prep for clipPath commit d64ee3d10ad713877e074771fc12de652eeb4b5e Author: Dan Field Date: Thu May 17 10:12:37 2018 -0400 CHANGELOG updates... commit 3ccdc13431a6d87c1828588f91865d4be8e235d9 Author: Dan Field Date: Thu May 17 10:08:43 2018 -0400 bump ver commit 03d0bf593a395cab1d4bf84bd633cf970837dc6e Author: Dan Field Date: Thu May 17 10:06:12 2018 -0400 README and docs, formatting commit bc3daa626b9d93eff27695f06ca2e617cec41007 Author: Dan Field Date: Thu May 17 09:15:20 2018 -0400 more tests commit 8ebcedbb75d77fd3a3a5a9d053959db4f8ed8ee1 Author: Dan Field Date: Wed May 16 21:14:48 2018 -0400 update golden image for flutter logo commit a53bb514e16c2a59ff020e3f38b9902186d9b7d7 Author: Dan Field Date: Wed May 16 21:06:02 2018 -0400 add missing gradient to flutter logo commit ecc27bc9aef4816a7791fd0bbb1df66a32e81832 Author: Dan Field Date: Wed May 16 14:15:56 2018 -0400 more tests commit be4d50311dda5620d1b51a69a40f6a49ef03ba19 Author: Dan Field Date: Wed May 16 00:59:18 2018 -0400 support for radial gradient pct commit 7efec9bde6d3ee3fd1fc24a5ddcc30a14f05bbd0 Author: Dan Field Date: Tue May 15 22:08:59 2018 -0400 customize error and loading in widget commit fc264c99ac97295829979bb62ead6cdde12bde60 Author: Dan Field Date: Tue May 15 10:56:36 2018 -0400 use ErrorWidget on error commit a5da18c138309a26c01ee6f1781b4836eb1b8e2b Author: Dan Field Date: Tue May 15 00:48:01 2018 -0400 single branch travis commit 26114430204cb1a19a55c35149f25d9939a07875 Author: Dan Field Date: Tue May 15 00:35:29 2018 -0400 format updates commit 3ebfd28085bcaac4e6bfef7e5cf6cfb3061eee6f Author: Dan Field Date: Tue May 15 00:32:12 2018 -0400 doc updates commit 0c9c34d1dcae8c1e958e876c178711b0275c45ce Author: Dan Field Date: Tue May 15 00:02:16 2018 -0400 add more unit tests, minor bug fixes from unit testing commit c216bc835ee04ca01a024b8d5ea9e5b48cede755 Author: Dan Field Date: Mon May 14 22:23:15 2018 -0400 coverage commit eb7a998d8b6713489be908a910de15f2fe543055 Author: Dan Field Date: Mon May 14 22:15:16 2018 -0400 add coverage commit c4f0c2148007c03345012ca9a3eca4820bd12f93 Author: Dan Field Date: Mon May 14 22:08:48 2018 -0400 support different spreadModes commit db430ab7aeb9b08ee9c18c27949a933ddd0ac5f9 Author: Dan Field Date: Mon May 14 21:36:08 2018 -0400 render tests! commit 167ca5a12c89f75dc2f8a846f7db635f93eeb625 Author: Dan Field Date: Sun May 13 23:52:11 2018 -0400 Fix arc, better none handling commit 045095f56a48d240e57a16401bca8b30df0b9c15 Author: Dan Field Date: Fri May 11 22:06:00 2018 -0400 add flutter analyze to travis commit 3b7a2e7db837c0bc51a49ac80acb5dd44d6ee3f5 Author: Dan Field Date: Fri May 11 01:43:27 2018 -0400 stricter analysis options commit 14002bf10e1c58dc7a3b85e3b644276df73ddb6e Author: Dan Field Date: Fri May 11 01:08:55 2018 -0400 update docs commit 00ec89f2c55d954d9511dfd04750cae2470b1a72 Author: Dan Field Date: Fri May 11 00:48:08 2018 -0400 uncomment code commit 51e48b54ed6cf84f15f698e49c0d5935d0e7e65c Author: Dan Field Date: Fri May 11 00:34:58 2018 -0400 move example, improved inheritence, improved opacity handling commit 058264a692d3e9f981ff8c499972e30e758c8d7e Author: Dan Field Date: Thu May 10 16:22:39 2018 -0400 comment after experimenting with optimizations commit e74d8081d063a9757880af9c42c35661a2efea59 Author: Dan Field Date: Thu May 10 16:15:01 2018 -0400 add some tests, update travis to point to dev commit 925f0b7e63bb0920dfef48068197b9ab0eb5852d Author: Dan Field Date: Thu May 10 16:02:48 2018 -0400 basic support for style attribute, better inheritence, bump version commit a731b17a262d58c7c2aeb56071cb34e8971f5698 Author: Dan Field Date: Tue May 8 23:02:16 2018 -0400 initial dash path support; fix bug with line commit a961ced286581cdb6e640e867c600ecbff8cb36c Author: Dan Field Date: Sun May 6 19:11:48 2018 -0400 add changelog commit eacafd1095e1196758a152369730b5bb09743744 Author: Dan Field Date: Sun May 6 19:10:24 2018 -0400 remove network test commit 63b5a37593c6da9c6145218d30f46828615e5773 Author: Dan Field Date: Sun May 6 19:04:49 2018 -0400 initial text support, treat as , flutter version fix commit 9756650d5fc7df16f2a78d4bd223515dc88d4d4d Author: Dan Field Date: Tue May 1 14:32:45 2018 -0400 update pubspec commit b8b16653e1dc114c9dfd1f5219be3562d42b7eea Author: Dan Field Date: Tue May 1 14:24:04 2018 -0400 inheritance improvements commit 6cbd2ecccc4ca9286d7a46be20eb59a58e88685d Merge: 19ea0282d caf5602a8 Author: Dan Field Date: Tue May 1 08:27:59 2018 -0400 Merge pull request #6 from fmatosqg/master Fix error on slider value > max, update flutter min version commit caf5602a8f2cbe46c713666334e20a5fff01644f Author: Fabio de Matos Date: Tue May 1 11:30:51 2018 +1000 Fix error on slider value > max, update flutter min version commit 19ea0282dc4a4c007d50a233f4a6f143a3fee781 Author: Dan Field Date: Mon Apr 30 20:58:05 2018 -0400 light refactoring of svg, add initial android drawable support commit 9cfd0ddf8b18efe94d131414efc0866c6c79500f Author: Dan Field Date: Mon Apr 30 00:37:50 2018 -0400 initial radial gradient implementation commit 58a3fe62357b13d4bf0547230103139aefd14756 Author: Dan Field Date: Sun Apr 29 23:16:26 2018 -0400 remove unintended comment outs, remove debug printing, rename var commit 72714282867f8f6f30269113e841d91237948b39 Author: Dan Field Date: Sun Apr 29 23:10:43 2018 -0400 fix linear gradients commit 735892d0d33dd0e763f43def3ad13476a6d3dd9c Author: Dan Field Date: Sun Apr 29 20:40:32 2018 -0400 use master commit 910e6020316b73978ad10353c975bfd3d6f00ebb Author: Dan Field Date: Sun Apr 29 20:38:11 2018 -0400 fix travis name commit 04513a69e3eeb186ecb506622e6ffae5cc86133a Author: Dan Field Date: Sun Apr 29 20:35:16 2018 -0400 remove unused import commit 65a2347ee218d8af4d90052d6d91b9b148c8c146 Author: Dan Field Date: Sun Apr 29 20:29:06 2018 -0400 Minor refactoring, document more methods/classes commit 673ac964d6da6ec04e108e2f42a972e588e2fb90 Author: Dan Field Date: Sun Apr 29 19:47:03 2018 -0400 Further separation, use RepaintBoundary commit 3c99255746149d86ff19f376db806272bb8ef72b Author: Dan Field Date: Sun Apr 29 17:57:14 2018 -0400 refactor to start decoupling parsing from drawing commit 23e20463b06e147c39178f46a014c7a6cc7aa74e Author: Dan Field Date: Sun Apr 29 11:57:01 2018 -0400 default to background commit 92c08f370d867f4b651a3b0fee2e6f392a168453 Author: Dan Field Date: Sun Apr 29 08:24:41 2018 -0400 allow user to decide foreground or background for painting commit e0e6b4f33b3c7ba41d5b2183004638ac5de9872a Author: Dan Field Date: Sat Apr 28 21:15:00 2018 -0400 fix for scaling, better gradients, flutter logo close commit abda74357453fc832aa7fd511e318a04b13389aa Author: Dan Field Date: Sat Apr 28 11:58:49 2018 -0400 gradients better, but scaling wrong commit 8ec7690dc5c03d7b235d83257c4a6530fdf6be33 Author: Dan Field Date: Sat Apr 28 08:25:38 2018 -0400 support RRects, minor refactoring, gradients WIP commit cdeba7958f53a36145c1b9416d6df0178632c985 Merge: 7baa65d82 f49f887e1 Author: Dan Field Date: Fri Apr 27 08:48:51 2018 -0400 Merge pull request #1 from fmatosqg/patch-1 Update pubspec.yaml commit 7baa65d8203d296ebe924260d85744f71d848f3b Author: Dan Field Date: Fri Apr 27 01:03:56 2018 -0400 fix travis.yml commit 843fe520de7ff8c172997ab081c3b9aee871c53c Author: Dan Field Date: Fri Apr 27 01:01:55 2018 -0400 travis commit f49f887e184d4c4db4131717655cdd6da6ef8fa3 Author: fmatosqg Date: Fri Apr 27 14:22:43 2018 +1000 Update pubspec.yaml Enforce flutter version is >= 0.3.5 commit 086a0a0b3abab814854ea4c49b23032a298532bc Author: Dan Field Date: Thu Apr 26 12:27:45 2018 -0400 update path ver commit 7547a38b39e12a00b1c7d5d88ea2bab21237b422 Author: Dan Field Date: Thu Apr 26 12:26:21 2018 -0400 fix transform bug, comment out network for now commit 98c0dcfef788b72c9ec25e1d579854e4c0c43e55 Author: Dan Field Date: Thu Apr 26 11:24:33 2018 -0400 fixes, add tiger, consume package, add license commit 2f3858c9c4fc14c20272604a717e37a0afa2de71 Author: Dan Field Date: Wed Apr 25 23:38:54 2018 -0400 make analyzer happy commit ce07f0d4873e4c4e3b8470fcb335c8c0c809bbff Author: Dan Field Date: Wed Apr 25 23:37:22 2018 -0400 path parsing commit 85d40073c124e7ae4727bf7c30c41b290db5a200 Author: Dan Field Date: Tue Mar 13 19:28:19 2018 -0400 refactor to use paths/simplify code commit a5b91cf4846171d5bc4681dfca88ed2b04d34750 Author: Dan Field Date: Tue Mar 13 16:03:07 2018 -0400 improve stroke attribute handling commit c704ea72c6baa536f341d97104f8097f92c639d6 Author: Dan Field Date: Tue Mar 13 15:26:10 2018 -0400 normalize stroke and fill handling commit eb719a6f754175cd88d52b64796c0bc05a62edc5 Author: Dan Field Date: Tue Mar 13 14:32:34 2018 -0400 refactor parsers, better support for fill and stroke, still wip on that commit 4a3a1333aff26dedb038680fe56496b542f7c67d Author: Dan Field Date: Mon Mar 12 16:51:42 2018 -0400 start making room for better async support for loading commit 221e0e3b0b6bbca7216e41ef587faaad786b16ca Author: Dan Field Date: Mon Mar 12 15:01:24 2018 -0400 fix polygon, add polyline commit d8ee930b09687bb031bb1fbc57172f7b9c34af54 Author: Dan Field Date: Mon Mar 12 14:43:06 2018 -0400 better transform support, start refactoring widget commit f72ccfcc135740517fafa21424971eb6fd4e370d Author: Dan Field Date: Mon Mar 12 10:59:25 2018 -0400 update readme commit 10e5569c87076cf67c78dc44c0ca0629f502cc79 Author: Dan Field Date: Mon Mar 12 10:56:11 2018 -0400 add ellipse commit d00cc10024a50e586883f0b705e85fad7e960e4b Author: Dan Field Date: Mon Mar 12 10:19:54 2018 -0400 add more shapes, add more samples, start parsing transforms commit 35cbd867d6ccdfd975ec9ae77b5ef9ccf271ee44 Author: Dan Field Date: Mon Mar 12 00:21:12 2018 -0400 initial commit --- .../google_maps_flutter_android_test.dart | 90 ++++++++----------- .../url_launcher_ios/CHANGELOG.md | 4 + 2 files changed, 42 insertions(+), 52 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart index d3a39d08769..d88a39ae0e0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart @@ -519,72 +519,58 @@ void main() { // Object two should be changed. { expect(toChange.length, 1); - final List? encoded = toChange.first?.encode() as List?; - expect(encoded?[0], object2new.alpha); - final PlatformDoublePair? offset = encoded?[1] as PlatformDoublePair?; - expect(offset?.x, object2new.anchor.dx); - expect(offset?.y, object2new.anchor.dy); - expect(encoded?.getRange(2, 5).toList(), [ - object2new.consumeTapEvents, - object2new.draggable, - object2new.flat, - ]); + final PlatformMarker firstChanged = toChange.first; + expect(firstChanged.alpha, object2new.alpha); + expect(firstChanged.anchor.x, object2new.anchor.dx); + expect(firstChanged.anchor.y, object2new.anchor.dy); + expect(firstChanged.consumeTapEvents, object2new.consumeTapEvents); + expect(firstChanged.draggable, object2new.draggable); + expect(firstChanged.flat, object2new.flat); expect( - (encoded?[5] as PlatformBitmap?)?.bitmap.runtimeType, + firstChanged.icon.bitmap.runtimeType, GoogleMapsFlutterAndroid.platformBitmapFromBitmapDescriptor( object2new.icon) .bitmap .runtimeType); - final PlatformInfoWindow? window = encoded?[6] as PlatformInfoWindow?; - expect(window?.title, object2new.infoWindow.title); - expect(window?.snippet, object2new.infoWindow.snippet); - expect(window?.anchor.x, object2new.infoWindow.anchor.dx); - expect(window?.anchor.y, object2new.infoWindow.anchor.dy); - final PlatformLatLng? latLng = encoded?[7] as PlatformLatLng?; - expect(latLng?.latitude, object2new.position.latitude); - expect(latLng?.longitude, object2new.position.longitude); - expect(encoded?.getRange(8, 13), [ - object2new.rotation, - object2new.visible, - object2new.zIndex, - object2new.markerId.value, - object2new.clusterManagerId?.value, - ]); + expect(firstChanged.infoWindow.title, object2new.infoWindow.title); + expect(firstChanged.infoWindow.snippet, object2new.infoWindow.snippet); + expect(firstChanged.infoWindow.anchor.x, object2new.infoWindow.anchor.dx); + expect(firstChanged.infoWindow.anchor.y, object2new.infoWindow.anchor.dy); + expect(firstChanged.position.latitude, object2new.position.latitude); + expect(firstChanged.position.longitude, object2new.position.longitude); + expect(firstChanged.rotation, object2new.rotation); + expect(firstChanged.visible, object2new.visible); + expect(firstChanged.zIndex, object2new.zIndex); + expect(firstChanged.markerId, object2new.markerId.value); + expect(firstChanged.clusterManagerId, object2new.clusterManagerId?.value); } // Object 3 should be added. { expect(toAdd.length, 1); - final List? encoded = toAdd.first?.encode() as List?; - expect(encoded?[0], object3.alpha); - final PlatformDoublePair? offset = encoded?[1] as PlatformDoublePair?; - expect(offset?.x, object3.anchor.dx); - expect(offset?.y, object3.anchor.dy); - expect(encoded?.getRange(2, 5).toList(), [ - object3.consumeTapEvents, - object3.draggable, - object3.flat, - ]); + final PlatformMarker firstAdded = toAdd.first; + expect(firstAdded.alpha, object3.alpha); + expect(firstAdded.anchor.x, object3.anchor.dx); + expect(firstAdded.anchor.y, object3.anchor.dy); + expect(firstAdded.consumeTapEvents, object3.consumeTapEvents); + expect(firstAdded.draggable, object3.draggable); + expect(firstAdded.flat, object3.flat); expect( - (encoded?[5] as PlatformBitmap?)?.bitmap.runtimeType, + firstAdded.icon.bitmap.runtimeType, GoogleMapsFlutterAndroid.platformBitmapFromBitmapDescriptor( object3.icon) .bitmap .runtimeType); - final PlatformInfoWindow? window = encoded?[6] as PlatformInfoWindow?; - expect(window?.title, object3.infoWindow.title); - expect(window?.snippet, object3.infoWindow.snippet); - expect(window?.anchor.x, object3.infoWindow.anchor.dx); - expect(window?.anchor.y, object3.infoWindow.anchor.dy); - final PlatformLatLng? latLng = encoded?[7] as PlatformLatLng?; - expect(latLng?.latitude, object3.position.latitude); - expect(latLng?.longitude, object3.position.longitude); - expect(encoded?.getRange(8, 13), [ - object3.rotation, - object3.visible, - object3.zIndex, - object3.markerId.value, - object3.clusterManagerId?.value, - ]); + expect(firstAdded.infoWindow.title, object3.infoWindow.title); + expect(firstAdded.infoWindow.snippet, object3.infoWindow.snippet); + expect(firstAdded.infoWindow.anchor.x, object3.infoWindow.anchor.dx); + expect(firstAdded.infoWindow.anchor.y, object3.infoWindow.anchor.dy); + expect(firstAdded.position.latitude, object3.position.latitude); + expect(firstAdded.position.longitude, object3.position.longitude); + expect(firstAdded.rotation, object3.rotation); + expect(firstAdded.visible, object3.visible); + expect(firstAdded.zIndex, object3.zIndex); + expect(firstAdded.markerId, object3.markerId.value); + expect(firstAdded.clusterManagerId, object3.clusterManagerId?.value); } }); diff --git a/packages/url_launcher/url_launcher_ios/CHANGELOG.md b/packages/url_launcher/url_launcher_ios/CHANGELOG.md index 5103c4e2ec1..1979806afec 100644 --- a/packages/url_launcher/url_launcher_ios/CHANGELOG.md +++ b/packages/url_launcher/url_launcher_ios/CHANGELOG.md @@ -5,6 +5,10 @@ ## 6.3.2 +* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4. + +## 6.3.2 + * Updates to Pigeon v22. * Updates minimum supported SDK version to Flutter 3.19/Dart 3.3. From 6b5a36b20d00f9bd88183eb1b1f30f6d68ebed0a Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 23 Dec 2024 10:37:12 +0200 Subject: [PATCH 066/130] Fix merge issues --- .../google_maps_flutter_android_test.dart | 4 +- .../ios/Classes/GoogleMapMarkerController.m | 40 ++--- .../lib/src/google_maps_flutter_ios.dart | 142 ++---------------- 3 files changed, 31 insertions(+), 155 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart index d88a39ae0e0..b77cfa3ee09 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart @@ -519,7 +519,7 @@ void main() { // Object two should be changed. { expect(toChange.length, 1); - final PlatformMarker firstChanged = toChange.first; + final PlatformMarker firstChanged = toChange.first!; expect(firstChanged.alpha, object2new.alpha); expect(firstChanged.anchor.x, object2new.anchor.dx); expect(firstChanged.anchor.y, object2new.anchor.dy); @@ -547,7 +547,7 @@ void main() { // Object 3 should be added. { expect(toAdd.length, 1); - final PlatformMarker firstAdded = toAdd.first; + final PlatformMarker firstAdded = toAdd.first!; expect(firstAdded.alpha, object3.alpha); expect(firstAdded.anchor.x, object3.anchor.dx); expect(firstAdded.anchor.y, object3.anchor.dy); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m index 6525577cc31..1bbe731d676 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m @@ -107,25 +107,25 @@ - (void)setZIndex:(int)zIndex { self.marker.zIndex = zIndex; } -- (void)updateFromPlatformMarker:(FGMPlatformMarker *)platformMarker - registrar:(NSObject *)registrar - screenScale:(CGFloat)screenScale { - [self setAlpha:platformMarker.alpha]; - [self setAnchor:FGMGetCGPointForPigeonPoint(platformMarker.anchor)]; - [self setDraggable:platformMarker.draggable]; - UIImage *image = [self iconFromBitmap:platformMarker.icon - registrar:registrar - screenScale:screenScale]; - [self setIcon:image]; - [self setFlat:platformMarker.flat]; - [self setConsumeTapEvents:platformMarker.consumeTapEvents]; - [self setPosition:FGMGetCoordinateForPigeonLatLng(platformMarker.position)]; - [self setRotation:platformMarker.rotation]; - [self setVisible:platformMarker.visible]; - [self setZIndex:platformMarker.zIndex]; - [self setCollisionBehavior:platformMarker.collisionBehavior]; - -} +//- (void)updateFromPlatformMarker:(FGMPlatformMarker *)platformMarker +// registrar:(NSObject *)registrar +// screenScale:(CGFloat)screenScale { +// [self setAlpha:platformMarker.alpha]; +// [self setAnchor:FGMGetCGPointForPigeonPoint(platformMarker.anchor)]; +// [self setDraggable:platformMarker.draggable]; +// UIImage *image = [self iconFromBitmap:platformMarker.icon +// registrar:registrar +// screenScale:screenScale]; +// [self setIcon:image]; +// [self setFlat:platformMarker.flat]; +// [self setConsumeTapEvents:platformMarker.consumeTapEvents]; +// [self setPosition:FGMGetCoordinateForPigeonLatLng(platformMarker.position)]; +// [self setRotation:platformMarker.rotation]; +// [self setVisible:platformMarker.visible]; +// [self setZIndex:platformMarker.zIndex]; +// [self setCollisionBehavior:platformMarker.collisionBehavior]; +//} +// - (void)setCollisionBehavior:(FGMMarkerCollisionBehaviorBox*)collisionBehavior { if ([self.marker isKindOfClass:[GMSAdvancedMarker class]]) { GMSCollisionBehavior collitionBehaviorValue = (GMSCollisionBehavior)collisionBehavior.value; @@ -199,7 +199,7 @@ - (void)addMarker:(FGMPlatformMarker *)markerToAdd { CLLocationCoordinate2D position = FGMGetCoordinateForPigeonLatLng(markerToAdd.position); NSString *markerIdentifier = markerToAdd.markerId; NSString *clusterManagerIdentifier = markerToAdd.clusterManagerId; - GMSMarker *marker = (self.markerType == FGMPlatformMarkerTypeAdvanced) + GMSMarker *marker = (self.markerType == FGMPlatformMarkerTypeAdvancedMarker) ? [GMSAdvancedMarker markerWithPosition:position] : [GMSMarker markerWithPosition:position]; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index 7b89857f633..3e6489ae5bd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -937,139 +937,6 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { 'Unrecognized type of bitmap ${bitmap.runtimeType}', 'bitmap'); } } - - static PlatformMarkerType _platformMarkerTypeFromMarkerType( - MarkerType markerType) { - return switch (markerType) { - MarkerType.marker => PlatformMarkerType.marker, - MarkerType.advancedMarker => PlatformMarkerType.advancedMarker, - }; - } - - static PlatformCameraUpdate _platformCameraUpdateFromCameraUpdate( - CameraUpdate update) { - switch (update.updateType) { - case CameraUpdateType.newCameraPosition: - update as CameraUpdateNewCameraPosition; - return PlatformCameraUpdate( - cameraUpdate: PlatformCameraUpdateNewCameraPosition( - cameraPosition: _platformCameraPositionFromCameraPosition( - update.cameraPosition))); - case CameraUpdateType.newLatLng: - update as CameraUpdateNewLatLng; - return PlatformCameraUpdate( - cameraUpdate: PlatformCameraUpdateNewLatLng( - latLng: _platformLatLngFromLatLng(update.latLng))); - case CameraUpdateType.newLatLngZoom: - update as CameraUpdateNewLatLngZoom; - return PlatformCameraUpdate( - cameraUpdate: PlatformCameraUpdateNewLatLngZoom( - latLng: _platformLatLngFromLatLng(update.latLng), - zoom: update.zoom)); - case CameraUpdateType.newLatLngBounds: - update as CameraUpdateNewLatLngBounds; - return PlatformCameraUpdate( - cameraUpdate: PlatformCameraUpdateNewLatLngBounds( - bounds: _platformLatLngBoundsFromLatLngBounds(update.bounds)!, - padding: update.padding)); - case CameraUpdateType.zoomTo: - update as CameraUpdateZoomTo; - return PlatformCameraUpdate( - cameraUpdate: PlatformCameraUpdateZoomTo(zoom: update.zoom)); - case CameraUpdateType.zoomBy: - update as CameraUpdateZoomBy; - final Offset? focus = update.focus; - return PlatformCameraUpdate( - cameraUpdate: PlatformCameraUpdateZoomBy( - amount: update.amount, - focus: focus == null ? null : _platformPointFromOffset(focus))); - case CameraUpdateType.zoomIn: - update as CameraUpdateZoomIn; - return PlatformCameraUpdate( - cameraUpdate: PlatformCameraUpdateZoom(out: false)); - case CameraUpdateType.zoomOut: - update as CameraUpdateZoomOut; - return PlatformCameraUpdate( - cameraUpdate: PlatformCameraUpdateZoom(out: true)); - case CameraUpdateType.scrollBy: - update as CameraUpdateScrollBy; - return PlatformCameraUpdate( - cameraUpdate: - PlatformCameraUpdateScrollBy(dx: update.dx, dy: update.dy)); - } - } - - /// Converts [MapBitmapScaling] from platform interface to [PlatformMapBitmapScaling] Pigeon. - @visibleForTesting - static PlatformMapBitmapScaling platformMapBitmapScalingFromScaling( - MapBitmapScaling scaling) { - switch (scaling) { - case MapBitmapScaling.auto: - return PlatformMapBitmapScaling.auto; - case MapBitmapScaling.none: - return PlatformMapBitmapScaling.none; - } - - // The enum comes from a different package, which could get a new value at - // any time, so provide a fallback that ensures this won't break when used - // with a version that contains new values. This is deliberately outside - // the switch rather than a `default` so that the linter will flag the - // switch as needing an update. - // ignore: dead_code - return PlatformMapBitmapScaling.auto; - } - - /// Converts [BitmapDescriptor] from platform interface to [PlatformBitmap] pigeon. - @visibleForTesting - static PlatformBitmap platformBitmapFromBitmapDescriptor( - BitmapDescriptor bitmap) { - switch (bitmap) { - case final DefaultMarker marker: - return PlatformBitmap( - bitmap: PlatformBitmapDefaultMarker(hue: marker.hue?.toDouble())); - // Clients may still use this deprecated format, so it must be supported. - // ignore: deprecated_member_use - case final BytesBitmap bytes: - final Size? size = bytes.size; - return PlatformBitmap( - bitmap: PlatformBitmapBytes( - byteData: bytes.byteData, - size: (size == null) ? null : _platformSizeFromSize(size))); - case final AssetBitmap asset: - return PlatformBitmap( - bitmap: PlatformBitmapAsset(name: asset.name, pkg: asset.package)); - // Clients may still use this deprecated format, so it must be supported. - // ignore: deprecated_member_use - case final AssetImageBitmap asset: - final Size? size = asset.size; - return PlatformBitmap( - bitmap: PlatformBitmapAssetImage( - name: asset.name, - scale: asset.scale, - size: (size == null) ? null : _platformSizeFromSize(size))); - case final AssetMapBitmap asset: - return PlatformBitmap( - bitmap: PlatformBitmapAssetMap( - assetName: asset.assetName, - bitmapScaling: - platformMapBitmapScalingFromScaling(asset.bitmapScaling), - imagePixelRatio: asset.imagePixelRatio, - width: asset.width, - height: asset.height)); - case final BytesMapBitmap bytes: - return PlatformBitmap( - bitmap: PlatformBitmapBytesMap( - byteData: bytes.byteData, - bitmapScaling: - platformMapBitmapScalingFromScaling(bytes.bitmapScaling), - imagePixelRatio: bytes.imagePixelRatio, - width: bytes.width, - height: bytes.height)); - default: - throw ArgumentError( - 'Unrecognized type of bitmap ${bitmap.runtimeType}', 'bitmap'); - } - } } /// Callback handler for map events from the platform host. @@ -1307,11 +1174,20 @@ PlatformMapConfiguration _platformMapConfigurationFromMapConfiguration( indoorViewEnabled: config.indoorViewEnabled, trafficEnabled: config.trafficEnabled, buildingsEnabled: config.buildingsEnabled, + markerType: _platformMarkerTypeFromMarkerType(config.markerType), mapId: config.mapId, style: config.style, ); } +PlatformMarkerType? _platformMarkerTypeFromMarkerType(MarkerType? markerType) { + return switch (markerType) { + MarkerType.marker => PlatformMarkerType.marker, + MarkerType.advancedMarker => PlatformMarkerType.advancedMarker, + null => null, + }; +} + // For supporting the deprecated updateMapOptions API. PlatformMapConfiguration _platformMapConfigurationFromOptionsJson( Map options) { From 0e83e4521336d611e37fb919aba977b17fd468ef Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 23 Dec 2024 11:19:21 +0200 Subject: [PATCH 067/130] Revert unwanted changes --- .../adsense_test_js_interop.dart | 90 ------------------- .../lib/src/js_interop/adsbygoogle.dart | 36 -------- .../src/js_interop/package_web_tweaks.dart | 47 ---------- .../path_provider/path_provider/CHANGELOG.md | 2 +- .../two_dimensional_scrollables/CHANGELOG.md | 4 +- .../url_launcher_ios/CHANGELOG.md | 4 - 6 files changed, 2 insertions(+), 181 deletions(-) delete mode 100644 packages/google_adsense/example/integration_test/adsense_test_js_interop.dart delete mode 100644 packages/google_adsense/lib/src/js_interop/adsbygoogle.dart delete mode 100644 packages/google_adsense/lib/src/js_interop/package_web_tweaks.dart diff --git a/packages/google_adsense/example/integration_test/adsense_test_js_interop.dart b/packages/google_adsense/example/integration_test/adsense_test_js_interop.dart deleted file mode 100644 index aff8a4f4a55..00000000000 --- a/packages/google_adsense/example/integration_test/adsense_test_js_interop.dart +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -@JS() -library; - -import 'dart:async'; -import 'dart:js_interop'; -import 'dart:ui'; - -import 'package:google_adsense/src/adsense/ad_unit_params.dart'; -import 'package:web/web.dart' as web; - -typedef VoidFn = void Function(); - -// window.adsbygoogle uses "duck typing", so let us set anything to it. -@JS('adsbygoogle') -external set _adsbygoogle(JSAny? value); - -/// Mocks `adsbygoogle` [push] function. -/// -/// `push` will run in the next tick (`Timer.run`) to ensure async behavior. -void mockAdsByGoogle(VoidFn push) { - _adsbygoogle = { - 'push': () { - Timer.run(push); - }.toJS, - }.jsify(); -} - -/// Sets `adsbygoogle` to null. -void clearAdsByGoogleMock() { - _adsbygoogle = null; -} - -typedef MockAdConfig = ({Size size, String adStatus}); - -/// Returns a function that generates a "push" function for [mockAdsByGoogle]. -VoidFn mockAd({ - Size size = Size.zero, - String adStatus = AdStatus.FILLED, -}) { - return mockAds( - [(size: size, adStatus: adStatus)], - ); -} - -/// Returns a function that handles a bunch of ad units at once. Can be used with [mockAdsByGoogle]. -VoidFn mockAds(List adConfigs) { - return () { - final List foundTargets = - web.document.querySelectorAll('div[id^=adUnit] ins').toList; - - for (int i = 0; i < foundTargets.length; i++) { - final web.HTMLElement adTarget = foundTargets[i]; - if (adTarget.children.length > 0) { - continue; - } - - final (:Size size, :String adStatus) = adConfigs[i]; - - final web.HTMLElement fakeAd = web.HTMLDivElement() - ..style.width = '${size.width}px' - ..style.height = '${size.height}px' - ..style.background = '#fabada'; - - // AdSense seems to be setting the width/height on the `ins` of the injected ad too. - adTarget - ..style.width = '${size.width}px' - ..style.height = '${size.height}px' - ..style.display = 'block' - ..appendChild(fakeAd) - ..setAttribute('data-ad-status', adStatus); - } - }; -} - -extension on web.NodeList { - List get toList { - final List result = []; - for (int i = 0; i < length; i++) { - final web.Node? node = item(i); - if (node != null && node.isA()) { - result.add(node as web.HTMLElement); - } - } - return result; - } -} diff --git a/packages/google_adsense/lib/src/js_interop/adsbygoogle.dart b/packages/google_adsense/lib/src/js_interop/adsbygoogle.dart deleted file mode 100644 index bf97d23e978..00000000000 --- a/packages/google_adsense/lib/src/js_interop/adsbygoogle.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -@JS() -library; - -import 'dart:js_interop'; - -/// JS-interop mappings to the window.adsbygoogle object. -extension type AdsByGoogle._(JSObject _) implements JSObject { - /// Pushes some `params` to the `window.adsbygoogle` object. - external void push(JSObject params); -} - -// window.adsbygoogle may be null if this package runs before the JS SDK loads. -@JS('adsbygoogle') -external AdsByGoogle? get _adsbygoogle; - -// window.adsbygoogle uses "duck typing", so let us set anything to it. -@JS('adsbygoogle') -external set _adsbygoogle(JSAny? value); - -/// Whether or not the `window.adsbygoogle` object is defined and not null. -bool get adsbygooglePresent => _adsbygoogle.isDefinedAndNotNull; - -/// Binding to the `adsbygoogle` JS global. -/// -/// See: https://support.google.com/adsense/answer/9274516?hl=en&ref_topic=28893&sjid=11495822575537499409-EU -AdsByGoogle get adsbygoogle { - if (!adsbygooglePresent) { - // Initialize _adsbygoole to "something that has a push method". - _adsbygoogle = JSArray(); - } - return _adsbygoogle!; -} diff --git a/packages/google_adsense/lib/src/js_interop/package_web_tweaks.dart b/packages/google_adsense/lib/src/js_interop/package_web_tweaks.dart deleted file mode 100644 index 7f819dc6b9c..00000000000 --- a/packages/google_adsense/lib/src/js_interop/package_web_tweaks.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'dart:js_interop'; - -import 'package:web/web.dart' as web; - -// Re-use of https://github.com/flutter/packages/blob/main/packages/google_identity_services_web/lib/src/js_interop/package_web_tweaks.dart - -/// This extension gives web.window a nullable getter to the `trustedTypes` -/// property, which needs to be used to check for feature support. -extension NullableTrustedTypesGetter on web.Window { - /// (Nullable) Bindings to window.trustedTypes. - /// - /// This may be null if the browser doesn't support the Trusted Types API. - /// - /// See: https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API - @JS('trustedTypes') - external web.TrustedTypePolicyFactory? get nullableTrustedTypes; -} - -/// Allows setting a TrustedScriptURL as the src of a script element. -extension TrustedTypeSrcAttribute on web.HTMLScriptElement { - @JS('src') - external set trustedSrc(web.TrustedScriptURL value); -} - -/// Allows creating a script URL only from a string, with no arguments. -extension CreateScriptUrlNoArgs on web.TrustedTypePolicy { - /// Allows calling `createScriptURL` with only the `input` argument. - @JS('createScriptURL') - external web.TrustedScriptURL createScriptURLNoArgs(String input); -} - -/// Exception thrown if the Trusted Types feature is supported, enabled, and it -/// has prevented this loader from injecting the JS SDK. -class TrustedTypesException implements Exception { - /// - TrustedTypesException(this.message); - - /// The message of the exception - final String message; - - @override - String toString() => 'TrustedTypesException: $message'; -} diff --git a/packages/path_provider/path_provider/CHANGELOG.md b/packages/path_provider/path_provider/CHANGELOG.md index e5a275c3bf6..1c8d48672e4 100644 --- a/packages/path_provider/path_provider/CHANGELOG.md +++ b/packages/path_provider/path_provider/CHANGELOG.md @@ -1,4 +1,4 @@ -## 2.1.5 +## NEXT * Updates minimum supported SDK version to Flutter 3.22/Dart 3.4. diff --git a/packages/two_dimensional_scrollables/CHANGELOG.md b/packages/two_dimensional_scrollables/CHANGELOG.md index 4cc1a94ce15..cb4b895d584 100644 --- a/packages/two_dimensional_scrollables/CHANGELOG.md +++ b/packages/two_dimensional_scrollables/CHANGELOG.md @@ -1,6 +1,4 @@ -## 0.3.3 - -* Fixes an issue where collapsing nodes in the TreeView didn't work correctly. +## NEXT * Updates minimum supported SDK version to Flutter 3.22/Dart 3.4. diff --git a/packages/url_launcher/url_launcher_ios/CHANGELOG.md b/packages/url_launcher/url_launcher_ios/CHANGELOG.md index 1979806afec..5103c4e2ec1 100644 --- a/packages/url_launcher/url_launcher_ios/CHANGELOG.md +++ b/packages/url_launcher/url_launcher_ios/CHANGELOG.md @@ -5,10 +5,6 @@ ## 6.3.2 -* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4. - -## 6.3.2 - * Updates to Pigeon v22. * Updates minimum supported SDK version to Flutter 3.19/Dart 3.3. From 6a71b6831037356eef091ea805f832cf698dba1c Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:03:39 +0200 Subject: [PATCH 068/130] Tweak README content --- packages/google_maps_flutter/google_maps_flutter/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/README.md b/packages/google_maps_flutter/google_maps_flutter/README.md index 89647a15679..178c085acaa 100644 --- a/packages/google_maps_flutter/google_maps_flutter/README.md +++ b/packages/google_maps_flutter/google_maps_flutter/README.md @@ -118,8 +118,10 @@ in an unbounded widget will cause the application to throw a Flutter exception. ### Advanced Markers -[Advanced Markers](https://developers.google.com/maps/documentation/javascript/advanced-markers/overview) are map markers that offer extra customization options. [Map Id](https://developers.google.com/maps/documentation/get-map-id) is required in order to use Advanced Markers: - +[Advanced Markers](https://developers.google.com/maps/documentation/javascript/advanced-markers/overview) +are map markers that offer extra customization options. +[Map ID](https://developers.google.com/maps/documentation/get-map-id) is +required in order to use Advanced Markers: ```dart From 8ae112450f4846263b27d680b65a2e7b04fce151 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:28:00 +0200 Subject: [PATCH 069/130] Add cloudMapId getter --- .../lib/src/types/map_configuration.dart | 9 +++++++++ .../test/types/map_configuration_test.dart | 1 + 2 files changed, 10 insertions(+) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart index f44a1a8b15b..5162cd50813 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart @@ -129,6 +129,15 @@ class MapConfiguration { /// used. final MarkerType? markerType; + /// Identifier that's associated with a specific cloud-based map style. + /// + /// See https://developers.google.com/maps/documentation/get-map-id + /// for more details. + /// + /// Deprecated in favor of [mapId]. + @Deprecated('cloudMapId is deprecated. Use mapId instead.') + String? get cloudMapId => mapId; + /// Returns a new options object containing only the values of this instance /// that are different from [other]. MapConfiguration diffFrom(MapConfiguration other) { diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart index 8bf3758e496..bcd69a0e82f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/map_configuration_test.dart @@ -405,6 +405,7 @@ void main() { // The diff from empty options should be the diff itself. expect(diff.diffFrom(empty), diff); // A diff applied to non-empty options should update that field. + expect(updated.cloudMapId, _kMapId); expect(updated.mapId, _kMapId); // The hash code should change. expect(empty.hashCode, isNot(diff.hashCode)); From 0a4f69fe4568a28acc03e90dca9fbf32c671d53c Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:31:13 +0200 Subject: [PATCH 070/130] Return false from isAdvancedMarkersAvailable --- .../src/platform_interface/google_maps_flutter_platform.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart index 7fa8172c439..b5e6457909c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart @@ -432,9 +432,7 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface { /// Returns true if [AdvancedMarker]s can be used with this map. Future isAdvancedMarkersAvailable({required int mapId}) async { - throw UnimplementedError( - 'isAdvancedMarkersAvailable() has not been implemented.', - ); + return false; } /// Returns a widget displaying the map view. From 8c04fd28e3688d494cee2d3e4e0d26b95194a307 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:53:47 +0200 Subject: [PATCH 071/130] Make AdvancedMarkerGlyph sealed --- .../lib/src/google_maps_flutter_android.dart | 20 ++++---- .../lib/src/google_maps_flutter_ios.dart | 2 +- .../lib/src/types/bitmap.dart | 7 ++- .../lib/src/convert.dart | 47 +++++++++---------- 4 files changed, 40 insertions(+), 36 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index eb2338551ce..63ccd2983c8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -1014,16 +1014,16 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { String? glyphText; Color? glyphTextColor; BitmapDescriptor? glyphBitmapDescriptor; - if (glyph != null) { - switch (glyph.runtimeType) { - case final CircleGlyph circleGlyph: - glyphColor = circleGlyph.color; - case final TextGlyph textGlyph: - glyphText = textGlyph.text; - glyphTextColor = textGlyph.textColor; - case final BitmapGlyph bitmapGlyph: - glyphBitmapDescriptor = bitmapGlyph.bitmap; - } + switch (glyph) { + case final CircleGlyph circleGlyph: + glyphColor = circleGlyph.color; + case final TextGlyph textGlyph: + glyphText = textGlyph.text; + glyphTextColor = textGlyph.textColor; + case final BitmapGlyph bitmapGlyph: + glyphBitmapDescriptor = bitmapGlyph.bitmap; + case null: + break; } return PlatformBitmap( diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index 3e6489ae5bd..609c825ca2a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -924,7 +924,7 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { ), ), ); - default: + case null: return PlatformBitmap( bitmap: PlatformBitmapPinConfig( backgroundColor: backgroundColor, diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart index f496452b874..0598b2c570f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart @@ -1034,6 +1034,8 @@ class PinConfig extends BitmapDescriptor { /// /// The [glyph] parameter is used to define the glyph that is displayed on the /// pin marker. + /// + /// At least one of the parameters must not be null. const PinConfig({ this.backgroundColor, this.borderColor, @@ -1075,7 +1077,7 @@ class PinConfig extends BitmapDescriptor { } /// Defines a glyph (the element at the center of an [AdvancedMarker] icon). -abstract class AdvancedMarkerGlyph extends BitmapDescriptor { +sealed class AdvancedMarkerGlyph extends BitmapDescriptor { const AdvancedMarkerGlyph._() : super._(); } @@ -1102,6 +1104,9 @@ class CircleGlyph extends AdvancedMarkerGlyph { /// Defines a glyph instance with a specified bitmap. class BitmapGlyph extends AdvancedMarkerGlyph { /// Constructs a glyph with the specified [bitmap]. + /// + /// [bitmap] is the image to be displayed in the center of the glyph. Must not + /// be an [AdvancedMarkerGlyph]. const BitmapGlyph({ required this.bitmap, }) : assert( diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index 6f4cf5352ed..02490ccebd7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -430,31 +430,30 @@ Future _advancedMarkerIconFromBitmapDescriptor( : null; final AdvancedMarkerGlyph? glyph = bitmapDescriptor.glyph; - if (glyph != null) { - switch (glyph.runtimeType) { - case final CircleGlyph circleGlyph: - options.glyphColor = _getCssColor(circleGlyph.color); - case final TextGlyph textGlyph: - final web.Element element = document.createElement('p'); - element.innerHTML = textGlyph.text.toJS; - if (textGlyph.textColor != null) { - element.setAttribute( - 'style', - 'color: ${_getCssColor(textGlyph.textColor!)}', - ); - } - options.glyph = element; - case final BitmapGlyph bitmapGlyph: - final Node? glyphBitmap = - await _advancedMarkerIconFromBitmapDescriptor( - bitmapGlyph.bitmap, - // Always opaque, opacity is handled by the parent marker. - opacity: 1.0, - // Always visible, as the visibility is handled by the parent marker. - isVisible: true, + switch (glyph) { + case final CircleGlyph circleGlyph: + options.glyphColor = _getCssColor(circleGlyph.color); + case final TextGlyph textGlyph: + final web.Element element = document.createElement('p'); + element.innerHTML = textGlyph.text.toJS; + if (textGlyph.textColor != null) { + element.setAttribute( + 'style', + 'color: ${_getCssColor(textGlyph.textColor!)}', ); - options.glyph = glyphBitmap; - } + } + options.glyph = element; + case final BitmapGlyph bitmapGlyph: + final Node? glyphBitmap = await _advancedMarkerIconFromBitmapDescriptor( + bitmapGlyph.bitmap, + // Always opaque, opacity is handled by the parent marker. + opacity: 1.0, + // Always visible, as the visibility is handled by the parent marker. + isVisible: true, + ); + options.glyph = glyphBitmap; + case null: + break; } final gmaps.PinElement pinElement = gmaps.PinElement(options); From 71d008957419f0ab1e8444dec4f953d66d3c5094 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 10 Jan 2025 13:22:59 +0200 Subject: [PATCH 072/130] Revert cloudMapId serialization --- .../map_configuration_serialization.dart | 1 + .../map_configuration_serialization_test.dart | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart index 5d5dcde2c83..bba79dfcc37 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/utils/map_configuration_serialization.dart @@ -58,6 +58,7 @@ Map jsonForMapConfiguration(MapConfiguration config) { if (config.trafficEnabled != null) 'trafficEnabled': config.trafficEnabled!, if (config.buildingsEnabled != null) 'buildingsEnabled': config.buildingsEnabled!, + if (config.cloudMapId != null) 'cloudMapId': config.cloudMapId!, if (config.mapId != null) 'mapId': config.mapId!, if (config.style != null) 'style': config.style!, if (config.markerType != null) 'markerType': config.markerType!.index, diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart index c1fab2ff0bd..0cfdd32d74e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart @@ -78,4 +78,27 @@ void main() { 'cloudMapId': _kCloudMapId, }); }); + + test('mapId preferred over cloudMapId', () { + const MapConfiguration config = MapConfiguration( + mapId: 'map-id', + cloudMapId: 'cloud-map-id', + ); + final Map json = jsonForMapConfiguration(config); + expect(json, { + 'mapId': 'map-id', + 'cloudMapId': 'map-id', + }); + }); + + test('mapId falls back to cloudMapId', () { + const MapConfiguration config = MapConfiguration( + cloudMapId: 'cloud-map-id', + ); + final Map json = jsonForMapConfiguration(config); + expect(json, { + 'mapId': 'cloud-map-id', + 'cloudMapId': 'cloud-map-id', + }); + }); } From 1b09b09d420ad31827784ab08f3ef1ef728737ee Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 13 Jan 2025 11:16:07 +0200 Subject: [PATCH 073/130] Update mapId comment --- .../example/lib/advanced_marker_icons.dart | 1 - .../lib/advanced_markers_clustering.dart | 1 - .../google_maps_flutter/example/lib/main.dart | 3 ++- .../example/lib/advanced_marker_icons.dart | 16 ++++++++++------ .../lib/advanced_markers_clustering.dart | 16 ++++++++++------ .../example/lib/main.dart | 12 ++++++------ .../example/lib/place_advanced_marker.dart | 17 +++++++++-------- .../example/lib/place_marker.dart | 18 +++++++++++------- .../example/ios14/lib/main.dart | 3 ++- .../example/ios15/lib/main.dart | 3 ++- .../lib/advanced_markers_clustering.dart | 10 ++-------- .../maps_example_dart/lib/clustering.dart | 11 +++++++---- 12 files changed, 61 insertions(+), 50 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart index dd8a710c441..a8ce0071d97 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart @@ -32,7 +32,6 @@ class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { class _AdvancedMarkerIconsBody extends MarkerIconsBody { const _AdvancedMarkerIconsBody(this.mapId); - /// Map ID to use for the GoogleMap. @override final String? mapId; diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart index ad7d913c421..13b13fbd1c7 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart @@ -34,7 +34,6 @@ class AdvancedMarkersClustering extends GoogleMapExampleAppPage { class _AdvancedMarkerClusteringBody extends ClusteringBody { const _AdvancedMarkerClusteringBody(this.mapId); - /// Map ID to use for the GoogleMap. @override final String? mapId; diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart index d2fb855a2b0..e48461f4579 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart @@ -32,7 +32,8 @@ import 'scrolling_map.dart'; import 'snapshot.dart'; import 'tile_overlay.dart'; -/// Map ID is required for some examples to use advanced markers. +/// Place your map ID here. Map ID is required for pages that use advanced +/// markers. const String? _mapId = null; final List _allPages = [ diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart index 9e85eb3860e..6ff24491d0f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart @@ -5,31 +5,35 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; -import 'main.dart' as main; import 'marker_icons.dart'; import 'page.dart'; /// Page that demonstrates how to use custom [AdvanceMarker] icons. class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { /// Default constructor. - const AdvancedMarkerIconsPage({Key? key}) - : super( + const AdvancedMarkerIconsPage({ + required this.mapId, + Key? key, + }) : super( key: key, const Icon(Icons.image_outlined), 'Advanced marker icons', ); + /// Map ID to use for the GoogleMap. + final String? mapId; + @override Widget build(BuildContext context) { - return const _AdvancedMarkerIconsBody(); + return _AdvancedMarkerIconsBody(mapId); } } class _AdvancedMarkerIconsBody extends MarkerIconsBody { - const _AdvancedMarkerIconsBody(); + const _AdvancedMarkerIconsBody(this.mapId); @override - String? get mapId => main.mapId; + final String? mapId; @override Marker createMarker( diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart index c342ad00794..53a82c7898d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart @@ -6,32 +6,36 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; import 'clustering.dart'; -import 'main.dart' as main; import 'page.dart'; /// Page for demonstrating advanced marker clustering support. /// Same as [ClusteringPage] but works with [AdvancedMarker]. class AdvancedMarkersClusteringPage extends GoogleMapExampleAppPage { /// Default constructor. - const AdvancedMarkersClusteringPage({Key? key}) - : super( + const AdvancedMarkersClusteringPage({ + Key? key, + required this.mapId, + }) : super( key: key, const Icon(Icons.place_outlined), 'Manage clusters of advanced markers', ); + /// Map ID to use for the GoogleMap. + final String? mapId; + @override Widget build(BuildContext context) { - return const _AdvancedMarkerClusteringBody(); + return _AdvancedMarkerClusteringBody(mapId); } } /// Same as [ClusteringBody] but works with [AdvancedMarker]. class _AdvancedMarkerClusteringBody extends ClusteringBody { - const _AdvancedMarkerClusteringBody(); + const _AdvancedMarkerClusteringBody(this.mapId); @override - String? get mapId => main.mapId; + final String? mapId; @override Marker createMarker( diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart index 83fde1da8ba..389db435587 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart @@ -31,9 +31,9 @@ import 'scrolling_map.dart'; import 'snapshot.dart'; import 'tile_overlay.dart'; -/// Map ID is required for some examples to use advanced markers. -// ignore: unnecessary_nullable_for_final_variable_declarations, unreachable_from_main -const String? mapId = null; +/// Place your map ID here. Map ID is required for pages that use advanced +/// markers. +const String? _mapId = null; final List _allPages = [ const MapUiPage(), @@ -42,9 +42,9 @@ final List _allPages = [ const AnimateCameraPage(), const MoveCameraPage(), const PlaceMarkerPage(), - const PlaceAdvancedMarkerPage(), + const PlaceAdvancedMarkerPage(mapId: _mapId), const MarkerIconsPage(), - const AdvancedMarkerIconsPage(), + const AdvancedMarkerIconsPage(mapId: _mapId), const ScrollingMapPage(), const PlacePolylinePage(), const PlacePolygonPage(), @@ -55,7 +55,7 @@ final List _allPages = [ const TileOverlayPage(), const GroundOverlayPage(), const ClusteringPage(), - const AdvancedMarkersClusteringPage(), + const AdvancedMarkersClusteringPage(mapId: _mapId), const MapIdPage(), ]; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart index f317547fb6b..b2892a046c8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart @@ -5,34 +5,35 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; -import 'main.dart' as main; import 'page.dart'; import 'place_marker.dart'; /// Page demonstrating how to use Advanced [Marker] class. class PlaceAdvancedMarkerPage extends GoogleMapExampleAppPage { /// Default constructor. - const PlaceAdvancedMarkerPage({Key? key}) - : super(const Icon(Icons.place_outlined), 'Place advanced marker', + const PlaceAdvancedMarkerPage({ + Key? key, + required this.mapId, + }) : super(const Icon(Icons.place_outlined), 'Place advanced marker', key: key); + /// Map ID to use for the GoogleMap. + final String? mapId; + @override Widget build(BuildContext context) { - return const _PlaceAdvancedMarkerBody(); + return _PlaceAdvancedMarkerBody(mapId: mapId); } } class _PlaceAdvancedMarkerBody extends PlaceMarkerBody { - const _PlaceAdvancedMarkerBody(); + const _PlaceAdvancedMarkerBody({required super.mapId}); @override State createState() => _PlaceAdvancedMarkerBodyState(); } class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { - @override - String? get mapId => main.mapId; - @override Marker createMarker({ required MarkerId markerId, diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart index f4b6fe7b7b8..1a1fc82fafd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart @@ -26,7 +26,13 @@ class PlaceMarkerPage extends GoogleMapExampleAppPage { } class PlaceMarkerBody extends StatefulWidget { - const PlaceMarkerBody({super.key}); + const PlaceMarkerBody({ + super.key, + this.mapId, + }); + + /// Map ID to use for the GoogleMap. + final String? mapId; @override State createState() => PlaceMarkerBodyState(); @@ -270,9 +276,6 @@ class PlaceMarkerBodyState extends State { return BytesMapBitmap(bytes.buffer.asUint8List()); } - /// Returns the mapId to use for the GoogleMap - String? get mapId => null; - /// Creates a marker with given parameters Marker createMarker({ required MarkerId markerId, @@ -315,9 +318,10 @@ class PlaceMarkerBodyState extends State { getHeader(), Expanded( child: ExampleGoogleMap( - mapId: mapId, - markerType: - mapId != null ? MarkerType.advancedMarker : MarkerType.marker, + mapId: widget.mapId, + markerType: widget.mapId != null + ? MarkerType.advancedMarker + : MarkerType.marker, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.211), diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart index 02734701d52..dc0c7dc740c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart @@ -27,7 +27,8 @@ import 'package:maps_example_dart/scrolling_map.dart'; import 'package:maps_example_dart/snapshot.dart'; import 'package:maps_example_dart/tile_overlay.dart'; -/// Map ID is required for some examples to use advanced markers. +/// Place your map ID here. Map ID is required for pages that use advanced +/// markers. const String? _mapId = null; void main() { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart index 02734701d52..dc0c7dc740c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart @@ -27,7 +27,8 @@ import 'package:maps_example_dart/scrolling_map.dart'; import 'package:maps_example_dart/snapshot.dart'; import 'package:maps_example_dart/tile_overlay.dart'; -/// Map ID is required for some examples to use advanced markers. +/// Place your map ID here. Map ID is required for pages that use advanced +/// markers. const String? _mapId = null; void main() { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart index 714ad88d476..32b8a0137e1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart @@ -24,19 +24,13 @@ class AdvancedMarkersClusteringPage extends GoogleMapExampleAppPage { @override Widget build(BuildContext context) { - return _AdvancedMarkerClusteringBody(providedMapId: mapId); + return _AdvancedMarkerClusteringBody(mapId: mapId); } } /// Same as [ClusteringBody] but works with [AdvancedMarker]. class _AdvancedMarkerClusteringBody extends ClusteringBody { - const _AdvancedMarkerClusteringBody({required this.providedMapId}); - - final String? providedMapId; - - /// Returns the mapId to use for the GoogleMap - @override - String? get mapId => providedMapId; + const _AdvancedMarkerClusteringBody({required super.mapId}); @override Marker createMarker({ diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart index aaebc00e6f4..4c4cd0045ba 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart @@ -25,14 +25,17 @@ class ClusteringPage extends GoogleMapExampleAppPage { /// Body of the clustering page. class ClusteringBody extends StatefulWidget { /// Default Constructor. - const ClusteringBody({super.key}); + const ClusteringBody({ + super.key, + this.mapId, + }); + + /// Map ID to use for the GoogleMap. + final String? mapId; @override State createState() => ClusteringBodyState(); - /// Map ID to use for the GoogleMap. - String? get mapId => null; - /// Creates a marker that is later added to a cluster. Marker createMarker({ required MarkerId markerId, From 653b80d5e3214b1e329afe71f498969642ea9903 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 17 Jan 2025 10:14:46 +0200 Subject: [PATCH 074/130] Fix method name typo --- .../example/lib/advanced_markers_clustering.dart | 2 +- .../google_maps_flutter/example/lib/clustering.dart | 6 +++--- .../example/lib/place_advanced_marker.dart | 2 +- .../google_maps_flutter/example/lib/place_marker.dart | 6 +++--- .../example/lib/advanced_markers_clustering.dart | 2 +- .../google_maps_flutter_android/example/lib/clustering.dart | 6 +++--- .../example/lib/place_advanced_marker.dart | 2 +- .../example/lib/place_marker.dart | 6 +++--- .../maps_example_dart/lib/advanced_markers_clustering.dart | 2 +- .../example/shared/maps_example_dart/lib/clustering.dart | 6 +++--- .../shared/maps_example_dart/lib/place_advanced_marker.dart | 2 +- .../example/shared/maps_example_dart/lib/place_marker.dart | 6 +++--- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart index 13b13fbd1c7..ace6ea178a7 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart @@ -60,7 +60,7 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { } @override - Marker copyWithSelectedStated(Marker marker, bool isSelected) { + Marker copyWithSelectedState(Marker marker, bool isSelected) { assert(marker is AdvancedMarker); return (marker as AdvancedMarker).copyWith( iconParam: isSelected diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart index 440ad6f6fdd..6e7e5cc7803 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart @@ -47,7 +47,7 @@ class ClusteringBody extends StatefulWidget { } /// Returns selected or unselected state of the given [marker]. - Marker copyWithSelectedStated(Marker marker, bool isSelected) { + Marker copyWithSelectedState(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) @@ -125,12 +125,12 @@ class ClusteringBodyState extends State { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { final Marker resetOld = - widget.copyWithSelectedStated(markers[previousMarkerId]!, false); + widget.copyWithSelectedState(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; final Marker newMarker = - widget.copyWithSelectedStated(tappedMarker, true); + widget.copyWithSelectedState(tappedMarker, true); markers[markerId] = newMarker; }); } diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart index 43a1b1a1d84..e71cd6222f7 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart @@ -58,7 +58,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { } @override - Marker copyWithSelectedStated(Marker marker, bool isSelected) { + Marker copyWithSelectedState(Marker marker, bool isSelected) { return marker.copyWith( iconParam: _getMarkerBitmapDescriptor(isSelected: isSelected), ); diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart index 7f12cdac849..41a5ed71d89 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart @@ -67,11 +67,11 @@ class PlaceMarkerBodyState extends State { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { final Marker resetOld = - copyWithSelectedStated(markers[previousMarkerId]!, false); + copyWithSelectedState(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = copyWithSelectedStated(tappedMarker, true); + final Marker newMarker = copyWithSelectedState(tappedMarker, true); markers[markerId] = newMarker; markerPosition = null; @@ -295,7 +295,7 @@ class PlaceMarkerBodyState extends State { } /// Performs customizations of the [marker] to mark it as selected or not. - Marker copyWithSelectedStated(Marker marker, bool isSelected) { + Marker copyWithSelectedState(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart index 53a82c7898d..eee0a599d1e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart @@ -60,7 +60,7 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { } @override - Marker copyWithSelectedStated(Marker marker, bool isSelected) { + Marker copyWithSelectedState(Marker marker, bool isSelected) { assert(marker is AdvancedMarker); return (marker as AdvancedMarker).copyWith( iconParam: isSelected diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart index 14bb97ac851..96470d5726d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart @@ -48,7 +48,7 @@ class ClusteringBody extends StatefulWidget { } /// Returns selected or unselected state of the given [marker]. - Marker copyWithSelectedStated(Marker marker, bool isSelected) { + Marker copyWithSelectedState(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) @@ -131,12 +131,12 @@ class ClusteringBodyState extends State { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { final Marker resetOld = - widget.copyWithSelectedStated(markers[previousMarkerId]!, false); + widget.copyWithSelectedState(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; final Marker newMarker = - widget.copyWithSelectedStated(tappedMarker, true); + widget.copyWithSelectedState(tappedMarker, true); markers[markerId] = newMarker; }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart index b2892a046c8..cad223a76ee 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart @@ -55,7 +55,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { } @override - Marker copyWithSelectedStated(Marker marker, bool isSelected) { + Marker copyWithSelectedState(Marker marker, bool isSelected) { return marker.copyWith( iconParam: _getMarkerBitmapDescriptor(isSelected: isSelected), ); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart index 1a1fc82fafd..e65a1df052d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart @@ -68,11 +68,11 @@ class PlaceMarkerBodyState extends State { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { final Marker resetOld = - copyWithSelectedStated(markers[previousMarkerId]!, false); + copyWithSelectedState(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = copyWithSelectedStated(tappedMarker, true); + final Marker newMarker = copyWithSelectedState(tappedMarker, true); markers[markerId] = newMarker; markerPosition = null; @@ -296,7 +296,7 @@ class PlaceMarkerBodyState extends State { } /// Performs customizations of the [marker] to mark it as selected or not. - Marker copyWithSelectedStated(Marker marker, bool isSelected) { + Marker copyWithSelectedState(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart index 32b8a0137e1..4c6f8105127 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart @@ -55,7 +55,7 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { } @override - Marker copyWithSelectedStated(Marker marker, bool isSelected) { + Marker copyWithSelectedState(Marker marker, bool isSelected) { assert(marker is AdvancedMarker); return (marker as AdvancedMarker).copyWith( iconParam: isSelected diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart index 4c4cd0045ba..c1676f41b80 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart @@ -54,7 +54,7 @@ class ClusteringBody extends StatefulWidget { } /// Returns selected or unselected state of the given [marker]. - Marker copyWithSelectedStated(Marker marker, bool isSelected) { + Marker copyWithSelectedState(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) @@ -128,12 +128,12 @@ class ClusteringBodyState extends State { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { final Marker resetOld = - widget.copyWithSelectedStated(markers[previousMarkerId]!, false); + widget.copyWithSelectedState(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; final Marker newMarker = - widget.copyWithSelectedStated(tappedMarker, true); + widget.copyWithSelectedState(tappedMarker, true); markers[markerId] = newMarker; }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart index 82244330a41..e36f01b0d2b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart @@ -57,7 +57,7 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { } @override - Marker copyWithSelectedStated(Marker marker, bool isSelected) { + Marker copyWithSelectedState(Marker marker, bool isSelected) { return marker.copyWith( iconParam: _getMarkerBitmapDescriptor(isSelected: isSelected), ); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart index 7c45ec73fa5..4438841db8c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart @@ -66,11 +66,11 @@ class PlaceMarkerBodyState extends State { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { final Marker resetOld = - copyWithSelectedStated(markers[previousMarkerId]!, false); + copyWithSelectedState(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = copyWithSelectedStated(tappedMarker, true); + final Marker newMarker = copyWithSelectedState(tappedMarker, true); markers[markerId] = newMarker; markerPosition = null; @@ -313,7 +313,7 @@ class PlaceMarkerBodyState extends State { } /// Performs customizations of the [marker] to mark it as selected or not. - Marker copyWithSelectedStated(Marker marker, bool isSelected) { + Marker copyWithSelectedState(Marker marker, bool isSelected) { return marker.copyWith( iconParam: isSelected ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) From b744a8e06087d1a7b1761855e21184db2bbcf2a3 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 17 Jan 2025 11:12:07 +0200 Subject: [PATCH 075/130] Add GoogleMapMarkerType enum to the user-facing package --- .../google_maps_flutter/README.md | 2 +- .../example/lib/clustering.dart | 4 ++-- .../example/lib/marker_icons.dart | 4 ++-- .../example/lib/place_marker.dart | 4 ++-- .../lib/readme_sample_advanced_markers.dart | 2 +- .../lib/google_maps_flutter.dart | 1 - .../lib/src/google_map.dart | 21 ++++++++++++++++--- 7 files changed, 26 insertions(+), 12 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/README.md b/packages/google_maps_flutter/google_maps_flutter/README.md index 178c085acaa..3ee84287a6c 100644 --- a/packages/google_maps_flutter/google_maps_flutter/README.md +++ b/packages/google_maps_flutter/google_maps_flutter/README.md @@ -130,7 +130,7 @@ body: GoogleMap( mapId: 'my-map-id', // // Enable support for Advanced Markers. - markerType: MarkerType.advancedMarker, + markerType: GoogleMapMarkerType.advancedMarker, ``` ### Sample Usage diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart index 6e7e5cc7803..efad4b6f650 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart @@ -235,8 +235,8 @@ class ClusteringBodyState extends State { height: 300.0, child: GoogleMap( markerType: widget.mapId != null - ? MarkerType.advancedMarker - : MarkerType.marker, + ? GoogleMapMarkerType.advancedMarker + : GoogleMapMarkerType.marker, mapId: widget.mapId, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart index 67659e3d3bc..1c3c0c57ee3 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart @@ -85,8 +85,8 @@ class MarkerIconsBodyState extends State { height: 300.0, child: GoogleMap( markerType: widget.mapId != null - ? MarkerType.advancedMarker - : MarkerType.marker, + ? GoogleMapMarkerType.advancedMarker + : GoogleMapMarkerType.marker, mapId: widget.mapId, initialCameraPosition: const CameraPosition( target: _kMapCenter, diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart index 41a5ed71d89..f4b2081d03d 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart @@ -319,8 +319,8 @@ class PlaceMarkerBodyState extends State { child: GoogleMap( mapId: widget.mapId, markerType: widget.mapId != null - ? MarkerType.advancedMarker - : MarkerType.marker, + ? GoogleMapMarkerType.advancedMarker + : GoogleMapMarkerType.marker, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.211), diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart index 574e4436431..a0b1044569d 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart @@ -38,7 +38,7 @@ class AdvancedMarkersSample extends StatelessWidget { mapId: 'my-map-id', // Enable support for Advanced Markers. - markerType: MarkerType.advancedMarker, + markerType: GoogleMapMarkerType.advancedMarker, // #enddocregion AdvancedMarkersSample initialCameraPosition: _kGooglePlex, ), diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart index 5fb20d02e78..93296b8d855 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart @@ -46,7 +46,6 @@ export 'package:google_maps_flutter_platform_interface/google_maps_flutter_platf MapType, Marker, MarkerId, - MarkerType, MinMaxZoomPreference, PatternItem, Polygon, diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index ca40d402795..bc6f027ad6a 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -83,6 +83,16 @@ class AndroidGoogleMapsFlutter { } } +/// Indicates the type of marker that the map should use. +enum GoogleMapMarkerType { + /// Represents the default marker type, [Marker]. This marker type is + /// deprecated on the web. + marker, + + /// Represents the advanced marker type, [AdvancedMarker]. + advancedMarker, +} + /// A widget which displays a map with data obtained from the Google Maps service. class GoogleMap extends StatefulWidget { /// Creates a widget displaying data from Google Maps services. @@ -127,7 +137,7 @@ class GoogleMap extends StatefulWidget { this.onCameraIdle, this.onTap, this.onLongPress, - this.markerType = MarkerType.marker, + this.markerType = GoogleMapMarkerType.marker, String? mapId, @Deprecated('cloudMapId is deprecated. Use mapId instead.') String? cloudMapId, @@ -370,7 +380,7 @@ class GoogleMap extends StatefulWidget { /// /// While some features work with either type, using the incorrect type /// may result in unexpected behavior. - final MarkerType markerType; + final GoogleMapMarkerType markerType; /// Creates a [State] for this [GoogleMap]. @override @@ -668,6 +678,11 @@ class _GoogleMapState extends State { /// Builds a [MapConfiguration] from the given [map]. MapConfiguration _configurationFromMapWidget(GoogleMap map) { + final MarkerType mapConfigurationMarkerType = switch (map.markerType) { + GoogleMapMarkerType.marker => MarkerType.marker, + GoogleMapMarkerType.advancedMarker => MarkerType.advancedMarker, + }; + return MapConfiguration( webGestureHandling: map.webGestureHandling, compassEnabled: map.compassEnabled, @@ -689,7 +704,7 @@ MapConfiguration _configurationFromMapWidget(GoogleMap map) { indoorViewEnabled: map.indoorViewEnabled, trafficEnabled: map.trafficEnabled, buildingsEnabled: map.buildingsEnabled, - markerType: map.markerType, + markerType: mapConfigurationMarkerType, mapId: map.mapId, // A null style in the widget means no style, which is expressed as '' in // the configuration to distinguish from no change (null). From e6774091ee913330c8b4a235a66fd2968a44b1e3 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 17 Jan 2025 12:45:26 +0200 Subject: [PATCH 076/130] Fix test --- .../google_maps_flutter_platform_test.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart index 0324117581b..f3904ae2de7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart @@ -123,12 +123,11 @@ void main() { ); test( - 'default implementation of isAdvancedMarkersAvailable throws Unimplemented Error', + 'default implementation of isAdvancedMarkersAvailable returns false', () async { final GoogleMapsFlutterPlatform platform = BuildViewGoogleMapsFlutterPlatform(); - expect(() => platform.isAdvancedMarkersAvailable(mapId: 0), - throwsUnimplementedError); + expect(await platform.isAdvancedMarkersAvailable(mapId: 0), isFalse); }, ); From 6f58a7f2db50425a4d0040689879faece5d56419 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 17 Jan 2025 12:46:29 +0200 Subject: [PATCH 077/130] Use collection-if in advanced_marker.dart --- .../lib/src/types/advanced_marker.dart | 40 +++++++++---------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart index 70d52b08aa7..c0a6ac050c5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart @@ -88,29 +88,25 @@ class AdvancedMarker extends Marker { /// Converts this object to something serializable in JSON. @override Object toJson() { - final Map json = {}; + final String? clusterManagerIdValue = clusterManagerId?.value; - void addIfPresent(String fieldName, Object? value) { - if (value != null) { - json[fieldName] = value; - } - } - - addIfPresent('markerId', markerId.value); - addIfPresent('alpha', alpha); - addIfPresent('anchor', _offsetToJson(anchor)); - addIfPresent('consumeTapEvents', consumeTapEvents); - addIfPresent('draggable', draggable); - addIfPresent('flat', flat); - addIfPresent('icon', icon.toJson()); - addIfPresent('infoWindow', infoWindow.toJson()); - addIfPresent('position', position.toJson()); - addIfPresent('rotation', rotation); - addIfPresent('visible', visible); - addIfPresent('zIndex', zIndex); - addIfPresent('clusterManagerId', clusterManagerId?.value); - addIfPresent('collisionBehavior', collisionBehavior.index); - return json; + return { + 'markerId': markerId.value, + 'alpha': alpha, + 'consumeTapEvents': consumeTapEvents, + 'draggable': draggable, + 'flat': flat, + 'icon': icon.toJson(), + 'infoWindow': infoWindow.toJson(), + 'position': position.toJson(), + 'rotation': rotation, + 'visible': visible, + 'zIndex': zIndex, + 'collisionBehavior': collisionBehavior.index, + 'anchor': _offsetToJson(anchor), + if (clusterManagerIdValue != null) + 'clusterManagerId': clusterManagerIdValue, + }; } @override From 3ad9d5f324a09a9576fa1bd426a89f23a11954a8 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 17 Jan 2025 12:48:33 +0200 Subject: [PATCH 078/130] Use double-slash comments --- .../google_maps_flutter_web/lib/src/convert.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index 02490ccebd7..c950f58b044 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -277,13 +277,13 @@ gmaps.InfoWindowOptions? _infoWindowOptionsFromMarker(Marker marker) { // and the marker.infoWindow.anchor property. } -/// Attempts to extract a [gmaps.Size] from `iconConfig[sizeIndex]`. +// Attempts to extract a [gmaps.Size] from `iconConfig[sizeIndex]`. gmaps.Size? _gmSizeFromIconConfig(List iconConfig, int sizeIndex) { final Size? size = _sizeFromIconConfig(iconConfig, sizeIndex); return size != null ? gmaps.Size(size.width, size.height) : null; } -/// Attempts to extract a [Size] from `iconConfig[sizeIndex]`. +// Attempts to extract a [Size] from `iconConfig[sizeIndex]`. Size? _sizeFromIconConfig(List iconConfig, int sizeIndex) { Size? size; if (iconConfig.length >= sizeIndex + 1) { @@ -298,7 +298,7 @@ Size? _sizeFromIconConfig(List iconConfig, int sizeIndex) { return size; } -/// Sets the size and style of the [icon] element. +// Sets the size and style of the [icon] element. void _setIconStyle({ required web.Element icon, required Size? size, @@ -318,7 +318,7 @@ void _setIconStyle({ ); } -/// Sets the size of the Google Maps icon. +// Sets the size of the Google Maps icon. void _setIconSize({ required Size size, required gmaps.Icon icon, From f1b42c1e5d1bc71016dd13fa7c5b2c3f2417469c Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 17 Jan 2025 13:43:25 +0200 Subject: [PATCH 079/130] Use gmaps.Size instead of Size --- .../lib/src/convert.dart | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index c950f58b044..e66b37bfe2a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -279,29 +279,24 @@ gmaps.InfoWindowOptions? _infoWindowOptionsFromMarker(Marker marker) { // Attempts to extract a [gmaps.Size] from `iconConfig[sizeIndex]`. gmaps.Size? _gmSizeFromIconConfig(List iconConfig, int sizeIndex) { - final Size? size = _sizeFromIconConfig(iconConfig, sizeIndex); - return size != null ? gmaps.Size(size.width, size.height) : null; -} - -// Attempts to extract a [Size] from `iconConfig[sizeIndex]`. -Size? _sizeFromIconConfig(List iconConfig, int sizeIndex) { - Size? size; + gmaps.Size? size; if (iconConfig.length >= sizeIndex + 1) { final List? rawIconSize = iconConfig[sizeIndex] as List?; if (rawIconSize != null) { - size = Size( + size = gmaps.Size( rawIconSize[0]! as double, rawIconSize[1]! as double, ); } } + return size; } // Sets the size and style of the [icon] element. void _setIconStyle({ required web.Element icon, - required Size? size, + required gmaps.Size? size, required double? opacity, required bool? isVisible, }) { @@ -320,7 +315,7 @@ void _setIconStyle({ // Sets the size of the Google Maps icon. void _setIconSize({ - required Size size, + required gmaps.Size size, required gmaps.Icon icon, }) { final gmaps.Size gmapsSize = gmaps.Size(size.width, size.height); @@ -347,12 +342,12 @@ void _setIconAnchor({ /// [imagePixelRatio] based on the actual size of the image fetched from the /// [url]. If only one of the dimensions is provided, the other is calculated to /// maintain the image's original aspect ratio. -Future _getBitmapSize(MapBitmap mapBitmap, String url) async { +Future _getBitmapSize(MapBitmap mapBitmap, String url) async { final double? width = mapBitmap.width; final double? height = mapBitmap.height; if (width != null && height != null) { // If both, width and height are set, return the provided dimensions. - return Size(width, height); + return gmaps.Size(width, height); } else { assert( url.isNotEmpty, 'URL must not be empty when calculating dimensions.'); @@ -381,7 +376,7 @@ Future _getBitmapSize(MapBitmap mapBitmap, String url) async { } // Return the calculated size. - return Size(targetWidth, targetHeight); + return gmaps.Size(targetWidth, targetHeight); } } @@ -480,7 +475,7 @@ Future _advancedMarkerIconFromBitmapDescriptor( final web.Element icon = document.createElement('img') ..setAttribute('src', url); - final Size? size = switch (bitmapDescriptor.bitmapScaling) { + final gmaps.Size? size = switch (bitmapDescriptor.bitmapScaling) { MapBitmapScaling.auto => await _getBitmapSize(bitmapDescriptor, url), MapBitmapScaling.none => null, }; @@ -503,7 +498,7 @@ Future _advancedMarkerIconFromBitmapDescriptor( ui_web.assetManager.getAssetUrl(iconConfig[1]! as String), ); - final Size? size = _sizeFromIconConfig(iconConfig, 3); + final gmaps.Size? size = _gmSizeFromIconConfig(iconConfig, 3); _setIconStyle( icon: icon, size: size, opacity: opacity, isVisible: isVisible); return icon; @@ -525,7 +520,7 @@ Future _advancedMarkerIconFromBitmapDescriptor( final web.Element icon = document.createElement('img') ..setAttribute('src', URL.createObjectURL(blob as JSObject)); - final Size? size = _sizeFromIconConfig(iconConfig, 2); + final gmaps.Size? size = _gmSizeFromIconConfig(iconConfig, 2); _setIconStyle( size: size, icon: icon, opacity: opacity, isVisible: isVisible); return icon; @@ -558,7 +553,7 @@ Future _gmIconFromBitmapDescriptor( switch (bitmapDescriptor.bitmapScaling) { case MapBitmapScaling.auto: - final Size? size = await _getBitmapSize(bitmapDescriptor, url); + final gmaps.Size? size = await _getBitmapSize(bitmapDescriptor, url); if (size != null) { _setIconSize(size: size, icon: icon); } From b7e4cd165bd80b105a22943e7ccc6a7cfd4c320d Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 20 Jan 2025 09:59:14 +0200 Subject: [PATCH 080/130] Add advanced marker rotation --- .../google_maps_flutter_web/lib/src/convert.dart | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index e66b37bfe2a..5c1691ac5be 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -414,6 +414,7 @@ Future _advancedMarkerIconFromBitmapDescriptor( BitmapDescriptor bitmapDescriptor, { required double? opacity, required bool isVisible, + required double? rotation, }) async { if (bitmapDescriptor is PinConfig) { final gmaps.PinElementOptions options = gmaps.PinElementOptions() @@ -445,6 +446,7 @@ Future _advancedMarkerIconFromBitmapDescriptor( opacity: 1.0, // Always visible, as the visibility is handled by the parent marker. isVisible: true, + rotation: rotation, ); options.glyph = glyphBitmap; case null: @@ -455,7 +457,8 @@ Future _advancedMarkerIconFromBitmapDescriptor( final HTMLElement htmlElement = pinElement.element; htmlElement.style ..visibility = isVisible ? 'visible' : 'hidden' - ..opacity = opacity?.toString() ?? '1.0'; + ..opacity = opacity?.toString() ?? '1.0' + ..transform = rotation != null ? 'rotate(${rotation}deg)' : ''; return htmlElement; } @@ -623,6 +626,7 @@ Future _markerOptionsFromMarker( marker.icon, opacity: marker.alpha, isVisible: marker.visible, + rotation: marker.rotation, ) ..position = gmaps.LatLng( marker.position.latitude, @@ -644,11 +648,12 @@ Future _markerOptionsFromMarker( ..visible = marker.visible ..opacity = marker.alpha ..draggable = marker.draggable; + + // TODO(ditman): Compute anchor properly, otherwise infowindows attach to the wrong spot. + // Flat and Rotation are not supported directly on the web. + return options as O; } - - // TODO(ditman): Compute anchor properly, otherwise infowindows attach to the wrong spot. - // Flat and Rotation are not supported directly on the web. } gmaps.CircleOptions _circleOptionsFromCircle(Circle circle) { From ad5f11e040e9b82e8f5b58028d3917b731bfab23 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 20 Jan 2025 10:09:03 +0200 Subject: [PATCH 081/130] Use Object instead of dynamic --- .../google_maps_controller_test.dart | 2 +- .../google_maps_controller_test.mocks.dart | 602 +++++++----------- .../integration_test/overlays_test.mocks.dart | 58 +- .../lib/src/google_maps_controller.dart | 10 +- 4 files changed, 261 insertions(+), 411 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart index 364d09d0af1..ce80e7cbe81 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart @@ -35,7 +35,7 @@ gmaps.Map mapShim() => throw UnimplementedError(); MockSpec( fallbackGenerators: {#googleMap: mapShim}, ), - MockSpec>( + MockSpec>( fallbackGenerators: {#googleMap: mapShim}, ), MockSpec( diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart index 7904b7352cb..f05233b3bf1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in google_maps_flutter_web_integration_tests/integration_test/google_maps_controller_test.dart. // Do not manually edit this file. @@ -21,6 +21,7 @@ import 'google_maps_controller_test.dart' as _i5; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types @@ -31,87 +32,68 @@ import 'google_maps_controller_test.dart' as _i5; /// See the documentation for Mockito's code generation for more information. class MockCirclesController extends _i1.Mock implements _i2.CirclesController { @override - Map<_i3.CircleId, _i2.CircleController> get circles => (super.noSuchMethod( - Invocation.getter(#circles), - returnValue: <_i3.CircleId, _i2.CircleController>{}, - returnValueForMissingStub: <_i3.CircleId, _i2.CircleController>{}, - ) as Map<_i3.CircleId, _i2.CircleController>); + Map<_i3.CircleId, _i2.CircleController> get circles => + (super.noSuchMethod( + Invocation.getter(#circles), + returnValue: <_i3.CircleId, _i2.CircleController>{}, + returnValueForMissingStub: <_i3.CircleId, _i2.CircleController>{}, + ) + as Map<_i3.CircleId, _i2.CircleController>); @override - _i4.Map get googleMap => (super.noSuchMethod( - Invocation.getter(#googleMap), - returnValue: _i5.mapShim(), - returnValueForMissingStub: _i5.mapShim(), - ) as _i4.Map); + _i4.Map get googleMap => + (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) + as _i4.Map); @override set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( - Invocation.setter( - #googleMap, - _googleMap, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#googleMap, _googleMap), + returnValueForMissingStub: null, + ); @override - int get mapId => (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) as int); + int get mapId => + (super.noSuchMethod( + Invocation.getter(#mapId), + returnValue: 0, + returnValueForMissingStub: 0, + ) + as int); @override set mapId(int? _mapId) => super.noSuchMethod( - Invocation.setter( - #mapId, - _mapId, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#mapId, _mapId), + returnValueForMissingStub: null, + ); @override void addCircles(Set<_i3.Circle>? circlesToAdd) => super.noSuchMethod( - Invocation.method( - #addCircles, - [circlesToAdd], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addCircles, [circlesToAdd]), + returnValueForMissingStub: null, + ); @override void changeCircles(Set<_i3.Circle>? circlesToChange) => super.noSuchMethod( - Invocation.method( - #changeCircles, - [circlesToChange], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#changeCircles, [circlesToChange]), + returnValueForMissingStub: null, + ); @override void removeCircles(Set<_i3.CircleId>? circleIdsToRemove) => super.noSuchMethod( - Invocation.method( - #removeCircles, - [circleIdsToRemove], - ), + Invocation.method(#removeCircles, [circleIdsToRemove]), returnValueForMissingStub: null, ); @override - void bindToMap( - int? mapId, - _i4.Map? googleMap, - ) => - super.noSuchMethod( - Invocation.method( - #bindToMap, - [ - mapId, - googleMap, - ], - ), - returnValueForMissingStub: null, - ); + void bindToMap(int? mapId, _i4.Map? googleMap) => super.noSuchMethod( + Invocation.method(#bindToMap, [mapId, googleMap]), + returnValueForMissingStub: null, + ); } /// A class which mocks [HeatmapsController]. @@ -120,87 +102,68 @@ class MockCirclesController extends _i1.Mock implements _i2.CirclesController { class MockHeatmapsController extends _i1.Mock implements _i2.HeatmapsController { @override - Map<_i3.HeatmapId, _i2.HeatmapController> get heatmaps => (super.noSuchMethod( - Invocation.getter(#heatmaps), - returnValue: <_i3.HeatmapId, _i2.HeatmapController>{}, - returnValueForMissingStub: <_i3.HeatmapId, _i2.HeatmapController>{}, - ) as Map<_i3.HeatmapId, _i2.HeatmapController>); + Map<_i3.HeatmapId, _i2.HeatmapController> get heatmaps => + (super.noSuchMethod( + Invocation.getter(#heatmaps), + returnValue: <_i3.HeatmapId, _i2.HeatmapController>{}, + returnValueForMissingStub: <_i3.HeatmapId, _i2.HeatmapController>{}, + ) + as Map<_i3.HeatmapId, _i2.HeatmapController>); @override - _i4.Map get googleMap => (super.noSuchMethod( - Invocation.getter(#googleMap), - returnValue: _i5.mapShim(), - returnValueForMissingStub: _i5.mapShim(), - ) as _i4.Map); + _i4.Map get googleMap => + (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) + as _i4.Map); @override set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( - Invocation.setter( - #googleMap, - _googleMap, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#googleMap, _googleMap), + returnValueForMissingStub: null, + ); @override - int get mapId => (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) as int); + int get mapId => + (super.noSuchMethod( + Invocation.getter(#mapId), + returnValue: 0, + returnValueForMissingStub: 0, + ) + as int); @override set mapId(int? _mapId) => super.noSuchMethod( - Invocation.setter( - #mapId, - _mapId, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#mapId, _mapId), + returnValueForMissingStub: null, + ); @override void addHeatmaps(Set<_i3.Heatmap>? heatmapsToAdd) => super.noSuchMethod( - Invocation.method( - #addHeatmaps, - [heatmapsToAdd], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addHeatmaps, [heatmapsToAdd]), + returnValueForMissingStub: null, + ); @override void changeHeatmaps(Set<_i3.Heatmap>? heatmapsToChange) => super.noSuchMethod( - Invocation.method( - #changeHeatmaps, - [heatmapsToChange], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#changeHeatmaps, [heatmapsToChange]), + returnValueForMissingStub: null, + ); @override void removeHeatmaps(Set<_i3.HeatmapId>? heatmapIdsToRemove) => super.noSuchMethod( - Invocation.method( - #removeHeatmaps, - [heatmapIdsToRemove], - ), + Invocation.method(#removeHeatmaps, [heatmapIdsToRemove]), returnValueForMissingStub: null, ); @override - void bindToMap( - int? mapId, - _i4.Map? googleMap, - ) => - super.noSuchMethod( - Invocation.method( - #bindToMap, - [ - mapId, - googleMap, - ], - ), - returnValueForMissingStub: null, - ); + void bindToMap(int? mapId, _i4.Map? googleMap) => super.noSuchMethod( + Invocation.method(#bindToMap, [mapId, googleMap]), + returnValueForMissingStub: null, + ); } /// A class which mocks [PolygonsController]. @@ -209,87 +172,68 @@ class MockHeatmapsController extends _i1.Mock class MockPolygonsController extends _i1.Mock implements _i2.PolygonsController { @override - Map<_i3.PolygonId, _i2.PolygonController> get polygons => (super.noSuchMethod( - Invocation.getter(#polygons), - returnValue: <_i3.PolygonId, _i2.PolygonController>{}, - returnValueForMissingStub: <_i3.PolygonId, _i2.PolygonController>{}, - ) as Map<_i3.PolygonId, _i2.PolygonController>); + Map<_i3.PolygonId, _i2.PolygonController> get polygons => + (super.noSuchMethod( + Invocation.getter(#polygons), + returnValue: <_i3.PolygonId, _i2.PolygonController>{}, + returnValueForMissingStub: <_i3.PolygonId, _i2.PolygonController>{}, + ) + as Map<_i3.PolygonId, _i2.PolygonController>); @override - _i4.Map get googleMap => (super.noSuchMethod( - Invocation.getter(#googleMap), - returnValue: _i5.mapShim(), - returnValueForMissingStub: _i5.mapShim(), - ) as _i4.Map); + _i4.Map get googleMap => + (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) + as _i4.Map); @override set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( - Invocation.setter( - #googleMap, - _googleMap, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#googleMap, _googleMap), + returnValueForMissingStub: null, + ); @override - int get mapId => (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) as int); + int get mapId => + (super.noSuchMethod( + Invocation.getter(#mapId), + returnValue: 0, + returnValueForMissingStub: 0, + ) + as int); @override set mapId(int? _mapId) => super.noSuchMethod( - Invocation.setter( - #mapId, - _mapId, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#mapId, _mapId), + returnValueForMissingStub: null, + ); @override void addPolygons(Set<_i3.Polygon>? polygonsToAdd) => super.noSuchMethod( - Invocation.method( - #addPolygons, - [polygonsToAdd], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addPolygons, [polygonsToAdd]), + returnValueForMissingStub: null, + ); @override void changePolygons(Set<_i3.Polygon>? polygonsToChange) => super.noSuchMethod( - Invocation.method( - #changePolygons, - [polygonsToChange], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#changePolygons, [polygonsToChange]), + returnValueForMissingStub: null, + ); @override void removePolygons(Set<_i3.PolygonId>? polygonIdsToRemove) => super.noSuchMethod( - Invocation.method( - #removePolygons, - [polygonIdsToRemove], - ), + Invocation.method(#removePolygons, [polygonIdsToRemove]), returnValueForMissingStub: null, ); @override - void bindToMap( - int? mapId, - _i4.Map? googleMap, - ) => - super.noSuchMethod( - Invocation.method( - #bindToMap, - [ - mapId, - googleMap, - ], - ), - returnValueForMissingStub: null, - ); + void bindToMap(int? mapId, _i4.Map? googleMap) => super.noSuchMethod( + Invocation.method(#bindToMap, [mapId, googleMap]), + returnValueForMissingStub: null, + ); } /// A class which mocks [PolylinesController]. @@ -298,208 +242,168 @@ class MockPolygonsController extends _i1.Mock class MockPolylinesController extends _i1.Mock implements _i2.PolylinesController { @override - Map<_i3.PolylineId, _i2.PolylineController> get lines => (super.noSuchMethod( - Invocation.getter(#lines), - returnValue: <_i3.PolylineId, _i2.PolylineController>{}, - returnValueForMissingStub: <_i3.PolylineId, _i2.PolylineController>{}, - ) as Map<_i3.PolylineId, _i2.PolylineController>); + Map<_i3.PolylineId, _i2.PolylineController> get lines => + (super.noSuchMethod( + Invocation.getter(#lines), + returnValue: <_i3.PolylineId, _i2.PolylineController>{}, + returnValueForMissingStub: + <_i3.PolylineId, _i2.PolylineController>{}, + ) + as Map<_i3.PolylineId, _i2.PolylineController>); @override - _i4.Map get googleMap => (super.noSuchMethod( - Invocation.getter(#googleMap), - returnValue: _i5.mapShim(), - returnValueForMissingStub: _i5.mapShim(), - ) as _i4.Map); + _i4.Map get googleMap => + (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) + as _i4.Map); @override set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( - Invocation.setter( - #googleMap, - _googleMap, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#googleMap, _googleMap), + returnValueForMissingStub: null, + ); @override - int get mapId => (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) as int); + int get mapId => + (super.noSuchMethod( + Invocation.getter(#mapId), + returnValue: 0, + returnValueForMissingStub: 0, + ) + as int); @override set mapId(int? _mapId) => super.noSuchMethod( - Invocation.setter( - #mapId, - _mapId, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#mapId, _mapId), + returnValueForMissingStub: null, + ); @override void addPolylines(Set<_i3.Polyline>? polylinesToAdd) => super.noSuchMethod( - Invocation.method( - #addPolylines, - [polylinesToAdd], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addPolylines, [polylinesToAdd]), + returnValueForMissingStub: null, + ); @override void changePolylines(Set<_i3.Polyline>? polylinesToChange) => super.noSuchMethod( - Invocation.method( - #changePolylines, - [polylinesToChange], - ), + Invocation.method(#changePolylines, [polylinesToChange]), returnValueForMissingStub: null, ); @override void removePolylines(Set<_i3.PolylineId>? polylineIdsToRemove) => super.noSuchMethod( - Invocation.method( - #removePolylines, - [polylineIdsToRemove], - ), + Invocation.method(#removePolylines, [polylineIdsToRemove]), returnValueForMissingStub: null, ); @override - void bindToMap( - int? mapId, - _i4.Map? googleMap, - ) => - super.noSuchMethod( - Invocation.method( - #bindToMap, - [ - mapId, - googleMap, - ], - ), - returnValueForMissingStub: null, - ); + void bindToMap(int? mapId, _i4.Map? googleMap) => super.noSuchMethod( + Invocation.method(#bindToMap, [mapId, googleMap]), + returnValueForMissingStub: null, + ); } /// A class which mocks [MarkersController]. /// /// See the documentation for Mockito's code generation for more information. -class MockMarkersController extends _i1.Mock implements _i2.MarkersController { +class MockMarkersController extends _i1.Mock + implements _i2.MarkersController { @override - Map<_i3.MarkerId, _i2.MarkerController> get markers => (super.noSuchMethod( - Invocation.getter(#markers), - returnValue: <_i3.MarkerId, _i2.MarkerController>{}, - returnValueForMissingStub: <_i3.MarkerId, _i2.MarkerController>{}, - ) as Map<_i3.MarkerId, _i2.MarkerController>); + Map<_i3.MarkerId, _i2.MarkerController> get markers => + (super.noSuchMethod( + Invocation.getter(#markers), + returnValue: <_i3.MarkerId, _i2.MarkerController>{}, + returnValueForMissingStub: + <_i3.MarkerId, _i2.MarkerController>{}, + ) + as Map<_i3.MarkerId, _i2.MarkerController>); @override - _i4.Map get googleMap => (super.noSuchMethod( - Invocation.getter(#googleMap), - returnValue: _i5.mapShim(), - returnValueForMissingStub: _i5.mapShim(), - ) as _i4.Map); + _i4.Map get googleMap => + (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) + as _i4.Map); @override set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( - Invocation.setter( - #googleMap, - _googleMap, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#googleMap, _googleMap), + returnValueForMissingStub: null, + ); @override - int get mapId => (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) as int); + int get mapId => + (super.noSuchMethod( + Invocation.getter(#mapId), + returnValue: 0, + returnValueForMissingStub: 0, + ) + as int); @override set mapId(int? _mapId) => super.noSuchMethod( - Invocation.setter( - #mapId, - _mapId, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#mapId, _mapId), + returnValueForMissingStub: null, + ); @override _i6.Future addMarkers(Set<_i3.Marker>? markersToAdd) => (super.noSuchMethod( - Invocation.method( - #addMarkers, - [markersToAdd], - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + Invocation.method(#addMarkers, [markersToAdd]), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override _i6.Future changeMarkers(Set<_i3.Marker>? markersToChange) => (super.noSuchMethod( - Invocation.method( - #changeMarkers, - [markersToChange], - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + Invocation.method(#changeMarkers, [markersToChange]), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override void removeMarkers(Set<_i3.MarkerId>? markerIdsToRemove) => super.noSuchMethod( - Invocation.method( - #removeMarkers, - [markerIdsToRemove], - ), + Invocation.method(#removeMarkers, [markerIdsToRemove]), returnValueForMissingStub: null, ); @override void showMarkerInfoWindow(_i3.MarkerId? markerId) => super.noSuchMethod( - Invocation.method( - #showMarkerInfoWindow, - [markerId], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#showMarkerInfoWindow, [markerId]), + returnValueForMissingStub: null, + ); @override void hideMarkerInfoWindow(_i3.MarkerId? markerId) => super.noSuchMethod( - Invocation.method( - #hideMarkerInfoWindow, - [markerId], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#hideMarkerInfoWindow, [markerId]), + returnValueForMissingStub: null, + ); @override - bool isInfoWindowShown(_i3.MarkerId? markerId) => (super.noSuchMethod( - Invocation.method( - #isInfoWindowShown, - [markerId], - ), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); + bool isInfoWindowShown(_i3.MarkerId? markerId) => + (super.noSuchMethod( + Invocation.method(#isInfoWindowShown, [markerId]), + returnValue: false, + returnValueForMissingStub: false, + ) + as bool); @override - void bindToMap( - int? mapId, - _i4.Map? googleMap, - ) => - super.noSuchMethod( - Invocation.method( - #bindToMap, - [ - mapId, - googleMap, - ], - ), - returnValueForMissingStub: null, - ); + void bindToMap(int? mapId, _i4.Map? googleMap) => super.noSuchMethod( + Invocation.method(#bindToMap, [mapId, googleMap]), + returnValueForMissingStub: null, + ); } /// A class which mocks [TileOverlaysController]. @@ -508,91 +412,67 @@ class MockMarkersController extends _i1.Mock implements _i2.MarkersController { class MockTileOverlaysController extends _i1.Mock implements _i2.TileOverlaysController { @override - _i4.Map get googleMap => (super.noSuchMethod( - Invocation.getter(#googleMap), - returnValue: _i5.mapShim(), - returnValueForMissingStub: _i5.mapShim(), - ) as _i4.Map); + _i4.Map get googleMap => + (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) + as _i4.Map); @override set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( - Invocation.setter( - #googleMap, - _googleMap, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#googleMap, _googleMap), + returnValueForMissingStub: null, + ); @override - int get mapId => (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) as int); + int get mapId => + (super.noSuchMethod( + Invocation.getter(#mapId), + returnValue: 0, + returnValueForMissingStub: 0, + ) + as int); @override set mapId(int? _mapId) => super.noSuchMethod( - Invocation.setter( - #mapId, - _mapId, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#mapId, _mapId), + returnValueForMissingStub: null, + ); @override void addTileOverlays(Set<_i3.TileOverlay>? tileOverlaysToAdd) => super.noSuchMethod( - Invocation.method( - #addTileOverlays, - [tileOverlaysToAdd], - ), + Invocation.method(#addTileOverlays, [tileOverlaysToAdd]), returnValueForMissingStub: null, ); @override void changeTileOverlays(Set<_i3.TileOverlay>? tileOverlays) => super.noSuchMethod( - Invocation.method( - #changeTileOverlays, - [tileOverlays], - ), + Invocation.method(#changeTileOverlays, [tileOverlays]), returnValueForMissingStub: null, ); @override void removeTileOverlays(Set<_i3.TileOverlayId>? tileOverlayIds) => super.noSuchMethod( - Invocation.method( - #removeTileOverlays, - [tileOverlayIds], - ), + Invocation.method(#removeTileOverlays, [tileOverlayIds]), returnValueForMissingStub: null, ); @override void clearTileCache(_i3.TileOverlayId? tileOverlayId) => super.noSuchMethod( - Invocation.method( - #clearTileCache, - [tileOverlayId], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#clearTileCache, [tileOverlayId]), + returnValueForMissingStub: null, + ); @override - void bindToMap( - int? mapId, - _i4.Map? googleMap, - ) => - super.noSuchMethod( - Invocation.method( - #bindToMap, - [ - mapId, - googleMap, - ], - ), - returnValueForMissingStub: null, - ); + void bindToMap(int? mapId, _i4.Map? googleMap) => super.noSuchMethod( + Invocation.method(#bindToMap, [mapId, googleMap]), + returnValueForMissingStub: null, + ); } /// A class which mocks [GroundOverlaysController]. diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlays_test.mocks.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlays_test.mocks.dart index 0480e644fe1..29d641f123b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlays_test.mocks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlays_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.4 from annotations +// Mocks generated by Mockito 5.4.5 from annotations // in google_maps_flutter_web_integration_tests/integration_test/overlays_test.dart. // Do not manually edit this file. @@ -17,19 +17,15 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class class _FakeTile_0 extends _i1.SmartFake implements _i2.Tile { - _FakeTile_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeTile_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [TileProvider]. @@ -37,41 +33,15 @@ class _FakeTile_0 extends _i1.SmartFake implements _i2.Tile { /// See the documentation for Mockito's code generation for more information. class MockTileProvider extends _i1.Mock implements _i2.TileProvider { @override - _i3.Future<_i2.Tile> getTile( - int? x, - int? y, - int? zoom, - ) => + _i3.Future<_i2.Tile> getTile(int? x, int? y, int? zoom) => (super.noSuchMethod( - Invocation.method( - #getTile, - [ - x, - y, - zoom, - ], - ), - returnValue: _i3.Future<_i2.Tile>.value(_FakeTile_0( - this, - Invocation.method( - #getTile, - [ - x, - y, - zoom, - ], - ), - )), - returnValueForMissingStub: _i3.Future<_i2.Tile>.value(_FakeTile_0( - this, - Invocation.method( - #getTile, - [ - x, - y, - zoom, - ], - ), - )), - ) as _i3.Future<_i2.Tile>); + Invocation.method(#getTile, [x, y, zoom]), + returnValue: _i3.Future<_i2.Tile>.value( + _FakeTile_0(this, Invocation.method(#getTile, [x, y, zoom])), + ), + returnValueForMissingStub: _i3.Future<_i2.Tile>.value( + _FakeTile_0(this, Invocation.method(#getTile, [x, y, zoom])), + ), + ) + as _i3.Future<_i2.Tile>); } diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index 9f90b4d93a7..6516c7d8032 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -178,8 +178,8 @@ class GoogleMapController { HeatmapsController? _heatmapsController; PolygonsController? _polygonsController; PolylinesController? _polylinesController; - MarkersController? _markersController; - ClusterManagersController? _clusterManagersController; + MarkersController? _markersController; + ClusterManagersController? _clusterManagersController; TileOverlaysController? _tileOverlaysController; GroundOverlaysController? _groundOverlaysController; @@ -191,7 +191,7 @@ class GoogleMapController { /// The ClusterManagersController of this Map. Only for integration testing. @visibleForTesting - ClusterManagersController? get clusterManagersController => + ClusterManagersController? get clusterManagersController => _clusterManagersController; /// The GroundOverlaysController of this Map. Only for integration testing. @@ -204,12 +204,12 @@ class GoogleMapController { void debugSetOverrides({ DebugCreateMapFunction? createMap, DebugSetOptionsFunction? setOptions, - MarkersController? markers, + MarkersController? markers, CirclesController? circles, HeatmapsController? heatmaps, PolygonsController? polygons, PolylinesController? polylines, - ClusterManagersController? clusterManagers, + ClusterManagersController? clusterManagers, TileOverlaysController? tileOverlays, GroundOverlaysController? groundOverlays, }) { From 17c7320b9f19e8fa1e2338b42e6d2810ca855662 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:30:39 +0200 Subject: [PATCH 082/130] Split controllers based on marker type --- .../advanced_marker_test.dart | 44 +--- .../advanced_markers_test.dart | 3 +- .../example/integration_test/marker_test.dart | 32 +-- .../integration_test/markers_test.dart | 4 +- .../lib/src/google_maps_controller.dart | 13 +- .../lib/src/marker.dart | 236 ++++++++++-------- .../lib/src/marker_clustering.dart | 20 +- .../lib/src/markers.dart | 185 +++++++++----- 8 files changed, 299 insertions(+), 238 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_marker_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_marker_test.dart index ac62683c35b..95ee0f0deed 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_marker_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_marker_test.dart @@ -53,8 +53,7 @@ void main() { }); testWidgets('onTap gets called', (WidgetTester tester) async { - MarkerController(marker: marker, onTap: onTap); + AdvancedMarkerController(marker: marker, onTap: onTap); // Trigger a click event... gmaps.event.trigger( @@ -68,9 +67,7 @@ void main() { }); testWidgets('onDragStart gets called', (WidgetTester tester) async { - MarkerController( - marker: marker, onDragStart: onDragStart); + AdvancedMarkerController(marker: marker, onDragStart: onDragStart); // Trigger a drag end event... gmaps.event.trigger( @@ -83,8 +80,7 @@ void main() { }); testWidgets('onDrag gets called', (WidgetTester tester) async { - MarkerController(marker: marker, onDrag: onDrag); + AdvancedMarkerController(marker: marker, onDrag: onDrag); // Trigger a drag end event... gmaps.event.trigger( @@ -97,9 +93,7 @@ void main() { }); testWidgets('onDragEnd gets called', (WidgetTester tester) async { - MarkerController( - marker: marker, onDragEnd: onDragEnd); + AdvancedMarkerController(marker: marker, onDragEnd: onDragEnd); // Trigger a drag end event... gmaps.event.trigger( @@ -112,10 +106,8 @@ void main() { }); testWidgets('update', (WidgetTester tester) async { - final MarkerController controller = - MarkerController(marker: marker); + final AdvancedMarkerController controller = + AdvancedMarkerController(marker: marker); final gmaps.AdvancedMarkerElementOptions options = gmaps.AdvancedMarkerElementOptions() ..collisionBehavior = @@ -142,10 +134,8 @@ void main() { testWidgets('infoWindow null, showInfoWindow.', (WidgetTester tester) async { - final MarkerController controller = - MarkerController(marker: marker); + final AdvancedMarkerController controller = + AdvancedMarkerController(marker: marker); controller.showInfoWindow(); @@ -156,10 +146,7 @@ void main() { final gmaps.InfoWindow infoWindow = gmaps.InfoWindow(); final gmaps.Map map = gmaps.Map(createDivElement()); marker.map = map; - final MarkerController controller = - MarkerController( + final AdvancedMarkerController controller = AdvancedMarkerController( marker: marker, infoWindow: infoWindow, ); @@ -174,10 +161,7 @@ void main() { final gmaps.InfoWindow infoWindow = gmaps.InfoWindow(); final gmaps.Map map = gmaps.Map(createDivElement()); marker.map = map; - final MarkerController controller = - MarkerController( + final AdvancedMarkerController controller = AdvancedMarkerController( marker: marker, infoWindow: infoWindow, ); @@ -189,16 +173,14 @@ void main() { }); group('remove', () { - late MarkerController controller; + late AdvancedMarkerController controller; setUp(() { final gmaps.InfoWindow infoWindow = gmaps.InfoWindow(); final gmaps.Map map = gmaps.Map(createDivElement()); marker.map = map; - controller = MarkerController( - marker: marker, infoWindow: infoWindow); + controller = + AdvancedMarkerController(marker: marker, infoWindow: infoWindow); }); testWidgets('drops gmaps instance', (WidgetTester tester) async { diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart index bebb7df08d3..8465c6b3b7c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart @@ -38,8 +38,7 @@ void main() { clusterManagersController = ClusterManagersController( stream: events); - controller = MarkersController( + controller = AdvancedMarkersController( stream: events, clusterManagersController: clusterManagersController, ); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_test.dart index 4764a291a1a..cf54abe7179 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/marker_test.dart @@ -53,8 +53,7 @@ void main() { }); testWidgets('onTap gets called', (WidgetTester tester) async { - MarkerController( - marker: marker, onTap: onTap); + LegacyMarkerController(marker: marker, onTap: onTap); // Trigger a click event... gmaps.event.trigger( @@ -68,8 +67,7 @@ void main() { }); testWidgets('onDragStart gets called', (WidgetTester tester) async { - MarkerController( - marker: marker, onDragStart: onDragStart); + LegacyMarkerController(marker: marker, onDragStart: onDragStart); // Trigger a drag end event... gmaps.event.trigger( @@ -82,8 +80,7 @@ void main() { }); testWidgets('onDrag gets called', (WidgetTester tester) async { - MarkerController( - marker: marker, onDrag: onDrag); + LegacyMarkerController(marker: marker, onDrag: onDrag); // Trigger a drag end event... gmaps.event.trigger( @@ -96,8 +93,7 @@ void main() { }); testWidgets('onDragEnd gets called', (WidgetTester tester) async { - MarkerController( - marker: marker, onDragEnd: onDragEnd); + LegacyMarkerController(marker: marker, onDragEnd: onDragEnd); // Trigger a drag end event... gmaps.event.trigger( @@ -110,8 +106,8 @@ void main() { }); testWidgets('update', (WidgetTester tester) async { - final MarkerController controller = - MarkerController(marker: marker); + final LegacyMarkerController controller = + LegacyMarkerController(marker: marker); final gmaps.MarkerOptions options = gmaps.MarkerOptions() ..draggable = true ..position = gmaps.LatLng(42, 54); @@ -127,8 +123,8 @@ void main() { testWidgets('infoWindow null, showInfoWindow.', (WidgetTester tester) async { - final MarkerController controller = - MarkerController(marker: marker); + final LegacyMarkerController controller = + LegacyMarkerController(marker: marker); controller.showInfoWindow(); @@ -139,8 +135,7 @@ void main() { final gmaps.InfoWindow infoWindow = gmaps.InfoWindow(); final gmaps.Map map = gmaps.Map(createDivElement()); marker.set('map', map); - final MarkerController controller = - MarkerController( + final LegacyMarkerController controller = LegacyMarkerController( marker: marker, infoWindow: infoWindow, ); @@ -155,8 +150,7 @@ void main() { final gmaps.InfoWindow infoWindow = gmaps.InfoWindow(); final gmaps.Map map = gmaps.Map(createDivElement()); marker.set('map', map); - final MarkerController controller = - MarkerController( + final LegacyMarkerController controller = LegacyMarkerController( marker: marker, infoWindow: infoWindow, ); @@ -168,14 +162,14 @@ void main() { }); group('remove', () { - late MarkerController controller; + late LegacyMarkerController controller; setUp(() { final gmaps.InfoWindow infoWindow = gmaps.InfoWindow(); final gmaps.Map map = gmaps.Map(createDivElement()); marker.set('map', map); - controller = MarkerController( - marker: marker, infoWindow: infoWindow); + controller = + LegacyMarkerController(marker: marker, infoWindow: infoWindow); }); testWidgets('drops gmaps instance', (WidgetTester tester) async { diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/markers_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/markers_test.dart index 088d912b66d..dcc10c1702c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/markers_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/markers_test.dart @@ -25,7 +25,7 @@ void main() { group('MarkersController', () { late StreamController> events; - late MarkersController controller; + late LegacyMarkersController controller; late ClusterManagersController clusterManagersController; late gmaps.Map map; @@ -34,7 +34,7 @@ void main() { clusterManagersController = ClusterManagersController(stream: events); - controller = MarkersController( + controller = LegacyMarkersController( stream: events, clusterManagersController: clusterManagersController); map = gmaps.Map(createDivElement()); clusterManagersController.bindToMap(123, map); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index 6516c7d8032..3881736256d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -74,17 +74,14 @@ class GoogleMapController { stream: _streamController), }; _markersController = switch (mapConfiguration.markerType) { - null || - MarkerType.marker => - MarkersController( - stream: _streamController, + null || MarkerType.marker => LegacyMarkersController( + stream: stream, clusterManagersController: _clusterManagersController! as ClusterManagersController, ), - MarkerType.advancedMarker => MarkersController< - gmaps.AdvancedMarkerElement, gmaps.AdvancedMarkerElementOptions>( - stream: _streamController, - clusterManagersController: _clusterManagersController! + MarkerType.advancedMarker => AdvancedMarkersController( + stream: stream, + clusterManagersController: clusterManagersController! as ClusterManagersController, ), }; diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart index 45ad8e212c4..a6a0d275848 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart @@ -7,7 +7,7 @@ part of '../google_maps_flutter_web.dart'; /// The `MarkerController` class wraps a [gmaps.AdvancedMarkerElement] /// or [gmaps.Marker], how it handles events, and its associated (optional) /// [gmaps.InfoWindow] widget. -class MarkerController { +abstract class MarkerController { /// Creates a `MarkerController`, which wraps a [gmaps.AdvancedMarkerElement] /// or [gmaps.Marker] object, its `onTap`/`onDrag` behavior, and its /// associated [gmaps.InfoWindow]. @@ -24,26 +24,12 @@ class MarkerController { _infoWindow = infoWindow, _consumeTapEvents = consumeTapEvents, _clusterManagerId = clusterManagerId { - _doOnMarkerType( + initializeMarkerListener( marker: marker, - legacy: (gmaps.Marker marker) { - _initializeMarkerListener( - marker: marker, - onDragStart: onDragStart, - onDrag: onDrag, - onDragEnd: onDragEnd, - onTap: onTap, - ); - }, - advanced: (gmaps.AdvancedMarkerElement marker) { - _initializeAdvancedMarkerElementListener( - marker: marker, - onDragStart: onDragStart, - onDrag: onDrag, - onDragEnd: onDragEnd, - onTap: onTap, - ); - }, + onDragStart: onDragStart, + onDrag: onDrag, + onDragEnd: onDragEnd, + onTap: onTap, ); } @@ -79,50 +65,19 @@ class MarkerController { void update( O options, { HTMLElement? newInfoWindowContent, - }) { - assert(_marker != null, 'Cannot `update` Marker after calling `remove`.'); + }); - _doOnMarkerType( - marker: _marker, - legacy: (gmaps.Marker marker) { - marker.options = options as gmaps.MarkerOptions; - }, - advanced: (gmaps.AdvancedMarkerElement marker) { - options as gmaps.AdvancedMarkerElementOptions; - final gmaps.AdvancedMarkerElement marker = - _marker! as gmaps.AdvancedMarkerElement; - marker.collisionBehavior = options.collisionBehavior; - marker.content = options.content; - marker.gmpClickable = options.gmpClickable; - marker.gmpDraggable = options.gmpDraggable; - marker.position = options.position; - marker.title = options.title ?? ''; - marker.zIndex = options.zIndex; - }, - ); - - if (_infoWindow != null && newInfoWindowContent != null) { - _infoWindow.content = newInfoWindowContent; - } - } + /// Initializes the listener for the wrapped marker object. + void initializeMarkerListener({ + required T marker, + required LatLngCallback? onDragStart, + required LatLngCallback? onDrag, + required LatLngCallback? onDragEnd, + required VoidCallback? onTap, + }); /// Disposes of the currently wrapped marker object. - void remove() { - if (_marker != null) { - _infoWindowShown = false; - - _doOnMarkerType( - marker: marker, - legacy: (gmaps.Marker marker) => marker.map = null, - advanced: (gmaps.AdvancedMarkerElement marker) { - marker.remove(); - marker.map = null; - }, - ); - - _marker = null; - } - } + void remove(); /// Hide the associated [gmaps.InfoWindow]. /// @@ -138,24 +93,29 @@ class MarkerController { /// Show the associated [gmaps.InfoWindow]. /// /// This cannot be called after [remove]. - void showInfoWindow() { - assert(_marker != null, 'Cannot `showInfoWindow` on a `remove`d Marker.'); - if (_infoWindow != null) { - _doOnMarkerType( - marker: _marker, - legacy: (gmaps.Marker marker) { - _infoWindow.open(marker.map, marker); - }, - advanced: (gmaps.AdvancedMarkerElement marker) { - _infoWindow.open(marker.map, marker); - }, - ); + void showInfoWindow(); +} - _infoWindowShown = true; - } - } +/// A `MarkerController` that wraps a [gmaps.Marker] object. +/// +/// [gmaps.Marker] is a legacy class that is being replaced +/// by [gmaps.AdvancedMarkerElement]. +class LegacyMarkerController + extends MarkerController { + /// Creates a `LegacyMarkerController`, which wraps a [gmaps.Marker] object. + LegacyMarkerController({ + required super.marker, + super.infoWindow, + super.consumeTapEvents, + super.onDragStart, + super.onDrag, + super.onDragEnd, + super.onTap, + super.clusterManagerId, + }); - void _initializeMarkerListener({ + @override + void initializeMarkerListener({ required gmaps.Marker marker, required LatLngCallback? onDragStart, required LatLngCallback? onDrag, @@ -187,7 +147,57 @@ class MarkerController { } } - void _initializeAdvancedMarkerElementListener({ + @override + void remove() { + if (_marker != null) { + _infoWindowShown = false; + marker!.map = null; + _marker = null; + } + } + + @override + void showInfoWindow() { + assert(_marker != null, 'Cannot `showInfoWindow` on a `remove`d Marker.'); + if (_infoWindow != null) { + _infoWindow.open(marker!.map, marker); + _infoWindowShown = true; + } + } + + @override + void update(gmaps.MarkerOptions options, + {web.HTMLElement? newInfoWindowContent}) { + assert(_marker != null, 'Cannot `update` Marker after calling `remove`.'); + marker!.options = options; + + if (_infoWindow != null && newInfoWindowContent != null) { + _infoWindow.content = newInfoWindowContent; + } + } +} + +/// A `MarkerController` that wraps a [gmaps.AdvancedMarkerElement] object. +/// +/// [gmaps.AdvancedMarkerElement] is a new class that is +/// replacing [gmaps.Marker]. +class AdvancedMarkerController extends MarkerController< + gmaps.AdvancedMarkerElement, gmaps.AdvancedMarkerElementOptions> { + /// Creates a `AdvancedMarkerController`, which wraps + /// a [gmaps.AdvancedMarkerElement] object. + AdvancedMarkerController({ + required super.marker, + super.infoWindow, + super.consumeTapEvents, + super.onDragStart, + super.onDrag, + super.onDragEnd, + super.onTap, + super.clusterManagerId, + }); + + @override + void initializeMarkerListener({ required gmaps.AdvancedMarkerElement marker, required LatLngCallback? onDragStart, required LatLngCallback? onDrag, @@ -218,40 +228,46 @@ class MarkerController { }); } } -} -/// Check marker type and call [legacy] or [advanced]. -void _doOnMarkerType({ - required dynamic marker, - required void Function(gmaps.Marker marker) legacy, - required void Function(gmaps.AdvancedMarkerElement marker) advanced, -}) { - final JSObject object = marker as JSObject; - if (object.isA()) { - legacy(marker as gmaps.Marker); - } else if (object.isA()) { - advanced(marker as gmaps.AdvancedMarkerElement); - } else { - throw ArgumentError( - 'Must be either a gmaps.Marker or a gmaps.AdvancedMarkerElement', - ); + @override + void remove() { + if (_marker != null) { + _infoWindowShown = false; + + marker!.remove(); + marker!.map = null; + _marker = null; + } } -} -/// Check [marker] type and return result of [legacy] or [advanced]. -R getOnMarkerType({ - required dynamic marker, - required R Function(gmaps.Marker marker) legacy, - required R Function(gmaps.AdvancedMarkerElement marker) advanced, -}) { - final JSObject object = marker as JSObject; - if (object.isA()) { - return legacy(marker as gmaps.Marker); - } else if (object.isA()) { - return advanced(marker as gmaps.AdvancedMarkerElement); - } else { - throw ArgumentError( - 'Must be either a gmaps.Marker or a gmaps.AdvancedMarkerElement', - ); + @override + void showInfoWindow() { + assert(_marker != null, 'Cannot `showInfoWindow` on a `remove`d Marker.'); + + if (_infoWindow != null) { + _infoWindow.open(marker!.map, marker); + _infoWindowShown = true; + } + } + + @override + void update( + gmaps.AdvancedMarkerElementOptions options, { + web.HTMLElement? newInfoWindowContent, + }) { + assert(_marker != null, 'Cannot `update` Marker after calling `remove`.'); + + final gmaps.AdvancedMarkerElement marker = _marker!; + marker.collisionBehavior = options.collisionBehavior; + marker.content = options.content; + marker.gmpClickable = options.gmpClickable; + marker.gmpDraggable = options.gmpDraggable; + marker.position = options.position; + marker.title = options.title ?? ''; + marker.zIndex = options.zIndex; + + if (_infoWindow != null && newInfoWindowContent != null) { + _infoWindow.content = newInfoWindowContent; + } } } diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart index 778466565e1..98691957e0f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart @@ -133,7 +133,7 @@ class ClusterManagersController extends GeometryController { final List markerIds = markerClustererCluster.markers.map((T marker) { - return getOnMarkerType( + return _getOnMarkerType( marker: marker, legacy: (gmaps.Marker marker) { return MarkerId((marker.get('markerId')! as JSString).toDart); @@ -152,3 +152,21 @@ class ClusterManagersController extends GeometryController { ); } } + +/// Check [marker] type and return result of [legacy] or [advanced]. +R _getOnMarkerType({ + required dynamic marker, + required R Function(gmaps.Marker marker) legacy, + required R Function(gmaps.AdvancedMarkerElement marker) advanced, +}) { + final JSObject object = marker as JSObject; + if (object.isA()) { + return legacy(marker as gmaps.Marker); + } else if (object.isA()) { + return advanced(marker as gmaps.AdvancedMarkerElement); + } else { + throw ArgumentError( + 'Must be either a gmaps.Marker or a gmaps.AdvancedMarkerElement', + ); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart index eaac1ffdbe5..7c2ca8e8f1b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart @@ -5,7 +5,12 @@ part of '../google_maps_flutter_web.dart'; /// This class manages a set of [MarkerController]s associated to a [GoogleMapController]. -class MarkersController extends GeometryController { +/// +/// * [LegacyMarkersController] implements the [MarkersController] for the +/// legacy [gmaps.Marker] class. +/// * [AdvancedMarkersController] implements the [MarkersController] for the +/// advanced [gmaps.AdvancedMarkerElement] class. +abstract class MarkersController extends GeometryController { /// Initialize the cache. The [StreamController] comes from the [GoogleMapController], and is shared with other controllers. MarkersController({ required StreamController> stream, @@ -52,73 +57,21 @@ class MarkersController extends GeometryController { } } - final T gmMarker; - if (marker is AdvancedMarker) { - final MarkerController? markerController = - _markerIdToController[marker.markerId] as MarkerController< - gmaps.AdvancedMarkerElement, gmaps.AdvancedMarkerElementOptions>?; - final gmaps.AdvancedMarkerElement? currentMarker = - markerController?.marker; - final gmaps.AdvancedMarkerElementOptions markerOptions = - await _markerOptionsFromMarker(marker, currentMarker); - final gmaps.AdvancedMarkerElement newGmMarker = - gmaps.AdvancedMarkerElement(markerOptions); - newGmMarker.setAttribute('id', marker.markerId.value); - - if (marker.clusterManagerId != null) { - _clusterManagersController.addItem( - marker.clusterManagerId!, newGmMarker as T); - } else { - newGmMarker.map = googleMap; - } - - gmMarker = newGmMarker as T; - } else { - final MarkerController? - markerController = _markerIdToController[marker.markerId] - as MarkerController?; - final gmaps.Marker? currentMarker = markerController?.marker; - - final gmaps.MarkerOptions markerOptions = - await _markerOptionsFromMarker( - marker, currentMarker); - - final gmaps.Marker newGmMarker = gmaps.Marker(markerOptions); - newGmMarker.set('markerId', marker.markerId.value.toJS); - - if (marker.clusterManagerId != null) { - _clusterManagersController.addItem( - marker.clusterManagerId!, newGmMarker as T); - } else { - newGmMarker.map = googleMap; - } - - gmMarker = newGmMarker as T; - } - - final MarkerController controller = MarkerController( - marker: gmMarker, - clusterManagerId: marker.clusterManagerId, - infoWindow: gmInfoWindow, - consumeTapEvents: marker.consumeTapEvents, - onTap: () { - showMarkerInfoWindow(marker.markerId); - _onMarkerTap(marker.markerId); - }, - onDragStart: (gmaps.LatLng latLng) { - _onMarkerDragStart(marker.markerId, latLng); - }, - onDrag: (gmaps.LatLng latLng) { - _onMarkerDrag(marker.markerId, latLng); - }, - onDragEnd: (gmaps.LatLng latLng) { - _onMarkerDragEnd(marker.markerId, latLng); - }, - ); + final MarkerController? markerController = + _markerIdToController[marker.markerId]; + final T? currentMarker = markerController?.marker; + final MarkerController controller = + await createMarkerController(marker, currentMarker, gmInfoWindow); _markerIdToController[marker.markerId] = controller; } + /// Creates a [MarkerController] for a [Marker] object. + Future> createMarkerController( + Marker marker, + T? currentMarker, + gmaps.InfoWindow? gmInfoWindow, + ); + /// Updates a set of [Marker] objects with new options. Future changeMarkers(Set markersToChange) async { await Future.wait(markersToChange.map(_changeMarker)); @@ -243,3 +196,105 @@ class MarkersController extends GeometryController { }); } } + +/// A [MarkersController] for the legacy [gmaps.Marker] class. +class LegacyMarkersController + extends MarkersController { + /// Initialize the markers controller for the legacy [gmaps.Marker] class. + LegacyMarkersController({ + required super.stream, + required super.clusterManagersController, + }); + + @override + Future createMarkerController( + Marker marker, + gmaps.Marker? currentMarker, + gmaps.InfoWindow? gmInfoWindow, + ) async { + final gmaps.MarkerOptions markerOptions = + await _markerOptionsFromMarker( + marker, currentMarker); + + final gmaps.Marker gmMarker = gmaps.Marker(markerOptions); + gmMarker.set('markerId', marker.markerId.value.toJS); + + if (marker.clusterManagerId != null) { + _clusterManagersController.addItem(marker.clusterManagerId!, gmMarker); + } else { + gmMarker.map = googleMap; + } + + return LegacyMarkerController( + marker: gmMarker, + clusterManagerId: marker.clusterManagerId, + infoWindow: gmInfoWindow, + consumeTapEvents: marker.consumeTapEvents, + onTap: () { + showMarkerInfoWindow(marker.markerId); + _onMarkerTap(marker.markerId); + }, + onDragStart: (gmaps.LatLng latLng) { + _onMarkerDragStart(marker.markerId, latLng); + }, + onDrag: (gmaps.LatLng latLng) { + _onMarkerDrag(marker.markerId, latLng); + }, + onDragEnd: (gmaps.LatLng latLng) { + _onMarkerDragEnd(marker.markerId, latLng); + }, + ); + } +} + +/// A [MarkersController] for the advanced [gmaps.AdvancedMarkerElement] class. +class AdvancedMarkersController extends MarkersController< + gmaps.AdvancedMarkerElement, gmaps.AdvancedMarkerElementOptions> { + /// Initialize the markers controller for advanced markers + /// ([gmaps.AdvancedMarkerElement]). + AdvancedMarkersController({ + required super.stream, + required super.clusterManagersController, + }); + + @override + Future createMarkerController( + Marker marker, + gmaps.AdvancedMarkerElement? currentMarker, + gmaps.InfoWindow? gmInfoWindow, + ) async { + assert(marker is AdvancedMarker, 'Marker must be an AdvancedMarker.'); + + final gmaps.AdvancedMarkerElementOptions markerOptions = + await _markerOptionsFromMarker(marker, currentMarker); + final gmaps.AdvancedMarkerElement gmMarker = + gmaps.AdvancedMarkerElement(markerOptions); + gmMarker.setAttribute('id', marker.markerId.value); + + if (marker.clusterManagerId != null) { + _clusterManagersController.addItem(marker.clusterManagerId!, gmMarker); + } else { + gmMarker.map = googleMap; + } + + return AdvancedMarkerController( + marker: gmMarker, + clusterManagerId: marker.clusterManagerId, + infoWindow: gmInfoWindow, + consumeTapEvents: marker.consumeTapEvents, + onTap: () { + showMarkerInfoWindow(marker.markerId); + _onMarkerTap(marker.markerId); + }, + onDragStart: (gmaps.LatLng latLng) { + _onMarkerDragStart(marker.markerId, latLng); + }, + onDrag: (gmaps.LatLng latLng) { + _onMarkerDrag(marker.markerId, latLng); + }, + onDragEnd: (gmaps.LatLng latLng) { + _onMarkerDragEnd(marker.markerId, latLng); + }, + ); + } +} From 3d41dbe2bc8a52f18eab5b565acd26897b5bbb1f Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:35:19 +0200 Subject: [PATCH 083/130] Use Object? instead of dynamic --- .../google_maps_flutter_web/lib/src/marker_clustering.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart index 98691957e0f..7b1583c9829 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart @@ -155,11 +155,11 @@ class ClusterManagersController extends GeometryController { /// Check [marker] type and return result of [legacy] or [advanced]. R _getOnMarkerType({ - required dynamic marker, + required Object? marker, required R Function(gmaps.Marker marker) legacy, required R Function(gmaps.AdvancedMarkerElement marker) advanced, }) { - final JSObject object = marker as JSObject; + final JSObject object = marker! as JSObject; if (object.isA()) { return legacy(marker as gmaps.Marker); } else if (object.isA()) { From 529b44a71a36e690d76d4ea3946444e6fd34dc8b Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:38:15 +0200 Subject: [PATCH 084/130] Use _marker everywhere in MarkerController --- .../google_maps_flutter_web/lib/src/marker.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart index a6a0d275848..8f0fb5f429a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker.dart @@ -151,7 +151,7 @@ class LegacyMarkerController void remove() { if (_marker != null) { _infoWindowShown = false; - marker!.map = null; + _marker!.map = null; _marker = null; } } @@ -160,7 +160,7 @@ class LegacyMarkerController void showInfoWindow() { assert(_marker != null, 'Cannot `showInfoWindow` on a `remove`d Marker.'); if (_infoWindow != null) { - _infoWindow.open(marker!.map, marker); + _infoWindow.open(_marker!.map, _marker); _infoWindowShown = true; } } @@ -169,7 +169,7 @@ class LegacyMarkerController void update(gmaps.MarkerOptions options, {web.HTMLElement? newInfoWindowContent}) { assert(_marker != null, 'Cannot `update` Marker after calling `remove`.'); - marker!.options = options; + _marker!.options = options; if (_infoWindow != null && newInfoWindowContent != null) { _infoWindow.content = newInfoWindowContent; @@ -234,8 +234,8 @@ class AdvancedMarkerController extends MarkerController< if (_marker != null) { _infoWindowShown = false; - marker!.remove(); - marker!.map = null; + _marker!.remove(); + _marker!.map = null; _marker = null; } } @@ -245,7 +245,7 @@ class AdvancedMarkerController extends MarkerController< assert(_marker != null, 'Cannot `showInfoWindow` on a `remove`d Marker.'); if (_infoWindow != null) { - _infoWindow.open(marker!.map, marker); + _infoWindow.open(_marker!.map, _marker); _infoWindowShown = true; } } From c2166328f8138d1cfca0ddbca0d4eb48e43f5edd Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 20 Jan 2025 13:56:37 +0200 Subject: [PATCH 085/130] Get rid of _getOnMarkerType --- .../lib/src/convert.dart | 15 +++++++++ .../lib/src/marker_clustering.dart | 32 +------------------ 2 files changed, 16 insertions(+), 31 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index 5c1691ac5be..dc3706163bf 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -656,6 +656,21 @@ Future _markerOptionsFromMarker( } } +/// Gets marker Id from a [marker] object. +MarkerId getMarkerId(Object? marker) { + final JSObject object = marker! as JSObject; + final gmaps.MVCObject mapObject = marker as gmaps.MVCObject; + if (object.isA()) { + return MarkerId((mapObject.get('markerId')! as JSString).toDart); + } else if (object.isA()) { + return MarkerId((mapObject.get('id')! as JSString).toDart); + } else { + throw ArgumentError( + 'Must be either a gmaps.Marker or a gmaps.AdvancedMarkerElement', + ); + } +} + gmaps.CircleOptions _circleOptionsFromCircle(Circle circle) { final gmaps.CircleOptions circleOptions = gmaps.CircleOptions() ..strokeColor = _getCssColor(circle.strokeColor) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart index 7b1583c9829..8263493c472 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart @@ -3,7 +3,6 @@ // found in the LICENSE file. import 'dart:async'; -import 'dart:js_interop'; import 'package:google_maps/google_maps.dart' as gmaps; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; @@ -130,19 +129,8 @@ class ClusterManagersController extends GeometryController { final LatLng position = gmLatLngToLatLng(markerClustererCluster.position); final LatLngBounds bounds = gmLatLngBoundsToLatLngBounds(markerClustererCluster.bounds!); - final List markerIds = - markerClustererCluster.markers.map((T marker) { - return _getOnMarkerType( - marker: marker, - legacy: (gmaps.Marker marker) { - return MarkerId((marker.get('markerId')! as JSString).toDart); - }, - advanced: (gmaps.AdvancedMarkerElement marker) { - return MarkerId((marker.getAttribute('id')! as JSString).toDart); - }, - ); - }).toList(); + markerClustererCluster.markers.map(getMarkerId).toList(); return Cluster( clusterManagerId, @@ -152,21 +140,3 @@ class ClusterManagersController extends GeometryController { ); } } - -/// Check [marker] type and return result of [legacy] or [advanced]. -R _getOnMarkerType({ - required Object? marker, - required R Function(gmaps.Marker marker) legacy, - required R Function(gmaps.AdvancedMarkerElement marker) advanced, -}) { - final JSObject object = marker! as JSObject; - if (object.isA()) { - return legacy(marker as gmaps.Marker); - } else if (object.isA()) { - return advanced(marker as gmaps.AdvancedMarkerElement); - } else { - throw ArgumentError( - 'Must be either a gmaps.Marker or a gmaps.AdvancedMarkerElement', - ); - } -} From c12484d826f776da9e4cc9173308fd341ab347a4 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 20 Jan 2025 14:14:34 +0200 Subject: [PATCH 086/130] Make T extend JSObject --- .../google_maps_controller_test.dart | 2 +- .../google_maps_controller_test.mocks.dart | 153 ++++++++---------- .../lib/src/google_maps_controller.dart | 10 +- .../lib/src/marker_clustering.dart | 3 +- .../lib/src/marker_clustering_js_interop.dart | 13 +- .../lib/src/markers.dart | 3 +- 6 files changed, 88 insertions(+), 96 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart index ce80e7cbe81..303eb13ab6f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart @@ -35,7 +35,7 @@ gmaps.Map mapShim() => throw UnimplementedError(); MockSpec( fallbackGenerators: {#googleMap: mapShim}, ), - MockSpec>( + MockSpec>( fallbackGenerators: {#googleMap: mapShim}, ), MockSpec( diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart index f05233b3bf1..0543a4ccd35 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart @@ -3,16 +3,13 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i6; +import 'dart:async' as _i4; -import 'package:google_maps/google_maps.dart' as _i4; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart' as _i3; import 'package:google_maps_flutter_web/google_maps_flutter_web.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; -import 'google_maps_controller_test.dart' as _i5; - // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters @@ -27,6 +24,12 @@ import 'google_maps_controller_test.dart' as _i5; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +class _FakeMarkerController_0 extends _i1.SmartFake + implements _i2.MarkerController { + _FakeMarkerController_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + /// A class which mocks [CirclesController]. /// /// See the documentation for Mockito's code generation for more information. @@ -41,16 +44,7 @@ class MockCirclesController extends _i1.Mock implements _i2.CirclesController { as Map<_i3.CircleId, _i2.CircleController>); @override - _i4.Map get googleMap => - (super.noSuchMethod( - Invocation.getter(#googleMap), - returnValue: _i5.mapShim(), - returnValueForMissingStub: _i5.mapShim(), - ) - as _i4.Map); - - @override - set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( + set googleMap(dynamic _googleMap) => super.noSuchMethod( Invocation.setter(#googleMap, _googleMap), returnValueForMissingStub: null, ); @@ -90,7 +84,7 @@ class MockCirclesController extends _i1.Mock implements _i2.CirclesController { ); @override - void bindToMap(int? mapId, _i4.Map? googleMap) => super.noSuchMethod( + void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( Invocation.method(#bindToMap, [mapId, googleMap]), returnValueForMissingStub: null, ); @@ -111,16 +105,7 @@ class MockHeatmapsController extends _i1.Mock as Map<_i3.HeatmapId, _i2.HeatmapController>); @override - _i4.Map get googleMap => - (super.noSuchMethod( - Invocation.getter(#googleMap), - returnValue: _i5.mapShim(), - returnValueForMissingStub: _i5.mapShim(), - ) - as _i4.Map); - - @override - set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( + set googleMap(dynamic _googleMap) => super.noSuchMethod( Invocation.setter(#googleMap, _googleMap), returnValueForMissingStub: null, ); @@ -160,7 +145,7 @@ class MockHeatmapsController extends _i1.Mock ); @override - void bindToMap(int? mapId, _i4.Map? googleMap) => super.noSuchMethod( + void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( Invocation.method(#bindToMap, [mapId, googleMap]), returnValueForMissingStub: null, ); @@ -181,16 +166,7 @@ class MockPolygonsController extends _i1.Mock as Map<_i3.PolygonId, _i2.PolygonController>); @override - _i4.Map get googleMap => - (super.noSuchMethod( - Invocation.getter(#googleMap), - returnValue: _i5.mapShim(), - returnValueForMissingStub: _i5.mapShim(), - ) - as _i4.Map); - - @override - set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( + set googleMap(dynamic _googleMap) => super.noSuchMethod( Invocation.setter(#googleMap, _googleMap), returnValueForMissingStub: null, ); @@ -230,7 +206,7 @@ class MockPolygonsController extends _i1.Mock ); @override - void bindToMap(int? mapId, _i4.Map? googleMap) => super.noSuchMethod( + void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( Invocation.method(#bindToMap, [mapId, googleMap]), returnValueForMissingStub: null, ); @@ -252,16 +228,7 @@ class MockPolylinesController extends _i1.Mock as Map<_i3.PolylineId, _i2.PolylineController>); @override - _i4.Map get googleMap => - (super.noSuchMethod( - Invocation.getter(#googleMap), - returnValue: _i5.mapShim(), - returnValueForMissingStub: _i5.mapShim(), - ) - as _i4.Map); - - @override - set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( + set googleMap(dynamic _googleMap) => super.noSuchMethod( Invocation.setter(#googleMap, _googleMap), returnValueForMissingStub: null, ); @@ -302,7 +269,7 @@ class MockPolylinesController extends _i1.Mock ); @override - void bindToMap(int? mapId, _i4.Map? googleMap) => super.noSuchMethod( + void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( Invocation.method(#bindToMap, [mapId, googleMap]), returnValueForMissingStub: null, ); @@ -312,28 +279,20 @@ class MockPolylinesController extends _i1.Mock /// /// See the documentation for Mockito's code generation for more information. class MockMarkersController extends _i1.Mock - implements _i2.MarkersController { + implements _i2.MarkersController { @override - Map<_i3.MarkerId, _i2.MarkerController> get markers => + Map<_i3.MarkerId, _i2.MarkerController> get markers => (super.noSuchMethod( Invocation.getter(#markers), - returnValue: <_i3.MarkerId, _i2.MarkerController>{}, + returnValue: + <_i3.MarkerId, _i2.MarkerController>{}, returnValueForMissingStub: - <_i3.MarkerId, _i2.MarkerController>{}, - ) - as Map<_i3.MarkerId, _i2.MarkerController>); - - @override - _i4.Map get googleMap => - (super.noSuchMethod( - Invocation.getter(#googleMap), - returnValue: _i5.mapShim(), - returnValueForMissingStub: _i5.mapShim(), + <_i3.MarkerId, _i2.MarkerController>{}, ) - as _i4.Map); + as Map<_i3.MarkerId, _i2.MarkerController>); @override - set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( + set googleMap(dynamic _googleMap) => super.noSuchMethod( Invocation.setter(#googleMap, _googleMap), returnValueForMissingStub: null, ); @@ -354,22 +313,59 @@ class MockMarkersController extends _i1.Mock ); @override - _i6.Future addMarkers(Set<_i3.Marker>? markersToAdd) => + _i4.Future addMarkers(Set<_i3.Marker>? markersToAdd) => (super.noSuchMethod( Invocation.method(#addMarkers, [markersToAdd]), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), ) - as _i6.Future); + as _i4.Future); @override - _i6.Future changeMarkers(Set<_i3.Marker>? markersToChange) => + _i4.Future<_i2.MarkerController> createMarkerController( + _i3.Marker? marker, + Object? currentMarker, + dynamic gmInfoWindow, + ) => + (super.noSuchMethod( + Invocation.method(#createMarkerController, [ + marker, + currentMarker, + gmInfoWindow, + ]), + returnValue: + _i4.Future<_i2.MarkerController>.value( + _FakeMarkerController_0( + this, + Invocation.method(#createMarkerController, [ + marker, + currentMarker, + gmInfoWindow, + ]), + ), + ), + returnValueForMissingStub: + _i4.Future<_i2.MarkerController>.value( + _FakeMarkerController_0( + this, + Invocation.method(#createMarkerController, [ + marker, + currentMarker, + gmInfoWindow, + ]), + ), + ), + ) + as _i4.Future<_i2.MarkerController>); + + @override + _i4.Future changeMarkers(Set<_i3.Marker>? markersToChange) => (super.noSuchMethod( Invocation.method(#changeMarkers, [markersToChange]), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), ) - as _i6.Future); + as _i4.Future); @override void removeMarkers(Set<_i3.MarkerId>? markerIdsToRemove) => @@ -400,7 +396,7 @@ class MockMarkersController extends _i1.Mock as bool); @override - void bindToMap(int? mapId, _i4.Map? googleMap) => super.noSuchMethod( + void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( Invocation.method(#bindToMap, [mapId, googleMap]), returnValueForMissingStub: null, ); @@ -412,16 +408,7 @@ class MockMarkersController extends _i1.Mock class MockTileOverlaysController extends _i1.Mock implements _i2.TileOverlaysController { @override - _i4.Map get googleMap => - (super.noSuchMethod( - Invocation.getter(#googleMap), - returnValue: _i5.mapShim(), - returnValueForMissingStub: _i5.mapShim(), - ) - as _i4.Map); - - @override - set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( + set googleMap(dynamic _googleMap) => super.noSuchMethod( Invocation.setter(#googleMap, _googleMap), returnValueForMissingStub: null, ); @@ -469,7 +456,7 @@ class MockTileOverlaysController extends _i1.Mock ); @override - void bindToMap(int? mapId, _i4.Map? googleMap) => super.noSuchMethod( + void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( Invocation.method(#bindToMap, [mapId, googleMap]), returnValueForMissingStub: null, ); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index 3881736256d..f83c424e874 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -175,8 +175,8 @@ class GoogleMapController { HeatmapsController? _heatmapsController; PolygonsController? _polygonsController; PolylinesController? _polylinesController; - MarkersController? _markersController; - ClusterManagersController? _clusterManagersController; + MarkersController? _markersController; + ClusterManagersController? _clusterManagersController; TileOverlaysController? _tileOverlaysController; GroundOverlaysController? _groundOverlaysController; @@ -188,7 +188,7 @@ class GoogleMapController { /// The ClusterManagersController of this Map. Only for integration testing. @visibleForTesting - ClusterManagersController? get clusterManagersController => + ClusterManagersController? get clusterManagersController => _clusterManagersController; /// The GroundOverlaysController of this Map. Only for integration testing. @@ -201,12 +201,12 @@ class GoogleMapController { void debugSetOverrides({ DebugCreateMapFunction? createMap, DebugSetOptionsFunction? setOptions, - MarkersController? markers, + MarkersController? markers, CirclesController? circles, HeatmapsController? heatmaps, PolygonsController? polygons, PolylinesController? polylines, - ClusterManagersController? clusterManagers, + ClusterManagersController? clusterManagers, TileOverlaysController? tileOverlays, GroundOverlaysController? groundOverlays, }) { diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart index 8263493c472..606403b7d76 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart @@ -3,6 +3,7 @@ // found in the LICENSE file. import 'dart:async'; +import 'dart:js_interop'; import 'package:google_maps/google_maps.dart' as gmaps; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; @@ -16,7 +17,7 @@ import 'types.dart'; /// This class maps [ClusterManager] objects to javascript [MarkerClusterer] /// objects and provides an interface for adding and removing markers from /// clusters. -class ClusterManagersController extends GeometryController { +class ClusterManagersController extends GeometryController { /// Creates a new [ClusterManagersController] instance. /// /// The [stream] parameter is a required [StreamController] used for diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart index 130c0774abd..797eaf6f2f3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart @@ -13,7 +13,7 @@ import 'dart:js_interop'; import 'package:google_maps/google_maps.dart' as gmaps; /// A typedef representing a callback function for handling cluster tap events. -typedef ClusterClickHandler = void Function( +typedef ClusterClickHandler = void Function( gmaps.MapMouseEvent, MarkerClustererCluster, gmaps.Map, @@ -24,7 +24,8 @@ typedef ClusterClickHandler = void Function( /// See: https://googlemaps.github.io/js-markerclusterer/interfaces/MarkerClustererOptions.html @JS() @anonymous -extension type MarkerClustererOptions._(JSObject _) implements JSObject { +extension type MarkerClustererOptions._(JSObject _) + implements JSObject { /// Constructs a new [MarkerClustererOptions] object. factory MarkerClustererOptions({ gmaps.Map? map, @@ -68,7 +69,8 @@ extension type MarkerClustererOptions._(JSObject _) implements JSObject { /// /// https://googlemaps.github.io/js-markerclusterer/classes/Cluster.html @JS('markerClusterer.Cluster') -extension type MarkerClustererCluster._(JSObject _) implements JSObject { +extension type MarkerClustererCluster._(JSObject _) + implements JSObject { /// Getter for the cluster marker. T get marker => _marker as T; @JS('marker') @@ -105,7 +107,8 @@ extension type MarkerClustererCluster._(JSObject _) implements JSObject { /// /// https://googlemaps.github.io/js-markerclusterer/classes/MarkerClusterer.html @JS('markerClusterer.MarkerClusterer') -extension type MarkerClusterer._(JSObject _) implements JSObject { +extension type MarkerClusterer._(JSObject _) + implements JSObject { /// Constructs a new [MarkerClusterer] object. external MarkerClusterer(MarkerClustererOptions options); @@ -153,7 +156,7 @@ extension type MarkerClusterer._(JSObject _) implements JSObject { /// Creates [MarkerClusterer] object with given [gmaps.Map] and /// [ClusterClickHandler]. -MarkerClusterer createMarkerClusterer( +MarkerClusterer createMarkerClusterer( gmaps.Map map, ClusterClickHandler onClusterClickHandler) { final MarkerClustererOptions options = MarkerClustererOptions( map: map, diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart index 7c2ca8e8f1b..2f414333dc8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart @@ -10,7 +10,8 @@ part of '../google_maps_flutter_web.dart'; /// legacy [gmaps.Marker] class. /// * [AdvancedMarkersController] implements the [MarkersController] for the /// advanced [gmaps.AdvancedMarkerElement] class. -abstract class MarkersController extends GeometryController { +abstract class MarkersController + extends GeometryController { /// Initialize the cache. The [StreamController] comes from the [GoogleMapController], and is shared with other controllers. MarkersController({ required StreamController> stream, From 5046e62411a63a36cea37fb8fe863b3dcd044cd6 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 21 Jan 2025 12:35:50 +0200 Subject: [PATCH 087/130] Update advanced marker examples --- .../example/lib/advanced_marker_icons.dart | 140 +++++- .../lib/advanced_markers_clustering.dart | 288 +++++++++-- .../example/lib/clustering.dart | 61 +-- .../example/lib/marker_icons.dart | 44 +- .../example/lib/place_advanced_marker.dart | 453 +++++++++++++++-- .../example/lib/place_marker.dart | 54 +- .../example/lib/advanced_marker_icons.dart | 140 +++++- .../lib/advanced_markers_clustering.dart | 284 ++++++++++- .../example/lib/clustering.dart | 71 +-- .../example/lib/marker_icons.dart | 46 +- .../example/lib/place_advanced_marker.dart | 453 +++++++++++++++-- .../example/lib/place_marker.dart | 26 +- .../lib/advanced_marker_icons.dart | 140 +++++- .../lib/advanced_markers_clustering.dart | 283 ++++++++++- .../maps_example_dart/lib/clustering.dart | 37 +- .../maps_example_dart/lib/marker_icons.dart | 30 +- .../lib/place_advanced_marker.dart | 465 +++++++++++++++--- .../maps_example_dart/lib/place_marker.dart | 106 ++-- 18 files changed, 2534 insertions(+), 587 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart index a8ce0071d97..08d502161ab 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_marker_icons.dart @@ -3,10 +3,11 @@ // found in the LICENSE file. import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; -import 'marker_icons.dart'; import 'page.dart'; +import 'place_advanced_marker.dart'; /// Page that demonstrates how to use custom [AdvanceMarker] icons. class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { @@ -25,26 +26,137 @@ class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { @override Widget build(BuildContext context) { - return _AdvancedMarkerIconsBody(mapId); + return _AdvancedMarkerIconsBody(mapId: mapId); } } -class _AdvancedMarkerIconsBody extends MarkerIconsBody { - const _AdvancedMarkerIconsBody(this.mapId); +const LatLng _kMapCenter = LatLng(52.4478, -3.5402); - @override +class _AdvancedMarkerIconsBody extends StatefulWidget { + const _AdvancedMarkerIconsBody({required this.mapId}); + + /// Map ID to use for the GoogleMap. final String? mapId; @override - Marker createMarker( - MarkerId markerId, - LatLng position, - BitmapDescriptor icon, - ) { - return AdvancedMarker( - markerId: markerId, - position: position, - icon: icon, + State<_AdvancedMarkerIconsBody> createState() => + _AdvancedMarkerIconsBodyState(); +} + +class _AdvancedMarkerIconsBodyState extends State<_AdvancedMarkerIconsBody> { + final Set _markers = {}; + + GoogleMapController? controller; + + @override + Widget build(BuildContext context) { + return Column( + children: [ + AdvancedMarkersCapabilityStatus(controller: controller), + Expanded( + child: GoogleMap( + mapId: widget.mapId, + markerType: GoogleMapMarkerType.advancedMarker, + initialCameraPosition: const CameraPosition( + target: _kMapCenter, + zoom: 7.0, + ), + markers: _markers, + onMapCreated: (GoogleMapController controller) { + setState(() { + this.controller = controller; + }); + }, + ), + ), + Padding( + padding: const EdgeInsets.all(16), + child: TextButton( + onPressed: _markers.isNotEmpty + ? null + : () async { + final AssetMapBitmap asset = await BitmapDescriptor.asset( + const ImageConfiguration( + size: Size(12, 12), + ), + 'assets/red_square.png', + ); + final AssetMapBitmap largeAsset = + await BitmapDescriptor.asset( + const ImageConfiguration( + size: Size(36, 36), + ), + 'assets/red_square.png', + ); + + setState(() { + _markers.addAll([ + // Default icon + AdvancedMarker( + markerId: const MarkerId('1'), + position: LatLng( + _kMapCenter.latitude + 1, + _kMapCenter.longitude + 1, + ), + ), + // Custom pin colors + AdvancedMarker( + markerId: const MarkerId('2'), + position: LatLng( + _kMapCenter.latitude - 1, + _kMapCenter.longitude - 1, + ), + icon: BitmapDescriptor.pinConfig( + borderColor: Colors.red, + backgroundColor: Colors.black, + glyph: const CircleGlyph(color: Colors.red), + ), + ), + // Pin with text + AdvancedMarker( + markerId: const MarkerId('3'), + position: LatLng( + _kMapCenter.latitude - 1, + _kMapCenter.longitude + 1, + ), + icon: BitmapDescriptor.pinConfig( + borderColor: Colors.blue, + backgroundColor: Colors.white, + glyph: const TextGlyph( + text: 'Hi!', + textColor: Colors.blue, + ), + ), + ), + // Pin with bitmap + AdvancedMarker( + markerId: const MarkerId('4'), + position: LatLng( + _kMapCenter.latitude + 1, + _kMapCenter.longitude - 1, + ), + icon: BitmapDescriptor.pinConfig( + borderColor: Colors.red, + backgroundColor: Colors.white, + glyph: BitmapGlyph(bitmap: asset), + ), + ), + // Custom marker icon + AdvancedMarker( + markerId: const MarkerId('5'), + position: LatLng( + _kMapCenter.latitude, + _kMapCenter.longitude, + ), + icon: largeAsset, + ), + ]); + }); + }, + child: const Text('Add advanced markers'), + ), + ), + ], ); } } diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart index ace6ea178a7..45168c81bbd 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart @@ -2,11 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:math'; + import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; import 'clustering.dart'; import 'page.dart'; +import 'place_advanced_marker.dart'; /// Page for demonstrating advanced marker clustering support. /// Same as [ClusteringPage] but works with [AdvancedMarker]. @@ -26,43 +30,79 @@ class AdvancedMarkersClustering extends GoogleMapExampleAppPage { @override Widget build(BuildContext context) { - return _AdvancedMarkerClusteringBody(mapId); + return _ClusteringBody(mapId: mapId); } } -/// Same as [ClusteringBody] but works with [AdvancedMarker]. -class _AdvancedMarkerClusteringBody extends ClusteringBody { - const _AdvancedMarkerClusteringBody(this.mapId); +/// Body of the clustering page. +class _ClusteringBody extends StatefulWidget { + /// Default Constructor. + const _ClusteringBody({required this.mapId}); - @override + /// Map ID to use for the GoogleMap. final String? mapId; @override - Marker createMarker({ - required MarkerId markerId, - required ClusterManagerId clusterManagerId, - required LatLng position, - required InfoWindow infoWindow, - required VoidCallback onTap, - }) { - return AdvancedMarker( - markerId: markerId, - clusterManagerId: clusterManagerId, - position: position, - infoWindow: infoWindow, - onTap: onTap, - icon: BitmapDescriptor.pinConfig( - backgroundColor: Colors.white, - borderColor: Colors.blue, - glyph: const CircleGlyph(color: Colors.blue), - ), - ); + State createState() => _ClusteringBodyState(); +} + +/// State of the clustering page. +class _ClusteringBodyState extends State<_ClusteringBody> { + /// Default Constructor. + _ClusteringBodyState(); + + /// Starting point from where markers are added. + static const LatLng center = LatLng(-33.86, 151.1547171); + + /// Marker offset factor for randomizing marker placing. + static const double _markerOffsetFactor = 0.05; + + /// Offset for longitude when placing markers to different cluster managers. + static const double _clusterManagerLongitudeOffset = 0.1; + + /// Maximum amount of cluster managers. + static const int _clusterManagerMaxCount = 3; + + /// Amount of markers to be added to the cluster manager at once. + static const int _markersToAddToClusterManagerCount = 10; + + /// Fully visible alpha value. + static const double _fullyVisibleAlpha = 1.0; + + /// Half visible alpha value. + static const double _halfVisibleAlpha = 0.5; + + /// Google map controller. + GoogleMapController? controller; + + /// Map of clusterManagers with identifier as the key. + Map clusterManagers = + {}; + + /// Map of markers with identifier as the key. + Map markers = {}; + + /// Id of the currently selected marker. + MarkerId? selectedMarker; + + /// Counter for added cluster manager ids. + int _clusterManagerIdCounter = 1; + + /// Counter for added markers ids. + int _markerIdCounter = 1; + + /// Cluster that was tapped most recently. + Cluster? lastCluster; + + void _onMapCreated(GoogleMapController controllerParam) { + setState(() { + controller = controllerParam; + }); } - @override - Marker copyWithSelectedState(Marker marker, bool isSelected) { - assert(marker is AdvancedMarker); - return (marker as AdvancedMarker).copyWith( + /// Returns selected or unselected state of the given [marker]. + AdvancedMarker copyWithSelectedState(AdvancedMarker marker, bool isSelected) { + return marker.copyWith( iconParam: isSelected ? BitmapDescriptor.pinConfig( backgroundColor: Colors.blue, @@ -76,4 +116,196 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { ), ); } + + void _onMarkerTapped(MarkerId markerId) { + final AdvancedMarker? tappedMarker = markers[markerId]; + if (tappedMarker != null) { + setState(() { + final MarkerId? previousMarkerId = selectedMarker; + if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { + final AdvancedMarker resetOld = + copyWithSelectedState(markers[previousMarkerId]!, false); + markers[previousMarkerId] = resetOld; + } + selectedMarker = markerId; + final AdvancedMarker newMarker = + copyWithSelectedState(tappedMarker, true); + markers[markerId] = newMarker; + }); + } + } + + void _addClusterManager() { + if (clusterManagers.length == _clusterManagerMaxCount) { + return; + } + + final String clusterManagerIdVal = + 'cluster_manager_id_$_clusterManagerIdCounter'; + _clusterManagerIdCounter++; + final ClusterManagerId clusterManagerId = + ClusterManagerId(clusterManagerIdVal); + + final ClusterManager clusterManager = ClusterManager( + clusterManagerId: clusterManagerId, + onClusterTap: (Cluster cluster) => setState(() { + lastCluster = cluster; + }), + ); + + setState(() { + clusterManagers[clusterManagerId] = clusterManager; + }); + _addMarkersToCluster(clusterManager); + } + + void _removeClusterManager(ClusterManager clusterManager) { + setState(() { + // Remove markers managed by cluster manager to be removed. + markers.removeWhere((MarkerId key, Marker marker) => + marker.clusterManagerId == clusterManager.clusterManagerId); + // Remove cluster manager. + clusterManagers.remove(clusterManager.clusterManagerId); + }); + } + + void _addMarkersToCluster(ClusterManager clusterManager) { + for (int i = 0; i < _markersToAddToClusterManagerCount; i++) { + final String markerIdVal = + '${clusterManager.clusterManagerId.value}_marker_id_$_markerIdCounter'; + _markerIdCounter++; + final MarkerId markerId = MarkerId(markerIdVal); + + final int clusterManagerIndex = + clusterManagers.values.toList().indexOf(clusterManager); + + // Add additional offset to longitude for each cluster manager to space + // out markers in different cluster managers. + final double clusterManagerLongitudeOffset = + clusterManagerIndex * _clusterManagerLongitudeOffset; + + final AdvancedMarker marker = AdvancedMarker( + markerId: markerId, + clusterManagerId: clusterManager.clusterManagerId, + position: LatLng( + center.latitude + _getRandomOffset(), + center.longitude + _getRandomOffset() + clusterManagerLongitudeOffset, + ), + infoWindow: InfoWindow(title: markerIdVal, snippet: '*'), + onTap: () => _onMarkerTapped(markerId), + icon: BitmapDescriptor.pinConfig( + backgroundColor: Colors.white, + borderColor: Colors.blue, + glyph: const CircleGlyph(color: Colors.blue), + ), + ); + markers[markerId] = marker; + } + setState(() {}); + } + + double _getRandomOffset() { + return (Random().nextDouble() - 0.5) * _markerOffsetFactor; + } + + void _remove(MarkerId markerId) { + setState(() { + if (markers.containsKey(markerId)) { + markers.remove(markerId); + } + }); + } + + void _changeMarkersAlpha() { + for (final MarkerId markerId in markers.keys) { + final AdvancedMarker marker = markers[markerId]!; + final double current = marker.alpha; + markers[markerId] = marker.copyWith( + alphaParam: current == _fullyVisibleAlpha + ? _halfVisibleAlpha + : _fullyVisibleAlpha, + ); + } + setState(() {}); + } + + @override + Widget build(BuildContext context) { + final MarkerId? selectedId = selectedMarker; + return Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + AdvancedMarkersCapabilityStatus(controller: controller), + SizedBox( + height: 300.0, + child: GoogleMap( + mapId: widget.mapId, + markerType: GoogleMapMarkerType.advancedMarker, + onMapCreated: _onMapCreated, + initialCameraPosition: const CameraPosition( + target: LatLng(-33.852, 151.25), + zoom: 11.0, + ), + markers: Set.of(markers.values), + clusterManagers: Set.of(clusterManagers.values), + ), + ), + Column(children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + TextButton( + onPressed: clusterManagers.length >= _clusterManagerMaxCount + ? null + : () => _addClusterManager(), + child: const Text('Add cluster manager'), + ), + TextButton( + onPressed: clusterManagers.isEmpty + ? null + : () => _removeClusterManager(clusterManagers.values.last), + child: const Text('Remove cluster manager'), + ), + ], + ), + Wrap( + alignment: WrapAlignment.spaceEvenly, + children: [ + for (final MapEntry clusterEntry + in clusterManagers.entries) + TextButton( + onPressed: () => _addMarkersToCluster(clusterEntry.value), + child: Text('Add markers to ${clusterEntry.key.value}'), + ), + ], + ), + Wrap( + alignment: WrapAlignment.spaceEvenly, + children: [ + TextButton( + onPressed: selectedId == null + ? null + : () { + _remove(selectedId); + setState(() { + selectedMarker = null; + }); + }, + child: const Text('Remove selected marker'), + ), + TextButton( + onPressed: markers.isEmpty ? null : () => _changeMarkersAlpha(), + child: const Text('Change all markers alpha'), + ), + ], + ), + if (lastCluster != null) + Padding( + padding: const EdgeInsets.all(10), + child: Text( + 'Cluster with ${lastCluster!.count} markers clicked at ${lastCluster!.position}')), + ]), + ], + ); + } } diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart index efad4b6f650..ea4957c7cbb 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/clustering.dart @@ -17,52 +17,23 @@ class ClusteringPage extends GoogleMapExampleAppPage { @override Widget build(BuildContext context) { - return const ClusteringBody(); + return const _ClusteringBody(); } } /// Body of the clustering page. -class ClusteringBody extends StatefulWidget { +class _ClusteringBody extends StatefulWidget { /// Default Constructor. - const ClusteringBody({super.key}); + const _ClusteringBody(); @override - State createState() => ClusteringBodyState(); - - /// Creates a marker that is later added to a cluster - Marker createMarker({ - required MarkerId markerId, - required ClusterManagerId clusterManagerId, - required LatLng position, - required InfoWindow infoWindow, - required VoidCallback onTap, - }) { - return Marker( - markerId: markerId, - clusterManagerId: clusterManagerId, - position: position, - infoWindow: infoWindow, - onTap: onTap, - ); - } - - /// Returns selected or unselected state of the given [marker]. - Marker copyWithSelectedState(Marker marker, bool isSelected) { - return marker.copyWith( - iconParam: isSelected - ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) - : BitmapDescriptor.defaultMarker, - ); - } - - /// Returns the mapId to use for the GoogleMap - String? get mapId => null; + State createState() => _ClusteringBodyState(); } /// State of the clustering page. -class ClusteringBodyState extends State { +class _ClusteringBodyState extends State<_ClusteringBody> { /// Default Constructor. - ClusteringBodyState(); + _ClusteringBodyState(); /// Starting point from where markers are added. static const LatLng center = LatLng(-33.86, 151.1547171); @@ -118,6 +89,15 @@ class ClusteringBodyState extends State { super.dispose(); } + /// Returns selected or unselected state of the given [marker]. + Marker copyWithSelectedState(Marker marker, bool isSelected) { + return marker.copyWith( + iconParam: isSelected + ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) + : BitmapDescriptor.defaultMarker, + ); + } + void _onMarkerTapped(MarkerId markerId) { final Marker? tappedMarker = markers[markerId]; if (tappedMarker != null) { @@ -125,12 +105,11 @@ class ClusteringBodyState extends State { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { final Marker resetOld = - widget.copyWithSelectedState(markers[previousMarkerId]!, false); + copyWithSelectedState(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = - widget.copyWithSelectedState(tappedMarker, true); + final Marker newMarker = copyWithSelectedState(tappedMarker, true); markers[markerId] = newMarker; }); } @@ -185,7 +164,7 @@ class ClusteringBodyState extends State { final double clusterManagerLongitudeOffset = clusterManagerIndex * _clusterManagerLongitudeOffset; - final Marker marker = widget.createMarker( + final Marker marker = Marker( markerId: markerId, clusterManagerId: clusterManager.clusterManagerId, position: LatLng( @@ -234,10 +213,6 @@ class ClusteringBodyState extends State { SizedBox( height: 300.0, child: GoogleMap( - markerType: widget.mapId != null - ? GoogleMapMarkerType.advancedMarker - : GoogleMapMarkerType.marker, - mapId: widget.mapId, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.25), diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart index 1c3c0c57ee3..a9f80769e30 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/marker_icons.dart @@ -20,31 +20,15 @@ class MarkerIconsPage extends GoogleMapExampleAppPage { @override Widget build(BuildContext context) { - return const MarkerIconsBody(); + return const _MarkerIconsBody(); } } -class MarkerIconsBody extends StatefulWidget { - const MarkerIconsBody({super.key}); +class _MarkerIconsBody extends StatefulWidget { + const _MarkerIconsBody(); @override State createState() => MarkerIconsBodyState(); - - /// Returns the mapId to use for the GoogleMap - String? get mapId => null; - - /// Creates a marker to be displayed on the map - Marker createMarker( - MarkerId markerId, - LatLng position, - BitmapDescriptor icon, - ) { - return Marker( - markerId: markerId, - position: position, - icon: icon, - ); - } } const LatLng _kMapCenter = LatLng(52.4478, -3.5402); @@ -57,7 +41,7 @@ enum _MarkerSizeOption { size120x60, } -class MarkerIconsBodyState extends State { +class MarkerIconsBodyState extends State<_MarkerIconsBody> { final Size _markerAssetImageSize = const Size(48, 48); _MarkerSizeOption _currentSizeOption = _MarkerSizeOption.original; Set _markers = {}; @@ -84,10 +68,6 @@ class MarkerIconsBodyState extends State { width: 350.0, height: 300.0, child: GoogleMap( - markerType: widget.mapId != null - ? GoogleMapMarkerType.advancedMarker - : GoogleMapMarkerType.marker, - mapId: widget.mapId, initialCameraPosition: const CameraPosition( target: _kMapCenter, zoom: 7.0, @@ -229,10 +209,10 @@ class MarkerIconsBodyState extends State { final LatLng position = LatLng(_kMapCenter.latitude - (index * 0.5), _kMapCenter.longitude - 1); - return widget.createMarker( - MarkerId('marker_asset_$index'), - position, - _markerIconAsset!, + return Marker( + markerId: MarkerId('marker_asset_$index'), + position: position, + icon: _markerIconAsset!, ); } @@ -240,10 +220,10 @@ class MarkerIconsBodyState extends State { final LatLng position = LatLng(_kMapCenter.latitude - (index * 0.5), _kMapCenter.longitude + 1); - return widget.createMarker( - MarkerId('marker_bytes_$index'), - position, - _markerIconBytes!, + return Marker( + markerId: MarkerId('marker_bytes_$index'), + position: position, + icon: _markerIconBytes!, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart index e71cd6222f7..c351a504905 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_advanced_marker.dart @@ -2,11 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:math'; + import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; import 'page.dart'; -import 'place_marker.dart'; /// Page demonstrating how to use Advanced [Marker] class. class PlaceAdvancedMarkerPage extends GoogleMapExampleAppPage { @@ -29,39 +31,113 @@ class PlaceAdvancedMarkerPage extends GoogleMapExampleAppPage { } } -class _PlaceAdvancedMarkerBody extends PlaceMarkerBody { - const _PlaceAdvancedMarkerBody({required super.mapId}); +class _PlaceAdvancedMarkerBody extends StatefulWidget { + const _PlaceAdvancedMarkerBody({required this.mapId}); + + final String? mapId; @override State createState() => _PlaceAdvancedMarkerBodyState(); } -class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { - @override - Marker createMarker({ - required MarkerId markerId, - required LatLng position, - required InfoWindow infoWindow, - required VoidCallback onTap, - required ValueChanged? onDragEnd, - required ValueChanged? onDrag, - }) { - return AdvancedMarker( +class _PlaceAdvancedMarkerBodyState extends State<_PlaceAdvancedMarkerBody> { + _PlaceAdvancedMarkerBodyState(); + static const LatLng center = LatLng(-33.86711, 151.1947171); + + GoogleMapController? controller; + Map markers = {}; + MarkerId? selectedMarker; + int _markerIdCounter = 1; + LatLng? markerPosition; + + void _onMapCreated(GoogleMapController controller) { + setState(() { + this.controller = controller; + }); + } + + void _onMarkerTapped(MarkerId markerId) { + final AdvancedMarker? tappedMarker = markers[markerId]; + if (tappedMarker != null) { + setState(() { + final MarkerId? previousMarkerId = selectedMarker; + if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { + final AdvancedMarker resetOld = + copyWithSelectedState(markers[previousMarkerId]!, false); + markers[previousMarkerId] = resetOld; + } + selectedMarker = markerId; + final AdvancedMarker newMarker = + copyWithSelectedState(tappedMarker, true); + markers[markerId] = newMarker; + + markerPosition = null; + }); + } + } + + Future _onMarkerDrag(MarkerId markerId, LatLng newPosition) async { + setState(() { + markerPosition = newPosition; + }); + } + + Future _onMarkerDragEnd(MarkerId markerId, LatLng newPosition) async { + final AdvancedMarker? tappedMarker = markers[markerId]; + if (tappedMarker != null) { + setState(() { + markerPosition = null; + }); + await showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () => Navigator.of(context).pop(), + ) + ], + content: Padding( + padding: const EdgeInsets.symmetric(vertical: 66), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text('Old position: ${tappedMarker.position}'), + Text('New position: $newPosition'), + ], + ))); + }); + } + } + + void _add() { + final int markerCount = markers.length; + + if (markerCount == 12) { + return; + } + + final String markerIdVal = 'marker_id_$_markerIdCounter'; + _markerIdCounter++; + final MarkerId markerId = MarkerId(markerIdVal); + + final AdvancedMarker marker = AdvancedMarker( markerId: markerId, - position: position, - infoWindow: infoWindow, - onTap: onTap, - onDrag: onDrag, - onDragEnd: onDragEnd, + position: LatLng( + center.latitude + sin(_markerIdCounter * pi / 6.0) / 20.0, + center.longitude + cos(_markerIdCounter * pi / 6.0) / 20.0, + ), icon: _getMarkerBitmapDescriptor(isSelected: false), + infoWindow: InfoWindow(title: markerIdVal, snippet: '*'), + onTap: () => _onMarkerTapped(markerId), + onDrag: (LatLng position) => _onMarkerDrag(markerId, position), + onDragEnd: (LatLng position) => _onMarkerDragEnd(markerId, position), ); - } - @override - Marker copyWithSelectedState(Marker marker, bool isSelected) { - return marker.copyWith( - iconParam: _getMarkerBitmapDescriptor(isSelected: isSelected), - ); + setState(() { + markers[markerId] = marker; + }); } BitmapDescriptor _getMarkerBitmapDescriptor({required bool isSelected}) { @@ -72,12 +148,321 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { ); } + void _remove(MarkerId markerId) { + setState(() { + if (markers.containsKey(markerId)) { + markers.remove(markerId); + } + }); + } + + void _changePosition(MarkerId markerId) { + final AdvancedMarker marker = markers[markerId]!; + final LatLng current = marker.position; + final Offset offset = Offset( + center.latitude - current.latitude, + center.longitude - current.longitude, + ); + setState(() { + markers[markerId] = marker.copyWith( + positionParam: LatLng( + center.latitude + offset.dy, + center.longitude + offset.dx, + ), + ); + }); + } + + void _changeAnchor(MarkerId markerId) { + final AdvancedMarker marker = markers[markerId]!; + final Offset currentAnchor = marker.anchor; + final Offset newAnchor = Offset(1.0 - currentAnchor.dy, currentAnchor.dx); + setState(() { + markers[markerId] = marker.copyWith( + anchorParam: newAnchor, + ); + }); + } + + Future _changeInfoAnchor(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + final Offset currentAnchor = marker.infoWindow.anchor; + final Offset newAnchor = Offset(1.0 - currentAnchor.dy, currentAnchor.dx); + setState(() { + markers[markerId] = marker.copyWith( + infoWindowParam: marker.infoWindow.copyWith( + anchorParam: newAnchor, + ), + ); + }); + } + + Future _toggleDraggable(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + setState(() { + markers[markerId] = marker.copyWith( + draggableParam: !marker.draggable, + ); + }); + } + + Future _toggleFlat(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + setState(() { + markers[markerId] = marker.copyWith( + flatParam: !marker.flat, + ); + }); + } + + Future _changeInfo(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + final String newSnippet = '${marker.infoWindow.snippet!}*'; + setState(() { + markers[markerId] = marker.copyWith( + infoWindowParam: marker.infoWindow.copyWith( + snippetParam: newSnippet, + ), + ); + }); + } + + Future _changeAlpha(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + final double current = marker.alpha; + setState(() { + markers[markerId] = marker.copyWith( + alphaParam: current < 0.1 ? 1.0 : current * 0.75, + ); + }); + } + + Future _changeRotation(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + final double current = marker.rotation; + setState(() { + markers[markerId] = marker.copyWith( + rotationParam: current == 330.0 ? 0.0 : current + 30.0, + ); + }); + } + + Future _toggleVisible(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + setState(() { + markers[markerId] = marker.copyWith( + visibleParam: !marker.visible, + ); + }); + } + + Future _changeZIndex(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + final double current = marker.zIndex; + setState(() { + markers[markerId] = marker.copyWith( + zIndexParam: current == 12.0 ? 0.0 : current + 1.0, + ); + }); + } + + void _setMarkerIcon(MarkerId markerId, BitmapDescriptor assetIcon) { + final AdvancedMarker marker = markers[markerId]!; + setState(() { + markers[markerId] = marker.copyWith( + iconParam: assetIcon, + ); + }); + } + + BitmapDescriptor _getMarkerIcon(BuildContext context) { + return BitmapDescriptor.pinConfig( + backgroundColor: Colors.red, + borderColor: Colors.red, + glyph: const TextGlyph( + text: 'Hi!', + textColor: Colors.white, + ), + ); + } + + /// Performs customizations of the [marker] to mark it as selected or not. + AdvancedMarker copyWithSelectedState(AdvancedMarker marker, bool isSelected) { + return marker.copyWith( + iconParam: _getMarkerBitmapDescriptor(isSelected: isSelected), + ); + } + + @override + Widget build(BuildContext context) { + final MarkerId? selectedId = selectedMarker; + return Stack( + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + AdvancedMarkersCapabilityStatus(controller: controller), + Expanded( + child: GoogleMap( + mapId: widget.mapId, + markerType: GoogleMapMarkerType.advancedMarker, + onMapCreated: _onMapCreated, + initialCameraPosition: const CameraPosition( + target: LatLng(-33.852, 151.211), + zoom: 11.0, + ), + markers: Set.of(markers.values), + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + TextButton( + onPressed: _add, + child: const Text('Add'), + ), + TextButton( + onPressed: + selectedId == null ? null : () => _remove(selectedId), + child: const Text('Remove'), + ), + ], + ), + Wrap( + alignment: WrapAlignment.spaceEvenly, + children: [ + TextButton( + onPressed: + selectedId == null ? null : () => _changeInfo(selectedId), + child: const Text('change info'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changeInfoAnchor(selectedId), + child: const Text('change info anchor'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changeAlpha(selectedId), + child: const Text('change alpha'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changeAnchor(selectedId), + child: const Text('change anchor'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _toggleDraggable(selectedId), + child: const Text('toggle draggable'), + ), + TextButton( + onPressed: + selectedId == null ? null : () => _toggleFlat(selectedId), + child: const Text('toggle flat'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changePosition(selectedId), + child: const Text('change position'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changeRotation(selectedId), + child: const Text('change rotation'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _toggleVisible(selectedId), + child: const Text('toggle visible'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changeZIndex(selectedId), + child: const Text('change zIndex'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => + _setMarkerIcon(selectedId, _getMarkerIcon(context)), + child: const Text('set glyph text'), + ), + ], + ), + ], + ), + Visibility( + visible: markerPosition != null, + child: Container( + color: Colors.white70, + height: 30, + padding: const EdgeInsets.only(left: 12, right: 12), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + if (markerPosition == null) + Container() + else + Expanded(child: Text('lat: ${markerPosition!.latitude}')), + if (markerPosition == null) + Container() + else + Expanded(child: Text('lng: ${markerPosition!.longitude}')), + ], + ), + ), + ), + ], + ); + } +} + +/// Widget displaying the status of advanced markers capability check. +class AdvancedMarkersCapabilityStatus extends StatefulWidget { + /// Default constructor. + const AdvancedMarkersCapabilityStatus({ + super.key, + required this.controller, + }); + + /// Controller of the map to check for advanced markers capability. + final GoogleMapController? controller; + + @override + State createState() => + _AdvancedMarkersCapabilityStatusState(); +} + +class _AdvancedMarkersCapabilityStatusState + extends State { /// Whether map supports advanced markers. Null indicates capability check /// is in progress. bool? _isAdvancedMarkersAvailable; @override - Widget getHeader() { + Widget build(BuildContext context) { + if (widget.controller != null) { + GoogleMapsFlutterPlatform.instance + .isAdvancedMarkersAvailable(mapId: widget.controller!.mapId) + .then((bool result) { + WidgetsBinding.instance.addPostFrameCallback((_) { + setState(() { + _isAdvancedMarkersAvailable = result; + }); + }); + }); + } + return Padding( padding: const EdgeInsets.all(16), child: Text( @@ -99,20 +484,4 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { ), ); } - - @override - Widget build(BuildContext context) { - // Check if map is capable of showing advanced markers. - if (controller != null) { - GoogleMapsFlutterPlatform.instance - .isAdvancedMarkersAvailable(mapId: controller!.mapId) - .then((bool result) { - setState(() { - _isAdvancedMarkersAvailable = result; - }); - }); - } - - return super.build(context); - } } diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart index f4b2081d03d..6e91e9acd5b 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_marker.dart @@ -20,27 +20,19 @@ class PlaceMarkerPage extends GoogleMapExampleAppPage { @override Widget build(BuildContext context) { - return const PlaceMarkerBody(); + return const _PlaceMarkerBody(); } } -class PlaceMarkerBody extends StatefulWidget { - const PlaceMarkerBody({ - super.key, - this.mapId, - }); - - /// Map ID to use for the GoogleMap. - final String? mapId; +class _PlaceMarkerBody extends StatefulWidget { + const _PlaceMarkerBody(); @override - State createState() => PlaceMarkerBodyState(); + State createState() => _PlaceMarkerBodyState(); } -typedef MarkerUpdateAction = Marker Function(Marker marker); - -class PlaceMarkerBodyState extends State { - PlaceMarkerBodyState(); +class _PlaceMarkerBodyState extends State<_PlaceMarkerBody> { + _PlaceMarkerBodyState(); static const LatLng center = LatLng(-33.86711, 151.1947171); GoogleMapController? controller; @@ -55,11 +47,6 @@ class PlaceMarkerBodyState extends State { }); } - @override - void dispose() { - super.dispose(); - } - void _onMarkerTapped(MarkerId markerId) { final Marker? tappedMarker = markers[markerId]; if (tappedMarker != null) { @@ -125,7 +112,7 @@ class PlaceMarkerBodyState extends State { _markerIdCounter++; final MarkerId markerId = MarkerId(markerIdVal); - final Marker marker = createMarker( + final Marker marker = Marker( markerId: markerId, position: LatLng( center.latitude + sin(_markerIdCounter * pi / 6.0) / 20.0, @@ -275,25 +262,6 @@ class PlaceMarkerBodyState extends State { return BytesMapBitmap(bytes.buffer.asUint8List()); } - /// Creates a marker with given parameters - Marker createMarker({ - required MarkerId markerId, - required LatLng position, - required InfoWindow infoWindow, - required VoidCallback onTap, - required ValueChanged? onDragEnd, - required ValueChanged? onDrag, - }) { - return Marker( - markerId: markerId, - position: position, - infoWindow: infoWindow, - onTap: onTap, - onDrag: onDrag, - onDragEnd: onDragEnd, - ); - } - /// Performs customizations of the [marker] to mark it as selected or not. Marker copyWithSelectedState(Marker marker, bool isSelected) { return marker.copyWith( @@ -303,9 +271,6 @@ class PlaceMarkerBodyState extends State { ); } - /// Returns a header to be displayed above the map. - Widget getHeader() => const SizedBox.shrink(); - @override Widget build(BuildContext context) { final MarkerId? selectedId = selectedMarker; @@ -314,13 +279,8 @@ class PlaceMarkerBodyState extends State { mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - getHeader(), Expanded( child: GoogleMap( - mapId: widget.mapId, - markerType: widget.mapId != null - ? GoogleMapMarkerType.advancedMarker - : GoogleMapMarkerType.marker, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.211), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart index 6ff24491d0f..07efdec1230 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_marker_icons.dart @@ -5,8 +5,9 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; -import 'marker_icons.dart'; +import 'example_google_map.dart'; import 'page.dart'; +import 'place_advanced_marker.dart'; /// Page that demonstrates how to use custom [AdvanceMarker] icons. class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { @@ -25,26 +26,137 @@ class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { @override Widget build(BuildContext context) { - return _AdvancedMarkerIconsBody(mapId); + return _AdvancedMarkerIconsBody(mapId: mapId); } } -class _AdvancedMarkerIconsBody extends MarkerIconsBody { - const _AdvancedMarkerIconsBody(this.mapId); +const LatLng _kMapCenter = LatLng(52.4478, -3.5402); - @override +class _AdvancedMarkerIconsBody extends StatefulWidget { + const _AdvancedMarkerIconsBody({required this.mapId}); + + /// Map ID to use for the GoogleMap. final String? mapId; @override - Marker createMarker( - MarkerId markerId, - LatLng position, - BitmapDescriptor icon, - ) { - return AdvancedMarker( - markerId: markerId, - position: position, - icon: icon, + State<_AdvancedMarkerIconsBody> createState() => + _AdvancedMarkerIconsBodyState(); +} + +class _AdvancedMarkerIconsBodyState extends State<_AdvancedMarkerIconsBody> { + final Set _markers = {}; + + ExampleGoogleMapController? controller; + + @override + Widget build(BuildContext context) { + return Column( + children: [ + AdvancedMarkersCapabilityStatus(controller: controller), + Expanded( + child: ExampleGoogleMap( + mapId: widget.mapId, + markerType: MarkerType.advancedMarker, + initialCameraPosition: const CameraPosition( + target: _kMapCenter, + zoom: 7.0, + ), + markers: _markers, + onMapCreated: (ExampleGoogleMapController controller) { + setState(() { + this.controller = controller; + }); + }, + ), + ), + Padding( + padding: const EdgeInsets.all(16), + child: TextButton( + onPressed: _markers.isNotEmpty + ? null + : () async { + final AssetMapBitmap asset = await BitmapDescriptor.asset( + const ImageConfiguration( + size: Size(12, 12), + ), + 'assets/red_square.png', + ); + final AssetMapBitmap largeAsset = + await BitmapDescriptor.asset( + const ImageConfiguration( + size: Size(36, 36), + ), + 'assets/red_square.png', + ); + + setState(() { + _markers.addAll([ + // Default icon + AdvancedMarker( + markerId: const MarkerId('1'), + position: LatLng( + _kMapCenter.latitude + 1, + _kMapCenter.longitude + 1, + ), + ), + // Custom pin colors + AdvancedMarker( + markerId: const MarkerId('2'), + position: LatLng( + _kMapCenter.latitude - 1, + _kMapCenter.longitude - 1, + ), + icon: BitmapDescriptor.pinConfig( + borderColor: Colors.red, + backgroundColor: Colors.black, + glyph: const CircleGlyph(color: Colors.red), + ), + ), + // Pin with text + AdvancedMarker( + markerId: const MarkerId('3'), + position: LatLng( + _kMapCenter.latitude - 1, + _kMapCenter.longitude + 1, + ), + icon: BitmapDescriptor.pinConfig( + borderColor: Colors.blue, + backgroundColor: Colors.white, + glyph: const TextGlyph( + text: 'Hi!', + textColor: Colors.blue, + ), + ), + ), + // Pin with bitmap + AdvancedMarker( + markerId: const MarkerId('4'), + position: LatLng( + _kMapCenter.latitude + 1, + _kMapCenter.longitude - 1, + ), + icon: BitmapDescriptor.pinConfig( + borderColor: Colors.red, + backgroundColor: Colors.white, + glyph: BitmapGlyph(bitmap: asset), + ), + ), + // Custom marker icon + AdvancedMarker( + markerId: const MarkerId('5'), + position: LatLng( + _kMapCenter.latitude, + _kMapCenter.longitude, + ), + icon: largeAsset, + ), + ]); + }); + }, + child: const Text('Add advanced markers'), + ), + ), + ], ); } } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart index eee0a599d1e..53764a3cf2b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart @@ -2,11 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:math'; + import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; import 'clustering.dart'; +import 'example_google_map.dart'; import 'page.dart'; +import 'place_advanced_marker.dart'; /// Page for demonstrating advanced marker clustering support. /// Same as [ClusteringPage] but works with [AdvancedMarker]. @@ -26,43 +30,196 @@ class AdvancedMarkersClusteringPage extends GoogleMapExampleAppPage { @override Widget build(BuildContext context) { - return _AdvancedMarkerClusteringBody(mapId); + return _ClusteringBody(mapId: mapId); } } -/// Same as [ClusteringBody] but works with [AdvancedMarker]. -class _AdvancedMarkerClusteringBody extends ClusteringBody { - const _AdvancedMarkerClusteringBody(this.mapId); +/// Body of the clustering page. +class _ClusteringBody extends StatefulWidget { + /// Default Constructor. + const _ClusteringBody({required this.mapId}); - @override + /// Map ID to use for the GoogleMap. final String? mapId; @override - Marker createMarker( - MarkerId markerId, - ClusterManagerId clusterManagerId, - LatLng position, - InfoWindow infoWindow, - VoidCallback onTap, - ) { - return AdvancedMarker( - markerId: markerId, + State createState() => _ClusteringBodyState(); +} + +/// State of the clustering page. +class _ClusteringBodyState extends State<_ClusteringBody> { + /// Default Constructor. + _ClusteringBodyState(); + + /// Starting point from where markers are added. + static const LatLng center = LatLng(-33.86, 151.1547171); + + /// Initial camera position. + static const CameraPosition initialCameraPosition = CameraPosition( + target: LatLng(-33.852, 151.25), + zoom: 11.0, + ); + + /// Marker offset factor for randomizing marker placing. + static const double _markerOffsetFactor = 0.05; + + /// Offset for longitude when placing markers to different cluster managers. + static const double _clusterManagerLongitudeOffset = 0.1; + + /// Maximum amount of cluster managers. + static const int _clusterManagerMaxCount = 3; + + /// Amount of markers to be added to the cluster manager at once. + static const int _markersToAddToClusterManagerCount = 10; + + /// Fully visible alpha value. + static const double _fullyVisibleAlpha = 1.0; + + /// Half visible alpha value. + static const double _halfVisibleAlpha = 0.5; + + /// Google map controller. + ExampleGoogleMapController? controller; + + /// Map of clusterManagers with identifier as the key. + Map clusterManagers = + {}; + + /// Map of markers with identifier as the key. + Map markers = {}; + + /// Id of the currently selected marker. + MarkerId? selectedMarker; + + /// Counter for added cluster manager ids. + int _clusterManagerIdCounter = 1; + + /// Counter for added markers ids. + int _markerIdCounter = 1; + + /// Cluster that was tapped most recently. + Cluster? lastCluster; + + // ignore: use_setters_to_change_properties + void _onMapCreated(ExampleGoogleMapController controller) { + this.controller = controller; + } + + void _onMarkerTapped(MarkerId markerId) { + final AdvancedMarker? tappedMarker = markers[markerId]; + if (tappedMarker != null) { + setState(() { + final MarkerId? previousMarkerId = selectedMarker; + if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { + final AdvancedMarker resetOld = + copyWithSelectedState(markers[previousMarkerId]!, false); + markers[previousMarkerId] = resetOld; + } + selectedMarker = markerId; + final AdvancedMarker newMarker = + copyWithSelectedState(tappedMarker, true); + markers[markerId] = newMarker; + }); + } + } + + void _addClusterManager() { + if (clusterManagers.length == _clusterManagerMaxCount) { + return; + } + + final String clusterManagerIdVal = + 'cluster_manager_id_$_clusterManagerIdCounter'; + _clusterManagerIdCounter++; + final ClusterManagerId clusterManagerId = + ClusterManagerId(clusterManagerIdVal); + + final ClusterManager clusterManager = ClusterManager( clusterManagerId: clusterManagerId, - position: position, - infoWindow: infoWindow, - onTap: onTap, - icon: BitmapDescriptor.pinConfig( - backgroundColor: Colors.white, - borderColor: Colors.blue, - glyph: const CircleGlyph(color: Colors.blue), - ), + onClusterTap: (Cluster cluster) => setState(() { + lastCluster = cluster; + }), ); + + setState(() { + clusterManagers[clusterManagerId] = clusterManager; + }); + _addMarkersToCluster(clusterManager); } - @override - Marker copyWithSelectedState(Marker marker, bool isSelected) { - assert(marker is AdvancedMarker); - return (marker as AdvancedMarker).copyWith( + void _removeClusterManager(ClusterManager clusterManager) { + setState(() { + // Remove markers managed by cluster manager to be removed. + markers.removeWhere((MarkerId key, AdvancedMarker marker) => + marker.clusterManagerId == clusterManager.clusterManagerId); + // Remove cluster manager. + clusterManagers.remove(clusterManager.clusterManagerId); + }); + } + + void _addMarkersToCluster(ClusterManager clusterManager) { + for (int i = 0; i < _markersToAddToClusterManagerCount; i++) { + final String markerIdVal = + '${clusterManager.clusterManagerId.value}_marker_id_$_markerIdCounter'; + _markerIdCounter++; + final MarkerId markerId = MarkerId(markerIdVal); + + final int clusterManagerIndex = + clusterManagers.values.toList().indexOf(clusterManager); + + // Add additional offset to longitude for each cluster manager to space + // out markers in different cluster managers. + final double clusterManagerLongitudeOffset = + clusterManagerIndex * _clusterManagerLongitudeOffset; + + final AdvancedMarker marker = AdvancedMarker( + markerId: markerId, + clusterManagerId: clusterManager.clusterManagerId, + position: LatLng( + center.latitude + _getRandomOffset(), + center.longitude + _getRandomOffset() + clusterManagerLongitudeOffset, + ), + infoWindow: InfoWindow(title: markerIdVal, snippet: '*'), + onTap: () => _onMarkerTapped(markerId), + icon: BitmapDescriptor.pinConfig( + backgroundColor: Colors.white, + borderColor: Colors.blue, + glyph: const CircleGlyph(color: Colors.blue), + ), + ); + markers[markerId] = marker; + } + setState(() {}); + } + + double _getRandomOffset() { + return (Random().nextDouble() - 0.5) * _markerOffsetFactor; + } + + void _remove(MarkerId markerId) { + setState(() { + if (markers.containsKey(markerId)) { + markers.remove(markerId); + } + }); + } + + void _changeMarkersAlpha() { + for (final MarkerId markerId in markers.keys) { + final AdvancedMarker marker = markers[markerId]!; + final double current = marker.alpha; + markers[markerId] = marker.copyWith( + alphaParam: current == _fullyVisibleAlpha + ? _halfVisibleAlpha + : _fullyVisibleAlpha, + ); + } + setState(() {}); + } + + /// Returns selected or unselected state of the given [marker]. + AdvancedMarker copyWithSelectedState(AdvancedMarker marker, bool isSelected) { + return marker.copyWith( iconParam: isSelected ? BitmapDescriptor.pinConfig( backgroundColor: Colors.blue, @@ -76,4 +233,79 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { ), ); } + + @override + Widget build(BuildContext context) { + final MarkerId? selectedId = selectedMarker; + return Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + AdvancedMarkersCapabilityStatus(controller: controller), + Expanded( + child: ExampleGoogleMap( + mapId: widget.mapId, + markerType: MarkerType.advancedMarker, + onMapCreated: _onMapCreated, + initialCameraPosition: initialCameraPosition, + markers: Set.of(markers.values), + clusterManagers: Set.of(clusterManagers.values), + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + TextButton( + onPressed: clusterManagers.length >= _clusterManagerMaxCount + ? null + : () => _addClusterManager(), + child: const Text('Add cluster manager'), + ), + TextButton( + onPressed: clusterManagers.isEmpty + ? null + : () => _removeClusterManager(clusterManagers.values.last), + child: const Text('Remove cluster manager'), + ), + ], + ), + Wrap( + alignment: WrapAlignment.spaceEvenly, + children: [ + for (final MapEntry clusterEntry + in clusterManagers.entries) + TextButton( + onPressed: () => _addMarkersToCluster(clusterEntry.value), + child: Text('Add markers to ${clusterEntry.key.value}'), + ), + ], + ), + Wrap( + alignment: WrapAlignment.spaceEvenly, + children: [ + TextButton( + onPressed: selectedId == null + ? null + : () { + _remove(selectedId); + setState(() { + selectedMarker = null; + }); + }, + child: const Text('Remove selected marker'), + ), + TextButton( + onPressed: markers.isEmpty ? null : () => _changeMarkersAlpha(), + child: const Text('Change all markers alpha'), + ), + ], + ), + if (lastCluster != null) + Padding( + padding: const EdgeInsets.all(10), + child: Text( + 'Cluster with ${lastCluster!.count} markers clicked at ${lastCluster!.position}')), + ], + ); + } } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart index 96470d5726d..9182d8b4210 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/clustering.dart @@ -18,52 +18,23 @@ class ClusteringPage extends GoogleMapExampleAppPage { @override Widget build(BuildContext context) { - return const ClusteringBody(); + return const _ClusteringBody(); } } /// Body of the clustering page. -class ClusteringBody extends StatefulWidget { +class _ClusteringBody extends StatefulWidget { /// Default Constructor. - const ClusteringBody({super.key}); + const _ClusteringBody(); @override - State createState() => ClusteringBodyState(); - - /// Creates a marker that is later added to a cluster - Marker createMarker( - MarkerId markerId, - ClusterManagerId clusterManagerId, - LatLng position, - InfoWindow infoWindow, - VoidCallback onTap, - ) { - return Marker( - markerId: markerId, - clusterManagerId: clusterManagerId, - position: position, - infoWindow: infoWindow, - onTap: onTap, - ); - } - - /// Returns selected or unselected state of the given [marker]. - Marker copyWithSelectedState(Marker marker, bool isSelected) { - return marker.copyWith( - iconParam: isSelected - ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) - : BitmapDescriptor.defaultMarker, - ); - } - - /// Returns the mapId to use for the GoogleMap - String? get mapId => null; + State createState() => _ClusteringBodyState(); } /// State of the clustering page. -class ClusteringBodyState extends State { +class _ClusteringBodyState extends State<_ClusteringBody> { /// Default Constructor. - ClusteringBodyState(); + _ClusteringBodyState(); /// Starting point from where markers are added. static const LatLng center = LatLng(-33.86, 151.1547171); @@ -131,12 +102,11 @@ class ClusteringBodyState extends State { final MarkerId? previousMarkerId = selectedMarker; if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { final Marker resetOld = - widget.copyWithSelectedState(markers[previousMarkerId]!, false); + copyWithSelectedState(markers[previousMarkerId]!, false); markers[previousMarkerId] = resetOld; } selectedMarker = markerId; - final Marker newMarker = - widget.copyWithSelectedState(tappedMarker, true); + final Marker newMarker = copyWithSelectedState(tappedMarker, true); markers[markerId] = newMarker; }); } @@ -191,15 +161,15 @@ class ClusteringBodyState extends State { final double clusterManagerLongitudeOffset = clusterManagerIndex * _clusterManagerLongitudeOffset; - final Marker marker = widget.createMarker( - markerId, - clusterManager.clusterManagerId, - LatLng( + final Marker marker = Marker( + markerId: markerId, + clusterManagerId: clusterManager.clusterManagerId, + position: LatLng( center.latitude + _getRandomOffset(), center.longitude + _getRandomOffset() + clusterManagerLongitudeOffset, ), - InfoWindow(title: markerIdVal, snippet: '*'), - () => _onMarkerTapped(markerId), + infoWindow: InfoWindow(title: markerIdVal, snippet: '*'), + onTap: () => _onMarkerTapped(markerId), ); markers[markerId] = marker; } @@ -231,6 +201,15 @@ class ClusteringBodyState extends State { setState(() {}); } + /// Returns selected or unselected state of the given [marker]. + Marker copyWithSelectedState(Marker marker, bool isSelected) { + return marker.copyWith( + iconParam: isSelected + ? BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen) + : BitmapDescriptor.defaultMarker, + ); + } + @override Widget build(BuildContext context) { final MarkerId? selectedId = selectedMarker; @@ -240,10 +219,6 @@ class ClusteringBodyState extends State { children: [ Expanded( child: ExampleGoogleMap( - mapId: widget.mapId, - markerType: widget.mapId != null - ? MarkerType.advancedMarker - : MarkerType.marker, onMapCreated: _onMapCreated, initialCameraPosition: initialCameraPosition, markers: Set.of(markers.values), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart index 00404ec5141..2c1a8d2a64d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/marker_icons.dart @@ -21,31 +21,15 @@ class MarkerIconsPage extends GoogleMapExampleAppPage { @override Widget build(BuildContext context) { - return const MarkerIconsBody(); + return const _MarkerIconsBody(); } } -class MarkerIconsBody extends StatefulWidget { - const MarkerIconsBody({super.key}); +class _MarkerIconsBody extends StatefulWidget { + const _MarkerIconsBody(); @override - State createState() => MarkerIconsBodyState(); - - /// Returns the mapId to use for the GoogleMap - String? get mapId => null; - - /// Creates a marker to be displayed on the map - Marker createMarker( - MarkerId markerId, - LatLng position, - BitmapDescriptor icon, - ) { - return Marker( - markerId: markerId, - position: position, - icon: icon, - ); - } + State createState() => _MarkerIconsBodyState(); } const LatLng _kMapCenter = LatLng(52.4478, -3.5402); @@ -58,7 +42,7 @@ enum _MarkerSizeOption { size120x60, } -class MarkerIconsBodyState extends State { +class _MarkerIconsBodyState extends State<_MarkerIconsBody> { final Size _markerAssetImageSize = const Size(48, 48); _MarkerSizeOption _currentSizeOption = _MarkerSizeOption.original; Set _markers = {}; @@ -85,10 +69,6 @@ class MarkerIconsBodyState extends State { width: 350.0, height: 300.0, child: ExampleGoogleMap( - mapId: widget.mapId, - markerType: widget.mapId != null - ? MarkerType.advancedMarker - : MarkerType.marker, initialCameraPosition: const CameraPosition( target: _kMapCenter, zoom: 7.0, @@ -230,10 +210,10 @@ class MarkerIconsBodyState extends State { final LatLng position = LatLng(_kMapCenter.latitude - (index * 0.5), _kMapCenter.longitude - 1); - return widget.createMarker( - MarkerId('marker_asset_$index'), - position, - _markerIconAsset!, + return Marker( + markerId: MarkerId('marker_asset_$index'), + position: position, + icon: _markerIconAsset!, ); } @@ -241,10 +221,10 @@ class MarkerIconsBodyState extends State { final LatLng position = LatLng(_kMapCenter.latitude - (index * 0.5), _kMapCenter.longitude + 1); - return widget.createMarker( - MarkerId('marker_bytes_$index'), - position, - _markerIconBytes!, + return Marker( + markerId: MarkerId('marker_bytes_$index'), + position: position, + icon: _markerIconBytes!, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart index cad223a76ee..43073aefe73 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_advanced_marker.dart @@ -2,11 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:math'; + import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; +import 'example_google_map.dart'; import 'page.dart'; -import 'place_marker.dart'; /// Page demonstrating how to use Advanced [Marker] class. class PlaceAdvancedMarkerPage extends GoogleMapExampleAppPage { @@ -26,39 +28,113 @@ class PlaceAdvancedMarkerPage extends GoogleMapExampleAppPage { } } -class _PlaceAdvancedMarkerBody extends PlaceMarkerBody { - const _PlaceAdvancedMarkerBody({required super.mapId}); +class _PlaceAdvancedMarkerBody extends StatefulWidget { + const _PlaceAdvancedMarkerBody({required this.mapId}); + + final String? mapId; @override State createState() => _PlaceAdvancedMarkerBodyState(); } -class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { - @override - Marker createMarker({ - required MarkerId markerId, - required LatLng position, - required InfoWindow infoWindow, - required VoidCallback onTap, - required ValueChanged? onDragEnd, - required ValueChanged? onDrag, - }) { - return AdvancedMarker( +class _PlaceAdvancedMarkerBodyState extends State<_PlaceAdvancedMarkerBody> { + _PlaceAdvancedMarkerBodyState(); + static const LatLng center = LatLng(-33.86711, 151.1947171); + + ExampleGoogleMapController? controller; + Map markers = {}; + MarkerId? selectedMarker; + int _markerIdCounter = 1; + LatLng? markerPosition; + + void _onMapCreated(ExampleGoogleMapController controller) { + setState(() { + this.controller = controller; + }); + } + + void _onMarkerTapped(MarkerId markerId) { + final AdvancedMarker? tappedMarker = markers[markerId]; + if (tappedMarker != null) { + setState(() { + final MarkerId? previousMarkerId = selectedMarker; + if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { + final AdvancedMarker resetOld = + copyWithSelectedState(markers[previousMarkerId]!, false); + markers[previousMarkerId] = resetOld; + } + selectedMarker = markerId; + final AdvancedMarker newMarker = + copyWithSelectedState(tappedMarker, true); + markers[markerId] = newMarker; + + markerPosition = null; + }); + } + } + + Future _onMarkerDrag(MarkerId markerId, LatLng newPosition) async { + setState(() { + markerPosition = newPosition; + }); + } + + Future _onMarkerDragEnd(MarkerId markerId, LatLng newPosition) async { + final AdvancedMarker? tappedMarker = markers[markerId]; + if (tappedMarker != null) { + setState(() { + markerPosition = null; + }); + await showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () => Navigator.of(context).pop(), + ) + ], + content: Padding( + padding: const EdgeInsets.symmetric(vertical: 66), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text('Old position: ${tappedMarker.position}'), + Text('New position: $newPosition'), + ], + ))); + }); + } + } + + void _add() { + final int markerCount = markers.length; + + if (markerCount == 12) { + return; + } + + final String markerIdVal = 'marker_id_$_markerIdCounter'; + _markerIdCounter++; + final MarkerId markerId = MarkerId(markerIdVal); + + final AdvancedMarker marker = AdvancedMarker( markerId: markerId, - position: position, - infoWindow: infoWindow, - onTap: onTap, - onDrag: onDrag, - onDragEnd: onDragEnd, + position: LatLng( + center.latitude + sin(_markerIdCounter * pi / 6.0) / 20.0, + center.longitude + cos(_markerIdCounter * pi / 6.0) / 20.0, + ), icon: _getMarkerBitmapDescriptor(isSelected: false), + infoWindow: InfoWindow(title: markerIdVal, snippet: '*'), + onTap: () => _onMarkerTapped(markerId), + onDrag: (LatLng position) => _onMarkerDrag(markerId, position), + onDragEnd: (LatLng position) => _onMarkerDragEnd(markerId, position), ); - } - @override - Marker copyWithSelectedState(Marker marker, bool isSelected) { - return marker.copyWith( - iconParam: _getMarkerBitmapDescriptor(isSelected: isSelected), - ); + setState(() { + markers[markerId] = marker; + }); } BitmapDescriptor _getMarkerBitmapDescriptor({required bool isSelected}) { @@ -69,12 +145,321 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { ); } + void _remove(MarkerId markerId) { + setState(() { + if (markers.containsKey(markerId)) { + markers.remove(markerId); + } + }); + } + + void _changePosition(MarkerId markerId) { + final AdvancedMarker marker = markers[markerId]!; + final LatLng current = marker.position; + final Offset offset = Offset( + center.latitude - current.latitude, + center.longitude - current.longitude, + ); + setState(() { + markers[markerId] = marker.copyWith( + positionParam: LatLng( + center.latitude + offset.dy, + center.longitude + offset.dx, + ), + ); + }); + } + + void _changeAnchor(MarkerId markerId) { + final AdvancedMarker marker = markers[markerId]!; + final Offset currentAnchor = marker.anchor; + final Offset newAnchor = Offset(1.0 - currentAnchor.dy, currentAnchor.dx); + setState(() { + markers[markerId] = marker.copyWith( + anchorParam: newAnchor, + ); + }); + } + + Future _changeInfoAnchor(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + final Offset currentAnchor = marker.infoWindow.anchor; + final Offset newAnchor = Offset(1.0 - currentAnchor.dy, currentAnchor.dx); + setState(() { + markers[markerId] = marker.copyWith( + infoWindowParam: marker.infoWindow.copyWith( + anchorParam: newAnchor, + ), + ); + }); + } + + Future _toggleDraggable(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + setState(() { + markers[markerId] = marker.copyWith( + draggableParam: !marker.draggable, + ); + }); + } + + Future _toggleFlat(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + setState(() { + markers[markerId] = marker.copyWith( + flatParam: !marker.flat, + ); + }); + } + + Future _changeInfo(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + final String newSnippet = '${marker.infoWindow.snippet!}*'; + setState(() { + markers[markerId] = marker.copyWith( + infoWindowParam: marker.infoWindow.copyWith( + snippetParam: newSnippet, + ), + ); + }); + } + + Future _changeAlpha(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + final double current = marker.alpha; + setState(() { + markers[markerId] = marker.copyWith( + alphaParam: current < 0.1 ? 1.0 : current * 0.75, + ); + }); + } + + Future _changeRotation(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + final double current = marker.rotation; + setState(() { + markers[markerId] = marker.copyWith( + rotationParam: current == 330.0 ? 0.0 : current + 30.0, + ); + }); + } + + Future _toggleVisible(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + setState(() { + markers[markerId] = marker.copyWith( + visibleParam: !marker.visible, + ); + }); + } + + Future _changeZIndex(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + final double current = marker.zIndex; + setState(() { + markers[markerId] = marker.copyWith( + zIndexParam: current == 12.0 ? 0.0 : current + 1.0, + ); + }); + } + + void _setMarkerIcon(MarkerId markerId, BitmapDescriptor assetIcon) { + final AdvancedMarker marker = markers[markerId]!; + setState(() { + markers[markerId] = marker.copyWith( + iconParam: assetIcon, + ); + }); + } + + BitmapDescriptor _getMarkerIcon(BuildContext context) { + return BitmapDescriptor.pinConfig( + backgroundColor: Colors.red, + borderColor: Colors.red, + glyph: const TextGlyph( + text: 'Hi!', + textColor: Colors.white, + ), + ); + } + + /// Performs customizations of the [marker] to mark it as selected or not. + AdvancedMarker copyWithSelectedState(AdvancedMarker marker, bool isSelected) { + return marker.copyWith( + iconParam: _getMarkerBitmapDescriptor(isSelected: isSelected), + ); + } + + @override + Widget build(BuildContext context) { + final MarkerId? selectedId = selectedMarker; + return Stack( + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + AdvancedMarkersCapabilityStatus(controller: controller), + Expanded( + child: ExampleGoogleMap( + mapId: widget.mapId, + markerType: MarkerType.advancedMarker, + onMapCreated: _onMapCreated, + initialCameraPosition: const CameraPosition( + target: LatLng(-33.852, 151.211), + zoom: 11.0, + ), + markers: Set.of(markers.values), + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + TextButton( + onPressed: _add, + child: const Text('Add'), + ), + TextButton( + onPressed: + selectedId == null ? null : () => _remove(selectedId), + child: const Text('Remove'), + ), + ], + ), + Wrap( + alignment: WrapAlignment.spaceEvenly, + children: [ + TextButton( + onPressed: + selectedId == null ? null : () => _changeInfo(selectedId), + child: const Text('change info'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changeInfoAnchor(selectedId), + child: const Text('change info anchor'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changeAlpha(selectedId), + child: const Text('change alpha'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changeAnchor(selectedId), + child: const Text('change anchor'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _toggleDraggable(selectedId), + child: const Text('toggle draggable'), + ), + TextButton( + onPressed: + selectedId == null ? null : () => _toggleFlat(selectedId), + child: const Text('toggle flat'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changePosition(selectedId), + child: const Text('change position'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changeRotation(selectedId), + child: const Text('change rotation'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _toggleVisible(selectedId), + child: const Text('toggle visible'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changeZIndex(selectedId), + child: const Text('change zIndex'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => + _setMarkerIcon(selectedId, _getMarkerIcon(context)), + child: const Text('set glyph text'), + ), + ], + ), + ], + ), + Visibility( + visible: markerPosition != null, + child: Container( + color: Colors.white70, + height: 30, + padding: const EdgeInsets.only(left: 12, right: 12), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + if (markerPosition == null) + Container() + else + Expanded(child: Text('lat: ${markerPosition!.latitude}')), + if (markerPosition == null) + Container() + else + Expanded(child: Text('lng: ${markerPosition!.longitude}')), + ], + ), + ), + ), + ], + ); + } +} + +/// Widget displaying the status of advanced markers capability check. +class AdvancedMarkersCapabilityStatus extends StatefulWidget { + /// Default constructor. + const AdvancedMarkersCapabilityStatus({ + super.key, + required this.controller, + }); + + /// Controller of the map to check for advanced markers capability. + final ExampleGoogleMapController? controller; + + @override + State createState() => + _AdvancedMarkersCapabilityStatusState(); +} + +class _AdvancedMarkersCapabilityStatusState + extends State { /// Whether map supports advanced markers. Null indicates capability check /// is in progress. bool? _isAdvancedMarkersAvailable; @override - Widget getHeader() { + Widget build(BuildContext context) { + if (widget.controller != null) { + GoogleMapsFlutterPlatform.instance + .isAdvancedMarkersAvailable(mapId: widget.controller!.mapId) + .then((bool result) { + WidgetsBinding.instance.addPostFrameCallback((_) { + setState(() { + _isAdvancedMarkersAvailable = result; + }); + }); + }); + } + return Padding( padding: const EdgeInsets.all(16), child: Text( @@ -96,20 +481,4 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { ), ); } - - @override - Widget build(BuildContext context) { - // Check if map is capable of showing advanced markers. - if (controller != null) { - GoogleMapsFlutterPlatform.instance - .isAdvancedMarkersAvailable(mapId: controller!.mapId) - .then((bool result) { - setState(() { - _isAdvancedMarkersAvailable = result; - }); - }); - } - - return super.build(context); - } } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart index e65a1df052d..dc9c4c000f0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_marker.dart @@ -21,27 +21,21 @@ class PlaceMarkerPage extends GoogleMapExampleAppPage { @override Widget build(BuildContext context) { - return const PlaceMarkerBody(); + return const _PlaceMarkerBody(); } } -class PlaceMarkerBody extends StatefulWidget { - const PlaceMarkerBody({ - super.key, - this.mapId, - }); - - /// Map ID to use for the GoogleMap. - final String? mapId; +class _PlaceMarkerBody extends StatefulWidget { + const _PlaceMarkerBody(); @override - State createState() => PlaceMarkerBodyState(); + State createState() => _PlaceMarkerBodyState(); } typedef MarkerUpdateAction = Marker Function(Marker marker); -class PlaceMarkerBodyState extends State { - PlaceMarkerBodyState(); +class _PlaceMarkerBodyState extends State<_PlaceMarkerBody> { + _PlaceMarkerBodyState(); static const LatLng center = LatLng(-33.86711, 151.1947171); ExampleGoogleMapController? controller; @@ -304,9 +298,6 @@ class PlaceMarkerBodyState extends State { ); } - /// Returns a header to be displayed above the map. - Widget getHeader() => const SizedBox.shrink(); - @override Widget build(BuildContext context) { final MarkerId? selectedId = selectedMarker; @@ -315,13 +306,8 @@ class PlaceMarkerBodyState extends State { mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - getHeader(), Expanded( child: ExampleGoogleMap( - mapId: widget.mapId, - markerType: widget.mapId != null - ? MarkerType.advancedMarker - : MarkerType.marker, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.211), diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart index cc57d0380b0..f7cc9a82d56 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_marker_icons.dart @@ -5,8 +5,9 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; -import 'marker_icons.dart'; +import 'example_google_map.dart'; import 'page.dart'; +import 'place_marker.dart'; /// Page that demonstrates how to use custom [AdvanceMarker] icons. class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { @@ -23,28 +24,137 @@ class AdvancedMarkerIconsPage extends GoogleMapExampleAppPage { @override Widget build(BuildContext context) { - return _AdvancedMarkerIconsBody(mapId); + return _AdvancedMarkerIconsBody(mapId: mapId); } } -class _AdvancedMarkerIconsBody extends MarkerIconsBody { - const _AdvancedMarkerIconsBody(this.providedMapId); +const LatLng _kMapCenter = LatLng(52.4478, -3.5402); - final String? providedMapId; +class _AdvancedMarkerIconsBody extends StatefulWidget { + const _AdvancedMarkerIconsBody({required this.mapId}); + + /// Map ID to use for the GoogleMap. + final String? mapId; @override - String? get mapId => providedMapId; + State<_AdvancedMarkerIconsBody> createState() => + _AdvancedMarkerIconsBodyState(); +} + +class _AdvancedMarkerIconsBodyState extends State<_AdvancedMarkerIconsBody> { + final Set _markers = {}; + + ExampleGoogleMapController? controller; @override - Marker createMarker( - MarkerId markerId, - LatLng position, - BitmapDescriptor icon, - ) { - return AdvancedMarker( - markerId: markerId, - position: position, - icon: icon, + Widget build(BuildContext context) { + return Column( + children: [ + AdvancedMarkersCapabilityStatus(controller: controller), + Expanded( + child: ExampleGoogleMap( + mapId: widget.mapId, + markerType: MarkerType.advancedMarker, + initialCameraPosition: const CameraPosition( + target: _kMapCenter, + zoom: 7.0, + ), + markers: _markers, + onMapCreated: (ExampleGoogleMapController controller) { + setState(() { + this.controller = controller; + }); + }, + ), + ), + Padding( + padding: const EdgeInsets.all(16), + child: TextButton( + onPressed: _markers.isNotEmpty + ? null + : () async { + final AssetMapBitmap asset = await BitmapDescriptor.asset( + const ImageConfiguration( + size: Size(12, 12), + ), + 'assets/red_square.png', + ); + final AssetMapBitmap largeAsset = + await BitmapDescriptor.asset( + const ImageConfiguration( + size: Size(36, 36), + ), + 'assets/red_square.png', + ); + + setState(() { + _markers.addAll([ + // Default icon + AdvancedMarker( + markerId: const MarkerId('1'), + position: LatLng( + _kMapCenter.latitude + 1, + _kMapCenter.longitude + 1, + ), + ), + // Custom pin colors + AdvancedMarker( + markerId: const MarkerId('2'), + position: LatLng( + _kMapCenter.latitude - 1, + _kMapCenter.longitude - 1, + ), + icon: BitmapDescriptor.pinConfig( + borderColor: Colors.red, + backgroundColor: Colors.black, + glyph: const CircleGlyph(color: Colors.red), + ), + ), + // Pin with text + AdvancedMarker( + markerId: const MarkerId('3'), + position: LatLng( + _kMapCenter.latitude - 1, + _kMapCenter.longitude + 1, + ), + icon: BitmapDescriptor.pinConfig( + borderColor: Colors.blue, + backgroundColor: Colors.white, + glyph: const TextGlyph( + text: 'Hi!', + textColor: Colors.blue, + ), + ), + ), + // Pin with bitmap + AdvancedMarker( + markerId: const MarkerId('4'), + position: LatLng( + _kMapCenter.latitude + 1, + _kMapCenter.longitude - 1, + ), + icon: BitmapDescriptor.pinConfig( + borderColor: Colors.red, + backgroundColor: Colors.white, + glyph: BitmapGlyph(bitmap: asset), + ), + ), + // Custom marker icon + AdvancedMarker( + markerId: const MarkerId('5'), + position: LatLng( + _kMapCenter.latitude, + _kMapCenter.longitude, + ), + icon: largeAsset, + ), + ]); + }); + }, + child: const Text('Add advanced markers'), + ), + ), + ], ); } } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart index 4c6f8105127..78921ef3947 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart @@ -2,10 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:math'; + import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; import 'clustering.dart'; +import 'example_google_map.dart'; import 'page.dart'; /// Page for demonstrating advanced marker clustering support. @@ -24,40 +27,196 @@ class AdvancedMarkersClusteringPage extends GoogleMapExampleAppPage { @override Widget build(BuildContext context) { - return _AdvancedMarkerClusteringBody(mapId: mapId); + return _ClusteringBody(mapId: mapId); } } -/// Same as [ClusteringBody] but works with [AdvancedMarker]. -class _AdvancedMarkerClusteringBody extends ClusteringBody { - const _AdvancedMarkerClusteringBody({required super.mapId}); +/// Body of the clustering page. +class _ClusteringBody extends StatefulWidget { + /// Default Constructor. + const _ClusteringBody({required this.mapId}); + + /// Map ID to use for the GoogleMap. + final String? mapId; @override - Marker createMarker({ - required MarkerId markerId, - required ClusterManagerId clusterManagerId, - required LatLng position, - required InfoWindow infoWindow, - required VoidCallback onTap, - }) { - return AdvancedMarker( - markerId: markerId, + State createState() => _ClusteringBodyState(); +} + +/// State of the clustering page. +class _ClusteringBodyState extends State<_ClusteringBody> { + /// Default Constructor. + _ClusteringBodyState(); + + /// Starting point from where markers are added. + static const LatLng center = LatLng(-33.86, 151.1547171); + + /// Initial camera position. + static const CameraPosition initialCameraPosition = CameraPosition( + target: LatLng(-33.852, 151.25), + zoom: 11.0, + ); + + /// Marker offset factor for randomizing marker placing. + static const double _markerOffsetFactor = 0.05; + + /// Offset for longitude when placing markers to different cluster managers. + static const double _clusterManagerLongitudeOffset = 0.1; + + /// Maximum amount of cluster managers. + static const int _clusterManagerMaxCount = 3; + + /// Amount of markers to be added to the cluster manager at once. + static const int _markersToAddToClusterManagerCount = 10; + + /// Fully visible alpha value. + static const double _fullyVisibleAlpha = 1.0; + + /// Half visible alpha value. + static const double _halfVisibleAlpha = 0.5; + + /// Google map controller. + ExampleGoogleMapController? controller; + + /// Map of clusterManagers with identifier as the key. + Map clusterManagers = + {}; + + /// Map of markers with identifier as the key. + Map markers = {}; + + /// Id of the currently selected marker. + MarkerId? selectedMarker; + + /// Counter for added cluster manager ids. + int _clusterManagerIdCounter = 1; + + /// Counter for added markers ids. + int _markerIdCounter = 1; + + /// Cluster that was tapped most recently. + Cluster? lastCluster; + + // ignore: use_setters_to_change_properties + void _onMapCreated(ExampleGoogleMapController controller) { + this.controller = controller; + } + + void _onMarkerTapped(MarkerId markerId) { + final AdvancedMarker? tappedMarker = markers[markerId]; + if (tappedMarker != null) { + setState(() { + final MarkerId? previousMarkerId = selectedMarker; + if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { + final AdvancedMarker resetOld = + copyWithSelectedState(markers[previousMarkerId]!, false); + markers[previousMarkerId] = resetOld; + } + selectedMarker = markerId; + final AdvancedMarker newMarker = + copyWithSelectedState(tappedMarker, true); + markers[markerId] = newMarker; + }); + } + } + + void _addClusterManager() { + if (clusterManagers.length == _clusterManagerMaxCount) { + return; + } + + final String clusterManagerIdVal = + 'cluster_manager_id_$_clusterManagerIdCounter'; + _clusterManagerIdCounter++; + final ClusterManagerId clusterManagerId = + ClusterManagerId(clusterManagerIdVal); + + final ClusterManager clusterManager = ClusterManager( clusterManagerId: clusterManagerId, - position: position, - infoWindow: infoWindow, - onTap: onTap, - icon: BitmapDescriptor.pinConfig( - backgroundColor: Colors.white, - borderColor: Colors.blue, - glyph: const CircleGlyph(color: Colors.blue), - ), + onClusterTap: (Cluster cluster) => setState(() { + lastCluster = cluster; + }), ); + + setState(() { + clusterManagers[clusterManagerId] = clusterManager; + }); + _addMarkersToCluster(clusterManager); } - @override - Marker copyWithSelectedState(Marker marker, bool isSelected) { - assert(marker is AdvancedMarker); - return (marker as AdvancedMarker).copyWith( + void _removeClusterManager(ClusterManager clusterManager) { + setState(() { + // Remove markers managed by cluster manager to be removed. + markers.removeWhere((MarkerId key, AdvancedMarker marker) => + marker.clusterManagerId == clusterManager.clusterManagerId); + // Remove cluster manager. + clusterManagers.remove(clusterManager.clusterManagerId); + }); + } + + void _addMarkersToCluster(ClusterManager clusterManager) { + for (int i = 0; i < _markersToAddToClusterManagerCount; i++) { + final String markerIdVal = + '${clusterManager.clusterManagerId.value}_marker_id_$_markerIdCounter'; + _markerIdCounter++; + final MarkerId markerId = MarkerId(markerIdVal); + + final int clusterManagerIndex = + clusterManagers.values.toList().indexOf(clusterManager); + + // Add additional offset to longitude for each cluster manager to space + // out markers in different cluster managers. + final double clusterManagerLongitudeOffset = + clusterManagerIndex * _clusterManagerLongitudeOffset; + + final AdvancedMarker marker = AdvancedMarker( + markerId: markerId, + clusterManagerId: clusterManager.clusterManagerId, + position: LatLng( + center.latitude + _getRandomOffset(), + center.longitude + _getRandomOffset() + clusterManagerLongitudeOffset, + ), + infoWindow: InfoWindow(title: markerIdVal, snippet: '*'), + onTap: () => _onMarkerTapped(markerId), + icon: BitmapDescriptor.pinConfig( + backgroundColor: Colors.white, + borderColor: Colors.blue, + glyph: const CircleGlyph(color: Colors.blue), + ), + ); + markers[markerId] = marker; + } + setState(() {}); + } + + double _getRandomOffset() { + return (Random().nextDouble() - 0.5) * _markerOffsetFactor; + } + + void _remove(MarkerId markerId) { + setState(() { + if (markers.containsKey(markerId)) { + markers.remove(markerId); + } + }); + } + + void _changeMarkersAlpha() { + for (final MarkerId markerId in markers.keys) { + final AdvancedMarker marker = markers[markerId]!; + final double current = marker.alpha; + markers[markerId] = marker.copyWith( + alphaParam: current == _fullyVisibleAlpha + ? _halfVisibleAlpha + : _fullyVisibleAlpha, + ); + } + setState(() {}); + } + + /// Returns selected or unselected state of the given [marker]. + AdvancedMarker copyWithSelectedState(AdvancedMarker marker, bool isSelected) { + return marker.copyWith( iconParam: isSelected ? BitmapDescriptor.pinConfig( backgroundColor: Colors.blue, @@ -71,4 +230,78 @@ class _AdvancedMarkerClusteringBody extends ClusteringBody { ), ); } + + @override + Widget build(BuildContext context) { + final MarkerId? selectedId = selectedMarker; + return Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Expanded( + child: ExampleGoogleMap( + mapId: widget.mapId, + markerType: MarkerType.advancedMarker, + onMapCreated: _onMapCreated, + initialCameraPosition: initialCameraPosition, + markers: Set.of(markers.values), + clusterManagers: Set.of(clusterManagers.values), + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + TextButton( + onPressed: clusterManagers.length >= _clusterManagerMaxCount + ? null + : () => _addClusterManager(), + child: const Text('Add cluster manager'), + ), + TextButton( + onPressed: clusterManagers.isEmpty + ? null + : () => _removeClusterManager(clusterManagers.values.last), + child: const Text('Remove cluster manager'), + ), + ], + ), + Wrap( + alignment: WrapAlignment.spaceEvenly, + children: [ + for (final MapEntry clusterEntry + in clusterManagers.entries) + TextButton( + onPressed: () => _addMarkersToCluster(clusterEntry.value), + child: Text('Add markers to ${clusterEntry.key.value}'), + ), + ], + ), + Wrap( + alignment: WrapAlignment.spaceEvenly, + children: [ + TextButton( + onPressed: selectedId == null + ? null + : () { + _remove(selectedId); + setState(() { + selectedMarker = null; + }); + }, + child: const Text('Remove selected marker'), + ), + TextButton( + onPressed: markers.isEmpty ? null : () => _changeMarkersAlpha(), + child: const Text('Change all markers alpha'), + ), + ], + ), + if (lastCluster != null) + Padding( + padding: const EdgeInsets.all(10), + child: Text( + 'Cluster with ${lastCluster!.count} markers clicked at ${lastCluster!.position}')), + ], + ); + } } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart index c1676f41b80..ddc9a209de5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/clustering.dart @@ -18,41 +18,18 @@ class ClusteringPage extends GoogleMapExampleAppPage { @override Widget build(BuildContext context) { - return const ClusteringBody(); + return const _ClusteringBody(); } } /// Body of the clustering page. -class ClusteringBody extends StatefulWidget { +class _ClusteringBody extends StatefulWidget { /// Default Constructor. - const ClusteringBody({ - super.key, - this.mapId, - }); - - /// Map ID to use for the GoogleMap. - final String? mapId; + const _ClusteringBody(); @override State createState() => ClusteringBodyState(); - /// Creates a marker that is later added to a cluster. - Marker createMarker({ - required MarkerId markerId, - required ClusterManagerId clusterManagerId, - required LatLng position, - required InfoWindow infoWindow, - required VoidCallback onTap, - }) { - return Marker( - markerId: markerId, - clusterManagerId: clusterManagerId, - position: position, - infoWindow: infoWindow, - onTap: onTap, - ); - } - /// Returns selected or unselected state of the given [marker]. Marker copyWithSelectedState(Marker marker, bool isSelected) { return marker.copyWith( @@ -64,7 +41,7 @@ class ClusteringBody extends StatefulWidget { } /// State of the clustering page. -class ClusteringBodyState extends State { +class ClusteringBodyState extends State<_ClusteringBody> { /// Default Constructor. ClusteringBodyState(); @@ -188,7 +165,7 @@ class ClusteringBodyState extends State { final double clusterManagerLongitudeOffset = clusterManagerIndex * _clusterManagerLongitudeOffset; - final Marker marker = widget.createMarker( + final Marker marker = Marker( clusterManagerId: clusterManager.clusterManagerId, markerId: markerId, position: LatLng( @@ -237,10 +214,6 @@ class ClusteringBodyState extends State { SizedBox( height: 300.0, child: ExampleGoogleMap( - mapId: widget.mapId, - markerType: widget.mapId != null - ? MarkerType.advancedMarker - : MarkerType.marker, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.25), diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/marker_icons.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/marker_icons.dart index 6623aef686f..2c1a8d2a64d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/marker_icons.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/marker_icons.dart @@ -21,31 +21,15 @@ class MarkerIconsPage extends GoogleMapExampleAppPage { @override Widget build(BuildContext context) { - return const MarkerIconsBody(); + return const _MarkerIconsBody(); } } -class MarkerIconsBody extends StatefulWidget { - const MarkerIconsBody({super.key}); +class _MarkerIconsBody extends StatefulWidget { + const _MarkerIconsBody(); @override - State createState() => MarkerIconsBodyState(); - - /// Returns the mapId to use for the GoogleMap - String? get mapId => null; - - /// Creates a marker to be displayed on the map - Marker createMarker( - MarkerId markerId, - LatLng position, - BitmapDescriptor icon, - ) { - return Marker( - markerId: markerId, - position: position, - icon: icon, - ); - } + State createState() => _MarkerIconsBodyState(); } const LatLng _kMapCenter = LatLng(52.4478, -3.5402); @@ -58,7 +42,7 @@ enum _MarkerSizeOption { size120x60, } -class MarkerIconsBodyState extends State { +class _MarkerIconsBodyState extends State<_MarkerIconsBody> { final Size _markerAssetImageSize = const Size(48, 48); _MarkerSizeOption _currentSizeOption = _MarkerSizeOption.original; Set _markers = {}; @@ -85,10 +69,6 @@ class MarkerIconsBodyState extends State { width: 350.0, height: 300.0, child: ExampleGoogleMap( - mapId: widget.mapId, - markerType: widget.mapId != null - ? MarkerType.advancedMarker - : MarkerType.marker, initialCameraPosition: const CameraPosition( target: _kMapCenter, zoom: 7.0, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart index e36f01b0d2b..1200f68ae33 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_advanced_marker.dart @@ -2,11 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:math'; + import 'package:flutter/material.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; +import 'example_google_map.dart'; import 'page.dart'; -import 'place_marker.dart'; /// Page demonstrating how to use Advanced [Marker] class. class PlaceAdvancedMarkerPage extends GoogleMapExampleAppPage { @@ -26,41 +28,127 @@ class PlaceAdvancedMarkerPage extends GoogleMapExampleAppPage { } } -class _PlaceAdvancedMarkerBody extends PlaceMarkerBody { - const _PlaceAdvancedMarkerBody({required super.mapId}); +class _PlaceAdvancedMarkerBody extends StatefulWidget { + const _PlaceAdvancedMarkerBody({required this.mapId}); + + final String? mapId; @override State createState() => _PlaceAdvancedMarkerBodyState(); } -class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { - @override - Marker createMarker({ - required MarkerId markerId, - required LatLng position, - required InfoWindow infoWindow, - required VoidCallback onTap, - required ValueChanged? onDragStart, - required ValueChanged? onDragEnd, - required ValueChanged? onDrag, - }) { - return AdvancedMarker( +class _PlaceAdvancedMarkerBodyState extends State<_PlaceAdvancedMarkerBody> { + _PlaceAdvancedMarkerBodyState(); + static const LatLng center = LatLng(-33.86711, 151.1947171); + + ExampleGoogleMapController? controller; + Map markers = {}; + MarkerId? selectedMarker; + int _markerIdCounter = 1; + LatLng? markerPosition; + + /// Whether map supports advanced markers. Null indicates capability check + /// is in progress. + bool? _isAdvancedMarkersAvailable; + + void _onMapCreated(ExampleGoogleMapController controller) { + setState(() { + this.controller = controller; + }); + + GoogleMapsFlutterPlatform.instance + .isAdvancedMarkersAvailable(mapId: controller.mapId) + .then((bool result) { + WidgetsBinding.instance.addPostFrameCallback((_) { + setState(() { + _isAdvancedMarkersAvailable = result; + }); + }); + }); + } + + void _onMarkerTapped(MarkerId markerId) { + final AdvancedMarker? tappedMarker = markers[markerId]; + if (tappedMarker != null) { + setState(() { + final MarkerId? previousMarkerId = selectedMarker; + if (previousMarkerId != null && markers.containsKey(previousMarkerId)) { + final AdvancedMarker resetOld = + copyWithSelectedState(markers[previousMarkerId]!, false); + markers[previousMarkerId] = resetOld; + } + selectedMarker = markerId; + final AdvancedMarker newMarker = + copyWithSelectedState(tappedMarker, true); + markers[markerId] = newMarker; + + markerPosition = null; + }); + } + } + + Future _onMarkerDrag(MarkerId markerId, LatLng newPosition) async { + setState(() { + markerPosition = newPosition; + }); + } + + Future _onMarkerDragEnd(MarkerId markerId, LatLng newPosition) async { + final AdvancedMarker? tappedMarker = markers[markerId]; + if (tappedMarker != null) { + setState(() { + markerPosition = null; + }); + await showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + actions: [ + TextButton( + child: const Text('OK'), + onPressed: () => Navigator.of(context).pop(), + ) + ], + content: Padding( + padding: const EdgeInsets.symmetric(vertical: 66), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text('Old position: ${tappedMarker.position}'), + Text('New position: $newPosition'), + ], + ))); + }); + } + } + + void _add() { + final int markerCount = markers.length; + + if (markerCount == 12) { + return; + } + + final String markerIdVal = 'marker_id_$_markerIdCounter'; + _markerIdCounter++; + final MarkerId markerId = MarkerId(markerIdVal); + + final AdvancedMarker marker = AdvancedMarker( markerId: markerId, - position: position, - infoWindow: infoWindow, - onTap: onTap, - onDrag: onDrag, - onDragStart: onDragStart, - onDragEnd: onDragEnd, + position: LatLng( + center.latitude + sin(_markerIdCounter * pi / 6.0) / 20.0, + center.longitude + cos(_markerIdCounter * pi / 6.0) / 20.0, + ), icon: _getMarkerBitmapDescriptor(isSelected: false), + infoWindow: InfoWindow(title: markerIdVal, snippet: '*'), + onTap: () => _onMarkerTapped(markerId), + onDrag: (LatLng position) => _onMarkerDrag(markerId, position), + onDragEnd: (LatLng position) => _onMarkerDragEnd(markerId, position), ); - } - @override - Marker copyWithSelectedState(Marker marker, bool isSelected) { - return marker.copyWith( - iconParam: _getMarkerBitmapDescriptor(isSelected: isSelected), - ); + setState(() { + markers[markerId] = marker; + }); } BitmapDescriptor _getMarkerBitmapDescriptor({required bool isSelected}) { @@ -71,47 +159,300 @@ class _PlaceAdvancedMarkerBodyState extends PlaceMarkerBodyState { ); } - /// Whether map supports advanced markers. Null indicates capability check - /// is in progress. - bool? _isAdvancedMarkersAvailable; + void _remove(MarkerId markerId) { + setState(() { + if (markers.containsKey(markerId)) { + markers.remove(markerId); + } + }); + } - @override - Widget getHeader() { - return Padding( - padding: const EdgeInsets.all(16), - child: Text( - switch (_isAdvancedMarkersAvailable) { - null => 'Checking map capabilities…', - true => - 'Map capabilities check result:\nthis map supports advanced markers', - false => - "Map capabilities check result:\nthis map doesn't support advanced markers. Please check that map ID is provided and correct map renderer is used", - }, - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.bodyLarge?.copyWith( - color: switch (_isAdvancedMarkersAvailable) { - true => Colors.green.shade700, - false => Colors.red, - null => Colors.black, - }, - ), + void _changePosition(MarkerId markerId) { + final AdvancedMarker marker = markers[markerId]!; + final LatLng current = marker.position; + final Offset offset = Offset( + center.latitude - current.latitude, + center.longitude - current.longitude, + ); + setState(() { + markers[markerId] = marker.copyWith( + positionParam: LatLng( + center.latitude + offset.dy, + center.longitude + offset.dx, + ), + ); + }); + } + + void _changeAnchor(MarkerId markerId) { + final AdvancedMarker marker = markers[markerId]!; + final Offset currentAnchor = marker.anchor; + final Offset newAnchor = Offset(1.0 - currentAnchor.dy, currentAnchor.dx); + setState(() { + markers[markerId] = marker.copyWith( + anchorParam: newAnchor, + ); + }); + } + + Future _changeInfoAnchor(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + final Offset currentAnchor = marker.infoWindow.anchor; + final Offset newAnchor = Offset(1.0 - currentAnchor.dy, currentAnchor.dx); + setState(() { + markers[markerId] = marker.copyWith( + infoWindowParam: marker.infoWindow.copyWith( + anchorParam: newAnchor, + ), + ); + }); + } + + Future _toggleDraggable(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + setState(() { + markers[markerId] = marker.copyWith( + draggableParam: !marker.draggable, + ); + }); + } + + Future _toggleFlat(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + setState(() { + markers[markerId] = marker.copyWith( + flatParam: !marker.flat, + ); + }); + } + + Future _changeInfo(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + final String newSnippet = '${marker.infoWindow.snippet!}*'; + setState(() { + markers[markerId] = marker.copyWith( + infoWindowParam: marker.infoWindow.copyWith( + snippetParam: newSnippet, + ), + ); + }); + } + + Future _changeAlpha(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + final double current = marker.alpha; + setState(() { + markers[markerId] = marker.copyWith( + alphaParam: current < 0.1 ? 1.0 : current * 0.75, + ); + }); + } + + Future _changeRotation(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + final double current = marker.rotation; + setState(() { + markers[markerId] = marker.copyWith( + rotationParam: current == 330.0 ? 0.0 : current + 30.0, + ); + }); + } + + Future _toggleVisible(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + setState(() { + markers[markerId] = marker.copyWith( + visibleParam: !marker.visible, + ); + }); + } + + Future _changeZIndex(MarkerId markerId) async { + final AdvancedMarker marker = markers[markerId]!; + final double current = marker.zIndex; + setState(() { + markers[markerId] = marker.copyWith( + zIndexParam: current == 12.0 ? 0.0 : current + 1.0, + ); + }); + } + + void _setMarkerIcon(MarkerId markerId, BitmapDescriptor assetIcon) { + final AdvancedMarker marker = markers[markerId]!; + setState(() { + markers[markerId] = marker.copyWith( + iconParam: assetIcon, + ); + }); + } + + BitmapDescriptor _getMarkerIcon(BuildContext context) { + return BitmapDescriptor.pinConfig( + backgroundColor: Colors.red, + borderColor: Colors.red, + glyph: const TextGlyph( + text: 'Hi!', + textColor: Colors.white, ), ); } + /// Performs customizations of the [marker] to mark it as selected or not. + AdvancedMarker copyWithSelectedState(AdvancedMarker marker, bool isSelected) { + return marker.copyWith( + iconParam: _getMarkerBitmapDescriptor(isSelected: isSelected), + ); + } + @override Widget build(BuildContext context) { - // Check if map is capable of showing advanced markers. - if (controller != null) { - GoogleMapsFlutterPlatform.instance - .isAdvancedMarkersAvailable(mapId: controller!.mapId) - .then((bool result) { - setState(() { - _isAdvancedMarkersAvailable = result; - }); - }); - } - - return super.build(context); + final MarkerId? selectedId = selectedMarker; + return Stack( + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Padding( + padding: const EdgeInsets.all(16), + child: Text( + switch (_isAdvancedMarkersAvailable) { + null => 'Checking map capabilities…', + true => + 'Map capabilities check result:\nthis map supports advanced markers', + false => + "Map capabilities check result:\nthis map doesn't support advanced markers. Please check that map ID is provided and correct map renderer is used", + }, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.bodyLarge?.copyWith( + color: switch (_isAdvancedMarkersAvailable) { + true => Colors.green.shade700, + false => Colors.red, + null => Colors.black, + }, + ), + ), + ), + Expanded( + child: ExampleGoogleMap( + mapId: widget.mapId, + markerType: MarkerType.advancedMarker, + onMapCreated: _onMapCreated, + initialCameraPosition: const CameraPosition( + target: LatLng(-33.852, 151.211), + zoom: 11.0, + ), + markers: Set.of(markers.values), + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + TextButton( + onPressed: _add, + child: const Text('Add'), + ), + TextButton( + onPressed: + selectedId == null ? null : () => _remove(selectedId), + child: const Text('Remove'), + ), + ], + ), + Wrap( + alignment: WrapAlignment.spaceEvenly, + children: [ + TextButton( + onPressed: + selectedId == null ? null : () => _changeInfo(selectedId), + child: const Text('change info'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changeInfoAnchor(selectedId), + child: const Text('change info anchor'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changeAlpha(selectedId), + child: const Text('change alpha'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changeAnchor(selectedId), + child: const Text('change anchor'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _toggleDraggable(selectedId), + child: const Text('toggle draggable'), + ), + TextButton( + onPressed: + selectedId == null ? null : () => _toggleFlat(selectedId), + child: const Text('toggle flat'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changePosition(selectedId), + child: const Text('change position'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changeRotation(selectedId), + child: const Text('change rotation'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _toggleVisible(selectedId), + child: const Text('toggle visible'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => _changeZIndex(selectedId), + child: const Text('change zIndex'), + ), + TextButton( + onPressed: selectedId == null + ? null + : () => + _setMarkerIcon(selectedId, _getMarkerIcon(context)), + child: const Text('set glyph text'), + ), + ], + ), + ], + ), + Visibility( + visible: markerPosition != null, + child: Container( + color: Colors.white70, + height: 30, + padding: const EdgeInsets.only(left: 12, right: 12), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + if (markerPosition == null) + Container() + else + Expanded(child: Text('lat: ${markerPosition!.latitude}')), + if (markerPosition == null) + Container() + else + Expanded(child: Text('lng: ${markerPosition!.longitude}')), + ], + ), + ), + ), + ], + ); } } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart index 4438841db8c..2b2b9f12720 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart @@ -21,23 +21,19 @@ class PlaceMarkerPage extends GoogleMapExampleAppPage { @override Widget build(BuildContext context) { - return const PlaceMarkerBody(); + return const _PlaceMarkerBody(); } } -class PlaceMarkerBody extends StatefulWidget { - const PlaceMarkerBody({super.key, this.mapId}); - - final String? mapId; +class _PlaceMarkerBody extends StatefulWidget { + const _PlaceMarkerBody(); @override - State createState() => PlaceMarkerBodyState(); + State createState() => _PlaceMarkerBodyState(); } -typedef MarkerUpdateAction = Marker Function(Marker marker); - -class PlaceMarkerBodyState extends State { - PlaceMarkerBodyState(); +class _PlaceMarkerBodyState extends State<_PlaceMarkerBody> { + _PlaceMarkerBodyState(); static const LatLng center = LatLng(-33.86711, 151.1947171); ExampleGoogleMapController? controller; @@ -140,7 +136,7 @@ class PlaceMarkerBodyState extends State { _markerIdCounter++; final MarkerId markerId = MarkerId(markerIdVal); - final Marker marker = createMarker( + final Marker marker = Marker( markerId: markerId, position: LatLng( center.latitude + sin(_markerIdCounter * pi / 6.0) / 20.0, @@ -291,27 +287,6 @@ class PlaceMarkerBodyState extends State { return BytesMapBitmap(bytes.buffer.asUint8List()); } - /// Creates a marker with given parameters - Marker createMarker({ - required MarkerId markerId, - required LatLng position, - required InfoWindow infoWindow, - required VoidCallback onTap, - required ValueChanged? onDragStart, - required ValueChanged? onDragEnd, - required ValueChanged? onDrag, - }) { - return Marker( - markerId: markerId, - position: position, - infoWindow: infoWindow, - onTap: onTap, - onDragStart: onDragStart, - onDrag: onDrag, - onDragEnd: onDragEnd, - ); - } - /// Performs customizations of the [marker] to mark it as selected or not. Marker copyWithSelectedState(Marker marker, bool isSelected) { return marker.copyWith( @@ -321,9 +296,6 @@ class PlaceMarkerBodyState extends State { ); } - /// Returns a header to be displayed above the map. - Widget getHeader() => const SizedBox.shrink(); - @override Widget build(BuildContext context) { final MarkerId? selectedId = selectedMarker; @@ -332,12 +304,9 @@ class PlaceMarkerBodyState extends State { mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ + AdvancedMarkersCapabilityStatus(controller: controller), Expanded( child: ExampleGoogleMap( - mapId: widget.mapId, - markerType: widget.mapId != null - ? MarkerType.advancedMarker - : MarkerType.marker, onMapCreated: _onMapCreated, initialCameraPosition: const CameraPosition( target: LatLng(-33.852, 151.211), @@ -458,3 +427,62 @@ class PlaceMarkerBodyState extends State { ]); } } + +/// Widget displaying the status of advanced markers capability check. +class AdvancedMarkersCapabilityStatus extends StatefulWidget { + /// Default constructor. + const AdvancedMarkersCapabilityStatus({ + super.key, + required this.controller, + }); + + /// Controller of the map to check for advanced markers capability. + final ExampleGoogleMapController? controller; + + @override + State createState() => + _AdvancedMarkersCapabilityStatusState(); +} + +class _AdvancedMarkersCapabilityStatusState + extends State { + /// Whether map supports advanced markers. Null indicates capability check + /// is in progress. + bool? _isAdvancedMarkersAvailable; + + @override + Widget build(BuildContext context) { + if (widget.controller != null) { + GoogleMapsFlutterPlatform.instance + .isAdvancedMarkersAvailable(mapId: widget.controller!.mapId) + .then((bool result) { + WidgetsBinding.instance.addPostFrameCallback((_) { + setState(() { + _isAdvancedMarkersAvailable = result; + }); + }); + }); + } + + return Padding( + padding: const EdgeInsets.all(16), + child: Text( + switch (_isAdvancedMarkersAvailable) { + null => 'Checking map capabilities…', + true => + 'Map capabilities check result:\nthis map supports advanced markers', + false => + "Map capabilities check result:\nthis map doesn't support advanced markers. Please check that map ID is provided and correct map renderer is used", + }, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.bodyLarge?.copyWith( + color: switch (_isAdvancedMarkersAvailable) { + true => Colors.green.shade700, + false => Colors.red, + null => Colors.black, + }, + ), + ), + ); + } +} From a1edc552742731ca987f4aba9a44cc0a9025bd49 Mon Sep 17 00:00:00 2001 From: David Iglesias Teixeira Date: Tue, 4 Feb 2025 17:49:02 -0800 Subject: [PATCH 088/130] Help web integration tests pass. * Update mocks (they had drifted with the latest changes) * Make Markers/Clustering target types less specific (remove extends JSObject) so mockito can mock them. --- .../google_maps_controller_test.mocks.dart | 661 +++++++++++------- .../integration_test/overlays_test.mocks.dart | 58 +- .../lib/src/marker_clustering.dart | 5 +- .../lib/src/marker_clustering_js_interop.dart | 13 +- .../lib/src/markers.dart | 6 +- 5 files changed, 482 insertions(+), 261 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart index 0543a4ccd35..964e7450480 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.mocks.dart @@ -1,15 +1,18 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.4 from annotations // in google_maps_flutter_web_integration_tests/integration_test/google_maps_controller_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i4; +import 'dart:async' as _i6; +import 'package:google_maps/google_maps.dart' as _i4; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart' as _i3; import 'package:google_maps_flutter_web/google_maps_flutter_web.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; +import 'google_maps_controller_test.dart' as _i5; + // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters @@ -18,7 +21,6 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types @@ -26,8 +28,13 @@ import 'package:mockito/mockito.dart' as _i1; class _FakeMarkerController_0 extends _i1.SmartFake implements _i2.MarkerController { - _FakeMarkerController_0(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeMarkerController_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } /// A class which mocks [CirclesController]. @@ -35,59 +42,87 @@ class _FakeMarkerController_0 extends _i1.SmartFake /// See the documentation for Mockito's code generation for more information. class MockCirclesController extends _i1.Mock implements _i2.CirclesController { @override - Map<_i3.CircleId, _i2.CircleController> get circles => - (super.noSuchMethod( - Invocation.getter(#circles), - returnValue: <_i3.CircleId, _i2.CircleController>{}, - returnValueForMissingStub: <_i3.CircleId, _i2.CircleController>{}, - ) - as Map<_i3.CircleId, _i2.CircleController>); + Map<_i3.CircleId, _i2.CircleController> get circles => (super.noSuchMethod( + Invocation.getter(#circles), + returnValue: <_i3.CircleId, _i2.CircleController>{}, + returnValueForMissingStub: <_i3.CircleId, _i2.CircleController>{}, + ) as Map<_i3.CircleId, _i2.CircleController>); @override - set googleMap(dynamic _googleMap) => super.noSuchMethod( - Invocation.setter(#googleMap, _googleMap), - returnValueForMissingStub: null, - ); + _i4.Map get googleMap => (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); @override - int get mapId => - (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) - as int); + set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( + Invocation.setter( + #googleMap, + _googleMap, + ), + returnValueForMissingStub: null, + ); + + @override + int get mapId => (super.noSuchMethod( + Invocation.getter(#mapId), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); @override set mapId(int? _mapId) => super.noSuchMethod( - Invocation.setter(#mapId, _mapId), - returnValueForMissingStub: null, - ); + Invocation.setter( + #mapId, + _mapId, + ), + returnValueForMissingStub: null, + ); @override void addCircles(Set<_i3.Circle>? circlesToAdd) => super.noSuchMethod( - Invocation.method(#addCircles, [circlesToAdd]), - returnValueForMissingStub: null, - ); + Invocation.method( + #addCircles, + [circlesToAdd], + ), + returnValueForMissingStub: null, + ); @override void changeCircles(Set<_i3.Circle>? circlesToChange) => super.noSuchMethod( - Invocation.method(#changeCircles, [circlesToChange]), - returnValueForMissingStub: null, - ); + Invocation.method( + #changeCircles, + [circlesToChange], + ), + returnValueForMissingStub: null, + ); @override void removeCircles(Set<_i3.CircleId>? circleIdsToRemove) => super.noSuchMethod( - Invocation.method(#removeCircles, [circleIdsToRemove]), + Invocation.method( + #removeCircles, + [circleIdsToRemove], + ), returnValueForMissingStub: null, ); @override - void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( - Invocation.method(#bindToMap, [mapId, googleMap]), - returnValueForMissingStub: null, - ); + void bindToMap( + int? mapId, + _i4.Map? googleMap, + ) => + super.noSuchMethod( + Invocation.method( + #bindToMap, + [ + mapId, + googleMap, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [HeatmapsController]. @@ -96,59 +131,87 @@ class MockCirclesController extends _i1.Mock implements _i2.CirclesController { class MockHeatmapsController extends _i1.Mock implements _i2.HeatmapsController { @override - Map<_i3.HeatmapId, _i2.HeatmapController> get heatmaps => - (super.noSuchMethod( - Invocation.getter(#heatmaps), - returnValue: <_i3.HeatmapId, _i2.HeatmapController>{}, - returnValueForMissingStub: <_i3.HeatmapId, _i2.HeatmapController>{}, - ) - as Map<_i3.HeatmapId, _i2.HeatmapController>); + Map<_i3.HeatmapId, _i2.HeatmapController> get heatmaps => (super.noSuchMethod( + Invocation.getter(#heatmaps), + returnValue: <_i3.HeatmapId, _i2.HeatmapController>{}, + returnValueForMissingStub: <_i3.HeatmapId, _i2.HeatmapController>{}, + ) as Map<_i3.HeatmapId, _i2.HeatmapController>); @override - set googleMap(dynamic _googleMap) => super.noSuchMethod( - Invocation.setter(#googleMap, _googleMap), - returnValueForMissingStub: null, - ); + _i4.Map get googleMap => (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); @override - int get mapId => - (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) - as int); + set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( + Invocation.setter( + #googleMap, + _googleMap, + ), + returnValueForMissingStub: null, + ); + + @override + int get mapId => (super.noSuchMethod( + Invocation.getter(#mapId), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); @override set mapId(int? _mapId) => super.noSuchMethod( - Invocation.setter(#mapId, _mapId), - returnValueForMissingStub: null, - ); + Invocation.setter( + #mapId, + _mapId, + ), + returnValueForMissingStub: null, + ); @override void addHeatmaps(Set<_i3.Heatmap>? heatmapsToAdd) => super.noSuchMethod( - Invocation.method(#addHeatmaps, [heatmapsToAdd]), - returnValueForMissingStub: null, - ); + Invocation.method( + #addHeatmaps, + [heatmapsToAdd], + ), + returnValueForMissingStub: null, + ); @override void changeHeatmaps(Set<_i3.Heatmap>? heatmapsToChange) => super.noSuchMethod( - Invocation.method(#changeHeatmaps, [heatmapsToChange]), - returnValueForMissingStub: null, - ); + Invocation.method( + #changeHeatmaps, + [heatmapsToChange], + ), + returnValueForMissingStub: null, + ); @override void removeHeatmaps(Set<_i3.HeatmapId>? heatmapIdsToRemove) => super.noSuchMethod( - Invocation.method(#removeHeatmaps, [heatmapIdsToRemove]), + Invocation.method( + #removeHeatmaps, + [heatmapIdsToRemove], + ), returnValueForMissingStub: null, ); @override - void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( - Invocation.method(#bindToMap, [mapId, googleMap]), - returnValueForMissingStub: null, - ); + void bindToMap( + int? mapId, + _i4.Map? googleMap, + ) => + super.noSuchMethod( + Invocation.method( + #bindToMap, + [ + mapId, + googleMap, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [PolygonsController]. @@ -157,59 +220,87 @@ class MockHeatmapsController extends _i1.Mock class MockPolygonsController extends _i1.Mock implements _i2.PolygonsController { @override - Map<_i3.PolygonId, _i2.PolygonController> get polygons => - (super.noSuchMethod( - Invocation.getter(#polygons), - returnValue: <_i3.PolygonId, _i2.PolygonController>{}, - returnValueForMissingStub: <_i3.PolygonId, _i2.PolygonController>{}, - ) - as Map<_i3.PolygonId, _i2.PolygonController>); + Map<_i3.PolygonId, _i2.PolygonController> get polygons => (super.noSuchMethod( + Invocation.getter(#polygons), + returnValue: <_i3.PolygonId, _i2.PolygonController>{}, + returnValueForMissingStub: <_i3.PolygonId, _i2.PolygonController>{}, + ) as Map<_i3.PolygonId, _i2.PolygonController>); @override - set googleMap(dynamic _googleMap) => super.noSuchMethod( - Invocation.setter(#googleMap, _googleMap), - returnValueForMissingStub: null, - ); + _i4.Map get googleMap => (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); @override - int get mapId => - (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) - as int); + set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( + Invocation.setter( + #googleMap, + _googleMap, + ), + returnValueForMissingStub: null, + ); + + @override + int get mapId => (super.noSuchMethod( + Invocation.getter(#mapId), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); @override set mapId(int? _mapId) => super.noSuchMethod( - Invocation.setter(#mapId, _mapId), - returnValueForMissingStub: null, - ); + Invocation.setter( + #mapId, + _mapId, + ), + returnValueForMissingStub: null, + ); @override void addPolygons(Set<_i3.Polygon>? polygonsToAdd) => super.noSuchMethod( - Invocation.method(#addPolygons, [polygonsToAdd]), - returnValueForMissingStub: null, - ); + Invocation.method( + #addPolygons, + [polygonsToAdd], + ), + returnValueForMissingStub: null, + ); @override void changePolygons(Set<_i3.Polygon>? polygonsToChange) => super.noSuchMethod( - Invocation.method(#changePolygons, [polygonsToChange]), - returnValueForMissingStub: null, - ); + Invocation.method( + #changePolygons, + [polygonsToChange], + ), + returnValueForMissingStub: null, + ); @override void removePolygons(Set<_i3.PolygonId>? polygonIdsToRemove) => super.noSuchMethod( - Invocation.method(#removePolygons, [polygonIdsToRemove]), + Invocation.method( + #removePolygons, + [polygonIdsToRemove], + ), returnValueForMissingStub: null, ); @override - void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( - Invocation.method(#bindToMap, [mapId, googleMap]), - returnValueForMissingStub: null, - ); + void bindToMap( + int? mapId, + _i4.Map? googleMap, + ) => + super.noSuchMethod( + Invocation.method( + #bindToMap, + [ + mapId, + googleMap, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [PolylinesController]. @@ -218,61 +309,88 @@ class MockPolygonsController extends _i1.Mock class MockPolylinesController extends _i1.Mock implements _i2.PolylinesController { @override - Map<_i3.PolylineId, _i2.PolylineController> get lines => - (super.noSuchMethod( - Invocation.getter(#lines), - returnValue: <_i3.PolylineId, _i2.PolylineController>{}, - returnValueForMissingStub: - <_i3.PolylineId, _i2.PolylineController>{}, - ) - as Map<_i3.PolylineId, _i2.PolylineController>); + Map<_i3.PolylineId, _i2.PolylineController> get lines => (super.noSuchMethod( + Invocation.getter(#lines), + returnValue: <_i3.PolylineId, _i2.PolylineController>{}, + returnValueForMissingStub: <_i3.PolylineId, _i2.PolylineController>{}, + ) as Map<_i3.PolylineId, _i2.PolylineController>); @override - set googleMap(dynamic _googleMap) => super.noSuchMethod( - Invocation.setter(#googleMap, _googleMap), - returnValueForMissingStub: null, - ); + _i4.Map get googleMap => (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); @override - int get mapId => - (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) - as int); + set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( + Invocation.setter( + #googleMap, + _googleMap, + ), + returnValueForMissingStub: null, + ); + + @override + int get mapId => (super.noSuchMethod( + Invocation.getter(#mapId), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); @override set mapId(int? _mapId) => super.noSuchMethod( - Invocation.setter(#mapId, _mapId), - returnValueForMissingStub: null, - ); + Invocation.setter( + #mapId, + _mapId, + ), + returnValueForMissingStub: null, + ); @override void addPolylines(Set<_i3.Polyline>? polylinesToAdd) => super.noSuchMethod( - Invocation.method(#addPolylines, [polylinesToAdd]), - returnValueForMissingStub: null, - ); + Invocation.method( + #addPolylines, + [polylinesToAdd], + ), + returnValueForMissingStub: null, + ); @override void changePolylines(Set<_i3.Polyline>? polylinesToChange) => super.noSuchMethod( - Invocation.method(#changePolylines, [polylinesToChange]), + Invocation.method( + #changePolylines, + [polylinesToChange], + ), returnValueForMissingStub: null, ); @override void removePolylines(Set<_i3.PolylineId>? polylineIdsToRemove) => super.noSuchMethod( - Invocation.method(#removePolylines, [polylineIdsToRemove]), + Invocation.method( + #removePolylines, + [polylineIdsToRemove], + ), returnValueForMissingStub: null, ); @override - void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( - Invocation.method(#bindToMap, [mapId, googleMap]), - returnValueForMissingStub: null, - ); + void bindToMap( + int? mapId, + _i4.Map? googleMap, + ) => + super.noSuchMethod( + Invocation.method( + #bindToMap, + [ + mapId, + googleMap, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [MarkersController]. @@ -283,123 +401,161 @@ class MockMarkersController extends _i1.Mock @override Map<_i3.MarkerId, _i2.MarkerController> get markers => (super.noSuchMethod( - Invocation.getter(#markers), - returnValue: - <_i3.MarkerId, _i2.MarkerController>{}, - returnValueForMissingStub: - <_i3.MarkerId, _i2.MarkerController>{}, - ) - as Map<_i3.MarkerId, _i2.MarkerController>); + Invocation.getter(#markers), + returnValue: <_i3.MarkerId, _i2.MarkerController>{}, + returnValueForMissingStub: <_i3.MarkerId, + _i2.MarkerController>{}, + ) as Map<_i3.MarkerId, _i2.MarkerController>); @override - set googleMap(dynamic _googleMap) => super.noSuchMethod( - Invocation.setter(#googleMap, _googleMap), - returnValueForMissingStub: null, - ); + _i4.Map get googleMap => (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); @override - int get mapId => - (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) - as int); + set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( + Invocation.setter( + #googleMap, + _googleMap, + ), + returnValueForMissingStub: null, + ); + + @override + int get mapId => (super.noSuchMethod( + Invocation.getter(#mapId), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); @override set mapId(int? _mapId) => super.noSuchMethod( - Invocation.setter(#mapId, _mapId), - returnValueForMissingStub: null, - ); + Invocation.setter( + #mapId, + _mapId, + ), + returnValueForMissingStub: null, + ); @override - _i4.Future addMarkers(Set<_i3.Marker>? markersToAdd) => + _i6.Future addMarkers(Set<_i3.Marker>? markersToAdd) => (super.noSuchMethod( - Invocation.method(#addMarkers, [markersToAdd]), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) - as _i4.Future); + Invocation.method( + #addMarkers, + [markersToAdd], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i4.Future<_i2.MarkerController> createMarkerController( + _i6.Future<_i2.MarkerController> createMarkerController( _i3.Marker? marker, Object? currentMarker, dynamic gmInfoWindow, ) => (super.noSuchMethod( - Invocation.method(#createMarkerController, [ + Invocation.method( + #createMarkerController, + [ + marker, + currentMarker, + gmInfoWindow, + ], + ), + returnValue: _i6.Future<_i2.MarkerController>.value( + _FakeMarkerController_0( + this, + Invocation.method( + #createMarkerController, + [ marker, currentMarker, gmInfoWindow, - ]), - returnValue: - _i4.Future<_i2.MarkerController>.value( - _FakeMarkerController_0( - this, - Invocation.method(#createMarkerController, [ - marker, - currentMarker, - gmInfoWindow, - ]), - ), - ), - returnValueForMissingStub: - _i4.Future<_i2.MarkerController>.value( - _FakeMarkerController_0( - this, - Invocation.method(#createMarkerController, [ - marker, - currentMarker, - gmInfoWindow, - ]), - ), - ), - ) - as _i4.Future<_i2.MarkerController>); - - @override - _i4.Future changeMarkers(Set<_i3.Marker>? markersToChange) => + ], + ), + )), + returnValueForMissingStub: + _i6.Future<_i2.MarkerController>.value( + _FakeMarkerController_0( + this, + Invocation.method( + #createMarkerController, + [ + marker, + currentMarker, + gmInfoWindow, + ], + ), + )), + ) as _i6.Future<_i2.MarkerController>); + + @override + _i6.Future changeMarkers(Set<_i3.Marker>? markersToChange) => (super.noSuchMethod( - Invocation.method(#changeMarkers, [markersToChange]), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) - as _i4.Future); + Invocation.method( + #changeMarkers, + [markersToChange], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override void removeMarkers(Set<_i3.MarkerId>? markerIdsToRemove) => super.noSuchMethod( - Invocation.method(#removeMarkers, [markerIdsToRemove]), + Invocation.method( + #removeMarkers, + [markerIdsToRemove], + ), returnValueForMissingStub: null, ); @override void showMarkerInfoWindow(_i3.MarkerId? markerId) => super.noSuchMethod( - Invocation.method(#showMarkerInfoWindow, [markerId]), - returnValueForMissingStub: null, - ); + Invocation.method( + #showMarkerInfoWindow, + [markerId], + ), + returnValueForMissingStub: null, + ); @override void hideMarkerInfoWindow(_i3.MarkerId? markerId) => super.noSuchMethod( - Invocation.method(#hideMarkerInfoWindow, [markerId]), - returnValueForMissingStub: null, - ); + Invocation.method( + #hideMarkerInfoWindow, + [markerId], + ), + returnValueForMissingStub: null, + ); @override - bool isInfoWindowShown(_i3.MarkerId? markerId) => - (super.noSuchMethod( - Invocation.method(#isInfoWindowShown, [markerId]), - returnValue: false, - returnValueForMissingStub: false, - ) - as bool); + bool isInfoWindowShown(_i3.MarkerId? markerId) => (super.noSuchMethod( + Invocation.method( + #isInfoWindowShown, + [markerId], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); @override - void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( - Invocation.method(#bindToMap, [mapId, googleMap]), - returnValueForMissingStub: null, - ); + void bindToMap( + int? mapId, + _i4.Map? googleMap, + ) => + super.noSuchMethod( + Invocation.method( + #bindToMap, + [ + mapId, + googleMap, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [TileOverlaysController]. @@ -408,58 +564,91 @@ class MockMarkersController extends _i1.Mock class MockTileOverlaysController extends _i1.Mock implements _i2.TileOverlaysController { @override - set googleMap(dynamic _googleMap) => super.noSuchMethod( - Invocation.setter(#googleMap, _googleMap), - returnValueForMissingStub: null, - ); + _i4.Map get googleMap => (super.noSuchMethod( + Invocation.getter(#googleMap), + returnValue: _i5.mapShim(), + returnValueForMissingStub: _i5.mapShim(), + ) as _i4.Map); @override - int get mapId => - (super.noSuchMethod( - Invocation.getter(#mapId), - returnValue: 0, - returnValueForMissingStub: 0, - ) - as int); + set googleMap(_i4.Map? _googleMap) => super.noSuchMethod( + Invocation.setter( + #googleMap, + _googleMap, + ), + returnValueForMissingStub: null, + ); + + @override + int get mapId => (super.noSuchMethod( + Invocation.getter(#mapId), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); @override set mapId(int? _mapId) => super.noSuchMethod( - Invocation.setter(#mapId, _mapId), - returnValueForMissingStub: null, - ); + Invocation.setter( + #mapId, + _mapId, + ), + returnValueForMissingStub: null, + ); @override void addTileOverlays(Set<_i3.TileOverlay>? tileOverlaysToAdd) => super.noSuchMethod( - Invocation.method(#addTileOverlays, [tileOverlaysToAdd]), + Invocation.method( + #addTileOverlays, + [tileOverlaysToAdd], + ), returnValueForMissingStub: null, ); @override void changeTileOverlays(Set<_i3.TileOverlay>? tileOverlays) => super.noSuchMethod( - Invocation.method(#changeTileOverlays, [tileOverlays]), + Invocation.method( + #changeTileOverlays, + [tileOverlays], + ), returnValueForMissingStub: null, ); @override void removeTileOverlays(Set<_i3.TileOverlayId>? tileOverlayIds) => super.noSuchMethod( - Invocation.method(#removeTileOverlays, [tileOverlayIds]), + Invocation.method( + #removeTileOverlays, + [tileOverlayIds], + ), returnValueForMissingStub: null, ); @override void clearTileCache(_i3.TileOverlayId? tileOverlayId) => super.noSuchMethod( - Invocation.method(#clearTileCache, [tileOverlayId]), - returnValueForMissingStub: null, - ); + Invocation.method( + #clearTileCache, + [tileOverlayId], + ), + returnValueForMissingStub: null, + ); @override - void bindToMap(int? mapId, dynamic googleMap) => super.noSuchMethod( - Invocation.method(#bindToMap, [mapId, googleMap]), - returnValueForMissingStub: null, - ); + void bindToMap( + int? mapId, + _i4.Map? googleMap, + ) => + super.noSuchMethod( + Invocation.method( + #bindToMap, + [ + mapId, + googleMap, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [GroundOverlaysController]. diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlays_test.mocks.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlays_test.mocks.dart index 29d641f123b..0480e644fe1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlays_test.mocks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/overlays_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito 5.4.4 from annotations // in google_maps_flutter_web_integration_tests/integration_test/overlays_test.dart. // Do not manually edit this file. @@ -17,15 +17,19 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: must_be_immutable // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class class _FakeTile_0 extends _i1.SmartFake implements _i2.Tile { - _FakeTile_0(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeTile_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } /// A class which mocks [TileProvider]. @@ -33,15 +37,41 @@ class _FakeTile_0 extends _i1.SmartFake implements _i2.Tile { /// See the documentation for Mockito's code generation for more information. class MockTileProvider extends _i1.Mock implements _i2.TileProvider { @override - _i3.Future<_i2.Tile> getTile(int? x, int? y, int? zoom) => + _i3.Future<_i2.Tile> getTile( + int? x, + int? y, + int? zoom, + ) => (super.noSuchMethod( - Invocation.method(#getTile, [x, y, zoom]), - returnValue: _i3.Future<_i2.Tile>.value( - _FakeTile_0(this, Invocation.method(#getTile, [x, y, zoom])), - ), - returnValueForMissingStub: _i3.Future<_i2.Tile>.value( - _FakeTile_0(this, Invocation.method(#getTile, [x, y, zoom])), - ), - ) - as _i3.Future<_i2.Tile>); + Invocation.method( + #getTile, + [ + x, + y, + zoom, + ], + ), + returnValue: _i3.Future<_i2.Tile>.value(_FakeTile_0( + this, + Invocation.method( + #getTile, + [ + x, + y, + zoom, + ], + ), + )), + returnValueForMissingStub: _i3.Future<_i2.Tile>.value(_FakeTile_0( + this, + Invocation.method( + #getTile, + [ + x, + y, + zoom, + ], + ), + )), + ) as _i3.Future<_i2.Tile>); } diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart index 606403b7d76..0d3d83df4a9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering.dart @@ -17,7 +17,10 @@ import 'types.dart'; /// This class maps [ClusterManager] objects to javascript [MarkerClusterer] /// objects and provides an interface for adding and removing markers from /// clusters. -class ClusterManagersController extends GeometryController { +/// +/// [T] must extend [JSObject]. It's not specified in code because our mocking +/// framework does not support mocking JSObjects. +class ClusterManagersController extends GeometryController { /// Creates a new [ClusterManagersController] instance. /// /// The [stream] parameter is a required [StreamController] used for diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart index 797eaf6f2f3..130c0774abd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart @@ -13,7 +13,7 @@ import 'dart:js_interop'; import 'package:google_maps/google_maps.dart' as gmaps; /// A typedef representing a callback function for handling cluster tap events. -typedef ClusterClickHandler = void Function( +typedef ClusterClickHandler = void Function( gmaps.MapMouseEvent, MarkerClustererCluster, gmaps.Map, @@ -24,8 +24,7 @@ typedef ClusterClickHandler = void Function( /// See: https://googlemaps.github.io/js-markerclusterer/interfaces/MarkerClustererOptions.html @JS() @anonymous -extension type MarkerClustererOptions._(JSObject _) - implements JSObject { +extension type MarkerClustererOptions._(JSObject _) implements JSObject { /// Constructs a new [MarkerClustererOptions] object. factory MarkerClustererOptions({ gmaps.Map? map, @@ -69,8 +68,7 @@ extension type MarkerClustererOptions._(JSObject _) /// /// https://googlemaps.github.io/js-markerclusterer/classes/Cluster.html @JS('markerClusterer.Cluster') -extension type MarkerClustererCluster._(JSObject _) - implements JSObject { +extension type MarkerClustererCluster._(JSObject _) implements JSObject { /// Getter for the cluster marker. T get marker => _marker as T; @JS('marker') @@ -107,8 +105,7 @@ extension type MarkerClustererCluster._(JSObject _) /// /// https://googlemaps.github.io/js-markerclusterer/classes/MarkerClusterer.html @JS('markerClusterer.MarkerClusterer') -extension type MarkerClusterer._(JSObject _) - implements JSObject { +extension type MarkerClusterer._(JSObject _) implements JSObject { /// Constructs a new [MarkerClusterer] object. external MarkerClusterer(MarkerClustererOptions options); @@ -156,7 +153,7 @@ extension type MarkerClusterer._(JSObject _) /// Creates [MarkerClusterer] object with given [gmaps.Map] and /// [ClusterClickHandler]. -MarkerClusterer createMarkerClusterer( +MarkerClusterer createMarkerClusterer( gmaps.Map map, ClusterClickHandler onClusterClickHandler) { final MarkerClustererOptions options = MarkerClustererOptions( map: map, diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart index 2f414333dc8..d4a123514f3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart @@ -10,8 +10,10 @@ part of '../google_maps_flutter_web.dart'; /// legacy [gmaps.Marker] class. /// * [AdvancedMarkersController] implements the [MarkersController] for the /// advanced [gmaps.AdvancedMarkerElement] class. -abstract class MarkersController - extends GeometryController { +/// +/// [T] must extend [JSObject]. It's not specified in code because our mocking +/// framework does not support mocking JSObjects. +abstract class MarkersController extends GeometryController { /// Initialize the cache. The [StreamController] comes from the [GoogleMapController], and is shared with other controllers. MarkersController({ required StreamController> stream, From 11a0cabd815ef91fba82201d03a8dcd475d11a58 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 5 Feb 2025 11:45:19 +0200 Subject: [PATCH 089/130] Convert marker to options before calling createMarkerController --- .../lib/src/markers.dart | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart index d4a123514f3..b4599bbecfa 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/markers.dart @@ -63,15 +63,23 @@ abstract class MarkersController extends GeometryController { final MarkerController? markerController = _markerIdToController[marker.markerId]; final T? currentMarker = markerController?.marker; + final O markerOptions = + await _markerOptionsFromMarker(marker, currentMarker); final MarkerController controller = - await createMarkerController(marker, currentMarker, gmInfoWindow); + await createMarkerController(marker, markerOptions, gmInfoWindow); _markerIdToController[marker.markerId] = controller; } - /// Creates a [MarkerController] for a [Marker] object. + /// Creates a [MarkerController] for the given [marker]. + /// + /// [markerOptions] contains configuration that should be used to create + /// a [gmaps.Marker] or [gmaps.AdvancedMarkerElement] object. [markersOptions] + /// is either [gmaps.MarkerOptions] or [gmaps.AdvancedMarkerElementOptions]. + /// + /// [gmInfoWindow] is marker's info window to show on tap. Future> createMarkerController( Marker marker, - T? currentMarker, + O markerOptions, gmaps.InfoWindow? gmInfoWindow, ); @@ -212,13 +220,9 @@ class LegacyMarkersController @override Future createMarkerController( Marker marker, - gmaps.Marker? currentMarker, + gmaps.MarkerOptions markerOptions, gmaps.InfoWindow? gmInfoWindow, ) async { - final gmaps.MarkerOptions markerOptions = - await _markerOptionsFromMarker( - marker, currentMarker); - final gmaps.Marker gmMarker = gmaps.Marker(markerOptions); gmMarker.set('markerId', marker.markerId.value.toJS); @@ -263,13 +267,11 @@ class AdvancedMarkersController extends MarkersController< @override Future createMarkerController( Marker marker, - gmaps.AdvancedMarkerElement? currentMarker, + gmaps.AdvancedMarkerElementOptions markerOptions, gmaps.InfoWindow? gmInfoWindow, ) async { assert(marker is AdvancedMarker, 'Marker must be an AdvancedMarker.'); - final gmaps.AdvancedMarkerElementOptions markerOptions = - await _markerOptionsFromMarker(marker, currentMarker); final gmaps.AdvancedMarkerElement gmMarker = gmaps.AdvancedMarkerElement(markerOptions); gmMarker.setAttribute('id', marker.markerId.value); From 80bce38c5792cd9e61f1c3f39923a06dd4fd6e61 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 5 Feb 2025 12:03:49 +0200 Subject: [PATCH 090/130] Fix unit tests --- .../google_maps_flutter_android_test.dart | 8 +++++++- .../test/types/bitmap_test.dart | 19 ++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart index b77cfa3ee09..1eda4ef1055 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart @@ -1425,7 +1425,7 @@ void main() { }); test( - 'Correct marker type is padded to platform view', + 'Correct marker type is passed to platform view', () async { final GoogleMapsFlutterAndroid maps = GoogleMapsFlutterAndroid(); final Widget widget = maps.buildViewWithConfiguration( @@ -1435,6 +1435,9 @@ void main() { initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, ), + mapConfiguration: const MapConfiguration( + markerType: MarkerType.advancedMarker, + ), ); expect(widget, isA()); @@ -1454,6 +1457,9 @@ void main() { initialCameraPosition: CameraPosition(target: LatLng(0, 0), zoom: 1), textDirection: TextDirection.ltr, ), + mapConfiguration: const MapConfiguration( + markerType: MarkerType.marker, + ), ); expect(widget2, isA()); expect( diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart index b9258256585..fb8875d4999 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/bitmap_test.dart @@ -722,8 +722,13 @@ void main() { { 'backgroundColor': Colors.green.value, 'borderColor': Colors.blue.value, - 'glyphText': 'Hello', - 'glyphTextColor': Colors.red.value, + 'glyph': [ + 'textGlyph', + { + 'text': 'Hello', + 'textColor': Colors.red.value, + } + ], }, ], ); @@ -744,9 +749,17 @@ void main() { [ PinConfig.type, { + 'glyph': [ + 'bitmapGlyph', + { + 'bitmap': [ + 'fromAsset', + 'red_square.png', + ], + }, + ], 'backgroundColor': Colors.black.value, 'borderColor': Colors.red.value, - 'glyphBitmapDescriptor': bitmap.toJson(), }, ], ); From 68af80c608cf37171aac2240a67710902dd299b8 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 5 Feb 2025 12:21:40 +0200 Subject: [PATCH 091/130] Reformat code --- .../flutter/plugins/googlemaps/GoogleMapFactory.java | 3 ++- .../ios/Classes/GoogleMapController.m | 2 +- .../ios/Classes/GoogleMapMarkerController.m | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java index ff1352955e3..ab4d4013cb7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapFactory.java @@ -53,6 +53,7 @@ public PlatformView create(@NonNull Context context, int id, @Nullable Object ar builder.setMapId(mapId); } - return builder.build(id, context, binaryMessenger, lifecycleProvider, mapConfig.getMarkerType()); + return builder.build( + id, context, binaryMessenger, lifecycleProvider, mapConfig.getMarkerType()); } } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m index 3aff84a98d7..64eb54ee088 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m @@ -162,7 +162,7 @@ - (instancetype)initWithMapView:(GMSMapView *_Nonnull)mapView NSString *pigeonSuffix = [NSString stringWithFormat:@"%lld", viewId]; _dartCallbackHandler = [[FGMMapsCallbackApi alloc] initWithBinaryMessenger:registrar.messenger messageChannelSuffix:pigeonSuffix]; - FGMPlatformMarkerTypeBox* markerType = creationParameters.mapConfiguration.markerType; + FGMPlatformMarkerTypeBox *markerType = creationParameters.mapConfiguration.markerType; _mapView.delegate = self; _mapView.paddingAdjustmentBehavior = kGMSMapViewPaddingAdjustmentBehaviorNever; _registrar = registrar; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m index 1bbe731d676..36adc638c17 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m @@ -126,11 +126,11 @@ - (void)setZIndex:(int)zIndex { // [self setCollisionBehavior:platformMarker.collisionBehavior]; //} // -- (void)setCollisionBehavior:(FGMMarkerCollisionBehaviorBox*)collisionBehavior { - if ([self.marker isKindOfClass:[GMSAdvancedMarker class]]) { - GMSCollisionBehavior collitionBehaviorValue = (GMSCollisionBehavior)collisionBehavior.value; - [(GMSAdvancedMarker *)self.marker setCollisionBehavior:(collitionBehaviorValue)]; - } +- (void)setCollisionBehavior:(FGMMarkerCollisionBehaviorBox *)collisionBehavior { + if ([self.marker isKindOfClass:[GMSAdvancedMarker class]]) { + GMSCollisionBehavior collitionBehaviorValue = (GMSCollisionBehavior)collisionBehavior.value; + [(GMSAdvancedMarker *)self.marker setCollisionBehavior:(collitionBehaviorValue)]; + } } - (void)updateFromPlatformMarker:(FGMPlatformMarker *)platformMarker From c2c402163cd0d266c33ded711b6bcf1d3ad9b73a Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 5 Feb 2025 12:47:41 +0200 Subject: [PATCH 092/130] Update excerpts --- packages/google_maps_flutter/google_maps_flutter/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/README.md b/packages/google_maps_flutter/google_maps_flutter/README.md index 3ee84287a6c..3f92ceb1fc5 100644 --- a/packages/google_maps_flutter/google_maps_flutter/README.md +++ b/packages/google_maps_flutter/google_maps_flutter/README.md @@ -129,7 +129,7 @@ body: GoogleMap( // Set your Map ID. mapId: 'my-map-id', - // // Enable support for Advanced Markers. + // Enable support for Advanced Markers. markerType: GoogleMapMarkerType.advancedMarker, ``` From ee690ceecf1e913e63699be70db86239aa1966af Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 5 Feb 2025 13:25:35 +0200 Subject: [PATCH 093/130] Fix iOS tests --- .../ios/RunnerTests/FGMClusterManagersControllerTests.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/FGMClusterManagersControllerTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/FGMClusterManagersControllerTests.m index 44305bfcdcd..78a29e58c54 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/FGMClusterManagersControllerTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/FGMClusterManagersControllerTests.m @@ -72,7 +72,8 @@ - (void)testClustering { visible:YES zIndex:1 markerId:markerId1 - clusterManagerId:clusterManagerId]; + clusterManagerId:clusterManagerId + collisionBehavior:NULL]; FGMPlatformMarker *marker2 = [FGMPlatformMarker makeWithAlpha:1 anchor:zeroPoint consumeTapEvents:NO @@ -85,7 +86,8 @@ - (void)testClustering { visible:YES zIndex:1 markerId:markerId2 - clusterManagerId:clusterManagerId]; + clusterManagerId:clusterManagerId + collisionBehavior:NULL]; [markersController addMarkers:@[ marker1, marker2 ]]; From 75e7b2f77e63cf0d334d58b42e9a4e68400e61ea Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 12 Feb 2025 13:12:19 +0200 Subject: [PATCH 094/130] Fix README example --- packages/google_maps_flutter/google_maps_flutter/README.md | 3 ++- .../example/lib/readme_sample_advanced_markers.dart | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/README.md b/packages/google_maps_flutter/google_maps_flutter/README.md index 3f92ceb1fc5..98ed72a7fec 100644 --- a/packages/google_maps_flutter/google_maps_flutter/README.md +++ b/packages/google_maps_flutter/google_maps_flutter/README.md @@ -128,9 +128,10 @@ required in order to use Advanced Markers: body: GoogleMap( // Set your Map ID. mapId: 'my-map-id', - // Enable support for Advanced Markers. markerType: GoogleMapMarkerType.advancedMarker, + initialCameraPosition: _kGooglePlex, +), ``` ### Sample Usage diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart index a0b1044569d..c67473ae5b6 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/readme_sample_advanced_markers.dart @@ -36,12 +36,11 @@ class AdvancedMarkersSample extends StatelessWidget { body: GoogleMap( // Set your Map ID. mapId: 'my-map-id', - // Enable support for Advanced Markers. markerType: GoogleMapMarkerType.advancedMarker, -// #enddocregion AdvancedMarkersSample initialCameraPosition: _kGooglePlex, ), +// #enddocregion AdvancedMarkersSample ); } } From 9ee8857445022f6968390496cc623c0bad642d00 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 12 Feb 2025 13:16:33 +0200 Subject: [PATCH 095/130] Fix force unwrap in advanced markers clustering example --- .../example/lib/advanced_markers_clustering.dart | 10 +++++++--- .../example/lib/advanced_markers_clustering.dart | 10 +++++++--- .../lib/advanced_markers_clustering.dart | 10 +++++++--- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart index 45168c81bbd..18efca7b644 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/advanced_markers_clustering.dart @@ -232,6 +232,8 @@ class _ClusteringBodyState extends State<_ClusteringBody> { @override Widget build(BuildContext context) { final MarkerId? selectedId = selectedMarker; + final Cluster? lastCluster = this.lastCluster; + return Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ @@ -301,9 +303,11 @@ class _ClusteringBodyState extends State<_ClusteringBody> { ), if (lastCluster != null) Padding( - padding: const EdgeInsets.all(10), - child: Text( - 'Cluster with ${lastCluster!.count} markers clicked at ${lastCluster!.position}')), + padding: const EdgeInsets.all(10), + child: Text( + 'Cluster with ${lastCluster.count} markers clicked at ${lastCluster.position}', + ), + ), ]), ], ); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart index 53764a3cf2b..6a483e272f6 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/advanced_markers_clustering.dart @@ -237,6 +237,8 @@ class _ClusteringBodyState extends State<_ClusteringBody> { @override Widget build(BuildContext context) { final MarkerId? selectedId = selectedMarker; + final Cluster? lastCluster = this.lastCluster; + return Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.stretch, @@ -302,9 +304,11 @@ class _ClusteringBodyState extends State<_ClusteringBody> { ), if (lastCluster != null) Padding( - padding: const EdgeInsets.all(10), - child: Text( - 'Cluster with ${lastCluster!.count} markers clicked at ${lastCluster!.position}')), + padding: const EdgeInsets.all(10), + child: Text( + 'Cluster with ${lastCluster.count} markers clicked at ${lastCluster.position}', + ), + ), ], ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart index 78921ef3947..542cee61b94 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/advanced_markers_clustering.dart @@ -234,6 +234,8 @@ class _ClusteringBodyState extends State<_ClusteringBody> { @override Widget build(BuildContext context) { final MarkerId? selectedId = selectedMarker; + final Cluster? lastCluster = this.lastCluster; + return Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.stretch, @@ -298,9 +300,11 @@ class _ClusteringBodyState extends State<_ClusteringBody> { ), if (lastCluster != null) Padding( - padding: const EdgeInsets.all(10), - child: Text( - 'Cluster with ${lastCluster!.count} markers clicked at ${lastCluster!.position}')), + padding: const EdgeInsets.all(10), + child: Text( + 'Cluster with ${lastCluster.count} markers clicked at ${lastCluster.position}', + ), + ), ], ); } From 3a28f2ef0064b03ca1f50a7c185cab3226611cd7 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 12 Feb 2025 13:17:09 +0200 Subject: [PATCH 096/130] Clean up imports --- .../google_maps_flutter/lib/google_maps_flutter.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart index 93296b8d855..d24f6f0995f 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart @@ -9,7 +9,6 @@ import 'dart:async'; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:google_maps_flutter_android/google_maps_flutter_android.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; From b283e3e4df61047339629bcc3fd59373a5c181ab Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 12 Feb 2025 14:40:44 +0200 Subject: [PATCH 097/130] Add missing comment --- .../google_maps_flutter_android/pigeons/messages.dart | 1 + .../google_maps_flutter_ios/pigeons/messages.dart | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart index b60e11f074e..ff1df0e3af6 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart @@ -639,6 +639,7 @@ class PlatformBitmapBytesMap { final double? height; } +/// Pigeon equivalent of [PinConfig]. class PlatformBitmapPinConfig { PlatformBitmapPinConfig({ required this.backgroundColor, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index 7050a4b7847..c86799bfae4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -594,6 +594,7 @@ enum PlatformMapBitmapScaling { none, } +/// Pigeon equivalent of [PinConfig]. class PlatformBitmapPinConfig { PlatformBitmapPinConfig({ required this.backgroundColor, From 31c94c57fe73d2d34ac00053770710beaf5529f7 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 12 Feb 2025 14:41:06 +0200 Subject: [PATCH 098/130] Remove commented code --- .../ios/Classes/GoogleMapMarkerController.m | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m index 36adc638c17..713b756d8c8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m @@ -107,25 +107,6 @@ - (void)setZIndex:(int)zIndex { self.marker.zIndex = zIndex; } -//- (void)updateFromPlatformMarker:(FGMPlatformMarker *)platformMarker -// registrar:(NSObject *)registrar -// screenScale:(CGFloat)screenScale { -// [self setAlpha:platformMarker.alpha]; -// [self setAnchor:FGMGetCGPointForPigeonPoint(platformMarker.anchor)]; -// [self setDraggable:platformMarker.draggable]; -// UIImage *image = [self iconFromBitmap:platformMarker.icon -// registrar:registrar -// screenScale:screenScale]; -// [self setIcon:image]; -// [self setFlat:platformMarker.flat]; -// [self setConsumeTapEvents:platformMarker.consumeTapEvents]; -// [self setPosition:FGMGetCoordinateForPigeonLatLng(platformMarker.position)]; -// [self setRotation:platformMarker.rotation]; -// [self setVisible:platformMarker.visible]; -// [self setZIndex:platformMarker.zIndex]; -// [self setCollisionBehavior:platformMarker.collisionBehavior]; -//} -// - (void)setCollisionBehavior:(FGMMarkerCollisionBehaviorBox *)collisionBehavior { if ([self.marker isKindOfClass:[GMSAdvancedMarker class]]) { GMSCollisionBehavior collitionBehaviorValue = (GMSCollisionBehavior)collisionBehavior.value; From 1c2cdf7a0c7f999ab8585b497e4a43b616b5b5fd Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 12 Feb 2025 14:41:35 +0200 Subject: [PATCH 099/130] Fix how bool is returned --- .../google_maps_flutter_ios/ios/Classes/GoogleMapController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m index 64eb54ee088..72d34b5b8a5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m @@ -738,7 +738,7 @@ - (nullable NSNumber *)isAdvancedMarkersAvailable: NSUInteger advancedMarkerFlag = self.controller.mapView.mapCapabilities & GMSMapCapabilityFlagsAdvancedMarkers; BOOL boolValue = advancedMarkerFlag != 0; - return [NSNumber numberWithBool:boolValue]; + return [NSNumber numberWithBool:(advancedMarkerFlag != 0)]; } @end From db77f2c8adc66cbfafe151e1d991211aff504d18 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 13 Feb 2025 09:50:14 +0200 Subject: [PATCH 100/130] Remove _platformMarkerTypeFromIndex --- .../lib/src/google_maps_flutter_android.dart | 10 +--------- .../lib/src/google_maps_flutter_ios.dart | 10 +--------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index 63ccd2983c8..7e55c52d051 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -1358,7 +1358,7 @@ PlatformMapConfiguration _platformMapConfigurationFromOptionsJson( trafficEnabled: options['trafficEnabled'] as bool?, buildingsEnabled: options['buildingsEnabled'] as bool?, liteModeEnabled: options['liteModeEnabled'] as bool?, - markerType: _platformMarkerTypeFromIndex(options['markerType'] as int?), + markerType: PlatformMarkerType.marker, mapId: options['mapId'] as String?, style: options['style'] as String?, ); @@ -1426,14 +1426,6 @@ PlatformZoomRange? _platformZoomRangeFromMinMaxZoomPreferenceJson( return PlatformZoomRange(min: minMaxZoom[0], max: minMaxZoom[1]); } -PlatformMarkerType _platformMarkerTypeFromIndex(int? index) { - return switch (index) { - 0 => PlatformMarkerType.marker, - 1 => PlatformMarkerType.advancedMarker, - _ => PlatformMarkerType.marker, - }; -} - /// Converts platform interface's JointType to Pigeon's PlatformJointType. @visibleForTesting PlatformJointType platformJointTypeFromJointType(JointType jointType) { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index 609c825ca2a..8ae82cfa78a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -1221,7 +1221,7 @@ PlatformMapConfiguration _platformMapConfigurationFromOptionsJson( indoorViewEnabled: options['indoorEnabled'] as bool?, trafficEnabled: options['trafficEnabled'] as bool?, buildingsEnabled: options['buildingsEnabled'] as bool?, - markerType: _platformMarkerTypeFromIndex(options['markerType'] as int?), + markerType: PlatformMarkerType.marker, mapId: options['mapId'] as String?, style: options['style'] as String?, ); @@ -1289,14 +1289,6 @@ PlatformZoomRange? _platformZoomRangeFromMinMaxZoomPreferenceJson( return PlatformZoomRange(min: minMaxZoom[0], max: minMaxZoom[1]); } -PlatformMarkerType _platformMarkerTypeFromIndex(int? index) { - return switch (index) { - 0 => PlatformMarkerType.marker, - 1 => PlatformMarkerType.advancedMarker, - _ => PlatformMarkerType.marker, - }; -} - /// Converts platform interface's JointType to Pigeon's PlatformJointType. @visibleForTesting PlatformJointType platformJointTypeFromJointType(JointType jointType) { From a8efceb9c6d3cff0d971b645233d2b2211c555ff Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 13 Feb 2025 10:23:32 +0200 Subject: [PATCH 101/130] Update comment --- .../flutter/plugins/googlemaps/ClusterManagersController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java index faf37f7f3fb..e6e5c91dea7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java @@ -107,8 +107,8 @@ void addClusterManager(String clusterManagerId) { } /** - * Initializes cluster renderer if it hasn't been initialized before. ClusterManager uses default - * renderer which should be changed to (legacy) renderer or advanced renderer. + * Initializes cluster renderer based on marker type. AdvancedMarkerCluster renderer is used + * for advanced markers and MarkerClusterRenderer is used for default markers. */ private void initializeRenderer(ClusterManager clusterManager) { final ClusterRenderer renderer = clusterManager.getRenderer(); From 0787c4c9e24d69582c8dadbf6f4e6e52b2c1127f Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 13 Feb 2025 11:05:52 +0200 Subject: [PATCH 102/130] Add mapId/cloudMapId assertion --- .../lib/src/google_map.dart | 8 ++- .../test/google_map_test.dart | 68 +++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index bc6f027ad6a..6f7494aa982 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -141,7 +141,13 @@ class GoogleMap extends StatefulWidget { String? mapId, @Deprecated('cloudMapId is deprecated. Use mapId instead.') String? cloudMapId, - }) : mapId = mapId ?? cloudMapId; + }) : assert( + (mapId == null && cloudMapId == null) || + (mapId != null && cloudMapId == null) || + (mapId == null && cloudMapId != null), + '''A value may be provided for either mapId or cloudMapId, or neither, but not for both.''', + ), + mapId = mapId ?? cloudMapId; /// Callback method for when the map is ready to be used. /// diff --git a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart index 9276a7dbda3..99e9d425dcf 100644 --- a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart @@ -579,4 +579,72 @@ void main() { expect(map.mapConfiguration.style, ''); }); + + testWidgets( + 'Providing both mapId and cloudMapId throws an exception', + (WidgetTester tester) async { + expect( + () { + GoogleMap( + initialCameraPosition: const CameraPosition( + target: LatLng(10.0, 15.0), + ), + mapId: 'mapId', + cloudMapId: 'cloudMapId', + ); + }, + throwsAssertionError, + ); + }, + ); + + testWidgets( + "Providing mapId doesn't thrown an exception", + (WidgetTester tester) async { + expect( + () { + const GoogleMap( + initialCameraPosition: CameraPosition( + target: LatLng(10.0, 15.0), + ), + mapId: 'mapId', + ); + }, + returnsNormally, + ); + }, + ); + + testWidgets( + "Providing cloudMapid doesn't thrown an exception", + (WidgetTester tester) async { + expect( + () { + const GoogleMap( + initialCameraPosition: CameraPosition( + target: LatLng(10.0, 15.0), + ), + cloudMapId: 'cloudMapId', + ); + }, + returnsNormally, + ); + }, + ); + + testWidgets( + "Not setting cloudMapid and mapId doesn't thrown an exception", + (WidgetTester tester) async { + expect( + () { + const GoogleMap( + initialCameraPosition: CameraPosition( + target: LatLng(10.0, 15.0), + ), + ); + }, + returnsNormally, + ); + }, + ); } From 1c6129591e37659b8b514e9fedaa10c71b9d47b3 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 14 Feb 2025 09:25:27 +0200 Subject: [PATCH 103/130] Add more unit tests for marker type and map ID --- .../lib/src/google_map.dart | 4 +- .../test/google_map_test.dart | 129 ++++++++++++++++++ 2 files changed, 132 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index 6f7494aa982..3c3c6dad796 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -711,7 +711,9 @@ MapConfiguration _configurationFromMapWidget(GoogleMap map) { trafficEnabled: map.trafficEnabled, buildingsEnabled: map.buildingsEnabled, markerType: mapConfigurationMarkerType, - mapId: map.mapId, + // A null mapId in the widget means no map ID, which is expressed as '' in + // the configuration to distinguish from no change (null). + mapId: map.mapId ?? '', // A null style in the widget means no style, which is expressed as '' in // the configuration to distinguish from no change (null). style: map.style ?? '', diff --git a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart index 99e9d425dcf..cb2e9f69201 100644 --- a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart @@ -580,6 +580,135 @@ void main() { expect(map.mapConfiguration.style, ''); }); + testWidgets('Default markerType is "marker"', (WidgetTester tester) async { + await tester.pumpWidget( + const Directionality( + textDirection: TextDirection.ltr, + child: GoogleMap( + initialCameraPosition: CameraPosition(target: LatLng(10.0, 15.0)), + ), + ), + ); + + final PlatformMapStateRecorder map = platform.lastCreatedMap; + expect(map.mapConfiguration.markerType, MarkerType.marker); + }); + + testWidgets('Can update markerType', (WidgetTester tester) async { + await tester.pumpWidget( + const Directionality( + textDirection: TextDirection.ltr, + child: GoogleMap( + initialCameraPosition: CameraPosition(target: LatLng(10.0, 15.0)), + // ignore: avoid_redundant_argument_values + markerType: GoogleMapMarkerType.marker, + ), + ), + ); + + final PlatformMapStateRecorder map = platform.lastCreatedMap; + expect(map.mapConfiguration.markerType, MarkerType.marker); + + await tester.pumpWidget( + const Directionality( + textDirection: TextDirection.ltr, + child: GoogleMap( + initialCameraPosition: CameraPosition(target: LatLng(10.0, 15.0)), + markerType: GoogleMapMarkerType.advancedMarker, + ), + ), + ); + expect(map.mapConfiguration.markerType, MarkerType.advancedMarker); + + await tester.pumpWidget( + const Directionality( + textDirection: TextDirection.ltr, + child: GoogleMap( + initialCameraPosition: CameraPosition(target: LatLng(10.0, 15.0)), + ), + ), + ); + expect(map.mapConfiguration.markerType, MarkerType.marker); + }); + + testWidgets('Can update mapId', (WidgetTester tester) async { + await tester.pumpWidget( + const Directionality( + textDirection: TextDirection.ltr, + child: GoogleMap( + initialCameraPosition: CameraPosition(target: LatLng(10.0, 15.0)), + mapId: 'myMapId', + ), + ), + ); + + final PlatformMapStateRecorder map = platform.lastCreatedMap; + expect(map.mapConfiguration.mapId, 'myMapId'); + expect(map.mapConfiguration.cloudMapId, 'myMapId'); + + await tester.pumpWidget( + const Directionality( + textDirection: TextDirection.ltr, + child: GoogleMap( + initialCameraPosition: CameraPosition(target: LatLng(10.0, 15.0)), + mapId: 'myNewMapId', + ), + ), + ); + expect(map.mapConfiguration.mapId, 'myNewMapId'); + expect(map.mapConfiguration.cloudMapId, 'myNewMapId'); + + await tester.pumpWidget( + const Directionality( + textDirection: TextDirection.ltr, + child: GoogleMap( + initialCameraPosition: CameraPosition(target: LatLng(10.0, 15.0)), + ), + ), + ); + expect(map.mapConfiguration.mapId, ''); + expect(map.mapConfiguration.cloudMapId, ''); + }); + + testWidgets('Can update cloudMapId', (WidgetTester tester) async { + await tester.pumpWidget( + const Directionality( + textDirection: TextDirection.ltr, + child: GoogleMap( + initialCameraPosition: CameraPosition(target: LatLng(10.0, 15.0)), + cloudMapId: 'myCloudMapId', + ), + ), + ); + + final PlatformMapStateRecorder map = platform.lastCreatedMap; + expect(map.mapConfiguration.cloudMapId, 'myCloudMapId'); + expect(map.mapConfiguration.mapId, 'myCloudMapId'); + + await tester.pumpWidget( + const Directionality( + textDirection: TextDirection.ltr, + child: GoogleMap( + initialCameraPosition: CameraPosition(target: LatLng(10.0, 15.0)), + cloudMapId: 'myNewCloudMapId', + ), + ), + ); + expect(map.mapConfiguration.cloudMapId, 'myNewCloudMapId'); + expect(map.mapConfiguration.mapId, 'myNewCloudMapId'); + + await tester.pumpWidget( + const Directionality( + textDirection: TextDirection.ltr, + child: GoogleMap( + initialCameraPosition: CameraPosition(target: LatLng(10.0, 15.0)), + ), + ), + ); + expect(map.mapConfiguration.cloudMapId, ''); + expect(map.mapConfiguration.mapId, ''); + }); + testWidgets( 'Providing both mapId and cloudMapId throws an exception', (WidgetTester tester) async { From 019e7e016d5e7d5e07737a645dd2f2452035f1bb Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 14 Feb 2025 09:41:20 +0200 Subject: [PATCH 104/130] Reformat code --- .../flutter/plugins/googlemaps/ClusterManagersController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java index e6e5c91dea7..ac63306979c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/ClusterManagersController.java @@ -107,8 +107,8 @@ void addClusterManager(String clusterManagerId) { } /** - * Initializes cluster renderer based on marker type. AdvancedMarkerCluster renderer is used - * for advanced markers and MarkerClusterRenderer is used for default markers. + * Initializes cluster renderer based on marker type. AdvancedMarkerCluster renderer is used for + * advanced markers and MarkerClusterRenderer is used for default markers. */ private void initializeRenderer(ClusterManager clusterManager) { final ClusterRenderer renderer = clusterManager.getRenderer(); From 4655a38357f378849940712817272cce40278d0c Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 14 Feb 2025 09:56:27 +0200 Subject: [PATCH 105/130] Remove unused variable --- .../google_maps_flutter_ios/ios/Classes/GoogleMapController.m | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m index 72d34b5b8a5..ee32149a8bb 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapController.m @@ -737,7 +737,6 @@ - (nullable NSNumber *)isAdvancedMarkersAvailable: (FlutterError *_Nullable __autoreleasing *_Nonnull)error { NSUInteger advancedMarkerFlag = self.controller.mapView.mapCapabilities & GMSMapCapabilityFlagsAdvancedMarkers; - BOOL boolValue = advancedMarkerFlag != 0; return [NSNumber numberWithBool:(advancedMarkerFlag != 0)]; } From 93a7ad7f42c3e19fde77d8b1abcb5ae17fa845c4 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 14 Feb 2025 10:14:51 +0200 Subject: [PATCH 106/130] Simplify assertion --- .../google_maps_flutter/lib/src/google_map.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index 3c3c6dad796..0aaece1c735 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -142,9 +142,7 @@ class GoogleMap extends StatefulWidget { @Deprecated('cloudMapId is deprecated. Use mapId instead.') String? cloudMapId, }) : assert( - (mapId == null && cloudMapId == null) || - (mapId != null && cloudMapId == null) || - (mapId == null && cloudMapId != null), + mapId == null || cloudMapId == null, '''A value may be provided for either mapId or cloudMapId, or neither, but not for both.''', ), mapId = mapId ?? cloudMapId; From d65f9fa067b90f80603740c56eace2d963fa112a Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 11 Apr 2025 13:37:16 +0300 Subject: [PATCH 107/130] Fix rebase issues --- .../integration_test/src/maps_controller.dart | 2 +- .../example/integration_test/src/shared.dart | 2 +- .../flutter/plugins/googlemaps/Messages.java | 2069 +++++++---------- .../example/lib/example_google_map.dart | 2 +- .../lib/src/google_maps_flutter_android.dart | 1 - .../lib/src/messages.g.dart | 935 ++++---- .../pigeons/messages.dart | 2 - ...oogle_maps_flutter_android_test.mocks.dart | 277 ++- .../lib/example_google_map.dart | 241 +- .../ios/Classes/messages.g.h | 781 +++---- .../ios/Classes/messages.g.m | 2012 +++++++--------- .../lib/src/google_maps_flutter_ios.dart | 5 - .../lib/src/messages.g.dart | 889 ++++--- .../pigeons/messages.dart | 2 - .../lib/src/types/types.dart | 1 - .../map_configuration_serialization_test.dart | 10 +- .../google_maps_controller_test.dart | 6 +- .../lib/src/convert.dart | 18 +- .../lib/src/google_maps_controller.dart | 2 +- .../lib/src/google_maps_inspector_web.dart | 2 +- 20 files changed, 3383 insertions(+), 3876 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/integration_test/src/maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter/example/integration_test/src/maps_controller.dart index d44aa4d341e..3b1a226120b 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/integration_test/src/maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/integration_test/src/maps_controller.dart @@ -562,7 +562,7 @@ void runTests() { onMapCreated: (GoogleMapController controller) { mapIdCompleter.complete(controller.mapId); }, - cloudMapId: kCloudMapId, + cloudMapId: kMapId, ), ); await tester.pumpAndSettle(); diff --git a/packages/google_maps_flutter/google_maps_flutter/example/integration_test/src/shared.dart b/packages/google_maps_flutter/google_maps_flutter/example/integration_test/src/shared.dart index 126733f678e..9db6aa293cb 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/integration_test/src/shared.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/integration_test/src/shared.dart @@ -20,7 +20,7 @@ const CameraPosition kInitialCameraPosition = CameraPosition(target: kInitialMapCenter, zoom: kInitialZoomLevel); // Dummy map ID -const String kCloudMapId = '000000000000000'; // Dummy map ID. +const String kMapId = '000000000000000'; // Dummy map ID. /// True if the test is running in an iOS device final bool isIOS = defaultTargetPlatform == TargetPlatform.iOS; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java index 85e0b7926a5..f3a10852535 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v22.7.2), do not edit directly. // See also: https://pub.dev/packages/pigeon package io.flutter.plugins.googlemaps; @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; @@ -40,7 +41,8 @@ public static class FlutterError extends RuntimeException { /** The error details. Must be a datatype supported by the api codec. */ public final Object details; - public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) { + public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) + { super(message); this.code = code; this.details = details; @@ -59,15 +61,14 @@ protected static ArrayList wrapError(@NonNull Throwable exception) { errorList.add(exception.toString()); errorList.add(exception.getClass().getSimpleName()); errorList.add( - "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); + "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); } return errorList; } @NonNull protected static FlutterError createConnectionError(@NonNull String channelName) { - return new FlutterError( - "channel-error", "Unable to establish connection on channel: " + channelName + ".", ""); + return new FlutterError("channel-error", "Unable to establish connection on channel: " + channelName + ".", ""); } @Target(METHOD) @@ -100,6 +101,18 @@ public enum PlatformRendererType { } } + public enum PlatformMarkerCollisionBehavior { + REQUIRED(0), + OPTIONAL_AND_HIDES_LOWER_PRIORITY(1), + REQUIRED_AND_HIDES_OPTIONAL(2); + + final int index; + + PlatformMarkerCollisionBehavior(final int index) { + this.index = index; + } + } + /** Join types for polyline joints. */ public enum PlatformJointType { MITERED(0), @@ -114,9 +127,9 @@ public enum PlatformJointType { } /** - * Enumeration of possible types of PlatformCap, corresponding to the subclasses of Cap in the - * Google Maps Android SDK. See - * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. + * Enumeration of possible types of PlatformCap, corresponding to the + * subclasses of Cap in the Google Maps Android SDK. + * See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. */ public enum PlatformCapType { BUTT_CAP(0), @@ -144,6 +157,17 @@ public enum PlatformPatternItemType { } } + public enum PlatformMarkerType { + MARKER(0), + ADVANCED_MARKER(1); + + final int index; + + PlatformMarkerType(final int index) { + this.index = index; + } + } + /** Pigeon equivalent of [MapBitmapScaling]. */ public enum PlatformMapBitmapScaling { AUTO(0), @@ -159,7 +183,7 @@ public enum PlatformMapBitmapScaling { /** * Pigeon representatation of a CameraPosition. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraPosition { private @NonNull Double bearing; @@ -219,17 +243,10 @@ public void setZoom(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformCameraPosition that = (PlatformCameraPosition) o; - return bearing.equals(that.bearing) - && target.equals(that.target) - && tilt.equals(that.tilt) - && zoom.equals(that.zoom); + return bearing.equals(that.bearing) && target.equals(that.target) && tilt.equals(that.tilt) && zoom.equals(that.zoom); } @Override @@ -308,14 +325,16 @@ ArrayList toList() { /** * Pigeon representation of a CameraUpdate. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdate { /** - * This Object shall be any of the below classes prefixed with PlatformCameraUpdate. Each such - * class represents a different type of camera update, and each holds a different set of data, - * preventing the use of a single unified class. Pigeon does not support inheritance, which - * prevents a more strict type bound. See https://github.com/flutter/flutter/issues/117819. + * This Object shall be any of the below classes prefixed with + * PlatformCameraUpdate. Each such class represents a different type of + * camera update, and each holds a different set of data, preventing the + * use of a single unified class. Pigeon does not support inheritance, which + * prevents a more strict type bound. + * See https://github.com/flutter/flutter/issues/117819. */ private @NonNull Object cameraUpdate; @@ -335,12 +354,8 @@ public void setCameraUpdate(@NonNull Object setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformCameraUpdate that = (PlatformCameraUpdate) o; return cameraUpdate.equals(that.cameraUpdate); } @@ -385,7 +400,7 @@ ArrayList toList() { /** * Pigeon equivalent of NewCameraPosition * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateNewCameraPosition { private @NonNull PlatformCameraPosition cameraPosition; @@ -406,12 +421,8 @@ public void setCameraPosition(@NonNull PlatformCameraPosition setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformCameraUpdateNewCameraPosition that = (PlatformCameraUpdateNewCameraPosition) o; return cameraPosition.equals(that.cameraPosition); } @@ -432,8 +443,7 @@ public static final class Builder { } public @NonNull PlatformCameraUpdateNewCameraPosition build() { - PlatformCameraUpdateNewCameraPosition pigeonReturn = - new PlatformCameraUpdateNewCameraPosition(); + PlatformCameraUpdateNewCameraPosition pigeonReturn = new PlatformCameraUpdateNewCameraPosition(); pigeonReturn.setCameraPosition(cameraPosition); return pigeonReturn; } @@ -446,10 +456,8 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformCameraUpdateNewCameraPosition fromList( - @NonNull ArrayList pigeonVar_list) { - PlatformCameraUpdateNewCameraPosition pigeonResult = - new PlatformCameraUpdateNewCameraPosition(); + static @NonNull PlatformCameraUpdateNewCameraPosition fromList(@NonNull ArrayList pigeonVar_list) { + PlatformCameraUpdateNewCameraPosition pigeonResult = new PlatformCameraUpdateNewCameraPosition(); Object cameraPosition = pigeonVar_list.get(0); pigeonResult.setCameraPosition((PlatformCameraPosition) cameraPosition); return pigeonResult; @@ -459,7 +467,7 @@ ArrayList toList() { /** * Pigeon equivalent of NewLatLng * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateNewLatLng { private @NonNull PlatformLatLng latLng; @@ -480,12 +488,8 @@ public void setLatLng(@NonNull PlatformLatLng setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformCameraUpdateNewLatLng that = (PlatformCameraUpdateNewLatLng) o; return latLng.equals(that.latLng); } @@ -519,8 +523,7 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformCameraUpdateNewLatLng fromList( - @NonNull ArrayList pigeonVar_list) { + static @NonNull PlatformCameraUpdateNewLatLng fromList(@NonNull ArrayList pigeonVar_list) { PlatformCameraUpdateNewLatLng pigeonResult = new PlatformCameraUpdateNewLatLng(); Object latLng = pigeonVar_list.get(0); pigeonResult.setLatLng((PlatformLatLng) latLng); @@ -531,7 +534,7 @@ ArrayList toList() { /** * Pigeon equivalent of NewLatLngBounds * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateNewLatLngBounds { private @NonNull PlatformLatLngBounds bounds; @@ -565,12 +568,8 @@ public void setPadding(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformCameraUpdateNewLatLngBounds that = (PlatformCameraUpdateNewLatLngBounds) o; return bounds.equals(that.bounds) && padding.equals(that.padding); } @@ -599,8 +598,7 @@ public static final class Builder { } public @NonNull PlatformCameraUpdateNewLatLngBounds build() { - PlatformCameraUpdateNewLatLngBounds pigeonReturn = - new PlatformCameraUpdateNewLatLngBounds(); + PlatformCameraUpdateNewLatLngBounds pigeonReturn = new PlatformCameraUpdateNewLatLngBounds(); pigeonReturn.setBounds(bounds); pigeonReturn.setPadding(padding); return pigeonReturn; @@ -615,8 +613,7 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformCameraUpdateNewLatLngBounds fromList( - @NonNull ArrayList pigeonVar_list) { + static @NonNull PlatformCameraUpdateNewLatLngBounds fromList(@NonNull ArrayList pigeonVar_list) { PlatformCameraUpdateNewLatLngBounds pigeonResult = new PlatformCameraUpdateNewLatLngBounds(); Object bounds = pigeonVar_list.get(0); pigeonResult.setBounds((PlatformLatLngBounds) bounds); @@ -629,7 +626,7 @@ ArrayList toList() { /** * Pigeon equivalent of NewLatLngZoom * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateNewLatLngZoom { private @NonNull PlatformLatLng latLng; @@ -663,12 +660,8 @@ public void setZoom(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformCameraUpdateNewLatLngZoom that = (PlatformCameraUpdateNewLatLngZoom) o; return latLng.equals(that.latLng) && zoom.equals(that.zoom); } @@ -712,8 +705,7 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformCameraUpdateNewLatLngZoom fromList( - @NonNull ArrayList pigeonVar_list) { + static @NonNull PlatformCameraUpdateNewLatLngZoom fromList(@NonNull ArrayList pigeonVar_list) { PlatformCameraUpdateNewLatLngZoom pigeonResult = new PlatformCameraUpdateNewLatLngZoom(); Object latLng = pigeonVar_list.get(0); pigeonResult.setLatLng((PlatformLatLng) latLng); @@ -726,7 +718,7 @@ ArrayList toList() { /** * Pigeon equivalent of ScrollBy * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateScrollBy { private @NonNull Double dx; @@ -760,12 +752,8 @@ public void setDy(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformCameraUpdateScrollBy that = (PlatformCameraUpdateScrollBy) o; return dx.equals(that.dx) && dy.equals(that.dy); } @@ -809,8 +797,7 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformCameraUpdateScrollBy fromList( - @NonNull ArrayList pigeonVar_list) { + static @NonNull PlatformCameraUpdateScrollBy fromList(@NonNull ArrayList pigeonVar_list) { PlatformCameraUpdateScrollBy pigeonResult = new PlatformCameraUpdateScrollBy(); Object dx = pigeonVar_list.get(0); pigeonResult.setDx((Double) dx); @@ -823,7 +810,7 @@ ArrayList toList() { /** * Pigeon equivalent of ZoomBy * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateZoomBy { private @NonNull Double amount; @@ -854,12 +841,8 @@ public void setFocus(@Nullable PlatformDoublePair setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformCameraUpdateZoomBy that = (PlatformCameraUpdateZoomBy) o; return amount.equals(that.amount) && Objects.equals(focus, that.focus); } @@ -916,7 +899,7 @@ ArrayList toList() { /** * Pigeon equivalent of ZoomIn/ZoomOut * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateZoom { private @NonNull Boolean out; @@ -937,12 +920,8 @@ public void setOut(@NonNull Boolean setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformCameraUpdateZoom that = (PlatformCameraUpdateZoom) o; return out.equals(that.out); } @@ -987,7 +966,7 @@ ArrayList toList() { /** * Pigeon equivalent of ZoomTo * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateZoomTo { private @NonNull Double zoom; @@ -1008,12 +987,8 @@ public void setZoom(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformCameraUpdateZoomTo that = (PlatformCameraUpdateZoomTo) o; return zoom.equals(that.zoom); } @@ -1058,7 +1033,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Circle class. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCircle { private @NonNull Boolean consumeTapEvents; @@ -1183,36 +1158,15 @@ public void setCircleId(@NonNull String setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformCircle that = (PlatformCircle) o; - return consumeTapEvents.equals(that.consumeTapEvents) - && fillColor.equals(that.fillColor) - && strokeColor.equals(that.strokeColor) - && visible.equals(that.visible) - && strokeWidth.equals(that.strokeWidth) - && zIndex.equals(that.zIndex) - && center.equals(that.center) - && radius.equals(that.radius) - && circleId.equals(that.circleId); + return consumeTapEvents.equals(that.consumeTapEvents) && fillColor.equals(that.fillColor) && strokeColor.equals(that.strokeColor) && visible.equals(that.visible) && strokeWidth.equals(that.strokeWidth) && zIndex.equals(that.zIndex) && center.equals(that.center) && radius.equals(that.radius) && circleId.equals(that.circleId); } @Override public int hashCode() { - return Objects.hash( - consumeTapEvents, - fillColor, - strokeColor, - visible, - strokeWidth, - zIndex, - center, - radius, - circleId); + return Objects.hash(consumeTapEvents, fillColor, strokeColor, visible, strokeWidth, zIndex, center, radius, circleId); } public static final class Builder { @@ -1346,12 +1300,13 @@ ArrayList toList() { /** * Pigeon equivalent of the Heatmap class. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformHeatmap { /** - * The heatmap data, as JSON. This should only be set from Heatmap.toJson, and the native code - * must interpret it according to the internal implementation details of that method. + * The heatmap data, as JSON. This should only be set from + * Heatmap.toJson, and the native code must interpret it according to the + * internal implementation details of that method. */ private @NonNull Map json; @@ -1371,12 +1326,8 @@ public void setJson(@NonNull Map setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformHeatmap that = (PlatformHeatmap) o; return json.equals(that.json); } @@ -1421,7 +1372,7 @@ ArrayList toList() { /** * Pigeon equivalent of the ClusterManager class. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformClusterManager { private @NonNull String identifier; @@ -1442,12 +1393,8 @@ public void setIdentifier(@NonNull String setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformClusterManager that = (PlatformClusterManager) o; return identifier.equals(that.identifier); } @@ -1492,7 +1439,7 @@ ArrayList toList() { /** * Pair of double values, such as for an offset or size. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformDoublePair { private @NonNull Double x; @@ -1526,12 +1473,8 @@ public void setY(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformDoublePair that = (PlatformDoublePair) o; return x.equals(that.x) && y.equals(that.y); } @@ -1588,7 +1531,7 @@ ArrayList toList() { /** * Pigeon equivalent of the InfoWindow class. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformInfoWindow { private @Nullable String title; @@ -1629,16 +1572,10 @@ public void setAnchor(@NonNull PlatformDoublePair setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformInfoWindow that = (PlatformInfoWindow) o; - return Objects.equals(title, that.title) - && Objects.equals(snippet, that.snippet) - && anchor.equals(that.anchor); + return Objects.equals(title, that.title) && Objects.equals(snippet, that.snippet) && anchor.equals(that.anchor); } @Override @@ -1705,7 +1642,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Marker class. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformMarker { private @NonNull Double alpha; @@ -1874,49 +1811,33 @@ public void setClusterManagerId(@Nullable String setterArg) { this.clusterManagerId = setterArg; } + private @NonNull PlatformMarkerCollisionBehavior collisionBehavior; + + public @NonNull PlatformMarkerCollisionBehavior getCollisionBehavior() { + return collisionBehavior; + } + + public void setCollisionBehavior(@NonNull PlatformMarkerCollisionBehavior setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"collisionBehavior\" is null."); + } + this.collisionBehavior = setterArg; + } + /** Constructor is non-public to enforce null safety; use Builder. */ PlatformMarker() {} @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformMarker that = (PlatformMarker) o; - return alpha.equals(that.alpha) - && anchor.equals(that.anchor) - && consumeTapEvents.equals(that.consumeTapEvents) - && draggable.equals(that.draggable) - && flat.equals(that.flat) - && icon.equals(that.icon) - && infoWindow.equals(that.infoWindow) - && position.equals(that.position) - && rotation.equals(that.rotation) - && visible.equals(that.visible) - && zIndex.equals(that.zIndex) - && markerId.equals(that.markerId) - && Objects.equals(clusterManagerId, that.clusterManagerId); + return alpha.equals(that.alpha) && anchor.equals(that.anchor) && consumeTapEvents.equals(that.consumeTapEvents) && draggable.equals(that.draggable) && flat.equals(that.flat) && icon.equals(that.icon) && infoWindow.equals(that.infoWindow) && position.equals(that.position) && rotation.equals(that.rotation) && visible.equals(that.visible) && zIndex.equals(that.zIndex) && markerId.equals(that.markerId) && Objects.equals(clusterManagerId, that.clusterManagerId) && collisionBehavior.equals(that.collisionBehavior); } @Override public int hashCode() { - return Objects.hash( - alpha, - anchor, - consumeTapEvents, - draggable, - flat, - icon, - infoWindow, - position, - rotation, - visible, - zIndex, - markerId, - clusterManagerId); + return Objects.hash(alpha, anchor, consumeTapEvents, draggable, flat, icon, infoWindow, position, rotation, visible, zIndex, markerId, clusterManagerId, collisionBehavior); } public static final class Builder { @@ -2025,6 +1946,14 @@ public static final class Builder { return this; } + private @Nullable PlatformMarkerCollisionBehavior collisionBehavior; + + @CanIgnoreReturnValue + public @NonNull Builder setCollisionBehavior(@NonNull PlatformMarkerCollisionBehavior setterArg) { + this.collisionBehavior = setterArg; + return this; + } + public @NonNull PlatformMarker build() { PlatformMarker pigeonReturn = new PlatformMarker(); pigeonReturn.setAlpha(alpha); @@ -2040,13 +1969,14 @@ public static final class Builder { pigeonReturn.setZIndex(zIndex); pigeonReturn.setMarkerId(markerId); pigeonReturn.setClusterManagerId(clusterManagerId); + pigeonReturn.setCollisionBehavior(collisionBehavior); return pigeonReturn; } } @NonNull ArrayList toList() { - ArrayList toListResult = new ArrayList<>(13); + ArrayList toListResult = new ArrayList<>(14); toListResult.add(alpha); toListResult.add(anchor); toListResult.add(consumeTapEvents); @@ -2060,6 +1990,7 @@ ArrayList toList() { toListResult.add(zIndex); toListResult.add(markerId); toListResult.add(clusterManagerId); + toListResult.add(collisionBehavior); return toListResult; } @@ -2091,6 +2022,8 @@ ArrayList toList() { pigeonResult.setMarkerId((String) markerId); Object clusterManagerId = pigeonVar_list.get(12); pigeonResult.setClusterManagerId((String) clusterManagerId); + Object collisionBehavior = pigeonVar_list.get(13); + pigeonResult.setCollisionBehavior((PlatformMarkerCollisionBehavior) collisionBehavior); return pigeonResult; } } @@ -2098,7 +2031,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Polygon class. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformPolygon { private @NonNull String polygonId; @@ -2236,38 +2169,15 @@ public void setZIndex(@NonNull Long setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformPolygon that = (PlatformPolygon) o; - return polygonId.equals(that.polygonId) - && consumesTapEvents.equals(that.consumesTapEvents) - && fillColor.equals(that.fillColor) - && geodesic.equals(that.geodesic) - && points.equals(that.points) - && holes.equals(that.holes) - && visible.equals(that.visible) - && strokeColor.equals(that.strokeColor) - && strokeWidth.equals(that.strokeWidth) - && zIndex.equals(that.zIndex); + return polygonId.equals(that.polygonId) && consumesTapEvents.equals(that.consumesTapEvents) && fillColor.equals(that.fillColor) && geodesic.equals(that.geodesic) && points.equals(that.points) && holes.equals(that.holes) && visible.equals(that.visible) && strokeColor.equals(that.strokeColor) && strokeWidth.equals(that.strokeWidth) && zIndex.equals(that.zIndex); } @Override public int hashCode() { - return Objects.hash( - polygonId, - consumesTapEvents, - fillColor, - geodesic, - points, - holes, - visible, - strokeColor, - strokeWidth, - zIndex); + return Objects.hash(polygonId, consumesTapEvents, fillColor, geodesic, points, holes, visible, strokeColor, strokeWidth, zIndex); } public static final class Builder { @@ -2413,7 +2323,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Polyline class. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformPolyline { private @NonNull String polylineId; @@ -2510,8 +2420,8 @@ public void setPoints(@NonNull List setterArg) { } /** - * The cap at the start and end vertex of a polyline. See - * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. + * The cap at the start and end vertex of a polyline. + * See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. */ private @NonNull PlatformCap startCap; @@ -2583,42 +2493,15 @@ public void setZIndex(@NonNull Long setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformPolyline that = (PlatformPolyline) o; - return polylineId.equals(that.polylineId) - && consumesTapEvents.equals(that.consumesTapEvents) - && color.equals(that.color) - && geodesic.equals(that.geodesic) - && jointType.equals(that.jointType) - && patterns.equals(that.patterns) - && points.equals(that.points) - && startCap.equals(that.startCap) - && endCap.equals(that.endCap) - && visible.equals(that.visible) - && width.equals(that.width) - && zIndex.equals(that.zIndex); + return polylineId.equals(that.polylineId) && consumesTapEvents.equals(that.consumesTapEvents) && color.equals(that.color) && geodesic.equals(that.geodesic) && jointType.equals(that.jointType) && patterns.equals(that.patterns) && points.equals(that.points) && startCap.equals(that.startCap) && endCap.equals(that.endCap) && visible.equals(that.visible) && width.equals(that.width) && zIndex.equals(that.zIndex); } @Override public int hashCode() { - return Objects.hash( - polylineId, - consumesTapEvents, - color, - geodesic, - jointType, - patterns, - points, - startCap, - endCap, - visible, - width, - zIndex); + return Objects.hash(polylineId, consumesTapEvents, color, geodesic, jointType, patterns, points, startCap, endCap, visible, width, zIndex); } public static final class Builder { @@ -2789,7 +2672,7 @@ ArrayList toList() { * Pigeon equivalent of Cap from the platform interface. * https://github.com/flutter/packages/blob/main/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/cap.dart * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCap { private @NonNull PlatformCapType type; @@ -2830,16 +2713,10 @@ public void setRefWidth(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformCap that = (PlatformCap) o; - return type.equals(that.type) - && Objects.equals(bitmapDescriptor, that.bitmapDescriptor) - && Objects.equals(refWidth, that.refWidth); + return type.equals(that.type) && Objects.equals(bitmapDescriptor, that.bitmapDescriptor) && Objects.equals(refWidth, that.refWidth); } @Override @@ -2906,7 +2783,7 @@ ArrayList toList() { /** * Pigeon equivalent of the PatternItem class. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformPatternItem { private @NonNull PlatformPatternItemType type; @@ -2937,12 +2814,8 @@ public void setLength(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformPatternItem that = (PlatformPatternItem) o; return type.equals(that.type) && Objects.equals(length, that.length); } @@ -2999,7 +2872,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Tile class. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformTile { private @NonNull Long width; @@ -3043,16 +2916,10 @@ public void setData(@Nullable byte[] setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformTile that = (PlatformTile) o; - return width.equals(that.width) - && height.equals(that.height) - && Arrays.equals(data, that.data); + return width.equals(that.width) && height.equals(that.height) && Arrays.equals(data, that.data); } @Override @@ -3121,7 +2988,7 @@ ArrayList toList() { /** * Pigeon equivalent of the TileOverlay class. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformTileOverlay { private @NonNull String tileOverlayId; @@ -3207,19 +3074,10 @@ public void setTileSize(@NonNull Long setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformTileOverlay that = (PlatformTileOverlay) o; - return tileOverlayId.equals(that.tileOverlayId) - && fadeIn.equals(that.fadeIn) - && transparency.equals(that.transparency) - && zIndex.equals(that.zIndex) - && visible.equals(that.visible) - && tileSize.equals(that.tileSize); + return tileOverlayId.equals(that.tileOverlayId) && fadeIn.equals(that.fadeIn) && transparency.equals(that.transparency) && zIndex.equals(that.zIndex) && visible.equals(that.visible) && tileSize.equals(that.tileSize); } @Override @@ -3322,7 +3180,7 @@ ArrayList toList() { /** * Pigeon equivalent of Flutter's EdgeInsets. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformEdgeInsets { private @NonNull Double top; @@ -3382,17 +3240,10 @@ public void setRight(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformEdgeInsets that = (PlatformEdgeInsets) o; - return top.equals(that.top) - && bottom.equals(that.bottom) - && left.equals(that.left) - && right.equals(that.right); + return top.equals(that.top) && bottom.equals(that.bottom) && left.equals(that.left) && right.equals(that.right); } @Override @@ -3471,7 +3322,7 @@ ArrayList toList() { /** * Pigeon equivalent of LatLng. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformLatLng { private @NonNull Double latitude; @@ -3505,12 +3356,8 @@ public void setLongitude(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformLatLng that = (PlatformLatLng) o; return latitude.equals(that.latitude) && longitude.equals(that.longitude); } @@ -3567,7 +3414,7 @@ ArrayList toList() { /** * Pigeon equivalent of LatLngBounds. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformLatLngBounds { private @NonNull PlatformLatLng northeast; @@ -3601,12 +3448,8 @@ public void setSouthwest(@NonNull PlatformLatLng setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformLatLngBounds that = (PlatformLatLngBounds) o; return northeast.equals(that.northeast) && southwest.equals(that.southwest); } @@ -3663,7 +3506,7 @@ ArrayList toList() { /** * Pigeon equivalent of Cluster. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCluster { private @NonNull String clusterManagerId; @@ -3723,17 +3566,10 @@ public void setMarkerIds(@NonNull List setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformCluster that = (PlatformCluster) o; - return clusterManagerId.equals(that.clusterManagerId) - && position.equals(that.position) - && bounds.equals(that.bounds) - && markerIds.equals(that.markerIds); + return clusterManagerId.equals(that.clusterManagerId) && position.equals(that.position) && bounds.equals(that.bounds) && markerIds.equals(that.markerIds); } @Override @@ -3812,7 +3648,7 @@ ArrayList toList() { /** * Pigeon equivalent of the GroundOverlay class. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformGroundOverlay { private @NonNull String groundOverlayId; @@ -3961,42 +3797,15 @@ public void setClickable(@NonNull Boolean setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformGroundOverlay that = (PlatformGroundOverlay) o; - return groundOverlayId.equals(that.groundOverlayId) - && image.equals(that.image) - && Objects.equals(position, that.position) - && Objects.equals(bounds, that.bounds) - && Objects.equals(width, that.width) - && Objects.equals(height, that.height) - && Objects.equals(anchor, that.anchor) - && transparency.equals(that.transparency) - && bearing.equals(that.bearing) - && zIndex.equals(that.zIndex) - && visible.equals(that.visible) - && clickable.equals(that.clickable); + return groundOverlayId.equals(that.groundOverlayId) && image.equals(that.image) && Objects.equals(position, that.position) && Objects.equals(bounds, that.bounds) && Objects.equals(width, that.width) && Objects.equals(height, that.height) && Objects.equals(anchor, that.anchor) && transparency.equals(that.transparency) && bearing.equals(that.bearing) && zIndex.equals(that.zIndex) && visible.equals(that.visible) && clickable.equals(that.clickable); } @Override public int hashCode() { - return Objects.hash( - groundOverlayId, - image, - position, - bounds, - width, - height, - anchor, - transparency, - bearing, - zIndex, - visible, - clickable); + return Objects.hash(groundOverlayId, image, position, bounds, width, height, anchor, transparency, bearing, zIndex, visible, clickable); } public static final class Builder { @@ -4166,10 +3975,10 @@ ArrayList toList() { /** * Pigeon equivalent of CameraTargetBounds. * - *

As with the Dart version, it exists to distinguish between not setting a a target, and - * having an explicitly unbounded target (null [bounds]). + * As with the Dart version, it exists to distinguish between not setting a + * a target, and having an explicitly unbounded target (null [bounds]). * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraTargetBounds { private @Nullable PlatformLatLngBounds bounds; @@ -4184,12 +3993,8 @@ public void setBounds(@Nullable PlatformLatLngBounds setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformCameraTargetBounds that = (PlatformCameraTargetBounds) o; return Objects.equals(bounds, that.bounds); } @@ -4234,7 +4039,7 @@ ArrayList toList() { /** * Information passed to the platform view creation. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformMapViewCreationParams { private @NonNull PlatformCameraPosition initialCameraPosition; @@ -4372,38 +4177,15 @@ public void setInitialGroundOverlays(@NonNull List setter @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformMapViewCreationParams that = (PlatformMapViewCreationParams) o; - return initialCameraPosition.equals(that.initialCameraPosition) - && mapConfiguration.equals(that.mapConfiguration) - && initialCircles.equals(that.initialCircles) - && initialMarkers.equals(that.initialMarkers) - && initialPolygons.equals(that.initialPolygons) - && initialPolylines.equals(that.initialPolylines) - && initialHeatmaps.equals(that.initialHeatmaps) - && initialTileOverlays.equals(that.initialTileOverlays) - && initialClusterManagers.equals(that.initialClusterManagers) - && initialGroundOverlays.equals(that.initialGroundOverlays); + return initialCameraPosition.equals(that.initialCameraPosition) && mapConfiguration.equals(that.mapConfiguration) && initialCircles.equals(that.initialCircles) && initialMarkers.equals(that.initialMarkers) && initialPolygons.equals(that.initialPolygons) && initialPolylines.equals(that.initialPolylines) && initialHeatmaps.equals(that.initialHeatmaps) && initialTileOverlays.equals(that.initialTileOverlays) && initialClusterManagers.equals(that.initialClusterManagers) && initialGroundOverlays.equals(that.initialGroundOverlays); } @Override public int hashCode() { - return Objects.hash( - initialCameraPosition, - mapConfiguration, - initialCircles, - initialMarkers, - initialPolygons, - initialPolylines, - initialHeatmaps, - initialTileOverlays, - initialClusterManagers, - initialGroundOverlays); + return Objects.hash(initialCameraPosition, mapConfiguration, initialCircles, initialMarkers, initialPolygons, initialPolylines, initialHeatmaps, initialTileOverlays, initialClusterManagers, initialGroundOverlays); } public static final class Builder { @@ -4475,8 +4257,7 @@ public static final class Builder { private @Nullable List initialClusterManagers; @CanIgnoreReturnValue - public @NonNull Builder setInitialClusterManagers( - @NonNull List setterArg) { + public @NonNull Builder setInitialClusterManagers(@NonNull List setterArg) { this.initialClusterManagers = setterArg; return this; } @@ -4484,8 +4265,7 @@ public static final class Builder { private @Nullable List initialGroundOverlays; @CanIgnoreReturnValue - public @NonNull Builder setInitialGroundOverlays( - @NonNull List setterArg) { + public @NonNull Builder setInitialGroundOverlays(@NonNull List setterArg) { this.initialGroundOverlays = setterArg; return this; } @@ -4522,8 +4302,7 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformMapViewCreationParams fromList( - @NonNull ArrayList pigeonVar_list) { + static @NonNull PlatformMapViewCreationParams fromList(@NonNull ArrayList pigeonVar_list) { PlatformMapViewCreationParams pigeonResult = new PlatformMapViewCreationParams(); Object initialCameraPosition = pigeonVar_list.get(0); pigeonResult.setInitialCameraPosition((PlatformCameraPosition) initialCameraPosition); @@ -4552,7 +4331,7 @@ ArrayList toList() { /** * Pigeon equivalent of MapConfiguration. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformMapConfiguration { private @Nullable Boolean compassEnabled; @@ -4735,14 +4514,24 @@ public void setLiteModeEnabled(@Nullable Boolean setterArg) { this.liteModeEnabled = setterArg; } - private @Nullable String cloudMapId; + private @Nullable PlatformMarkerType markerType; + + public @Nullable PlatformMarkerType getMarkerType() { + return markerType; + } + + public void setMarkerType(@Nullable PlatformMarkerType setterArg) { + this.markerType = setterArg; + } + + private @Nullable String mapId; - public @Nullable String getCloudMapId() { - return cloudMapId; + public @Nullable String getMapId() { + return mapId; } - public void setCloudMapId(@Nullable String setterArg) { - this.cloudMapId = setterArg; + public void setMapId(@Nullable String setterArg) { + this.mapId = setterArg; } private @Nullable String style; @@ -4757,58 +4546,15 @@ public void setStyle(@Nullable String setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformMapConfiguration that = (PlatformMapConfiguration) o; - return Objects.equals(compassEnabled, that.compassEnabled) - && Objects.equals(cameraTargetBounds, that.cameraTargetBounds) - && Objects.equals(mapType, that.mapType) - && Objects.equals(minMaxZoomPreference, that.minMaxZoomPreference) - && Objects.equals(mapToolbarEnabled, that.mapToolbarEnabled) - && Objects.equals(rotateGesturesEnabled, that.rotateGesturesEnabled) - && Objects.equals(scrollGesturesEnabled, that.scrollGesturesEnabled) - && Objects.equals(tiltGesturesEnabled, that.tiltGesturesEnabled) - && Objects.equals(trackCameraPosition, that.trackCameraPosition) - && Objects.equals(zoomControlsEnabled, that.zoomControlsEnabled) - && Objects.equals(zoomGesturesEnabled, that.zoomGesturesEnabled) - && Objects.equals(myLocationEnabled, that.myLocationEnabled) - && Objects.equals(myLocationButtonEnabled, that.myLocationButtonEnabled) - && Objects.equals(padding, that.padding) - && Objects.equals(indoorViewEnabled, that.indoorViewEnabled) - && Objects.equals(trafficEnabled, that.trafficEnabled) - && Objects.equals(buildingsEnabled, that.buildingsEnabled) - && Objects.equals(liteModeEnabled, that.liteModeEnabled) - && Objects.equals(cloudMapId, that.cloudMapId) - && Objects.equals(style, that.style); + return Objects.equals(compassEnabled, that.compassEnabled) && Objects.equals(cameraTargetBounds, that.cameraTargetBounds) && Objects.equals(mapType, that.mapType) && Objects.equals(minMaxZoomPreference, that.minMaxZoomPreference) && Objects.equals(mapToolbarEnabled, that.mapToolbarEnabled) && Objects.equals(rotateGesturesEnabled, that.rotateGesturesEnabled) && Objects.equals(scrollGesturesEnabled, that.scrollGesturesEnabled) && Objects.equals(tiltGesturesEnabled, that.tiltGesturesEnabled) && Objects.equals(trackCameraPosition, that.trackCameraPosition) && Objects.equals(zoomControlsEnabled, that.zoomControlsEnabled) && Objects.equals(zoomGesturesEnabled, that.zoomGesturesEnabled) && Objects.equals(myLocationEnabled, that.myLocationEnabled) && Objects.equals(myLocationButtonEnabled, that.myLocationButtonEnabled) && Objects.equals(padding, that.padding) && Objects.equals(indoorViewEnabled, that.indoorViewEnabled) && Objects.equals(trafficEnabled, that.trafficEnabled) && Objects.equals(buildingsEnabled, that.buildingsEnabled) && Objects.equals(liteModeEnabled, that.liteModeEnabled) && Objects.equals(markerType, that.markerType) && Objects.equals(mapId, that.mapId) && Objects.equals(style, that.style); } @Override public int hashCode() { - return Objects.hash( - compassEnabled, - cameraTargetBounds, - mapType, - minMaxZoomPreference, - mapToolbarEnabled, - rotateGesturesEnabled, - scrollGesturesEnabled, - tiltGesturesEnabled, - trackCameraPosition, - zoomControlsEnabled, - zoomGesturesEnabled, - myLocationEnabled, - myLocationButtonEnabled, - padding, - indoorViewEnabled, - trafficEnabled, - buildingsEnabled, - liteModeEnabled, - cloudMapId, - style); + return Objects.hash(compassEnabled, cameraTargetBounds, mapType, minMaxZoomPreference, mapToolbarEnabled, rotateGesturesEnabled, scrollGesturesEnabled, tiltGesturesEnabled, trackCameraPosition, zoomControlsEnabled, zoomGesturesEnabled, myLocationEnabled, myLocationButtonEnabled, padding, indoorViewEnabled, trafficEnabled, buildingsEnabled, liteModeEnabled, markerType, mapId, style); } public static final class Builder { @@ -4824,8 +4570,7 @@ public static final class Builder { private @Nullable PlatformCameraTargetBounds cameraTargetBounds; @CanIgnoreReturnValue - public @NonNull Builder setCameraTargetBounds( - @Nullable PlatformCameraTargetBounds setterArg) { + public @NonNull Builder setCameraTargetBounds(@Nullable PlatformCameraTargetBounds setterArg) { this.cameraTargetBounds = setterArg; return this; } @@ -4958,11 +4703,19 @@ public static final class Builder { return this; } - private @Nullable String cloudMapId; + private @Nullable PlatformMarkerType markerType; + + @CanIgnoreReturnValue + public @NonNull Builder setMarkerType(@Nullable PlatformMarkerType setterArg) { + this.markerType = setterArg; + return this; + } + + private @Nullable String mapId; @CanIgnoreReturnValue - public @NonNull Builder setCloudMapId(@Nullable String setterArg) { - this.cloudMapId = setterArg; + public @NonNull Builder setMapId(@Nullable String setterArg) { + this.mapId = setterArg; return this; } @@ -4994,7 +4747,8 @@ public static final class Builder { pigeonReturn.setTrafficEnabled(trafficEnabled); pigeonReturn.setBuildingsEnabled(buildingsEnabled); pigeonReturn.setLiteModeEnabled(liteModeEnabled); - pigeonReturn.setCloudMapId(cloudMapId); + pigeonReturn.setMarkerType(markerType); + pigeonReturn.setMapId(mapId); pigeonReturn.setStyle(style); return pigeonReturn; } @@ -5002,7 +4756,7 @@ public static final class Builder { @NonNull ArrayList toList() { - ArrayList toListResult = new ArrayList<>(20); + ArrayList toListResult = new ArrayList<>(21); toListResult.add(compassEnabled); toListResult.add(cameraTargetBounds); toListResult.add(mapType); @@ -5021,7 +4775,8 @@ ArrayList toList() { toListResult.add(trafficEnabled); toListResult.add(buildingsEnabled); toListResult.add(liteModeEnabled); - toListResult.add(cloudMapId); + toListResult.add(markerType); + toListResult.add(mapId); toListResult.add(style); return toListResult; } @@ -5064,9 +4819,11 @@ ArrayList toList() { pigeonResult.setBuildingsEnabled((Boolean) buildingsEnabled); Object liteModeEnabled = pigeonVar_list.get(17); pigeonResult.setLiteModeEnabled((Boolean) liteModeEnabled); - Object cloudMapId = pigeonVar_list.get(18); - pigeonResult.setCloudMapId((String) cloudMapId); - Object style = pigeonVar_list.get(19); + Object markerType = pigeonVar_list.get(18); + pigeonResult.setMarkerType((PlatformMarkerType) markerType); + Object mapId = pigeonVar_list.get(19); + pigeonResult.setMapId((String) mapId); + Object style = pigeonVar_list.get(20); pigeonResult.setStyle((String) style); return pigeonResult; } @@ -5075,7 +4832,7 @@ ArrayList toList() { /** * Pigeon representation of an x,y coordinate. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformPoint { private @NonNull Long x; @@ -5109,12 +4866,8 @@ public void setY(@NonNull Long setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformPoint that = (PlatformPoint) o; return x.equals(that.x) && y.equals(that.y); } @@ -5171,7 +4924,7 @@ ArrayList toList() { /** * Pigeon equivalent of native TileOverlay properties. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformTileLayer { private @NonNull Boolean visible; @@ -5231,17 +4984,10 @@ public void setZIndex(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformTileLayer that = (PlatformTileLayer) o; - return visible.equals(that.visible) - && fadeIn.equals(that.fadeIn) - && transparency.equals(that.transparency) - && zIndex.equals(that.zIndex); + return visible.equals(that.visible) && fadeIn.equals(that.fadeIn) && transparency.equals(that.transparency) && zIndex.equals(that.zIndex); } @Override @@ -5320,7 +5066,7 @@ ArrayList toList() { /** * Possible outcomes of launching a URL. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformZoomRange { private @Nullable Double min; @@ -5345,12 +5091,8 @@ public void setMax(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformZoomRange that = (PlatformZoomRange) o; return Objects.equals(min, that.min) && Objects.equals(max, that.max); } @@ -5405,18 +5147,20 @@ ArrayList toList() { } /** - * Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint types of - * [BitmapDescriptor], [PlatformBitmap] contains a single field which may hold the pigeon - * equivalent type of any of them. + * Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint + * types of [BitmapDescriptor], [PlatformBitmap] contains a single field which + * may hold the pigeon equivalent type of any of them. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmap { /** - * One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], [PlatformBitmapAssetImage], - * [PlatformBitmapBytesMap], [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. As Pigeon - * does not currently support data class inheritance, this approach allows for the different - * bitmap implementations to be valid argument and return types of the API methods. See + * One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], + * [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], + * [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. + * As Pigeon does not currently support data class inheritance, this + * approach allows for the different bitmap implementations to be valid + * argument and return types of the API methods. See * https://github.com/flutter/flutter/issues/117819. */ private @NonNull Object bitmap; @@ -5437,12 +5181,8 @@ public void setBitmap(@NonNull Object setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformBitmap that = (PlatformBitmap) o; return bitmap.equals(that.bitmap); } @@ -5488,7 +5228,7 @@ ArrayList toList() { * Pigeon equivalent of [DefaultMarker]. See * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#defaultMarker(float) * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapDefaultMarker { private @Nullable Double hue; @@ -5503,12 +5243,8 @@ public void setHue(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformBitmapDefaultMarker that = (PlatformBitmapDefaultMarker) o; return Objects.equals(hue, that.hue); } @@ -5542,8 +5278,7 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformBitmapDefaultMarker fromList( - @NonNull ArrayList pigeonVar_list) { + static @NonNull PlatformBitmapDefaultMarker fromList(@NonNull ArrayList pigeonVar_list) { PlatformBitmapDefaultMarker pigeonResult = new PlatformBitmapDefaultMarker(); Object hue = pigeonVar_list.get(0); pigeonResult.setHue((Double) hue); @@ -5555,7 +5290,7 @@ ArrayList toList() { * Pigeon equivalent of [BytesBitmap]. See * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#fromBitmap(android.graphics.Bitmap) * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapBytes { private @NonNull byte[] byteData; @@ -5586,12 +5321,8 @@ public void setSize(@Nullable PlatformDoublePair setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformBitmapBytes that = (PlatformBitmapBytes) o; return Arrays.equals(byteData, that.byteData) && Objects.equals(size, that.size); } @@ -5651,7 +5382,7 @@ ArrayList toList() { * Pigeon equivalent of [AssetBitmap]. See * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapAsset { private @NonNull String name; @@ -5682,12 +5413,8 @@ public void setPkg(@Nullable String setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformBitmapAsset that = (PlatformBitmapAsset) o; return name.equals(that.name) && Objects.equals(pkg, that.pkg); } @@ -5745,7 +5472,7 @@ ArrayList toList() { * Pigeon equivalent of [AssetImageBitmap]. See * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapAssetImage { private @NonNull String name; @@ -5789,12 +5516,8 @@ public void setSize(@Nullable PlatformDoublePair setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformBitmapAssetImage that = (PlatformBitmapAssetImage) o; return name.equals(that.name) && scale.equals(that.scale) && Objects.equals(size, that.size); } @@ -5864,7 +5587,7 @@ ArrayList toList() { * Pigeon equivalent of [AssetMapBitmap]. See * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapAssetMap { private @NonNull String assetName; @@ -5931,18 +5654,10 @@ public void setHeight(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformBitmapAssetMap that = (PlatformBitmapAssetMap) o; - return assetName.equals(that.assetName) - && bitmapScaling.equals(that.bitmapScaling) - && imagePixelRatio.equals(that.imagePixelRatio) - && Objects.equals(width, that.width) - && Objects.equals(height, that.height); + return assetName.equals(that.assetName) && bitmapScaling.equals(that.bitmapScaling) && imagePixelRatio.equals(that.imagePixelRatio) && Objects.equals(width, that.width) && Objects.equals(height, that.height); } @Override @@ -6034,7 +5749,7 @@ ArrayList toList() { * Pigeon equivalent of [BytesMapBitmap]. See * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-frombitmap-bitmap-image * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapBytesMap { private @NonNull byte[] byteData; @@ -6101,18 +5816,10 @@ public void setHeight(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformBitmapBytesMap that = (PlatformBitmapBytesMap) o; - return Arrays.equals(byteData, that.byteData) - && bitmapScaling.equals(that.bitmapScaling) - && imagePixelRatio.equals(that.imagePixelRatio) - && Objects.equals(width, that.width) - && Objects.equals(height, that.height); + return Arrays.equals(byteData, that.byteData) && bitmapScaling.equals(that.bitmapScaling) && imagePixelRatio.equals(that.imagePixelRatio) && Objects.equals(width, that.width) && Objects.equals(height, that.height); } @Override @@ -6202,6 +5909,177 @@ ArrayList toList() { } } + /** + * Pigeon equivalent of [PinConfig]. + * + * Generated class from Pigeon that represents data sent in messages. + */ + public static final class PlatformBitmapPinConfig { + private @Nullable Long backgroundColor; + + public @Nullable Long getBackgroundColor() { + return backgroundColor; + } + + public void setBackgroundColor(@Nullable Long setterArg) { + this.backgroundColor = setterArg; + } + + private @Nullable Long borderColor; + + public @Nullable Long getBorderColor() { + return borderColor; + } + + public void setBorderColor(@Nullable Long setterArg) { + this.borderColor = setterArg; + } + + private @Nullable Long glyphColor; + + public @Nullable Long getGlyphColor() { + return glyphColor; + } + + public void setGlyphColor(@Nullable Long setterArg) { + this.glyphColor = setterArg; + } + + private @Nullable PlatformBitmap glyphBitmap; + + public @Nullable PlatformBitmap getGlyphBitmap() { + return glyphBitmap; + } + + public void setGlyphBitmap(@Nullable PlatformBitmap setterArg) { + this.glyphBitmap = setterArg; + } + + private @Nullable String glyphText; + + public @Nullable String getGlyphText() { + return glyphText; + } + + public void setGlyphText(@Nullable String setterArg) { + this.glyphText = setterArg; + } + + private @Nullable Long glyphTextColor; + + public @Nullable Long getGlyphTextColor() { + return glyphTextColor; + } + + public void setGlyphTextColor(@Nullable Long setterArg) { + this.glyphTextColor = setterArg; + } + + @Override + public boolean equals(Object o) { + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } + PlatformBitmapPinConfig that = (PlatformBitmapPinConfig) o; + return Objects.equals(backgroundColor, that.backgroundColor) && Objects.equals(borderColor, that.borderColor) && Objects.equals(glyphColor, that.glyphColor) && Objects.equals(glyphBitmap, that.glyphBitmap) && Objects.equals(glyphText, that.glyphText) && Objects.equals(glyphTextColor, that.glyphTextColor); + } + + @Override + public int hashCode() { + return Objects.hash(backgroundColor, borderColor, glyphColor, glyphBitmap, glyphText, glyphTextColor); + } + + public static final class Builder { + + private @Nullable Long backgroundColor; + + @CanIgnoreReturnValue + public @NonNull Builder setBackgroundColor(@Nullable Long setterArg) { + this.backgroundColor = setterArg; + return this; + } + + private @Nullable Long borderColor; + + @CanIgnoreReturnValue + public @NonNull Builder setBorderColor(@Nullable Long setterArg) { + this.borderColor = setterArg; + return this; + } + + private @Nullable Long glyphColor; + + @CanIgnoreReturnValue + public @NonNull Builder setGlyphColor(@Nullable Long setterArg) { + this.glyphColor = setterArg; + return this; + } + + private @Nullable PlatformBitmap glyphBitmap; + + @CanIgnoreReturnValue + public @NonNull Builder setGlyphBitmap(@Nullable PlatformBitmap setterArg) { + this.glyphBitmap = setterArg; + return this; + } + + private @Nullable String glyphText; + + @CanIgnoreReturnValue + public @NonNull Builder setGlyphText(@Nullable String setterArg) { + this.glyphText = setterArg; + return this; + } + + private @Nullable Long glyphTextColor; + + @CanIgnoreReturnValue + public @NonNull Builder setGlyphTextColor(@Nullable Long setterArg) { + this.glyphTextColor = setterArg; + return this; + } + + public @NonNull PlatformBitmapPinConfig build() { + PlatformBitmapPinConfig pigeonReturn = new PlatformBitmapPinConfig(); + pigeonReturn.setBackgroundColor(backgroundColor); + pigeonReturn.setBorderColor(borderColor); + pigeonReturn.setGlyphColor(glyphColor); + pigeonReturn.setGlyphBitmap(glyphBitmap); + pigeonReturn.setGlyphText(glyphText); + pigeonReturn.setGlyphTextColor(glyphTextColor); + return pigeonReturn; + } + } + + @NonNull + ArrayList toList() { + ArrayList toListResult = new ArrayList<>(6); + toListResult.add(backgroundColor); + toListResult.add(borderColor); + toListResult.add(glyphColor); + toListResult.add(glyphBitmap); + toListResult.add(glyphText); + toListResult.add(glyphTextColor); + return toListResult; + } + + static @NonNull PlatformBitmapPinConfig fromList(@NonNull ArrayList pigeonVar_list) { + PlatformBitmapPinConfig pigeonResult = new PlatformBitmapPinConfig(); + Object backgroundColor = pigeonVar_list.get(0); + pigeonResult.setBackgroundColor((Long) backgroundColor); + Object borderColor = pigeonVar_list.get(1); + pigeonResult.setBorderColor((Long) borderColor); + Object glyphColor = pigeonVar_list.get(2); + pigeonResult.setGlyphColor((Long) glyphColor); + Object glyphBitmap = pigeonVar_list.get(3); + pigeonResult.setGlyphBitmap((PlatformBitmap) glyphBitmap); + Object glyphText = pigeonVar_list.get(4); + pigeonResult.setGlyphText((String) glyphText); + Object glyphTextColor = pigeonVar_list.get(5); + pigeonResult.setGlyphTextColor((Long) glyphTextColor); + return pigeonResult; + } + } + private static class PigeonCodec extends StandardMessageCodec { public static final PigeonCodec INSTANCE = new PigeonCodec(); @@ -6210,122 +6088,120 @@ private PigeonCodec() {} @Override protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { switch (type) { - case (byte) 129: - { - Object value = readValue(buffer); - return value == null ? null : PlatformMapType.values()[((Long) value).intValue()]; - } - case (byte) 130: - { - Object value = readValue(buffer); - return value == null ? null : PlatformRendererType.values()[((Long) value).intValue()]; - } - case (byte) 131: - { - Object value = readValue(buffer); - return value == null ? null : PlatformJointType.values()[((Long) value).intValue()]; - } - case (byte) 132: - { - Object value = readValue(buffer); - return value == null ? null : PlatformCapType.values()[((Long) value).intValue()]; - } - case (byte) 133: - { - Object value = readValue(buffer); - return value == null - ? null - : PlatformPatternItemType.values()[((Long) value).intValue()]; - } - case (byte) 134: - { - Object value = readValue(buffer); - return value == null - ? null - : PlatformMapBitmapScaling.values()[((Long) value).intValue()]; - } - case (byte) 135: - return PlatformCameraPosition.fromList((ArrayList) readValue(buffer)); - case (byte) 136: - return PlatformCameraUpdate.fromList((ArrayList) readValue(buffer)); + case (byte) 129: { + Object value = readValue(buffer); + return value == null ? null : PlatformMapType.values()[((Long) value).intValue()]; + } + case (byte) 130: { + Object value = readValue(buffer); + return value == null ? null : PlatformRendererType.values()[((Long) value).intValue()]; + } + case (byte) 131: { + Object value = readValue(buffer); + return value == null ? null : PlatformMarkerCollisionBehavior.values()[((Long) value).intValue()]; + } + case (byte) 132: { + Object value = readValue(buffer); + return value == null ? null : PlatformJointType.values()[((Long) value).intValue()]; + } + case (byte) 133: { + Object value = readValue(buffer); + return value == null ? null : PlatformCapType.values()[((Long) value).intValue()]; + } + case (byte) 134: { + Object value = readValue(buffer); + return value == null ? null : PlatformPatternItemType.values()[((Long) value).intValue()]; + } + case (byte) 135: { + Object value = readValue(buffer); + return value == null ? null : PlatformMarkerType.values()[((Long) value).intValue()]; + } + case (byte) 136: { + Object value = readValue(buffer); + return value == null ? null : PlatformMapBitmapScaling.values()[((Long) value).intValue()]; + } case (byte) 137: - return PlatformCameraUpdateNewCameraPosition.fromList( - (ArrayList) readValue(buffer)); + return PlatformCameraPosition.fromList((ArrayList) readValue(buffer)); case (byte) 138: - return PlatformCameraUpdateNewLatLng.fromList((ArrayList) readValue(buffer)); + return PlatformCameraUpdate.fromList((ArrayList) readValue(buffer)); case (byte) 139: - return PlatformCameraUpdateNewLatLngBounds.fromList( - (ArrayList) readValue(buffer)); + return PlatformCameraUpdateNewCameraPosition.fromList((ArrayList) readValue(buffer)); case (byte) 140: - return PlatformCameraUpdateNewLatLngZoom.fromList((ArrayList) readValue(buffer)); + return PlatformCameraUpdateNewLatLng.fromList((ArrayList) readValue(buffer)); case (byte) 141: - return PlatformCameraUpdateScrollBy.fromList((ArrayList) readValue(buffer)); + return PlatformCameraUpdateNewLatLngBounds.fromList((ArrayList) readValue(buffer)); case (byte) 142: - return PlatformCameraUpdateZoomBy.fromList((ArrayList) readValue(buffer)); + return PlatformCameraUpdateNewLatLngZoom.fromList((ArrayList) readValue(buffer)); case (byte) 143: - return PlatformCameraUpdateZoom.fromList((ArrayList) readValue(buffer)); + return PlatformCameraUpdateScrollBy.fromList((ArrayList) readValue(buffer)); case (byte) 144: - return PlatformCameraUpdateZoomTo.fromList((ArrayList) readValue(buffer)); + return PlatformCameraUpdateZoomBy.fromList((ArrayList) readValue(buffer)); case (byte) 145: - return PlatformCircle.fromList((ArrayList) readValue(buffer)); + return PlatformCameraUpdateZoom.fromList((ArrayList) readValue(buffer)); case (byte) 146: - return PlatformHeatmap.fromList((ArrayList) readValue(buffer)); + return PlatformCameraUpdateZoomTo.fromList((ArrayList) readValue(buffer)); case (byte) 147: - return PlatformClusterManager.fromList((ArrayList) readValue(buffer)); + return PlatformCircle.fromList((ArrayList) readValue(buffer)); case (byte) 148: - return PlatformDoublePair.fromList((ArrayList) readValue(buffer)); + return PlatformHeatmap.fromList((ArrayList) readValue(buffer)); case (byte) 149: - return PlatformInfoWindow.fromList((ArrayList) readValue(buffer)); + return PlatformClusterManager.fromList((ArrayList) readValue(buffer)); case (byte) 150: - return PlatformMarker.fromList((ArrayList) readValue(buffer)); + return PlatformDoublePair.fromList((ArrayList) readValue(buffer)); case (byte) 151: - return PlatformPolygon.fromList((ArrayList) readValue(buffer)); + return PlatformInfoWindow.fromList((ArrayList) readValue(buffer)); case (byte) 152: - return PlatformPolyline.fromList((ArrayList) readValue(buffer)); + return PlatformMarker.fromList((ArrayList) readValue(buffer)); case (byte) 153: - return PlatformCap.fromList((ArrayList) readValue(buffer)); + return PlatformPolygon.fromList((ArrayList) readValue(buffer)); case (byte) 154: - return PlatformPatternItem.fromList((ArrayList) readValue(buffer)); + return PlatformPolyline.fromList((ArrayList) readValue(buffer)); case (byte) 155: - return PlatformTile.fromList((ArrayList) readValue(buffer)); + return PlatformCap.fromList((ArrayList) readValue(buffer)); case (byte) 156: - return PlatformTileOverlay.fromList((ArrayList) readValue(buffer)); + return PlatformPatternItem.fromList((ArrayList) readValue(buffer)); case (byte) 157: - return PlatformEdgeInsets.fromList((ArrayList) readValue(buffer)); + return PlatformTile.fromList((ArrayList) readValue(buffer)); case (byte) 158: - return PlatformLatLng.fromList((ArrayList) readValue(buffer)); + return PlatformTileOverlay.fromList((ArrayList) readValue(buffer)); case (byte) 159: - return PlatformLatLngBounds.fromList((ArrayList) readValue(buffer)); + return PlatformEdgeInsets.fromList((ArrayList) readValue(buffer)); case (byte) 160: - return PlatformCluster.fromList((ArrayList) readValue(buffer)); + return PlatformLatLng.fromList((ArrayList) readValue(buffer)); case (byte) 161: - return PlatformGroundOverlay.fromList((ArrayList) readValue(buffer)); + return PlatformLatLngBounds.fromList((ArrayList) readValue(buffer)); case (byte) 162: - return PlatformCameraTargetBounds.fromList((ArrayList) readValue(buffer)); + return PlatformCluster.fromList((ArrayList) readValue(buffer)); case (byte) 163: - return PlatformMapViewCreationParams.fromList((ArrayList) readValue(buffer)); + return PlatformGroundOverlay.fromList((ArrayList) readValue(buffer)); case (byte) 164: - return PlatformMapConfiguration.fromList((ArrayList) readValue(buffer)); + return PlatformCameraTargetBounds.fromList((ArrayList) readValue(buffer)); case (byte) 165: - return PlatformPoint.fromList((ArrayList) readValue(buffer)); + return PlatformMapViewCreationParams.fromList((ArrayList) readValue(buffer)); case (byte) 166: - return PlatformTileLayer.fromList((ArrayList) readValue(buffer)); + return PlatformMapConfiguration.fromList((ArrayList) readValue(buffer)); case (byte) 167: - return PlatformZoomRange.fromList((ArrayList) readValue(buffer)); + return PlatformPoint.fromList((ArrayList) readValue(buffer)); case (byte) 168: - return PlatformBitmap.fromList((ArrayList) readValue(buffer)); + return PlatformTileLayer.fromList((ArrayList) readValue(buffer)); case (byte) 169: - return PlatformBitmapDefaultMarker.fromList((ArrayList) readValue(buffer)); + return PlatformZoomRange.fromList((ArrayList) readValue(buffer)); case (byte) 170: - return PlatformBitmapBytes.fromList((ArrayList) readValue(buffer)); + return PlatformBitmap.fromList((ArrayList) readValue(buffer)); case (byte) 171: - return PlatformBitmapAsset.fromList((ArrayList) readValue(buffer)); + return PlatformBitmapDefaultMarker.fromList((ArrayList) readValue(buffer)); case (byte) 172: - return PlatformBitmapAssetImage.fromList((ArrayList) readValue(buffer)); + return PlatformBitmapBytes.fromList((ArrayList) readValue(buffer)); case (byte) 173: - return PlatformBitmapAssetMap.fromList((ArrayList) readValue(buffer)); + return PlatformBitmapAsset.fromList((ArrayList) readValue(buffer)); case (byte) 174: + return PlatformBitmapAssetImage.fromList((ArrayList) readValue(buffer)); + case (byte) 175: + return PlatformBitmapAssetMap.fromList((ArrayList) readValue(buffer)); + case (byte) 176: return PlatformBitmapBytesMap.fromList((ArrayList) readValue(buffer)); + case (byte) 177: + return PlatformBitmapPinConfig.fromList((ArrayList) readValue(buffer)); default: return super.readValueOfType(type, buffer); } @@ -6339,144 +6215,154 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) { } else if (value instanceof PlatformRendererType) { stream.write(130); writeValue(stream, value == null ? null : ((PlatformRendererType) value).index); - } else if (value instanceof PlatformJointType) { + } else if (value instanceof PlatformMarkerCollisionBehavior) { stream.write(131); + writeValue(stream, value == null ? null : ((PlatformMarkerCollisionBehavior) value).index); + } else if (value instanceof PlatformJointType) { + stream.write(132); writeValue(stream, value == null ? null : ((PlatformJointType) value).index); } else if (value instanceof PlatformCapType) { - stream.write(132); + stream.write(133); writeValue(stream, value == null ? null : ((PlatformCapType) value).index); } else if (value instanceof PlatformPatternItemType) { - stream.write(133); + stream.write(134); writeValue(stream, value == null ? null : ((PlatformPatternItemType) value).index); + } else if (value instanceof PlatformMarkerType) { + stream.write(135); + writeValue(stream, value == null ? null : ((PlatformMarkerType) value).index); } else if (value instanceof PlatformMapBitmapScaling) { - stream.write(134); + stream.write(136); writeValue(stream, value == null ? null : ((PlatformMapBitmapScaling) value).index); } else if (value instanceof PlatformCameraPosition) { - stream.write(135); + stream.write(137); writeValue(stream, ((PlatformCameraPosition) value).toList()); } else if (value instanceof PlatformCameraUpdate) { - stream.write(136); + stream.write(138); writeValue(stream, ((PlatformCameraUpdate) value).toList()); } else if (value instanceof PlatformCameraUpdateNewCameraPosition) { - stream.write(137); + stream.write(139); writeValue(stream, ((PlatformCameraUpdateNewCameraPosition) value).toList()); } else if (value instanceof PlatformCameraUpdateNewLatLng) { - stream.write(138); + stream.write(140); writeValue(stream, ((PlatformCameraUpdateNewLatLng) value).toList()); } else if (value instanceof PlatformCameraUpdateNewLatLngBounds) { - stream.write(139); + stream.write(141); writeValue(stream, ((PlatformCameraUpdateNewLatLngBounds) value).toList()); } else if (value instanceof PlatformCameraUpdateNewLatLngZoom) { - stream.write(140); + stream.write(142); writeValue(stream, ((PlatformCameraUpdateNewLatLngZoom) value).toList()); } else if (value instanceof PlatformCameraUpdateScrollBy) { - stream.write(141); + stream.write(143); writeValue(stream, ((PlatformCameraUpdateScrollBy) value).toList()); } else if (value instanceof PlatformCameraUpdateZoomBy) { - stream.write(142); + stream.write(144); writeValue(stream, ((PlatformCameraUpdateZoomBy) value).toList()); } else if (value instanceof PlatformCameraUpdateZoom) { - stream.write(143); + stream.write(145); writeValue(stream, ((PlatformCameraUpdateZoom) value).toList()); } else if (value instanceof PlatformCameraUpdateZoomTo) { - stream.write(144); + stream.write(146); writeValue(stream, ((PlatformCameraUpdateZoomTo) value).toList()); } else if (value instanceof PlatformCircle) { - stream.write(145); + stream.write(147); writeValue(stream, ((PlatformCircle) value).toList()); } else if (value instanceof PlatformHeatmap) { - stream.write(146); + stream.write(148); writeValue(stream, ((PlatformHeatmap) value).toList()); } else if (value instanceof PlatformClusterManager) { - stream.write(147); + stream.write(149); writeValue(stream, ((PlatformClusterManager) value).toList()); } else if (value instanceof PlatformDoublePair) { - stream.write(148); + stream.write(150); writeValue(stream, ((PlatformDoublePair) value).toList()); } else if (value instanceof PlatformInfoWindow) { - stream.write(149); + stream.write(151); writeValue(stream, ((PlatformInfoWindow) value).toList()); } else if (value instanceof PlatformMarker) { - stream.write(150); + stream.write(152); writeValue(stream, ((PlatformMarker) value).toList()); } else if (value instanceof PlatformPolygon) { - stream.write(151); + stream.write(153); writeValue(stream, ((PlatformPolygon) value).toList()); } else if (value instanceof PlatformPolyline) { - stream.write(152); + stream.write(154); writeValue(stream, ((PlatformPolyline) value).toList()); } else if (value instanceof PlatformCap) { - stream.write(153); + stream.write(155); writeValue(stream, ((PlatformCap) value).toList()); } else if (value instanceof PlatformPatternItem) { - stream.write(154); + stream.write(156); writeValue(stream, ((PlatformPatternItem) value).toList()); } else if (value instanceof PlatformTile) { - stream.write(155); + stream.write(157); writeValue(stream, ((PlatformTile) value).toList()); } else if (value instanceof PlatformTileOverlay) { - stream.write(156); + stream.write(158); writeValue(stream, ((PlatformTileOverlay) value).toList()); } else if (value instanceof PlatformEdgeInsets) { - stream.write(157); + stream.write(159); writeValue(stream, ((PlatformEdgeInsets) value).toList()); } else if (value instanceof PlatformLatLng) { - stream.write(158); + stream.write(160); writeValue(stream, ((PlatformLatLng) value).toList()); } else if (value instanceof PlatformLatLngBounds) { - stream.write(159); + stream.write(161); writeValue(stream, ((PlatformLatLngBounds) value).toList()); } else if (value instanceof PlatformCluster) { - stream.write(160); + stream.write(162); writeValue(stream, ((PlatformCluster) value).toList()); } else if (value instanceof PlatformGroundOverlay) { - stream.write(161); + stream.write(163); writeValue(stream, ((PlatformGroundOverlay) value).toList()); } else if (value instanceof PlatformCameraTargetBounds) { - stream.write(162); + stream.write(164); writeValue(stream, ((PlatformCameraTargetBounds) value).toList()); } else if (value instanceof PlatformMapViewCreationParams) { - stream.write(163); + stream.write(165); writeValue(stream, ((PlatformMapViewCreationParams) value).toList()); } else if (value instanceof PlatformMapConfiguration) { - stream.write(164); + stream.write(166); writeValue(stream, ((PlatformMapConfiguration) value).toList()); } else if (value instanceof PlatformPoint) { - stream.write(165); + stream.write(167); writeValue(stream, ((PlatformPoint) value).toList()); } else if (value instanceof PlatformTileLayer) { - stream.write(166); + stream.write(168); writeValue(stream, ((PlatformTileLayer) value).toList()); } else if (value instanceof PlatformZoomRange) { - stream.write(167); + stream.write(169); writeValue(stream, ((PlatformZoomRange) value).toList()); } else if (value instanceof PlatformBitmap) { - stream.write(168); + stream.write(170); writeValue(stream, ((PlatformBitmap) value).toList()); } else if (value instanceof PlatformBitmapDefaultMarker) { - stream.write(169); + stream.write(171); writeValue(stream, ((PlatformBitmapDefaultMarker) value).toList()); } else if (value instanceof PlatformBitmapBytes) { - stream.write(170); + stream.write(172); writeValue(stream, ((PlatformBitmapBytes) value).toList()); } else if (value instanceof PlatformBitmapAsset) { - stream.write(171); + stream.write(173); writeValue(stream, ((PlatformBitmapAsset) value).toList()); } else if (value instanceof PlatformBitmapAssetImage) { - stream.write(172); + stream.write(174); writeValue(stream, ((PlatformBitmapAssetImage) value).toList()); } else if (value instanceof PlatformBitmapAssetMap) { - stream.write(173); + stream.write(175); writeValue(stream, ((PlatformBitmapAssetMap) value).toList()); } else if (value instanceof PlatformBitmapBytesMap) { - stream.write(174); + stream.write(176); writeValue(stream, ((PlatformBitmapBytesMap) value).toList()); + } else if (value instanceof PlatformBitmapPinConfig) { + stream.write(177); + writeValue(stream, ((PlatformBitmapPinConfig) value).toList()); } else { super.writeValue(stream, value); } } } + /** Asynchronous error handling return type for non-nullable API method returns. */ public interface Result { /** Success case callback method for handling returns. */ @@ -6504,9 +6390,9 @@ public interface VoidResult { /** * Interface for non-test interactions with the native SDK. * - *

For test-only state queries, see [MapsInspectorApi]. + * For test-only state queries, see [MapsInspectorApi]. * - *

Generated interface from Pigeon that represents a handler of messages from Flutter. + * Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface MapsApi { /** Returns once the map instance is available. */ @@ -6514,92 +6400,84 @@ public interface MapsApi { /** * Updates the map's configuration options. * - *

Only non-null configuration values will result in updates; options with null values will - * remain unchanged. + * Only non-null configuration values will result in updates; options with + * null values will remain unchanged. */ void updateMapConfiguration(@NonNull PlatformMapConfiguration configuration); /** Updates the set of circles on the map. */ - void updateCircles( - @NonNull List toAdd, - @NonNull List toChange, - @NonNull List idsToRemove); + void updateCircles(@NonNull List toAdd, @NonNull List toChange, @NonNull List idsToRemove); /** Updates the set of heatmaps on the map. */ - void updateHeatmaps( - @NonNull List toAdd, - @NonNull List toChange, - @NonNull List idsToRemove); + void updateHeatmaps(@NonNull List toAdd, @NonNull List toChange, @NonNull List idsToRemove); /** Updates the set of custer managers for clusters on the map. */ - void updateClusterManagers( - @NonNull List toAdd, @NonNull List idsToRemove); + void updateClusterManagers(@NonNull List toAdd, @NonNull List idsToRemove); /** Updates the set of markers on the map. */ - void updateMarkers( - @NonNull List toAdd, - @NonNull List toChange, - @NonNull List idsToRemove); + void updateMarkers(@NonNull List toAdd, @NonNull List toChange, @NonNull List idsToRemove); /** Updates the set of polygonss on the map. */ - void updatePolygons( - @NonNull List toAdd, - @NonNull List toChange, - @NonNull List idsToRemove); + void updatePolygons(@NonNull List toAdd, @NonNull List toChange, @NonNull List idsToRemove); /** Updates the set of polylines on the map. */ - void updatePolylines( - @NonNull List toAdd, - @NonNull List toChange, - @NonNull List idsToRemove); + void updatePolylines(@NonNull List toAdd, @NonNull List toChange, @NonNull List idsToRemove); /** Updates the set of tile overlays on the map. */ - void updateTileOverlays( - @NonNull List toAdd, - @NonNull List toChange, - @NonNull List idsToRemove); + void updateTileOverlays(@NonNull List toAdd, @NonNull List toChange, @NonNull List idsToRemove); /** Updates the set of ground overlays on the map. */ - void updateGroundOverlays( - @NonNull List toAdd, - @NonNull List toChange, - @NonNull List idsToRemove); + void updateGroundOverlays(@NonNull List toAdd, @NonNull List toChange, @NonNull List idsToRemove); /** Gets the screen coordinate for the given map location. */ - @NonNull + @NonNull PlatformPoint getScreenCoordinate(@NonNull PlatformLatLng latLng); /** Gets the map location for the given screen coordinate. */ - @NonNull + @NonNull PlatformLatLng getLatLng(@NonNull PlatformPoint screenCoordinate); /** Gets the map region currently displayed on the map. */ - @NonNull + @NonNull PlatformLatLngBounds getVisibleRegion(); - /** Moves the camera according to [cameraUpdate] immediately, with no animation. */ + /** + * Moves the camera according to [cameraUpdate] immediately, with no + * animation. + */ void moveCamera(@NonNull PlatformCameraUpdate cameraUpdate); /** - * Moves the camera according to [cameraUpdate], animating the update using a duration in - * milliseconds if provided. + * Moves the camera according to [cameraUpdate], animating the update using a + * duration in milliseconds if provided. */ - void animateCamera( - @NonNull PlatformCameraUpdate cameraUpdate, @Nullable Long durationMilliseconds); + void animateCamera(@NonNull PlatformCameraUpdate cameraUpdate, @Nullable Long durationMilliseconds); /** Gets the current map zoom level. */ - @NonNull + @NonNull Double getZoomLevel(); /** Show the info window for the marker with the given ID. */ void showInfoWindow(@NonNull String markerId); /** Hide the info window for the marker with the given ID. */ void hideInfoWindow(@NonNull String markerId); - /** Returns true if the marker with the given ID is currently displaying its info window. */ - @NonNull + /** + * Returns true if the marker with the given ID is currently displaying its + * info window. + */ + @NonNull Boolean isInfoWindowShown(@NonNull String markerId); /** - * Sets the style to the given map style string, where an empty string indicates that the style - * should be cleared. + * Sets the style to the given map style string, where an empty string + * indicates that the style should be cleared. * - *

Returns false if there was an error setting the style, such as an invalid style string. + * Returns false if there was an error setting the style, such as an invalid + * style string. */ - @NonNull + @NonNull Boolean setStyle(@NonNull String style); /** - * Returns true if the last attempt to set a style, either via initial map style or setMapStyle, - * succeeded. + * Returns true if the last attempt to set a style, either via initial map + * style or setMapStyle, succeeded. * - *

This allows checking asynchronously for initial style failures, as there is no way to - * return failures from map initialization. + * This allows checking asynchronously for initial style failures, as there + * is no way to return failures from map initialization. */ - @NonNull + @NonNull Boolean didLastStyleSucceed(); + /** + * Returns true if this map supports advanced markers. + * + * This allows checking if the map supports advanced markers before + * attempting to use them. + */ + @NonNull + Boolean isAdvancedMarkersAvailable(); /** Clears the cache of tiles previously requseted from the tile provider. */ void clearTileCache(@NonNull String tileOverlayId); /** Takes a snapshot of the map and returns its image data. */ @@ -6609,23 +6487,16 @@ void animateCamera( static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } - /** Sets up an instance of `MapsApi` to handle messages through the `binaryMessenger`. */ + /**Sets up an instance of `MapsApi` to handle messages through the `binaryMessenger`. */ static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable MapsApi api) { setUp(binaryMessenger, "", api); } - - static void setUp( - @NonNull BinaryMessenger binaryMessenger, - @NonNull String messageChannelSuffix, - @Nullable MapsApi api) { + static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String messageChannelSuffix, @Nullable MapsApi api) { messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6652,10 +6523,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6665,7 +6533,8 @@ public void error(Throwable error) { try { api.updateMapConfiguration(configurationArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6677,10 +6546,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6692,7 +6558,8 @@ public void error(Throwable error) { try { api.updateCircles(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6704,10 +6571,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6719,7 +6583,8 @@ public void error(Throwable error) { try { api.updateHeatmaps(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6731,10 +6596,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6745,7 +6607,8 @@ public void error(Throwable error) { try { api.updateClusterManagers(toAddArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6757,10 +6620,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6772,7 +6632,8 @@ public void error(Throwable error) { try { api.updateMarkers(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6784,10 +6645,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6799,7 +6657,8 @@ public void error(Throwable error) { try { api.updatePolygons(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6811,10 +6670,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6826,7 +6682,8 @@ public void error(Throwable error) { try { api.updatePolylines(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6838,10 +6695,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6853,7 +6707,8 @@ public void error(Throwable error) { try { api.updateTileOverlays(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6865,10 +6720,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6880,7 +6732,8 @@ public void error(Throwable error) { try { api.updateGroundOverlays(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6892,10 +6745,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6905,7 +6755,8 @@ public void error(Throwable error) { try { PlatformPoint output = api.getScreenCoordinate(latLngArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6917,10 +6768,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6930,7 +6778,8 @@ public void error(Throwable error) { try { PlatformLatLng output = api.getLatLng(screenCoordinateArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6942,10 +6791,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6953,7 +6799,8 @@ public void error(Throwable error) { try { PlatformLatLngBounds output = api.getVisibleRegion(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6965,10 +6812,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6978,7 +6822,8 @@ public void error(Throwable error) { try { api.moveCamera(cameraUpdateArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6990,10 +6835,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7004,7 +6846,8 @@ public void error(Throwable error) { try { api.animateCamera(cameraUpdateArg, durationMillisecondsArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7016,10 +6859,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7027,7 +6867,8 @@ public void error(Throwable error) { try { Double output = api.getZoomLevel(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7039,10 +6880,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7052,7 +6890,8 @@ public void error(Throwable error) { try { api.showInfoWindow(markerIdArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7064,10 +6903,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7077,7 +6913,8 @@ public void error(Throwable error) { try { api.hideInfoWindow(markerIdArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7089,10 +6926,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7102,7 +6936,8 @@ public void error(Throwable error) { try { Boolean output = api.isInfoWindowShown(markerIdArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7114,10 +6949,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7127,7 +6959,8 @@ public void error(Throwable error) { try { Boolean output = api.setStyle(styleArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7139,10 +6972,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7150,7 +6980,8 @@ public void error(Throwable error) { try { Boolean output = api.didLastStyleSucceed(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7162,10 +6993,28 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isAdvancedMarkersAvailable" + messageChannelSuffix, getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList<>(); + try { + Boolean output = api.isAdvancedMarkersAvailable(); + wrapped.add(0, output); + } + catch (Throwable exception) { + wrapped = wrapError(exception); + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7175,7 +7024,8 @@ public void error(Throwable error) { try { api.clearTileCache(tileOverlayIdArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7187,10 +7037,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7224,463 +7071,389 @@ public static class MapsCallbackApi { public MapsCallbackApi(@NonNull BinaryMessenger argBinaryMessenger) { this(argBinaryMessenger, ""); } - - public MapsCallbackApi( - @NonNull BinaryMessenger argBinaryMessenger, @NonNull String messageChannelSuffix) { + public MapsCallbackApi(@NonNull BinaryMessenger argBinaryMessenger, @NonNull String messageChannelSuffix) { this.binaryMessenger = argBinaryMessenger; this.messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; } - /** Public interface for sending reply. The codec used by MapsCallbackApi. */ + /** + * Public interface for sending reply. + * The codec used by MapsCallbackApi. + */ static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } /** Called when the map camera starts moving. */ public void onCameraMoveStarted(@NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( null, channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map camera moves. */ - public void onCameraMove( - @NonNull PlatformCameraPosition cameraPositionArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove" - + messageChannelSuffix; + public void onCameraMove(@NonNull PlatformCameraPosition cameraPositionArg, @NonNull VoidResult result) { + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(cameraPositionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map camera stops moving. */ public void onCameraIdle(@NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( null, channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map, not a specifc map object, is tapped. */ public void onTap(@NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map, not a specifc map object, is long pressed. */ public void onLongPress(@NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker is tapped. */ public void onMarkerTap(@NonNull String markerIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(markerIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag starts. */ - public void onMarkerDragStart( - @NonNull String markerIdArg, - @NonNull PlatformLatLng positionArg, - @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart" - + messageChannelSuffix; + public void onMarkerDragStart(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag updates. */ - public void onMarkerDrag( - @NonNull String markerIdArg, - @NonNull PlatformLatLng positionArg, - @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag" - + messageChannelSuffix; + public void onMarkerDrag(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag ends. */ - public void onMarkerDragEnd( - @NonNull String markerIdArg, - @NonNull PlatformLatLng positionArg, - @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd" - + messageChannelSuffix; + public void onMarkerDragEnd(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker's info window is tapped. */ public void onInfoWindowTap(@NonNull String markerIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(markerIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a circle is tapped. */ public void onCircleTap(@NonNull String circleIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(circleIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker cluster is tapped. */ public void onClusterTap(@NonNull PlatformCluster clusterArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(clusterArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a polygon is tapped. */ public void onPolygonTap(@NonNull String polygonIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(polygonIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a polyline is tapped. */ public void onPolylineTap(@NonNull String polylineIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(polylineIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a ground overlay is tapped. */ public void onGroundOverlayTap(@NonNull String groundOverlayIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(groundOverlayIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called to get data for a map tile. */ - public void getTileOverlayTile( - @NonNull String tileOverlayIdArg, - @NonNull PlatformPoint locationArg, - @NonNull Long zoomArg, - @NonNull Result result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile" - + messageChannelSuffix; + public void getTileOverlayTile(@NonNull String tileOverlayIdArg, @NonNull PlatformPoint locationArg, @NonNull Long zoomArg, @NonNull Result result) { + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(tileOverlayIdArg, locationArg, zoomArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else if (listReply.get(0) == null) { - result.error( - new FlutterError( - "null-error", - "Flutter api returned null value for non-null return value.", - "")); + result.error(new FlutterError("null-error", "Flutter api returned null value for non-null return value.", "")); } else { @SuppressWarnings("ConstantConditions") PlatformTile output = (PlatformTile) listReply.get(0); result.success(output); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } } /** * Interface for global SDK initialization. * - *

Generated interface from Pigeon that represents a handler of messages from Flutter. + * Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface MapsInitializerApi { /** * Initializes the Google Maps SDK with the given renderer preference. * - *

A null renderer preference will result in the default renderer. + * A null renderer preference will result in the default renderer. * - *

Calling this more than once in the lifetime of an application will result in an error. + * Calling this more than once in the lifetime of an application will result + * in an error. */ - void initializeWithPreferredRenderer( - @Nullable PlatformRendererType type, @NonNull Result result); + void initializeWithPreferredRenderer(@Nullable PlatformRendererType type, @NonNull Result result); /** The codec used by MapsInitializerApi. */ static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } - /** - * Sets up an instance of `MapsInitializerApi` to handle messages through the `binaryMessenger`. - */ + /**Sets up an instance of `MapsInitializerApi` to handle messages through the `binaryMessenger`. */ static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable MapsInitializerApi api) { setUp(binaryMessenger, "", api); } - - static void setUp( - @NonNull BinaryMessenger binaryMessenger, - @NonNull String messageChannelSuffix, - @Nullable MapsInitializerApi api) { + static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String messageChannelSuffix, @Nullable MapsInitializerApi api) { messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7709,10 +7482,11 @@ public void error(Throwable error) { } } /** - * Dummy interface to force generation of the platform view creation params, which are not used in - * any Pigeon calls, only the platform view creation call made internally by Flutter. + * Dummy interface to force generation of the platform view creation params, + * which are not used in any Pigeon calls, only the platform view creation + * call made internally by Flutter. * - *

Generated interface from Pigeon that represents a handler of messages from Flutter. + * Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface MapsPlatformViewApi { @@ -7722,26 +7496,16 @@ public interface MapsPlatformViewApi { static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } - /** - * Sets up an instance of `MapsPlatformViewApi` to handle messages through the - * `binaryMessenger`. - */ + /**Sets up an instance of `MapsPlatformViewApi` to handle messages through the `binaryMessenger`. */ static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable MapsPlatformViewApi api) { setUp(binaryMessenger, "", api); } - - static void setUp( - @NonNull BinaryMessenger binaryMessenger, - @NonNull String messageChannelSuffix, - @Nullable MapsPlatformViewApi api) { + static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String messageChannelSuffix, @Nullable MapsPlatformViewApi api) { messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7751,7 +7515,8 @@ static void setUp( try { api.createView(typeArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7765,81 +7530,72 @@ static void setUp( /** * Inspector API only intended for use in integration tests. * - *

Generated interface from Pigeon that represents a handler of messages from Flutter. + * Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface MapsInspectorApi { - @NonNull + @NonNull Boolean areBuildingsEnabled(); - @NonNull + @NonNull Boolean areRotateGesturesEnabled(); - @NonNull + @NonNull Boolean areZoomControlsEnabled(); - @NonNull + @NonNull Boolean areScrollGesturesEnabled(); - @NonNull + @NonNull Boolean areTiltGesturesEnabled(); - @NonNull + @NonNull Boolean areZoomGesturesEnabled(); - @NonNull + @NonNull Boolean isCompassEnabled(); - @Nullable + @Nullable Boolean isLiteModeEnabled(); - @NonNull + @NonNull Boolean isMapToolbarEnabled(); - @NonNull + @NonNull Boolean isMyLocationButtonEnabled(); - @NonNull + @NonNull Boolean isTrafficEnabled(); - @Nullable + @Nullable PlatformTileLayer getTileOverlayInfo(@NonNull String tileOverlayId); - @Nullable + @Nullable PlatformGroundOverlay getGroundOverlayInfo(@NonNull String groundOverlayId); - @NonNull + @NonNull PlatformZoomRange getZoomRange(); - @NonNull + @NonNull List getClusters(@NonNull String clusterManagerId); - @NonNull + @NonNull PlatformCameraPosition getCameraPosition(); /** The codec used by MapsInspectorApi. */ static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } - /** - * Sets up an instance of `MapsInspectorApi` to handle messages through the `binaryMessenger`. - */ + /**Sets up an instance of `MapsInspectorApi` to handle messages through the `binaryMessenger`. */ static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable MapsInspectorApi api) { setUp(binaryMessenger, "", api); } - - static void setUp( - @NonNull BinaryMessenger binaryMessenger, - @NonNull String messageChannelSuffix, - @Nullable MapsInspectorApi api) { + static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String messageChannelSuffix, @Nullable MapsInspectorApi api) { messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7847,7 +7603,8 @@ static void setUp( try { Boolean output = api.areBuildingsEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7859,10 +7616,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7870,7 +7624,8 @@ static void setUp( try { Boolean output = api.areRotateGesturesEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7882,10 +7637,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7893,7 +7645,8 @@ static void setUp( try { Boolean output = api.areZoomControlsEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7905,10 +7658,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7916,7 +7666,8 @@ static void setUp( try { Boolean output = api.areScrollGesturesEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7928,10 +7679,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7939,7 +7687,8 @@ static void setUp( try { Boolean output = api.areTiltGesturesEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7951,10 +7700,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7962,7 +7708,8 @@ static void setUp( try { Boolean output = api.areZoomGesturesEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7974,10 +7721,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7985,7 +7729,8 @@ static void setUp( try { Boolean output = api.isCompassEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7997,10 +7742,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8008,7 +7750,8 @@ static void setUp( try { Boolean output = api.isLiteModeEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8020,10 +7763,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8031,7 +7771,8 @@ static void setUp( try { Boolean output = api.isMapToolbarEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8043,10 +7784,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8054,7 +7792,8 @@ static void setUp( try { Boolean output = api.isMyLocationButtonEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8066,10 +7805,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8077,7 +7813,8 @@ static void setUp( try { Boolean output = api.isTrafficEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8089,10 +7826,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8102,7 +7836,8 @@ static void setUp( try { PlatformTileLayer output = api.getTileOverlayInfo(tileOverlayIdArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8114,10 +7849,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8127,7 +7859,8 @@ static void setUp( try { PlatformGroundOverlay output = api.getGroundOverlayInfo(groundOverlayIdArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8139,10 +7872,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8150,7 +7880,8 @@ static void setUp( try { PlatformZoomRange output = api.getZoomRange(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8162,10 +7893,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8175,7 +7903,8 @@ static void setUp( try { List output = api.getClusters(clusterManagerIdArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8187,10 +7916,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8198,7 +7924,8 @@ static void setUp( try { PlatformCameraPosition output = api.getCameraPosition(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart index b50df06c0b0..d06479433ba 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart @@ -262,7 +262,7 @@ class ExampleGoogleMap extends StatefulWidget { this.onCameraMoveStarted, this.tileOverlays = const {}, this.groundOverlays = const {}, - this.markerType = MarkerType.legacy, + this.markerType = MarkerType.marker, this.onCameraMove, this.onCameraIdle, this.onTap, diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index 7e55c52d051..15b5b42b04e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -581,7 +581,6 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { initialGroundOverlays: mapObjects.groundOverlays .map(_platformGroundOverlayFromGroundOverlay) .toList(), - markerType: _platformMarkerTypeFromMarkerType(markerType), ); const String viewType = 'plugins.flutter.dev/google_maps_android'; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart index d77cb4b83ea..e5187392f71 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v22.7.2), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,8 +18,7 @@ PlatformException _createConnectionError(String channelName) { ); } -List wrapResponse( - {Object? result, PlatformException? error, bool empty = false}) { +List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { if (empty) { return []; } @@ -43,6 +42,12 @@ enum PlatformRendererType { latest, } +enum PlatformMarkerCollisionBehavior { + required, + optionalAndHidesLowerPriority, + requiredAndHidesOptional, +} + /// Join types for polyline joints. enum PlatformJointType { mitered, @@ -67,6 +72,11 @@ enum PlatformPatternItemType { gap, } +enum PlatformMarkerType { + marker, + advancedMarker, +} + /// Pigeon equivalent of [MapBitmapScaling]. enum PlatformMapBitmapScaling { auto, @@ -518,6 +528,7 @@ class PlatformMarker { this.zIndex = 0.0, required this.markerId, this.clusterManagerId, + this.collisionBehavior = PlatformMarkerCollisionBehavior.required, }); double alpha; @@ -546,6 +557,8 @@ class PlatformMarker { String? clusterManagerId; + PlatformMarkerCollisionBehavior collisionBehavior; + Object encode() { return [ alpha, @@ -561,6 +574,7 @@ class PlatformMarker { zIndex, markerId, clusterManagerId, + collisionBehavior, ]; } @@ -580,6 +594,7 @@ class PlatformMarker { zIndex: result[10]! as double, markerId: result[11]! as String, clusterManagerId: result[12] as String?, + collisionBehavior: result[13]! as PlatformMarkerCollisionBehavior, ); } } @@ -1161,12 +1176,9 @@ class PlatformMapViewCreationParams { initialPolygons: (result[4] as List?)!.cast(), initialPolylines: (result[5] as List?)!.cast(), initialHeatmaps: (result[6] as List?)!.cast(), - initialTileOverlays: - (result[7] as List?)!.cast(), - initialClusterManagers: - (result[8] as List?)!.cast(), - initialGroundOverlays: - (result[9] as List?)!.cast(), + initialTileOverlays: (result[7] as List?)!.cast(), + initialClusterManagers: (result[8] as List?)!.cast(), + initialGroundOverlays: (result[9] as List?)!.cast(), ); } } @@ -1192,7 +1204,8 @@ class PlatformMapConfiguration { this.trafficEnabled, this.buildingsEnabled, this.liteModeEnabled, - this.cloudMapId, + this.markerType, + this.mapId, this.style, }); @@ -1232,7 +1245,9 @@ class PlatformMapConfiguration { bool? liteModeEnabled; - String? cloudMapId; + PlatformMarkerType? markerType; + + String? mapId; String? style; @@ -1256,7 +1271,8 @@ class PlatformMapConfiguration { trafficEnabled, buildingsEnabled, liteModeEnabled, - cloudMapId, + markerType, + mapId, style, ]; } @@ -1282,8 +1298,9 @@ class PlatformMapConfiguration { trafficEnabled: result[15] as bool?, buildingsEnabled: result[16] as bool?, liteModeEnabled: result[17] as bool?, - cloudMapId: result[18] as String?, - style: result[19] as String?, + markerType: result[18] as PlatformMarkerType?, + mapId: result[19] as String?, + style: result[20] as String?, ); } } @@ -1608,6 +1625,54 @@ class PlatformBitmapBytesMap { } } +/// Pigeon equivalent of [PinConfig]. +class PlatformBitmapPinConfig { + PlatformBitmapPinConfig({ + this.backgroundColor, + this.borderColor, + this.glyphColor, + this.glyphBitmap, + this.glyphText, + this.glyphTextColor, + }); + + int? backgroundColor; + + int? borderColor; + + int? glyphColor; + + PlatformBitmap? glyphBitmap; + + String? glyphText; + + int? glyphTextColor; + + Object encode() { + return [ + backgroundColor, + borderColor, + glyphColor, + glyphBitmap, + glyphText, + glyphTextColor, + ]; + } + + static PlatformBitmapPinConfig decode(Object result) { + result as List; + return PlatformBitmapPinConfig( + backgroundColor: result[0] as int?, + borderColor: result[1] as int?, + glyphColor: result[2] as int?, + glyphBitmap: result[3] as PlatformBitmap?, + glyphText: result[4] as String?, + glyphTextColor: result[5] as int?, + ); + } +} + + class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -1615,144 +1680,153 @@ class _PigeonCodec extends StandardMessageCodec { if (value is int) { buffer.putUint8(4); buffer.putInt64(value); - } else if (value is PlatformMapType) { + } else if (value is PlatformMapType) { buffer.putUint8(129); writeValue(buffer, value.index); - } else if (value is PlatformRendererType) { + } else if (value is PlatformRendererType) { buffer.putUint8(130); writeValue(buffer, value.index); - } else if (value is PlatformJointType) { + } else if (value is PlatformMarkerCollisionBehavior) { buffer.putUint8(131); writeValue(buffer, value.index); - } else if (value is PlatformCapType) { + } else if (value is PlatformJointType) { buffer.putUint8(132); writeValue(buffer, value.index); - } else if (value is PlatformPatternItemType) { + } else if (value is PlatformCapType) { buffer.putUint8(133); writeValue(buffer, value.index); - } else if (value is PlatformMapBitmapScaling) { + } else if (value is PlatformPatternItemType) { buffer.putUint8(134); writeValue(buffer, value.index); - } else if (value is PlatformCameraPosition) { + } else if (value is PlatformMarkerType) { buffer.putUint8(135); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { + writeValue(buffer, value.index); + } else if (value is PlatformMapBitmapScaling) { buffer.putUint8(136); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewCameraPosition) { + writeValue(buffer, value.index); + } else if (value is PlatformCameraPosition) { buffer.putUint8(137); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLng) { + } else if (value is PlatformCameraUpdate) { buffer.putUint8(138); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngBounds) { + } else if (value is PlatformCameraUpdateNewCameraPosition) { buffer.putUint8(139); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngZoom) { + } else if (value is PlatformCameraUpdateNewLatLng) { buffer.putUint8(140); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateScrollBy) { + } else if (value is PlatformCameraUpdateNewLatLngBounds) { buffer.putUint8(141); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomBy) { + } else if (value is PlatformCameraUpdateNewLatLngZoom) { buffer.putUint8(142); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoom) { + } else if (value is PlatformCameraUpdateScrollBy) { buffer.putUint8(143); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomTo) { + } else if (value is PlatformCameraUpdateZoomBy) { buffer.putUint8(144); writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { + } else if (value is PlatformCameraUpdateZoom) { buffer.putUint8(145); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { + } else if (value is PlatformCameraUpdateZoomTo) { buffer.putUint8(146); writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { + } else if (value is PlatformCircle) { buffer.putUint8(147); writeValue(buffer, value.encode()); - } else if (value is PlatformDoublePair) { + } else if (value is PlatformHeatmap) { buffer.putUint8(148); writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { + } else if (value is PlatformClusterManager) { buffer.putUint8(149); writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { + } else if (value is PlatformDoublePair) { buffer.putUint8(150); writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { + } else if (value is PlatformInfoWindow) { buffer.putUint8(151); writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { + } else if (value is PlatformMarker) { buffer.putUint8(152); writeValue(buffer, value.encode()); - } else if (value is PlatformCap) { + } else if (value is PlatformPolygon) { buffer.putUint8(153); writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { + } else if (value is PlatformPolyline) { buffer.putUint8(154); writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { + } else if (value is PlatformCap) { buffer.putUint8(155); writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { + } else if (value is PlatformPatternItem) { buffer.putUint8(156); writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { + } else if (value is PlatformTile) { buffer.putUint8(157); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { + } else if (value is PlatformTileOverlay) { buffer.putUint8(158); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { + } else if (value is PlatformEdgeInsets) { buffer.putUint8(159); writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { + } else if (value is PlatformLatLng) { buffer.putUint8(160); writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { + } else if (value is PlatformLatLngBounds) { buffer.putUint8(161); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { + } else if (value is PlatformCluster) { buffer.putUint8(162); writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { + } else if (value is PlatformGroundOverlay) { buffer.putUint8(163); writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { + } else if (value is PlatformCameraTargetBounds) { buffer.putUint8(164); writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { + } else if (value is PlatformMapViewCreationParams) { buffer.putUint8(165); writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { + } else if (value is PlatformMapConfiguration) { buffer.putUint8(166); writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { + } else if (value is PlatformPoint) { buffer.putUint8(167); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { + } else if (value is PlatformTileLayer) { buffer.putUint8(168); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { + } else if (value is PlatformZoomRange) { buffer.putUint8(169); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { + } else if (value is PlatformBitmap) { buffer.putUint8(170); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { + } else if (value is PlatformBitmapDefaultMarker) { buffer.putUint8(171); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { + } else if (value is PlatformBitmapBytes) { buffer.putUint8(172); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { + } else if (value is PlatformBitmapAsset) { buffer.putUint8(173); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { + } else if (value is PlatformBitmapAssetImage) { buffer.putUint8(174); writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapAssetMap) { + buffer.putUint8(175); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapBytesMap) { + buffer.putUint8(176); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapPinConfig) { + buffer.putUint8(177); + writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); } @@ -1761,104 +1835,112 @@ class _PigeonCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 129: + case 129: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformMapType.values[value]; - case 130: + case 130: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformRendererType.values[value]; - case 131: + case 131: + final int? value = readValue(buffer) as int?; + return value == null ? null : PlatformMarkerCollisionBehavior.values[value]; + case 132: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformJointType.values[value]; - case 132: + case 133: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformCapType.values[value]; - case 133: + case 134: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformPatternItemType.values[value]; - case 134: + case 135: + final int? value = readValue(buffer) as int?; + return value == null ? null : PlatformMarkerType.values[value]; + case 136: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformMapBitmapScaling.values[value]; - case 135: + case 137: return PlatformCameraPosition.decode(readValue(buffer)!); - case 136: + case 138: return PlatformCameraUpdate.decode(readValue(buffer)!); - case 137: + case 139: return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!); - case 138: + case 140: return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!); - case 139: + case 141: return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); - case 140: + case 142: return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); - case 141: + case 143: return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); - case 142: + case 144: return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); - case 143: + case 145: return PlatformCameraUpdateZoom.decode(readValue(buffer)!); - case 144: + case 146: return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); - case 145: + case 147: return PlatformCircle.decode(readValue(buffer)!); - case 146: + case 148: return PlatformHeatmap.decode(readValue(buffer)!); - case 147: + case 149: return PlatformClusterManager.decode(readValue(buffer)!); - case 148: + case 150: return PlatformDoublePair.decode(readValue(buffer)!); - case 149: + case 151: return PlatformInfoWindow.decode(readValue(buffer)!); - case 150: + case 152: return PlatformMarker.decode(readValue(buffer)!); - case 151: + case 153: return PlatformPolygon.decode(readValue(buffer)!); - case 152: + case 154: return PlatformPolyline.decode(readValue(buffer)!); - case 153: + case 155: return PlatformCap.decode(readValue(buffer)!); - case 154: + case 156: return PlatformPatternItem.decode(readValue(buffer)!); - case 155: + case 157: return PlatformTile.decode(readValue(buffer)!); - case 156: + case 158: return PlatformTileOverlay.decode(readValue(buffer)!); - case 157: + case 159: return PlatformEdgeInsets.decode(readValue(buffer)!); - case 158: + case 160: return PlatformLatLng.decode(readValue(buffer)!); - case 159: + case 161: return PlatformLatLngBounds.decode(readValue(buffer)!); - case 160: + case 162: return PlatformCluster.decode(readValue(buffer)!); - case 161: + case 163: return PlatformGroundOverlay.decode(readValue(buffer)!); - case 162: + case 164: return PlatformCameraTargetBounds.decode(readValue(buffer)!); - case 163: + case 165: return PlatformMapViewCreationParams.decode(readValue(buffer)!); - case 164: + case 166: return PlatformMapConfiguration.decode(readValue(buffer)!); - case 165: + case 167: return PlatformPoint.decode(readValue(buffer)!); - case 166: + case 168: return PlatformTileLayer.decode(readValue(buffer)!); - case 167: + case 169: return PlatformZoomRange.decode(readValue(buffer)!); - case 168: + case 170: return PlatformBitmap.decode(readValue(buffer)!); - case 169: + case 171: return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); - case 170: + case 172: return PlatformBitmapBytes.decode(readValue(buffer)!); - case 171: + case 173: return PlatformBitmapAsset.decode(readValue(buffer)!); - case 172: + case 174: return PlatformBitmapAssetImage.decode(readValue(buffer)!); - case 173: + case 175: return PlatformBitmapAssetMap.decode(readValue(buffer)!); - case 174: + case 176: return PlatformBitmapBytesMap.decode(readValue(buffer)!); + case 177: + return PlatformBitmapPinConfig.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); } @@ -1874,8 +1956,7 @@ class MapsApi { /// BinaryMessenger will be used which routes to the host platform. MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = - messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -1884,10 +1965,8 @@ class MapsApi { /// Returns once the map instance is available. Future waitForMap() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -1911,18 +1990,15 @@ class MapsApi { /// /// Only non-null configuration values will result in updates; options with /// null values will remain unchanged. - Future updateMapConfiguration( - PlatformMapConfiguration configuration) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updateMapConfiguration(PlatformMapConfiguration configuration) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([configuration]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([configuration]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1937,18 +2013,15 @@ class MapsApi { } /// Updates the set of circles on the map. - Future updateCircles(List toAdd, - List toChange, List idsToRemove) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updateCircles(List toAdd, List toChange, List idsToRemove) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1963,18 +2036,15 @@ class MapsApi { } /// Updates the set of heatmaps on the map. - Future updateHeatmaps(List toAdd, - List toChange, List idsToRemove) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1989,18 +2059,15 @@ class MapsApi { } /// Updates the set of custer managers for clusters on the map. - Future updateClusterManagers( - List toAdd, List idsToRemove) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updateClusterManagers(List toAdd, List idsToRemove) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([toAdd, idsToRemove]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([toAdd, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2015,18 +2082,15 @@ class MapsApi { } /// Updates the set of markers on the map. - Future updateMarkers(List toAdd, - List toChange, List idsToRemove) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2041,18 +2105,15 @@ class MapsApi { } /// Updates the set of polygonss on the map. - Future updatePolygons(List toAdd, - List toChange, List idsToRemove) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2067,18 +2128,15 @@ class MapsApi { } /// Updates the set of polylines on the map. - Future updatePolylines(List toAdd, - List toChange, List idsToRemove) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2093,18 +2151,15 @@ class MapsApi { } /// Updates the set of tile overlays on the map. - Future updateTileOverlays(List toAdd, - List toChange, List idsToRemove) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2119,18 +2174,15 @@ class MapsApi { } /// Updates the set of ground overlays on the map. - Future updateGroundOverlays(List toAdd, - List toChange, List idsToRemove) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2146,10 +2198,8 @@ class MapsApi { /// Gets the screen coordinate for the given map location. Future getScreenCoordinate(PlatformLatLng latLng) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2176,16 +2226,14 @@ class MapsApi { /// Gets the map location for the given screen coordinate. Future getLatLng(PlatformPoint screenCoordinate) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([screenCoordinate]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([screenCoordinate]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2206,10 +2254,8 @@ class MapsApi { /// Gets the map region currently displayed on the map. Future getVisibleRegion() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2237,10 +2283,8 @@ class MapsApi { /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. Future moveCamera(PlatformCameraUpdate cameraUpdate) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2262,18 +2306,15 @@ class MapsApi { /// Moves the camera according to [cameraUpdate], animating the update using a /// duration in milliseconds if provided. - Future animateCamera( - PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([cameraUpdate, durationMilliseconds]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([cameraUpdate, durationMilliseconds]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2289,10 +2330,8 @@ class MapsApi { /// Gets the current map zoom level. Future getZoomLevel() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2319,10 +2358,8 @@ class MapsApi { /// Show the info window for the marker with the given ID. Future showInfoWindow(String markerId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2344,10 +2381,8 @@ class MapsApi { /// Hide the info window for the marker with the given ID. Future hideInfoWindow(String markerId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2370,10 +2405,8 @@ class MapsApi { /// Returns true if the marker with the given ID is currently displaying its /// info window. Future isInfoWindowShown(String markerId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2404,10 +2437,8 @@ class MapsApi { /// Returns false if there was an error setting the style, such as an invalid /// style string. Future setStyle(String style) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2438,10 +2469,39 @@ class MapsApi { /// This allows checking asynchronously for initial style failures, as there /// is no way to return failures from map initialization. Future didLastStyleSucceed() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final List? pigeonVar_replyList = + await pigeonVar_channel.send(null) as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + /// Returns true if this map supports advanced markers. + /// + /// This allows checking if the map supports advanced markers before + /// attempting to use them. + Future isAdvancedMarkersAvailable() async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isAdvancedMarkersAvailable$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2468,16 +2528,14 @@ class MapsApi { /// Clears the cache of tiles previously requseted from the tile provider. Future clearTileCache(String tileOverlayId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([tileOverlayId]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([tileOverlayId]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2493,10 +2551,8 @@ class MapsApi { /// Takes a snapshot of the map and returns its image data. Future takeSnapshot() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2571,22 +2627,13 @@ abstract class MapsCallbackApi { void onGroundOverlayTap(String groundOverlayId); /// Called to get data for a map tile. - Future getTileOverlayTile( - String tileOverlayId, PlatformPoint location, int zoom); - - static void setUp( - MapsCallbackApi? api, { - BinaryMessenger? binaryMessenger, - String messageChannelSuffix = '', - }) { - messageChannelSuffix = - messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); + + static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { + messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); @@ -2597,29 +2644,24 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null.'); final List args = (message as List?)!; - final PlatformCameraPosition? arg_cameraPosition = - (args[0] as PlatformCameraPosition?); + final PlatformCameraPosition? arg_cameraPosition = (args[0] as PlatformCameraPosition?); assert(arg_cameraPosition != null, 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.'); try { @@ -2627,19 +2669,15 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); @@ -2650,26 +2688,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null.'); final List args = (message as List?)!; final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); assert(arg_position != null, @@ -2679,26 +2713,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null.'); final List args = (message as List?)!; final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); assert(arg_position != null, @@ -2708,26 +2738,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2737,26 +2763,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2769,26 +2791,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2801,26 +2819,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2833,26 +2847,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2862,26 +2872,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null.'); final List args = (message as List?)!; final String? arg_circleId = (args[0] as String?); assert(arg_circleId != null, @@ -2891,26 +2897,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null.'); final List args = (message as List?)!; final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); assert(arg_cluster != null, @@ -2920,26 +2922,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null.'); final List args = (message as List?)!; final String? arg_polygonId = (args[0] as String?); assert(arg_polygonId != null, @@ -2949,26 +2947,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null.'); final List args = (message as List?)!; final String? arg_polylineId = (args[0] as String?); assert(arg_polylineId != null, @@ -2978,26 +2972,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.'); final List args = (message as List?)!; final String? arg_groundOverlayId = (args[0] as String?); assert(arg_groundOverlayId != null, @@ -3007,26 +2997,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null.'); final List args = (message as List?)!; final String? arg_tileOverlayId = (args[0] as String?); assert(arg_tileOverlayId != null, @@ -3038,14 +3024,12 @@ abstract class MapsCallbackApi { assert(arg_zoom != null, 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); try { - final PlatformTile output = await api.getTileOverlayTile( - arg_tileOverlayId!, arg_location!, arg_zoom!); + final PlatformTile output = await api.getTileOverlayTile(arg_tileOverlayId!, arg_location!, arg_zoom!); return wrapResponse(result: output); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } @@ -3058,11 +3042,9 @@ class MapsInitializerApi { /// Constructor for [MapsInitializerApi]. The [binaryMessenger] named argument is /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. - MapsInitializerApi( - {BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + MapsInitializerApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = - messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -3075,12 +3057,9 @@ class MapsInitializerApi { /// /// Calling this more than once in the lifetime of an application will result /// in an error. - Future initializeWithPreferredRenderer( - PlatformRendererType? type) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future initializeWithPreferredRenderer(PlatformRendererType? type) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3113,11 +3092,9 @@ class MapsPlatformViewApi { /// Constructor for [MapsPlatformViewApi]. The [binaryMessenger] named argument is /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. - MapsPlatformViewApi( - {BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + MapsPlatformViewApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = - messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -3125,10 +3102,8 @@ class MapsPlatformViewApi { final String pigeonVar_messageChannelSuffix; Future createView(PlatformMapViewCreationParams? type) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3154,11 +3129,9 @@ class MapsInspectorApi { /// Constructor for [MapsInspectorApi]. The [binaryMessenger] named argument is /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. - MapsInspectorApi( - {BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + MapsInspectorApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = - messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -3166,10 +3139,8 @@ class MapsInspectorApi { final String pigeonVar_messageChannelSuffix; Future areBuildingsEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3195,10 +3166,8 @@ class MapsInspectorApi { } Future areRotateGesturesEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3224,10 +3193,8 @@ class MapsInspectorApi { } Future areZoomControlsEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3253,10 +3220,8 @@ class MapsInspectorApi { } Future areScrollGesturesEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3282,10 +3247,8 @@ class MapsInspectorApi { } Future areTiltGesturesEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3311,10 +3274,8 @@ class MapsInspectorApi { } Future areZoomGesturesEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3340,10 +3301,8 @@ class MapsInspectorApi { } Future isCompassEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3369,10 +3328,8 @@ class MapsInspectorApi { } Future isLiteModeEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3393,10 +3350,8 @@ class MapsInspectorApi { } Future isMapToolbarEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3422,10 +3377,8 @@ class MapsInspectorApi { } Future isMyLocationButtonEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3451,10 +3404,8 @@ class MapsInspectorApi { } Future isTrafficEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3480,16 +3431,14 @@ class MapsInspectorApi { } Future getTileOverlayInfo(String tileOverlayId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([tileOverlayId]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([tileOverlayId]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3503,18 +3452,15 @@ class MapsInspectorApi { } } - Future getGroundOverlayInfo( - String groundOverlayId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future getGroundOverlayInfo(String groundOverlayId) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([groundOverlayId]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([groundOverlayId]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3529,10 +3475,8 @@ class MapsInspectorApi { } Future getZoomRange() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3558,16 +3502,14 @@ class MapsInspectorApi { } Future> getClusters(String clusterManagerId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([clusterManagerId]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([clusterManagerId]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3582,16 +3524,13 @@ class MapsInspectorApi { message: 'Host platform returned null value for non-null return value.', ); } else { - return (pigeonVar_replyList[0] as List?)! - .cast(); + return (pigeonVar_replyList[0] as List?)!.cast(); } } Future getCameraPosition() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart index ff1df0e3af6..eeb2dfc40bc 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart @@ -448,7 +448,6 @@ class PlatformMapViewCreationParams { required this.initialTileOverlays, required this.initialClusterManagers, required this.initialGroundOverlays, - required this.markerType, }); final PlatformCameraPosition initialCameraPosition; @@ -461,7 +460,6 @@ class PlatformMapViewCreationParams { final List initialTileOverlays; final List initialClusterManagers; final List initialGroundOverlays; - final PlatformMarkerType markerType; } enum PlatformMarkerType { diff --git a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.mocks.dart b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.mocks.dart index 463abd22234..3391dd85df3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.mocks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.mocks.dart @@ -25,20 +25,35 @@ import 'package:mockito/src/dummies.dart' as _i3; // ignore_for_file: subtype_of_sealed_class class _FakePlatformPoint_0 extends _i1.SmartFake implements _i2.PlatformPoint { - _FakePlatformPoint_0(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakePlatformPoint_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } class _FakePlatformLatLng_1 extends _i1.SmartFake implements _i2.PlatformLatLng { - _FakePlatformLatLng_1(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakePlatformLatLng_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } class _FakePlatformLatLngBounds_2 extends _i1.SmartFake implements _i2.PlatformLatLngBounds { - _FakePlatformLatLngBounds_2(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakePlatformLatLngBounds_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } /// A class which mocks [MapsApi]. @@ -60,17 +75,22 @@ class MockMapsApi extends _i1.Mock implements _i2.MapsApi { @override _i4.Future waitForMap() => (super.noSuchMethod( - Invocation.method(#waitForMap, []), + Invocation.method( + #waitForMap, + [], + ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @override _i4.Future updateMapConfiguration( - _i2.PlatformMapConfiguration? configuration, - ) => + _i2.PlatformMapConfiguration? configuration) => (super.noSuchMethod( - Invocation.method(#updateMapConfiguration, [configuration]), + Invocation.method( + #updateMapConfiguration, + [configuration], + ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @@ -82,7 +102,14 @@ class MockMapsApi extends _i1.Mock implements _i2.MapsApi { List? idsToRemove, ) => (super.noSuchMethod( - Invocation.method(#updateCircles, [toAdd, toChange, idsToRemove]), + Invocation.method( + #updateCircles, + [ + toAdd, + toChange, + idsToRemove, + ], + ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @@ -94,7 +121,14 @@ class MockMapsApi extends _i1.Mock implements _i2.MapsApi { List? idsToRemove, ) => (super.noSuchMethod( - Invocation.method(#updateHeatmaps, [toAdd, toChange, idsToRemove]), + Invocation.method( + #updateHeatmaps, + [ + toAdd, + toChange, + idsToRemove, + ], + ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @@ -105,7 +139,13 @@ class MockMapsApi extends _i1.Mock implements _i2.MapsApi { List? idsToRemove, ) => (super.noSuchMethod( - Invocation.method(#updateClusterManagers, [toAdd, idsToRemove]), + Invocation.method( + #updateClusterManagers, + [ + toAdd, + idsToRemove, + ], + ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @@ -117,7 +157,14 @@ class MockMapsApi extends _i1.Mock implements _i2.MapsApi { List? idsToRemove, ) => (super.noSuchMethod( - Invocation.method(#updateMarkers, [toAdd, toChange, idsToRemove]), + Invocation.method( + #updateMarkers, + [ + toAdd, + toChange, + idsToRemove, + ], + ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @@ -129,7 +176,14 @@ class MockMapsApi extends _i1.Mock implements _i2.MapsApi { List? idsToRemove, ) => (super.noSuchMethod( - Invocation.method(#updatePolygons, [toAdd, toChange, idsToRemove]), + Invocation.method( + #updatePolygons, + [ + toAdd, + toChange, + idsToRemove, + ], + ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @@ -141,7 +195,14 @@ class MockMapsApi extends _i1.Mock implements _i2.MapsApi { List? idsToRemove, ) => (super.noSuchMethod( - Invocation.method(#updatePolylines, [toAdd, toChange, idsToRemove]), + Invocation.method( + #updatePolylines, + [ + toAdd, + toChange, + idsToRemove, + ], + ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @@ -153,11 +214,14 @@ class MockMapsApi extends _i1.Mock implements _i2.MapsApi { List? idsToRemove, ) => (super.noSuchMethod( - Invocation.method(#updateTileOverlays, [ - toAdd, - toChange, - idsToRemove, - ]), + Invocation.method( + #updateTileOverlays, + [ + toAdd, + toChange, + idsToRemove, + ], + ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @@ -169,77 +233,100 @@ class MockMapsApi extends _i1.Mock implements _i2.MapsApi { List? idsToRemove, ) => (super.noSuchMethod( - Invocation.method(#updateGroundOverlays, [ - toAdd, - toChange, - idsToRemove, - ]), + Invocation.method( + #updateGroundOverlays, + [ + toAdd, + toChange, + idsToRemove, + ], + ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @override _i4.Future<_i2.PlatformPoint> getScreenCoordinate( - _i2.PlatformLatLng? latLng, - ) => + _i2.PlatformLatLng? latLng) => (super.noSuchMethod( - Invocation.method(#getScreenCoordinate, [latLng]), - returnValue: _i4.Future<_i2.PlatformPoint>.value( - _FakePlatformPoint_0( - this, - Invocation.method(#getScreenCoordinate, [latLng]), - ), + Invocation.method( + #getScreenCoordinate, + [latLng], ), - returnValueForMissingStub: _i4.Future<_i2.PlatformPoint>.value( - _FakePlatformPoint_0( - this, - Invocation.method(#getScreenCoordinate, [latLng]), + returnValue: _i4.Future<_i2.PlatformPoint>.value(_FakePlatformPoint_0( + this, + Invocation.method( + #getScreenCoordinate, + [latLng], ), - ), + )), + returnValueForMissingStub: + _i4.Future<_i2.PlatformPoint>.value(_FakePlatformPoint_0( + this, + Invocation.method( + #getScreenCoordinate, + [latLng], + ), + )), ) as _i4.Future<_i2.PlatformPoint>); @override _i4.Future<_i2.PlatformLatLng> getLatLng( - _i2.PlatformPoint? screenCoordinate, - ) => + _i2.PlatformPoint? screenCoordinate) => (super.noSuchMethod( - Invocation.method(#getLatLng, [screenCoordinate]), - returnValue: _i4.Future<_i2.PlatformLatLng>.value( - _FakePlatformLatLng_1( - this, - Invocation.method(#getLatLng, [screenCoordinate]), - ), + Invocation.method( + #getLatLng, + [screenCoordinate], ), - returnValueForMissingStub: _i4.Future<_i2.PlatformLatLng>.value( - _FakePlatformLatLng_1( - this, - Invocation.method(#getLatLng, [screenCoordinate]), + returnValue: _i4.Future<_i2.PlatformLatLng>.value(_FakePlatformLatLng_1( + this, + Invocation.method( + #getLatLng, + [screenCoordinate], ), - ), + )), + returnValueForMissingStub: + _i4.Future<_i2.PlatformLatLng>.value(_FakePlatformLatLng_1( + this, + Invocation.method( + #getLatLng, + [screenCoordinate], + ), + )), ) as _i4.Future<_i2.PlatformLatLng>); @override _i4.Future<_i2.PlatformLatLngBounds> getVisibleRegion() => (super.noSuchMethod( - Invocation.method(#getVisibleRegion, []), + Invocation.method( + #getVisibleRegion, + [], + ), returnValue: _i4.Future<_i2.PlatformLatLngBounds>.value( - _FakePlatformLatLngBounds_2( - this, - Invocation.method(#getVisibleRegion, []), + _FakePlatformLatLngBounds_2( + this, + Invocation.method( + #getVisibleRegion, + [], ), - ), + )), returnValueForMissingStub: _i4.Future<_i2.PlatformLatLngBounds>.value( - _FakePlatformLatLngBounds_2( - this, - Invocation.method(#getVisibleRegion, []), + _FakePlatformLatLngBounds_2( + this, + Invocation.method( + #getVisibleRegion, + [], ), - ), + )), ) as _i4.Future<_i2.PlatformLatLngBounds>); @override _i4.Future moveCamera(_i2.PlatformCameraUpdate? cameraUpdate) => (super.noSuchMethod( - Invocation.method(#moveCamera, [cameraUpdate]), + Invocation.method( + #moveCamera, + [cameraUpdate], + ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @@ -250,69 +337,105 @@ class MockMapsApi extends _i1.Mock implements _i2.MapsApi { int? durationMilliseconds, ) => (super.noSuchMethod( - Invocation.method(#animateCamera, [ - cameraUpdate, - durationMilliseconds, - ]), + Invocation.method( + #animateCamera, + [ + cameraUpdate, + durationMilliseconds, + ], + ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @override _i4.Future getZoomLevel() => (super.noSuchMethod( - Invocation.method(#getZoomLevel, []), + Invocation.method( + #getZoomLevel, + [], + ), returnValue: _i4.Future.value(0.0), returnValueForMissingStub: _i4.Future.value(0.0), ) as _i4.Future); @override _i4.Future showInfoWindow(String? markerId) => (super.noSuchMethod( - Invocation.method(#showInfoWindow, [markerId]), + Invocation.method( + #showInfoWindow, + [markerId], + ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @override _i4.Future hideInfoWindow(String? markerId) => (super.noSuchMethod( - Invocation.method(#hideInfoWindow, [markerId]), + Invocation.method( + #hideInfoWindow, + [markerId], + ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @override _i4.Future isInfoWindowShown(String? markerId) => (super.noSuchMethod( - Invocation.method(#isInfoWindowShown, [markerId]), + Invocation.method( + #isInfoWindowShown, + [markerId], + ), returnValue: _i4.Future.value(false), returnValueForMissingStub: _i4.Future.value(false), ) as _i4.Future); @override _i4.Future setStyle(String? style) => (super.noSuchMethod( - Invocation.method(#setStyle, [style]), + Invocation.method( + #setStyle, + [style], + ), returnValue: _i4.Future.value(false), returnValueForMissingStub: _i4.Future.value(false), ) as _i4.Future); @override _i4.Future didLastStyleSucceed() => (super.noSuchMethod( - Invocation.method(#didLastStyleSucceed, []), + Invocation.method( + #didLastStyleSucceed, + [], + ), + returnValue: _i4.Future.value(false), + returnValueForMissingStub: _i4.Future.value(false), + ) as _i4.Future); + + @override + _i4.Future isAdvancedMarkersAvailable() => (super.noSuchMethod( + Invocation.method( + #isAdvancedMarkersAvailable, + [], + ), returnValue: _i4.Future.value(false), returnValueForMissingStub: _i4.Future.value(false), ) as _i4.Future); @override _i4.Future clearTileCache(String? tileOverlayId) => (super.noSuchMethod( - Invocation.method(#clearTileCache, [tileOverlayId]), + Invocation.method( + #clearTileCache, + [tileOverlayId], + ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @override _i4.Future<_i5.Uint8List> takeSnapshot() => (super.noSuchMethod( - Invocation.method(#takeSnapshot, []), - returnValue: _i4.Future<_i5.Uint8List>.value(_i5.Uint8List(0)), - returnValueForMissingStub: _i4.Future<_i5.Uint8List>.value( - _i5.Uint8List(0), + Invocation.method( + #takeSnapshot, + [], ), + returnValue: _i4.Future<_i5.Uint8List>.value(_i5.Uint8List(0)), + returnValueForMissingStub: + _i4.Future<_i5.Uint8List>.value(_i5.Uint8List(0)), ) as _i4.Future<_i5.Uint8List>); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart index 7afd2b958ec..793469adbee 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart @@ -16,10 +16,7 @@ import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platf /// Controller for a single ExampleGoogleMap instance running on the host platform. class ExampleGoogleMapController { - ExampleGoogleMapController._( - this._googleMapState, { - required this.mapId, - }) { + ExampleGoogleMapController._(this._googleMapState, {required this.mapId}) { _connectStreams(mapId); } @@ -36,10 +33,7 @@ class ExampleGoogleMapController { _ExampleGoogleMapState googleMapState, ) async { await GoogleMapsFlutterPlatform.instance.init(id); - return ExampleGoogleMapController._( - googleMapState, - mapId: id, - ); + return ExampleGoogleMapController._(googleMapState, mapId: id); } final _ExampleGoogleMapState _googleMapState; @@ -51,8 +45,12 @@ class ExampleGoogleMapController { .listen((_) => _googleMapState.widget.onCameraMoveStarted!()); } if (_googleMapState.widget.onCameraMove != null) { - GoogleMapsFlutterPlatform.instance.onCameraMove(mapId: mapId).listen( - (CameraMoveEvent e) => _googleMapState.widget.onCameraMove!(e.value)); + GoogleMapsFlutterPlatform.instance + .onCameraMove(mapId: mapId) + .listen( + (CameraMoveEvent e) => + _googleMapState.widget.onCameraMove!(e.value), + ); } if (_googleMapState.widget.onCameraIdle != null) { GoogleMapsFlutterPlatform.instance @@ -62,17 +60,29 @@ class ExampleGoogleMapController { GoogleMapsFlutterPlatform.instance .onMarkerTap(mapId: mapId) .listen((MarkerTapEvent e) => _googleMapState.onMarkerTap(e.value)); - GoogleMapsFlutterPlatform.instance.onMarkerDragStart(mapId: mapId).listen( - (MarkerDragStartEvent e) => - _googleMapState.onMarkerDragStart(e.value, e.position)); - GoogleMapsFlutterPlatform.instance.onMarkerDrag(mapId: mapId).listen( - (MarkerDragEvent e) => - _googleMapState.onMarkerDrag(e.value, e.position)); - GoogleMapsFlutterPlatform.instance.onMarkerDragEnd(mapId: mapId).listen( - (MarkerDragEndEvent e) => - _googleMapState.onMarkerDragEnd(e.value, e.position)); - GoogleMapsFlutterPlatform.instance.onInfoWindowTap(mapId: mapId).listen( - (InfoWindowTapEvent e) => _googleMapState.onInfoWindowTap(e.value)); + GoogleMapsFlutterPlatform.instance + .onMarkerDragStart(mapId: mapId) + .listen( + (MarkerDragStartEvent e) => + _googleMapState.onMarkerDragStart(e.value, e.position), + ); + GoogleMapsFlutterPlatform.instance + .onMarkerDrag(mapId: mapId) + .listen( + (MarkerDragEvent e) => + _googleMapState.onMarkerDrag(e.value, e.position), + ); + GoogleMapsFlutterPlatform.instance + .onMarkerDragEnd(mapId: mapId) + .listen( + (MarkerDragEndEvent e) => + _googleMapState.onMarkerDragEnd(e.value, e.position), + ); + GoogleMapsFlutterPlatform.instance + .onInfoWindowTap(mapId: mapId) + .listen( + (InfoWindowTapEvent e) => _googleMapState.onInfoWindowTap(e.value), + ); GoogleMapsFlutterPlatform.instance .onPolylineTap(mapId: mapId) .listen((PolylineTapEvent e) => _googleMapState.onPolylineTap(e.value)); @@ -82,14 +92,20 @@ class ExampleGoogleMapController { GoogleMapsFlutterPlatform.instance .onCircleTap(mapId: mapId) .listen((CircleTapEvent e) => _googleMapState.onCircleTap(e.value)); - GoogleMapsFlutterPlatform.instance.onGroundOverlayTap(mapId: mapId).listen( - (GroundOverlayTapEvent e) => - _googleMapState.onGroundOverlayTap(e.value)); + GoogleMapsFlutterPlatform.instance + .onGroundOverlayTap(mapId: mapId) + .listen( + (GroundOverlayTapEvent e) => + _googleMapState.onGroundOverlayTap(e.value), + ); GoogleMapsFlutterPlatform.instance .onTap(mapId: mapId) .listen((MapTapEvent e) => _googleMapState.onTap(e.position)); - GoogleMapsFlutterPlatform.instance.onLongPress(mapId: mapId).listen( - (MapLongPressEvent e) => _googleMapState.onLongPress(e.position)); + GoogleMapsFlutterPlatform.instance + .onLongPress(mapId: mapId) + .listen( + (MapLongPressEvent e) => _googleMapState.onLongPress(e.position), + ); GoogleMapsFlutterPlatform.instance .onClusterTap(mapId: mapId) .listen((ClusterTapEvent e) => _googleMapState.onClusterTap(e.value)); @@ -97,72 +113,96 @@ class ExampleGoogleMapController { /// Updates configuration options of the map user interface. Future _updateMapConfiguration(MapConfiguration update) { - return GoogleMapsFlutterPlatform.instance - .updateMapConfiguration(update, mapId: mapId); + return GoogleMapsFlutterPlatform.instance.updateMapConfiguration( + update, + mapId: mapId, + ); } /// Updates marker configuration. Future _updateMarkers(MarkerUpdates markerUpdates) { - return GoogleMapsFlutterPlatform.instance - .updateMarkers(markerUpdates, mapId: mapId); + return GoogleMapsFlutterPlatform.instance.updateMarkers( + markerUpdates, + mapId: mapId, + ); } /// Updates cluster manager configuration. Future _updateClusterManagers( - ClusterManagerUpdates clusterManagerUpdates) { - return GoogleMapsFlutterPlatform.instance - .updateClusterManagers(clusterManagerUpdates, mapId: mapId); + ClusterManagerUpdates clusterManagerUpdates, + ) { + return GoogleMapsFlutterPlatform.instance.updateClusterManagers( + clusterManagerUpdates, + mapId: mapId, + ); } /// Updates ground overlay configuration. Future _updateGroundOverlays( - GroundOverlayUpdates groundOverlayUpdates) { - return GoogleMapsFlutterPlatform.instance - .updateGroundOverlays(groundOverlayUpdates, mapId: mapId); + GroundOverlayUpdates groundOverlayUpdates, + ) { + return GoogleMapsFlutterPlatform.instance.updateGroundOverlays( + groundOverlayUpdates, + mapId: mapId, + ); } /// Updates polygon configuration. Future _updatePolygons(PolygonUpdates polygonUpdates) { - return GoogleMapsFlutterPlatform.instance - .updatePolygons(polygonUpdates, mapId: mapId); + return GoogleMapsFlutterPlatform.instance.updatePolygons( + polygonUpdates, + mapId: mapId, + ); } /// Updates polyline configuration. Future _updatePolylines(PolylineUpdates polylineUpdates) { - return GoogleMapsFlutterPlatform.instance - .updatePolylines(polylineUpdates, mapId: mapId); + return GoogleMapsFlutterPlatform.instance.updatePolylines( + polylineUpdates, + mapId: mapId, + ); } /// Updates circle configuration. Future _updateCircles(CircleUpdates circleUpdates) { - return GoogleMapsFlutterPlatform.instance - .updateCircles(circleUpdates, mapId: mapId); + return GoogleMapsFlutterPlatform.instance.updateCircles( + circleUpdates, + mapId: mapId, + ); } /// Updates tile overlays configuration. Future _updateTileOverlays(Set newTileOverlays) { - return GoogleMapsFlutterPlatform.instance - .updateTileOverlays(newTileOverlays: newTileOverlays, mapId: mapId); + return GoogleMapsFlutterPlatform.instance.updateTileOverlays( + newTileOverlays: newTileOverlays, + mapId: mapId, + ); } /// Clears the tile cache so that all tiles will be requested again from the /// [TileProvider]. Future clearTileCache(TileOverlayId tileOverlayId) async { - return GoogleMapsFlutterPlatform.instance - .clearTileCache(tileOverlayId, mapId: mapId); + return GoogleMapsFlutterPlatform.instance.clearTileCache( + tileOverlayId, + mapId: mapId, + ); } /// Starts an animated change of the map camera position. Future animateCamera(CameraUpdate cameraUpdate, {Duration? duration}) { return GoogleMapsFlutterPlatform.instance.animateCameraWithConfiguration( - cameraUpdate, CameraUpdateAnimationConfiguration(duration: duration), - mapId: mapId); + cameraUpdate, + CameraUpdateAnimationConfiguration(duration: duration), + mapId: mapId, + ); } /// Changes the map camera position. Future moveCamera(CameraUpdate cameraUpdate) { - return GoogleMapsFlutterPlatform.instance - .moveCamera(cameraUpdate, mapId: mapId); + return GoogleMapsFlutterPlatform.instance.moveCamera( + cameraUpdate, + mapId: mapId, + ); } /// Return [LatLngBounds] defining the region that is visible in a map. @@ -172,32 +212,42 @@ class ExampleGoogleMapController { /// Return [ScreenCoordinate] of the [LatLng] in the current map view. Future getScreenCoordinate(LatLng latLng) { - return GoogleMapsFlutterPlatform.instance - .getScreenCoordinate(latLng, mapId: mapId); + return GoogleMapsFlutterPlatform.instance.getScreenCoordinate( + latLng, + mapId: mapId, + ); } /// Returns [LatLng] corresponding to the [ScreenCoordinate] in the current map view. Future getLatLng(ScreenCoordinate screenCoordinate) { - return GoogleMapsFlutterPlatform.instance - .getLatLng(screenCoordinate, mapId: mapId); + return GoogleMapsFlutterPlatform.instance.getLatLng( + screenCoordinate, + mapId: mapId, + ); } /// Programmatically show the Info Window for a [Marker]. Future showMarkerInfoWindow(MarkerId markerId) { - return GoogleMapsFlutterPlatform.instance - .showMarkerInfoWindow(markerId, mapId: mapId); + return GoogleMapsFlutterPlatform.instance.showMarkerInfoWindow( + markerId, + mapId: mapId, + ); } /// Programmatically hide the Info Window for a [Marker]. Future hideMarkerInfoWindow(MarkerId markerId) { - return GoogleMapsFlutterPlatform.instance - .hideMarkerInfoWindow(markerId, mapId: mapId); + return GoogleMapsFlutterPlatform.instance.hideMarkerInfoWindow( + markerId, + mapId: mapId, + ); } /// Returns `true` when the [InfoWindow] is showing, `false` otherwise. Future isMarkerInfoWindowShown(MarkerId markerId) { - return GoogleMapsFlutterPlatform.instance - .isMarkerInfoWindowShown(markerId, mapId: mapId); + return GoogleMapsFlutterPlatform.instance.isMarkerInfoWindowShown( + markerId, + mapId: mapId, + ); } /// Returns the current zoom level of the map @@ -217,8 +267,9 @@ class ExampleGoogleMapController { /// Returns true if [AdvancedMarker]s can be used with this map. Future isAdvancedMarkersAvailable() { - return GoogleMapsFlutterPlatform.instance - .isAdvancedMarkersAvailable(mapId: mapId); + return GoogleMapsFlutterPlatform.instance.isAdvancedMarkersAvailable( + mapId: mapId, + ); } /// Disposes of the platform resources @@ -266,7 +317,7 @@ class ExampleGoogleMap extends StatefulWidget { this.onCameraMoveStarted, this.tileOverlays = const {}, this.groundOverlays = const {}, - this.markerType = MarkerType.legacy, + this.markerType = MarkerType.marker, this.onCameraMove, this.onCameraIdle, this.onTap, @@ -414,7 +465,8 @@ class _ExampleGoogleMapState extends State { _mapId, onPlatformViewCreated, widgetConfiguration: MapWidgetConfiguration( - textDirection: widget.layoutDirection ?? + textDirection: + widget.layoutDirection ?? Directionality.maybeOf(context) ?? TextDirection.ltr, initialCameraPosition: widget.initialCameraPosition, @@ -446,8 +498,9 @@ class _ExampleGoogleMapState extends State { @override void dispose() { - _controller.future - .then((ExampleGoogleMapController controller) => controller.dispose()); + _controller.future.then( + (ExampleGoogleMapController controller) => controller.dispose(), + ); super.dispose(); } @@ -477,43 +530,67 @@ class _ExampleGoogleMapState extends State { Future _updateMarkers() async { final ExampleGoogleMapController controller = await _controller.future; - unawaited(controller._updateMarkers( - MarkerUpdates.from(_markers.values.toSet(), widget.markers))); + unawaited( + controller._updateMarkers( + MarkerUpdates.from(_markers.values.toSet(), widget.markers), + ), + ); _markers = keyByMarkerId(widget.markers); } Future _updateClusterManagers() async { final ExampleGoogleMapController controller = await _controller.future; - unawaited(controller._updateClusterManagers(ClusterManagerUpdates.from( - _clusterManagers.values.toSet(), widget.clusterManagers))); + unawaited( + controller._updateClusterManagers( + ClusterManagerUpdates.from( + _clusterManagers.values.toSet(), + widget.clusterManagers, + ), + ), + ); _clusterManagers = keyByClusterManagerId(widget.clusterManagers); } Future _updateGroundOverlays() async { final ExampleGoogleMapController controller = await _controller.future; - unawaited(controller._updateGroundOverlays(GroundOverlayUpdates.from( - _groundOverlays.values.toSet(), widget.groundOverlays))); + unawaited( + controller._updateGroundOverlays( + GroundOverlayUpdates.from( + _groundOverlays.values.toSet(), + widget.groundOverlays, + ), + ), + ); _groundOverlays = keyByGroundOverlayId(widget.groundOverlays); } Future _updatePolygons() async { final ExampleGoogleMapController controller = await _controller.future; - unawaited(controller._updatePolygons( - PolygonUpdates.from(_polygons.values.toSet(), widget.polygons))); + unawaited( + controller._updatePolygons( + PolygonUpdates.from(_polygons.values.toSet(), widget.polygons), + ), + ); _polygons = keyByPolygonId(widget.polygons); } Future _updatePolylines() async { final ExampleGoogleMapController controller = await _controller.future; - unawaited(controller._updatePolylines( - PolylineUpdates.from(_polylines.values.toSet(), widget.polylines))); + unawaited( + controller._updatePolylines( + PolylineUpdates.from(_polylines.values.toSet(), widget.polylines), + ), + ); _polylines = keyByPolylineId(widget.polylines); } Future _updateCircles() async { final ExampleGoogleMapController controller = await _controller.future; - unawaited(controller._updateCircles( - CircleUpdates.from(_circles.values.toSet(), widget.circles))); + unawaited( + controller._updateCircles( + CircleUpdates.from(_circles.values.toSet(), widget.circles), + ), + ); _circles = keyByCircleId(widget.circles); } @@ -525,10 +602,10 @@ class _ExampleGoogleMapState extends State { Future onPlatformViewCreated(int id) async { final ExampleGoogleMapController controller = await ExampleGoogleMapController._init( - id, - widget.initialCameraPosition, - this, - ); + id, + widget.initialCameraPosition, + this, + ); _controller.complete(controller); unawaited(_updateTileOverlays()); widget.onMapCreated?.call(controller); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h index 8417375a058..abd7d606cdd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v22.7.2), do not edit directly. // See also: https://pub.dev/packages/pigeon #import @@ -28,6 +28,18 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapType) { - (instancetype)initWithValue:(FGMPlatformMapType)value; @end +typedef NS_ENUM(NSUInteger, FGMMarkerCollisionBehavior) { + FGMMarkerCollisionBehaviorRequired = 0, + FGMMarkerCollisionBehaviorOptionalAndHidesLowerPriority = 1, + FGMMarkerCollisionBehaviorRequiredAndHidesOptional = 2, +}; + +/// Wrapper for FGMMarkerCollisionBehavior to allow for nullability. +@interface FGMMarkerCollisionBehaviorBox : NSObject +@property(nonatomic, assign) FGMMarkerCollisionBehavior value; +- (instancetype)initWithValue:(FGMMarkerCollisionBehavior)value; +@end + /// Join types for polyline joints. typedef NS_ENUM(NSUInteger, FGMPlatformJointType) { FGMPlatformJointTypeMitered = 0, @@ -35,11 +47,6 @@ typedef NS_ENUM(NSUInteger, FGMPlatformJointType) { FGMPlatformJointTypeRound = 2, }; -typedef NS_ENUM(NSUInteger, FGMPlatformMarkerType) { - FGMPlatformMarkerTypeMarker = 0, - FGMPlatformMarkerTypeAdvancedMarker = 1, -}; - /// Wrapper for FGMPlatformJointType to allow for nullability. @interface FGMPlatformJointTypeBox : NSObject @property(nonatomic, assign) FGMPlatformJointType value; @@ -59,6 +66,17 @@ typedef NS_ENUM(NSUInteger, FGMPlatformPatternItemType) { - (instancetype)initWithValue:(FGMPlatformPatternItemType)value; @end +typedef NS_ENUM(NSUInteger, FGMPlatformMarkerType) { + FGMPlatformMarkerTypeMarker = 0, + FGMPlatformMarkerTypeAdvancedMarker = 1, +}; + +/// Wrapper for FGMPlatformMarkerType to allow for nullability. +@interface FGMPlatformMarkerTypeBox : NSObject +@property(nonatomic, assign) FGMPlatformMarkerType value; +- (instancetype)initWithValue:(FGMPlatformMarkerType)value; +@end + /// Pigeon equivalent of [MapBitmapScaling]. typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { FGMPlatformMapBitmapScalingAuto = 0, @@ -110,31 +128,32 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @class FGMPlatformBitmapAssetImage; @class FGMPlatformBitmapAssetMap; @class FGMPlatformBitmapBytesMap; +@class FGMPlatformBitmapPinConfig; /// Pigeon representatation of a CameraPosition. @interface FGMPlatformCameraPosition : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBearing:(double)bearing - target:(FGMPlatformLatLng *)target - tilt:(double)tilt - zoom:(double)zoom; -@property(nonatomic, assign) double bearing; -@property(nonatomic, strong) FGMPlatformLatLng *target; -@property(nonatomic, assign) double tilt; -@property(nonatomic, assign) double zoom; ++ (instancetype)makeWithBearing:(double )bearing + target:(FGMPlatformLatLng *)target + tilt:(double )tilt + zoom:(double )zoom; +@property(nonatomic, assign) double bearing; +@property(nonatomic, strong) FGMPlatformLatLng * target; +@property(nonatomic, assign) double tilt; +@property(nonatomic, assign) double zoom; @end /// Pigeon representation of a CameraUpdate. @interface FGMPlatformCameraUpdate : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithCameraUpdate:(id)cameraUpdate; ++ (instancetype)makeWithCameraUpdate:(id )cameraUpdate; /// This Object must be one of the classes below prefixed with /// PlatformCameraUpdate. Each such class represents a different type of /// camera update, and each holds a different set of data, preventing the /// use of a single unified class. -@property(nonatomic, strong) id cameraUpdate; +@property(nonatomic, strong) id cameraUpdate; @end /// Pigeon equivalent of NewCameraPosition @@ -142,7 +161,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition; -@property(nonatomic, strong) FGMPlatformCameraPosition *cameraPosition; +@property(nonatomic, strong) FGMPlatformCameraPosition * cameraPosition; @end /// Pigeon equivalent of NewLatLng @@ -150,94 +169,98 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng; -@property(nonatomic, strong) FGMPlatformLatLng *latLng; +@property(nonatomic, strong) FGMPlatformLatLng * latLng; @end /// Pigeon equivalent of NewLatLngBounds @interface FGMPlatformCameraUpdateNewLatLngBounds : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding; -@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds; -@property(nonatomic, assign) double padding; ++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds + padding:(double )padding; +@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, assign) double padding; @end /// Pigeon equivalent of NewLatLngZoom @interface FGMPlatformCameraUpdateNewLatLngZoom : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom; -@property(nonatomic, strong) FGMPlatformLatLng *latLng; -@property(nonatomic, assign) double zoom; ++ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng + zoom:(double )zoom; +@property(nonatomic, strong) FGMPlatformLatLng * latLng; +@property(nonatomic, assign) double zoom; @end /// Pigeon equivalent of ScrollBy @interface FGMPlatformCameraUpdateScrollBy : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithDx:(double)dx dy:(double)dy; -@property(nonatomic, assign) double dx; -@property(nonatomic, assign) double dy; ++ (instancetype)makeWithDx:(double )dx + dy:(double )dy; +@property(nonatomic, assign) double dx; +@property(nonatomic, assign) double dy; @end /// Pigeon equivalent of ZoomBy @interface FGMPlatformCameraUpdateZoomBy : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus; -@property(nonatomic, assign) double amount; -@property(nonatomic, strong, nullable) FGMPlatformPoint *focus; ++ (instancetype)makeWithAmount:(double )amount + focus:(nullable FGMPlatformPoint *)focus; +@property(nonatomic, assign) double amount; +@property(nonatomic, strong, nullable) FGMPlatformPoint * focus; @end /// Pigeon equivalent of ZoomIn/ZoomOut @interface FGMPlatformCameraUpdateZoom : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithOut:(BOOL)out; -@property(nonatomic, assign) BOOL out; ++ (instancetype)makeWithOut:(BOOL )out; +@property(nonatomic, assign) BOOL out; @end /// Pigeon equivalent of ZoomTo @interface FGMPlatformCameraUpdateZoomTo : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithZoom:(double)zoom; -@property(nonatomic, assign) double zoom; ++ (instancetype)makeWithZoom:(double )zoom; +@property(nonatomic, assign) double zoom; @end /// Pigeon equivalent of the Circle class. @interface FGMPlatformCircle : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents - fillColor:(NSInteger)fillColor - strokeColor:(NSInteger)strokeColor - visible:(BOOL)visible - strokeWidth:(NSInteger)strokeWidth - zIndex:(double)zIndex - center:(FGMPlatformLatLng *)center - radius:(double)radius - circleId:(NSString *)circleId; -@property(nonatomic, assign) BOOL consumeTapEvents; -@property(nonatomic, assign) NSInteger fillColor; -@property(nonatomic, assign) NSInteger strokeColor; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger strokeWidth; -@property(nonatomic, assign) double zIndex; -@property(nonatomic, strong) FGMPlatformLatLng *center; -@property(nonatomic, assign) double radius; -@property(nonatomic, copy) NSString *circleId; ++ (instancetype)makeWithConsumeTapEvents:(BOOL )consumeTapEvents + fillColor:(NSInteger )fillColor + strokeColor:(NSInteger )strokeColor + visible:(BOOL )visible + strokeWidth:(NSInteger )strokeWidth + zIndex:(double )zIndex + center:(FGMPlatformLatLng *)center + radius:(double )radius + circleId:(NSString *)circleId; +@property(nonatomic, assign) BOOL consumeTapEvents; +@property(nonatomic, assign) NSInteger fillColor; +@property(nonatomic, assign) NSInteger strokeColor; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger strokeWidth; +@property(nonatomic, assign) double zIndex; +@property(nonatomic, strong) FGMPlatformLatLng * center; +@property(nonatomic, assign) double radius; +@property(nonatomic, copy) NSString * circleId; @end /// Pigeon equivalent of the Heatmap class. @interface FGMPlatformHeatmap : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithJson:(id)json; ++ (instancetype)makeWithJson:(id )json; /// The heatmap data, as JSON. This should only be set from /// Heatmap.toJson, and the native code must interpret it according to the /// internal implementation details of that method. -@property(nonatomic, strong) id json; +@property(nonatomic, strong) id json; @end /// Pigeon equivalent of the InfoWindow class. @@ -245,11 +268,11 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithTitle:(nullable NSString *)title - snippet:(nullable NSString *)snippet - anchor:(FGMPlatformPoint *)anchor; -@property(nonatomic, copy, nullable) NSString *title; -@property(nonatomic, copy, nullable) NSString *snippet; -@property(nonatomic, strong) FGMPlatformPoint *anchor; + snippet:(nullable NSString *)snippet + anchor:(FGMPlatformPoint *)anchor; +@property(nonatomic, copy, nullable) NSString * title; +@property(nonatomic, copy, nullable) NSString * snippet; +@property(nonatomic, strong) FGMPlatformPoint * anchor; @end /// Pigeon equivalent of Cluster. @@ -257,13 +280,13 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId - position:(FGMPlatformLatLng *)position - bounds:(FGMPlatformLatLngBounds *)bounds - markerIds:(NSArray *)markerIds; -@property(nonatomic, copy) NSString *clusterManagerId; -@property(nonatomic, strong) FGMPlatformLatLng *position; -@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds; -@property(nonatomic, copy) NSArray *markerIds; + position:(FGMPlatformLatLng *)position + bounds:(FGMPlatformLatLngBounds *)bounds + markerIds:(NSArray *)markerIds; +@property(nonatomic, copy) NSString * clusterManagerId; +@property(nonatomic, strong) FGMPlatformLatLng * position; +@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, copy) NSArray * markerIds; @end /// Pigeon equivalent of the ClusterManager class. @@ -271,39 +294,41 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithIdentifier:(NSString *)identifier; -@property(nonatomic, copy) NSString *identifier; +@property(nonatomic, copy) NSString * identifier; @end /// Pigeon equivalent of the Marker class. @interface FGMPlatformMarker : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAlpha:(double)alpha - anchor:(FGMPlatformPoint *)anchor - consumeTapEvents:(BOOL)consumeTapEvents - draggable:(BOOL)draggable - flat:(BOOL)flat - icon:(FGMPlatformBitmap *)icon - infoWindow:(FGMPlatformInfoWindow *)infoWindow - position:(FGMPlatformLatLng *)position - rotation:(double)rotation - visible:(BOOL)visible - zIndex:(double)zIndex - markerId:(NSString *)markerId - clusterManagerId:(nullable NSString *)clusterManagerId; -@property(nonatomic, assign) double alpha; -@property(nonatomic, strong) FGMPlatformPoint *anchor; -@property(nonatomic, assign) BOOL consumeTapEvents; -@property(nonatomic, assign) BOOL draggable; -@property(nonatomic, assign) BOOL flat; -@property(nonatomic, strong) FGMPlatformBitmap *icon; -@property(nonatomic, strong) FGMPlatformInfoWindow *infoWindow; -@property(nonatomic, strong) FGMPlatformLatLng *position; -@property(nonatomic, assign) double rotation; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) double zIndex; -@property(nonatomic, copy) NSString *markerId; -@property(nonatomic, copy, nullable) NSString *clusterManagerId; ++ (instancetype)makeWithAlpha:(double )alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL )consumeTapEvents + draggable:(BOOL )draggable + flat:(BOOL )flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double )rotation + visible:(BOOL )visible + zIndex:(double )zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId + collisionBehavior:(nullable FGMMarkerCollisionBehaviorBox *)collisionBehavior; +@property(nonatomic, assign) double alpha; +@property(nonatomic, strong) FGMPlatformPoint * anchor; +@property(nonatomic, assign) BOOL consumeTapEvents; +@property(nonatomic, assign) BOOL draggable; +@property(nonatomic, assign) BOOL flat; +@property(nonatomic, strong) FGMPlatformBitmap * icon; +@property(nonatomic, strong) FGMPlatformInfoWindow * infoWindow; +@property(nonatomic, strong) FGMPlatformLatLng * position; +@property(nonatomic, assign) double rotation; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) double zIndex; +@property(nonatomic, copy) NSString * markerId; +@property(nonatomic, copy, nullable) NSString * clusterManagerId; +@property(nonatomic, strong, nullable) FGMMarkerCollisionBehaviorBox * collisionBehavior; @end /// Pigeon equivalent of the Polygon class. @@ -311,25 +336,25 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithPolygonId:(NSString *)polygonId - consumesTapEvents:(BOOL)consumesTapEvents - fillColor:(NSInteger)fillColor - geodesic:(BOOL)geodesic - points:(NSArray *)points - holes:(NSArray *> *)holes - visible:(BOOL)visible - strokeColor:(NSInteger)strokeColor - strokeWidth:(NSInteger)strokeWidth - zIndex:(NSInteger)zIndex; -@property(nonatomic, copy) NSString *polygonId; -@property(nonatomic, assign) BOOL consumesTapEvents; -@property(nonatomic, assign) NSInteger fillColor; -@property(nonatomic, assign) BOOL geodesic; -@property(nonatomic, copy) NSArray *points; -@property(nonatomic, copy) NSArray *> *holes; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger strokeColor; -@property(nonatomic, assign) NSInteger strokeWidth; -@property(nonatomic, assign) NSInteger zIndex; + consumesTapEvents:(BOOL )consumesTapEvents + fillColor:(NSInteger )fillColor + geodesic:(BOOL )geodesic + points:(NSArray *)points + holes:(NSArray *> *)holes + visible:(BOOL )visible + strokeColor:(NSInteger )strokeColor + strokeWidth:(NSInteger )strokeWidth + zIndex:(NSInteger )zIndex; +@property(nonatomic, copy) NSString * polygonId; +@property(nonatomic, assign) BOOL consumesTapEvents; +@property(nonatomic, assign) NSInteger fillColor; +@property(nonatomic, assign) BOOL geodesic; +@property(nonatomic, copy) NSArray * points; +@property(nonatomic, copy) NSArray *> * holes; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger strokeColor; +@property(nonatomic, assign) NSInteger strokeWidth; +@property(nonatomic, assign) NSInteger zIndex; @end /// Pigeon equivalent of the Polyline class. @@ -337,48 +362,49 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithPolylineId:(NSString *)polylineId - consumesTapEvents:(BOOL)consumesTapEvents - color:(NSInteger)color - geodesic:(BOOL)geodesic - jointType:(FGMPlatformJointType)jointType - patterns:(NSArray *)patterns - points:(NSArray *)points - visible:(BOOL)visible - width:(NSInteger)width - zIndex:(NSInteger)zIndex; -@property(nonatomic, copy) NSString *polylineId; -@property(nonatomic, assign) BOOL consumesTapEvents; -@property(nonatomic, assign) NSInteger color; -@property(nonatomic, assign) BOOL geodesic; + consumesTapEvents:(BOOL )consumesTapEvents + color:(NSInteger )color + geodesic:(BOOL )geodesic + jointType:(FGMPlatformJointType)jointType + patterns:(NSArray *)patterns + points:(NSArray *)points + visible:(BOOL )visible + width:(NSInteger )width + zIndex:(NSInteger )zIndex; +@property(nonatomic, copy) NSString * polylineId; +@property(nonatomic, assign) BOOL consumesTapEvents; +@property(nonatomic, assign) NSInteger color; +@property(nonatomic, assign) BOOL geodesic; /// The joint type. @property(nonatomic, assign) FGMPlatformJointType jointType; /// The pattern data, as a list of pattern items. -@property(nonatomic, copy) NSArray *patterns; -@property(nonatomic, copy) NSArray *points; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger width; -@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, copy) NSArray * patterns; +@property(nonatomic, copy) NSArray * points; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger width; +@property(nonatomic, assign) NSInteger zIndex; @end /// Pigeon equivalent of the PatternItem class. @interface FGMPlatformPatternItem : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length; ++ (instancetype)makeWithType:(FGMPlatformPatternItemType)type + length:(nullable NSNumber *)length; @property(nonatomic, assign) FGMPlatformPatternItemType type; -@property(nonatomic, strong, nullable) NSNumber *length; +@property(nonatomic, strong, nullable) NSNumber * length; @end /// Pigeon equivalent of the Tile class. @interface FGMPlatformTile : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithWidth:(NSInteger)width - height:(NSInteger)height - data:(nullable FlutterStandardTypedData *)data; -@property(nonatomic, assign) NSInteger width; -@property(nonatomic, assign) NSInteger height; -@property(nonatomic, strong, nullable) FlutterStandardTypedData *data; ++ (instancetype)makeWithWidth:(NSInteger )width + height:(NSInteger )height + data:(nullable FlutterStandardTypedData *)data; +@property(nonatomic, assign) NSInteger width; +@property(nonatomic, assign) NSInteger height; +@property(nonatomic, strong, nullable) FlutterStandardTypedData * data; @end /// Pigeon equivalent of the TileOverlay class. @@ -386,37 +412,41 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId - fadeIn:(BOOL)fadeIn - transparency:(double)transparency - zIndex:(NSInteger)zIndex - visible:(BOOL)visible - tileSize:(NSInteger)tileSize; -@property(nonatomic, copy) NSString *tileOverlayId; -@property(nonatomic, assign) BOOL fadeIn; -@property(nonatomic, assign) double transparency; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger tileSize; + fadeIn:(BOOL )fadeIn + transparency:(double )transparency + zIndex:(NSInteger )zIndex + visible:(BOOL )visible + tileSize:(NSInteger )tileSize; +@property(nonatomic, copy) NSString * tileOverlayId; +@property(nonatomic, assign) BOOL fadeIn; +@property(nonatomic, assign) double transparency; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger tileSize; @end /// Pigeon equivalent of Flutter's EdgeInsets. @interface FGMPlatformEdgeInsets : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithTop:(double)top bottom:(double)bottom left:(double)left right:(double)right; -@property(nonatomic, assign) double top; -@property(nonatomic, assign) double bottom; -@property(nonatomic, assign) double left; -@property(nonatomic, assign) double right; ++ (instancetype)makeWithTop:(double )top + bottom:(double )bottom + left:(double )left + right:(double )right; +@property(nonatomic, assign) double top; +@property(nonatomic, assign) double bottom; +@property(nonatomic, assign) double left; +@property(nonatomic, assign) double right; @end /// Pigeon equivalent of LatLng. @interface FGMPlatformLatLng : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude; -@property(nonatomic, assign) double latitude; -@property(nonatomic, assign) double longitude; ++ (instancetype)makeWithLatitude:(double )latitude + longitude:(double )longitude; +@property(nonatomic, assign) double latitude; +@property(nonatomic, assign) double longitude; @end /// Pigeon equivalent of LatLngBounds. @@ -424,9 +454,9 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast - southwest:(FGMPlatformLatLng *)southwest; -@property(nonatomic, strong) FGMPlatformLatLng *northeast; -@property(nonatomic, strong) FGMPlatformLatLng *southwest; + southwest:(FGMPlatformLatLng *)southwest; +@property(nonatomic, strong) FGMPlatformLatLng * northeast; +@property(nonatomic, strong) FGMPlatformLatLng * southwest; @end /// Pigeon equivalent of CameraTargetBounds. @@ -435,7 +465,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// a target, and having an explicitly unbounded target (null [bounds]). @interface FGMPlatformCameraTargetBounds : NSObject + (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds; -@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds; +@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; @end /// Pigeon equivalent of the GroundOverlay class. @@ -443,131 +473,135 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId - image:(FGMPlatformBitmap *)image - position:(nullable FGMPlatformLatLng *)position - bounds:(nullable FGMPlatformLatLngBounds *)bounds - anchor:(nullable FGMPlatformPoint *)anchor - transparency:(double)transparency - bearing:(double)bearing - zIndex:(NSInteger)zIndex - visible:(BOOL)visible - clickable:(BOOL)clickable - zoomLevel:(nullable NSNumber *)zoomLevel; -@property(nonatomic, copy) NSString *groundOverlayId; -@property(nonatomic, strong) FGMPlatformBitmap *image; -@property(nonatomic, strong, nullable) FGMPlatformLatLng *position; -@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds; -@property(nonatomic, strong, nullable) FGMPlatformPoint *anchor; -@property(nonatomic, assign) double transparency; -@property(nonatomic, assign) double bearing; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) BOOL clickable; -@property(nonatomic, strong, nullable) NSNumber *zoomLevel; + image:(FGMPlatformBitmap *)image + position:(nullable FGMPlatformLatLng *)position + bounds:(nullable FGMPlatformLatLngBounds *)bounds + anchor:(nullable FGMPlatformPoint *)anchor + transparency:(double )transparency + bearing:(double )bearing + zIndex:(NSInteger )zIndex + visible:(BOOL )visible + clickable:(BOOL )clickable + zoomLevel:(nullable NSNumber *)zoomLevel; +@property(nonatomic, copy) NSString * groundOverlayId; +@property(nonatomic, strong) FGMPlatformBitmap * image; +@property(nonatomic, strong, nullable) FGMPlatformLatLng * position; +@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, strong, nullable) FGMPlatformPoint * anchor; +@property(nonatomic, assign) double transparency; +@property(nonatomic, assign) double bearing; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) BOOL clickable; +@property(nonatomic, strong, nullable) NSNumber * zoomLevel; @end /// Information passed to the platform view creation. @interface FGMPlatformMapViewCreationParams : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype) - makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition - mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration - initialCircles:(NSArray *)initialCircles - initialMarkers:(NSArray *)initialMarkers - initialPolygons:(NSArray *)initialPolygons - initialPolylines:(NSArray *)initialPolylines - initialHeatmaps:(NSArray *)initialHeatmaps - initialTileOverlays:(NSArray *)initialTileOverlays - initialClusterManagers:(NSArray *)initialClusterManagers - initialGroundOverlays:(NSArray *)initialGroundOverlays; -@property(nonatomic, strong) FGMPlatformCameraPosition *initialCameraPosition; -@property(nonatomic, strong) FGMPlatformMapConfiguration *mapConfiguration; -@property(nonatomic, copy) NSArray *initialCircles; -@property(nonatomic, copy) NSArray *initialMarkers; -@property(nonatomic, copy) NSArray *initialPolygons; -@property(nonatomic, copy) NSArray *initialPolylines; -@property(nonatomic, copy) NSArray *initialHeatmaps; -@property(nonatomic, copy) NSArray *initialTileOverlays; -@property(nonatomic, copy) NSArray *initialClusterManagers; -@property(nonatomic, copy) NSArray *initialGroundOverlays; ++ (instancetype)makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition + mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration + initialCircles:(NSArray *)initialCircles + initialMarkers:(NSArray *)initialMarkers + initialPolygons:(NSArray *)initialPolygons + initialPolylines:(NSArray *)initialPolylines + initialHeatmaps:(NSArray *)initialHeatmaps + initialTileOverlays:(NSArray *)initialTileOverlays + initialClusterManagers:(NSArray *)initialClusterManagers + initialGroundOverlays:(NSArray *)initialGroundOverlays; +@property(nonatomic, strong) FGMPlatformCameraPosition * initialCameraPosition; +@property(nonatomic, strong) FGMPlatformMapConfiguration * mapConfiguration; +@property(nonatomic, copy) NSArray * initialCircles; +@property(nonatomic, copy) NSArray * initialMarkers; +@property(nonatomic, copy) NSArray * initialPolygons; +@property(nonatomic, copy) NSArray * initialPolylines; +@property(nonatomic, copy) NSArray * initialHeatmaps; +@property(nonatomic, copy) NSArray * initialTileOverlays; +@property(nonatomic, copy) NSArray * initialClusterManagers; +@property(nonatomic, copy) NSArray * initialGroundOverlays; @end /// Pigeon equivalent of MapConfiguration. @interface FGMPlatformMapConfiguration : NSObject + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style; -@property(nonatomic, strong, nullable) NSNumber *compassEnabled; -@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds *cameraTargetBounds; -@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox *mapType; -@property(nonatomic, strong, nullable) FGMPlatformZoomRange *minMaxZoomPreference; -@property(nonatomic, strong, nullable) NSNumber *rotateGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *scrollGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *tiltGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *trackCameraPosition; -@property(nonatomic, strong, nullable) NSNumber *zoomGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *myLocationEnabled; -@property(nonatomic, strong, nullable) NSNumber *myLocationButtonEnabled; -@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets *padding; -@property(nonatomic, strong, nullable) NSNumber *indoorViewEnabled; -@property(nonatomic, strong, nullable) NSNumber *trafficEnabled; -@property(nonatomic, strong, nullable) NSNumber *buildingsEnabled; -@property(nonatomic, copy, nullable) NSString *mapId; -@property(nonatomic, copy, nullable) NSString *style; + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + markerType:(nullable FGMPlatformMarkerTypeBox *)markerType + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style; +@property(nonatomic, strong, nullable) NSNumber * compassEnabled; +@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds * cameraTargetBounds; +@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox * mapType; +@property(nonatomic, strong, nullable) FGMPlatformZoomRange * minMaxZoomPreference; +@property(nonatomic, strong, nullable) NSNumber * rotateGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * scrollGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * tiltGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * trackCameraPosition; +@property(nonatomic, strong, nullable) NSNumber * zoomGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * myLocationEnabled; +@property(nonatomic, strong, nullable) NSNumber * myLocationButtonEnabled; +@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets * padding; +@property(nonatomic, strong, nullable) NSNumber * indoorViewEnabled; +@property(nonatomic, strong, nullable) NSNumber * trafficEnabled; +@property(nonatomic, strong, nullable) NSNumber * buildingsEnabled; +@property(nonatomic, strong, nullable) FGMPlatformMarkerTypeBox * markerType; +@property(nonatomic, copy, nullable) NSString * mapId; +@property(nonatomic, copy, nullable) NSString * style; @end /// Pigeon representation of an x,y coordinate. @interface FGMPlatformPoint : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithX:(double)x y:(double)y; -@property(nonatomic, assign) double x; -@property(nonatomic, assign) double y; ++ (instancetype)makeWithX:(double )x + y:(double )y; +@property(nonatomic, assign) double x; +@property(nonatomic, assign) double y; @end /// Pigeon representation of a size. @interface FGMPlatformSize : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithWidth:(double)width height:(double)height; -@property(nonatomic, assign) double width; -@property(nonatomic, assign) double height; ++ (instancetype)makeWithWidth:(double )width + height:(double )height; +@property(nonatomic, assign) double width; +@property(nonatomic, assign) double height; @end /// Pigeon equivalent of GMSTileLayer properties. @interface FGMPlatformTileLayer : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithVisible:(BOOL)visible - fadeIn:(BOOL)fadeIn - opacity:(double)opacity - zIndex:(NSInteger)zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) BOOL fadeIn; -@property(nonatomic, assign) double opacity; -@property(nonatomic, assign) NSInteger zIndex; ++ (instancetype)makeWithVisible:(BOOL )visible + fadeIn:(BOOL )fadeIn + opacity:(double )opacity + zIndex:(NSInteger )zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) BOOL fadeIn; +@property(nonatomic, assign) double opacity; +@property(nonatomic, assign) NSInteger zIndex; @end /// Pigeon equivalent of MinMaxZoomPreference. @interface FGMPlatformZoomRange : NSObject -+ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max; -@property(nonatomic, strong, nullable) NSNumber *min; -@property(nonatomic, strong, nullable) NSNumber *max; ++ (instancetype)makeWithMin:(nullable NSNumber *)min + max:(nullable NSNumber *)max; +@property(nonatomic, strong, nullable) NSNumber * min; +@property(nonatomic, strong, nullable) NSNumber * max; @end /// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint @@ -576,7 +610,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @interface FGMPlatformBitmap : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBitmap:(id)bitmap; ++ (instancetype)makeWithBitmap:(id )bitmap; /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. @@ -584,13 +618,13 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// approach allows for the different bitmap implementations to be valid /// argument and return types of the API methods. See /// https://github.com/flutter/flutter/issues/117819. -@property(nonatomic, strong) id bitmap; +@property(nonatomic, strong) id bitmap; @end /// Pigeon equivalent of [DefaultMarker]. @interface FGMPlatformBitmapDefaultMarker : NSObject + (instancetype)makeWithHue:(nullable NSNumber *)hue; -@property(nonatomic, strong, nullable) NSNumber *hue; +@property(nonatomic, strong, nullable) NSNumber * hue; @end /// Pigeon equivalent of [BytesBitmap]. @@ -598,18 +632,19 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - size:(nullable FGMPlatformSize *)size; -@property(nonatomic, strong) FlutterStandardTypedData *byteData; -@property(nonatomic, strong, nullable) FGMPlatformSize *size; + size:(nullable FGMPlatformSize *)size; +@property(nonatomic, strong) FlutterStandardTypedData * byteData; +@property(nonatomic, strong, nullable) FGMPlatformSize * size; @end /// Pigeon equivalent of [AssetBitmap]. @interface FGMPlatformBitmapAsset : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg; -@property(nonatomic, copy) NSString *name; -@property(nonatomic, copy, nullable) NSString *pkg; ++ (instancetype)makeWithName:(NSString *)name + pkg:(nullable NSString *)pkg; +@property(nonatomic, copy) NSString * name; +@property(nonatomic, copy, nullable) NSString * pkg; @end /// Pigeon equivalent of [AssetImageBitmap]. @@ -617,11 +652,11 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithName:(NSString *)name - scale:(double)scale - size:(nullable FGMPlatformSize *)size; -@property(nonatomic, copy) NSString *name; -@property(nonatomic, assign) double scale; -@property(nonatomic, strong, nullable) FGMPlatformSize *size; + scale:(double )scale + size:(nullable FGMPlatformSize *)size; +@property(nonatomic, copy) NSString * name; +@property(nonatomic, assign) double scale; +@property(nonatomic, strong, nullable) FGMPlatformSize * size; @end /// Pigeon equivalent of [AssetMapBitmap]. @@ -629,15 +664,15 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithAssetName:(NSString *)assetName - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double)imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height; -@property(nonatomic, copy) NSString *assetName; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double )imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height; +@property(nonatomic, copy) NSString * assetName; @property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; -@property(nonatomic, assign) double imagePixelRatio; -@property(nonatomic, strong, nullable) NSNumber *width; -@property(nonatomic, strong, nullable) NSNumber *height; +@property(nonatomic, assign) double imagePixelRatio; +@property(nonatomic, strong, nullable) NSNumber * width; +@property(nonatomic, strong, nullable) NSNumber * height; @end /// Pigeon equivalent of [BytesMapBitmap]. @@ -645,15 +680,31 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double)imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height; -@property(nonatomic, strong) FlutterStandardTypedData *byteData; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double )imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height; +@property(nonatomic, strong) FlutterStandardTypedData * byteData; @property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; -@property(nonatomic, assign) double imagePixelRatio; -@property(nonatomic, strong, nullable) NSNumber *width; -@property(nonatomic, strong, nullable) NSNumber *height; +@property(nonatomic, assign) double imagePixelRatio; +@property(nonatomic, strong, nullable) NSNumber * width; +@property(nonatomic, strong, nullable) NSNumber * height; +@end + +/// Pigeon equivalent of [PinConfig]. +@interface FGMPlatformBitmapPinConfig : NSObject ++ (instancetype)makeWithBackgroundColor:(nullable NSNumber *)backgroundColor + borderColor:(nullable NSNumber *)borderColor + glyphColor:(nullable NSNumber *)glyphColor + glyphTextColor:(nullable NSNumber *)glyphTextColor + glyphText:(nullable NSString *)glyphText + glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap; +@property(nonatomic, strong, nullable) NSNumber * backgroundColor; +@property(nonatomic, strong, nullable) NSNumber * borderColor; +@property(nonatomic, strong, nullable) NSNumber * glyphColor; +@property(nonatomic, strong, nullable) NSNumber * glyphTextColor; +@property(nonatomic, copy, nullable) NSString * glyphText; +@property(nonatomic, strong, nullable) FGMPlatformBitmap * glyphBitmap; @end /// The codec used by all APIs. @@ -669,87 +720,54 @@ NSObject *FGMGetMessagesCodec(void); /// /// Only non-null configuration values will result in updates; options with /// null values will remain unchanged. -- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of circles on the map. -- (void)updateCirclesByAdding:(NSArray *)toAdd - changing:(NSArray *)toChange - removing:(NSArray *)idsToRemove - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateCirclesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of heatmaps on the map. -- (void)updateHeatmapsByAdding:(NSArray *)toAdd - changing:(NSArray *)toChange - removing:(NSArray *)idsToRemove - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateHeatmapsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of custer managers for clusters on the map. -- (void)updateClusterManagersByAdding:(NSArray *)toAdd - removing:(NSArray *)idsToRemove - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateClusterManagersByAdding:(NSArray *)toAdd removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of markers on the map. -- (void)updateMarkersByAdding:(NSArray *)toAdd - changing:(NSArray *)toChange - removing:(NSArray *)idsToRemove - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateMarkersByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of polygonss on the map. -- (void)updatePolygonsByAdding:(NSArray *)toAdd - changing:(NSArray *)toChange - removing:(NSArray *)idsToRemove - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updatePolygonsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of polylines on the map. -- (void)updatePolylinesByAdding:(NSArray *)toAdd - changing:(NSArray *)toChange - removing:(NSArray *)idsToRemove - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updatePolylinesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of tile overlays on the map. -- (void)updateTileOverlaysByAdding:(NSArray *)toAdd - changing:(NSArray *)toChange - removing:(NSArray *)idsToRemove - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateTileOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of ground overlays on the map. -- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd - changing:(NSArray *)toChange - removing:(NSArray *)idsToRemove - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; /// Gets the screen coordinate for the given map location. /// /// @return `nil` only when `error != nil`. -- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng error:(FlutterError *_Nullable *_Nonnull)error; /// Gets the map location for the given screen coordinate. /// /// @return `nil` only when `error != nil`. -- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate error:(FlutterError *_Nullable *_Nonnull)error; /// Gets the map region currently displayed on the map. /// /// @return `nil` only when `error != nil`. - (nullable FGMPlatformLatLngBounds *)visibleMapRegion:(FlutterError *_Nullable *_Nonnull)error; /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. -- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate error:(FlutterError *_Nullable *_Nonnull)error; /// Moves the camera according to [cameraUpdate], animating the update using a /// duration in milliseconds if provided. -- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate - duration:(nullable NSNumber *)durationMilliseconds - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate duration:(nullable NSNumber *)durationMilliseconds error:(FlutterError *_Nullable *_Nonnull)error; /// Gets the current map zoom level. /// /// @return `nil` only when `error != nil`. - (nullable NSNumber *)currentZoomLevel:(FlutterError *_Nullable *_Nonnull)error; /// Show the info window for the marker with the given ID. -- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; /// Hide the info window for the marker with the given ID. -- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; /// Returns true if the marker with the given ID is currently displaying its /// info window. /// /// @return `nil` only when `error != nil`. -- (nullable NSNumber *) - isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSNumber *)isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; /// Sets the style to the given map style string, where an empty string /// indicates that the style should be cleared. /// @@ -763,97 +781,70 @@ NSObject *FGMGetMessagesCodec(void); /// is no way to return failures from map initialization. - (nullable NSString *)lastStyleError:(FlutterError *_Nullable *_Nonnull)error; /// Clears the cache of tiles previously requseted from the tile provider. -- (void)clearTileCacheForOverlayWithIdentifier:(NSString *)tileOverlayId - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)clearTileCacheForOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; /// Takes a snapshot of the map and returns its image data. -- (nullable FlutterStandardTypedData *)takeSnapshotWithError: - (FlutterError *_Nullable *_Nonnull)error; +- (nullable FlutterStandardTypedData *)takeSnapshotWithError:(FlutterError *_Nullable *_Nonnull)error; /// Returns true if the map supports advanced markers /// /// @return `nil` only when `error != nil`. - (nullable NSNumber *)isAdvancedMarkersAvailable:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsApi(id binaryMessenger, - NSObject *_Nullable api); +extern void SetUpFGMMapsApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); -extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, - NSObject *_Nullable api, - NSString *messageChannelSuffix); /// Interface for calls from the native SDK to Dart. @interface FGMMapsCallbackApi : NSObject - (instancetype)initWithBinaryMessenger:(id)binaryMessenger; -- (instancetype)initWithBinaryMessenger:(id)binaryMessenger - messageChannelSuffix:(nullable NSString *)messageChannelSuffix; +- (instancetype)initWithBinaryMessenger:(id)binaryMessenger messageChannelSuffix:(nullable NSString *)messageChannelSuffix; /// Called when the map camera starts moving. - (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map camera moves. -- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition completion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map camera stops moving. - (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map, not a specifc map object, is tapped. -- (void)didTapAtPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map, not a specifc map object, is long pressed. -- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker is tapped. -- (void)didTapMarkerWithIdentifier:(NSString *)markerId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag starts. -- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag updates. -- (void)didDragMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag ends. -- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker's info window is tapped. -- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a circle is tapped. -- (void)didTapCircleWithIdentifier:(NSString *)circleId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapCircleWithIdentifier:(NSString *)circleId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker cluster is tapped. -- (void)didTapCluster:(FGMPlatformCluster *)cluster - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapCluster:(FGMPlatformCluster *)cluster completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a polygon is tapped. -- (void)didTapPolygonWithIdentifier:(NSString *)polygonId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPolygonWithIdentifier:(NSString *)polygonId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a polyline is tapped. -- (void)didTapPolylineWithIdentifier:(NSString *)polylineId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPolylineWithIdentifier:(NSString *)polylineId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a ground overlay is tapped. -- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion; /// Called to get data for a map tile. -- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId - location:(FGMPlatformPoint *)location - zoom:(NSInteger)zoom - completion:(void (^)(FGMPlatformTile *_Nullable, - FlutterError *_Nullable))completion; +- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId location:(FGMPlatformPoint *)location zoom:(NSInteger)zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion; @end + /// Dummy interface to force generation of the platform view creation params, /// which are not used in any Pigeon calls, only the platform view creation /// call made internally by Flutter. @protocol FGMMapsPlatformViewApi -- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type error:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, - NSObject *_Nullable api); +extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); -extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, - NSObject *_Nullable api, - NSString *messageChannelSuffix); /// Inspector API only intended for use in integration tests. @protocol FGMMapsInspectorApi @@ -873,29 +864,19 @@ extern void SetUpFGMMapsPlatformViewApiWithSuffix(id bin - (nullable NSNumber *)isMyLocationButtonEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. - (nullable NSNumber *)isTrafficEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId - error: - (FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformGroundOverlay *) - groundOverlayWithIdentifier:(NSString *)groundOverlayId - error:(FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformGroundOverlay *)groundOverlayWithIdentifier:(NSString *)groundOverlayId error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId error:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. - (nullable FGMPlatformZoomRange *)zoomRange:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. -- (nullable NSArray *) - clustersWithIdentifier:(NSString *)clusterManagerId - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSArray *)clustersWithIdentifier:(NSString *)clusterManagerId error:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. - (nullable FGMPlatformCameraPosition *)cameraPosition:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsInspectorApi(id binaryMessenger, - NSObject *_Nullable api); +extern void SetUpFGMMapsInspectorApi(id binaryMessenger, NSObject *_Nullable api); -extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, - NSObject *_Nullable api, - NSString *messageChannelSuffix); +extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); NS_ASSUME_NONNULL_END diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m index ccf0735ec94..5fb511a0bc1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v22.7.2), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "messages.g.h" @@ -26,12 +26,7 @@ } static FlutterError *createConnectionError(NSString *channelName) { - return [FlutterError - errorWithCode:@"channel-error" - message:[NSString stringWithFormat:@"%@/%@/%@", - @"Unable to establish connection on channel: '", - channelName, @"'."] - details:@""]; + return [FlutterError errorWithCode:@"channel-error" message:[NSString stringWithFormat:@"%@/%@/%@", @"Unable to establish connection on channel: '", channelName, @"'."] details:@""]; } static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { @@ -50,6 +45,16 @@ - (instancetype)initWithValue:(FGMPlatformMapType)value { } @end +@implementation FGMMarkerCollisionBehaviorBox +- (instancetype)initWithValue:(FGMMarkerCollisionBehavior)value { + self = [super init]; + if (self) { + _value = value; + } + return self; +} +@end + /// Join types for polyline joints. @implementation FGMPlatformJointTypeBox - (instancetype)initWithValue:(FGMPlatformJointType)value { @@ -72,6 +77,16 @@ - (instancetype)initWithValue:(FGMPlatformPatternItemType)value { } @end +@implementation FGMPlatformMarkerTypeBox +- (instancetype)initWithValue:(FGMPlatformMarkerType)value { + self = [super init]; + if (self) { + _value = value; + } + return self; +} +@end + /// Pigeon equivalent of [MapBitmapScaling]. @implementation FGMPlatformMapBitmapScalingBox - (instancetype)initWithValue:(FGMPlatformMapBitmapScaling)value { @@ -317,12 +332,18 @@ + (nullable FGMPlatformBitmapBytesMap *)nullableFromList:(NSArray *)list; - (NSArray *)toList; @end +@interface FGMPlatformBitmapPinConfig () ++ (FGMPlatformBitmapPinConfig *)fromList:(NSArray *)list; ++ (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray *)list; +- (NSArray *)toList; +@end + @implementation FGMPlatformCameraPosition -+ (instancetype)makeWithBearing:(double)bearing - target:(FGMPlatformLatLng *)target - tilt:(double)tilt - zoom:(double)zoom { - FGMPlatformCameraPosition *pigeonResult = [[FGMPlatformCameraPosition alloc] init]; ++ (instancetype)makeWithBearing:(double )bearing + target:(FGMPlatformLatLng *)target + tilt:(double )tilt + zoom:(double )zoom { + FGMPlatformCameraPosition* pigeonResult = [[FGMPlatformCameraPosition alloc] init]; pigeonResult.bearing = bearing; pigeonResult.target = target; pigeonResult.tilt = tilt; @@ -351,8 +372,8 @@ + (nullable FGMPlatformCameraPosition *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformCameraUpdate -+ (instancetype)makeWithCameraUpdate:(id)cameraUpdate { - FGMPlatformCameraUpdate *pigeonResult = [[FGMPlatformCameraUpdate alloc] init]; ++ (instancetype)makeWithCameraUpdate:(id )cameraUpdate { + FGMPlatformCameraUpdate* pigeonResult = [[FGMPlatformCameraUpdate alloc] init]; pigeonResult.cameraUpdate = cameraUpdate; return pigeonResult; } @@ -373,14 +394,12 @@ + (nullable FGMPlatformCameraUpdate *)nullableFromList:(NSArray *)list { @implementation FGMPlatformCameraUpdateNewCameraPosition + (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition { - FGMPlatformCameraUpdateNewCameraPosition *pigeonResult = - [[FGMPlatformCameraUpdateNewCameraPosition alloc] init]; + FGMPlatformCameraUpdateNewCameraPosition* pigeonResult = [[FGMPlatformCameraUpdateNewCameraPosition alloc] init]; pigeonResult.cameraPosition = cameraPosition; return pigeonResult; } + (FGMPlatformCameraUpdateNewCameraPosition *)fromList:(NSArray *)list { - FGMPlatformCameraUpdateNewCameraPosition *pigeonResult = - [[FGMPlatformCameraUpdateNewCameraPosition alloc] init]; + FGMPlatformCameraUpdateNewCameraPosition *pigeonResult = [[FGMPlatformCameraUpdateNewCameraPosition alloc] init]; pigeonResult.cameraPosition = GetNullableObjectAtIndex(list, 0); return pigeonResult; } @@ -396,7 +415,7 @@ + (nullable FGMPlatformCameraUpdateNewCameraPosition *)nullableFromList:(NSArray @implementation FGMPlatformCameraUpdateNewLatLng + (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng { - FGMPlatformCameraUpdateNewLatLng *pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init]; + FGMPlatformCameraUpdateNewLatLng* pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init]; pigeonResult.latLng = latLng; return pigeonResult; } @@ -416,16 +435,15 @@ + (nullable FGMPlatformCameraUpdateNewLatLng *)nullableFromList:(NSArray *)l @end @implementation FGMPlatformCameraUpdateNewLatLngBounds -+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding { - FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult = - [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init]; ++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds + padding:(double )padding { + FGMPlatformCameraUpdateNewLatLngBounds* pigeonResult = [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init]; pigeonResult.bounds = bounds; pigeonResult.padding = padding; return pigeonResult; } + (FGMPlatformCameraUpdateNewLatLngBounds *)fromList:(NSArray *)list { - FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult = - [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init]; + FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult = [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init]; pigeonResult.bounds = GetNullableObjectAtIndex(list, 0); pigeonResult.padding = [GetNullableObjectAtIndex(list, 1) doubleValue]; return pigeonResult; @@ -442,16 +460,15 @@ + (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray *)list { - FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult = - [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init]; + FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult = [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init]; pigeonResult.latLng = GetNullableObjectAtIndex(list, 0); pigeonResult.zoom = [GetNullableObjectAtIndex(list, 1) doubleValue]; return pigeonResult; @@ -468,8 +485,9 @@ + (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray @end @implementation FGMPlatformCameraUpdateScrollBy -+ (instancetype)makeWithDx:(double)dx dy:(double)dy { - FGMPlatformCameraUpdateScrollBy *pigeonResult = [[FGMPlatformCameraUpdateScrollBy alloc] init]; ++ (instancetype)makeWithDx:(double )dx + dy:(double )dy { + FGMPlatformCameraUpdateScrollBy* pigeonResult = [[FGMPlatformCameraUpdateScrollBy alloc] init]; pigeonResult.dx = dx; pigeonResult.dy = dy; return pigeonResult; @@ -492,8 +510,9 @@ + (nullable FGMPlatformCameraUpdateScrollBy *)nullableFromList:(NSArray *)li @end @implementation FGMPlatformCameraUpdateZoomBy -+ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus { - FGMPlatformCameraUpdateZoomBy *pigeonResult = [[FGMPlatformCameraUpdateZoomBy alloc] init]; ++ (instancetype)makeWithAmount:(double )amount + focus:(nullable FGMPlatformPoint *)focus { + FGMPlatformCameraUpdateZoomBy* pigeonResult = [[FGMPlatformCameraUpdateZoomBy alloc] init]; pigeonResult.amount = amount; pigeonResult.focus = focus; return pigeonResult; @@ -516,8 +535,8 @@ + (nullable FGMPlatformCameraUpdateZoomBy *)nullableFromList:(NSArray *)list @end @implementation FGMPlatformCameraUpdateZoom -+ (instancetype)makeWithOut:(BOOL)out { - FGMPlatformCameraUpdateZoom *pigeonResult = [[FGMPlatformCameraUpdateZoom alloc] init]; ++ (instancetype)makeWithOut:(BOOL )out { + FGMPlatformCameraUpdateZoom* pigeonResult = [[FGMPlatformCameraUpdateZoom alloc] init]; pigeonResult.out = out; return pigeonResult; } @@ -537,8 +556,8 @@ + (nullable FGMPlatformCameraUpdateZoom *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformCameraUpdateZoomTo -+ (instancetype)makeWithZoom:(double)zoom { - FGMPlatformCameraUpdateZoomTo *pigeonResult = [[FGMPlatformCameraUpdateZoomTo alloc] init]; ++ (instancetype)makeWithZoom:(double )zoom { + FGMPlatformCameraUpdateZoomTo* pigeonResult = [[FGMPlatformCameraUpdateZoomTo alloc] init]; pigeonResult.zoom = zoom; return pigeonResult; } @@ -558,16 +577,16 @@ + (nullable FGMPlatformCameraUpdateZoomTo *)nullableFromList:(NSArray *)list @end @implementation FGMPlatformCircle -+ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents - fillColor:(NSInteger)fillColor - strokeColor:(NSInteger)strokeColor - visible:(BOOL)visible - strokeWidth:(NSInteger)strokeWidth - zIndex:(double)zIndex - center:(FGMPlatformLatLng *)center - radius:(double)radius - circleId:(NSString *)circleId { - FGMPlatformCircle *pigeonResult = [[FGMPlatformCircle alloc] init]; ++ (instancetype)makeWithConsumeTapEvents:(BOOL )consumeTapEvents + fillColor:(NSInteger )fillColor + strokeColor:(NSInteger )strokeColor + visible:(BOOL )visible + strokeWidth:(NSInteger )strokeWidth + zIndex:(double )zIndex + center:(FGMPlatformLatLng *)center + radius:(double )radius + circleId:(NSString *)circleId { + FGMPlatformCircle* pigeonResult = [[FGMPlatformCircle alloc] init]; pigeonResult.consumeTapEvents = consumeTapEvents; pigeonResult.fillColor = fillColor; pigeonResult.strokeColor = strokeColor; @@ -611,8 +630,8 @@ + (nullable FGMPlatformCircle *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformHeatmap -+ (instancetype)makeWithJson:(id)json { - FGMPlatformHeatmap *pigeonResult = [[FGMPlatformHeatmap alloc] init]; ++ (instancetype)makeWithJson:(id )json { + FGMPlatformHeatmap* pigeonResult = [[FGMPlatformHeatmap alloc] init]; pigeonResult.json = json; return pigeonResult; } @@ -633,9 +652,9 @@ + (nullable FGMPlatformHeatmap *)nullableFromList:(NSArray *)list { @implementation FGMPlatformInfoWindow + (instancetype)makeWithTitle:(nullable NSString *)title - snippet:(nullable NSString *)snippet - anchor:(FGMPlatformPoint *)anchor { - FGMPlatformInfoWindow *pigeonResult = [[FGMPlatformInfoWindow alloc] init]; + snippet:(nullable NSString *)snippet + anchor:(FGMPlatformPoint *)anchor { + FGMPlatformInfoWindow* pigeonResult = [[FGMPlatformInfoWindow alloc] init]; pigeonResult.title = title; pigeonResult.snippet = snippet; pigeonResult.anchor = anchor; @@ -662,10 +681,10 @@ + (nullable FGMPlatformInfoWindow *)nullableFromList:(NSArray *)list { @implementation FGMPlatformCluster + (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId - position:(FGMPlatformLatLng *)position - bounds:(FGMPlatformLatLngBounds *)bounds - markerIds:(NSArray *)markerIds { - FGMPlatformCluster *pigeonResult = [[FGMPlatformCluster alloc] init]; + position:(FGMPlatformLatLng *)position + bounds:(FGMPlatformLatLngBounds *)bounds + markerIds:(NSArray *)markerIds { + FGMPlatformCluster* pigeonResult = [[FGMPlatformCluster alloc] init]; pigeonResult.clusterManagerId = clusterManagerId; pigeonResult.position = position; pigeonResult.bounds = bounds; @@ -695,7 +714,7 @@ + (nullable FGMPlatformCluster *)nullableFromList:(NSArray *)list { @implementation FGMPlatformClusterManager + (instancetype)makeWithIdentifier:(NSString *)identifier { - FGMPlatformClusterManager *pigeonResult = [[FGMPlatformClusterManager alloc] init]; + FGMPlatformClusterManager* pigeonResult = [[FGMPlatformClusterManager alloc] init]; pigeonResult.identifier = identifier; return pigeonResult; } @@ -715,20 +734,21 @@ + (nullable FGMPlatformClusterManager *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformMarker -+ (instancetype)makeWithAlpha:(double)alpha - anchor:(FGMPlatformPoint *)anchor - consumeTapEvents:(BOOL)consumeTapEvents - draggable:(BOOL)draggable - flat:(BOOL)flat - icon:(FGMPlatformBitmap *)icon - infoWindow:(FGMPlatformInfoWindow *)infoWindow - position:(FGMPlatformLatLng *)position - rotation:(double)rotation - visible:(BOOL)visible - zIndex:(double)zIndex - markerId:(NSString *)markerId - clusterManagerId:(nullable NSString *)clusterManagerId { - FGMPlatformMarker *pigeonResult = [[FGMPlatformMarker alloc] init]; ++ (instancetype)makeWithAlpha:(double )alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL )consumeTapEvents + draggable:(BOOL )draggable + flat:(BOOL )flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double )rotation + visible:(BOOL )visible + zIndex:(double )zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId + collisionBehavior:(nullable FGMMarkerCollisionBehaviorBox *)collisionBehavior { + FGMPlatformMarker* pigeonResult = [[FGMPlatformMarker alloc] init]; pigeonResult.alpha = alpha; pigeonResult.anchor = anchor; pigeonResult.consumeTapEvents = consumeTapEvents; @@ -742,6 +762,7 @@ + (instancetype)makeWithAlpha:(double)alpha pigeonResult.zIndex = zIndex; pigeonResult.markerId = markerId; pigeonResult.clusterManagerId = clusterManagerId; + pigeonResult.collisionBehavior = collisionBehavior; return pigeonResult; } + (FGMPlatformMarker *)fromList:(NSArray *)list { @@ -759,6 +780,7 @@ + (FGMPlatformMarker *)fromList:(NSArray *)list { pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 10) doubleValue]; pigeonResult.markerId = GetNullableObjectAtIndex(list, 11); pigeonResult.clusterManagerId = GetNullableObjectAtIndex(list, 12); + pigeonResult.collisionBehavior = GetNullableObjectAtIndex(list, 13); return pigeonResult; } + (nullable FGMPlatformMarker *)nullableFromList:(NSArray *)list { @@ -779,22 +801,23 @@ + (nullable FGMPlatformMarker *)nullableFromList:(NSArray *)list { @(self.zIndex), self.markerId ?: [NSNull null], self.clusterManagerId ?: [NSNull null], + self.collisionBehavior ?: [NSNull null], ]; } @end @implementation FGMPlatformPolygon + (instancetype)makeWithPolygonId:(NSString *)polygonId - consumesTapEvents:(BOOL)consumesTapEvents - fillColor:(NSInteger)fillColor - geodesic:(BOOL)geodesic - points:(NSArray *)points - holes:(NSArray *> *)holes - visible:(BOOL)visible - strokeColor:(NSInteger)strokeColor - strokeWidth:(NSInteger)strokeWidth - zIndex:(NSInteger)zIndex { - FGMPlatformPolygon *pigeonResult = [[FGMPlatformPolygon alloc] init]; + consumesTapEvents:(BOOL )consumesTapEvents + fillColor:(NSInteger )fillColor + geodesic:(BOOL )geodesic + points:(NSArray *)points + holes:(NSArray *> *)holes + visible:(BOOL )visible + strokeColor:(NSInteger )strokeColor + strokeWidth:(NSInteger )strokeWidth + zIndex:(NSInteger )zIndex { + FGMPlatformPolygon* pigeonResult = [[FGMPlatformPolygon alloc] init]; pigeonResult.polygonId = polygonId; pigeonResult.consumesTapEvents = consumesTapEvents; pigeonResult.fillColor = fillColor; @@ -842,16 +865,16 @@ + (nullable FGMPlatformPolygon *)nullableFromList:(NSArray *)list { @implementation FGMPlatformPolyline + (instancetype)makeWithPolylineId:(NSString *)polylineId - consumesTapEvents:(BOOL)consumesTapEvents - color:(NSInteger)color - geodesic:(BOOL)geodesic - jointType:(FGMPlatformJointType)jointType - patterns:(NSArray *)patterns - points:(NSArray *)points - visible:(BOOL)visible - width:(NSInteger)width - zIndex:(NSInteger)zIndex { - FGMPlatformPolyline *pigeonResult = [[FGMPlatformPolyline alloc] init]; + consumesTapEvents:(BOOL )consumesTapEvents + color:(NSInteger )color + geodesic:(BOOL )geodesic + jointType:(FGMPlatformJointType)jointType + patterns:(NSArray *)patterns + points:(NSArray *)points + visible:(BOOL )visible + width:(NSInteger )width + zIndex:(NSInteger )zIndex { + FGMPlatformPolyline* pigeonResult = [[FGMPlatformPolyline alloc] init]; pigeonResult.polylineId = polylineId; pigeonResult.consumesTapEvents = consumesTapEvents; pigeonResult.color = color; @@ -899,16 +922,16 @@ + (nullable FGMPlatformPolyline *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformPatternItem -+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length { - FGMPlatformPatternItem *pigeonResult = [[FGMPlatformPatternItem alloc] init]; ++ (instancetype)makeWithType:(FGMPlatformPatternItemType)type + length:(nullable NSNumber *)length { + FGMPlatformPatternItem* pigeonResult = [[FGMPlatformPatternItem alloc] init]; pigeonResult.type = type; pigeonResult.length = length; return pigeonResult; } + (FGMPlatformPatternItem *)fromList:(NSArray *)list { FGMPlatformPatternItem *pigeonResult = [[FGMPlatformPatternItem alloc] init]; - FGMPlatformPatternItemTypeBox *boxedFGMPlatformPatternItemType = - GetNullableObjectAtIndex(list, 0); + FGMPlatformPatternItemTypeBox *boxedFGMPlatformPatternItemType = GetNullableObjectAtIndex(list, 0); pigeonResult.type = boxedFGMPlatformPatternItemType.value; pigeonResult.length = GetNullableObjectAtIndex(list, 1); return pigeonResult; @@ -925,10 +948,10 @@ + (nullable FGMPlatformPatternItem *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformTile -+ (instancetype)makeWithWidth:(NSInteger)width - height:(NSInteger)height - data:(nullable FlutterStandardTypedData *)data { - FGMPlatformTile *pigeonResult = [[FGMPlatformTile alloc] init]; ++ (instancetype)makeWithWidth:(NSInteger )width + height:(NSInteger )height + data:(nullable FlutterStandardTypedData *)data { + FGMPlatformTile* pigeonResult = [[FGMPlatformTile alloc] init]; pigeonResult.width = width; pigeonResult.height = height; pigeonResult.data = data; @@ -955,12 +978,12 @@ + (nullable FGMPlatformTile *)nullableFromList:(NSArray *)list { @implementation FGMPlatformTileOverlay + (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId - fadeIn:(BOOL)fadeIn - transparency:(double)transparency - zIndex:(NSInteger)zIndex - visible:(BOOL)visible - tileSize:(NSInteger)tileSize { - FGMPlatformTileOverlay *pigeonResult = [[FGMPlatformTileOverlay alloc] init]; + fadeIn:(BOOL )fadeIn + transparency:(double )transparency + zIndex:(NSInteger )zIndex + visible:(BOOL )visible + tileSize:(NSInteger )tileSize { + FGMPlatformTileOverlay* pigeonResult = [[FGMPlatformTileOverlay alloc] init]; pigeonResult.tileOverlayId = tileOverlayId; pigeonResult.fadeIn = fadeIn; pigeonResult.transparency = transparency; @@ -995,11 +1018,11 @@ + (nullable FGMPlatformTileOverlay *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformEdgeInsets -+ (instancetype)makeWithTop:(double)top - bottom:(double)bottom - left:(double)left - right:(double)right { - FGMPlatformEdgeInsets *pigeonResult = [[FGMPlatformEdgeInsets alloc] init]; ++ (instancetype)makeWithTop:(double )top + bottom:(double )bottom + left:(double )left + right:(double )right { + FGMPlatformEdgeInsets* pigeonResult = [[FGMPlatformEdgeInsets alloc] init]; pigeonResult.top = top; pigeonResult.bottom = bottom; pigeonResult.left = left; @@ -1028,8 +1051,9 @@ + (nullable FGMPlatformEdgeInsets *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformLatLng -+ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude { - FGMPlatformLatLng *pigeonResult = [[FGMPlatformLatLng alloc] init]; ++ (instancetype)makeWithLatitude:(double )latitude + longitude:(double )longitude { + FGMPlatformLatLng* pigeonResult = [[FGMPlatformLatLng alloc] init]; pigeonResult.latitude = latitude; pigeonResult.longitude = longitude; return pigeonResult; @@ -1053,8 +1077,8 @@ + (nullable FGMPlatformLatLng *)nullableFromList:(NSArray *)list { @implementation FGMPlatformLatLngBounds + (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast - southwest:(FGMPlatformLatLng *)southwest { - FGMPlatformLatLngBounds *pigeonResult = [[FGMPlatformLatLngBounds alloc] init]; + southwest:(FGMPlatformLatLng *)southwest { + FGMPlatformLatLngBounds* pigeonResult = [[FGMPlatformLatLngBounds alloc] init]; pigeonResult.northeast = northeast; pigeonResult.southwest = southwest; return pigeonResult; @@ -1078,7 +1102,7 @@ + (nullable FGMPlatformLatLngBounds *)nullableFromList:(NSArray *)list { @implementation FGMPlatformCameraTargetBounds + (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds { - FGMPlatformCameraTargetBounds *pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init]; + FGMPlatformCameraTargetBounds* pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init]; pigeonResult.bounds = bounds; return pigeonResult; } @@ -1099,17 +1123,17 @@ + (nullable FGMPlatformCameraTargetBounds *)nullableFromList:(NSArray *)list @implementation FGMPlatformGroundOverlay + (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId - image:(FGMPlatformBitmap *)image - position:(nullable FGMPlatformLatLng *)position - bounds:(nullable FGMPlatformLatLngBounds *)bounds - anchor:(nullable FGMPlatformPoint *)anchor - transparency:(double)transparency - bearing:(double)bearing - zIndex:(NSInteger)zIndex - visible:(BOOL)visible - clickable:(BOOL)clickable - zoomLevel:(nullable NSNumber *)zoomLevel { - FGMPlatformGroundOverlay *pigeonResult = [[FGMPlatformGroundOverlay alloc] init]; + image:(FGMPlatformBitmap *)image + position:(nullable FGMPlatformLatLng *)position + bounds:(nullable FGMPlatformLatLngBounds *)bounds + anchor:(nullable FGMPlatformPoint *)anchor + transparency:(double )transparency + bearing:(double )bearing + zIndex:(NSInteger )zIndex + visible:(BOOL )visible + clickable:(BOOL )clickable + zoomLevel:(nullable NSNumber *)zoomLevel { + FGMPlatformGroundOverlay* pigeonResult = [[FGMPlatformGroundOverlay alloc] init]; pigeonResult.groundOverlayId = groundOverlayId; pigeonResult.image = image; pigeonResult.position = position; @@ -1159,18 +1183,17 @@ + (nullable FGMPlatformGroundOverlay *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformMapViewCreationParams -+ (instancetype) - makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition - mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration - initialCircles:(NSArray *)initialCircles - initialMarkers:(NSArray *)initialMarkers - initialPolygons:(NSArray *)initialPolygons - initialPolylines:(NSArray *)initialPolylines - initialHeatmaps:(NSArray *)initialHeatmaps - initialTileOverlays:(NSArray *)initialTileOverlays - initialClusterManagers:(NSArray *)initialClusterManagers - initialGroundOverlays:(NSArray *)initialGroundOverlays { - FGMPlatformMapViewCreationParams *pigeonResult = [[FGMPlatformMapViewCreationParams alloc] init]; ++ (instancetype)makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition + mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration + initialCircles:(NSArray *)initialCircles + initialMarkers:(NSArray *)initialMarkers + initialPolygons:(NSArray *)initialPolygons + initialPolylines:(NSArray *)initialPolylines + initialHeatmaps:(NSArray *)initialHeatmaps + initialTileOverlays:(NSArray *)initialTileOverlays + initialClusterManagers:(NSArray *)initialClusterManagers + initialGroundOverlays:(NSArray *)initialGroundOverlays { + FGMPlatformMapViewCreationParams* pigeonResult = [[FGMPlatformMapViewCreationParams alloc] init]; pigeonResult.initialCameraPosition = initialCameraPosition; pigeonResult.mapConfiguration = mapConfiguration; pigeonResult.initialCircles = initialCircles; @@ -1218,23 +1241,24 @@ + (nullable FGMPlatformMapViewCreationParams *)nullableFromList:(NSArray *)l @implementation FGMPlatformMapConfiguration + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - cloudMapId:(nullable NSString *)cloudMapId - style:(nullable NSString *)style { - FGMPlatformMapConfiguration *pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + markerType:(nullable FGMPlatformMarkerTypeBox *)markerType + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style { + FGMPlatformMapConfiguration* pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; pigeonResult.compassEnabled = compassEnabled; pigeonResult.cameraTargetBounds = cameraTargetBounds; pigeonResult.mapType = mapType; @@ -1250,7 +1274,8 @@ + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled pigeonResult.indoorViewEnabled = indoorViewEnabled; pigeonResult.trafficEnabled = trafficEnabled; pigeonResult.buildingsEnabled = buildingsEnabled; - pigeonResult.cloudMapId = cloudMapId; + pigeonResult.markerType = markerType; + pigeonResult.mapId = mapId; pigeonResult.style = style; return pigeonResult; } @@ -1271,8 +1296,9 @@ + (FGMPlatformMapConfiguration *)fromList:(NSArray *)list { pigeonResult.indoorViewEnabled = GetNullableObjectAtIndex(list, 12); pigeonResult.trafficEnabled = GetNullableObjectAtIndex(list, 13); pigeonResult.buildingsEnabled = GetNullableObjectAtIndex(list, 14); - pigeonResult.cloudMapId = GetNullableObjectAtIndex(list, 15); - pigeonResult.style = GetNullableObjectAtIndex(list, 16); + pigeonResult.markerType = GetNullableObjectAtIndex(list, 15); + pigeonResult.mapId = GetNullableObjectAtIndex(list, 16); + pigeonResult.style = GetNullableObjectAtIndex(list, 17); return pigeonResult; } + (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray *)list { @@ -1295,15 +1321,17 @@ + (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray *)list { self.indoorViewEnabled ?: [NSNull null], self.trafficEnabled ?: [NSNull null], self.buildingsEnabled ?: [NSNull null], - self.cloudMapId ?: [NSNull null], + self.markerType ?: [NSNull null], + self.mapId ?: [NSNull null], self.style ?: [NSNull null], ]; } @end @implementation FGMPlatformPoint -+ (instancetype)makeWithX:(double)x y:(double)y { - FGMPlatformPoint *pigeonResult = [[FGMPlatformPoint alloc] init]; ++ (instancetype)makeWithX:(double )x + y:(double )y { + FGMPlatformPoint* pigeonResult = [[FGMPlatformPoint alloc] init]; pigeonResult.x = x; pigeonResult.y = y; return pigeonResult; @@ -1326,8 +1354,9 @@ + (nullable FGMPlatformPoint *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformSize -+ (instancetype)makeWithWidth:(double)width height:(double)height { - FGMPlatformSize *pigeonResult = [[FGMPlatformSize alloc] init]; ++ (instancetype)makeWithWidth:(double )width + height:(double )height { + FGMPlatformSize* pigeonResult = [[FGMPlatformSize alloc] init]; pigeonResult.width = width; pigeonResult.height = height; return pigeonResult; @@ -1350,11 +1379,11 @@ + (nullable FGMPlatformSize *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformTileLayer -+ (instancetype)makeWithVisible:(BOOL)visible - fadeIn:(BOOL)fadeIn - opacity:(double)opacity - zIndex:(NSInteger)zIndex { - FGMPlatformTileLayer *pigeonResult = [[FGMPlatformTileLayer alloc] init]; ++ (instancetype)makeWithVisible:(BOOL )visible + fadeIn:(BOOL )fadeIn + opacity:(double )opacity + zIndex:(NSInteger )zIndex { + FGMPlatformTileLayer* pigeonResult = [[FGMPlatformTileLayer alloc] init]; pigeonResult.visible = visible; pigeonResult.fadeIn = fadeIn; pigeonResult.opacity = opacity; @@ -1383,8 +1412,9 @@ + (nullable FGMPlatformTileLayer *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformZoomRange -+ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max { - FGMPlatformZoomRange *pigeonResult = [[FGMPlatformZoomRange alloc] init]; ++ (instancetype)makeWithMin:(nullable NSNumber *)min + max:(nullable NSNumber *)max { + FGMPlatformZoomRange* pigeonResult = [[FGMPlatformZoomRange alloc] init]; pigeonResult.min = min; pigeonResult.max = max; return pigeonResult; @@ -1407,8 +1437,8 @@ + (nullable FGMPlatformZoomRange *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformBitmap -+ (instancetype)makeWithBitmap:(id)bitmap { - FGMPlatformBitmap *pigeonResult = [[FGMPlatformBitmap alloc] init]; ++ (instancetype)makeWithBitmap:(id )bitmap { + FGMPlatformBitmap* pigeonResult = [[FGMPlatformBitmap alloc] init]; pigeonResult.bitmap = bitmap; return pigeonResult; } @@ -1429,7 +1459,7 @@ + (nullable FGMPlatformBitmap *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapDefaultMarker + (instancetype)makeWithHue:(nullable NSNumber *)hue { - FGMPlatformBitmapDefaultMarker *pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init]; + FGMPlatformBitmapDefaultMarker* pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init]; pigeonResult.hue = hue; return pigeonResult; } @@ -1450,8 +1480,8 @@ + (nullable FGMPlatformBitmapDefaultMarker *)nullableFromList:(NSArray *)lis @implementation FGMPlatformBitmapBytes + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - size:(nullable FGMPlatformSize *)size { - FGMPlatformBitmapBytes *pigeonResult = [[FGMPlatformBitmapBytes alloc] init]; + size:(nullable FGMPlatformSize *)size { + FGMPlatformBitmapBytes* pigeonResult = [[FGMPlatformBitmapBytes alloc] init]; pigeonResult.byteData = byteData; pigeonResult.size = size; return pigeonResult; @@ -1474,8 +1504,9 @@ + (nullable FGMPlatformBitmapBytes *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformBitmapAsset -+ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg { - FGMPlatformBitmapAsset *pigeonResult = [[FGMPlatformBitmapAsset alloc] init]; ++ (instancetype)makeWithName:(NSString *)name + pkg:(nullable NSString *)pkg { + FGMPlatformBitmapAsset* pigeonResult = [[FGMPlatformBitmapAsset alloc] init]; pigeonResult.name = name; pigeonResult.pkg = pkg; return pigeonResult; @@ -1499,9 +1530,9 @@ + (nullable FGMPlatformBitmapAsset *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapAssetImage + (instancetype)makeWithName:(NSString *)name - scale:(double)scale - size:(nullable FGMPlatformSize *)size { - FGMPlatformBitmapAssetImage *pigeonResult = [[FGMPlatformBitmapAssetImage alloc] init]; + scale:(double )scale + size:(nullable FGMPlatformSize *)size { + FGMPlatformBitmapAssetImage* pigeonResult = [[FGMPlatformBitmapAssetImage alloc] init]; pigeonResult.name = name; pigeonResult.scale = scale; pigeonResult.size = size; @@ -1528,11 +1559,11 @@ + (nullable FGMPlatformBitmapAssetImage *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapAssetMap + (instancetype)makeWithAssetName:(NSString *)assetName - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double)imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height { - FGMPlatformBitmapAssetMap *pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init]; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double )imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height { + FGMPlatformBitmapAssetMap* pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init]; pigeonResult.assetName = assetName; pigeonResult.bitmapScaling = bitmapScaling; pigeonResult.imagePixelRatio = imagePixelRatio; @@ -1543,8 +1574,7 @@ + (instancetype)makeWithAssetName:(NSString *)assetName + (FGMPlatformBitmapAssetMap *)fromList:(NSArray *)list { FGMPlatformBitmapAssetMap *pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init]; pigeonResult.assetName = GetNullableObjectAtIndex(list, 0); - FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling = - GetNullableObjectAtIndex(list, 1); + FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling = GetNullableObjectAtIndex(list, 1); pigeonResult.bitmapScaling = boxedFGMPlatformMapBitmapScaling.value; pigeonResult.imagePixelRatio = [GetNullableObjectAtIndex(list, 2) doubleValue]; pigeonResult.width = GetNullableObjectAtIndex(list, 3); @@ -1567,11 +1597,11 @@ + (nullable FGMPlatformBitmapAssetMap *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapBytesMap + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double)imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height { - FGMPlatformBitmapBytesMap *pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init]; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double )imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height { + FGMPlatformBitmapBytesMap* pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init]; pigeonResult.byteData = byteData; pigeonResult.bitmapScaling = bitmapScaling; pigeonResult.imagePixelRatio = imagePixelRatio; @@ -1582,8 +1612,7 @@ + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData + (FGMPlatformBitmapBytesMap *)fromList:(NSArray *)list { FGMPlatformBitmapBytesMap *pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init]; pigeonResult.byteData = GetNullableObjectAtIndex(list, 0); - FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling = - GetNullableObjectAtIndex(list, 1); + FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling = GetNullableObjectAtIndex(list, 1); pigeonResult.bitmapScaling = boxedFGMPlatformMapBitmapScaling.value; pigeonResult.imagePixelRatio = [GetNullableObjectAtIndex(list, 2) doubleValue]; pigeonResult.width = GetNullableObjectAtIndex(list, 3); @@ -1604,6 +1633,47 @@ + (nullable FGMPlatformBitmapBytesMap *)nullableFromList:(NSArray *)list { } @end +@implementation FGMPlatformBitmapPinConfig ++ (instancetype)makeWithBackgroundColor:(nullable NSNumber *)backgroundColor + borderColor:(nullable NSNumber *)borderColor + glyphColor:(nullable NSNumber *)glyphColor + glyphTextColor:(nullable NSNumber *)glyphTextColor + glyphText:(nullable NSString *)glyphText + glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap { + FGMPlatformBitmapPinConfig* pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init]; + pigeonResult.backgroundColor = backgroundColor; + pigeonResult.borderColor = borderColor; + pigeonResult.glyphColor = glyphColor; + pigeonResult.glyphTextColor = glyphTextColor; + pigeonResult.glyphText = glyphText; + pigeonResult.glyphBitmap = glyphBitmap; + return pigeonResult; +} ++ (FGMPlatformBitmapPinConfig *)fromList:(NSArray *)list { + FGMPlatformBitmapPinConfig *pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init]; + pigeonResult.backgroundColor = GetNullableObjectAtIndex(list, 0); + pigeonResult.borderColor = GetNullableObjectAtIndex(list, 1); + pigeonResult.glyphColor = GetNullableObjectAtIndex(list, 2); + pigeonResult.glyphTextColor = GetNullableObjectAtIndex(list, 3); + pigeonResult.glyphText = GetNullableObjectAtIndex(list, 4); + pigeonResult.glyphBitmap = GetNullableObjectAtIndex(list, 5); + return pigeonResult; +} ++ (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray *)list { + return (list) ? [FGMPlatformBitmapPinConfig fromList:list] : nil; +} +- (NSArray *)toList { + return @[ + self.backgroundColor ?: [NSNull null], + self.borderColor ?: [NSNull null], + self.glyphColor ?: [NSNull null], + self.glyphTextColor ?: [NSNull null], + self.glyphText ?: [NSNull null], + self.glyphBitmap ?: [NSNull null], + ]; +} +@end + @interface FGMMessagesPigeonCodecReader : FlutterStandardReader @end @implementation FGMMessagesPigeonCodecReader @@ -1611,106 +1681,108 @@ - (nullable id)readValueOfType:(UInt8)type { switch (type) { case 129: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil - ? nil - : [[FGMPlatformMapTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformMapTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 130: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil - ? nil - : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMMarkerCollisionBehaviorBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 131: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil - : [[FGMPlatformPatternItemTypeBox alloc] - initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 132: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil - : [[FGMPlatformMapBitmapScalingBox alloc] - initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformPatternItemTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + } + case 133: { + NSNumber *enumAsNumber = [self readValue]; + return enumAsNumber == nil ? nil : [[FGMPlatformMarkerTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + } + case 134: { + NSNumber *enumAsNumber = [self readValue]; + return enumAsNumber == nil ? nil : [[FGMPlatformMapBitmapScalingBox alloc] initWithValue:[enumAsNumber integerValue]]; } - case 133: + case 135: return [FGMPlatformCameraPosition fromList:[self readValue]]; - case 134: + case 136: return [FGMPlatformCameraUpdate fromList:[self readValue]]; - case 135: + case 137: return [FGMPlatformCameraUpdateNewCameraPosition fromList:[self readValue]]; - case 136: + case 138: return [FGMPlatformCameraUpdateNewLatLng fromList:[self readValue]]; - case 137: + case 139: return [FGMPlatformCameraUpdateNewLatLngBounds fromList:[self readValue]]; - case 138: + case 140: return [FGMPlatformCameraUpdateNewLatLngZoom fromList:[self readValue]]; - case 139: + case 141: return [FGMPlatformCameraUpdateScrollBy fromList:[self readValue]]; - case 140: + case 142: return [FGMPlatformCameraUpdateZoomBy fromList:[self readValue]]; - case 141: + case 143: return [FGMPlatformCameraUpdateZoom fromList:[self readValue]]; - case 142: + case 144: return [FGMPlatformCameraUpdateZoomTo fromList:[self readValue]]; - case 143: + case 145: return [FGMPlatformCircle fromList:[self readValue]]; - case 144: + case 146: return [FGMPlatformHeatmap fromList:[self readValue]]; - case 145: + case 147: return [FGMPlatformInfoWindow fromList:[self readValue]]; - case 146: + case 148: return [FGMPlatformCluster fromList:[self readValue]]; - case 147: + case 149: return [FGMPlatformClusterManager fromList:[self readValue]]; - case 148: + case 150: return [FGMPlatformMarker fromList:[self readValue]]; - case 149: + case 151: return [FGMPlatformPolygon fromList:[self readValue]]; - case 150: + case 152: return [FGMPlatformPolyline fromList:[self readValue]]; - case 151: + case 153: return [FGMPlatformPatternItem fromList:[self readValue]]; - case 152: + case 154: return [FGMPlatformTile fromList:[self readValue]]; - case 153: + case 155: return [FGMPlatformTileOverlay fromList:[self readValue]]; - case 154: + case 156: return [FGMPlatformEdgeInsets fromList:[self readValue]]; - case 155: + case 157: return [FGMPlatformLatLng fromList:[self readValue]]; - case 156: + case 158: return [FGMPlatformLatLngBounds fromList:[self readValue]]; - case 157: + case 159: return [FGMPlatformCameraTargetBounds fromList:[self readValue]]; - case 158: + case 160: return [FGMPlatformGroundOverlay fromList:[self readValue]]; - case 159: + case 161: return [FGMPlatformMapViewCreationParams fromList:[self readValue]]; - case 160: + case 162: return [FGMPlatformMapConfiguration fromList:[self readValue]]; - case 161: + case 163: return [FGMPlatformPoint fromList:[self readValue]]; - case 162: + case 164: return [FGMPlatformSize fromList:[self readValue]]; - case 163: + case 165: return [FGMPlatformTileLayer fromList:[self readValue]]; - case 164: + case 166: return [FGMPlatformZoomRange fromList:[self readValue]]; - case 165: + case 167: return [FGMPlatformBitmap fromList:[self readValue]]; - case 166: + case 168: return [FGMPlatformBitmapDefaultMarker fromList:[self readValue]]; - case 167: + case 169: return [FGMPlatformBitmapBytes fromList:[self readValue]]; - case 168: + case 170: return [FGMPlatformBitmapAsset fromList:[self readValue]]; - case 169: + case 171: return [FGMPlatformBitmapAssetImage fromList:[self readValue]]; - case 170: + case 172: return [FGMPlatformBitmapAssetMap fromList:[self readValue]]; - case 171: + case 173: return [FGMPlatformBitmapBytesMap fromList:[self readValue]]; + case 174: + return [FGMPlatformBitmapPinConfig fromList:[self readValue]]; default: return [super readValueOfType:type]; } @@ -1725,134 +1797,145 @@ - (void)writeValue:(id)value { FGMPlatformMapTypeBox *box = (FGMPlatformMapTypeBox *)value; [self writeByte:129]; [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])]; + } else if ([value isKindOfClass:[FGMMarkerCollisionBehaviorBox class]]) { + FGMMarkerCollisionBehaviorBox *box = (FGMMarkerCollisionBehaviorBox *)value; + [self writeByte:130]; + [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])]; } else if ([value isKindOfClass:[FGMPlatformJointTypeBox class]]) { FGMPlatformJointTypeBox *box = (FGMPlatformJointTypeBox *)value; - [self writeByte:130]; + [self writeByte:131]; [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])]; } else if ([value isKindOfClass:[FGMPlatformPatternItemTypeBox class]]) { FGMPlatformPatternItemTypeBox *box = (FGMPlatformPatternItemTypeBox *)value; - [self writeByte:131]; + [self writeByte:132]; + [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])]; + } else if ([value isKindOfClass:[FGMPlatformMarkerTypeBox class]]) { + FGMPlatformMarkerTypeBox *box = (FGMPlatformMarkerTypeBox *)value; + [self writeByte:133]; [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])]; } else if ([value isKindOfClass:[FGMPlatformMapBitmapScalingBox class]]) { FGMPlatformMapBitmapScalingBox *box = (FGMPlatformMapBitmapScalingBox *)value; - [self writeByte:132]; + [self writeByte:134]; [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])]; } else if ([value isKindOfClass:[FGMPlatformCameraPosition class]]) { - [self writeByte:133]; + [self writeByte:135]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformCameraUpdate class]]) { - [self writeByte:134]; + [self writeByte:136]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewCameraPosition class]]) { - [self writeByte:135]; + [self writeByte:137]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLng class]]) { - [self writeByte:136]; + [self writeByte:138]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngBounds class]]) { - [self writeByte:137]; + [self writeByte:139]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngZoom class]]) { - [self writeByte:138]; + [self writeByte:140]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformCameraUpdateScrollBy class]]) { - [self writeByte:139]; + [self writeByte:141]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomBy class]]) { - [self writeByte:140]; + [self writeByte:142]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoom class]]) { - [self writeByte:141]; + [self writeByte:143]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomTo class]]) { - [self writeByte:142]; + [self writeByte:144]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformCircle class]]) { - [self writeByte:143]; + [self writeByte:145]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformHeatmap class]]) { - [self writeByte:144]; + [self writeByte:146]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformInfoWindow class]]) { - [self writeByte:145]; + [self writeByte:147]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformCluster class]]) { - [self writeByte:146]; + [self writeByte:148]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformClusterManager class]]) { - [self writeByte:147]; + [self writeByte:149]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformMarker class]]) { - [self writeByte:148]; + [self writeByte:150]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) { - [self writeByte:149]; + [self writeByte:151]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) { - [self writeByte:150]; + [self writeByte:152]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) { - [self writeByte:151]; + [self writeByte:153]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformTile class]]) { - [self writeByte:152]; + [self writeByte:154]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) { - [self writeByte:153]; + [self writeByte:155]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) { - [self writeByte:154]; + [self writeByte:156]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) { - [self writeByte:155]; + [self writeByte:157]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) { - [self writeByte:156]; + [self writeByte:158]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) { - [self writeByte:157]; + [self writeByte:159]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) { - [self writeByte:158]; + [self writeByte:160]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) { - [self writeByte:159]; + [self writeByte:161]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) { - [self writeByte:160]; + [self writeByte:162]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformPoint class]]) { - [self writeByte:161]; + [self writeByte:163]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformSize class]]) { - [self writeByte:162]; + [self writeByte:164]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) { - [self writeByte:163]; + [self writeByte:165]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) { - [self writeByte:164]; + [self writeByte:166]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) { - [self writeByte:165]; + [self writeByte:167]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) { - [self writeByte:166]; + [self writeByte:168]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) { - [self writeByte:167]; + [self writeByte:169]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) { - [self writeByte:168]; + [self writeByte:170]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) { - [self writeByte:169]; + [self writeByte:171]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) { - [self writeByte:170]; + [self writeByte:172]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) { - [self writeByte:171]; + [self writeByte:173]; + [self writeValue:[value toList]]; + } else if ([value isKindOfClass:[FGMPlatformBitmapPinConfig class]]) { + [self writeByte:174]; [self writeValue:[value toList]]; } else { [super writeValue:value]; @@ -1875,8 +1958,7 @@ - (FlutterStandardReader *)readerWithData:(NSData *)data { static FlutterStandardMessageCodec *sSharedObject = nil; static dispatch_once_t sPred = 0; dispatch_once(&sPred, ^{ - FGMMessagesPigeonCodecReaderWriter *readerWriter = - [[FGMMessagesPigeonCodecReaderWriter alloc] init]; + FGMMessagesPigeonCodecReaderWriter *readerWriter = [[FGMMessagesPigeonCodecReaderWriter alloc] init]; sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter]; }); return sSharedObject; @@ -1885,24 +1967,17 @@ void SetUpFGMMapsApi(id binaryMessenger, NSObject binaryMessenger, - NSObject *api, NSString *messageChannelSuffix) { - messageChannelSuffix = messageChannelSuffix.length > 0 - ? [NSString stringWithFormat:@".%@", messageChannelSuffix] - : @""; +void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObject *api, NSString *messageChannelSuffix) { + messageChannelSuffix = messageChannelSuffix.length > 0 ? [NSString stringWithFormat: @".%@", messageChannelSuffix] : @""; /// Returns once the map instance is available. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(waitForMapWithError:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(waitForMapWithError:)", api); + NSCAssert([api respondsToSelector:@selector(waitForMapWithError:)], @"FGMMapsApi api (%@) doesn't respond to @selector(waitForMapWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; [api waitForMapWithError:&error]; @@ -1917,18 +1992,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, /// Only non-null configuration values will result in updates; options with /// null values will remain unchanged. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.updateMapConfiguration", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(updateWithMapConfiguration:error:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(updateWithMapConfiguration:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateWithMapConfiguration:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateWithMapConfiguration:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformMapConfiguration *arg_configuration = GetNullableObjectAtIndex(args, 0); @@ -1942,29 +2012,20 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Updates the set of circles on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateCirclesByAdding:changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateCirclesByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateCirclesByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateCirclesByAdding:changing:removing:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateCirclesByAdding:arg_toAdd - changing:arg_toChange - removing:arg_idsToRemove - error:&error]; + [api updateCirclesByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -1973,28 +2034,20 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Updates the set of heatmaps on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.updateHeatmaps", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateHeatmapsByAdding:changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateHeatmapsByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateHeatmapsByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateHeatmapsByAdding:changing:removing:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateHeatmapsByAdding:arg_toAdd - changing:arg_toChange - removing:arg_idsToRemove - error:&error]; + [api updateHeatmapsByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2003,18 +2056,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Updates the set of custer managers for clusters on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.updateClusterManagers", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateClusterManagersByAdding:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateClusterManagersByAdding:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateClusterManagersByAdding:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateClusterManagersByAdding:removing:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); @@ -2029,29 +2077,20 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Updates the set of markers on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateMarkersByAdding:changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateMarkersByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateMarkersByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateMarkersByAdding:changing:removing:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateMarkersByAdding:arg_toAdd - changing:arg_toChange - removing:arg_idsToRemove - error:&error]; + [api updateMarkersByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2060,28 +2099,20 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Updates the set of polygonss on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.updatePolygons", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updatePolygonsByAdding:changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updatePolygonsByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updatePolygonsByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updatePolygonsByAdding:changing:removing:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updatePolygonsByAdding:arg_toAdd - changing:arg_toChange - removing:arg_idsToRemove - error:&error]; + [api updatePolygonsByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2090,29 +2121,20 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Updates the set of polylines on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.updatePolylines", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updatePolylinesByAdding: - changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updatePolylinesByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updatePolylinesByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updatePolylinesByAdding:changing:removing:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updatePolylinesByAdding:arg_toAdd - changing:arg_toChange - removing:arg_idsToRemove - error:&error]; + [api updatePolylinesByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2121,29 +2143,20 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Updates the set of tile overlays on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.updateTileOverlays", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateTileOverlaysByAdding: - changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateTileOverlaysByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateTileOverlaysByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateTileOverlaysByAdding:changing:removing:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateTileOverlaysByAdding:arg_toAdd - changing:arg_toChange - removing:arg_idsToRemove - error:&error]; + [api updateTileOverlaysByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2152,29 +2165,20 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Updates the set of ground overlays on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.updateGroundOverlays", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateGroundOverlaysByAdding: - changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateGroundOverlaysByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateGroundOverlaysByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateGroundOverlaysByAdding:changing:removing:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateGroundOverlaysByAdding:arg_toAdd - changing:arg_toChange - removing:arg_idsToRemove - error:&error]; + [api updateGroundOverlaysByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2183,18 +2187,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Gets the screen coordinate for the given map location. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.getScreenCoordinate", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(screenCoordinatesForLatLng:error:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(screenCoordinatesForLatLng:error:)", - api); + NSCAssert([api respondsToSelector:@selector(screenCoordinatesForLatLng:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(screenCoordinatesForLatLng:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformLatLng *arg_latLng = GetNullableObjectAtIndex(args, 0); @@ -2208,25 +2207,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Gets the map location for the given screen coordinate. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName: - [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(latLngForScreenCoordinate:error:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(latLngForScreenCoordinate:error:)", - api); + NSCAssert([api respondsToSelector:@selector(latLngForScreenCoordinate:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(latLngForScreenCoordinate:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformPoint *arg_screenCoordinate = GetNullableObjectAtIndex(args, 0); FlutterError *error; - FGMPlatformLatLng *output = [api latLngForScreenCoordinate:arg_screenCoordinate - error:&error]; + FGMPlatformLatLng *output = [api latLngForScreenCoordinate:arg_screenCoordinate error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -2235,16 +2227,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Gets the map region currently displayed on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.getVisibleRegion", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(visibleMapRegion:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(visibleMapRegion:)", api); + NSCAssert([api respondsToSelector:@selector(visibleMapRegion:)], @"FGMMapsApi api (%@) doesn't respond to @selector(visibleMapRegion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; FGMPlatformLatLngBounds *output = [api visibleMapRegion:&error]; @@ -2257,18 +2246,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(moveCameraWithUpdate:error:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(moveCameraWithUpdate:error:)", - api); + NSCAssert([api respondsToSelector:@selector(moveCameraWithUpdate:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(moveCameraWithUpdate:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformCameraUpdate *arg_cameraUpdate = GetNullableObjectAtIndex(args, 0); @@ -2283,27 +2267,19 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, /// Moves the camera according to [cameraUpdate], animating the update using a /// duration in milliseconds if provided. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(animateCameraWithUpdate:duration:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(animateCameraWithUpdate:duration:error:)", - api); + NSCAssert([api respondsToSelector:@selector(animateCameraWithUpdate:duration:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(animateCameraWithUpdate:duration:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformCameraUpdate *arg_cameraUpdate = GetNullableObjectAtIndex(args, 0); NSNumber *arg_durationMilliseconds = GetNullableObjectAtIndex(args, 1); FlutterError *error; - [api animateCameraWithUpdate:arg_cameraUpdate - duration:arg_durationMilliseconds - error:&error]; + [api animateCameraWithUpdate:arg_cameraUpdate duration:arg_durationMilliseconds error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2312,17 +2288,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Gets the current map zoom level. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(currentZoomLevel:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(currentZoomLevel:)", api); + NSCAssert([api respondsToSelector:@selector(currentZoomLevel:)], @"FGMMapsApi api (%@) doesn't respond to @selector(currentZoomLevel:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api currentZoomLevel:&error]; @@ -2334,18 +2306,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Show the info window for the marker with the given ID. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.showInfoWindow", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(showInfoWindowForMarkerWithIdentifier:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(showInfoWindowForMarkerWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(showInfoWindowForMarkerWithIdentifier:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(showInfoWindowForMarkerWithIdentifier:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_markerId = GetNullableObjectAtIndex(args, 0); @@ -2359,18 +2326,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Hide the info window for the marker with the given ID. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.hideInfoWindow", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(hideInfoWindowForMarkerWithIdentifier:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(hideInfoWindowForMarkerWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(hideInfoWindowForMarkerWithIdentifier:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(hideInfoWindowForMarkerWithIdentifier:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_markerId = GetNullableObjectAtIndex(args, 0); @@ -2385,25 +2347,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, /// Returns true if the marker with the given ID is currently displaying its /// info window. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.isInfoWindowShown", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier: - error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(isShowingInfoWindowForMarkerWithIdentifier:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_markerId = GetNullableObjectAtIndex(args, 0); FlutterError *error; - NSNumber *output = [api isShowingInfoWindowForMarkerWithIdentifier:arg_markerId - error:&error]; + NSNumber *output = [api isShowingInfoWindowForMarkerWithIdentifier:arg_markerId error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -2416,17 +2371,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, /// If there was an error setting the style, such as an invalid style string, /// returns the error message. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName: - [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(setStyle:error:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(setStyle:error:)", api); + NSCAssert([api respondsToSelector:@selector(setStyle:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(setStyle:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_style = GetNullableObjectAtIndex(args, 0); @@ -2444,16 +2395,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, /// This allows checking asynchronously for initial style failures, as there /// is no way to return failures from map initialization. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.getLastStyleError", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(lastStyleError:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(lastStyleError:)", api); + NSCAssert([api respondsToSelector:@selector(lastStyleError:)], @"FGMMapsApi api (%@) doesn't respond to @selector(lastStyleError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSString *output = [api lastStyleError:&error]; @@ -2465,18 +2413,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Clears the cache of tiles previously requseted from the tile provider. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.clearTileCache", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(clearTileCacheForOverlayWithIdentifier:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(clearTileCacheForOverlayWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(clearTileCacheForOverlayWithIdentifier:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(clearTileCacheForOverlayWithIdentifier:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_tileOverlayId = GetNullableObjectAtIndex(args, 0); @@ -2490,17 +2433,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Takes a snapshot of the map and returns its image data. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(takeSnapshotWithError:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(takeSnapshotWithError:)", api); + NSCAssert([api respondsToSelector:@selector(takeSnapshotWithError:)], @"FGMMapsApi api (%@) doesn't respond to @selector(takeSnapshotWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; FlutterStandardTypedData *output = [api takeSnapshotWithError:&error]; @@ -2510,6 +2449,24 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, [channel setMessageHandler:nil]; } } + /// Returns true if the map supports advanced markers + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable", messageChannelSuffix] + binaryMessenger:binaryMessenger + codec:FGMGetMessagesCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(isAdvancedMarkersAvailable:)], @"FGMMapsApi api (%@) doesn't respond to @selector(isAdvancedMarkersAvailable:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + NSNumber *output = [api isAdvancedMarkersAvailable:&error]; + callback(wrapResult(output, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } } @interface FGMMapsCallbackApi () @property(nonatomic, strong) NSObject *binaryMessenger; @@ -2521,450 +2478,335 @@ @implementation FGMMapsCallbackApi - (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger { return [self initWithBinaryMessenger:binaryMessenger messageChannelSuffix:@""]; } -- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger - messageChannelSuffix:(nullable NSString *)messageChannelSuffix { +- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger messageChannelSuffix:(nullable NSString*)messageChannelSuffix{ self = [self init]; if (self) { _binaryMessenger = binaryMessenger; - _messageChannelSuffix = [messageChannelSuffix length] == 0 - ? @"" - : [NSString stringWithFormat:@".%@", messageChannelSuffix]; + _messageChannelSuffix = [messageChannelSuffix length] == 0 ? @"" : [NSString stringWithFormat: @".%@", messageChannelSuffix]; } return self; } - (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted", - _messageChannelSuffix]; + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted", _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:nil - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)arg_cameraPosition - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove", - _messageChannelSuffix]; + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:nil reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)arg_cameraPosition completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove", _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[ arg_cameraPosition ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[arg_cameraPosition ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; } - (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle", - _messageChannelSuffix]; + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle", _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:nil - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapAtPosition:(FGMPlatformLatLng *)arg_position - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap", - _messageChannelSuffix]; + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:nil reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapAtPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap", _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[ arg_position ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didLongPressAtPosition:(FGMPlatformLatLng *)arg_position - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress", - _messageChannelSuffix]; + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[arg_position ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didLongPressAtPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress", _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[ arg_position ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapMarkerWithIdentifier:(NSString *)arg_markerId - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap", - _messageChannelSuffix]; + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[arg_position ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapMarkerWithIdentifier:(NSString *)arg_markerId completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap", _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[ arg_markerId ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didStartDragForMarkerWithIdentifier:(NSString *)arg_markerId - atPosition:(FGMPlatformLatLng *)arg_position - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat: - @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart", - _messageChannelSuffix]; + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[arg_markerId ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didStartDragForMarkerWithIdentifier:(NSString *)arg_markerId atPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart", _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didDragMarkerWithIdentifier:(NSString *)arg_markerId - atPosition:(FGMPlatformLatLng *)arg_position - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag", - _messageChannelSuffix]; + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[arg_markerId ?: [NSNull null], arg_position ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didDragMarkerWithIdentifier:(NSString *)arg_markerId atPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag", _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didEndDragForMarkerWithIdentifier:(NSString *)arg_markerId - atPosition:(FGMPlatformLatLng *)arg_position - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat: - @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd", - _messageChannelSuffix]; + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[arg_markerId ?: [NSNull null], arg_position ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didEndDragForMarkerWithIdentifier:(NSString *)arg_markerId atPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd", _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)arg_markerId - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat: - @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap", - _messageChannelSuffix]; + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[arg_markerId ?: [NSNull null], arg_position ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)arg_markerId completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap", _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[ arg_markerId ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapCircleWithIdentifier:(NSString *)arg_circleId - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap", - _messageChannelSuffix]; + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[arg_markerId ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapCircleWithIdentifier:(NSString *)arg_circleId completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap", _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[ arg_circleId ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapCluster:(FGMPlatformCluster *)arg_cluster - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap", - _messageChannelSuffix]; + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[arg_circleId ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapCluster:(FGMPlatformCluster *)arg_cluster completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap", _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[ arg_cluster ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapPolygonWithIdentifier:(NSString *)arg_polygonId - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap", - _messageChannelSuffix]; + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[arg_cluster ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapPolygonWithIdentifier:(NSString *)arg_polygonId completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap", _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[ arg_polygonId ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapPolylineWithIdentifier:(NSString *)arg_polylineId - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap", - _messageChannelSuffix]; + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[arg_polygonId ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapPolylineWithIdentifier:(NSString *)arg_polylineId completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap", _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[ arg_polylineId ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapGroundOverlayWithIdentifier:(NSString *)arg_groundOverlayId - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat: - @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap", - _messageChannelSuffix]; + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[arg_polylineId ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapGroundOverlayWithIdentifier:(NSString *)arg_groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap", _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[ arg_groundOverlayId ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId - location:(FGMPlatformPoint *)arg_location - zoom:(NSInteger)arg_zoom - completion:(void (^)(FGMPlatformTile *_Nullable, - FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat: - @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile", - _messageChannelSuffix]; + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[arg_groundOverlayId ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId location:(FGMPlatformPoint *)arg_location zoom:(NSInteger)arg_zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile", _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[ - arg_tileOverlayId ?: [NSNull null], arg_location ?: [NSNull null], @(arg_zoom) - ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion(nil, [FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - FGMPlatformTile *output = reply[0] == [NSNull null] ? nil : reply[0]; - completion(output, nil); - } - } else { - completion(nil, createConnectionError(channelName)); - } - }]; -} -@end - -void SetUpFGMMapsPlatformViewApi(id binaryMessenger, - NSObject *api) { + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[arg_tileOverlayId ?: [NSNull null], arg_location ?: [NSNull null], @(arg_zoom)] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion(nil, [FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + FGMPlatformTile *output = reply[0] == [NSNull null] ? nil : reply[0]; + completion(output, nil); + } + } else { + completion(nil, createConnectionError(channelName)); + } + }]; +} +@end + +void SetUpFGMMapsPlatformViewApi(id binaryMessenger, NSObject *api) { SetUpFGMMapsPlatformViewApiWithSuffix(binaryMessenger, api, @""); } -void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, - NSObject *api, - NSString *messageChannelSuffix) { - messageChannelSuffix = messageChannelSuffix.length > 0 - ? [NSString stringWithFormat:@".%@", messageChannelSuffix] - : @""; +void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, NSObject *api, NSString *messageChannelSuffix) { + messageChannelSuffix = messageChannelSuffix.length > 0 ? [NSString stringWithFormat: @".%@", messageChannelSuffix] : @""; { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsPlatformViewApi.createView", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(createViewType:error:)], - @"FGMMapsPlatformViewApi api (%@) doesn't respond to @selector(createViewType:error:)", - api); + NSCAssert([api respondsToSelector:@selector(createViewType:error:)], @"FGMMapsPlatformViewApi api (%@) doesn't respond to @selector(createViewType:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformMapViewCreationParams *arg_type = GetNullableObjectAtIndex(args, 0); @@ -2977,30 +2819,20 @@ void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMess } } } -void SetUpFGMMapsInspectorApi(id binaryMessenger, - NSObject *api) { +void SetUpFGMMapsInspectorApi(id binaryMessenger, NSObject *api) { SetUpFGMMapsInspectorApiWithSuffix(binaryMessenger, api, @""); } -void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, - NSObject *api, - NSString *messageChannelSuffix) { - messageChannelSuffix = messageChannelSuffix.length > 0 - ? [NSString stringWithFormat:@".%@", messageChannelSuffix] - : @""; +void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, NSObject *api, NSString *messageChannelSuffix) { + messageChannelSuffix = messageChannelSuffix.length > 0 ? [NSString stringWithFormat: @".%@", messageChannelSuffix] : @""; { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.areBuildingsEnabled", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areBuildingsEnabledWithError:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(areBuildingsEnabledWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(areBuildingsEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areBuildingsEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areBuildingsEnabledWithError:&error]; @@ -3011,18 +2843,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.areRotateGesturesEnabled", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areRotateGesturesEnabledWithError:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(areRotateGesturesEnabledWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(areRotateGesturesEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areRotateGesturesEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areRotateGesturesEnabledWithError:&error]; @@ -3033,18 +2860,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.areScrollGesturesEnabled", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areScrollGesturesEnabledWithError:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(areScrollGesturesEnabledWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(areScrollGesturesEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areScrollGesturesEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areScrollGesturesEnabledWithError:&error]; @@ -3055,18 +2877,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.areTiltGesturesEnabled", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areTiltGesturesEnabledWithError:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(areTiltGesturesEnabledWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(areTiltGesturesEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areTiltGesturesEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areTiltGesturesEnabledWithError:&error]; @@ -3077,18 +2894,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.areZoomGesturesEnabled", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areZoomGesturesEnabledWithError:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(areZoomGesturesEnabledWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(areZoomGesturesEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areZoomGesturesEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areZoomGesturesEnabledWithError:&error]; @@ -3099,18 +2911,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.isCompassEnabled", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(isCompassEnabledWithError:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isCompassEnabledWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(isCompassEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isCompassEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isCompassEnabledWithError:&error]; @@ -3121,18 +2928,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.isMyLocationButtonEnabled", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isMyLocationButtonEnabledWithError:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(isMyLocationButtonEnabledWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(isMyLocationButtonEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isMyLocationButtonEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isMyLocationButtonEnabledWithError:&error]; @@ -3143,18 +2945,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.isTrafficEnabled", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(isTrafficEnabledWithError:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isTrafficEnabledWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(isTrafficEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isTrafficEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isTrafficEnabledWithError:&error]; @@ -3165,24 +2962,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.getTileOverlayInfo", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(tileOverlayWithIdentifier:error:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(tileOverlayWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(tileOverlayWithIdentifier:error:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(tileOverlayWithIdentifier:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_tileOverlayId = GetNullableObjectAtIndex(args, 0); FlutterError *error; - FGMPlatformTileLayer *output = [api tileOverlayWithIdentifier:arg_tileOverlayId - error:&error]; + FGMPlatformTileLayer *output = [api tileOverlayWithIdentifier:arg_tileOverlayId error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -3190,24 +2981,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.getGroundOverlayInfo", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(groundOverlayWithIdentifier:error:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(groundOverlayWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(groundOverlayWithIdentifier:error:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(groundOverlayWithIdentifier:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_groundOverlayId = GetNullableObjectAtIndex(args, 0); FlutterError *error; - FGMPlatformGroundOverlay *output = [api groundOverlayWithIdentifier:arg_groundOverlayId - error:&error]; + FGMPlatformGroundOverlay *output = [api groundOverlayWithIdentifier:arg_groundOverlayId error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -3215,18 +3000,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.getHeatmapInfo", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(heatmapWithIdentifier:error:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(heatmapWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(heatmapWithIdentifier:error:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(heatmapWithIdentifier:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_heatmapId = GetNullableObjectAtIndex(args, 0); @@ -3239,16 +3019,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.getZoomRange", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(zoomRange:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(zoomRange:)", api); + NSCAssert([api respondsToSelector:@selector(zoomRange:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(zoomRange:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; FGMPlatformZoomRange *output = [api zoomRange:&error]; @@ -3259,24 +3036,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.getClusters", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(clustersWithIdentifier:error:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(clustersWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(clustersWithIdentifier:error:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(clustersWithIdentifier:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_clusterManagerId = GetNullableObjectAtIndex(args, 0); FlutterError *error; - NSArray *output = [api clustersWithIdentifier:arg_clusterManagerId - error:&error]; + NSArray *output = [api clustersWithIdentifier:arg_clusterManagerId error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -3284,16 +3055,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.getCameraPosition", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(cameraPosition:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(cameraPosition:)", api); + NSCAssert([api respondsToSelector:@selector(cameraPosition:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(cameraPosition:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; FGMPlatformCameraPosition *output = [api cameraPosition:&error]; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index 8ae82cfa78a..ac1d7ab8cfb 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -524,8 +524,6 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { initialGroundOverlays: mapObjects.groundOverlays .map(_platformGroundOverlayFromGroundOverlay) .toList(), - markerType: - _platformMarkerTypeFromMarkerType(widgetConfiguration.markerType), ); return UiKitView( @@ -568,7 +566,6 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { Set tileOverlays = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, - MarkerType markerType = MarkerType.marker, }) { return _buildView( creationId, @@ -599,7 +596,6 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { Set tileOverlays = const {}, Set>? gestureRecognizers, Map mapOptions = const {}, - MarkerType markerType = MarkerType.marker, }) { return buildViewWithTextDirection( creationId, @@ -613,7 +609,6 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { tileOverlays: tileOverlays, gestureRecognizers: gestureRecognizers, mapOptions: mapOptions, - markerType: markerType, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart index 673815e21b6..5f3d0aca23e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v22.7.2), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,8 +18,7 @@ PlatformException _createConnectionError(String channelName) { ); } -List wrapResponse( - {Object? result, PlatformException? error, bool empty = false}) { +List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { if (empty) { return []; } @@ -38,6 +37,12 @@ enum PlatformMapType { hybrid, } +enum MarkerCollisionBehavior { + required, + optionalAndHidesLowerPriority, + requiredAndHidesOptional, +} + /// Join types for polyline joints. enum PlatformJointType { mitered, @@ -52,6 +57,11 @@ enum PlatformPatternItemType { gap, } +enum PlatformMarkerType { + marker, + advancedMarker, +} + /// Pigeon equivalent of [MapBitmapScaling]. enum PlatformMapBitmapScaling { auto, @@ -511,6 +521,7 @@ class PlatformMarker { this.zIndex = 0.0, required this.markerId, this.clusterManagerId, + this.collisionBehavior, }); double alpha; @@ -539,6 +550,8 @@ class PlatformMarker { String? clusterManagerId; + MarkerCollisionBehavior? collisionBehavior; + Object encode() { return [ alpha, @@ -554,6 +567,7 @@ class PlatformMarker { zIndex, markerId, clusterManagerId, + collisionBehavior, ]; } @@ -573,6 +587,7 @@ class PlatformMarker { zIndex: result[10]! as double, markerId: result[11]! as String, clusterManagerId: result[12] as String?, + collisionBehavior: result[13] as MarkerCollisionBehavior?, ); } } @@ -1067,12 +1082,9 @@ class PlatformMapViewCreationParams { initialPolygons: (result[4] as List?)!.cast(), initialPolylines: (result[5] as List?)!.cast(), initialHeatmaps: (result[6] as List?)!.cast(), - initialTileOverlays: - (result[7] as List?)!.cast(), - initialClusterManagers: - (result[8] as List?)!.cast(), - initialGroundOverlays: - (result[9] as List?)!.cast(), + initialTileOverlays: (result[7] as List?)!.cast(), + initialClusterManagers: (result[8] as List?)!.cast(), + initialGroundOverlays: (result[9] as List?)!.cast(), ); } } @@ -1095,6 +1107,7 @@ class PlatformMapConfiguration { this.indoorViewEnabled, this.trafficEnabled, this.buildingsEnabled, + this.markerType, this.mapId, this.style, }); @@ -1129,6 +1142,8 @@ class PlatformMapConfiguration { bool? buildingsEnabled; + PlatformMarkerType? markerType; + String? mapId; String? style; @@ -1150,6 +1165,7 @@ class PlatformMapConfiguration { indoorViewEnabled, trafficEnabled, buildingsEnabled, + markerType, mapId, style, ]; @@ -1173,8 +1189,9 @@ class PlatformMapConfiguration { indoorViewEnabled: result[12] as bool?, trafficEnabled: result[13] as bool?, buildingsEnabled: result[14] as bool?, - mapId: result[15] as String?, - style: result[16] as String?, + markerType: result[15] as PlatformMarkerType?, + mapId: result[16] as String?, + style: result[17] as String?, ); } } @@ -1520,6 +1537,54 @@ class PlatformBitmapBytesMap { } } +/// Pigeon equivalent of [PinConfig]. +class PlatformBitmapPinConfig { + PlatformBitmapPinConfig({ + this.backgroundColor, + this.borderColor, + this.glyphColor, + this.glyphTextColor, + this.glyphText, + this.glyphBitmap, + }); + + int? backgroundColor; + + int? borderColor; + + int? glyphColor; + + int? glyphTextColor; + + String? glyphText; + + PlatformBitmap? glyphBitmap; + + Object encode() { + return [ + backgroundColor, + borderColor, + glyphColor, + glyphTextColor, + glyphText, + glyphBitmap, + ]; + } + + static PlatformBitmapPinConfig decode(Object result) { + result as List; + return PlatformBitmapPinConfig( + backgroundColor: result[0] as int?, + borderColor: result[1] as int?, + glyphColor: result[2] as int?, + glyphTextColor: result[3] as int?, + glyphText: result[4] as String?, + glyphBitmap: result[5] as PlatformBitmap?, + ); + } +} + + class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -1527,135 +1592,144 @@ class _PigeonCodec extends StandardMessageCodec { if (value is int) { buffer.putUint8(4); buffer.putInt64(value); - } else if (value is PlatformMapType) { + } else if (value is PlatformMapType) { buffer.putUint8(129); writeValue(buffer, value.index); - } else if (value is PlatformJointType) { + } else if (value is MarkerCollisionBehavior) { buffer.putUint8(130); writeValue(buffer, value.index); - } else if (value is PlatformPatternItemType) { + } else if (value is PlatformJointType) { buffer.putUint8(131); writeValue(buffer, value.index); - } else if (value is PlatformMapBitmapScaling) { + } else if (value is PlatformPatternItemType) { buffer.putUint8(132); writeValue(buffer, value.index); - } else if (value is PlatformCameraPosition) { + } else if (value is PlatformMarkerType) { buffer.putUint8(133); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { + writeValue(buffer, value.index); + } else if (value is PlatformMapBitmapScaling) { buffer.putUint8(134); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewCameraPosition) { + writeValue(buffer, value.index); + } else if (value is PlatformCameraPosition) { buffer.putUint8(135); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLng) { + } else if (value is PlatformCameraUpdate) { buffer.putUint8(136); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngBounds) { + } else if (value is PlatformCameraUpdateNewCameraPosition) { buffer.putUint8(137); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngZoom) { + } else if (value is PlatformCameraUpdateNewLatLng) { buffer.putUint8(138); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateScrollBy) { + } else if (value is PlatformCameraUpdateNewLatLngBounds) { buffer.putUint8(139); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomBy) { + } else if (value is PlatformCameraUpdateNewLatLngZoom) { buffer.putUint8(140); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoom) { + } else if (value is PlatformCameraUpdateScrollBy) { buffer.putUint8(141); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomTo) { + } else if (value is PlatformCameraUpdateZoomBy) { buffer.putUint8(142); writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { + } else if (value is PlatformCameraUpdateZoom) { buffer.putUint8(143); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { + } else if (value is PlatformCameraUpdateZoomTo) { buffer.putUint8(144); writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { + } else if (value is PlatformCircle) { buffer.putUint8(145); writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { + } else if (value is PlatformHeatmap) { buffer.putUint8(146); writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { + } else if (value is PlatformInfoWindow) { buffer.putUint8(147); writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { + } else if (value is PlatformCluster) { buffer.putUint8(148); writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { + } else if (value is PlatformClusterManager) { buffer.putUint8(149); writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { + } else if (value is PlatformMarker) { buffer.putUint8(150); writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { + } else if (value is PlatformPolygon) { buffer.putUint8(151); writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { + } else if (value is PlatformPolyline) { buffer.putUint8(152); writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { + } else if (value is PlatformPatternItem) { buffer.putUint8(153); writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { + } else if (value is PlatformTile) { buffer.putUint8(154); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { + } else if (value is PlatformTileOverlay) { buffer.putUint8(155); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { + } else if (value is PlatformEdgeInsets) { buffer.putUint8(156); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { + } else if (value is PlatformLatLng) { buffer.putUint8(157); writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { + } else if (value is PlatformLatLngBounds) { buffer.putUint8(158); writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { + } else if (value is PlatformCameraTargetBounds) { buffer.putUint8(159); writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { + } else if (value is PlatformGroundOverlay) { buffer.putUint8(160); writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { + } else if (value is PlatformMapViewCreationParams) { buffer.putUint8(161); writeValue(buffer, value.encode()); - } else if (value is PlatformSize) { + } else if (value is PlatformMapConfiguration) { buffer.putUint8(162); writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { + } else if (value is PlatformPoint) { buffer.putUint8(163); writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { + } else if (value is PlatformSize) { buffer.putUint8(164); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { + } else if (value is PlatformTileLayer) { buffer.putUint8(165); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { + } else if (value is PlatformZoomRange) { buffer.putUint8(166); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { + } else if (value is PlatformBitmap) { buffer.putUint8(167); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { + } else if (value is PlatformBitmapDefaultMarker) { buffer.putUint8(168); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { + } else if (value is PlatformBitmapBytes) { buffer.putUint8(169); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { + } else if (value is PlatformBitmapAsset) { buffer.putUint8(170); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { + } else if (value is PlatformBitmapAssetImage) { buffer.putUint8(171); writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapAssetMap) { + buffer.putUint8(172); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapBytesMap) { + buffer.putUint8(173); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapPinConfig) { + buffer.putUint8(174); + writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); } @@ -1664,96 +1738,104 @@ class _PigeonCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 129: + case 129: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformMapType.values[value]; - case 130: + case 130: + final int? value = readValue(buffer) as int?; + return value == null ? null : MarkerCollisionBehavior.values[value]; + case 131: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformJointType.values[value]; - case 131: + case 132: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformPatternItemType.values[value]; - case 132: + case 133: + final int? value = readValue(buffer) as int?; + return value == null ? null : PlatformMarkerType.values[value]; + case 134: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformMapBitmapScaling.values[value]; - case 133: + case 135: return PlatformCameraPosition.decode(readValue(buffer)!); - case 134: + case 136: return PlatformCameraUpdate.decode(readValue(buffer)!); - case 135: + case 137: return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!); - case 136: + case 138: return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!); - case 137: + case 139: return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); - case 138: + case 140: return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); - case 139: + case 141: return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); - case 140: + case 142: return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); - case 141: + case 143: return PlatformCameraUpdateZoom.decode(readValue(buffer)!); - case 142: + case 144: return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); - case 143: + case 145: return PlatformCircle.decode(readValue(buffer)!); - case 144: + case 146: return PlatformHeatmap.decode(readValue(buffer)!); - case 145: + case 147: return PlatformInfoWindow.decode(readValue(buffer)!); - case 146: + case 148: return PlatformCluster.decode(readValue(buffer)!); - case 147: + case 149: return PlatformClusterManager.decode(readValue(buffer)!); - case 148: + case 150: return PlatformMarker.decode(readValue(buffer)!); - case 149: + case 151: return PlatformPolygon.decode(readValue(buffer)!); - case 150: + case 152: return PlatformPolyline.decode(readValue(buffer)!); - case 151: + case 153: return PlatformPatternItem.decode(readValue(buffer)!); - case 152: + case 154: return PlatformTile.decode(readValue(buffer)!); - case 153: + case 155: return PlatformTileOverlay.decode(readValue(buffer)!); - case 154: + case 156: return PlatformEdgeInsets.decode(readValue(buffer)!); - case 155: + case 157: return PlatformLatLng.decode(readValue(buffer)!); - case 156: + case 158: return PlatformLatLngBounds.decode(readValue(buffer)!); - case 157: + case 159: return PlatformCameraTargetBounds.decode(readValue(buffer)!); - case 158: + case 160: return PlatformGroundOverlay.decode(readValue(buffer)!); - case 159: + case 161: return PlatformMapViewCreationParams.decode(readValue(buffer)!); - case 160: + case 162: return PlatformMapConfiguration.decode(readValue(buffer)!); - case 161: + case 163: return PlatformPoint.decode(readValue(buffer)!); - case 162: + case 164: return PlatformSize.decode(readValue(buffer)!); - case 163: + case 165: return PlatformTileLayer.decode(readValue(buffer)!); - case 164: + case 166: return PlatformZoomRange.decode(readValue(buffer)!); - case 165: + case 167: return PlatformBitmap.decode(readValue(buffer)!); - case 166: + case 168: return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); - case 167: + case 169: return PlatformBitmapBytes.decode(readValue(buffer)!); - case 168: + case 170: return PlatformBitmapAsset.decode(readValue(buffer)!); - case 169: + case 171: return PlatformBitmapAssetImage.decode(readValue(buffer)!); - case 170: + case 172: return PlatformBitmapAssetMap.decode(readValue(buffer)!); - case 171: + case 173: return PlatformBitmapBytesMap.decode(readValue(buffer)!); + case 174: + return PlatformBitmapPinConfig.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); } @@ -1769,8 +1851,7 @@ class MapsApi { /// BinaryMessenger will be used which routes to the host platform. MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = - messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -1779,10 +1860,8 @@ class MapsApi { /// Returns once the map instance is available. Future waitForMap() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -1806,18 +1885,15 @@ class MapsApi { /// /// Only non-null configuration values will result in updates; options with /// null values will remain unchanged. - Future updateMapConfiguration( - PlatformMapConfiguration configuration) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updateMapConfiguration(PlatformMapConfiguration configuration) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([configuration]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([configuration]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1832,18 +1908,15 @@ class MapsApi { } /// Updates the set of circles on the map. - Future updateCircles(List toAdd, - List toChange, List idsToRemove) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updateCircles(List toAdd, List toChange, List idsToRemove) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1858,18 +1931,15 @@ class MapsApi { } /// Updates the set of heatmaps on the map. - Future updateHeatmaps(List toAdd, - List toChange, List idsToRemove) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1884,18 +1954,15 @@ class MapsApi { } /// Updates the set of custer managers for clusters on the map. - Future updateClusterManagers( - List toAdd, List idsToRemove) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updateClusterManagers(List toAdd, List idsToRemove) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([toAdd, idsToRemove]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([toAdd, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1910,18 +1977,15 @@ class MapsApi { } /// Updates the set of markers on the map. - Future updateMarkers(List toAdd, - List toChange, List idsToRemove) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1936,18 +2000,15 @@ class MapsApi { } /// Updates the set of polygonss on the map. - Future updatePolygons(List toAdd, - List toChange, List idsToRemove) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1962,18 +2023,15 @@ class MapsApi { } /// Updates the set of polylines on the map. - Future updatePolylines(List toAdd, - List toChange, List idsToRemove) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1988,18 +2046,15 @@ class MapsApi { } /// Updates the set of tile overlays on the map. - Future updateTileOverlays(List toAdd, - List toChange, List idsToRemove) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2014,18 +2069,15 @@ class MapsApi { } /// Updates the set of ground overlays on the map. - Future updateGroundOverlays(List toAdd, - List toChange, List idsToRemove) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2041,10 +2093,8 @@ class MapsApi { /// Gets the screen coordinate for the given map location. Future getScreenCoordinate(PlatformLatLng latLng) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2071,16 +2121,14 @@ class MapsApi { /// Gets the map location for the given screen coordinate. Future getLatLng(PlatformPoint screenCoordinate) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([screenCoordinate]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([screenCoordinate]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2101,10 +2149,8 @@ class MapsApi { /// Gets the map region currently displayed on the map. Future getVisibleRegion() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2132,10 +2178,8 @@ class MapsApi { /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. Future moveCamera(PlatformCameraUpdate cameraUpdate) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2157,18 +2201,15 @@ class MapsApi { /// Moves the camera according to [cameraUpdate], animating the update using a /// duration in milliseconds if provided. - Future animateCamera( - PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([cameraUpdate, durationMilliseconds]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([cameraUpdate, durationMilliseconds]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2184,10 +2225,8 @@ class MapsApi { /// Gets the current map zoom level. Future getZoomLevel() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2214,10 +2253,8 @@ class MapsApi { /// Show the info window for the marker with the given ID. Future showInfoWindow(String markerId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2239,10 +2276,8 @@ class MapsApi { /// Hide the info window for the marker with the given ID. Future hideInfoWindow(String markerId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2265,10 +2300,8 @@ class MapsApi { /// Returns true if the marker with the given ID is currently displaying its /// info window. Future isInfoWindowShown(String markerId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2299,10 +2332,8 @@ class MapsApi { /// If there was an error setting the style, such as an invalid style string, /// returns the error message. Future setStyle(String style) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2328,10 +2359,8 @@ class MapsApi { /// This allows checking asynchronously for initial style failures, as there /// is no way to return failures from map initialization. Future getLastStyleError() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2353,16 +2382,14 @@ class MapsApi { /// Clears the cache of tiles previously requseted from the tile provider. Future clearTileCache(String tileOverlayId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([tileOverlayId]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([tileOverlayId]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2378,10 +2405,8 @@ class MapsApi { /// Takes a snapshot of the map and returns its image data. Future takeSnapshot() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2403,31 +2428,29 @@ class MapsApi { /// Returns true if the map supports advanced markers Future isAdvancedMarkersAvailable() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( - __pigeon_channelName, + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, pigeonChannelCodec, - binaryMessenger: __pigeon_binaryMessenger, + binaryMessenger: pigeonVar_binaryMessenger, ); - final List? __pigeon_replyList = - await __pigeon_channel.send(null) as List?; - if (__pigeon_replyList == null) { - throw _createConnectionError(__pigeon_channelName); - } else if (__pigeon_replyList.length > 1) { + final List? pigeonVar_replyList = + await pigeonVar_channel.send(null) as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { throw PlatformException( - code: __pigeon_replyList[0]! as String, - message: __pigeon_replyList[1] as String?, - details: __pigeon_replyList[2], + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], ); - } else if (__pigeon_replyList[0] == null) { + } else if (pigeonVar_replyList[0] == null) { throw PlatformException( code: 'null-error', message: 'Host platform returned null value for non-null return value.', ); } else { - return (__pigeon_replyList[0] as bool?)!; + return (pigeonVar_replyList[0] as bool?)!; } } } @@ -2482,22 +2505,13 @@ abstract class MapsCallbackApi { void onGroundOverlayTap(String groundOverlayId); /// Called to get data for a map tile. - Future getTileOverlayTile( - String tileOverlayId, PlatformPoint location, int zoom); - - static void setUp( - MapsCallbackApi? api, { - BinaryMessenger? binaryMessenger, - String messageChannelSuffix = '', - }) { - messageChannelSuffix = - messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); + + static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { + messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); @@ -2508,29 +2522,24 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.'); final List args = (message as List?)!; - final PlatformCameraPosition? arg_cameraPosition = - (args[0] as PlatformCameraPosition?); + final PlatformCameraPosition? arg_cameraPosition = (args[0] as PlatformCameraPosition?); assert(arg_cameraPosition != null, 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.'); try { @@ -2538,19 +2547,15 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); @@ -2561,26 +2566,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.'); final List args = (message as List?)!; final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); assert(arg_position != null, @@ -2590,26 +2591,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.'); final List args = (message as List?)!; final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); assert(arg_position != null, @@ -2619,26 +2616,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2648,26 +2641,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2680,26 +2669,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2712,26 +2697,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2744,26 +2725,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2773,26 +2750,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.'); final List args = (message as List?)!; final String? arg_circleId = (args[0] as String?); assert(arg_circleId != null, @@ -2802,26 +2775,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.'); final List args = (message as List?)!; final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); assert(arg_cluster != null, @@ -2831,26 +2800,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.'); final List args = (message as List?)!; final String? arg_polygonId = (args[0] as String?); assert(arg_polygonId != null, @@ -2860,26 +2825,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.'); final List args = (message as List?)!; final String? arg_polylineId = (args[0] as String?); assert(arg_polylineId != null, @@ -2889,26 +2850,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.'); final List args = (message as List?)!; final String? arg_groundOverlayId = (args[0] as String?); assert(arg_groundOverlayId != null, @@ -2918,26 +2875,22 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel< - Object?> pigeonVar_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.'); final List args = (message as List?)!; final String? arg_tileOverlayId = (args[0] as String?); assert(arg_tileOverlayId != null, @@ -2949,14 +2902,12 @@ abstract class MapsCallbackApi { assert(arg_zoom != null, 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); try { - final PlatformTile output = await api.getTileOverlayTile( - arg_tileOverlayId!, arg_location!, arg_zoom!); + final PlatformTile output = await api.getTileOverlayTile(arg_tileOverlayId!, arg_location!, arg_zoom!); return wrapResponse(result: output); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } @@ -2971,11 +2922,9 @@ class MapsPlatformViewApi { /// Constructor for [MapsPlatformViewApi]. The [binaryMessenger] named argument is /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. - MapsPlatformViewApi( - {BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + MapsPlatformViewApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = - messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -2983,10 +2932,8 @@ class MapsPlatformViewApi { final String pigeonVar_messageChannelSuffix; Future createView(PlatformMapViewCreationParams? type) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3012,11 +2959,9 @@ class MapsInspectorApi { /// Constructor for [MapsInspectorApi]. The [binaryMessenger] named argument is /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. - MapsInspectorApi( - {BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + MapsInspectorApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = - messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -3024,10 +2969,8 @@ class MapsInspectorApi { final String pigeonVar_messageChannelSuffix; Future areBuildingsEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3053,10 +2996,8 @@ class MapsInspectorApi { } Future areRotateGesturesEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3082,10 +3023,8 @@ class MapsInspectorApi { } Future areScrollGesturesEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3111,10 +3050,8 @@ class MapsInspectorApi { } Future areTiltGesturesEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3140,10 +3077,8 @@ class MapsInspectorApi { } Future areZoomGesturesEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3169,10 +3104,8 @@ class MapsInspectorApi { } Future isCompassEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3198,10 +3131,8 @@ class MapsInspectorApi { } Future isMyLocationButtonEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3227,10 +3158,8 @@ class MapsInspectorApi { } Future isTrafficEnabled() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3256,16 +3185,14 @@ class MapsInspectorApi { } Future getTileOverlayInfo(String tileOverlayId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([tileOverlayId]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([tileOverlayId]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3279,18 +3206,15 @@ class MapsInspectorApi { } } - Future getGroundOverlayInfo( - String groundOverlayId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + Future getGroundOverlayInfo(String groundOverlayId) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([groundOverlayId]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([groundOverlayId]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3305,10 +3229,8 @@ class MapsInspectorApi { } Future getHeatmapInfo(String heatmapId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3329,10 +3251,8 @@ class MapsInspectorApi { } Future getZoomRange() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3358,16 +3278,14 @@ class MapsInspectorApi { } Future> getClusters(String clusterManagerId) async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = await pigeonVar_channel - .send([clusterManagerId]) as List?; + final List? pigeonVar_replyList = + await pigeonVar_channel.send([clusterManagerId]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3382,16 +3300,13 @@ class MapsInspectorApi { message: 'Host platform returned null value for non-null return value.', ); } else { - return (pigeonVar_replyList[0] as List?)! - .cast(); + return (pigeonVar_replyList[0] as List?)!.cast(); } } Future getCameraPosition() async { - final String pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( + final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index c86799bfae4..04d1c4d22a7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -407,7 +407,6 @@ class PlatformMapViewCreationParams { required this.initialTileOverlays, required this.initialClusterManagers, required this.initialGroundOverlays, - required this.markerType, }); final PlatformCameraPosition initialCameraPosition; @@ -420,7 +419,6 @@ class PlatformMapViewCreationParams { final List initialTileOverlays; final List initialClusterManagers; final List initialGroundOverlays; - final PlatformMarkerType markerType; } enum PlatformMarkerType { diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart index 1b4d2b102ce..08c34d29ea7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart @@ -15,7 +15,6 @@ export 'cluster_manager.dart'; export 'cluster_manager_updates.dart'; export 'ground_overlay.dart'; export 'ground_overlay_updates.dart'; -export 'glyph.dart'; export 'heatmap.dart'; export 'heatmap_updates.dart'; export 'joint_type.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart index 0cfdd32d74e..3d00e04495b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/utils/map_configuration_serialization_test.dart @@ -7,7 +7,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; import 'package:google_maps_flutter_platform_interface/src/types/utils/map_configuration_serialization.dart'; -const String _kCloudMapId = '000000000000000'; // Dummy map ID. +const String _kMapId = '000000000000000'; // Dummy map ID. void main() { test('empty serialization', () async { @@ -39,8 +39,8 @@ void main() { indoorViewEnabled: false, trafficEnabled: false, buildingsEnabled: false, - mapId: _kCloudMapId, - cloudMapId: _kCloudMapId, + mapId: _kMapId, + cloudMapId: _kMapId, ); final Map json = jsonForMapConfiguration(config); @@ -74,8 +74,8 @@ void main() { 'indoorEnabled': false, 'trafficEnabled': false, 'buildingsEnabled': false, - 'mapId': _kCloudMapId, - 'cloudMapId': _kCloudMapId, + 'mapId': _kMapId, + 'cloudMapId': _kMapId, }); }); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart index 303eb13ab6f..b55de6a0034 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart @@ -18,7 +18,7 @@ import 'google_maps_controller_test.mocks.dart'; // This value is used when comparing long~num, like // LatLng values. -const String _kCloudMapId = '000000000000000'; // Dummy map ID. +const String _kMapId = '000000000000000'; // Dummy map ID. gmaps.Map mapShim() => throw UnimplementedError(); @@ -435,7 +435,7 @@ void main() { mapConfiguration: const MapConfiguration( mapType: MapType.satellite, zoomControlsEnabled: true, - mapId: _kCloudMapId, + mapId: _kMapId, fortyFiveDegreeImageryEnabled: false, )); controller.debugSetOverrides( @@ -449,7 +449,7 @@ void main() { expect(capturedOptions, isNotNull); expect(capturedOptions!.mapTypeId, gmaps.MapTypeId.SATELLITE); expect(capturedOptions!.zoomControl, true); - expect(capturedOptions!.mapId, _kCloudMapId); + expect(capturedOptions!.mapId, _kMapId); expect(capturedOptions!.gestureHandling, 'auto', reason: 'by default the map handles zoom/pan gestures internally'); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index dc3706163bf..2e1ca301cdd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -323,18 +323,6 @@ void _setIconSize({ icon.scaledSize = gmapsSize; } -void _setIconAnchor({ - required Size size, - required Offset anchor, - required gmaps.Icon icon, -}) { - final gmaps.Point gmapsAnchor = gmaps.Point( - size.width * anchor.dx, - size.height * anchor.dy, - ); - icon.anchor = gmapsAnchor; -} - /// Determines the appropriate size for a bitmap based on its descriptor. /// /// This method returns the icon's size based on the provided [width] and @@ -534,8 +522,8 @@ Future _advancedMarkerIconFromBitmapDescriptor( // Converts a [BitmapDescriptor] into a [gmaps.Icon] that can be used in Markers. Future _gmIconFromBitmapDescriptor( - BitmapDescriptor bitmapDescriptor, - Offset anchor, + BitmapDescriptor bitmapDescriptor, + Offset anchor, ) async { gmaps.Icon? icon; @@ -642,7 +630,7 @@ Future _markerOptionsFromMarker( marker.position.latitude, marker.position.longitude, ) - ..icon = await _gmIconFromBitmapDescriptor(marker.icon) + ..icon = await _gmIconFromBitmapDescriptor(marker.icon, marker.anchor) ..title = sanitizeHtml(marker.infoWindow.title ?? '') ..zIndex = marker.zIndex ..visible = marker.visible diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index f83c424e874..0d4a90b8571 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -52,7 +52,7 @@ class GoogleMapController { assert( markerTypes.first == Marker, 'All markers must be of type Marker because ' - 'mapConfiguration.markerType is MarkerType.legacy', + 'mapConfiguration.markerType is MarkerType.marker', ); case MarkerType.advancedMarker: assert( diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_inspector_web.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_inspector_web.dart index 5434939aebd..f5b3d27f020 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_inspector_web.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_inspector_web.dart @@ -105,7 +105,7 @@ class GoogleMapsInspectorWeb extends GoogleMapsInspectorPlatform { Uint8List.fromList([0]), bitmapScaling: MapBitmapScaling.none, ), - bounds: gmLatLngBoundsTolatLngBounds(groundOverlay.bounds), + bounds: gmLatLngBoundsToLatLngBounds(groundOverlay.bounds), transparency: 1.0 - groundOverlay.opacity, visible: groundOverlay.map != null, clickable: clickable != null && (clickable as JSBoolean).toDart); From 6c9fd7dfaa5fa350ea84d20da778f314030a09ff Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 11 Apr 2025 15:56:32 +0300 Subject: [PATCH 108/130] Fix markerType params --- .../example/ios14/ios/RunnerTests/GoogleMapsTests.m | 1 - .../example/ios15/ios/RunnerTests/GoogleMapsTests.m | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/GoogleMapsTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/GoogleMapsTests.m index 6af726de2e8..4982d4a59ce 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/GoogleMapsTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/GoogleMapsTests.m @@ -212,7 +212,6 @@ - (FGMPlatformMapViewCreationParams *)emptyCreationParameters { initialTileOverlays:@[] initialClusterManagers:@[] initialGroundOverlays:@[]]; -markerType:FGMPlatformMarkerTypeLegacy]; } @end diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/ios/RunnerTests/GoogleMapsTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/ios/RunnerTests/GoogleMapsTests.m index a1fbc3e66c9..6d821b4d11f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/ios/RunnerTests/GoogleMapsTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/ios/RunnerTests/GoogleMapsTests.m @@ -105,7 +105,6 @@ - (FGMPlatformMapViewCreationParams *)emptyCreationParameters { initialTileOverlays:@[] initialClusterManagers:@[] initialGroundOverlays:@[]]; -markerType:FGMPlatformMarkerTypeLegacy]; } @end From c30c172dcc365c536648d4d2b920ce8f3188fa00 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 14 Apr 2025 09:15:58 +0300 Subject: [PATCH 109/130] Remove AdvancedMarkersCapabilityStatus from PlaceMarkerPage --- .../example/shared/maps_example_dart/lib/place_marker.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart index 2b2b9f12720..861979493fd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/place_marker.dart @@ -304,7 +304,6 @@ class _PlaceMarkerBodyState extends State<_PlaceMarkerBody> { mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - AdvancedMarkersCapabilityStatus(controller: controller), Expanded( child: ExampleGoogleMap( onMapCreated: _onMapCreated, From afa509e95fb0290c2d43b8169d3d4609e940f901 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 14 Apr 2025 09:18:07 +0300 Subject: [PATCH 110/130] Fix comment style --- .../google_maps_flutter_ios/ios/Classes/messages.g.h | 2 +- .../google_maps_flutter_ios/ios/Classes/messages.g.m | 2 +- .../google_maps_flutter_ios/lib/src/messages.g.dart | 2 +- .../google_maps_flutter_ios/pigeons/messages.dart | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h index abd7d606cdd..0d170ca7669 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h @@ -784,7 +784,7 @@ NSObject *FGMGetMessagesCodec(void); - (void)clearTileCacheForOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; /// Takes a snapshot of the map and returns its image data. - (nullable FlutterStandardTypedData *)takeSnapshotWithError:(FlutterError *_Nullable *_Nonnull)error; -/// Returns true if the map supports advanced markers +/// Returns true if the map supports advanced markers. /// /// @return `nil` only when `error != nil`. - (nullable NSNumber *)isAdvancedMarkersAvailable:(FlutterError *_Nullable *_Nonnull)error; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m index 5fb511a0bc1..9b24e6f4804 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m @@ -2449,7 +2449,7 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj [channel setMessageHandler:nil]; } } - /// Returns true if the map supports advanced markers + /// Returns true if the map supports advanced markers. { FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart index 5f3d0aca23e..88f7e9177bd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart @@ -2426,7 +2426,7 @@ class MapsApi { } } - /// Returns true if the map supports advanced markers + /// Returns true if the map supports advanced markers. Future isAdvancedMarkersAvailable() async { final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable$pigeonVar_messageChannelSuffix'; final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index 04d1c4d22a7..9ef3508719b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -730,7 +730,7 @@ abstract class MapsApi { /// Takes a snapshot of the map and returns its image data. Uint8List? takeSnapshot(); - /// Returns true if the map supports advanced markers + /// Returns true if the map supports advanced markers. @ObjCSelector('isAdvancedMarkersAvailable') bool isAdvancedMarkersAvailable(); } From 09cf20b3087070bd9b8243214da0d915b12725c4 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 14 Apr 2025 09:28:26 +0300 Subject: [PATCH 111/130] Rename MarkerCollisionBehavior.required to requiredDisplay --- .../main/java/io/flutter/plugins/googlemaps/Convert.java | 2 +- .../main/java/io/flutter/plugins/googlemaps/Messages.java | 2 +- .../lib/src/google_maps_flutter_android.dart | 6 +++--- .../google_maps_flutter_android/lib/src/messages.g.dart | 4 ++-- .../google_maps_flutter_android/pigeons/messages.dart | 4 ++-- .../google_maps_flutter_ios/ios/Classes/messages.g.h | 2 +- .../google_maps_flutter_ios/lib/src/messages.g.dart | 2 +- .../google_maps_flutter_ios/pigeons/messages.dart | 2 +- .../lib/src/types/advanced_marker.dart | 4 ++-- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java index 274dd8f4248..65574043423 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Convert.java @@ -714,7 +714,7 @@ static int jointTypeFromPigeon(Messages.PlatformJointType jointType) { static int collisionBehaviorFromPigeon( Messages.PlatformMarkerCollisionBehavior collisionBehavior) { switch (collisionBehavior) { - case REQUIRED: + case REQUIRED_DISPLAY: return AdvancedMarkerOptions.CollisionBehavior.REQUIRED; case OPTIONAL_AND_HIDES_LOWER_PRIORITY: return AdvancedMarkerOptions.CollisionBehavior.OPTIONAL_AND_HIDES_LOWER_PRIORITY; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java index f3a10852535..fb83a57ded0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java @@ -102,7 +102,7 @@ public enum PlatformRendererType { } public enum PlatformMarkerCollisionBehavior { - REQUIRED(0), + REQUIRED_DISPLAY(0), OPTIONAL_AND_HIDES_LOWER_PRIORITY(1), REQUIRED_AND_HIDES_OPTIONAL(2); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index 15b5b42b04e..45bbb7755ee 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart @@ -805,7 +805,7 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { ? platformMarkerCollisionBehaviorFromMarkerCollisionBehavior( marker.collisionBehavior, ) - : PlatformMarkerCollisionBehavior.required, + : PlatformMarkerCollisionBehavior.requiredDisplay, ); } @@ -1479,8 +1479,8 @@ PlatformMarkerCollisionBehavior MarkerCollisionBehavior markerCollisionBehavior, ) { switch (markerCollisionBehavior) { - case MarkerCollisionBehavior.required: - return PlatformMarkerCollisionBehavior.required; + case MarkerCollisionBehavior.requiredDisplay: + return PlatformMarkerCollisionBehavior.requiredDisplay; case MarkerCollisionBehavior.optionalAndHidesLowerPriority: return PlatformMarkerCollisionBehavior.optionalAndHidesLowerPriority; case MarkerCollisionBehavior.requiredAndHidesOptional: diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart index e5187392f71..7443b6fce33 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart @@ -43,7 +43,7 @@ enum PlatformRendererType { } enum PlatformMarkerCollisionBehavior { - required, + requiredDisplay, optionalAndHidesLowerPriority, requiredAndHidesOptional, } @@ -528,7 +528,7 @@ class PlatformMarker { this.zIndex = 0.0, required this.markerId, this.clusterManagerId, - this.collisionBehavior = PlatformMarkerCollisionBehavior.required, + this.collisionBehavior = PlatformMarkerCollisionBehavior.requiredDisplay, }); double alpha; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart index eeb2dfc40bc..10f1c6df96a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart @@ -184,7 +184,7 @@ class PlatformMarker { this.visible = true, this.zIndex = 0.0, this.clusterManagerId, - this.collisionBehavior = PlatformMarkerCollisionBehavior.required, + this.collisionBehavior = PlatformMarkerCollisionBehavior.requiredDisplay, }); final double alpha; @@ -206,7 +206,7 @@ class PlatformMarker { } enum PlatformMarkerCollisionBehavior { - required, + requiredDisplay, optionalAndHidesLowerPriority, requiredAndHidesOptional, } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h index 0d170ca7669..9302efe3f89 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h @@ -29,7 +29,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapType) { @end typedef NS_ENUM(NSUInteger, FGMMarkerCollisionBehavior) { - FGMMarkerCollisionBehaviorRequired = 0, + FGMMarkerCollisionBehaviorRequiredDisplay = 0, FGMMarkerCollisionBehaviorOptionalAndHidesLowerPriority = 1, FGMMarkerCollisionBehaviorRequiredAndHidesOptional = 2, }; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart index 88f7e9177bd..9445d01b71b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart @@ -38,7 +38,7 @@ enum PlatformMapType { } enum MarkerCollisionBehavior { - required, + requiredDisplay, optionalAndHidesLowerPriority, requiredAndHidesOptional, } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index 9ef3508719b..74256329826 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -210,7 +210,7 @@ class PlatformMarker { } enum MarkerCollisionBehavior { - required, + requiredDisplay, optionalAndHidesLowerPriority, requiredAndHidesOptional, } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart index c0a6ac050c5..cd70d720d35 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart @@ -34,7 +34,7 @@ class AdvancedMarker extends Marker { super.onDrag, super.onDragStart, super.onDragEnd, - this.collisionBehavior = MarkerCollisionBehavior.required, + this.collisionBehavior = MarkerCollisionBehavior.requiredDisplay, }); /// Indicates how the marker behaves when it collides with other markers. @@ -151,7 +151,7 @@ class AdvancedMarker extends Marker { /// Indicates how the marker behaves when it collides with other markers. enum MarkerCollisionBehavior { /// (default) Always display the marker regardless of collision. - required, + requiredDisplay, /// Display the marker only if it does not overlap with other markers. /// If two markers of this type would overlap, the one with the higher zIndex From 1da95fec558a58a775df1cb6745717501e376a0d Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 14 Apr 2025 09:44:11 +0300 Subject: [PATCH 112/130] Add completer to the test --- .../example/ios14/integration_test/google_maps_test.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart index 41e69ce479a..dd1efe2af6b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart @@ -1882,7 +1882,7 @@ void main() { // Hanging in CI, https://github.com/flutter/flutter/issues/166139 skip: true, ); - + testWidgets('markerWithPinConfig', (WidgetTester tester) async { final Set markers = { AdvancedMarker( @@ -1895,6 +1895,9 @@ void main() { ), }; + final Completer controllerCompleter = + Completer(); + await tester.pumpWidget( Directionality( textDirection: ui.TextDirection.ltr, @@ -1904,10 +1907,13 @@ void main() { ), markers: markers, markerType: MarkerType.advancedMarker, + onMapCreated: (ExampleGoogleMapController controller) => + controllerCompleter.complete(controller), ), ), ); await tester.pumpAndSettle(); + await controllerCompleter.future; }); } From 74272fbbce75b492ff4e73a369816d25bd02a75d Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 14 Apr 2025 14:29:09 +0300 Subject: [PATCH 113/130] Add collision behavior example page --- .../example/lib/collision_behavior.dart | 155 ++++++++++++++++++ .../google_maps_flutter/example/lib/main.dart | 2 + .../example/lib/collision_behavior.dart | 155 ++++++++++++++++++ .../example/lib/main.dart | 2 + .../example/ios14/lib/main.dart | 2 + .../example/ios15/lib/main.dart | 2 + .../lib/collision_behavior.dart | 155 ++++++++++++++++++ .../test/types/advanced_marker_test.dart | 2 +- .../lib/src/convert.dart | 2 +- 9 files changed, 475 insertions(+), 2 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter/example/lib/collision_behavior.dart create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/example/lib/collision_behavior.dart create mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/collision_behavior.dart diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/collision_behavior.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/collision_behavior.dart new file mode 100644 index 00000000000..20ae8b43049 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/collision_behavior.dart @@ -0,0 +1,155 @@ +import 'dart:math'; + +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +import 'page.dart'; +import 'place_advanced_marker.dart'; + +/// Page demonstrating how to use AdvancedMarker's collision behavior. +class AdvancedMarkerCollisionBehaviorPage extends GoogleMapExampleAppPage { + /// Default constructor. + const AdvancedMarkerCollisionBehaviorPage({ + Key? key, + required this.mapId, + }) : super(const Icon(Icons.not_listed_location), + 'Advanced marker collision behavior', + key: key); + + /// Map ID to use for the GoogleMap. + final String? mapId; + + @override + Widget build(BuildContext context) { + return _CollisionBehaviorPageBody(mapId: mapId); + } +} + +class _CollisionBehaviorPageBody extends StatefulWidget { + const _CollisionBehaviorPageBody({required this.mapId}); + + final String? mapId; + + @override + State<_CollisionBehaviorPageBody> createState() => + _CollisionBehaviorPageBodyState(); +} + +class _CollisionBehaviorPageBodyState + extends State<_CollisionBehaviorPageBody> { + static const LatLng center = LatLng(-33.86711, 151.1947171); + static const double zoomOutLevel = 9; + static const double zoomInLevel = 12; + + MarkerCollisionBehavior markerCollisionBehavior = + MarkerCollisionBehavior.optionalAndHidesLowerPriority; + + GoogleMapController? controller; + final List markers = []; + + void _addMarkers() { + final List newMarkers = [ + for (int i = 0; i < 12; i++) + AdvancedMarker( + markerId: MarkerId('marker_${i}_$markerCollisionBehavior'), + position: LatLng( + center.latitude + sin(i * pi / 6.0) / 20.0, + center.longitude + cos(i * pi / 6.0) / 20.0, + ), + icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueRed), + collisionBehavior: markerCollisionBehavior, + ), + ]; + + markers.clear(); + markers.addAll(newMarkers); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + AdvancedMarkersCapabilityStatus(controller: controller), + Expanded( + child: GoogleMap( + mapId: widget.mapId, + markerType: GoogleMapMarkerType.advancedMarker, + initialCameraPosition: const CameraPosition( + target: center, + zoom: zoomInLevel, + ), + markers: Set.of(markers), + tiltGesturesEnabled: false, + zoomGesturesEnabled: false, + rotateGesturesEnabled: false, + scrollGesturesEnabled: false, + onMapCreated: (GoogleMapController controller) { + setState(() { + this.controller = controller; + }); + }, + ), + ), + const SizedBox(height: 12), + Text( + 'Current collision behavior: ${markerCollisionBehavior.name}', + style: Theme.of(context).textTheme.labelLarge, + textAlign: TextAlign.center, + ), + const SizedBox(height: 8), + Wrap( + alignment: WrapAlignment.spaceEvenly, + children: [ + TextButton( + onPressed: () { + setState(() { + _addMarkers(); + }); + }, + child: const Text('Add markers'), + ), + TextButton( + onPressed: () { + controller?.animateCamera( + CameraUpdate.newCameraPosition( + const CameraPosition( + target: center, + zoom: zoomOutLevel, + ), + ), + ); + }, + child: const Text('Zoom out'), + ), + TextButton( + onPressed: () { + controller?.animateCamera( + CameraUpdate.newCameraPosition( + const CameraPosition( + target: center, + zoom: zoomInLevel, + ), + ), + ); + }, + child: const Text('Zoom in'), + ), + TextButton( + onPressed: () { + setState(() { + markerCollisionBehavior = markerCollisionBehavior == + MarkerCollisionBehavior.optionalAndHidesLowerPriority + ? MarkerCollisionBehavior.requiredDisplay + : MarkerCollisionBehavior.optionalAndHidesLowerPriority; + _addMarkers(); + }); + }, + child: const Text('Toggle collision behavior'), + ), + ], + ), + ], + ); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart index e48461f4579..c142953a8e1 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart @@ -12,6 +12,7 @@ import 'advanced_marker_icons.dart'; import 'advanced_markers_clustering.dart'; import 'animate_camera.dart'; import 'clustering.dart'; +import 'collision_behavior.dart'; import 'ground_overlay.dart'; import 'heatmap.dart'; import 'lite_mode.dart'; @@ -59,6 +60,7 @@ final List _allPages = [ const AdvancedMarkersClustering(mapId: _mapId), const MapIdPage(), const HeatmapPage(), + const AdvancedMarkerCollisionBehaviorPage(mapId: _mapId), ]; /// MapsDemo is the Main Application. diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/collision_behavior.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/collision_behavior.dart new file mode 100644 index 00000000000..6001e1ab67d --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/collision_behavior.dart @@ -0,0 +1,155 @@ +import 'dart:math'; + +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +import 'example_google_map.dart'; +import 'page.dart'; +import 'place_advanced_marker.dart'; + +/// Page demonstrating how to use AdvancedMarker's collision behavior. +class AdvancedMarkerCollisionBehaviorPage extends GoogleMapExampleAppPage { + /// Default constructor. + const AdvancedMarkerCollisionBehaviorPage({ + Key? key, + required this.mapId, + }) : super(const Icon(Icons.not_listed_location), + 'Advanced marker collision behavior', + key: key); + + /// Map ID to use for the GoogleMap. + final String? mapId; + + @override + Widget build(BuildContext context) { + return _CollisionBehaviorPageBody(mapId: mapId); + } +} + +class _CollisionBehaviorPageBody extends StatefulWidget { + const _CollisionBehaviorPageBody({required this.mapId}); + + final String? mapId; + + @override + State<_CollisionBehaviorPageBody> createState() => + _CollisionBehaviorPageBodyState(); +} + +class _CollisionBehaviorPageBodyState + extends State<_CollisionBehaviorPageBody> { + static const LatLng center = LatLng(-33.86711, 151.1947171); + static const double zoomOutLevel = 9; + static const double zoomInLevel = 12; + + MarkerCollisionBehavior markerCollisionBehavior = + MarkerCollisionBehavior.optionalAndHidesLowerPriority; + + ExampleGoogleMapController? controller; + final List markers = []; + + void _addMarkers() { + final List newMarkers = [ + for (int i = 0; i < 12; i++) + AdvancedMarker( + markerId: MarkerId('marker_${i}_$markerCollisionBehavior'), + position: LatLng( + center.latitude + sin(i * pi / 6.0) / 20.0, + center.longitude + cos(i * pi / 6.0) / 20.0, + ), + icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueRed), + collisionBehavior: markerCollisionBehavior, + ), + ]; + + markers.clear(); + markers.addAll(newMarkers); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + AdvancedMarkersCapabilityStatus(controller: controller), + Expanded( + child: ExampleGoogleMap( + mapId: widget.mapId, + markerType: MarkerType.advancedMarker, + initialCameraPosition: const CameraPosition( + target: center, + zoom: zoomInLevel, + ), + markers: Set.of(markers), + tiltGesturesEnabled: false, + zoomGesturesEnabled: false, + rotateGesturesEnabled: false, + scrollGesturesEnabled: false, + onMapCreated: (ExampleGoogleMapController controller) { + setState(() { + this.controller = controller; + }); + }, + ), + ), + const SizedBox(height: 12), + Text( + 'Current collision behavior: ${markerCollisionBehavior.name}', + style: Theme.of(context).textTheme.labelLarge, + textAlign: TextAlign.center, + ), + const SizedBox(height: 8), + Wrap( + alignment: WrapAlignment.spaceEvenly, + children: [ + TextButton( + onPressed: () { + setState(() { + _addMarkers(); + }); + }, + child: const Text('Add markers'), + ), + TextButton( + onPressed: () { + controller?.animateCamera( + CameraUpdate.newCameraPosition( + const CameraPosition( + target: center, + zoom: zoomOutLevel, + ), + ), + ); + }, + child: const Text('Zoom out'), + ), + TextButton( + onPressed: () { + controller?.animateCamera( + CameraUpdate.newCameraPosition( + const CameraPosition( + target: center, + zoom: zoomInLevel, + ), + ), + ); + }, + child: const Text('Zoom in'), + ), + TextButton( + onPressed: () { + setState(() { + markerCollisionBehavior = markerCollisionBehavior == + MarkerCollisionBehavior.optionalAndHidesLowerPriority + ? MarkerCollisionBehavior.requiredDisplay + : MarkerCollisionBehavior.optionalAndHidesLowerPriority; + _addMarkers(); + }); + }, + child: const Text('Toggle collision behavior'), + ), + ], + ), + ], + ); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart index 389db435587..e7f6fa65cbf 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart @@ -12,6 +12,7 @@ import 'advanced_marker_icons.dart'; import 'advanced_markers_clustering.dart'; import 'animate_camera.dart'; import 'clustering.dart'; +import 'collision_behavior.dart'; import 'ground_overlay.dart'; import 'lite_mode.dart'; import 'map_click.dart'; @@ -57,6 +58,7 @@ final List _allPages = [ const ClusteringPage(), const AdvancedMarkersClusteringPage(mapId: _mapId), const MapIdPage(), + const AdvancedMarkerCollisionBehaviorPage(mapId: _mapId), ]; /// MapsDemo is the Main Application. diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart index dc0c7dc740c..bfde579e695 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/lib/main.dart @@ -7,6 +7,7 @@ import 'package:maps_example_dart/advanced_marker_icons.dart'; import 'package:maps_example_dart/advanced_markers_clustering.dart'; import 'package:maps_example_dart/animate_camera.dart'; import 'package:maps_example_dart/clustering.dart'; +import 'package:maps_example_dart/collision_behavior.dart'; import 'package:maps_example_dart/ground_overlay.dart'; import 'package:maps_example_dart/lite_mode.dart'; import 'package:maps_example_dart/map_click.dart'; @@ -55,5 +56,6 @@ void main() { ClusteringPage(), AdvancedMarkersClusteringPage(mapId: _mapId), MapIdPage(), + AdvancedMarkerCollisionBehaviorPage(mapId: _mapId), ]))); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart index dc0c7dc740c..bfde579e695 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios15/lib/main.dart @@ -7,6 +7,7 @@ import 'package:maps_example_dart/advanced_marker_icons.dart'; import 'package:maps_example_dart/advanced_markers_clustering.dart'; import 'package:maps_example_dart/animate_camera.dart'; import 'package:maps_example_dart/clustering.dart'; +import 'package:maps_example_dart/collision_behavior.dart'; import 'package:maps_example_dart/ground_overlay.dart'; import 'package:maps_example_dart/lite_mode.dart'; import 'package:maps_example_dart/map_click.dart'; @@ -55,5 +56,6 @@ void main() { ClusteringPage(), AdvancedMarkersClusteringPage(mapId: _mapId), MapIdPage(), + AdvancedMarkerCollisionBehaviorPage(mapId: _mapId), ]))); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/collision_behavior.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/collision_behavior.dart new file mode 100644 index 00000000000..850e68bf7ff --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/collision_behavior.dart @@ -0,0 +1,155 @@ +import 'dart:math'; + +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +import 'example_google_map.dart'; +import 'page.dart'; +import 'place_marker.dart'; + +/// Page demonstrating how to use AdvancedMarker's collision behavior. +class AdvancedMarkerCollisionBehaviorPage extends GoogleMapExampleAppPage { + /// Default constructor. + const AdvancedMarkerCollisionBehaviorPage({ + Key? key, + required this.mapId, + }) : super(const Icon(Icons.not_listed_location), + 'Advanced marker collision behavior', + key: key); + + /// Map ID to use for the GoogleMap. + final String? mapId; + + @override + Widget build(BuildContext context) { + return _CollisionBehaviorPageBody(mapId: mapId); + } +} + +class _CollisionBehaviorPageBody extends StatefulWidget { + const _CollisionBehaviorPageBody({required this.mapId}); + + final String? mapId; + + @override + State<_CollisionBehaviorPageBody> createState() => + _CollisionBehaviorPageBodyState(); +} + +class _CollisionBehaviorPageBodyState + extends State<_CollisionBehaviorPageBody> { + static const LatLng center = LatLng(-33.86711, 151.1947171); + static const double zoomOutLevel = 9; + static const double zoomInLevel = 12; + + MarkerCollisionBehavior markerCollisionBehavior = + MarkerCollisionBehavior.optionalAndHidesLowerPriority; + + ExampleGoogleMapController? controller; + final List markers = []; + + void _addMarkers() { + final List newMarkers = [ + for (int i = 0; i < 12; i++) + AdvancedMarker( + markerId: MarkerId('marker_${i}_$markerCollisionBehavior'), + position: LatLng( + center.latitude + sin(i * pi / 6.0) / 20.0, + center.longitude + cos(i * pi / 6.0) / 20.0, + ), + icon: BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueRed), + collisionBehavior: markerCollisionBehavior, + ), + ]; + + markers.clear(); + markers.addAll(newMarkers); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + AdvancedMarkersCapabilityStatus(controller: controller), + Expanded( + child: ExampleGoogleMap( + mapId: widget.mapId, + markerType: MarkerType.advancedMarker, + initialCameraPosition: const CameraPosition( + target: center, + zoom: zoomInLevel, + ), + markers: Set.of(markers), + tiltGesturesEnabled: false, + zoomGesturesEnabled: false, + rotateGesturesEnabled: false, + scrollGesturesEnabled: false, + onMapCreated: (ExampleGoogleMapController controller) { + setState(() { + this.controller = controller; + }); + }, + ), + ), + const SizedBox(height: 12), + Text( + 'Current collision behavior: ${markerCollisionBehavior.name}', + style: Theme.of(context).textTheme.labelLarge, + textAlign: TextAlign.center, + ), + const SizedBox(height: 8), + Wrap( + alignment: WrapAlignment.spaceEvenly, + children: [ + TextButton( + onPressed: () { + setState(() { + _addMarkers(); + }); + }, + child: const Text('Add markers'), + ), + TextButton( + onPressed: () { + controller?.animateCamera( + CameraUpdate.newCameraPosition( + const CameraPosition( + target: center, + zoom: zoomOutLevel, + ), + ), + ); + }, + child: const Text('Zoom out'), + ), + TextButton( + onPressed: () { + controller?.animateCamera( + CameraUpdate.newCameraPosition( + const CameraPosition( + target: center, + zoom: zoomInLevel, + ), + ), + ); + }, + child: const Text('Zoom in'), + ), + TextButton( + onPressed: () { + setState(() { + markerCollisionBehavior = markerCollisionBehavior == + MarkerCollisionBehavior.optionalAndHidesLowerPriority + ? MarkerCollisionBehavior.requiredDisplay + : MarkerCollisionBehavior.optionalAndHidesLowerPriority; + _addMarkers(); + }); + }, + child: const Text('Toggle collision behavior'), + ), + ], + ), + ], + ); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/advanced_marker_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/advanced_marker_test.dart index d984427175a..e0143bdb908 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/advanced_marker_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/advanced_marker_test.dart @@ -27,7 +27,7 @@ void main() { expect(marker.onDrag, equals(null)); expect(marker.onDragStart, equals(null)); expect(marker.onDragEnd, equals(null)); - expect(marker.collisionBehavior, MarkerCollisionBehavior.required); + expect(marker.collisionBehavior, MarkerCollisionBehavior.requiredDisplay); }); test('constructor alpha is >= 0.0 and <= 1.0', () { diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index 2e1ca301cdd..ae390e8cc69 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -920,7 +920,7 @@ gmaps.CollisionBehavior _markerCollisionBehaviorToGmCollisionBehavior( MarkerCollisionBehavior markerCollisionBehavior, ) { return switch (markerCollisionBehavior) { - MarkerCollisionBehavior.required => gmaps.CollisionBehavior.REQUIRED, + MarkerCollisionBehavior.requiredDisplay => gmaps.CollisionBehavior.REQUIRED, MarkerCollisionBehavior.optionalAndHidesLowerPriority => gmaps.CollisionBehavior.OPTIONAL_AND_HIDES_LOWER_PRIORITY, MarkerCollisionBehavior.requiredAndHidesOptional => From 5ae4278425d184f07cc99ad674fdd032ab31b372 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 14 Apr 2025 14:41:25 +0300 Subject: [PATCH 114/130] Restore pin config if-branch in FGMIconFromBitmap --- .../ios/Classes/FGMImageUtils.h | 1 + .../ios/Classes/FGMImageUtils.m | 40 ++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/FGMImageUtils.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/FGMImageUtils.h index 8aa1bcb6793..521df1aa25c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/FGMImageUtils.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/FGMImageUtils.h @@ -5,6 +5,7 @@ #import #import #import "messages.g.h" +#import "FLTGoogleMapJSONConversions.h" NS_ASSUME_NONNULL_BEGIN diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/FGMImageUtils.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/FGMImageUtils.m index 3830ea28f60..85f0ecabfc7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/FGMImageUtils.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/FGMImageUtils.m @@ -125,7 +125,45 @@ reason:@"Unable to interpret bytes as a valid image." userInfo:nil]; } - } + } else if ([bitmap isKindOfClass:[FGMPlatformBitmapPinConfig class]]) { + FGMPlatformBitmapPinConfig *pinConfig = bitmap; + + GMSPinImageOptions *options = [[GMSPinImageOptions alloc] init]; + NSNumber *backgroundColor = pinConfig.backgroundColor; + if (backgroundColor) { + options.backgroundColor = FGMGetColorForRGBA([backgroundColor integerValue]); + } + + NSNumber *borderColor = pinConfig.borderColor; + if (borderColor) { + options.borderColor = FGMGetColorForRGBA([borderColor integerValue]); + } + + GMSPinImageGlyph *glyph; + NSString *glyphText = pinConfig.glyphText; + NSNumber *glyphColor = pinConfig.glyphColor; + FGMPlatformBitmap *glyphBitmap = pinConfig.glyphBitmap; + if (glyphText) { + NSNumber *glyphTextColorInt = pinConfig.glyphTextColor; + UIColor *glyphTextColor = glyphTextColorInt + ? FGMGetColorForRGBA([glyphTextColorInt integerValue]) + : [UIColor blackColor]; + glyph = [[GMSPinImageGlyph alloc] initWithText:glyphText textColor:glyphTextColor]; + } else if (glyphColor) { + UIColor *color = FGMGetColorForRGBA([glyphColor integerValue]); + glyph = [[GMSPinImageGlyph alloc] initWithGlyphColor:color]; + } else if (glyphBitmap) { + UIImage *glyphImage = FGMIconFromBitmap(glyphBitmap,registrar,screenScale); + glyph = [[GMSPinImageGlyph alloc] initWithImage:glyphImage]; + } + + + if (glyph) { + options.glyph = glyph; + } + + image = [GMSPinImage pinImageWithOptions:options]; + } return image; } From 4e603eae5ee468841665d2b72eccf9ba7f416c2f Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 14 Apr 2025 15:00:48 +0300 Subject: [PATCH 115/130] Reformat code --- .../flutter/plugins/googlemaps/Messages.java | 1642 ++++++++++----- .../plugins/googlemaps/ConvertTest.java | 3 - .../integration_test/google_maps_tests.dart | 2 +- .../lib/src/messages.g.dart | 825 +++++--- .../lib/example_google_map.dart | 39 +- .../ios/Classes/FGMImageUtils.h | 2 +- .../ios/Classes/FGMImageUtils.m | 65 +- .../ios/Classes/messages.g.h | 760 +++---- .../ios/Classes/messages.g.m | 1844 ++++++++++------- .../lib/src/messages.g.dart | 782 ++++--- .../google_maps_flutter_platform_test.dart | 2 +- 11 files changed, 3646 insertions(+), 2320 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java index fb83a57ded0..697e367d7c7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java @@ -23,7 +23,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; @@ -41,8 +40,7 @@ public static class FlutterError extends RuntimeException { /** The error details. Must be a datatype supported by the api codec. */ public final Object details; - public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) - { + public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) { super(message); this.code = code; this.details = details; @@ -61,14 +59,15 @@ protected static ArrayList wrapError(@NonNull Throwable exception) { errorList.add(exception.toString()); errorList.add(exception.getClass().getSimpleName()); errorList.add( - "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); + "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); } return errorList; } @NonNull protected static FlutterError createConnectionError(@NonNull String channelName) { - return new FlutterError("channel-error", "Unable to establish connection on channel: " + channelName + ".", ""); + return new FlutterError( + "channel-error", "Unable to establish connection on channel: " + channelName + ".", ""); } @Target(METHOD) @@ -127,9 +126,9 @@ public enum PlatformJointType { } /** - * Enumeration of possible types of PlatformCap, corresponding to the - * subclasses of Cap in the Google Maps Android SDK. - * See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. + * Enumeration of possible types of PlatformCap, corresponding to the subclasses of Cap in the + * Google Maps Android SDK. See + * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. */ public enum PlatformCapType { BUTT_CAP(0), @@ -183,7 +182,7 @@ public enum PlatformMapBitmapScaling { /** * Pigeon representatation of a CameraPosition. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraPosition { private @NonNull Double bearing; @@ -243,10 +242,17 @@ public void setZoom(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformCameraPosition that = (PlatformCameraPosition) o; - return bearing.equals(that.bearing) && target.equals(that.target) && tilt.equals(that.tilt) && zoom.equals(that.zoom); + return bearing.equals(that.bearing) + && target.equals(that.target) + && tilt.equals(that.tilt) + && zoom.equals(that.zoom); } @Override @@ -325,16 +331,14 @@ ArrayList toList() { /** * Pigeon representation of a CameraUpdate. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdate { /** - * This Object shall be any of the below classes prefixed with - * PlatformCameraUpdate. Each such class represents a different type of - * camera update, and each holds a different set of data, preventing the - * use of a single unified class. Pigeon does not support inheritance, which - * prevents a more strict type bound. - * See https://github.com/flutter/flutter/issues/117819. + * This Object shall be any of the below classes prefixed with PlatformCameraUpdate. Each such + * class represents a different type of camera update, and each holds a different set of data, + * preventing the use of a single unified class. Pigeon does not support inheritance, which + * prevents a more strict type bound. See https://github.com/flutter/flutter/issues/117819. */ private @NonNull Object cameraUpdate; @@ -354,8 +358,12 @@ public void setCameraUpdate(@NonNull Object setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformCameraUpdate that = (PlatformCameraUpdate) o; return cameraUpdate.equals(that.cameraUpdate); } @@ -400,7 +408,7 @@ ArrayList toList() { /** * Pigeon equivalent of NewCameraPosition * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateNewCameraPosition { private @NonNull PlatformCameraPosition cameraPosition; @@ -421,8 +429,12 @@ public void setCameraPosition(@NonNull PlatformCameraPosition setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformCameraUpdateNewCameraPosition that = (PlatformCameraUpdateNewCameraPosition) o; return cameraPosition.equals(that.cameraPosition); } @@ -443,7 +455,8 @@ public static final class Builder { } public @NonNull PlatformCameraUpdateNewCameraPosition build() { - PlatformCameraUpdateNewCameraPosition pigeonReturn = new PlatformCameraUpdateNewCameraPosition(); + PlatformCameraUpdateNewCameraPosition pigeonReturn = + new PlatformCameraUpdateNewCameraPosition(); pigeonReturn.setCameraPosition(cameraPosition); return pigeonReturn; } @@ -456,8 +469,10 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformCameraUpdateNewCameraPosition fromList(@NonNull ArrayList pigeonVar_list) { - PlatformCameraUpdateNewCameraPosition pigeonResult = new PlatformCameraUpdateNewCameraPosition(); + static @NonNull PlatformCameraUpdateNewCameraPosition fromList( + @NonNull ArrayList pigeonVar_list) { + PlatformCameraUpdateNewCameraPosition pigeonResult = + new PlatformCameraUpdateNewCameraPosition(); Object cameraPosition = pigeonVar_list.get(0); pigeonResult.setCameraPosition((PlatformCameraPosition) cameraPosition); return pigeonResult; @@ -467,7 +482,7 @@ ArrayList toList() { /** * Pigeon equivalent of NewLatLng * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateNewLatLng { private @NonNull PlatformLatLng latLng; @@ -488,8 +503,12 @@ public void setLatLng(@NonNull PlatformLatLng setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformCameraUpdateNewLatLng that = (PlatformCameraUpdateNewLatLng) o; return latLng.equals(that.latLng); } @@ -523,7 +542,8 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformCameraUpdateNewLatLng fromList(@NonNull ArrayList pigeonVar_list) { + static @NonNull PlatformCameraUpdateNewLatLng fromList( + @NonNull ArrayList pigeonVar_list) { PlatformCameraUpdateNewLatLng pigeonResult = new PlatformCameraUpdateNewLatLng(); Object latLng = pigeonVar_list.get(0); pigeonResult.setLatLng((PlatformLatLng) latLng); @@ -534,7 +554,7 @@ ArrayList toList() { /** * Pigeon equivalent of NewLatLngBounds * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateNewLatLngBounds { private @NonNull PlatformLatLngBounds bounds; @@ -568,8 +588,12 @@ public void setPadding(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformCameraUpdateNewLatLngBounds that = (PlatformCameraUpdateNewLatLngBounds) o; return bounds.equals(that.bounds) && padding.equals(that.padding); } @@ -598,7 +622,8 @@ public static final class Builder { } public @NonNull PlatformCameraUpdateNewLatLngBounds build() { - PlatformCameraUpdateNewLatLngBounds pigeonReturn = new PlatformCameraUpdateNewLatLngBounds(); + PlatformCameraUpdateNewLatLngBounds pigeonReturn = + new PlatformCameraUpdateNewLatLngBounds(); pigeonReturn.setBounds(bounds); pigeonReturn.setPadding(padding); return pigeonReturn; @@ -613,7 +638,8 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformCameraUpdateNewLatLngBounds fromList(@NonNull ArrayList pigeonVar_list) { + static @NonNull PlatformCameraUpdateNewLatLngBounds fromList( + @NonNull ArrayList pigeonVar_list) { PlatformCameraUpdateNewLatLngBounds pigeonResult = new PlatformCameraUpdateNewLatLngBounds(); Object bounds = pigeonVar_list.get(0); pigeonResult.setBounds((PlatformLatLngBounds) bounds); @@ -626,7 +652,7 @@ ArrayList toList() { /** * Pigeon equivalent of NewLatLngZoom * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateNewLatLngZoom { private @NonNull PlatformLatLng latLng; @@ -660,8 +686,12 @@ public void setZoom(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformCameraUpdateNewLatLngZoom that = (PlatformCameraUpdateNewLatLngZoom) o; return latLng.equals(that.latLng) && zoom.equals(that.zoom); } @@ -705,7 +735,8 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformCameraUpdateNewLatLngZoom fromList(@NonNull ArrayList pigeonVar_list) { + static @NonNull PlatformCameraUpdateNewLatLngZoom fromList( + @NonNull ArrayList pigeonVar_list) { PlatformCameraUpdateNewLatLngZoom pigeonResult = new PlatformCameraUpdateNewLatLngZoom(); Object latLng = pigeonVar_list.get(0); pigeonResult.setLatLng((PlatformLatLng) latLng); @@ -718,7 +749,7 @@ ArrayList toList() { /** * Pigeon equivalent of ScrollBy * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateScrollBy { private @NonNull Double dx; @@ -752,8 +783,12 @@ public void setDy(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformCameraUpdateScrollBy that = (PlatformCameraUpdateScrollBy) o; return dx.equals(that.dx) && dy.equals(that.dy); } @@ -797,7 +832,8 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformCameraUpdateScrollBy fromList(@NonNull ArrayList pigeonVar_list) { + static @NonNull PlatformCameraUpdateScrollBy fromList( + @NonNull ArrayList pigeonVar_list) { PlatformCameraUpdateScrollBy pigeonResult = new PlatformCameraUpdateScrollBy(); Object dx = pigeonVar_list.get(0); pigeonResult.setDx((Double) dx); @@ -810,7 +846,7 @@ ArrayList toList() { /** * Pigeon equivalent of ZoomBy * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateZoomBy { private @NonNull Double amount; @@ -841,8 +877,12 @@ public void setFocus(@Nullable PlatformDoublePair setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformCameraUpdateZoomBy that = (PlatformCameraUpdateZoomBy) o; return amount.equals(that.amount) && Objects.equals(focus, that.focus); } @@ -899,7 +939,7 @@ ArrayList toList() { /** * Pigeon equivalent of ZoomIn/ZoomOut * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateZoom { private @NonNull Boolean out; @@ -920,8 +960,12 @@ public void setOut(@NonNull Boolean setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformCameraUpdateZoom that = (PlatformCameraUpdateZoom) o; return out.equals(that.out); } @@ -966,7 +1010,7 @@ ArrayList toList() { /** * Pigeon equivalent of ZoomTo * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateZoomTo { private @NonNull Double zoom; @@ -987,8 +1031,12 @@ public void setZoom(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformCameraUpdateZoomTo that = (PlatformCameraUpdateZoomTo) o; return zoom.equals(that.zoom); } @@ -1033,7 +1081,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Circle class. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCircle { private @NonNull Boolean consumeTapEvents; @@ -1158,15 +1206,36 @@ public void setCircleId(@NonNull String setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformCircle that = (PlatformCircle) o; - return consumeTapEvents.equals(that.consumeTapEvents) && fillColor.equals(that.fillColor) && strokeColor.equals(that.strokeColor) && visible.equals(that.visible) && strokeWidth.equals(that.strokeWidth) && zIndex.equals(that.zIndex) && center.equals(that.center) && radius.equals(that.radius) && circleId.equals(that.circleId); + return consumeTapEvents.equals(that.consumeTapEvents) + && fillColor.equals(that.fillColor) + && strokeColor.equals(that.strokeColor) + && visible.equals(that.visible) + && strokeWidth.equals(that.strokeWidth) + && zIndex.equals(that.zIndex) + && center.equals(that.center) + && radius.equals(that.radius) + && circleId.equals(that.circleId); } @Override public int hashCode() { - return Objects.hash(consumeTapEvents, fillColor, strokeColor, visible, strokeWidth, zIndex, center, radius, circleId); + return Objects.hash( + consumeTapEvents, + fillColor, + strokeColor, + visible, + strokeWidth, + zIndex, + center, + radius, + circleId); } public static final class Builder { @@ -1300,13 +1369,12 @@ ArrayList toList() { /** * Pigeon equivalent of the Heatmap class. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformHeatmap { /** - * The heatmap data, as JSON. This should only be set from - * Heatmap.toJson, and the native code must interpret it according to the - * internal implementation details of that method. + * The heatmap data, as JSON. This should only be set from Heatmap.toJson, and the native code + * must interpret it according to the internal implementation details of that method. */ private @NonNull Map json; @@ -1326,8 +1394,12 @@ public void setJson(@NonNull Map setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformHeatmap that = (PlatformHeatmap) o; return json.equals(that.json); } @@ -1372,7 +1444,7 @@ ArrayList toList() { /** * Pigeon equivalent of the ClusterManager class. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformClusterManager { private @NonNull String identifier; @@ -1393,8 +1465,12 @@ public void setIdentifier(@NonNull String setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformClusterManager that = (PlatformClusterManager) o; return identifier.equals(that.identifier); } @@ -1439,7 +1515,7 @@ ArrayList toList() { /** * Pair of double values, such as for an offset or size. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformDoublePair { private @NonNull Double x; @@ -1473,8 +1549,12 @@ public void setY(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformDoublePair that = (PlatformDoublePair) o; return x.equals(that.x) && y.equals(that.y); } @@ -1531,7 +1611,7 @@ ArrayList toList() { /** * Pigeon equivalent of the InfoWindow class. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformInfoWindow { private @Nullable String title; @@ -1572,10 +1652,16 @@ public void setAnchor(@NonNull PlatformDoublePair setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformInfoWindow that = (PlatformInfoWindow) o; - return Objects.equals(title, that.title) && Objects.equals(snippet, that.snippet) && anchor.equals(that.anchor); + return Objects.equals(title, that.title) + && Objects.equals(snippet, that.snippet) + && anchor.equals(that.anchor); } @Override @@ -1642,7 +1728,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Marker class. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformMarker { private @NonNull Double alpha; @@ -1829,15 +1915,46 @@ public void setCollisionBehavior(@NonNull PlatformMarkerCollisionBehavior setter @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformMarker that = (PlatformMarker) o; - return alpha.equals(that.alpha) && anchor.equals(that.anchor) && consumeTapEvents.equals(that.consumeTapEvents) && draggable.equals(that.draggable) && flat.equals(that.flat) && icon.equals(that.icon) && infoWindow.equals(that.infoWindow) && position.equals(that.position) && rotation.equals(that.rotation) && visible.equals(that.visible) && zIndex.equals(that.zIndex) && markerId.equals(that.markerId) && Objects.equals(clusterManagerId, that.clusterManagerId) && collisionBehavior.equals(that.collisionBehavior); + return alpha.equals(that.alpha) + && anchor.equals(that.anchor) + && consumeTapEvents.equals(that.consumeTapEvents) + && draggable.equals(that.draggable) + && flat.equals(that.flat) + && icon.equals(that.icon) + && infoWindow.equals(that.infoWindow) + && position.equals(that.position) + && rotation.equals(that.rotation) + && visible.equals(that.visible) + && zIndex.equals(that.zIndex) + && markerId.equals(that.markerId) + && Objects.equals(clusterManagerId, that.clusterManagerId) + && collisionBehavior.equals(that.collisionBehavior); } @Override public int hashCode() { - return Objects.hash(alpha, anchor, consumeTapEvents, draggable, flat, icon, infoWindow, position, rotation, visible, zIndex, markerId, clusterManagerId, collisionBehavior); + return Objects.hash( + alpha, + anchor, + consumeTapEvents, + draggable, + flat, + icon, + infoWindow, + position, + rotation, + visible, + zIndex, + markerId, + clusterManagerId, + collisionBehavior); } public static final class Builder { @@ -1949,7 +2066,8 @@ public static final class Builder { private @Nullable PlatformMarkerCollisionBehavior collisionBehavior; @CanIgnoreReturnValue - public @NonNull Builder setCollisionBehavior(@NonNull PlatformMarkerCollisionBehavior setterArg) { + public @NonNull Builder setCollisionBehavior( + @NonNull PlatformMarkerCollisionBehavior setterArg) { this.collisionBehavior = setterArg; return this; } @@ -2031,7 +2149,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Polygon class. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformPolygon { private @NonNull String polygonId; @@ -2169,15 +2287,38 @@ public void setZIndex(@NonNull Long setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformPolygon that = (PlatformPolygon) o; - return polygonId.equals(that.polygonId) && consumesTapEvents.equals(that.consumesTapEvents) && fillColor.equals(that.fillColor) && geodesic.equals(that.geodesic) && points.equals(that.points) && holes.equals(that.holes) && visible.equals(that.visible) && strokeColor.equals(that.strokeColor) && strokeWidth.equals(that.strokeWidth) && zIndex.equals(that.zIndex); + return polygonId.equals(that.polygonId) + && consumesTapEvents.equals(that.consumesTapEvents) + && fillColor.equals(that.fillColor) + && geodesic.equals(that.geodesic) + && points.equals(that.points) + && holes.equals(that.holes) + && visible.equals(that.visible) + && strokeColor.equals(that.strokeColor) + && strokeWidth.equals(that.strokeWidth) + && zIndex.equals(that.zIndex); } @Override public int hashCode() { - return Objects.hash(polygonId, consumesTapEvents, fillColor, geodesic, points, holes, visible, strokeColor, strokeWidth, zIndex); + return Objects.hash( + polygonId, + consumesTapEvents, + fillColor, + geodesic, + points, + holes, + visible, + strokeColor, + strokeWidth, + zIndex); } public static final class Builder { @@ -2323,7 +2464,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Polyline class. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformPolyline { private @NonNull String polylineId; @@ -2420,8 +2561,8 @@ public void setPoints(@NonNull List setterArg) { } /** - * The cap at the start and end vertex of a polyline. - * See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. + * The cap at the start and end vertex of a polyline. See + * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. */ private @NonNull PlatformCap startCap; @@ -2493,15 +2634,42 @@ public void setZIndex(@NonNull Long setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformPolyline that = (PlatformPolyline) o; - return polylineId.equals(that.polylineId) && consumesTapEvents.equals(that.consumesTapEvents) && color.equals(that.color) && geodesic.equals(that.geodesic) && jointType.equals(that.jointType) && patterns.equals(that.patterns) && points.equals(that.points) && startCap.equals(that.startCap) && endCap.equals(that.endCap) && visible.equals(that.visible) && width.equals(that.width) && zIndex.equals(that.zIndex); + return polylineId.equals(that.polylineId) + && consumesTapEvents.equals(that.consumesTapEvents) + && color.equals(that.color) + && geodesic.equals(that.geodesic) + && jointType.equals(that.jointType) + && patterns.equals(that.patterns) + && points.equals(that.points) + && startCap.equals(that.startCap) + && endCap.equals(that.endCap) + && visible.equals(that.visible) + && width.equals(that.width) + && zIndex.equals(that.zIndex); } @Override public int hashCode() { - return Objects.hash(polylineId, consumesTapEvents, color, geodesic, jointType, patterns, points, startCap, endCap, visible, width, zIndex); + return Objects.hash( + polylineId, + consumesTapEvents, + color, + geodesic, + jointType, + patterns, + points, + startCap, + endCap, + visible, + width, + zIndex); } public static final class Builder { @@ -2672,7 +2840,7 @@ ArrayList toList() { * Pigeon equivalent of Cap from the platform interface. * https://github.com/flutter/packages/blob/main/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/cap.dart * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCap { private @NonNull PlatformCapType type; @@ -2713,10 +2881,16 @@ public void setRefWidth(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformCap that = (PlatformCap) o; - return type.equals(that.type) && Objects.equals(bitmapDescriptor, that.bitmapDescriptor) && Objects.equals(refWidth, that.refWidth); + return type.equals(that.type) + && Objects.equals(bitmapDescriptor, that.bitmapDescriptor) + && Objects.equals(refWidth, that.refWidth); } @Override @@ -2783,7 +2957,7 @@ ArrayList toList() { /** * Pigeon equivalent of the PatternItem class. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformPatternItem { private @NonNull PlatformPatternItemType type; @@ -2814,8 +2988,12 @@ public void setLength(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformPatternItem that = (PlatformPatternItem) o; return type.equals(that.type) && Objects.equals(length, that.length); } @@ -2872,7 +3050,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Tile class. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformTile { private @NonNull Long width; @@ -2916,10 +3094,16 @@ public void setData(@Nullable byte[] setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformTile that = (PlatformTile) o; - return width.equals(that.width) && height.equals(that.height) && Arrays.equals(data, that.data); + return width.equals(that.width) + && height.equals(that.height) + && Arrays.equals(data, that.data); } @Override @@ -2988,7 +3172,7 @@ ArrayList toList() { /** * Pigeon equivalent of the TileOverlay class. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformTileOverlay { private @NonNull String tileOverlayId; @@ -3074,10 +3258,19 @@ public void setTileSize(@NonNull Long setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformTileOverlay that = (PlatformTileOverlay) o; - return tileOverlayId.equals(that.tileOverlayId) && fadeIn.equals(that.fadeIn) && transparency.equals(that.transparency) && zIndex.equals(that.zIndex) && visible.equals(that.visible) && tileSize.equals(that.tileSize); + return tileOverlayId.equals(that.tileOverlayId) + && fadeIn.equals(that.fadeIn) + && transparency.equals(that.transparency) + && zIndex.equals(that.zIndex) + && visible.equals(that.visible) + && tileSize.equals(that.tileSize); } @Override @@ -3180,7 +3373,7 @@ ArrayList toList() { /** * Pigeon equivalent of Flutter's EdgeInsets. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformEdgeInsets { private @NonNull Double top; @@ -3240,10 +3433,17 @@ public void setRight(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformEdgeInsets that = (PlatformEdgeInsets) o; - return top.equals(that.top) && bottom.equals(that.bottom) && left.equals(that.left) && right.equals(that.right); + return top.equals(that.top) + && bottom.equals(that.bottom) + && left.equals(that.left) + && right.equals(that.right); } @Override @@ -3322,7 +3522,7 @@ ArrayList toList() { /** * Pigeon equivalent of LatLng. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformLatLng { private @NonNull Double latitude; @@ -3356,8 +3556,12 @@ public void setLongitude(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformLatLng that = (PlatformLatLng) o; return latitude.equals(that.latitude) && longitude.equals(that.longitude); } @@ -3414,7 +3618,7 @@ ArrayList toList() { /** * Pigeon equivalent of LatLngBounds. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformLatLngBounds { private @NonNull PlatformLatLng northeast; @@ -3448,8 +3652,12 @@ public void setSouthwest(@NonNull PlatformLatLng setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformLatLngBounds that = (PlatformLatLngBounds) o; return northeast.equals(that.northeast) && southwest.equals(that.southwest); } @@ -3506,7 +3714,7 @@ ArrayList toList() { /** * Pigeon equivalent of Cluster. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCluster { private @NonNull String clusterManagerId; @@ -3566,10 +3774,17 @@ public void setMarkerIds(@NonNull List setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformCluster that = (PlatformCluster) o; - return clusterManagerId.equals(that.clusterManagerId) && position.equals(that.position) && bounds.equals(that.bounds) && markerIds.equals(that.markerIds); + return clusterManagerId.equals(that.clusterManagerId) + && position.equals(that.position) + && bounds.equals(that.bounds) + && markerIds.equals(that.markerIds); } @Override @@ -3648,7 +3863,7 @@ ArrayList toList() { /** * Pigeon equivalent of the GroundOverlay class. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformGroundOverlay { private @NonNull String groundOverlayId; @@ -3797,15 +4012,42 @@ public void setClickable(@NonNull Boolean setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformGroundOverlay that = (PlatformGroundOverlay) o; - return groundOverlayId.equals(that.groundOverlayId) && image.equals(that.image) && Objects.equals(position, that.position) && Objects.equals(bounds, that.bounds) && Objects.equals(width, that.width) && Objects.equals(height, that.height) && Objects.equals(anchor, that.anchor) && transparency.equals(that.transparency) && bearing.equals(that.bearing) && zIndex.equals(that.zIndex) && visible.equals(that.visible) && clickable.equals(that.clickable); + return groundOverlayId.equals(that.groundOverlayId) + && image.equals(that.image) + && Objects.equals(position, that.position) + && Objects.equals(bounds, that.bounds) + && Objects.equals(width, that.width) + && Objects.equals(height, that.height) + && Objects.equals(anchor, that.anchor) + && transparency.equals(that.transparency) + && bearing.equals(that.bearing) + && zIndex.equals(that.zIndex) + && visible.equals(that.visible) + && clickable.equals(that.clickable); } @Override public int hashCode() { - return Objects.hash(groundOverlayId, image, position, bounds, width, height, anchor, transparency, bearing, zIndex, visible, clickable); + return Objects.hash( + groundOverlayId, + image, + position, + bounds, + width, + height, + anchor, + transparency, + bearing, + zIndex, + visible, + clickable); } public static final class Builder { @@ -3975,10 +4217,10 @@ ArrayList toList() { /** * Pigeon equivalent of CameraTargetBounds. * - * As with the Dart version, it exists to distinguish between not setting a - * a target, and having an explicitly unbounded target (null [bounds]). + *

As with the Dart version, it exists to distinguish between not setting a a target, and + * having an explicitly unbounded target (null [bounds]). * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraTargetBounds { private @Nullable PlatformLatLngBounds bounds; @@ -3993,8 +4235,12 @@ public void setBounds(@Nullable PlatformLatLngBounds setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformCameraTargetBounds that = (PlatformCameraTargetBounds) o; return Objects.equals(bounds, that.bounds); } @@ -4039,7 +4285,7 @@ ArrayList toList() { /** * Information passed to the platform view creation. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformMapViewCreationParams { private @NonNull PlatformCameraPosition initialCameraPosition; @@ -4177,15 +4423,38 @@ public void setInitialGroundOverlays(@NonNull List setter @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformMapViewCreationParams that = (PlatformMapViewCreationParams) o; - return initialCameraPosition.equals(that.initialCameraPosition) && mapConfiguration.equals(that.mapConfiguration) && initialCircles.equals(that.initialCircles) && initialMarkers.equals(that.initialMarkers) && initialPolygons.equals(that.initialPolygons) && initialPolylines.equals(that.initialPolylines) && initialHeatmaps.equals(that.initialHeatmaps) && initialTileOverlays.equals(that.initialTileOverlays) && initialClusterManagers.equals(that.initialClusterManagers) && initialGroundOverlays.equals(that.initialGroundOverlays); + return initialCameraPosition.equals(that.initialCameraPosition) + && mapConfiguration.equals(that.mapConfiguration) + && initialCircles.equals(that.initialCircles) + && initialMarkers.equals(that.initialMarkers) + && initialPolygons.equals(that.initialPolygons) + && initialPolylines.equals(that.initialPolylines) + && initialHeatmaps.equals(that.initialHeatmaps) + && initialTileOverlays.equals(that.initialTileOverlays) + && initialClusterManagers.equals(that.initialClusterManagers) + && initialGroundOverlays.equals(that.initialGroundOverlays); } @Override public int hashCode() { - return Objects.hash(initialCameraPosition, mapConfiguration, initialCircles, initialMarkers, initialPolygons, initialPolylines, initialHeatmaps, initialTileOverlays, initialClusterManagers, initialGroundOverlays); + return Objects.hash( + initialCameraPosition, + mapConfiguration, + initialCircles, + initialMarkers, + initialPolygons, + initialPolylines, + initialHeatmaps, + initialTileOverlays, + initialClusterManagers, + initialGroundOverlays); } public static final class Builder { @@ -4257,7 +4526,8 @@ public static final class Builder { private @Nullable List initialClusterManagers; @CanIgnoreReturnValue - public @NonNull Builder setInitialClusterManagers(@NonNull List setterArg) { + public @NonNull Builder setInitialClusterManagers( + @NonNull List setterArg) { this.initialClusterManagers = setterArg; return this; } @@ -4265,7 +4535,8 @@ public static final class Builder { private @Nullable List initialGroundOverlays; @CanIgnoreReturnValue - public @NonNull Builder setInitialGroundOverlays(@NonNull List setterArg) { + public @NonNull Builder setInitialGroundOverlays( + @NonNull List setterArg) { this.initialGroundOverlays = setterArg; return this; } @@ -4302,7 +4573,8 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformMapViewCreationParams fromList(@NonNull ArrayList pigeonVar_list) { + static @NonNull PlatformMapViewCreationParams fromList( + @NonNull ArrayList pigeonVar_list) { PlatformMapViewCreationParams pigeonResult = new PlatformMapViewCreationParams(); Object initialCameraPosition = pigeonVar_list.get(0); pigeonResult.setInitialCameraPosition((PlatformCameraPosition) initialCameraPosition); @@ -4331,7 +4603,7 @@ ArrayList toList() { /** * Pigeon equivalent of MapConfiguration. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformMapConfiguration { private @Nullable Boolean compassEnabled; @@ -4546,15 +4818,60 @@ public void setStyle(@Nullable String setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformMapConfiguration that = (PlatformMapConfiguration) o; - return Objects.equals(compassEnabled, that.compassEnabled) && Objects.equals(cameraTargetBounds, that.cameraTargetBounds) && Objects.equals(mapType, that.mapType) && Objects.equals(minMaxZoomPreference, that.minMaxZoomPreference) && Objects.equals(mapToolbarEnabled, that.mapToolbarEnabled) && Objects.equals(rotateGesturesEnabled, that.rotateGesturesEnabled) && Objects.equals(scrollGesturesEnabled, that.scrollGesturesEnabled) && Objects.equals(tiltGesturesEnabled, that.tiltGesturesEnabled) && Objects.equals(trackCameraPosition, that.trackCameraPosition) && Objects.equals(zoomControlsEnabled, that.zoomControlsEnabled) && Objects.equals(zoomGesturesEnabled, that.zoomGesturesEnabled) && Objects.equals(myLocationEnabled, that.myLocationEnabled) && Objects.equals(myLocationButtonEnabled, that.myLocationButtonEnabled) && Objects.equals(padding, that.padding) && Objects.equals(indoorViewEnabled, that.indoorViewEnabled) && Objects.equals(trafficEnabled, that.trafficEnabled) && Objects.equals(buildingsEnabled, that.buildingsEnabled) && Objects.equals(liteModeEnabled, that.liteModeEnabled) && Objects.equals(markerType, that.markerType) && Objects.equals(mapId, that.mapId) && Objects.equals(style, that.style); + return Objects.equals(compassEnabled, that.compassEnabled) + && Objects.equals(cameraTargetBounds, that.cameraTargetBounds) + && Objects.equals(mapType, that.mapType) + && Objects.equals(minMaxZoomPreference, that.minMaxZoomPreference) + && Objects.equals(mapToolbarEnabled, that.mapToolbarEnabled) + && Objects.equals(rotateGesturesEnabled, that.rotateGesturesEnabled) + && Objects.equals(scrollGesturesEnabled, that.scrollGesturesEnabled) + && Objects.equals(tiltGesturesEnabled, that.tiltGesturesEnabled) + && Objects.equals(trackCameraPosition, that.trackCameraPosition) + && Objects.equals(zoomControlsEnabled, that.zoomControlsEnabled) + && Objects.equals(zoomGesturesEnabled, that.zoomGesturesEnabled) + && Objects.equals(myLocationEnabled, that.myLocationEnabled) + && Objects.equals(myLocationButtonEnabled, that.myLocationButtonEnabled) + && Objects.equals(padding, that.padding) + && Objects.equals(indoorViewEnabled, that.indoorViewEnabled) + && Objects.equals(trafficEnabled, that.trafficEnabled) + && Objects.equals(buildingsEnabled, that.buildingsEnabled) + && Objects.equals(liteModeEnabled, that.liteModeEnabled) + && Objects.equals(markerType, that.markerType) + && Objects.equals(mapId, that.mapId) + && Objects.equals(style, that.style); } @Override public int hashCode() { - return Objects.hash(compassEnabled, cameraTargetBounds, mapType, minMaxZoomPreference, mapToolbarEnabled, rotateGesturesEnabled, scrollGesturesEnabled, tiltGesturesEnabled, trackCameraPosition, zoomControlsEnabled, zoomGesturesEnabled, myLocationEnabled, myLocationButtonEnabled, padding, indoorViewEnabled, trafficEnabled, buildingsEnabled, liteModeEnabled, markerType, mapId, style); + return Objects.hash( + compassEnabled, + cameraTargetBounds, + mapType, + minMaxZoomPreference, + mapToolbarEnabled, + rotateGesturesEnabled, + scrollGesturesEnabled, + tiltGesturesEnabled, + trackCameraPosition, + zoomControlsEnabled, + zoomGesturesEnabled, + myLocationEnabled, + myLocationButtonEnabled, + padding, + indoorViewEnabled, + trafficEnabled, + buildingsEnabled, + liteModeEnabled, + markerType, + mapId, + style); } public static final class Builder { @@ -4570,7 +4887,8 @@ public static final class Builder { private @Nullable PlatformCameraTargetBounds cameraTargetBounds; @CanIgnoreReturnValue - public @NonNull Builder setCameraTargetBounds(@Nullable PlatformCameraTargetBounds setterArg) { + public @NonNull Builder setCameraTargetBounds( + @Nullable PlatformCameraTargetBounds setterArg) { this.cameraTargetBounds = setterArg; return this; } @@ -4832,7 +5150,7 @@ ArrayList toList() { /** * Pigeon representation of an x,y coordinate. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformPoint { private @NonNull Long x; @@ -4866,8 +5184,12 @@ public void setY(@NonNull Long setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformPoint that = (PlatformPoint) o; return x.equals(that.x) && y.equals(that.y); } @@ -4924,7 +5246,7 @@ ArrayList toList() { /** * Pigeon equivalent of native TileOverlay properties. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformTileLayer { private @NonNull Boolean visible; @@ -4984,10 +5306,17 @@ public void setZIndex(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformTileLayer that = (PlatformTileLayer) o; - return visible.equals(that.visible) && fadeIn.equals(that.fadeIn) && transparency.equals(that.transparency) && zIndex.equals(that.zIndex); + return visible.equals(that.visible) + && fadeIn.equals(that.fadeIn) + && transparency.equals(that.transparency) + && zIndex.equals(that.zIndex); } @Override @@ -5066,7 +5395,7 @@ ArrayList toList() { /** * Possible outcomes of launching a URL. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformZoomRange { private @Nullable Double min; @@ -5091,8 +5420,12 @@ public void setMax(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformZoomRange that = (PlatformZoomRange) o; return Objects.equals(min, that.min) && Objects.equals(max, that.max); } @@ -5147,20 +5480,18 @@ ArrayList toList() { } /** - * Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint - * types of [BitmapDescriptor], [PlatformBitmap] contains a single field which - * may hold the pigeon equivalent type of any of them. + * Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint types of + * [BitmapDescriptor], [PlatformBitmap] contains a single field which may hold the pigeon + * equivalent type of any of them. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmap { /** - * One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], - * [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], - * [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. - * As Pigeon does not currently support data class inheritance, this - * approach allows for the different bitmap implementations to be valid - * argument and return types of the API methods. See + * One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], [PlatformBitmapAssetImage], + * [PlatformBitmapBytesMap], [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. As Pigeon + * does not currently support data class inheritance, this approach allows for the different + * bitmap implementations to be valid argument and return types of the API methods. See * https://github.com/flutter/flutter/issues/117819. */ private @NonNull Object bitmap; @@ -5181,8 +5512,12 @@ public void setBitmap(@NonNull Object setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformBitmap that = (PlatformBitmap) o; return bitmap.equals(that.bitmap); } @@ -5228,7 +5563,7 @@ ArrayList toList() { * Pigeon equivalent of [DefaultMarker]. See * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#defaultMarker(float) * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapDefaultMarker { private @Nullable Double hue; @@ -5243,8 +5578,12 @@ public void setHue(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformBitmapDefaultMarker that = (PlatformBitmapDefaultMarker) o; return Objects.equals(hue, that.hue); } @@ -5278,7 +5617,8 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformBitmapDefaultMarker fromList(@NonNull ArrayList pigeonVar_list) { + static @NonNull PlatformBitmapDefaultMarker fromList( + @NonNull ArrayList pigeonVar_list) { PlatformBitmapDefaultMarker pigeonResult = new PlatformBitmapDefaultMarker(); Object hue = pigeonVar_list.get(0); pigeonResult.setHue((Double) hue); @@ -5290,7 +5630,7 @@ ArrayList toList() { * Pigeon equivalent of [BytesBitmap]. See * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#fromBitmap(android.graphics.Bitmap) * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapBytes { private @NonNull byte[] byteData; @@ -5321,8 +5661,12 @@ public void setSize(@Nullable PlatformDoublePair setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformBitmapBytes that = (PlatformBitmapBytes) o; return Arrays.equals(byteData, that.byteData) && Objects.equals(size, that.size); } @@ -5382,7 +5726,7 @@ ArrayList toList() { * Pigeon equivalent of [AssetBitmap]. See * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapAsset { private @NonNull String name; @@ -5413,8 +5757,12 @@ public void setPkg(@Nullable String setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformBitmapAsset that = (PlatformBitmapAsset) o; return name.equals(that.name) && Objects.equals(pkg, that.pkg); } @@ -5472,7 +5820,7 @@ ArrayList toList() { * Pigeon equivalent of [AssetImageBitmap]. See * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapAssetImage { private @NonNull String name; @@ -5516,8 +5864,12 @@ public void setSize(@Nullable PlatformDoublePair setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformBitmapAssetImage that = (PlatformBitmapAssetImage) o; return name.equals(that.name) && scale.equals(that.scale) && Objects.equals(size, that.size); } @@ -5587,7 +5939,7 @@ ArrayList toList() { * Pigeon equivalent of [AssetMapBitmap]. See * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapAssetMap { private @NonNull String assetName; @@ -5654,10 +6006,18 @@ public void setHeight(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformBitmapAssetMap that = (PlatformBitmapAssetMap) o; - return assetName.equals(that.assetName) && bitmapScaling.equals(that.bitmapScaling) && imagePixelRatio.equals(that.imagePixelRatio) && Objects.equals(width, that.width) && Objects.equals(height, that.height); + return assetName.equals(that.assetName) + && bitmapScaling.equals(that.bitmapScaling) + && imagePixelRatio.equals(that.imagePixelRatio) + && Objects.equals(width, that.width) + && Objects.equals(height, that.height); } @Override @@ -5749,7 +6109,7 @@ ArrayList toList() { * Pigeon equivalent of [BytesMapBitmap]. See * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-frombitmap-bitmap-image * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapBytesMap { private @NonNull byte[] byteData; @@ -5816,10 +6176,18 @@ public void setHeight(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformBitmapBytesMap that = (PlatformBitmapBytesMap) o; - return Arrays.equals(byteData, that.byteData) && bitmapScaling.equals(that.bitmapScaling) && imagePixelRatio.equals(that.imagePixelRatio) && Objects.equals(width, that.width) && Objects.equals(height, that.height); + return Arrays.equals(byteData, that.byteData) + && bitmapScaling.equals(that.bitmapScaling) + && imagePixelRatio.equals(that.imagePixelRatio) + && Objects.equals(width, that.width) + && Objects.equals(height, that.height); } @Override @@ -5912,7 +6280,7 @@ ArrayList toList() { /** * Pigeon equivalent of [PinConfig]. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapPinConfig { private @Nullable Long backgroundColor; @@ -5977,15 +6345,25 @@ public void setGlyphTextColor(@Nullable Long setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformBitmapPinConfig that = (PlatformBitmapPinConfig) o; - return Objects.equals(backgroundColor, that.backgroundColor) && Objects.equals(borderColor, that.borderColor) && Objects.equals(glyphColor, that.glyphColor) && Objects.equals(glyphBitmap, that.glyphBitmap) && Objects.equals(glyphText, that.glyphText) && Objects.equals(glyphTextColor, that.glyphTextColor); + return Objects.equals(backgroundColor, that.backgroundColor) + && Objects.equals(borderColor, that.borderColor) + && Objects.equals(glyphColor, that.glyphColor) + && Objects.equals(glyphBitmap, that.glyphBitmap) + && Objects.equals(glyphText, that.glyphText) + && Objects.equals(glyphTextColor, that.glyphTextColor); } @Override public int hashCode() { - return Objects.hash(backgroundColor, borderColor, glyphColor, glyphBitmap, glyphText, glyphTextColor); + return Objects.hash( + backgroundColor, borderColor, glyphColor, glyphBitmap, glyphText, glyphTextColor); } public static final class Builder { @@ -6088,48 +6466,64 @@ private PigeonCodec() {} @Override protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { switch (type) { - case (byte) 129: { - Object value = readValue(buffer); - return value == null ? null : PlatformMapType.values()[((Long) value).intValue()]; - } - case (byte) 130: { - Object value = readValue(buffer); - return value == null ? null : PlatformRendererType.values()[((Long) value).intValue()]; - } - case (byte) 131: { - Object value = readValue(buffer); - return value == null ? null : PlatformMarkerCollisionBehavior.values()[((Long) value).intValue()]; - } - case (byte) 132: { - Object value = readValue(buffer); - return value == null ? null : PlatformJointType.values()[((Long) value).intValue()]; - } - case (byte) 133: { - Object value = readValue(buffer); - return value == null ? null : PlatformCapType.values()[((Long) value).intValue()]; - } - case (byte) 134: { - Object value = readValue(buffer); - return value == null ? null : PlatformPatternItemType.values()[((Long) value).intValue()]; - } - case (byte) 135: { - Object value = readValue(buffer); - return value == null ? null : PlatformMarkerType.values()[((Long) value).intValue()]; - } - case (byte) 136: { - Object value = readValue(buffer); - return value == null ? null : PlatformMapBitmapScaling.values()[((Long) value).intValue()]; - } + case (byte) 129: + { + Object value = readValue(buffer); + return value == null ? null : PlatformMapType.values()[((Long) value).intValue()]; + } + case (byte) 130: + { + Object value = readValue(buffer); + return value == null ? null : PlatformRendererType.values()[((Long) value).intValue()]; + } + case (byte) 131: + { + Object value = readValue(buffer); + return value == null + ? null + : PlatformMarkerCollisionBehavior.values()[((Long) value).intValue()]; + } + case (byte) 132: + { + Object value = readValue(buffer); + return value == null ? null : PlatformJointType.values()[((Long) value).intValue()]; + } + case (byte) 133: + { + Object value = readValue(buffer); + return value == null ? null : PlatformCapType.values()[((Long) value).intValue()]; + } + case (byte) 134: + { + Object value = readValue(buffer); + return value == null + ? null + : PlatformPatternItemType.values()[((Long) value).intValue()]; + } + case (byte) 135: + { + Object value = readValue(buffer); + return value == null ? null : PlatformMarkerType.values()[((Long) value).intValue()]; + } + case (byte) 136: + { + Object value = readValue(buffer); + return value == null + ? null + : PlatformMapBitmapScaling.values()[((Long) value).intValue()]; + } case (byte) 137: return PlatformCameraPosition.fromList((ArrayList) readValue(buffer)); case (byte) 138: return PlatformCameraUpdate.fromList((ArrayList) readValue(buffer)); case (byte) 139: - return PlatformCameraUpdateNewCameraPosition.fromList((ArrayList) readValue(buffer)); + return PlatformCameraUpdateNewCameraPosition.fromList( + (ArrayList) readValue(buffer)); case (byte) 140: return PlatformCameraUpdateNewLatLng.fromList((ArrayList) readValue(buffer)); case (byte) 141: - return PlatformCameraUpdateNewLatLngBounds.fromList((ArrayList) readValue(buffer)); + return PlatformCameraUpdateNewLatLngBounds.fromList( + (ArrayList) readValue(buffer)); case (byte) 142: return PlatformCameraUpdateNewLatLngZoom.fromList((ArrayList) readValue(buffer)); case (byte) 143: @@ -6362,7 +6756,6 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) { } } - /** Asynchronous error handling return type for non-nullable API method returns. */ public interface Result { /** Success case callback method for handling returns. */ @@ -6390,9 +6783,9 @@ public interface VoidResult { /** * Interface for non-test interactions with the native SDK. * - * For test-only state queries, see [MapsInspectorApi]. + *

For test-only state queries, see [MapsInspectorApi]. * - * Generated interface from Pigeon that represents a handler of messages from Flutter. + *

Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface MapsApi { /** Returns once the map instance is available. */ @@ -6400,83 +6793,98 @@ public interface MapsApi { /** * Updates the map's configuration options. * - * Only non-null configuration values will result in updates; options with - * null values will remain unchanged. + *

Only non-null configuration values will result in updates; options with null values will + * remain unchanged. */ void updateMapConfiguration(@NonNull PlatformMapConfiguration configuration); /** Updates the set of circles on the map. */ - void updateCircles(@NonNull List toAdd, @NonNull List toChange, @NonNull List idsToRemove); + void updateCircles( + @NonNull List toAdd, + @NonNull List toChange, + @NonNull List idsToRemove); /** Updates the set of heatmaps on the map. */ - void updateHeatmaps(@NonNull List toAdd, @NonNull List toChange, @NonNull List idsToRemove); + void updateHeatmaps( + @NonNull List toAdd, + @NonNull List toChange, + @NonNull List idsToRemove); /** Updates the set of custer managers for clusters on the map. */ - void updateClusterManagers(@NonNull List toAdd, @NonNull List idsToRemove); + void updateClusterManagers( + @NonNull List toAdd, @NonNull List idsToRemove); /** Updates the set of markers on the map. */ - void updateMarkers(@NonNull List toAdd, @NonNull List toChange, @NonNull List idsToRemove); + void updateMarkers( + @NonNull List toAdd, + @NonNull List toChange, + @NonNull List idsToRemove); /** Updates the set of polygonss on the map. */ - void updatePolygons(@NonNull List toAdd, @NonNull List toChange, @NonNull List idsToRemove); + void updatePolygons( + @NonNull List toAdd, + @NonNull List toChange, + @NonNull List idsToRemove); /** Updates the set of polylines on the map. */ - void updatePolylines(@NonNull List toAdd, @NonNull List toChange, @NonNull List idsToRemove); + void updatePolylines( + @NonNull List toAdd, + @NonNull List toChange, + @NonNull List idsToRemove); /** Updates the set of tile overlays on the map. */ - void updateTileOverlays(@NonNull List toAdd, @NonNull List toChange, @NonNull List idsToRemove); + void updateTileOverlays( + @NonNull List toAdd, + @NonNull List toChange, + @NonNull List idsToRemove); /** Updates the set of ground overlays on the map. */ - void updateGroundOverlays(@NonNull List toAdd, @NonNull List toChange, @NonNull List idsToRemove); + void updateGroundOverlays( + @NonNull List toAdd, + @NonNull List toChange, + @NonNull List idsToRemove); /** Gets the screen coordinate for the given map location. */ - @NonNull + @NonNull PlatformPoint getScreenCoordinate(@NonNull PlatformLatLng latLng); /** Gets the map location for the given screen coordinate. */ - @NonNull + @NonNull PlatformLatLng getLatLng(@NonNull PlatformPoint screenCoordinate); /** Gets the map region currently displayed on the map. */ - @NonNull + @NonNull PlatformLatLngBounds getVisibleRegion(); - /** - * Moves the camera according to [cameraUpdate] immediately, with no - * animation. - */ + /** Moves the camera according to [cameraUpdate] immediately, with no animation. */ void moveCamera(@NonNull PlatformCameraUpdate cameraUpdate); /** - * Moves the camera according to [cameraUpdate], animating the update using a - * duration in milliseconds if provided. + * Moves the camera according to [cameraUpdate], animating the update using a duration in + * milliseconds if provided. */ - void animateCamera(@NonNull PlatformCameraUpdate cameraUpdate, @Nullable Long durationMilliseconds); + void animateCamera( + @NonNull PlatformCameraUpdate cameraUpdate, @Nullable Long durationMilliseconds); /** Gets the current map zoom level. */ - @NonNull + @NonNull Double getZoomLevel(); /** Show the info window for the marker with the given ID. */ void showInfoWindow(@NonNull String markerId); /** Hide the info window for the marker with the given ID. */ void hideInfoWindow(@NonNull String markerId); - /** - * Returns true if the marker with the given ID is currently displaying its - * info window. - */ - @NonNull + /** Returns true if the marker with the given ID is currently displaying its info window. */ + @NonNull Boolean isInfoWindowShown(@NonNull String markerId); /** - * Sets the style to the given map style string, where an empty string - * indicates that the style should be cleared. + * Sets the style to the given map style string, where an empty string indicates that the style + * should be cleared. * - * Returns false if there was an error setting the style, such as an invalid - * style string. + *

Returns false if there was an error setting the style, such as an invalid style string. */ - @NonNull + @NonNull Boolean setStyle(@NonNull String style); /** - * Returns true if the last attempt to set a style, either via initial map - * style or setMapStyle, succeeded. + * Returns true if the last attempt to set a style, either via initial map style or setMapStyle, + * succeeded. * - * This allows checking asynchronously for initial style failures, as there - * is no way to return failures from map initialization. + *

This allows checking asynchronously for initial style failures, as there is no way to + * return failures from map initialization. */ - @NonNull + @NonNull Boolean didLastStyleSucceed(); /** * Returns true if this map supports advanced markers. * - * This allows checking if the map supports advanced markers before - * attempting to use them. + *

This allows checking if the map supports advanced markers before attempting to use them. */ - @NonNull + @NonNull Boolean isAdvancedMarkersAvailable(); /** Clears the cache of tiles previously requseted from the tile provider. */ void clearTileCache(@NonNull String tileOverlayId); @@ -6487,16 +6895,23 @@ public interface MapsApi { static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } - /**Sets up an instance of `MapsApi` to handle messages through the `binaryMessenger`. */ + /** Sets up an instance of `MapsApi` to handle messages through the `binaryMessenger`. */ static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable MapsApi api) { setUp(binaryMessenger, "", api); } - static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String messageChannelSuffix, @Nullable MapsApi api) { + + static void setUp( + @NonNull BinaryMessenger binaryMessenger, + @NonNull String messageChannelSuffix, + @Nullable MapsApi api) { messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6523,7 +6938,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6533,8 +6951,7 @@ public void error(Throwable error) { try { api.updateMapConfiguration(configurationArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6546,7 +6963,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6558,8 +6978,7 @@ public void error(Throwable error) { try { api.updateCircles(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6571,7 +6990,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6583,8 +7005,7 @@ public void error(Throwable error) { try { api.updateHeatmaps(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6596,7 +7017,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6607,8 +7031,7 @@ public void error(Throwable error) { try { api.updateClusterManagers(toAddArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6620,7 +7043,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6632,8 +7058,7 @@ public void error(Throwable error) { try { api.updateMarkers(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6645,7 +7070,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6657,8 +7085,7 @@ public void error(Throwable error) { try { api.updatePolygons(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6670,7 +7097,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6682,8 +7112,7 @@ public void error(Throwable error) { try { api.updatePolylines(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6695,7 +7124,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6707,8 +7139,7 @@ public void error(Throwable error) { try { api.updateTileOverlays(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6720,7 +7151,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6732,8 +7166,7 @@ public void error(Throwable error) { try { api.updateGroundOverlays(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6745,7 +7178,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6755,8 +7191,7 @@ public void error(Throwable error) { try { PlatformPoint output = api.getScreenCoordinate(latLngArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6768,7 +7203,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6778,8 +7216,7 @@ public void error(Throwable error) { try { PlatformLatLng output = api.getLatLng(screenCoordinateArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6791,7 +7228,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6799,8 +7239,7 @@ public void error(Throwable error) { try { PlatformLatLngBounds output = api.getVisibleRegion(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6812,7 +7251,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6822,8 +7264,7 @@ public void error(Throwable error) { try { api.moveCamera(cameraUpdateArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6835,7 +7276,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6846,8 +7290,7 @@ public void error(Throwable error) { try { api.animateCamera(cameraUpdateArg, durationMillisecondsArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6859,7 +7302,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6867,8 +7313,7 @@ public void error(Throwable error) { try { Double output = api.getZoomLevel(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6880,7 +7325,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6890,8 +7338,7 @@ public void error(Throwable error) { try { api.showInfoWindow(markerIdArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6903,7 +7350,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6913,8 +7363,7 @@ public void error(Throwable error) { try { api.hideInfoWindow(markerIdArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6926,7 +7375,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6936,8 +7388,7 @@ public void error(Throwable error) { try { Boolean output = api.isInfoWindowShown(markerIdArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6949,7 +7400,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6959,8 +7413,7 @@ public void error(Throwable error) { try { Boolean output = api.setStyle(styleArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6972,7 +7425,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6980,8 +7436,7 @@ public void error(Throwable error) { try { Boolean output = api.didLastStyleSucceed(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6993,7 +7448,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isAdvancedMarkersAvailable" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isAdvancedMarkersAvailable" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7001,8 +7459,7 @@ public void error(Throwable error) { try { Boolean output = api.isAdvancedMarkersAvailable(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7014,7 +7471,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7024,8 +7484,7 @@ public void error(Throwable error) { try { api.clearTileCache(tileOverlayIdArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7037,7 +7496,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7071,389 +7533,463 @@ public static class MapsCallbackApi { public MapsCallbackApi(@NonNull BinaryMessenger argBinaryMessenger) { this(argBinaryMessenger, ""); } - public MapsCallbackApi(@NonNull BinaryMessenger argBinaryMessenger, @NonNull String messageChannelSuffix) { + + public MapsCallbackApi( + @NonNull BinaryMessenger argBinaryMessenger, @NonNull String messageChannelSuffix) { this.binaryMessenger = argBinaryMessenger; this.messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; } - /** - * Public interface for sending reply. - * The codec used by MapsCallbackApi. - */ + /** Public interface for sending reply. The codec used by MapsCallbackApi. */ static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } /** Called when the map camera starts moving. */ public void onCameraMoveStarted(@NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( null, channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map camera moves. */ - public void onCameraMove(@NonNull PlatformCameraPosition cameraPositionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove" + messageChannelSuffix; + public void onCameraMove( + @NonNull PlatformCameraPosition cameraPositionArg, @NonNull VoidResult result) { + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(cameraPositionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map camera stops moving. */ public void onCameraIdle(@NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( null, channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map, not a specifc map object, is tapped. */ public void onTap(@NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map, not a specifc map object, is long pressed. */ public void onLongPress(@NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker is tapped. */ public void onMarkerTap(@NonNull String markerIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(markerIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag starts. */ - public void onMarkerDragStart(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart" + messageChannelSuffix; + public void onMarkerDragStart( + @NonNull String markerIdArg, + @NonNull PlatformLatLng positionArg, + @NonNull VoidResult result) { + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag updates. */ - public void onMarkerDrag(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag" + messageChannelSuffix; + public void onMarkerDrag( + @NonNull String markerIdArg, + @NonNull PlatformLatLng positionArg, + @NonNull VoidResult result) { + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag ends. */ - public void onMarkerDragEnd(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd" + messageChannelSuffix; + public void onMarkerDragEnd( + @NonNull String markerIdArg, + @NonNull PlatformLatLng positionArg, + @NonNull VoidResult result) { + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker's info window is tapped. */ public void onInfoWindowTap(@NonNull String markerIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(markerIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a circle is tapped. */ public void onCircleTap(@NonNull String circleIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(circleIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker cluster is tapped. */ public void onClusterTap(@NonNull PlatformCluster clusterArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(clusterArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a polygon is tapped. */ public void onPolygonTap(@NonNull String polygonIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(polygonIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a polyline is tapped. */ public void onPolylineTap(@NonNull String polylineIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(polylineIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a ground overlay is tapped. */ public void onGroundOverlayTap(@NonNull String groundOverlayIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(groundOverlayIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called to get data for a map tile. */ - public void getTileOverlayTile(@NonNull String tileOverlayIdArg, @NonNull PlatformPoint locationArg, @NonNull Long zoomArg, @NonNull Result result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile" + messageChannelSuffix; + public void getTileOverlayTile( + @NonNull String tileOverlayIdArg, + @NonNull PlatformPoint locationArg, + @NonNull Long zoomArg, + @NonNull Result result) { + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(tileOverlayIdArg, locationArg, zoomArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else if (listReply.get(0) == null) { - result.error(new FlutterError("null-error", "Flutter api returned null value for non-null return value.", "")); + result.error( + new FlutterError( + "null-error", + "Flutter api returned null value for non-null return value.", + "")); } else { @SuppressWarnings("ConstantConditions") PlatformTile output = (PlatformTile) listReply.get(0); result.success(output); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } } /** * Interface for global SDK initialization. * - * Generated interface from Pigeon that represents a handler of messages from Flutter. + *

Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface MapsInitializerApi { /** * Initializes the Google Maps SDK with the given renderer preference. * - * A null renderer preference will result in the default renderer. + *

A null renderer preference will result in the default renderer. * - * Calling this more than once in the lifetime of an application will result - * in an error. + *

Calling this more than once in the lifetime of an application will result in an error. */ - void initializeWithPreferredRenderer(@Nullable PlatformRendererType type, @NonNull Result result); + void initializeWithPreferredRenderer( + @Nullable PlatformRendererType type, @NonNull Result result); /** The codec used by MapsInitializerApi. */ static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } - /**Sets up an instance of `MapsInitializerApi` to handle messages through the `binaryMessenger`. */ + /** + * Sets up an instance of `MapsInitializerApi` to handle messages through the `binaryMessenger`. + */ static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable MapsInitializerApi api) { setUp(binaryMessenger, "", api); } - static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String messageChannelSuffix, @Nullable MapsInitializerApi api) { + + static void setUp( + @NonNull BinaryMessenger binaryMessenger, + @NonNull String messageChannelSuffix, + @Nullable MapsInitializerApi api) { messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7482,11 +8018,10 @@ public void error(Throwable error) { } } /** - * Dummy interface to force generation of the platform view creation params, - * which are not used in any Pigeon calls, only the platform view creation - * call made internally by Flutter. + * Dummy interface to force generation of the platform view creation params, which are not used in + * any Pigeon calls, only the platform view creation call made internally by Flutter. * - * Generated interface from Pigeon that represents a handler of messages from Flutter. + *

Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface MapsPlatformViewApi { @@ -7496,16 +8031,26 @@ public interface MapsPlatformViewApi { static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } - /**Sets up an instance of `MapsPlatformViewApi` to handle messages through the `binaryMessenger`. */ + /** + * Sets up an instance of `MapsPlatformViewApi` to handle messages through the + * `binaryMessenger`. + */ static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable MapsPlatformViewApi api) { setUp(binaryMessenger, "", api); } - static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String messageChannelSuffix, @Nullable MapsPlatformViewApi api) { + + static void setUp( + @NonNull BinaryMessenger binaryMessenger, + @NonNull String messageChannelSuffix, + @Nullable MapsPlatformViewApi api) { messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7515,8 +8060,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { api.createView(typeArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7530,72 +8074,81 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess /** * Inspector API only intended for use in integration tests. * - * Generated interface from Pigeon that represents a handler of messages from Flutter. + *

Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface MapsInspectorApi { - @NonNull + @NonNull Boolean areBuildingsEnabled(); - @NonNull + @NonNull Boolean areRotateGesturesEnabled(); - @NonNull + @NonNull Boolean areZoomControlsEnabled(); - @NonNull + @NonNull Boolean areScrollGesturesEnabled(); - @NonNull + @NonNull Boolean areTiltGesturesEnabled(); - @NonNull + @NonNull Boolean areZoomGesturesEnabled(); - @NonNull + @NonNull Boolean isCompassEnabled(); - @Nullable + @Nullable Boolean isLiteModeEnabled(); - @NonNull + @NonNull Boolean isMapToolbarEnabled(); - @NonNull + @NonNull Boolean isMyLocationButtonEnabled(); - @NonNull + @NonNull Boolean isTrafficEnabled(); - @Nullable + @Nullable PlatformTileLayer getTileOverlayInfo(@NonNull String tileOverlayId); - @Nullable + @Nullable PlatformGroundOverlay getGroundOverlayInfo(@NonNull String groundOverlayId); - @NonNull + @NonNull PlatformZoomRange getZoomRange(); - @NonNull + @NonNull List getClusters(@NonNull String clusterManagerId); - @NonNull + @NonNull PlatformCameraPosition getCameraPosition(); /** The codec used by MapsInspectorApi. */ static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } - /**Sets up an instance of `MapsInspectorApi` to handle messages through the `binaryMessenger`. */ + /** + * Sets up an instance of `MapsInspectorApi` to handle messages through the `binaryMessenger`. + */ static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable MapsInspectorApi api) { setUp(binaryMessenger, "", api); } - static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String messageChannelSuffix, @Nullable MapsInspectorApi api) { + + static void setUp( + @NonNull BinaryMessenger binaryMessenger, + @NonNull String messageChannelSuffix, + @Nullable MapsInspectorApi api) { messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7603,8 +8156,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areBuildingsEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7616,7 +8168,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7624,8 +8179,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areRotateGesturesEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7637,7 +8191,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7645,8 +8202,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areZoomControlsEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7658,7 +8214,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7666,8 +8225,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areScrollGesturesEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7679,7 +8237,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7687,8 +8248,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areTiltGesturesEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7700,7 +8260,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7708,8 +8271,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areZoomGesturesEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7721,7 +8283,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7729,8 +8294,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.isCompassEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7742,7 +8306,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7750,8 +8317,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.isLiteModeEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7763,7 +8329,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7771,8 +8340,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.isMapToolbarEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7784,7 +8352,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7792,8 +8363,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.isMyLocationButtonEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7805,7 +8375,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7813,8 +8386,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.isTrafficEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7826,7 +8398,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7836,8 +8411,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { PlatformTileLayer output = api.getTileOverlayInfo(tileOverlayIdArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7849,7 +8423,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7859,8 +8436,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { PlatformGroundOverlay output = api.getGroundOverlayInfo(groundOverlayIdArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7872,7 +8448,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7880,8 +8459,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { PlatformZoomRange output = api.getZoomRange(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7893,7 +8471,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7903,8 +8484,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { List output = api.getClusters(clusterManagerIdArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7916,7 +8496,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7924,8 +8507,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { PlatformCameraPosition output = api.getCameraPosition(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java index 42b552103bb..9c368bd346f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java @@ -39,9 +39,6 @@ import io.flutter.plugins.googlemaps.Convert.BitmapDescriptorFactoryWrapper; import io.flutter.plugins.googlemaps.Convert.FlutterInjectorWrapper; import io.flutter.plugins.googlemaps.Messages.PlatformMarkerType; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.InputStream; import java.util.Collections; import java.util.List; import java.util.Map; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart index b29ec0ad85d..0913ff726ca 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart @@ -2040,7 +2040,7 @@ void googleMapsTests() { // https://github.com/flutter/flutter/issues/131071 skip: true, ); - + testWidgets('markerWithPinConfig', (WidgetTester tester) async { final Set markers = { AdvancedMarker( diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart index 7443b6fce33..93eb69c60e1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart @@ -18,7 +18,8 @@ PlatformException _createConnectionError(String channelName) { ); } -List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { +List wrapResponse( + {Object? result, PlatformException? error, bool empty = false}) { if (empty) { return []; } @@ -1176,9 +1177,12 @@ class PlatformMapViewCreationParams { initialPolygons: (result[4] as List?)!.cast(), initialPolylines: (result[5] as List?)!.cast(), initialHeatmaps: (result[6] as List?)!.cast(), - initialTileOverlays: (result[7] as List?)!.cast(), - initialClusterManagers: (result[8] as List?)!.cast(), - initialGroundOverlays: (result[9] as List?)!.cast(), + initialTileOverlays: + (result[7] as List?)!.cast(), + initialClusterManagers: + (result[8] as List?)!.cast(), + initialGroundOverlays: + (result[9] as List?)!.cast(), ); } } @@ -1672,7 +1676,6 @@ class PlatformBitmapPinConfig { } } - class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -1680,151 +1683,151 @@ class _PigeonCodec extends StandardMessageCodec { if (value is int) { buffer.putUint8(4); buffer.putInt64(value); - } else if (value is PlatformMapType) { + } else if (value is PlatformMapType) { buffer.putUint8(129); writeValue(buffer, value.index); - } else if (value is PlatformRendererType) { + } else if (value is PlatformRendererType) { buffer.putUint8(130); writeValue(buffer, value.index); - } else if (value is PlatformMarkerCollisionBehavior) { + } else if (value is PlatformMarkerCollisionBehavior) { buffer.putUint8(131); writeValue(buffer, value.index); - } else if (value is PlatformJointType) { + } else if (value is PlatformJointType) { buffer.putUint8(132); writeValue(buffer, value.index); - } else if (value is PlatformCapType) { + } else if (value is PlatformCapType) { buffer.putUint8(133); writeValue(buffer, value.index); - } else if (value is PlatformPatternItemType) { + } else if (value is PlatformPatternItemType) { buffer.putUint8(134); writeValue(buffer, value.index); - } else if (value is PlatformMarkerType) { + } else if (value is PlatformMarkerType) { buffer.putUint8(135); writeValue(buffer, value.index); - } else if (value is PlatformMapBitmapScaling) { + } else if (value is PlatformMapBitmapScaling) { buffer.putUint8(136); writeValue(buffer, value.index); - } else if (value is PlatformCameraPosition) { + } else if (value is PlatformCameraPosition) { buffer.putUint8(137); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { + } else if (value is PlatformCameraUpdate) { buffer.putUint8(138); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewCameraPosition) { + } else if (value is PlatformCameraUpdateNewCameraPosition) { buffer.putUint8(139); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLng) { + } else if (value is PlatformCameraUpdateNewLatLng) { buffer.putUint8(140); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngBounds) { + } else if (value is PlatformCameraUpdateNewLatLngBounds) { buffer.putUint8(141); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngZoom) { + } else if (value is PlatformCameraUpdateNewLatLngZoom) { buffer.putUint8(142); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateScrollBy) { + } else if (value is PlatformCameraUpdateScrollBy) { buffer.putUint8(143); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomBy) { + } else if (value is PlatformCameraUpdateZoomBy) { buffer.putUint8(144); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoom) { + } else if (value is PlatformCameraUpdateZoom) { buffer.putUint8(145); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomTo) { + } else if (value is PlatformCameraUpdateZoomTo) { buffer.putUint8(146); writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { + } else if (value is PlatformCircle) { buffer.putUint8(147); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { + } else if (value is PlatformHeatmap) { buffer.putUint8(148); writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { + } else if (value is PlatformClusterManager) { buffer.putUint8(149); writeValue(buffer, value.encode()); - } else if (value is PlatformDoublePair) { + } else if (value is PlatformDoublePair) { buffer.putUint8(150); writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { + } else if (value is PlatformInfoWindow) { buffer.putUint8(151); writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { + } else if (value is PlatformMarker) { buffer.putUint8(152); writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { + } else if (value is PlatformPolygon) { buffer.putUint8(153); writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { + } else if (value is PlatformPolyline) { buffer.putUint8(154); writeValue(buffer, value.encode()); - } else if (value is PlatformCap) { + } else if (value is PlatformCap) { buffer.putUint8(155); writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { + } else if (value is PlatformPatternItem) { buffer.putUint8(156); writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { + } else if (value is PlatformTile) { buffer.putUint8(157); writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { + } else if (value is PlatformTileOverlay) { buffer.putUint8(158); writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { + } else if (value is PlatformEdgeInsets) { buffer.putUint8(159); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { + } else if (value is PlatformLatLng) { buffer.putUint8(160); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { + } else if (value is PlatformLatLngBounds) { buffer.putUint8(161); writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { + } else if (value is PlatformCluster) { buffer.putUint8(162); writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { + } else if (value is PlatformGroundOverlay) { buffer.putUint8(163); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { + } else if (value is PlatformCameraTargetBounds) { buffer.putUint8(164); writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { + } else if (value is PlatformMapViewCreationParams) { buffer.putUint8(165); writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { + } else if (value is PlatformMapConfiguration) { buffer.putUint8(166); writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { + } else if (value is PlatformPoint) { buffer.putUint8(167); writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { + } else if (value is PlatformTileLayer) { buffer.putUint8(168); writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { + } else if (value is PlatformZoomRange) { buffer.putUint8(169); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { + } else if (value is PlatformBitmap) { buffer.putUint8(170); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { + } else if (value is PlatformBitmapDefaultMarker) { buffer.putUint8(171); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { + } else if (value is PlatformBitmapBytes) { buffer.putUint8(172); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { + } else if (value is PlatformBitmapAsset) { buffer.putUint8(173); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { + } else if (value is PlatformBitmapAssetImage) { buffer.putUint8(174); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { + } else if (value is PlatformBitmapAssetMap) { buffer.putUint8(175); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { + } else if (value is PlatformBitmapBytesMap) { buffer.putUint8(176); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapPinConfig) { + } else if (value is PlatformBitmapPinConfig) { buffer.putUint8(177); writeValue(buffer, value.encode()); } else { @@ -1835,111 +1838,113 @@ class _PigeonCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 129: + case 129: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformMapType.values[value]; - case 130: + case 130: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformRendererType.values[value]; - case 131: + case 131: final int? value = readValue(buffer) as int?; - return value == null ? null : PlatformMarkerCollisionBehavior.values[value]; - case 132: + return value == null + ? null + : PlatformMarkerCollisionBehavior.values[value]; + case 132: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformJointType.values[value]; - case 133: + case 133: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformCapType.values[value]; - case 134: + case 134: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformPatternItemType.values[value]; - case 135: + case 135: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformMarkerType.values[value]; - case 136: + case 136: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformMapBitmapScaling.values[value]; - case 137: + case 137: return PlatformCameraPosition.decode(readValue(buffer)!); - case 138: + case 138: return PlatformCameraUpdate.decode(readValue(buffer)!); - case 139: + case 139: return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!); - case 140: + case 140: return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!); - case 141: + case 141: return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); - case 142: + case 142: return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); - case 143: + case 143: return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); - case 144: + case 144: return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); - case 145: + case 145: return PlatformCameraUpdateZoom.decode(readValue(buffer)!); - case 146: + case 146: return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); - case 147: + case 147: return PlatformCircle.decode(readValue(buffer)!); - case 148: + case 148: return PlatformHeatmap.decode(readValue(buffer)!); - case 149: + case 149: return PlatformClusterManager.decode(readValue(buffer)!); - case 150: + case 150: return PlatformDoublePair.decode(readValue(buffer)!); - case 151: + case 151: return PlatformInfoWindow.decode(readValue(buffer)!); - case 152: + case 152: return PlatformMarker.decode(readValue(buffer)!); - case 153: + case 153: return PlatformPolygon.decode(readValue(buffer)!); - case 154: + case 154: return PlatformPolyline.decode(readValue(buffer)!); - case 155: + case 155: return PlatformCap.decode(readValue(buffer)!); - case 156: + case 156: return PlatformPatternItem.decode(readValue(buffer)!); - case 157: + case 157: return PlatformTile.decode(readValue(buffer)!); - case 158: + case 158: return PlatformTileOverlay.decode(readValue(buffer)!); - case 159: + case 159: return PlatformEdgeInsets.decode(readValue(buffer)!); - case 160: + case 160: return PlatformLatLng.decode(readValue(buffer)!); - case 161: + case 161: return PlatformLatLngBounds.decode(readValue(buffer)!); - case 162: + case 162: return PlatformCluster.decode(readValue(buffer)!); - case 163: + case 163: return PlatformGroundOverlay.decode(readValue(buffer)!); - case 164: + case 164: return PlatformCameraTargetBounds.decode(readValue(buffer)!); - case 165: + case 165: return PlatformMapViewCreationParams.decode(readValue(buffer)!); - case 166: + case 166: return PlatformMapConfiguration.decode(readValue(buffer)!); - case 167: + case 167: return PlatformPoint.decode(readValue(buffer)!); - case 168: + case 168: return PlatformTileLayer.decode(readValue(buffer)!); - case 169: + case 169: return PlatformZoomRange.decode(readValue(buffer)!); - case 170: + case 170: return PlatformBitmap.decode(readValue(buffer)!); - case 171: + case 171: return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); - case 172: + case 172: return PlatformBitmapBytes.decode(readValue(buffer)!); - case 173: + case 173: return PlatformBitmapAsset.decode(readValue(buffer)!); - case 174: + case 174: return PlatformBitmapAssetImage.decode(readValue(buffer)!); - case 175: + case 175: return PlatformBitmapAssetMap.decode(readValue(buffer)!); - case 176: + case 176: return PlatformBitmapBytesMap.decode(readValue(buffer)!); - case 177: + case 177: return PlatformBitmapPinConfig.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -1956,7 +1961,8 @@ class MapsApi { /// BinaryMessenger will be used which routes to the host platform. MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + pigeonVar_messageChannelSuffix = + messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -1965,8 +1971,10 @@ class MapsApi { /// Returns once the map instance is available. Future waitForMap() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -1990,15 +1998,18 @@ class MapsApi { /// /// Only non-null configuration values will result in updates; options with /// null values will remain unchanged. - Future updateMapConfiguration(PlatformMapConfiguration configuration) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updateMapConfiguration( + PlatformMapConfiguration configuration) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([configuration]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([configuration]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2013,15 +2024,18 @@ class MapsApi { } /// Updates the set of circles on the map. - Future updateCircles(List toAdd, List toChange, List idsToRemove) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updateCircles(List toAdd, + List toChange, List idsToRemove) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2036,15 +2050,18 @@ class MapsApi { } /// Updates the set of heatmaps on the map. - Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updateHeatmaps(List toAdd, + List toChange, List idsToRemove) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2059,15 +2076,18 @@ class MapsApi { } /// Updates the set of custer managers for clusters on the map. - Future updateClusterManagers(List toAdd, List idsToRemove) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updateClusterManagers( + List toAdd, List idsToRemove) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, idsToRemove]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([toAdd, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2082,15 +2102,18 @@ class MapsApi { } /// Updates the set of markers on the map. - Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updateMarkers(List toAdd, + List toChange, List idsToRemove) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2105,15 +2128,18 @@ class MapsApi { } /// Updates the set of polygonss on the map. - Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updatePolygons(List toAdd, + List toChange, List idsToRemove) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2128,15 +2154,18 @@ class MapsApi { } /// Updates the set of polylines on the map. - Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updatePolylines(List toAdd, + List toChange, List idsToRemove) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2151,15 +2180,18 @@ class MapsApi { } /// Updates the set of tile overlays on the map. - Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updateTileOverlays(List toAdd, + List toChange, List idsToRemove) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2174,15 +2206,18 @@ class MapsApi { } /// Updates the set of ground overlays on the map. - Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updateGroundOverlays(List toAdd, + List toChange, List idsToRemove) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2198,8 +2233,10 @@ class MapsApi { /// Gets the screen coordinate for the given map location. Future getScreenCoordinate(PlatformLatLng latLng) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2226,14 +2263,16 @@ class MapsApi { /// Gets the map location for the given screen coordinate. Future getLatLng(PlatformPoint screenCoordinate) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([screenCoordinate]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([screenCoordinate]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2254,8 +2293,10 @@ class MapsApi { /// Gets the map region currently displayed on the map. Future getVisibleRegion() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2283,8 +2324,10 @@ class MapsApi { /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. Future moveCamera(PlatformCameraUpdate cameraUpdate) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2306,15 +2349,18 @@ class MapsApi { /// Moves the camera according to [cameraUpdate], animating the update using a /// duration in milliseconds if provided. - Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future animateCamera( + PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraUpdate, durationMilliseconds]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([cameraUpdate, durationMilliseconds]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2330,8 +2376,10 @@ class MapsApi { /// Gets the current map zoom level. Future getZoomLevel() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2358,8 +2406,10 @@ class MapsApi { /// Show the info window for the marker with the given ID. Future showInfoWindow(String markerId) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2381,8 +2431,10 @@ class MapsApi { /// Hide the info window for the marker with the given ID. Future hideInfoWindow(String markerId) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2405,8 +2457,10 @@ class MapsApi { /// Returns true if the marker with the given ID is currently displaying its /// info window. Future isInfoWindowShown(String markerId) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2437,8 +2491,10 @@ class MapsApi { /// Returns false if there was an error setting the style, such as an invalid /// style string. Future setStyle(String style) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2469,8 +2525,10 @@ class MapsApi { /// This allows checking asynchronously for initial style failures, as there /// is no way to return failures from map initialization. Future didLastStyleSucceed() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2500,8 +2558,10 @@ class MapsApi { /// This allows checking if the map supports advanced markers before /// attempting to use them. Future isAdvancedMarkersAvailable() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isAdvancedMarkersAvailable$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isAdvancedMarkersAvailable$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2528,14 +2588,16 @@ class MapsApi { /// Clears the cache of tiles previously requseted from the tile provider. Future clearTileCache(String tileOverlayId) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([tileOverlayId]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([tileOverlayId]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2551,8 +2613,10 @@ class MapsApi { /// Takes a snapshot of the map and returns its image data. Future takeSnapshot() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2627,13 +2691,22 @@ abstract class MapsCallbackApi { void onGroundOverlayTap(String groundOverlayId); /// Called to get data for a map tile. - Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); - - static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { - messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + Future getTileOverlayTile( + String tileOverlayId, PlatformPoint location, int zoom); + + static void setUp( + MapsCallbackApi? api, { + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) { + messageChannelSuffix = + messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); @@ -2644,24 +2717,29 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null.'); final List args = (message as List?)!; - final PlatformCameraPosition? arg_cameraPosition = (args[0] as PlatformCameraPosition?); + final PlatformCameraPosition? arg_cameraPosition = + (args[0] as PlatformCameraPosition?); assert(arg_cameraPosition != null, 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.'); try { @@ -2669,15 +2747,19 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); @@ -2688,22 +2770,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null.'); final List args = (message as List?)!; final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); assert(arg_position != null, @@ -2713,22 +2799,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null.'); final List args = (message as List?)!; final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); assert(arg_position != null, @@ -2738,22 +2828,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2763,22 +2857,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2791,22 +2889,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2819,22 +2921,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2847,22 +2953,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2872,22 +2982,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null.'); final List args = (message as List?)!; final String? arg_circleId = (args[0] as String?); assert(arg_circleId != null, @@ -2897,22 +3011,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null.'); final List args = (message as List?)!; final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); assert(arg_cluster != null, @@ -2922,22 +3040,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null.'); final List args = (message as List?)!; final String? arg_polygonId = (args[0] as String?); assert(arg_polygonId != null, @@ -2947,22 +3069,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null.'); final List args = (message as List?)!; final String? arg_polylineId = (args[0] as String?); assert(arg_polylineId != null, @@ -2972,22 +3098,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.'); final List args = (message as List?)!; final String? arg_groundOverlayId = (args[0] as String?); assert(arg_groundOverlayId != null, @@ -2997,22 +3127,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null.'); final List args = (message as List?)!; final String? arg_tileOverlayId = (args[0] as String?); assert(arg_tileOverlayId != null, @@ -3024,12 +3158,14 @@ abstract class MapsCallbackApi { assert(arg_zoom != null, 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); try { - final PlatformTile output = await api.getTileOverlayTile(arg_tileOverlayId!, arg_location!, arg_zoom!); + final PlatformTile output = await api.getTileOverlayTile( + arg_tileOverlayId!, arg_location!, arg_zoom!); return wrapResponse(result: output); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } @@ -3042,9 +3178,11 @@ class MapsInitializerApi { /// Constructor for [MapsInitializerApi]. The [binaryMessenger] named argument is /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. - MapsInitializerApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + MapsInitializerApi( + {BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + pigeonVar_messageChannelSuffix = + messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -3057,9 +3195,12 @@ class MapsInitializerApi { /// /// Calling this more than once in the lifetime of an application will result /// in an error. - Future initializeWithPreferredRenderer(PlatformRendererType? type) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future initializeWithPreferredRenderer( + PlatformRendererType? type) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3092,9 +3233,11 @@ class MapsPlatformViewApi { /// Constructor for [MapsPlatformViewApi]. The [binaryMessenger] named argument is /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. - MapsPlatformViewApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + MapsPlatformViewApi( + {BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + pigeonVar_messageChannelSuffix = + messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -3102,8 +3245,10 @@ class MapsPlatformViewApi { final String pigeonVar_messageChannelSuffix; Future createView(PlatformMapViewCreationParams? type) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3129,9 +3274,11 @@ class MapsInspectorApi { /// Constructor for [MapsInspectorApi]. The [binaryMessenger] named argument is /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. - MapsInspectorApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + MapsInspectorApi( + {BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + pigeonVar_messageChannelSuffix = + messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -3139,8 +3286,10 @@ class MapsInspectorApi { final String pigeonVar_messageChannelSuffix; Future areBuildingsEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3166,8 +3315,10 @@ class MapsInspectorApi { } Future areRotateGesturesEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3193,8 +3344,10 @@ class MapsInspectorApi { } Future areZoomControlsEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3220,8 +3373,10 @@ class MapsInspectorApi { } Future areScrollGesturesEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3247,8 +3402,10 @@ class MapsInspectorApi { } Future areTiltGesturesEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3274,8 +3431,10 @@ class MapsInspectorApi { } Future areZoomGesturesEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3301,8 +3460,10 @@ class MapsInspectorApi { } Future isCompassEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3328,8 +3489,10 @@ class MapsInspectorApi { } Future isLiteModeEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3350,8 +3513,10 @@ class MapsInspectorApi { } Future isMapToolbarEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3377,8 +3542,10 @@ class MapsInspectorApi { } Future isMyLocationButtonEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3404,8 +3571,10 @@ class MapsInspectorApi { } Future isTrafficEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3431,14 +3600,16 @@ class MapsInspectorApi { } Future getTileOverlayInfo(String tileOverlayId) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([tileOverlayId]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([tileOverlayId]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3452,15 +3623,18 @@ class MapsInspectorApi { } } - Future getGroundOverlayInfo(String groundOverlayId) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future getGroundOverlayInfo( + String groundOverlayId) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([groundOverlayId]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([groundOverlayId]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3475,8 +3649,10 @@ class MapsInspectorApi { } Future getZoomRange() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3502,14 +3678,16 @@ class MapsInspectorApi { } Future> getClusters(String clusterManagerId) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([clusterManagerId]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([clusterManagerId]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3524,13 +3702,16 @@ class MapsInspectorApi { message: 'Host platform returned null value for non-null return value.', ); } else { - return (pigeonVar_replyList[0] as List?)!.cast(); + return (pigeonVar_replyList[0] as List?)! + .cast(); } } Future getCameraPosition() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart index 793469adbee..b9fc81c46ad 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/example_google_map.dart @@ -45,9 +45,7 @@ class ExampleGoogleMapController { .listen((_) => _googleMapState.widget.onCameraMoveStarted!()); } if (_googleMapState.widget.onCameraMove != null) { - GoogleMapsFlutterPlatform.instance - .onCameraMove(mapId: mapId) - .listen( + GoogleMapsFlutterPlatform.instance.onCameraMove(mapId: mapId).listen( (CameraMoveEvent e) => _googleMapState.widget.onCameraMove!(e.value), ); @@ -60,27 +58,19 @@ class ExampleGoogleMapController { GoogleMapsFlutterPlatform.instance .onMarkerTap(mapId: mapId) .listen((MarkerTapEvent e) => _googleMapState.onMarkerTap(e.value)); - GoogleMapsFlutterPlatform.instance - .onMarkerDragStart(mapId: mapId) - .listen( + GoogleMapsFlutterPlatform.instance.onMarkerDragStart(mapId: mapId).listen( (MarkerDragStartEvent e) => _googleMapState.onMarkerDragStart(e.value, e.position), ); - GoogleMapsFlutterPlatform.instance - .onMarkerDrag(mapId: mapId) - .listen( + GoogleMapsFlutterPlatform.instance.onMarkerDrag(mapId: mapId).listen( (MarkerDragEvent e) => _googleMapState.onMarkerDrag(e.value, e.position), ); - GoogleMapsFlutterPlatform.instance - .onMarkerDragEnd(mapId: mapId) - .listen( + GoogleMapsFlutterPlatform.instance.onMarkerDragEnd(mapId: mapId).listen( (MarkerDragEndEvent e) => _googleMapState.onMarkerDragEnd(e.value, e.position), ); - GoogleMapsFlutterPlatform.instance - .onInfoWindowTap(mapId: mapId) - .listen( + GoogleMapsFlutterPlatform.instance.onInfoWindowTap(mapId: mapId).listen( (InfoWindowTapEvent e) => _googleMapState.onInfoWindowTap(e.value), ); GoogleMapsFlutterPlatform.instance @@ -92,18 +82,14 @@ class ExampleGoogleMapController { GoogleMapsFlutterPlatform.instance .onCircleTap(mapId: mapId) .listen((CircleTapEvent e) => _googleMapState.onCircleTap(e.value)); - GoogleMapsFlutterPlatform.instance - .onGroundOverlayTap(mapId: mapId) - .listen( + GoogleMapsFlutterPlatform.instance.onGroundOverlayTap(mapId: mapId).listen( (GroundOverlayTapEvent e) => _googleMapState.onGroundOverlayTap(e.value), ); GoogleMapsFlutterPlatform.instance .onTap(mapId: mapId) .listen((MapTapEvent e) => _googleMapState.onTap(e.position)); - GoogleMapsFlutterPlatform.instance - .onLongPress(mapId: mapId) - .listen( + GoogleMapsFlutterPlatform.instance.onLongPress(mapId: mapId).listen( (MapLongPressEvent e) => _googleMapState.onLongPress(e.position), ); GoogleMapsFlutterPlatform.instance @@ -465,8 +451,7 @@ class _ExampleGoogleMapState extends State { _mapId, onPlatformViewCreated, widgetConfiguration: MapWidgetConfiguration( - textDirection: - widget.layoutDirection ?? + textDirection: widget.layoutDirection ?? Directionality.maybeOf(context) ?? TextDirection.ltr, initialCameraPosition: widget.initialCameraPosition, @@ -602,10 +587,10 @@ class _ExampleGoogleMapState extends State { Future onPlatformViewCreated(int id) async { final ExampleGoogleMapController controller = await ExampleGoogleMapController._init( - id, - widget.initialCameraPosition, - this, - ); + id, + widget.initialCameraPosition, + this, + ); _controller.complete(controller); unawaited(_updateTileOverlays()); widget.onMapCreated?.call(controller); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/FGMImageUtils.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/FGMImageUtils.h index 521df1aa25c..82562870b74 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/FGMImageUtils.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/FGMImageUtils.h @@ -4,8 +4,8 @@ #import #import -#import "messages.g.h" #import "FLTGoogleMapJSONConversions.h" +#import "messages.g.h" NS_ASSUME_NONNULL_BEGIN diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/FGMImageUtils.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/FGMImageUtils.m index 85f0ecabfc7..c2383b4c449 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/FGMImageUtils.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/FGMImageUtils.m @@ -126,45 +126,44 @@ userInfo:nil]; } } else if ([bitmap isKindOfClass:[FGMPlatformBitmapPinConfig class]]) { - FGMPlatformBitmapPinConfig *pinConfig = bitmap; + FGMPlatformBitmapPinConfig *pinConfig = bitmap; - GMSPinImageOptions *options = [[GMSPinImageOptions alloc] init]; - NSNumber *backgroundColor = pinConfig.backgroundColor; - if (backgroundColor) { - options.backgroundColor = FGMGetColorForRGBA([backgroundColor integerValue]); - } - - NSNumber *borderColor = pinConfig.borderColor; - if (borderColor) { - options.borderColor = FGMGetColorForRGBA([borderColor integerValue]); - } + GMSPinImageOptions *options = [[GMSPinImageOptions alloc] init]; + NSNumber *backgroundColor = pinConfig.backgroundColor; + if (backgroundColor) { + options.backgroundColor = FGMGetColorForRGBA([backgroundColor integerValue]); + } - GMSPinImageGlyph *glyph; - NSString *glyphText = pinConfig.glyphText; - NSNumber *glyphColor = pinConfig.glyphColor; - FGMPlatformBitmap *glyphBitmap = pinConfig.glyphBitmap; - if (glyphText) { - NSNumber *glyphTextColorInt = pinConfig.glyphTextColor; - UIColor *glyphTextColor = glyphTextColorInt - ? FGMGetColorForRGBA([glyphTextColorInt integerValue]) - : [UIColor blackColor]; - glyph = [[GMSPinImageGlyph alloc] initWithText:glyphText textColor:glyphTextColor]; - } else if (glyphColor) { - UIColor *color = FGMGetColorForRGBA([glyphColor integerValue]); - glyph = [[GMSPinImageGlyph alloc] initWithGlyphColor:color]; - } else if (glyphBitmap) { - UIImage *glyphImage = FGMIconFromBitmap(glyphBitmap,registrar,screenScale); - glyph = [[GMSPinImageGlyph alloc] initWithImage:glyphImage]; - } - + NSNumber *borderColor = pinConfig.borderColor; + if (borderColor) { + options.borderColor = FGMGetColorForRGBA([borderColor integerValue]); + } - if (glyph) { - options.glyph = glyph; - } + GMSPinImageGlyph *glyph; + NSString *glyphText = pinConfig.glyphText; + NSNumber *glyphColor = pinConfig.glyphColor; + FGMPlatformBitmap *glyphBitmap = pinConfig.glyphBitmap; + if (glyphText) { + NSNumber *glyphTextColorInt = pinConfig.glyphTextColor; + UIColor *glyphTextColor = glyphTextColorInt + ? FGMGetColorForRGBA([glyphTextColorInt integerValue]) + : [UIColor blackColor]; + glyph = [[GMSPinImageGlyph alloc] initWithText:glyphText textColor:glyphTextColor]; + } else if (glyphColor) { + UIColor *color = FGMGetColorForRGBA([glyphColor integerValue]); + glyph = [[GMSPinImageGlyph alloc] initWithGlyphColor:color]; + } else if (glyphBitmap) { + UIImage *glyphImage = FGMIconFromBitmap(glyphBitmap, registrar, screenScale); + glyph = [[GMSPinImageGlyph alloc] initWithImage:glyphImage]; + } - image = [GMSPinImage pinImageWithOptions:options]; + if (glyph) { + options.glyph = glyph; } + image = [GMSPinImage pinImageWithOptions:options]; + } + return image; } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h index 9302efe3f89..96e6f187c8b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h @@ -134,26 +134,26 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @interface FGMPlatformCameraPosition : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBearing:(double )bearing - target:(FGMPlatformLatLng *)target - tilt:(double )tilt - zoom:(double )zoom; -@property(nonatomic, assign) double bearing; -@property(nonatomic, strong) FGMPlatformLatLng * target; -@property(nonatomic, assign) double tilt; -@property(nonatomic, assign) double zoom; ++ (instancetype)makeWithBearing:(double)bearing + target:(FGMPlatformLatLng *)target + tilt:(double)tilt + zoom:(double)zoom; +@property(nonatomic, assign) double bearing; +@property(nonatomic, strong) FGMPlatformLatLng *target; +@property(nonatomic, assign) double tilt; +@property(nonatomic, assign) double zoom; @end /// Pigeon representation of a CameraUpdate. @interface FGMPlatformCameraUpdate : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithCameraUpdate:(id )cameraUpdate; ++ (instancetype)makeWithCameraUpdate:(id)cameraUpdate; /// This Object must be one of the classes below prefixed with /// PlatformCameraUpdate. Each such class represents a different type of /// camera update, and each holds a different set of data, preventing the /// use of a single unified class. -@property(nonatomic, strong) id cameraUpdate; +@property(nonatomic, strong) id cameraUpdate; @end /// Pigeon equivalent of NewCameraPosition @@ -161,7 +161,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition; -@property(nonatomic, strong) FGMPlatformCameraPosition * cameraPosition; +@property(nonatomic, strong) FGMPlatformCameraPosition *cameraPosition; @end /// Pigeon equivalent of NewLatLng @@ -169,98 +169,94 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng; -@property(nonatomic, strong) FGMPlatformLatLng * latLng; +@property(nonatomic, strong) FGMPlatformLatLng *latLng; @end /// Pigeon equivalent of NewLatLngBounds @interface FGMPlatformCameraUpdateNewLatLngBounds : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds - padding:(double )padding; -@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; -@property(nonatomic, assign) double padding; ++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding; +@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds; +@property(nonatomic, assign) double padding; @end /// Pigeon equivalent of NewLatLngZoom @interface FGMPlatformCameraUpdateNewLatLngZoom : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng - zoom:(double )zoom; -@property(nonatomic, strong) FGMPlatformLatLng * latLng; -@property(nonatomic, assign) double zoom; ++ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom; +@property(nonatomic, strong) FGMPlatformLatLng *latLng; +@property(nonatomic, assign) double zoom; @end /// Pigeon equivalent of ScrollBy @interface FGMPlatformCameraUpdateScrollBy : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithDx:(double )dx - dy:(double )dy; -@property(nonatomic, assign) double dx; -@property(nonatomic, assign) double dy; ++ (instancetype)makeWithDx:(double)dx dy:(double)dy; +@property(nonatomic, assign) double dx; +@property(nonatomic, assign) double dy; @end /// Pigeon equivalent of ZoomBy @interface FGMPlatformCameraUpdateZoomBy : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAmount:(double )amount - focus:(nullable FGMPlatformPoint *)focus; -@property(nonatomic, assign) double amount; -@property(nonatomic, strong, nullable) FGMPlatformPoint * focus; ++ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus; +@property(nonatomic, assign) double amount; +@property(nonatomic, strong, nullable) FGMPlatformPoint *focus; @end /// Pigeon equivalent of ZoomIn/ZoomOut @interface FGMPlatformCameraUpdateZoom : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithOut:(BOOL )out; -@property(nonatomic, assign) BOOL out; ++ (instancetype)makeWithOut:(BOOL)out; +@property(nonatomic, assign) BOOL out; @end /// Pigeon equivalent of ZoomTo @interface FGMPlatformCameraUpdateZoomTo : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithZoom:(double )zoom; -@property(nonatomic, assign) double zoom; ++ (instancetype)makeWithZoom:(double)zoom; +@property(nonatomic, assign) double zoom; @end /// Pigeon equivalent of the Circle class. @interface FGMPlatformCircle : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithConsumeTapEvents:(BOOL )consumeTapEvents - fillColor:(NSInteger )fillColor - strokeColor:(NSInteger )strokeColor - visible:(BOOL )visible - strokeWidth:(NSInteger )strokeWidth - zIndex:(double )zIndex - center:(FGMPlatformLatLng *)center - radius:(double )radius - circleId:(NSString *)circleId; -@property(nonatomic, assign) BOOL consumeTapEvents; -@property(nonatomic, assign) NSInteger fillColor; -@property(nonatomic, assign) NSInteger strokeColor; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger strokeWidth; -@property(nonatomic, assign) double zIndex; -@property(nonatomic, strong) FGMPlatformLatLng * center; -@property(nonatomic, assign) double radius; -@property(nonatomic, copy) NSString * circleId; ++ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents + fillColor:(NSInteger)fillColor + strokeColor:(NSInteger)strokeColor + visible:(BOOL)visible + strokeWidth:(NSInteger)strokeWidth + zIndex:(double)zIndex + center:(FGMPlatformLatLng *)center + radius:(double)radius + circleId:(NSString *)circleId; +@property(nonatomic, assign) BOOL consumeTapEvents; +@property(nonatomic, assign) NSInteger fillColor; +@property(nonatomic, assign) NSInteger strokeColor; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger strokeWidth; +@property(nonatomic, assign) double zIndex; +@property(nonatomic, strong) FGMPlatformLatLng *center; +@property(nonatomic, assign) double radius; +@property(nonatomic, copy) NSString *circleId; @end /// Pigeon equivalent of the Heatmap class. @interface FGMPlatformHeatmap : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithJson:(id )json; ++ (instancetype)makeWithJson:(id)json; /// The heatmap data, as JSON. This should only be set from /// Heatmap.toJson, and the native code must interpret it according to the /// internal implementation details of that method. -@property(nonatomic, strong) id json; +@property(nonatomic, strong) id json; @end /// Pigeon equivalent of the InfoWindow class. @@ -268,11 +264,11 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithTitle:(nullable NSString *)title - snippet:(nullable NSString *)snippet - anchor:(FGMPlatformPoint *)anchor; -@property(nonatomic, copy, nullable) NSString * title; -@property(nonatomic, copy, nullable) NSString * snippet; -@property(nonatomic, strong) FGMPlatformPoint * anchor; + snippet:(nullable NSString *)snippet + anchor:(FGMPlatformPoint *)anchor; +@property(nonatomic, copy, nullable) NSString *title; +@property(nonatomic, copy, nullable) NSString *snippet; +@property(nonatomic, strong) FGMPlatformPoint *anchor; @end /// Pigeon equivalent of Cluster. @@ -280,13 +276,13 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId - position:(FGMPlatformLatLng *)position - bounds:(FGMPlatformLatLngBounds *)bounds - markerIds:(NSArray *)markerIds; -@property(nonatomic, copy) NSString * clusterManagerId; -@property(nonatomic, strong) FGMPlatformLatLng * position; -@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; -@property(nonatomic, copy) NSArray * markerIds; + position:(FGMPlatformLatLng *)position + bounds:(FGMPlatformLatLngBounds *)bounds + markerIds:(NSArray *)markerIds; +@property(nonatomic, copy) NSString *clusterManagerId; +@property(nonatomic, strong) FGMPlatformLatLng *position; +@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds; +@property(nonatomic, copy) NSArray *markerIds; @end /// Pigeon equivalent of the ClusterManager class. @@ -294,41 +290,41 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithIdentifier:(NSString *)identifier; -@property(nonatomic, copy) NSString * identifier; +@property(nonatomic, copy) NSString *identifier; @end /// Pigeon equivalent of the Marker class. @interface FGMPlatformMarker : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAlpha:(double )alpha - anchor:(FGMPlatformPoint *)anchor - consumeTapEvents:(BOOL )consumeTapEvents - draggable:(BOOL )draggable - flat:(BOOL )flat - icon:(FGMPlatformBitmap *)icon - infoWindow:(FGMPlatformInfoWindow *)infoWindow - position:(FGMPlatformLatLng *)position - rotation:(double )rotation - visible:(BOOL )visible - zIndex:(double )zIndex - markerId:(NSString *)markerId - clusterManagerId:(nullable NSString *)clusterManagerId - collisionBehavior:(nullable FGMMarkerCollisionBehaviorBox *)collisionBehavior; -@property(nonatomic, assign) double alpha; -@property(nonatomic, strong) FGMPlatformPoint * anchor; -@property(nonatomic, assign) BOOL consumeTapEvents; -@property(nonatomic, assign) BOOL draggable; -@property(nonatomic, assign) BOOL flat; -@property(nonatomic, strong) FGMPlatformBitmap * icon; -@property(nonatomic, strong) FGMPlatformInfoWindow * infoWindow; -@property(nonatomic, strong) FGMPlatformLatLng * position; -@property(nonatomic, assign) double rotation; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) double zIndex; -@property(nonatomic, copy) NSString * markerId; -@property(nonatomic, copy, nullable) NSString * clusterManagerId; -@property(nonatomic, strong, nullable) FGMMarkerCollisionBehaviorBox * collisionBehavior; ++ (instancetype)makeWithAlpha:(double)alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL)consumeTapEvents + draggable:(BOOL)draggable + flat:(BOOL)flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double)rotation + visible:(BOOL)visible + zIndex:(double)zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId + collisionBehavior:(nullable FGMMarkerCollisionBehaviorBox *)collisionBehavior; +@property(nonatomic, assign) double alpha; +@property(nonatomic, strong) FGMPlatformPoint *anchor; +@property(nonatomic, assign) BOOL consumeTapEvents; +@property(nonatomic, assign) BOOL draggable; +@property(nonatomic, assign) BOOL flat; +@property(nonatomic, strong) FGMPlatformBitmap *icon; +@property(nonatomic, strong) FGMPlatformInfoWindow *infoWindow; +@property(nonatomic, strong) FGMPlatformLatLng *position; +@property(nonatomic, assign) double rotation; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) double zIndex; +@property(nonatomic, copy) NSString *markerId; +@property(nonatomic, copy, nullable) NSString *clusterManagerId; +@property(nonatomic, strong, nullable) FGMMarkerCollisionBehaviorBox *collisionBehavior; @end /// Pigeon equivalent of the Polygon class. @@ -336,25 +332,25 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithPolygonId:(NSString *)polygonId - consumesTapEvents:(BOOL )consumesTapEvents - fillColor:(NSInteger )fillColor - geodesic:(BOOL )geodesic - points:(NSArray *)points - holes:(NSArray *> *)holes - visible:(BOOL )visible - strokeColor:(NSInteger )strokeColor - strokeWidth:(NSInteger )strokeWidth - zIndex:(NSInteger )zIndex; -@property(nonatomic, copy) NSString * polygonId; -@property(nonatomic, assign) BOOL consumesTapEvents; -@property(nonatomic, assign) NSInteger fillColor; -@property(nonatomic, assign) BOOL geodesic; -@property(nonatomic, copy) NSArray * points; -@property(nonatomic, copy) NSArray *> * holes; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger strokeColor; -@property(nonatomic, assign) NSInteger strokeWidth; -@property(nonatomic, assign) NSInteger zIndex; + consumesTapEvents:(BOOL)consumesTapEvents + fillColor:(NSInteger)fillColor + geodesic:(BOOL)geodesic + points:(NSArray *)points + holes:(NSArray *> *)holes + visible:(BOOL)visible + strokeColor:(NSInteger)strokeColor + strokeWidth:(NSInteger)strokeWidth + zIndex:(NSInteger)zIndex; +@property(nonatomic, copy) NSString *polygonId; +@property(nonatomic, assign) BOOL consumesTapEvents; +@property(nonatomic, assign) NSInteger fillColor; +@property(nonatomic, assign) BOOL geodesic; +@property(nonatomic, copy) NSArray *points; +@property(nonatomic, copy) NSArray *> *holes; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger strokeColor; +@property(nonatomic, assign) NSInteger strokeWidth; +@property(nonatomic, assign) NSInteger zIndex; @end /// Pigeon equivalent of the Polyline class. @@ -362,49 +358,48 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithPolylineId:(NSString *)polylineId - consumesTapEvents:(BOOL )consumesTapEvents - color:(NSInteger )color - geodesic:(BOOL )geodesic - jointType:(FGMPlatformJointType)jointType - patterns:(NSArray *)patterns - points:(NSArray *)points - visible:(BOOL )visible - width:(NSInteger )width - zIndex:(NSInteger )zIndex; -@property(nonatomic, copy) NSString * polylineId; -@property(nonatomic, assign) BOOL consumesTapEvents; -@property(nonatomic, assign) NSInteger color; -@property(nonatomic, assign) BOOL geodesic; + consumesTapEvents:(BOOL)consumesTapEvents + color:(NSInteger)color + geodesic:(BOOL)geodesic + jointType:(FGMPlatformJointType)jointType + patterns:(NSArray *)patterns + points:(NSArray *)points + visible:(BOOL)visible + width:(NSInteger)width + zIndex:(NSInteger)zIndex; +@property(nonatomic, copy) NSString *polylineId; +@property(nonatomic, assign) BOOL consumesTapEvents; +@property(nonatomic, assign) NSInteger color; +@property(nonatomic, assign) BOOL geodesic; /// The joint type. @property(nonatomic, assign) FGMPlatformJointType jointType; /// The pattern data, as a list of pattern items. -@property(nonatomic, copy) NSArray * patterns; -@property(nonatomic, copy) NSArray * points; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger width; -@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, copy) NSArray *patterns; +@property(nonatomic, copy) NSArray *points; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger width; +@property(nonatomic, assign) NSInteger zIndex; @end /// Pigeon equivalent of the PatternItem class. @interface FGMPlatformPatternItem : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type - length:(nullable NSNumber *)length; ++ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length; @property(nonatomic, assign) FGMPlatformPatternItemType type; -@property(nonatomic, strong, nullable) NSNumber * length; +@property(nonatomic, strong, nullable) NSNumber *length; @end /// Pigeon equivalent of the Tile class. @interface FGMPlatformTile : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithWidth:(NSInteger )width - height:(NSInteger )height - data:(nullable FlutterStandardTypedData *)data; -@property(nonatomic, assign) NSInteger width; -@property(nonatomic, assign) NSInteger height; -@property(nonatomic, strong, nullable) FlutterStandardTypedData * data; ++ (instancetype)makeWithWidth:(NSInteger)width + height:(NSInteger)height + data:(nullable FlutterStandardTypedData *)data; +@property(nonatomic, assign) NSInteger width; +@property(nonatomic, assign) NSInteger height; +@property(nonatomic, strong, nullable) FlutterStandardTypedData *data; @end /// Pigeon equivalent of the TileOverlay class. @@ -412,41 +407,37 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId - fadeIn:(BOOL )fadeIn - transparency:(double )transparency - zIndex:(NSInteger )zIndex - visible:(BOOL )visible - tileSize:(NSInteger )tileSize; -@property(nonatomic, copy) NSString * tileOverlayId; -@property(nonatomic, assign) BOOL fadeIn; -@property(nonatomic, assign) double transparency; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger tileSize; + fadeIn:(BOOL)fadeIn + transparency:(double)transparency + zIndex:(NSInteger)zIndex + visible:(BOOL)visible + tileSize:(NSInteger)tileSize; +@property(nonatomic, copy) NSString *tileOverlayId; +@property(nonatomic, assign) BOOL fadeIn; +@property(nonatomic, assign) double transparency; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger tileSize; @end /// Pigeon equivalent of Flutter's EdgeInsets. @interface FGMPlatformEdgeInsets : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithTop:(double )top - bottom:(double )bottom - left:(double )left - right:(double )right; -@property(nonatomic, assign) double top; -@property(nonatomic, assign) double bottom; -@property(nonatomic, assign) double left; -@property(nonatomic, assign) double right; ++ (instancetype)makeWithTop:(double)top bottom:(double)bottom left:(double)left right:(double)right; +@property(nonatomic, assign) double top; +@property(nonatomic, assign) double bottom; +@property(nonatomic, assign) double left; +@property(nonatomic, assign) double right; @end /// Pigeon equivalent of LatLng. @interface FGMPlatformLatLng : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithLatitude:(double )latitude - longitude:(double )longitude; -@property(nonatomic, assign) double latitude; -@property(nonatomic, assign) double longitude; ++ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude; +@property(nonatomic, assign) double latitude; +@property(nonatomic, assign) double longitude; @end /// Pigeon equivalent of LatLngBounds. @@ -454,9 +445,9 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast - southwest:(FGMPlatformLatLng *)southwest; -@property(nonatomic, strong) FGMPlatformLatLng * northeast; -@property(nonatomic, strong) FGMPlatformLatLng * southwest; + southwest:(FGMPlatformLatLng *)southwest; +@property(nonatomic, strong) FGMPlatformLatLng *northeast; +@property(nonatomic, strong) FGMPlatformLatLng *southwest; @end /// Pigeon equivalent of CameraTargetBounds. @@ -465,7 +456,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// a target, and having an explicitly unbounded target (null [bounds]). @interface FGMPlatformCameraTargetBounds : NSObject + (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds; -@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds; @end /// Pigeon equivalent of the GroundOverlay class. @@ -473,135 +464,133 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId - image:(FGMPlatformBitmap *)image - position:(nullable FGMPlatformLatLng *)position - bounds:(nullable FGMPlatformLatLngBounds *)bounds - anchor:(nullable FGMPlatformPoint *)anchor - transparency:(double )transparency - bearing:(double )bearing - zIndex:(NSInteger )zIndex - visible:(BOOL )visible - clickable:(BOOL )clickable - zoomLevel:(nullable NSNumber *)zoomLevel; -@property(nonatomic, copy) NSString * groundOverlayId; -@property(nonatomic, strong) FGMPlatformBitmap * image; -@property(nonatomic, strong, nullable) FGMPlatformLatLng * position; -@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; -@property(nonatomic, strong, nullable) FGMPlatformPoint * anchor; -@property(nonatomic, assign) double transparency; -@property(nonatomic, assign) double bearing; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) BOOL clickable; -@property(nonatomic, strong, nullable) NSNumber * zoomLevel; + image:(FGMPlatformBitmap *)image + position:(nullable FGMPlatformLatLng *)position + bounds:(nullable FGMPlatformLatLngBounds *)bounds + anchor:(nullable FGMPlatformPoint *)anchor + transparency:(double)transparency + bearing:(double)bearing + zIndex:(NSInteger)zIndex + visible:(BOOL)visible + clickable:(BOOL)clickable + zoomLevel:(nullable NSNumber *)zoomLevel; +@property(nonatomic, copy) NSString *groundOverlayId; +@property(nonatomic, strong) FGMPlatformBitmap *image; +@property(nonatomic, strong, nullable) FGMPlatformLatLng *position; +@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds; +@property(nonatomic, strong, nullable) FGMPlatformPoint *anchor; +@property(nonatomic, assign) double transparency; +@property(nonatomic, assign) double bearing; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) BOOL clickable; +@property(nonatomic, strong, nullable) NSNumber *zoomLevel; @end /// Information passed to the platform view creation. @interface FGMPlatformMapViewCreationParams : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition - mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration - initialCircles:(NSArray *)initialCircles - initialMarkers:(NSArray *)initialMarkers - initialPolygons:(NSArray *)initialPolygons - initialPolylines:(NSArray *)initialPolylines - initialHeatmaps:(NSArray *)initialHeatmaps - initialTileOverlays:(NSArray *)initialTileOverlays - initialClusterManagers:(NSArray *)initialClusterManagers - initialGroundOverlays:(NSArray *)initialGroundOverlays; -@property(nonatomic, strong) FGMPlatformCameraPosition * initialCameraPosition; -@property(nonatomic, strong) FGMPlatformMapConfiguration * mapConfiguration; -@property(nonatomic, copy) NSArray * initialCircles; -@property(nonatomic, copy) NSArray * initialMarkers; -@property(nonatomic, copy) NSArray * initialPolygons; -@property(nonatomic, copy) NSArray * initialPolylines; -@property(nonatomic, copy) NSArray * initialHeatmaps; -@property(nonatomic, copy) NSArray * initialTileOverlays; -@property(nonatomic, copy) NSArray * initialClusterManagers; -@property(nonatomic, copy) NSArray * initialGroundOverlays; ++ (instancetype) + makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition + mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration + initialCircles:(NSArray *)initialCircles + initialMarkers:(NSArray *)initialMarkers + initialPolygons:(NSArray *)initialPolygons + initialPolylines:(NSArray *)initialPolylines + initialHeatmaps:(NSArray *)initialHeatmaps + initialTileOverlays:(NSArray *)initialTileOverlays + initialClusterManagers:(NSArray *)initialClusterManagers + initialGroundOverlays:(NSArray *)initialGroundOverlays; +@property(nonatomic, strong) FGMPlatformCameraPosition *initialCameraPosition; +@property(nonatomic, strong) FGMPlatformMapConfiguration *mapConfiguration; +@property(nonatomic, copy) NSArray *initialCircles; +@property(nonatomic, copy) NSArray *initialMarkers; +@property(nonatomic, copy) NSArray *initialPolygons; +@property(nonatomic, copy) NSArray *initialPolylines; +@property(nonatomic, copy) NSArray *initialHeatmaps; +@property(nonatomic, copy) NSArray *initialTileOverlays; +@property(nonatomic, copy) NSArray *initialClusterManagers; +@property(nonatomic, copy) NSArray *initialGroundOverlays; @end /// Pigeon equivalent of MapConfiguration. @interface FGMPlatformMapConfiguration : NSObject + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - markerType:(nullable FGMPlatformMarkerTypeBox *)markerType - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style; -@property(nonatomic, strong, nullable) NSNumber * compassEnabled; -@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds * cameraTargetBounds; -@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox * mapType; -@property(nonatomic, strong, nullable) FGMPlatformZoomRange * minMaxZoomPreference; -@property(nonatomic, strong, nullable) NSNumber * rotateGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber * scrollGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber * tiltGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber * trackCameraPosition; -@property(nonatomic, strong, nullable) NSNumber * zoomGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber * myLocationEnabled; -@property(nonatomic, strong, nullable) NSNumber * myLocationButtonEnabled; -@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets * padding; -@property(nonatomic, strong, nullable) NSNumber * indoorViewEnabled; -@property(nonatomic, strong, nullable) NSNumber * trafficEnabled; -@property(nonatomic, strong, nullable) NSNumber * buildingsEnabled; -@property(nonatomic, strong, nullable) FGMPlatformMarkerTypeBox * markerType; -@property(nonatomic, copy, nullable) NSString * mapId; -@property(nonatomic, copy, nullable) NSString * style; + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + markerType:(nullable FGMPlatformMarkerTypeBox *)markerType + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style; +@property(nonatomic, strong, nullable) NSNumber *compassEnabled; +@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds *cameraTargetBounds; +@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox *mapType; +@property(nonatomic, strong, nullable) FGMPlatformZoomRange *minMaxZoomPreference; +@property(nonatomic, strong, nullable) NSNumber *rotateGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber *scrollGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber *tiltGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber *trackCameraPosition; +@property(nonatomic, strong, nullable) NSNumber *zoomGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber *myLocationEnabled; +@property(nonatomic, strong, nullable) NSNumber *myLocationButtonEnabled; +@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets *padding; +@property(nonatomic, strong, nullable) NSNumber *indoorViewEnabled; +@property(nonatomic, strong, nullable) NSNumber *trafficEnabled; +@property(nonatomic, strong, nullable) NSNumber *buildingsEnabled; +@property(nonatomic, strong, nullable) FGMPlatformMarkerTypeBox *markerType; +@property(nonatomic, copy, nullable) NSString *mapId; +@property(nonatomic, copy, nullable) NSString *style; @end /// Pigeon representation of an x,y coordinate. @interface FGMPlatformPoint : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithX:(double )x - y:(double )y; -@property(nonatomic, assign) double x; -@property(nonatomic, assign) double y; ++ (instancetype)makeWithX:(double)x y:(double)y; +@property(nonatomic, assign) double x; +@property(nonatomic, assign) double y; @end /// Pigeon representation of a size. @interface FGMPlatformSize : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithWidth:(double )width - height:(double )height; -@property(nonatomic, assign) double width; -@property(nonatomic, assign) double height; ++ (instancetype)makeWithWidth:(double)width height:(double)height; +@property(nonatomic, assign) double width; +@property(nonatomic, assign) double height; @end /// Pigeon equivalent of GMSTileLayer properties. @interface FGMPlatformTileLayer : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithVisible:(BOOL )visible - fadeIn:(BOOL )fadeIn - opacity:(double )opacity - zIndex:(NSInteger )zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) BOOL fadeIn; -@property(nonatomic, assign) double opacity; -@property(nonatomic, assign) NSInteger zIndex; ++ (instancetype)makeWithVisible:(BOOL)visible + fadeIn:(BOOL)fadeIn + opacity:(double)opacity + zIndex:(NSInteger)zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) BOOL fadeIn; +@property(nonatomic, assign) double opacity; +@property(nonatomic, assign) NSInteger zIndex; @end /// Pigeon equivalent of MinMaxZoomPreference. @interface FGMPlatformZoomRange : NSObject -+ (instancetype)makeWithMin:(nullable NSNumber *)min - max:(nullable NSNumber *)max; -@property(nonatomic, strong, nullable) NSNumber * min; -@property(nonatomic, strong, nullable) NSNumber * max; ++ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max; +@property(nonatomic, strong, nullable) NSNumber *min; +@property(nonatomic, strong, nullable) NSNumber *max; @end /// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint @@ -610,7 +599,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @interface FGMPlatformBitmap : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBitmap:(id )bitmap; ++ (instancetype)makeWithBitmap:(id)bitmap; /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. @@ -618,13 +607,13 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// approach allows for the different bitmap implementations to be valid /// argument and return types of the API methods. See /// https://github.com/flutter/flutter/issues/117819. -@property(nonatomic, strong) id bitmap; +@property(nonatomic, strong) id bitmap; @end /// Pigeon equivalent of [DefaultMarker]. @interface FGMPlatformBitmapDefaultMarker : NSObject + (instancetype)makeWithHue:(nullable NSNumber *)hue; -@property(nonatomic, strong, nullable) NSNumber * hue; +@property(nonatomic, strong, nullable) NSNumber *hue; @end /// Pigeon equivalent of [BytesBitmap]. @@ -632,19 +621,18 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - size:(nullable FGMPlatformSize *)size; -@property(nonatomic, strong) FlutterStandardTypedData * byteData; -@property(nonatomic, strong, nullable) FGMPlatformSize * size; + size:(nullable FGMPlatformSize *)size; +@property(nonatomic, strong) FlutterStandardTypedData *byteData; +@property(nonatomic, strong, nullable) FGMPlatformSize *size; @end /// Pigeon equivalent of [AssetBitmap]. @interface FGMPlatformBitmapAsset : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithName:(NSString *)name - pkg:(nullable NSString *)pkg; -@property(nonatomic, copy) NSString * name; -@property(nonatomic, copy, nullable) NSString * pkg; ++ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg; +@property(nonatomic, copy) NSString *name; +@property(nonatomic, copy, nullable) NSString *pkg; @end /// Pigeon equivalent of [AssetImageBitmap]. @@ -652,11 +640,11 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithName:(NSString *)name - scale:(double )scale - size:(nullable FGMPlatformSize *)size; -@property(nonatomic, copy) NSString * name; -@property(nonatomic, assign) double scale; -@property(nonatomic, strong, nullable) FGMPlatformSize * size; + scale:(double)scale + size:(nullable FGMPlatformSize *)size; +@property(nonatomic, copy) NSString *name; +@property(nonatomic, assign) double scale; +@property(nonatomic, strong, nullable) FGMPlatformSize *size; @end /// Pigeon equivalent of [AssetMapBitmap]. @@ -664,15 +652,15 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithAssetName:(NSString *)assetName - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double )imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height; -@property(nonatomic, copy) NSString * assetName; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double)imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height; +@property(nonatomic, copy) NSString *assetName; @property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; -@property(nonatomic, assign) double imagePixelRatio; -@property(nonatomic, strong, nullable) NSNumber * width; -@property(nonatomic, strong, nullable) NSNumber * height; +@property(nonatomic, assign) double imagePixelRatio; +@property(nonatomic, strong, nullable) NSNumber *width; +@property(nonatomic, strong, nullable) NSNumber *height; @end /// Pigeon equivalent of [BytesMapBitmap]. @@ -680,31 +668,31 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double )imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height; -@property(nonatomic, strong) FlutterStandardTypedData * byteData; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double)imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height; +@property(nonatomic, strong) FlutterStandardTypedData *byteData; @property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; -@property(nonatomic, assign) double imagePixelRatio; -@property(nonatomic, strong, nullable) NSNumber * width; -@property(nonatomic, strong, nullable) NSNumber * height; +@property(nonatomic, assign) double imagePixelRatio; +@property(nonatomic, strong, nullable) NSNumber *width; +@property(nonatomic, strong, nullable) NSNumber *height; @end /// Pigeon equivalent of [PinConfig]. @interface FGMPlatformBitmapPinConfig : NSObject + (instancetype)makeWithBackgroundColor:(nullable NSNumber *)backgroundColor - borderColor:(nullable NSNumber *)borderColor - glyphColor:(nullable NSNumber *)glyphColor - glyphTextColor:(nullable NSNumber *)glyphTextColor - glyphText:(nullable NSString *)glyphText - glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap; -@property(nonatomic, strong, nullable) NSNumber * backgroundColor; -@property(nonatomic, strong, nullable) NSNumber * borderColor; -@property(nonatomic, strong, nullable) NSNumber * glyphColor; -@property(nonatomic, strong, nullable) NSNumber * glyphTextColor; -@property(nonatomic, copy, nullable) NSString * glyphText; -@property(nonatomic, strong, nullable) FGMPlatformBitmap * glyphBitmap; + borderColor:(nullable NSNumber *)borderColor + glyphColor:(nullable NSNumber *)glyphColor + glyphTextColor:(nullable NSNumber *)glyphTextColor + glyphText:(nullable NSString *)glyphText + glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap; +@property(nonatomic, strong, nullable) NSNumber *backgroundColor; +@property(nonatomic, strong, nullable) NSNumber *borderColor; +@property(nonatomic, strong, nullable) NSNumber *glyphColor; +@property(nonatomic, strong, nullable) NSNumber *glyphTextColor; +@property(nonatomic, copy, nullable) NSString *glyphText; +@property(nonatomic, strong, nullable) FGMPlatformBitmap *glyphBitmap; @end /// The codec used by all APIs. @@ -720,54 +708,87 @@ NSObject *FGMGetMessagesCodec(void); /// /// Only non-null configuration values will result in updates; options with /// null values will remain unchanged. -- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration + error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of circles on the map. -- (void)updateCirclesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateCirclesByAdding:(NSArray *)toAdd + changing:(NSArray *)toChange + removing:(NSArray *)idsToRemove + error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of heatmaps on the map. -- (void)updateHeatmapsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateHeatmapsByAdding:(NSArray *)toAdd + changing:(NSArray *)toChange + removing:(NSArray *)idsToRemove + error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of custer managers for clusters on the map. -- (void)updateClusterManagersByAdding:(NSArray *)toAdd removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateClusterManagersByAdding:(NSArray *)toAdd + removing:(NSArray *)idsToRemove + error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of markers on the map. -- (void)updateMarkersByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateMarkersByAdding:(NSArray *)toAdd + changing:(NSArray *)toChange + removing:(NSArray *)idsToRemove + error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of polygonss on the map. -- (void)updatePolygonsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updatePolygonsByAdding:(NSArray *)toAdd + changing:(NSArray *)toChange + removing:(NSArray *)idsToRemove + error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of polylines on the map. -- (void)updatePolylinesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updatePolylinesByAdding:(NSArray *)toAdd + changing:(NSArray *)toChange + removing:(NSArray *)idsToRemove + error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of tile overlays on the map. -- (void)updateTileOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateTileOverlaysByAdding:(NSArray *)toAdd + changing:(NSArray *)toChange + removing:(NSArray *)idsToRemove + error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of ground overlays on the map. -- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd + changing:(NSArray *)toChange + removing:(NSArray *)idsToRemove + error:(FlutterError *_Nullable *_Nonnull)error; /// Gets the screen coordinate for the given map location. /// /// @return `nil` only when `error != nil`. -- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng + error:(FlutterError *_Nullable *_Nonnull)error; /// Gets the map location for the given screen coordinate. /// /// @return `nil` only when `error != nil`. -- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate + error:(FlutterError *_Nullable *_Nonnull)error; /// Gets the map region currently displayed on the map. /// /// @return `nil` only when `error != nil`. - (nullable FGMPlatformLatLngBounds *)visibleMapRegion:(FlutterError *_Nullable *_Nonnull)error; /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. -- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate error:(FlutterError *_Nullable *_Nonnull)error; +- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate + error:(FlutterError *_Nullable *_Nonnull)error; /// Moves the camera according to [cameraUpdate], animating the update using a /// duration in milliseconds if provided. -- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate duration:(nullable NSNumber *)durationMilliseconds error:(FlutterError *_Nullable *_Nonnull)error; +- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate + duration:(nullable NSNumber *)durationMilliseconds + error:(FlutterError *_Nullable *_Nonnull)error; /// Gets the current map zoom level. /// /// @return `nil` only when `error != nil`. - (nullable NSNumber *)currentZoomLevel:(FlutterError *_Nullable *_Nonnull)error; /// Show the info window for the marker with the given ID. -- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; +- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId + error:(FlutterError *_Nullable *_Nonnull)error; /// Hide the info window for the marker with the given ID. -- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; +- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns true if the marker with the given ID is currently displaying its /// info window. /// /// @return `nil` only when `error != nil`. -- (nullable NSNumber *)isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSNumber *) + isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId + error:(FlutterError *_Nullable *_Nonnull)error; /// Sets the style to the given map style string, where an empty string /// indicates that the style should be cleared. /// @@ -781,70 +802,97 @@ NSObject *FGMGetMessagesCodec(void); /// is no way to return failures from map initialization. - (nullable NSString *)lastStyleError:(FlutterError *_Nullable *_Nonnull)error; /// Clears the cache of tiles previously requseted from the tile provider. -- (void)clearTileCacheForOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; +- (void)clearTileCacheForOverlayWithIdentifier:(NSString *)tileOverlayId + error:(FlutterError *_Nullable *_Nonnull)error; /// Takes a snapshot of the map and returns its image data. -- (nullable FlutterStandardTypedData *)takeSnapshotWithError:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FlutterStandardTypedData *)takeSnapshotWithError: + (FlutterError *_Nullable *_Nonnull)error; /// Returns true if the map supports advanced markers. /// /// @return `nil` only when `error != nil`. - (nullable NSNumber *)isAdvancedMarkersAvailable:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsApi(id binaryMessenger, NSObject *_Nullable api); - -extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); +extern void SetUpFGMMapsApi(id binaryMessenger, + NSObject *_Nullable api); +extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, + NSObject *_Nullable api, + NSString *messageChannelSuffix); /// Interface for calls from the native SDK to Dart. @interface FGMMapsCallbackApi : NSObject - (instancetype)initWithBinaryMessenger:(id)binaryMessenger; -- (instancetype)initWithBinaryMessenger:(id)binaryMessenger messageChannelSuffix:(nullable NSString *)messageChannelSuffix; +- (instancetype)initWithBinaryMessenger:(id)binaryMessenger + messageChannelSuffix:(nullable NSString *)messageChannelSuffix; /// Called when the map camera starts moving. - (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map camera moves. -- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map camera stops moving. - (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map, not a specifc map object, is tapped. -- (void)didTapAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapAtPosition:(FGMPlatformLatLng *)position + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map, not a specifc map object, is long pressed. -- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker is tapped. -- (void)didTapMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapMarkerWithIdentifier:(NSString *)markerId + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag starts. -- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId + atPosition:(FGMPlatformLatLng *)position + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag updates. -- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didDragMarkerWithIdentifier:(NSString *)markerId + atPosition:(FGMPlatformLatLng *)position + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag ends. -- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId + atPosition:(FGMPlatformLatLng *)position + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker's info window is tapped. -- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a circle is tapped. -- (void)didTapCircleWithIdentifier:(NSString *)circleId completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapCircleWithIdentifier:(NSString *)circleId + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker cluster is tapped. -- (void)didTapCluster:(FGMPlatformCluster *)cluster completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapCluster:(FGMPlatformCluster *)cluster + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a polygon is tapped. -- (void)didTapPolygonWithIdentifier:(NSString *)polygonId completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPolygonWithIdentifier:(NSString *)polygonId + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a polyline is tapped. -- (void)didTapPolylineWithIdentifier:(NSString *)polylineId completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPolylineWithIdentifier:(NSString *)polylineId + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a ground overlay is tapped. -- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId + completion:(void (^)(FlutterError *_Nullable))completion; /// Called to get data for a map tile. -- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId location:(FGMPlatformPoint *)location zoom:(NSInteger)zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion; +- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId + location:(FGMPlatformPoint *)location + zoom:(NSInteger)zoom + completion:(void (^)(FGMPlatformTile *_Nullable, + FlutterError *_Nullable))completion; @end - /// Dummy interface to force generation of the platform view creation params, /// which are not used in any Pigeon calls, only the platform view creation /// call made internally by Flutter. @protocol FGMMapsPlatformViewApi -- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type error:(FlutterError *_Nullable *_Nonnull)error; +- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type + error:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, NSObject *_Nullable api); - -extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); +extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, + NSObject *_Nullable api); +extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, + NSObject *_Nullable api, + NSString *messageChannelSuffix); /// Inspector API only intended for use in integration tests. @protocol FGMMapsInspectorApi @@ -864,19 +912,29 @@ extern void SetUpFGMMapsPlatformViewApiWithSuffix(id bin - (nullable NSNumber *)isMyLocationButtonEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. - (nullable NSNumber *)isTrafficEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformGroundOverlay *)groundOverlayWithIdentifier:(NSString *)groundOverlayId error:(FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId + error: + (FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformGroundOverlay *) + groundOverlayWithIdentifier:(NSString *)groundOverlayId + error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId + error:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. - (nullable FGMPlatformZoomRange *)zoomRange:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. -- (nullable NSArray *)clustersWithIdentifier:(NSString *)clusterManagerId error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSArray *) + clustersWithIdentifier:(NSString *)clusterManagerId + error:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. - (nullable FGMPlatformCameraPosition *)cameraPosition:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsInspectorApi(id binaryMessenger, NSObject *_Nullable api); +extern void SetUpFGMMapsInspectorApi(id binaryMessenger, + NSObject *_Nullable api); -extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); +extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, + NSObject *_Nullable api, + NSString *messageChannelSuffix); NS_ASSUME_NONNULL_END diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m index 9b24e6f4804..129ea09bcc8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m @@ -26,7 +26,12 @@ } static FlutterError *createConnectionError(NSString *channelName) { - return [FlutterError errorWithCode:@"channel-error" message:[NSString stringWithFormat:@"%@/%@/%@", @"Unable to establish connection on channel: '", channelName, @"'."] details:@""]; + return [FlutterError + errorWithCode:@"channel-error" + message:[NSString stringWithFormat:@"%@/%@/%@", + @"Unable to establish connection on channel: '", + channelName, @"'."] + details:@""]; } static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { @@ -339,11 +344,11 @@ + (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray *)list; @end @implementation FGMPlatformCameraPosition -+ (instancetype)makeWithBearing:(double )bearing - target:(FGMPlatformLatLng *)target - tilt:(double )tilt - zoom:(double )zoom { - FGMPlatformCameraPosition* pigeonResult = [[FGMPlatformCameraPosition alloc] init]; ++ (instancetype)makeWithBearing:(double)bearing + target:(FGMPlatformLatLng *)target + tilt:(double)tilt + zoom:(double)zoom { + FGMPlatformCameraPosition *pigeonResult = [[FGMPlatformCameraPosition alloc] init]; pigeonResult.bearing = bearing; pigeonResult.target = target; pigeonResult.tilt = tilt; @@ -372,8 +377,8 @@ + (nullable FGMPlatformCameraPosition *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformCameraUpdate -+ (instancetype)makeWithCameraUpdate:(id )cameraUpdate { - FGMPlatformCameraUpdate* pigeonResult = [[FGMPlatformCameraUpdate alloc] init]; ++ (instancetype)makeWithCameraUpdate:(id)cameraUpdate { + FGMPlatformCameraUpdate *pigeonResult = [[FGMPlatformCameraUpdate alloc] init]; pigeonResult.cameraUpdate = cameraUpdate; return pigeonResult; } @@ -394,12 +399,14 @@ + (nullable FGMPlatformCameraUpdate *)nullableFromList:(NSArray *)list { @implementation FGMPlatformCameraUpdateNewCameraPosition + (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition { - FGMPlatformCameraUpdateNewCameraPosition* pigeonResult = [[FGMPlatformCameraUpdateNewCameraPosition alloc] init]; + FGMPlatformCameraUpdateNewCameraPosition *pigeonResult = + [[FGMPlatformCameraUpdateNewCameraPosition alloc] init]; pigeonResult.cameraPosition = cameraPosition; return pigeonResult; } + (FGMPlatformCameraUpdateNewCameraPosition *)fromList:(NSArray *)list { - FGMPlatformCameraUpdateNewCameraPosition *pigeonResult = [[FGMPlatformCameraUpdateNewCameraPosition alloc] init]; + FGMPlatformCameraUpdateNewCameraPosition *pigeonResult = + [[FGMPlatformCameraUpdateNewCameraPosition alloc] init]; pigeonResult.cameraPosition = GetNullableObjectAtIndex(list, 0); return pigeonResult; } @@ -415,7 +422,7 @@ + (nullable FGMPlatformCameraUpdateNewCameraPosition *)nullableFromList:(NSArray @implementation FGMPlatformCameraUpdateNewLatLng + (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng { - FGMPlatformCameraUpdateNewLatLng* pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init]; + FGMPlatformCameraUpdateNewLatLng *pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init]; pigeonResult.latLng = latLng; return pigeonResult; } @@ -435,15 +442,16 @@ + (nullable FGMPlatformCameraUpdateNewLatLng *)nullableFromList:(NSArray *)l @end @implementation FGMPlatformCameraUpdateNewLatLngBounds -+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds - padding:(double )padding { - FGMPlatformCameraUpdateNewLatLngBounds* pigeonResult = [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init]; ++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding { + FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult = + [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init]; pigeonResult.bounds = bounds; pigeonResult.padding = padding; return pigeonResult; } + (FGMPlatformCameraUpdateNewLatLngBounds *)fromList:(NSArray *)list { - FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult = [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init]; + FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult = + [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init]; pigeonResult.bounds = GetNullableObjectAtIndex(list, 0); pigeonResult.padding = [GetNullableObjectAtIndex(list, 1) doubleValue]; return pigeonResult; @@ -460,15 +468,16 @@ + (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray *)list { - FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult = [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init]; + FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult = + [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init]; pigeonResult.latLng = GetNullableObjectAtIndex(list, 0); pigeonResult.zoom = [GetNullableObjectAtIndex(list, 1) doubleValue]; return pigeonResult; @@ -485,9 +494,8 @@ + (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray @end @implementation FGMPlatformCameraUpdateScrollBy -+ (instancetype)makeWithDx:(double )dx - dy:(double )dy { - FGMPlatformCameraUpdateScrollBy* pigeonResult = [[FGMPlatformCameraUpdateScrollBy alloc] init]; ++ (instancetype)makeWithDx:(double)dx dy:(double)dy { + FGMPlatformCameraUpdateScrollBy *pigeonResult = [[FGMPlatformCameraUpdateScrollBy alloc] init]; pigeonResult.dx = dx; pigeonResult.dy = dy; return pigeonResult; @@ -510,9 +518,8 @@ + (nullable FGMPlatformCameraUpdateScrollBy *)nullableFromList:(NSArray *)li @end @implementation FGMPlatformCameraUpdateZoomBy -+ (instancetype)makeWithAmount:(double )amount - focus:(nullable FGMPlatformPoint *)focus { - FGMPlatformCameraUpdateZoomBy* pigeonResult = [[FGMPlatformCameraUpdateZoomBy alloc] init]; ++ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus { + FGMPlatformCameraUpdateZoomBy *pigeonResult = [[FGMPlatformCameraUpdateZoomBy alloc] init]; pigeonResult.amount = amount; pigeonResult.focus = focus; return pigeonResult; @@ -535,8 +542,8 @@ + (nullable FGMPlatformCameraUpdateZoomBy *)nullableFromList:(NSArray *)list @end @implementation FGMPlatformCameraUpdateZoom -+ (instancetype)makeWithOut:(BOOL )out { - FGMPlatformCameraUpdateZoom* pigeonResult = [[FGMPlatformCameraUpdateZoom alloc] init]; ++ (instancetype)makeWithOut:(BOOL)out { + FGMPlatformCameraUpdateZoom *pigeonResult = [[FGMPlatformCameraUpdateZoom alloc] init]; pigeonResult.out = out; return pigeonResult; } @@ -556,8 +563,8 @@ + (nullable FGMPlatformCameraUpdateZoom *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformCameraUpdateZoomTo -+ (instancetype)makeWithZoom:(double )zoom { - FGMPlatformCameraUpdateZoomTo* pigeonResult = [[FGMPlatformCameraUpdateZoomTo alloc] init]; ++ (instancetype)makeWithZoom:(double)zoom { + FGMPlatformCameraUpdateZoomTo *pigeonResult = [[FGMPlatformCameraUpdateZoomTo alloc] init]; pigeonResult.zoom = zoom; return pigeonResult; } @@ -577,16 +584,16 @@ + (nullable FGMPlatformCameraUpdateZoomTo *)nullableFromList:(NSArray *)list @end @implementation FGMPlatformCircle -+ (instancetype)makeWithConsumeTapEvents:(BOOL )consumeTapEvents - fillColor:(NSInteger )fillColor - strokeColor:(NSInteger )strokeColor - visible:(BOOL )visible - strokeWidth:(NSInteger )strokeWidth - zIndex:(double )zIndex - center:(FGMPlatformLatLng *)center - radius:(double )radius - circleId:(NSString *)circleId { - FGMPlatformCircle* pigeonResult = [[FGMPlatformCircle alloc] init]; ++ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents + fillColor:(NSInteger)fillColor + strokeColor:(NSInteger)strokeColor + visible:(BOOL)visible + strokeWidth:(NSInteger)strokeWidth + zIndex:(double)zIndex + center:(FGMPlatformLatLng *)center + radius:(double)radius + circleId:(NSString *)circleId { + FGMPlatformCircle *pigeonResult = [[FGMPlatformCircle alloc] init]; pigeonResult.consumeTapEvents = consumeTapEvents; pigeonResult.fillColor = fillColor; pigeonResult.strokeColor = strokeColor; @@ -630,8 +637,8 @@ + (nullable FGMPlatformCircle *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformHeatmap -+ (instancetype)makeWithJson:(id )json { - FGMPlatformHeatmap* pigeonResult = [[FGMPlatformHeatmap alloc] init]; ++ (instancetype)makeWithJson:(id)json { + FGMPlatformHeatmap *pigeonResult = [[FGMPlatformHeatmap alloc] init]; pigeonResult.json = json; return pigeonResult; } @@ -652,9 +659,9 @@ + (nullable FGMPlatformHeatmap *)nullableFromList:(NSArray *)list { @implementation FGMPlatformInfoWindow + (instancetype)makeWithTitle:(nullable NSString *)title - snippet:(nullable NSString *)snippet - anchor:(FGMPlatformPoint *)anchor { - FGMPlatformInfoWindow* pigeonResult = [[FGMPlatformInfoWindow alloc] init]; + snippet:(nullable NSString *)snippet + anchor:(FGMPlatformPoint *)anchor { + FGMPlatformInfoWindow *pigeonResult = [[FGMPlatformInfoWindow alloc] init]; pigeonResult.title = title; pigeonResult.snippet = snippet; pigeonResult.anchor = anchor; @@ -681,10 +688,10 @@ + (nullable FGMPlatformInfoWindow *)nullableFromList:(NSArray *)list { @implementation FGMPlatformCluster + (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId - position:(FGMPlatformLatLng *)position - bounds:(FGMPlatformLatLngBounds *)bounds - markerIds:(NSArray *)markerIds { - FGMPlatformCluster* pigeonResult = [[FGMPlatformCluster alloc] init]; + position:(FGMPlatformLatLng *)position + bounds:(FGMPlatformLatLngBounds *)bounds + markerIds:(NSArray *)markerIds { + FGMPlatformCluster *pigeonResult = [[FGMPlatformCluster alloc] init]; pigeonResult.clusterManagerId = clusterManagerId; pigeonResult.position = position; pigeonResult.bounds = bounds; @@ -714,7 +721,7 @@ + (nullable FGMPlatformCluster *)nullableFromList:(NSArray *)list { @implementation FGMPlatformClusterManager + (instancetype)makeWithIdentifier:(NSString *)identifier { - FGMPlatformClusterManager* pigeonResult = [[FGMPlatformClusterManager alloc] init]; + FGMPlatformClusterManager *pigeonResult = [[FGMPlatformClusterManager alloc] init]; pigeonResult.identifier = identifier; return pigeonResult; } @@ -734,21 +741,21 @@ + (nullable FGMPlatformClusterManager *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformMarker -+ (instancetype)makeWithAlpha:(double )alpha - anchor:(FGMPlatformPoint *)anchor - consumeTapEvents:(BOOL )consumeTapEvents - draggable:(BOOL )draggable - flat:(BOOL )flat - icon:(FGMPlatformBitmap *)icon - infoWindow:(FGMPlatformInfoWindow *)infoWindow - position:(FGMPlatformLatLng *)position - rotation:(double )rotation - visible:(BOOL )visible - zIndex:(double )zIndex - markerId:(NSString *)markerId - clusterManagerId:(nullable NSString *)clusterManagerId - collisionBehavior:(nullable FGMMarkerCollisionBehaviorBox *)collisionBehavior { - FGMPlatformMarker* pigeonResult = [[FGMPlatformMarker alloc] init]; ++ (instancetype)makeWithAlpha:(double)alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL)consumeTapEvents + draggable:(BOOL)draggable + flat:(BOOL)flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double)rotation + visible:(BOOL)visible + zIndex:(double)zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId + collisionBehavior:(nullable FGMMarkerCollisionBehaviorBox *)collisionBehavior { + FGMPlatformMarker *pigeonResult = [[FGMPlatformMarker alloc] init]; pigeonResult.alpha = alpha; pigeonResult.anchor = anchor; pigeonResult.consumeTapEvents = consumeTapEvents; @@ -808,16 +815,16 @@ + (nullable FGMPlatformMarker *)nullableFromList:(NSArray *)list { @implementation FGMPlatformPolygon + (instancetype)makeWithPolygonId:(NSString *)polygonId - consumesTapEvents:(BOOL )consumesTapEvents - fillColor:(NSInteger )fillColor - geodesic:(BOOL )geodesic - points:(NSArray *)points - holes:(NSArray *> *)holes - visible:(BOOL )visible - strokeColor:(NSInteger )strokeColor - strokeWidth:(NSInteger )strokeWidth - zIndex:(NSInteger )zIndex { - FGMPlatformPolygon* pigeonResult = [[FGMPlatformPolygon alloc] init]; + consumesTapEvents:(BOOL)consumesTapEvents + fillColor:(NSInteger)fillColor + geodesic:(BOOL)geodesic + points:(NSArray *)points + holes:(NSArray *> *)holes + visible:(BOOL)visible + strokeColor:(NSInteger)strokeColor + strokeWidth:(NSInteger)strokeWidth + zIndex:(NSInteger)zIndex { + FGMPlatformPolygon *pigeonResult = [[FGMPlatformPolygon alloc] init]; pigeonResult.polygonId = polygonId; pigeonResult.consumesTapEvents = consumesTapEvents; pigeonResult.fillColor = fillColor; @@ -865,16 +872,16 @@ + (nullable FGMPlatformPolygon *)nullableFromList:(NSArray *)list { @implementation FGMPlatformPolyline + (instancetype)makeWithPolylineId:(NSString *)polylineId - consumesTapEvents:(BOOL )consumesTapEvents - color:(NSInteger )color - geodesic:(BOOL )geodesic - jointType:(FGMPlatformJointType)jointType - patterns:(NSArray *)patterns - points:(NSArray *)points - visible:(BOOL )visible - width:(NSInteger )width - zIndex:(NSInteger )zIndex { - FGMPlatformPolyline* pigeonResult = [[FGMPlatformPolyline alloc] init]; + consumesTapEvents:(BOOL)consumesTapEvents + color:(NSInteger)color + geodesic:(BOOL)geodesic + jointType:(FGMPlatformJointType)jointType + patterns:(NSArray *)patterns + points:(NSArray *)points + visible:(BOOL)visible + width:(NSInteger)width + zIndex:(NSInteger)zIndex { + FGMPlatformPolyline *pigeonResult = [[FGMPlatformPolyline alloc] init]; pigeonResult.polylineId = polylineId; pigeonResult.consumesTapEvents = consumesTapEvents; pigeonResult.color = color; @@ -922,16 +929,16 @@ + (nullable FGMPlatformPolyline *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformPatternItem -+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type - length:(nullable NSNumber *)length { - FGMPlatformPatternItem* pigeonResult = [[FGMPlatformPatternItem alloc] init]; ++ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length { + FGMPlatformPatternItem *pigeonResult = [[FGMPlatformPatternItem alloc] init]; pigeonResult.type = type; pigeonResult.length = length; return pigeonResult; } + (FGMPlatformPatternItem *)fromList:(NSArray *)list { FGMPlatformPatternItem *pigeonResult = [[FGMPlatformPatternItem alloc] init]; - FGMPlatformPatternItemTypeBox *boxedFGMPlatformPatternItemType = GetNullableObjectAtIndex(list, 0); + FGMPlatformPatternItemTypeBox *boxedFGMPlatformPatternItemType = + GetNullableObjectAtIndex(list, 0); pigeonResult.type = boxedFGMPlatformPatternItemType.value; pigeonResult.length = GetNullableObjectAtIndex(list, 1); return pigeonResult; @@ -948,10 +955,10 @@ + (nullable FGMPlatformPatternItem *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformTile -+ (instancetype)makeWithWidth:(NSInteger )width - height:(NSInteger )height - data:(nullable FlutterStandardTypedData *)data { - FGMPlatformTile* pigeonResult = [[FGMPlatformTile alloc] init]; ++ (instancetype)makeWithWidth:(NSInteger)width + height:(NSInteger)height + data:(nullable FlutterStandardTypedData *)data { + FGMPlatformTile *pigeonResult = [[FGMPlatformTile alloc] init]; pigeonResult.width = width; pigeonResult.height = height; pigeonResult.data = data; @@ -978,12 +985,12 @@ + (nullable FGMPlatformTile *)nullableFromList:(NSArray *)list { @implementation FGMPlatformTileOverlay + (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId - fadeIn:(BOOL )fadeIn - transparency:(double )transparency - zIndex:(NSInteger )zIndex - visible:(BOOL )visible - tileSize:(NSInteger )tileSize { - FGMPlatformTileOverlay* pigeonResult = [[FGMPlatformTileOverlay alloc] init]; + fadeIn:(BOOL)fadeIn + transparency:(double)transparency + zIndex:(NSInteger)zIndex + visible:(BOOL)visible + tileSize:(NSInteger)tileSize { + FGMPlatformTileOverlay *pigeonResult = [[FGMPlatformTileOverlay alloc] init]; pigeonResult.tileOverlayId = tileOverlayId; pigeonResult.fadeIn = fadeIn; pigeonResult.transparency = transparency; @@ -1018,11 +1025,11 @@ + (nullable FGMPlatformTileOverlay *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformEdgeInsets -+ (instancetype)makeWithTop:(double )top - bottom:(double )bottom - left:(double )left - right:(double )right { - FGMPlatformEdgeInsets* pigeonResult = [[FGMPlatformEdgeInsets alloc] init]; ++ (instancetype)makeWithTop:(double)top + bottom:(double)bottom + left:(double)left + right:(double)right { + FGMPlatformEdgeInsets *pigeonResult = [[FGMPlatformEdgeInsets alloc] init]; pigeonResult.top = top; pigeonResult.bottom = bottom; pigeonResult.left = left; @@ -1051,9 +1058,8 @@ + (nullable FGMPlatformEdgeInsets *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformLatLng -+ (instancetype)makeWithLatitude:(double )latitude - longitude:(double )longitude { - FGMPlatformLatLng* pigeonResult = [[FGMPlatformLatLng alloc] init]; ++ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude { + FGMPlatformLatLng *pigeonResult = [[FGMPlatformLatLng alloc] init]; pigeonResult.latitude = latitude; pigeonResult.longitude = longitude; return pigeonResult; @@ -1077,8 +1083,8 @@ + (nullable FGMPlatformLatLng *)nullableFromList:(NSArray *)list { @implementation FGMPlatformLatLngBounds + (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast - southwest:(FGMPlatformLatLng *)southwest { - FGMPlatformLatLngBounds* pigeonResult = [[FGMPlatformLatLngBounds alloc] init]; + southwest:(FGMPlatformLatLng *)southwest { + FGMPlatformLatLngBounds *pigeonResult = [[FGMPlatformLatLngBounds alloc] init]; pigeonResult.northeast = northeast; pigeonResult.southwest = southwest; return pigeonResult; @@ -1102,7 +1108,7 @@ + (nullable FGMPlatformLatLngBounds *)nullableFromList:(NSArray *)list { @implementation FGMPlatformCameraTargetBounds + (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds { - FGMPlatformCameraTargetBounds* pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init]; + FGMPlatformCameraTargetBounds *pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init]; pigeonResult.bounds = bounds; return pigeonResult; } @@ -1123,17 +1129,17 @@ + (nullable FGMPlatformCameraTargetBounds *)nullableFromList:(NSArray *)list @implementation FGMPlatformGroundOverlay + (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId - image:(FGMPlatformBitmap *)image - position:(nullable FGMPlatformLatLng *)position - bounds:(nullable FGMPlatformLatLngBounds *)bounds - anchor:(nullable FGMPlatformPoint *)anchor - transparency:(double )transparency - bearing:(double )bearing - zIndex:(NSInteger )zIndex - visible:(BOOL )visible - clickable:(BOOL )clickable - zoomLevel:(nullable NSNumber *)zoomLevel { - FGMPlatformGroundOverlay* pigeonResult = [[FGMPlatformGroundOverlay alloc] init]; + image:(FGMPlatformBitmap *)image + position:(nullable FGMPlatformLatLng *)position + bounds:(nullable FGMPlatformLatLngBounds *)bounds + anchor:(nullable FGMPlatformPoint *)anchor + transparency:(double)transparency + bearing:(double)bearing + zIndex:(NSInteger)zIndex + visible:(BOOL)visible + clickable:(BOOL)clickable + zoomLevel:(nullable NSNumber *)zoomLevel { + FGMPlatformGroundOverlay *pigeonResult = [[FGMPlatformGroundOverlay alloc] init]; pigeonResult.groundOverlayId = groundOverlayId; pigeonResult.image = image; pigeonResult.position = position; @@ -1183,17 +1189,18 @@ + (nullable FGMPlatformGroundOverlay *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformMapViewCreationParams -+ (instancetype)makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition - mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration - initialCircles:(NSArray *)initialCircles - initialMarkers:(NSArray *)initialMarkers - initialPolygons:(NSArray *)initialPolygons - initialPolylines:(NSArray *)initialPolylines - initialHeatmaps:(NSArray *)initialHeatmaps - initialTileOverlays:(NSArray *)initialTileOverlays - initialClusterManagers:(NSArray *)initialClusterManagers - initialGroundOverlays:(NSArray *)initialGroundOverlays { - FGMPlatformMapViewCreationParams* pigeonResult = [[FGMPlatformMapViewCreationParams alloc] init]; ++ (instancetype) + makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition + mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration + initialCircles:(NSArray *)initialCircles + initialMarkers:(NSArray *)initialMarkers + initialPolygons:(NSArray *)initialPolygons + initialPolylines:(NSArray *)initialPolylines + initialHeatmaps:(NSArray *)initialHeatmaps + initialTileOverlays:(NSArray *)initialTileOverlays + initialClusterManagers:(NSArray *)initialClusterManagers + initialGroundOverlays:(NSArray *)initialGroundOverlays { + FGMPlatformMapViewCreationParams *pigeonResult = [[FGMPlatformMapViewCreationParams alloc] init]; pigeonResult.initialCameraPosition = initialCameraPosition; pigeonResult.mapConfiguration = mapConfiguration; pigeonResult.initialCircles = initialCircles; @@ -1241,24 +1248,24 @@ + (nullable FGMPlatformMapViewCreationParams *)nullableFromList:(NSArray *)l @implementation FGMPlatformMapConfiguration + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - markerType:(nullable FGMPlatformMarkerTypeBox *)markerType - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style { - FGMPlatformMapConfiguration* pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + markerType:(nullable FGMPlatformMarkerTypeBox *)markerType + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style { + FGMPlatformMapConfiguration *pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; pigeonResult.compassEnabled = compassEnabled; pigeonResult.cameraTargetBounds = cameraTargetBounds; pigeonResult.mapType = mapType; @@ -1329,9 +1336,8 @@ + (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformPoint -+ (instancetype)makeWithX:(double )x - y:(double )y { - FGMPlatformPoint* pigeonResult = [[FGMPlatformPoint alloc] init]; ++ (instancetype)makeWithX:(double)x y:(double)y { + FGMPlatformPoint *pigeonResult = [[FGMPlatformPoint alloc] init]; pigeonResult.x = x; pigeonResult.y = y; return pigeonResult; @@ -1354,9 +1360,8 @@ + (nullable FGMPlatformPoint *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformSize -+ (instancetype)makeWithWidth:(double )width - height:(double )height { - FGMPlatformSize* pigeonResult = [[FGMPlatformSize alloc] init]; ++ (instancetype)makeWithWidth:(double)width height:(double)height { + FGMPlatformSize *pigeonResult = [[FGMPlatformSize alloc] init]; pigeonResult.width = width; pigeonResult.height = height; return pigeonResult; @@ -1379,11 +1384,11 @@ + (nullable FGMPlatformSize *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformTileLayer -+ (instancetype)makeWithVisible:(BOOL )visible - fadeIn:(BOOL )fadeIn - opacity:(double )opacity - zIndex:(NSInteger )zIndex { - FGMPlatformTileLayer* pigeonResult = [[FGMPlatformTileLayer alloc] init]; ++ (instancetype)makeWithVisible:(BOOL)visible + fadeIn:(BOOL)fadeIn + opacity:(double)opacity + zIndex:(NSInteger)zIndex { + FGMPlatformTileLayer *pigeonResult = [[FGMPlatformTileLayer alloc] init]; pigeonResult.visible = visible; pigeonResult.fadeIn = fadeIn; pigeonResult.opacity = opacity; @@ -1412,9 +1417,8 @@ + (nullable FGMPlatformTileLayer *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformZoomRange -+ (instancetype)makeWithMin:(nullable NSNumber *)min - max:(nullable NSNumber *)max { - FGMPlatformZoomRange* pigeonResult = [[FGMPlatformZoomRange alloc] init]; ++ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max { + FGMPlatformZoomRange *pigeonResult = [[FGMPlatformZoomRange alloc] init]; pigeonResult.min = min; pigeonResult.max = max; return pigeonResult; @@ -1437,8 +1441,8 @@ + (nullable FGMPlatformZoomRange *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformBitmap -+ (instancetype)makeWithBitmap:(id )bitmap { - FGMPlatformBitmap* pigeonResult = [[FGMPlatformBitmap alloc] init]; ++ (instancetype)makeWithBitmap:(id)bitmap { + FGMPlatformBitmap *pigeonResult = [[FGMPlatformBitmap alloc] init]; pigeonResult.bitmap = bitmap; return pigeonResult; } @@ -1459,7 +1463,7 @@ + (nullable FGMPlatformBitmap *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapDefaultMarker + (instancetype)makeWithHue:(nullable NSNumber *)hue { - FGMPlatformBitmapDefaultMarker* pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init]; + FGMPlatformBitmapDefaultMarker *pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init]; pigeonResult.hue = hue; return pigeonResult; } @@ -1480,8 +1484,8 @@ + (nullable FGMPlatformBitmapDefaultMarker *)nullableFromList:(NSArray *)lis @implementation FGMPlatformBitmapBytes + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - size:(nullable FGMPlatformSize *)size { - FGMPlatformBitmapBytes* pigeonResult = [[FGMPlatformBitmapBytes alloc] init]; + size:(nullable FGMPlatformSize *)size { + FGMPlatformBitmapBytes *pigeonResult = [[FGMPlatformBitmapBytes alloc] init]; pigeonResult.byteData = byteData; pigeonResult.size = size; return pigeonResult; @@ -1504,9 +1508,8 @@ + (nullable FGMPlatformBitmapBytes *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformBitmapAsset -+ (instancetype)makeWithName:(NSString *)name - pkg:(nullable NSString *)pkg { - FGMPlatformBitmapAsset* pigeonResult = [[FGMPlatformBitmapAsset alloc] init]; ++ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg { + FGMPlatformBitmapAsset *pigeonResult = [[FGMPlatformBitmapAsset alloc] init]; pigeonResult.name = name; pigeonResult.pkg = pkg; return pigeonResult; @@ -1530,9 +1533,9 @@ + (nullable FGMPlatformBitmapAsset *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapAssetImage + (instancetype)makeWithName:(NSString *)name - scale:(double )scale - size:(nullable FGMPlatformSize *)size { - FGMPlatformBitmapAssetImage* pigeonResult = [[FGMPlatformBitmapAssetImage alloc] init]; + scale:(double)scale + size:(nullable FGMPlatformSize *)size { + FGMPlatformBitmapAssetImage *pigeonResult = [[FGMPlatformBitmapAssetImage alloc] init]; pigeonResult.name = name; pigeonResult.scale = scale; pigeonResult.size = size; @@ -1559,11 +1562,11 @@ + (nullable FGMPlatformBitmapAssetImage *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapAssetMap + (instancetype)makeWithAssetName:(NSString *)assetName - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double )imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height { - FGMPlatformBitmapAssetMap* pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init]; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double)imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height { + FGMPlatformBitmapAssetMap *pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init]; pigeonResult.assetName = assetName; pigeonResult.bitmapScaling = bitmapScaling; pigeonResult.imagePixelRatio = imagePixelRatio; @@ -1574,7 +1577,8 @@ + (instancetype)makeWithAssetName:(NSString *)assetName + (FGMPlatformBitmapAssetMap *)fromList:(NSArray *)list { FGMPlatformBitmapAssetMap *pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init]; pigeonResult.assetName = GetNullableObjectAtIndex(list, 0); - FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling = GetNullableObjectAtIndex(list, 1); + FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling = + GetNullableObjectAtIndex(list, 1); pigeonResult.bitmapScaling = boxedFGMPlatformMapBitmapScaling.value; pigeonResult.imagePixelRatio = [GetNullableObjectAtIndex(list, 2) doubleValue]; pigeonResult.width = GetNullableObjectAtIndex(list, 3); @@ -1597,11 +1601,11 @@ + (nullable FGMPlatformBitmapAssetMap *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapBytesMap + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double )imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height { - FGMPlatformBitmapBytesMap* pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init]; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double)imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height { + FGMPlatformBitmapBytesMap *pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init]; pigeonResult.byteData = byteData; pigeonResult.bitmapScaling = bitmapScaling; pigeonResult.imagePixelRatio = imagePixelRatio; @@ -1612,7 +1616,8 @@ + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData + (FGMPlatformBitmapBytesMap *)fromList:(NSArray *)list { FGMPlatformBitmapBytesMap *pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init]; pigeonResult.byteData = GetNullableObjectAtIndex(list, 0); - FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling = GetNullableObjectAtIndex(list, 1); + FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling = + GetNullableObjectAtIndex(list, 1); pigeonResult.bitmapScaling = boxedFGMPlatformMapBitmapScaling.value; pigeonResult.imagePixelRatio = [GetNullableObjectAtIndex(list, 2) doubleValue]; pigeonResult.width = GetNullableObjectAtIndex(list, 3); @@ -1635,12 +1640,12 @@ + (nullable FGMPlatformBitmapBytesMap *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapPinConfig + (instancetype)makeWithBackgroundColor:(nullable NSNumber *)backgroundColor - borderColor:(nullable NSNumber *)borderColor - glyphColor:(nullable NSNumber *)glyphColor - glyphTextColor:(nullable NSNumber *)glyphTextColor - glyphText:(nullable NSString *)glyphText - glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap { - FGMPlatformBitmapPinConfig* pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init]; + borderColor:(nullable NSNumber *)borderColor + glyphColor:(nullable NSNumber *)glyphColor + glyphTextColor:(nullable NSNumber *)glyphTextColor + glyphText:(nullable NSString *)glyphText + glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap { + FGMPlatformBitmapPinConfig *pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init]; pigeonResult.backgroundColor = backgroundColor; pigeonResult.borderColor = borderColor; pigeonResult.glyphColor = glyphColor; @@ -1681,107 +1686,119 @@ - (nullable id)readValueOfType:(UInt8)type { switch (type) { case 129: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil : [[FGMPlatformMapTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil + ? nil + : [[FGMPlatformMapTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 130: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil : [[FGMMarkerCollisionBehaviorBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil + : [[FGMMarkerCollisionBehaviorBox alloc] + initWithValue:[enumAsNumber integerValue]]; } case 131: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil + ? nil + : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 132: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil : [[FGMPlatformPatternItemTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil + : [[FGMPlatformPatternItemTypeBox alloc] + initWithValue:[enumAsNumber integerValue]]; } case 133: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil : [[FGMPlatformMarkerTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil + ? nil + : [[FGMPlatformMarkerTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 134: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil : [[FGMPlatformMapBitmapScalingBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil + : [[FGMPlatformMapBitmapScalingBox alloc] + initWithValue:[enumAsNumber integerValue]]; } - case 135: + case 135: return [FGMPlatformCameraPosition fromList:[self readValue]]; - case 136: + case 136: return [FGMPlatformCameraUpdate fromList:[self readValue]]; - case 137: + case 137: return [FGMPlatformCameraUpdateNewCameraPosition fromList:[self readValue]]; - case 138: + case 138: return [FGMPlatformCameraUpdateNewLatLng fromList:[self readValue]]; - case 139: + case 139: return [FGMPlatformCameraUpdateNewLatLngBounds fromList:[self readValue]]; - case 140: + case 140: return [FGMPlatformCameraUpdateNewLatLngZoom fromList:[self readValue]]; - case 141: + case 141: return [FGMPlatformCameraUpdateScrollBy fromList:[self readValue]]; - case 142: + case 142: return [FGMPlatformCameraUpdateZoomBy fromList:[self readValue]]; - case 143: + case 143: return [FGMPlatformCameraUpdateZoom fromList:[self readValue]]; - case 144: + case 144: return [FGMPlatformCameraUpdateZoomTo fromList:[self readValue]]; - case 145: + case 145: return [FGMPlatformCircle fromList:[self readValue]]; - case 146: + case 146: return [FGMPlatformHeatmap fromList:[self readValue]]; - case 147: + case 147: return [FGMPlatformInfoWindow fromList:[self readValue]]; - case 148: + case 148: return [FGMPlatformCluster fromList:[self readValue]]; - case 149: + case 149: return [FGMPlatformClusterManager fromList:[self readValue]]; - case 150: + case 150: return [FGMPlatformMarker fromList:[self readValue]]; - case 151: + case 151: return [FGMPlatformPolygon fromList:[self readValue]]; - case 152: + case 152: return [FGMPlatformPolyline fromList:[self readValue]]; - case 153: + case 153: return [FGMPlatformPatternItem fromList:[self readValue]]; - case 154: + case 154: return [FGMPlatformTile fromList:[self readValue]]; - case 155: + case 155: return [FGMPlatformTileOverlay fromList:[self readValue]]; - case 156: + case 156: return [FGMPlatformEdgeInsets fromList:[self readValue]]; - case 157: + case 157: return [FGMPlatformLatLng fromList:[self readValue]]; - case 158: + case 158: return [FGMPlatformLatLngBounds fromList:[self readValue]]; - case 159: + case 159: return [FGMPlatformCameraTargetBounds fromList:[self readValue]]; - case 160: + case 160: return [FGMPlatformGroundOverlay fromList:[self readValue]]; - case 161: + case 161: return [FGMPlatformMapViewCreationParams fromList:[self readValue]]; - case 162: + case 162: return [FGMPlatformMapConfiguration fromList:[self readValue]]; - case 163: + case 163: return [FGMPlatformPoint fromList:[self readValue]]; - case 164: + case 164: return [FGMPlatformSize fromList:[self readValue]]; - case 165: + case 165: return [FGMPlatformTileLayer fromList:[self readValue]]; - case 166: + case 166: return [FGMPlatformZoomRange fromList:[self readValue]]; - case 167: + case 167: return [FGMPlatformBitmap fromList:[self readValue]]; - case 168: + case 168: return [FGMPlatformBitmapDefaultMarker fromList:[self readValue]]; - case 169: + case 169: return [FGMPlatformBitmapBytes fromList:[self readValue]]; - case 170: + case 170: return [FGMPlatformBitmapAsset fromList:[self readValue]]; - case 171: + case 171: return [FGMPlatformBitmapAssetImage fromList:[self readValue]]; - case 172: + case 172: return [FGMPlatformBitmapAssetMap fromList:[self readValue]]; - case 173: + case 173: return [FGMPlatformBitmapBytesMap fromList:[self readValue]]; - case 174: + case 174: return [FGMPlatformBitmapPinConfig fromList:[self readValue]]; default: return [super readValueOfType:type]; @@ -1958,7 +1975,8 @@ - (FlutterStandardReader *)readerWithData:(NSData *)data { static FlutterStandardMessageCodec *sSharedObject = nil; static dispatch_once_t sPred = 0; dispatch_once(&sPred, ^{ - FGMMessagesPigeonCodecReaderWriter *readerWriter = [[FGMMessagesPigeonCodecReaderWriter alloc] init]; + FGMMessagesPigeonCodecReaderWriter *readerWriter = + [[FGMMessagesPigeonCodecReaderWriter alloc] init]; sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter]; }); return sSharedObject; @@ -1967,17 +1985,24 @@ void SetUpFGMMapsApi(id binaryMessenger, NSObject binaryMessenger, NSObject *api, NSString *messageChannelSuffix) { - messageChannelSuffix = messageChannelSuffix.length > 0 ? [NSString stringWithFormat: @".%@", messageChannelSuffix] : @""; +void SetUpFGMMapsApiWithSuffix(id binaryMessenger, + NSObject *api, NSString *messageChannelSuffix) { + messageChannelSuffix = messageChannelSuffix.length > 0 + ? [NSString stringWithFormat:@".%@", messageChannelSuffix] + : @""; /// Returns once the map instance is available. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString + stringWithFormat: + @"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(waitForMapWithError:)], @"FGMMapsApi api (%@) doesn't respond to @selector(waitForMapWithError:)", api); + NSCAssert([api respondsToSelector:@selector(waitForMapWithError:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(waitForMapWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; [api waitForMapWithError:&error]; @@ -1992,13 +2017,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj /// Only non-null configuration values will result in updates; options with /// null values will remain unchanged. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.updateMapConfiguration", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateWithMapConfiguration:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateWithMapConfiguration:error:)", api); + NSCAssert( + [api respondsToSelector:@selector(updateWithMapConfiguration:error:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(updateWithMapConfiguration:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformMapConfiguration *arg_configuration = GetNullableObjectAtIndex(args, 0); @@ -2012,20 +2042,29 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Updates the set of circles on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString + stringWithFormat: + @"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateCirclesByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateCirclesByAdding:changing:removing:error:)", api); + NSCAssert([api respondsToSelector:@selector(updateCirclesByAdding:changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateCirclesByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateCirclesByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; + [api updateCirclesByAdding:arg_toAdd + changing:arg_toChange + removing:arg_idsToRemove + error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2034,20 +2073,28 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Updates the set of heatmaps on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.updateHeatmaps", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateHeatmapsByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateHeatmapsByAdding:changing:removing:error:)", api); + NSCAssert([api respondsToSelector:@selector(updateHeatmapsByAdding:changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateHeatmapsByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateHeatmapsByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; + [api updateHeatmapsByAdding:arg_toAdd + changing:arg_toChange + removing:arg_idsToRemove + error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2056,13 +2103,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Updates the set of custer managers for clusters on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.updateClusterManagers", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateClusterManagersByAdding:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateClusterManagersByAdding:removing:error:)", api); + NSCAssert([api respondsToSelector:@selector(updateClusterManagersByAdding:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateClusterManagersByAdding:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); @@ -2077,20 +2129,29 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Updates the set of markers on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString + stringWithFormat: + @"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateMarkersByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateMarkersByAdding:changing:removing:error:)", api); + NSCAssert([api respondsToSelector:@selector(updateMarkersByAdding:changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateMarkersByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateMarkersByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; + [api updateMarkersByAdding:arg_toAdd + changing:arg_toChange + removing:arg_idsToRemove + error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2099,20 +2160,28 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Updates the set of polygonss on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.updatePolygons", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updatePolygonsByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updatePolygonsByAdding:changing:removing:error:)", api); + NSCAssert([api respondsToSelector:@selector(updatePolygonsByAdding:changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updatePolygonsByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updatePolygonsByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; + [api updatePolygonsByAdding:arg_toAdd + changing:arg_toChange + removing:arg_idsToRemove + error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2121,20 +2190,29 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Updates the set of polylines on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.updatePolylines", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updatePolylinesByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updatePolylinesByAdding:changing:removing:error:)", api); + NSCAssert([api respondsToSelector:@selector(updatePolylinesByAdding: + changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updatePolylinesByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updatePolylinesByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; + [api updatePolylinesByAdding:arg_toAdd + changing:arg_toChange + removing:arg_idsToRemove + error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2143,20 +2221,29 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Updates the set of tile overlays on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.updateTileOverlays", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateTileOverlaysByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateTileOverlaysByAdding:changing:removing:error:)", api); + NSCAssert([api respondsToSelector:@selector(updateTileOverlaysByAdding: + changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateTileOverlaysByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateTileOverlaysByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; + [api updateTileOverlaysByAdding:arg_toAdd + changing:arg_toChange + removing:arg_idsToRemove + error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2165,20 +2252,29 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Updates the set of ground overlays on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.updateGroundOverlays", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateGroundOverlaysByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateGroundOverlaysByAdding:changing:removing:error:)", api); + NSCAssert([api respondsToSelector:@selector(updateGroundOverlaysByAdding: + changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateGroundOverlaysByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateGroundOverlaysByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; + [api updateGroundOverlaysByAdding:arg_toAdd + changing:arg_toChange + removing:arg_idsToRemove + error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2187,13 +2283,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Gets the screen coordinate for the given map location. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.getScreenCoordinate", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(screenCoordinatesForLatLng:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(screenCoordinatesForLatLng:error:)", api); + NSCAssert( + [api respondsToSelector:@selector(screenCoordinatesForLatLng:error:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(screenCoordinatesForLatLng:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformLatLng *arg_latLng = GetNullableObjectAtIndex(args, 0); @@ -2207,18 +2308,25 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Gets the map location for the given screen coordinate. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName: + [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(latLngForScreenCoordinate:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(latLngForScreenCoordinate:error:)", api); + NSCAssert( + [api respondsToSelector:@selector(latLngForScreenCoordinate:error:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(latLngForScreenCoordinate:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformPoint *arg_screenCoordinate = GetNullableObjectAtIndex(args, 0); FlutterError *error; - FGMPlatformLatLng *output = [api latLngForScreenCoordinate:arg_screenCoordinate error:&error]; + FGMPlatformLatLng *output = [api latLngForScreenCoordinate:arg_screenCoordinate + error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -2227,13 +2335,16 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Gets the map region currently displayed on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.getVisibleRegion", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(visibleMapRegion:)], @"FGMMapsApi api (%@) doesn't respond to @selector(visibleMapRegion:)", api); + NSCAssert([api respondsToSelector:@selector(visibleMapRegion:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(visibleMapRegion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; FGMPlatformLatLngBounds *output = [api visibleMapRegion:&error]; @@ -2246,13 +2357,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString + stringWithFormat: + @"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(moveCameraWithUpdate:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(moveCameraWithUpdate:error:)", api); + NSCAssert([api respondsToSelector:@selector(moveCameraWithUpdate:error:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(moveCameraWithUpdate:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformCameraUpdate *arg_cameraUpdate = GetNullableObjectAtIndex(args, 0); @@ -2267,19 +2383,27 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj /// Moves the camera according to [cameraUpdate], animating the update using a /// duration in milliseconds if provided. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString + stringWithFormat: + @"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(animateCameraWithUpdate:duration:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(animateCameraWithUpdate:duration:error:)", api); + NSCAssert([api respondsToSelector:@selector(animateCameraWithUpdate:duration:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(animateCameraWithUpdate:duration:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformCameraUpdate *arg_cameraUpdate = GetNullableObjectAtIndex(args, 0); NSNumber *arg_durationMilliseconds = GetNullableObjectAtIndex(args, 1); FlutterError *error; - [api animateCameraWithUpdate:arg_cameraUpdate duration:arg_durationMilliseconds error:&error]; + [api animateCameraWithUpdate:arg_cameraUpdate + duration:arg_durationMilliseconds + error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2288,13 +2412,17 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Gets the current map zoom level. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString + stringWithFormat: + @"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(currentZoomLevel:)], @"FGMMapsApi api (%@) doesn't respond to @selector(currentZoomLevel:)", api); + NSCAssert([api respondsToSelector:@selector(currentZoomLevel:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(currentZoomLevel:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api currentZoomLevel:&error]; @@ -2306,13 +2434,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Show the info window for the marker with the given ID. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.showInfoWindow", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(showInfoWindowForMarkerWithIdentifier:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(showInfoWindowForMarkerWithIdentifier:error:)", api); + NSCAssert([api respondsToSelector:@selector(showInfoWindowForMarkerWithIdentifier:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(showInfoWindowForMarkerWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_markerId = GetNullableObjectAtIndex(args, 0); @@ -2326,13 +2459,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Hide the info window for the marker with the given ID. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.hideInfoWindow", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(hideInfoWindowForMarkerWithIdentifier:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(hideInfoWindowForMarkerWithIdentifier:error:)", api); + NSCAssert([api respondsToSelector:@selector(hideInfoWindowForMarkerWithIdentifier:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(hideInfoWindowForMarkerWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_markerId = GetNullableObjectAtIndex(args, 0); @@ -2347,18 +2485,25 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj /// Returns true if the marker with the given ID is currently displaying its /// info window. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.isInfoWindowShown", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(isShowingInfoWindowForMarkerWithIdentifier:error:)", api); + NSCAssert([api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier: + error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_markerId = GetNullableObjectAtIndex(args, 0); FlutterError *error; - NSNumber *output = [api isShowingInfoWindowForMarkerWithIdentifier:arg_markerId error:&error]; + NSNumber *output = [api isShowingInfoWindowForMarkerWithIdentifier:arg_markerId + error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -2371,13 +2516,17 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj /// If there was an error setting the style, such as an invalid style string, /// returns the error message. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName: + [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(setStyle:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(setStyle:error:)", api); + NSCAssert([api respondsToSelector:@selector(setStyle:error:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(setStyle:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_style = GetNullableObjectAtIndex(args, 0); @@ -2395,13 +2544,16 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj /// This allows checking asynchronously for initial style failures, as there /// is no way to return failures from map initialization. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.getLastStyleError", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(lastStyleError:)], @"FGMMapsApi api (%@) doesn't respond to @selector(lastStyleError:)", api); + NSCAssert([api respondsToSelector:@selector(lastStyleError:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(lastStyleError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSString *output = [api lastStyleError:&error]; @@ -2413,13 +2565,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Clears the cache of tiles previously requseted from the tile provider. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.clearTileCache", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(clearTileCacheForOverlayWithIdentifier:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(clearTileCacheForOverlayWithIdentifier:error:)", api); + NSCAssert([api respondsToSelector:@selector(clearTileCacheForOverlayWithIdentifier:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(clearTileCacheForOverlayWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_tileOverlayId = GetNullableObjectAtIndex(args, 0); @@ -2433,13 +2590,17 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Takes a snapshot of the map and returns its image data. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString + stringWithFormat: + @"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(takeSnapshotWithError:)], @"FGMMapsApi api (%@) doesn't respond to @selector(takeSnapshotWithError:)", api); + NSCAssert([api respondsToSelector:@selector(takeSnapshotWithError:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(takeSnapshotWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; FlutterStandardTypedData *output = [api takeSnapshotWithError:&error]; @@ -2451,13 +2612,17 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Returns true if the map supports advanced markers. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.isAdvancedMarkersAvailable", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isAdvancedMarkersAvailable:)], @"FGMMapsApi api (%@) doesn't respond to @selector(isAdvancedMarkersAvailable:)", api); + NSCAssert([api respondsToSelector:@selector(isAdvancedMarkersAvailable:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(isAdvancedMarkersAvailable:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isAdvancedMarkersAvailable:&error]; @@ -2478,335 +2643,450 @@ @implementation FGMMapsCallbackApi - (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger { return [self initWithBinaryMessenger:binaryMessenger messageChannelSuffix:@""]; } -- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger messageChannelSuffix:(nullable NSString*)messageChannelSuffix{ +- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger + messageChannelSuffix:(nullable NSString *)messageChannelSuffix { self = [self init]; if (self) { _binaryMessenger = binaryMessenger; - _messageChannelSuffix = [messageChannelSuffix length] == 0 ? @"" : [NSString stringWithFormat: @".%@", messageChannelSuffix]; + _messageChannelSuffix = [messageChannelSuffix length] == 0 + ? @"" + : [NSString stringWithFormat:@".%@", messageChannelSuffix]; } return self; } - (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted", _messageChannelSuffix]; + NSString *channelName = [NSString + stringWithFormat: + @"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted", + _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:nil reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)arg_cameraPosition completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove", _messageChannelSuffix]; + [FlutterBasicMessageChannel messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:nil + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)arg_cameraPosition + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove", + _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[arg_cameraPosition ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; + [FlutterBasicMessageChannel messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[ arg_cameraPosition ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; } - (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle", _messageChannelSuffix]; + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle", + _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:nil reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapAtPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap", _messageChannelSuffix]; + [FlutterBasicMessageChannel messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:nil + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapAtPosition:(FGMPlatformLatLng *)arg_position + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap", + _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[arg_position ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didLongPressAtPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress", _messageChannelSuffix]; + [FlutterBasicMessageChannel messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[ arg_position ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didLongPressAtPosition:(FGMPlatformLatLng *)arg_position + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress", + _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[arg_position ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapMarkerWithIdentifier:(NSString *)arg_markerId completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap", _messageChannelSuffix]; + [FlutterBasicMessageChannel messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[ arg_position ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapMarkerWithIdentifier:(NSString *)arg_markerId + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap", + _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[arg_markerId ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didStartDragForMarkerWithIdentifier:(NSString *)arg_markerId atPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart", _messageChannelSuffix]; + [FlutterBasicMessageChannel messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[ arg_markerId ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didStartDragForMarkerWithIdentifier:(NSString *)arg_markerId + atPosition:(FGMPlatformLatLng *)arg_position + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat: + @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart", + _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[arg_markerId ?: [NSNull null], arg_position ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didDragMarkerWithIdentifier:(NSString *)arg_markerId atPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag", _messageChannelSuffix]; + [FlutterBasicMessageChannel messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didDragMarkerWithIdentifier:(NSString *)arg_markerId + atPosition:(FGMPlatformLatLng *)arg_position + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag", + _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[arg_markerId ?: [NSNull null], arg_position ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didEndDragForMarkerWithIdentifier:(NSString *)arg_markerId atPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd", _messageChannelSuffix]; + [FlutterBasicMessageChannel messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didEndDragForMarkerWithIdentifier:(NSString *)arg_markerId + atPosition:(FGMPlatformLatLng *)arg_position + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat: + @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd", + _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[arg_markerId ?: [NSNull null], arg_position ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)arg_markerId completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap", _messageChannelSuffix]; + [FlutterBasicMessageChannel messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)arg_markerId + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat: + @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap", + _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[arg_markerId ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapCircleWithIdentifier:(NSString *)arg_circleId completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap", _messageChannelSuffix]; + [FlutterBasicMessageChannel messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[ arg_markerId ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapCircleWithIdentifier:(NSString *)arg_circleId + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap", + _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[arg_circleId ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapCluster:(FGMPlatformCluster *)arg_cluster completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap", _messageChannelSuffix]; + [FlutterBasicMessageChannel messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[ arg_circleId ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapCluster:(FGMPlatformCluster *)arg_cluster + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap", + _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[arg_cluster ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapPolygonWithIdentifier:(NSString *)arg_polygonId completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap", _messageChannelSuffix]; + [FlutterBasicMessageChannel messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[ arg_cluster ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapPolygonWithIdentifier:(NSString *)arg_polygonId + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap", + _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[arg_polygonId ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapPolylineWithIdentifier:(NSString *)arg_polylineId completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap", _messageChannelSuffix]; + [FlutterBasicMessageChannel messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[ arg_polygonId ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapPolylineWithIdentifier:(NSString *)arg_polylineId + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap", + _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[arg_polylineId ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapGroundOverlayWithIdentifier:(NSString *)arg_groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap", _messageChannelSuffix]; + [FlutterBasicMessageChannel messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[ arg_polylineId ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapGroundOverlayWithIdentifier:(NSString *)arg_groundOverlayId + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat: + @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap", + _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[arg_groundOverlayId ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId location:(FGMPlatformPoint *)arg_location zoom:(NSInteger)arg_zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile", _messageChannelSuffix]; + [FlutterBasicMessageChannel messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[ arg_groundOverlayId ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId + location:(FGMPlatformPoint *)arg_location + zoom:(NSInteger)arg_zoom + completion:(void (^)(FGMPlatformTile *_Nullable, + FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat: + @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile", + _messageChannelSuffix]; FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetMessagesCodec()]; - [channel sendMessage:@[arg_tileOverlayId ?: [NSNull null], arg_location ?: [NSNull null], @(arg_zoom)] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion(nil, [FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - FGMPlatformTile *output = reply[0] == [NSNull null] ? nil : reply[0]; - completion(output, nil); - } - } else { - completion(nil, createConnectionError(channelName)); - } - }]; -} -@end - -void SetUpFGMMapsPlatformViewApi(id binaryMessenger, NSObject *api) { + [FlutterBasicMessageChannel messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetMessagesCodec()]; + [channel sendMessage:@[ + arg_tileOverlayId ?: [NSNull null], arg_location ?: [NSNull null], @(arg_zoom) + ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion(nil, [FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + FGMPlatformTile *output = reply[0] == [NSNull null] ? nil : reply[0]; + completion(output, nil); + } + } else { + completion(nil, createConnectionError(channelName)); + } + }]; +} +@end + +void SetUpFGMMapsPlatformViewApi(id binaryMessenger, + NSObject *api) { SetUpFGMMapsPlatformViewApiWithSuffix(binaryMessenger, api, @""); } -void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, NSObject *api, NSString *messageChannelSuffix) { - messageChannelSuffix = messageChannelSuffix.length > 0 ? [NSString stringWithFormat: @".%@", messageChannelSuffix] : @""; +void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, + NSObject *api, + NSString *messageChannelSuffix) { + messageChannelSuffix = messageChannelSuffix.length > 0 + ? [NSString stringWithFormat:@".%@", messageChannelSuffix] + : @""; { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsPlatformViewApi.createView", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(createViewType:error:)], @"FGMMapsPlatformViewApi api (%@) doesn't respond to @selector(createViewType:error:)", api); + NSCAssert( + [api respondsToSelector:@selector(createViewType:error:)], + @"FGMMapsPlatformViewApi api (%@) doesn't respond to @selector(createViewType:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformMapViewCreationParams *arg_type = GetNullableObjectAtIndex(args, 0); @@ -2819,20 +3099,30 @@ void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMess } } } -void SetUpFGMMapsInspectorApi(id binaryMessenger, NSObject *api) { +void SetUpFGMMapsInspectorApi(id binaryMessenger, + NSObject *api) { SetUpFGMMapsInspectorApiWithSuffix(binaryMessenger, api, @""); } -void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, NSObject *api, NSString *messageChannelSuffix) { - messageChannelSuffix = messageChannelSuffix.length > 0 ? [NSString stringWithFormat: @".%@", messageChannelSuffix] : @""; +void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, + NSObject *api, + NSString *messageChannelSuffix) { + messageChannelSuffix = messageChannelSuffix.length > 0 + ? [NSString stringWithFormat:@".%@", messageChannelSuffix] + : @""; { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.areBuildingsEnabled", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areBuildingsEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areBuildingsEnabledWithError:)", api); + NSCAssert([api respondsToSelector:@selector(areBuildingsEnabledWithError:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(areBuildingsEnabledWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areBuildingsEnabledWithError:&error]; @@ -2843,13 +3133,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.areRotateGesturesEnabled", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areRotateGesturesEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areRotateGesturesEnabledWithError:)", api); + NSCAssert([api respondsToSelector:@selector(areRotateGesturesEnabledWithError:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(areRotateGesturesEnabledWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areRotateGesturesEnabledWithError:&error]; @@ -2860,13 +3155,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.areScrollGesturesEnabled", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areScrollGesturesEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areScrollGesturesEnabledWithError:)", api); + NSCAssert([api respondsToSelector:@selector(areScrollGesturesEnabledWithError:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(areScrollGesturesEnabledWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areScrollGesturesEnabledWithError:&error]; @@ -2877,13 +3177,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.areTiltGesturesEnabled", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areTiltGesturesEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areTiltGesturesEnabledWithError:)", api); + NSCAssert([api respondsToSelector:@selector(areTiltGesturesEnabledWithError:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(areTiltGesturesEnabledWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areTiltGesturesEnabledWithError:&error]; @@ -2894,13 +3199,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.areZoomGesturesEnabled", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areZoomGesturesEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areZoomGesturesEnabledWithError:)", api); + NSCAssert([api respondsToSelector:@selector(areZoomGesturesEnabledWithError:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(areZoomGesturesEnabledWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areZoomGesturesEnabledWithError:&error]; @@ -2911,13 +3221,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.isCompassEnabled", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isCompassEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isCompassEnabledWithError:)", api); + NSCAssert( + [api respondsToSelector:@selector(isCompassEnabledWithError:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isCompassEnabledWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isCompassEnabledWithError:&error]; @@ -2928,13 +3243,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.isMyLocationButtonEnabled", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isMyLocationButtonEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isMyLocationButtonEnabledWithError:)", api); + NSCAssert([api respondsToSelector:@selector(isMyLocationButtonEnabledWithError:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(isMyLocationButtonEnabledWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isMyLocationButtonEnabledWithError:&error]; @@ -2945,13 +3265,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.isTrafficEnabled", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isTrafficEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isTrafficEnabledWithError:)", api); + NSCAssert( + [api respondsToSelector:@selector(isTrafficEnabledWithError:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isTrafficEnabledWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isTrafficEnabledWithError:&error]; @@ -2962,18 +3287,24 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.getTileOverlayInfo", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(tileOverlayWithIdentifier:error:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(tileOverlayWithIdentifier:error:)", api); + NSCAssert([api respondsToSelector:@selector(tileOverlayWithIdentifier:error:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(tileOverlayWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_tileOverlayId = GetNullableObjectAtIndex(args, 0); FlutterError *error; - FGMPlatformTileLayer *output = [api tileOverlayWithIdentifier:arg_tileOverlayId error:&error]; + FGMPlatformTileLayer *output = [api tileOverlayWithIdentifier:arg_tileOverlayId + error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -2981,18 +3312,24 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.getGroundOverlayInfo", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(groundOverlayWithIdentifier:error:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(groundOverlayWithIdentifier:error:)", api); + NSCAssert([api respondsToSelector:@selector(groundOverlayWithIdentifier:error:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(groundOverlayWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_groundOverlayId = GetNullableObjectAtIndex(args, 0); FlutterError *error; - FGMPlatformGroundOverlay *output = [api groundOverlayWithIdentifier:arg_groundOverlayId error:&error]; + FGMPlatformGroundOverlay *output = [api groundOverlayWithIdentifier:arg_groundOverlayId + error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -3000,13 +3337,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.getHeatmapInfo", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(heatmapWithIdentifier:error:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(heatmapWithIdentifier:error:)", api); + NSCAssert([api respondsToSelector:@selector(heatmapWithIdentifier:error:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(heatmapWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_heatmapId = GetNullableObjectAtIndex(args, 0); @@ -3019,13 +3361,16 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.getZoomRange", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(zoomRange:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(zoomRange:)", api); + NSCAssert([api respondsToSelector:@selector(zoomRange:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(zoomRange:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; FGMPlatformZoomRange *output = [api zoomRange:&error]; @@ -3036,18 +3381,24 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.getClusters", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(clustersWithIdentifier:error:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(clustersWithIdentifier:error:)", api); + NSCAssert([api respondsToSelector:@selector(clustersWithIdentifier:error:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(clustersWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_clusterManagerId = GetNullableObjectAtIndex(args, 0); FlutterError *error; - NSArray *output = [api clustersWithIdentifier:arg_clusterManagerId error:&error]; + NSArray *output = [api clustersWithIdentifier:arg_clusterManagerId + error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -3055,13 +3406,16 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.getCameraPosition", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetMessagesCodec()]; + codec:FGMGetMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(cameraPosition:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(cameraPosition:)", api); + NSCAssert([api respondsToSelector:@selector(cameraPosition:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(cameraPosition:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; FGMPlatformCameraPosition *output = [api cameraPosition:&error]; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart index 9445d01b71b..07307651b61 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart @@ -18,7 +18,8 @@ PlatformException _createConnectionError(String channelName) { ); } -List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { +List wrapResponse( + {Object? result, PlatformException? error, bool empty = false}) { if (empty) { return []; } @@ -1082,9 +1083,12 @@ class PlatformMapViewCreationParams { initialPolygons: (result[4] as List?)!.cast(), initialPolylines: (result[5] as List?)!.cast(), initialHeatmaps: (result[6] as List?)!.cast(), - initialTileOverlays: (result[7] as List?)!.cast(), - initialClusterManagers: (result[8] as List?)!.cast(), - initialGroundOverlays: (result[9] as List?)!.cast(), + initialTileOverlays: + (result[7] as List?)!.cast(), + initialClusterManagers: + (result[8] as List?)!.cast(), + initialGroundOverlays: + (result[9] as List?)!.cast(), ); } } @@ -1584,7 +1588,6 @@ class PlatformBitmapPinConfig { } } - class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -1592,142 +1595,142 @@ class _PigeonCodec extends StandardMessageCodec { if (value is int) { buffer.putUint8(4); buffer.putInt64(value); - } else if (value is PlatformMapType) { + } else if (value is PlatformMapType) { buffer.putUint8(129); writeValue(buffer, value.index); - } else if (value is MarkerCollisionBehavior) { + } else if (value is MarkerCollisionBehavior) { buffer.putUint8(130); writeValue(buffer, value.index); - } else if (value is PlatformJointType) { + } else if (value is PlatformJointType) { buffer.putUint8(131); writeValue(buffer, value.index); - } else if (value is PlatformPatternItemType) { + } else if (value is PlatformPatternItemType) { buffer.putUint8(132); writeValue(buffer, value.index); - } else if (value is PlatformMarkerType) { + } else if (value is PlatformMarkerType) { buffer.putUint8(133); writeValue(buffer, value.index); - } else if (value is PlatformMapBitmapScaling) { + } else if (value is PlatformMapBitmapScaling) { buffer.putUint8(134); writeValue(buffer, value.index); - } else if (value is PlatformCameraPosition) { + } else if (value is PlatformCameraPosition) { buffer.putUint8(135); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { + } else if (value is PlatformCameraUpdate) { buffer.putUint8(136); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewCameraPosition) { + } else if (value is PlatformCameraUpdateNewCameraPosition) { buffer.putUint8(137); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLng) { + } else if (value is PlatformCameraUpdateNewLatLng) { buffer.putUint8(138); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngBounds) { + } else if (value is PlatformCameraUpdateNewLatLngBounds) { buffer.putUint8(139); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngZoom) { + } else if (value is PlatformCameraUpdateNewLatLngZoom) { buffer.putUint8(140); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateScrollBy) { + } else if (value is PlatformCameraUpdateScrollBy) { buffer.putUint8(141); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomBy) { + } else if (value is PlatformCameraUpdateZoomBy) { buffer.putUint8(142); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoom) { + } else if (value is PlatformCameraUpdateZoom) { buffer.putUint8(143); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomTo) { + } else if (value is PlatformCameraUpdateZoomTo) { buffer.putUint8(144); writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { + } else if (value is PlatformCircle) { buffer.putUint8(145); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { + } else if (value is PlatformHeatmap) { buffer.putUint8(146); writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { + } else if (value is PlatformInfoWindow) { buffer.putUint8(147); writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { + } else if (value is PlatformCluster) { buffer.putUint8(148); writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { + } else if (value is PlatformClusterManager) { buffer.putUint8(149); writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { + } else if (value is PlatformMarker) { buffer.putUint8(150); writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { + } else if (value is PlatformPolygon) { buffer.putUint8(151); writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { + } else if (value is PlatformPolyline) { buffer.putUint8(152); writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { + } else if (value is PlatformPatternItem) { buffer.putUint8(153); writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { + } else if (value is PlatformTile) { buffer.putUint8(154); writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { + } else if (value is PlatformTileOverlay) { buffer.putUint8(155); writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { + } else if (value is PlatformEdgeInsets) { buffer.putUint8(156); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { + } else if (value is PlatformLatLng) { buffer.putUint8(157); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { + } else if (value is PlatformLatLngBounds) { buffer.putUint8(158); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { + } else if (value is PlatformCameraTargetBounds) { buffer.putUint8(159); writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { + } else if (value is PlatformGroundOverlay) { buffer.putUint8(160); writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { + } else if (value is PlatformMapViewCreationParams) { buffer.putUint8(161); writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { + } else if (value is PlatformMapConfiguration) { buffer.putUint8(162); writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { + } else if (value is PlatformPoint) { buffer.putUint8(163); writeValue(buffer, value.encode()); - } else if (value is PlatformSize) { + } else if (value is PlatformSize) { buffer.putUint8(164); writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { + } else if (value is PlatformTileLayer) { buffer.putUint8(165); writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { + } else if (value is PlatformZoomRange) { buffer.putUint8(166); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { + } else if (value is PlatformBitmap) { buffer.putUint8(167); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { + } else if (value is PlatformBitmapDefaultMarker) { buffer.putUint8(168); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { + } else if (value is PlatformBitmapBytes) { buffer.putUint8(169); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { + } else if (value is PlatformBitmapAsset) { buffer.putUint8(170); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { + } else if (value is PlatformBitmapAssetImage) { buffer.putUint8(171); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { + } else if (value is PlatformBitmapAssetMap) { buffer.putUint8(172); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { + } else if (value is PlatformBitmapBytesMap) { buffer.putUint8(173); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapPinConfig) { + } else if (value is PlatformBitmapPinConfig) { buffer.putUint8(174); writeValue(buffer, value.encode()); } else { @@ -1738,103 +1741,103 @@ class _PigeonCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 129: + case 129: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformMapType.values[value]; - case 130: + case 130: final int? value = readValue(buffer) as int?; return value == null ? null : MarkerCollisionBehavior.values[value]; - case 131: + case 131: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformJointType.values[value]; - case 132: + case 132: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformPatternItemType.values[value]; - case 133: + case 133: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformMarkerType.values[value]; - case 134: + case 134: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformMapBitmapScaling.values[value]; - case 135: + case 135: return PlatformCameraPosition.decode(readValue(buffer)!); - case 136: + case 136: return PlatformCameraUpdate.decode(readValue(buffer)!); - case 137: + case 137: return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!); - case 138: + case 138: return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!); - case 139: + case 139: return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); - case 140: + case 140: return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); - case 141: + case 141: return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); - case 142: + case 142: return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); - case 143: + case 143: return PlatformCameraUpdateZoom.decode(readValue(buffer)!); - case 144: + case 144: return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); - case 145: + case 145: return PlatformCircle.decode(readValue(buffer)!); - case 146: + case 146: return PlatformHeatmap.decode(readValue(buffer)!); - case 147: + case 147: return PlatformInfoWindow.decode(readValue(buffer)!); - case 148: + case 148: return PlatformCluster.decode(readValue(buffer)!); - case 149: + case 149: return PlatformClusterManager.decode(readValue(buffer)!); - case 150: + case 150: return PlatformMarker.decode(readValue(buffer)!); - case 151: + case 151: return PlatformPolygon.decode(readValue(buffer)!); - case 152: + case 152: return PlatformPolyline.decode(readValue(buffer)!); - case 153: + case 153: return PlatformPatternItem.decode(readValue(buffer)!); - case 154: + case 154: return PlatformTile.decode(readValue(buffer)!); - case 155: + case 155: return PlatformTileOverlay.decode(readValue(buffer)!); - case 156: + case 156: return PlatformEdgeInsets.decode(readValue(buffer)!); - case 157: + case 157: return PlatformLatLng.decode(readValue(buffer)!); - case 158: + case 158: return PlatformLatLngBounds.decode(readValue(buffer)!); - case 159: + case 159: return PlatformCameraTargetBounds.decode(readValue(buffer)!); - case 160: + case 160: return PlatformGroundOverlay.decode(readValue(buffer)!); - case 161: + case 161: return PlatformMapViewCreationParams.decode(readValue(buffer)!); - case 162: + case 162: return PlatformMapConfiguration.decode(readValue(buffer)!); - case 163: + case 163: return PlatformPoint.decode(readValue(buffer)!); - case 164: + case 164: return PlatformSize.decode(readValue(buffer)!); - case 165: + case 165: return PlatformTileLayer.decode(readValue(buffer)!); - case 166: + case 166: return PlatformZoomRange.decode(readValue(buffer)!); - case 167: + case 167: return PlatformBitmap.decode(readValue(buffer)!); - case 168: + case 168: return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); - case 169: + case 169: return PlatformBitmapBytes.decode(readValue(buffer)!); - case 170: + case 170: return PlatformBitmapAsset.decode(readValue(buffer)!); - case 171: + case 171: return PlatformBitmapAssetImage.decode(readValue(buffer)!); - case 172: + case 172: return PlatformBitmapAssetMap.decode(readValue(buffer)!); - case 173: + case 173: return PlatformBitmapBytesMap.decode(readValue(buffer)!); - case 174: + case 174: return PlatformBitmapPinConfig.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -1851,7 +1854,8 @@ class MapsApi { /// BinaryMessenger will be used which routes to the host platform. MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + pigeonVar_messageChannelSuffix = + messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -1860,8 +1864,10 @@ class MapsApi { /// Returns once the map instance is available. Future waitForMap() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -1885,15 +1891,18 @@ class MapsApi { /// /// Only non-null configuration values will result in updates; options with /// null values will remain unchanged. - Future updateMapConfiguration(PlatformMapConfiguration configuration) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updateMapConfiguration( + PlatformMapConfiguration configuration) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([configuration]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([configuration]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1908,15 +1917,18 @@ class MapsApi { } /// Updates the set of circles on the map. - Future updateCircles(List toAdd, List toChange, List idsToRemove) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updateCircles(List toAdd, + List toChange, List idsToRemove) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1931,15 +1943,18 @@ class MapsApi { } /// Updates the set of heatmaps on the map. - Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updateHeatmaps(List toAdd, + List toChange, List idsToRemove) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1954,15 +1969,18 @@ class MapsApi { } /// Updates the set of custer managers for clusters on the map. - Future updateClusterManagers(List toAdd, List idsToRemove) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updateClusterManagers( + List toAdd, List idsToRemove) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, idsToRemove]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([toAdd, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1977,15 +1995,18 @@ class MapsApi { } /// Updates the set of markers on the map. - Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updateMarkers(List toAdd, + List toChange, List idsToRemove) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2000,15 +2021,18 @@ class MapsApi { } /// Updates the set of polygonss on the map. - Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updatePolygons(List toAdd, + List toChange, List idsToRemove) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2023,15 +2047,18 @@ class MapsApi { } /// Updates the set of polylines on the map. - Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updatePolylines(List toAdd, + List toChange, List idsToRemove) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2046,15 +2073,18 @@ class MapsApi { } /// Updates the set of tile overlays on the map. - Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updateTileOverlays(List toAdd, + List toChange, List idsToRemove) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2069,15 +2099,18 @@ class MapsApi { } /// Updates the set of ground overlays on the map. - Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future updateGroundOverlays(List toAdd, + List toChange, List idsToRemove) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2093,8 +2126,10 @@ class MapsApi { /// Gets the screen coordinate for the given map location. Future getScreenCoordinate(PlatformLatLng latLng) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2121,14 +2156,16 @@ class MapsApi { /// Gets the map location for the given screen coordinate. Future getLatLng(PlatformPoint screenCoordinate) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([screenCoordinate]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([screenCoordinate]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2149,8 +2186,10 @@ class MapsApi { /// Gets the map region currently displayed on the map. Future getVisibleRegion() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2178,8 +2217,10 @@ class MapsApi { /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. Future moveCamera(PlatformCameraUpdate cameraUpdate) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2201,15 +2242,18 @@ class MapsApi { /// Moves the camera according to [cameraUpdate], animating the update using a /// duration in milliseconds if provided. - Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future animateCamera( + PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraUpdate, durationMilliseconds]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([cameraUpdate, durationMilliseconds]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2225,8 +2269,10 @@ class MapsApi { /// Gets the current map zoom level. Future getZoomLevel() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2253,8 +2299,10 @@ class MapsApi { /// Show the info window for the marker with the given ID. Future showInfoWindow(String markerId) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2276,8 +2324,10 @@ class MapsApi { /// Hide the info window for the marker with the given ID. Future hideInfoWindow(String markerId) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2300,8 +2350,10 @@ class MapsApi { /// Returns true if the marker with the given ID is currently displaying its /// info window. Future isInfoWindowShown(String markerId) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2332,8 +2384,10 @@ class MapsApi { /// If there was an error setting the style, such as an invalid style string, /// returns the error message. Future setStyle(String style) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2359,8 +2413,10 @@ class MapsApi { /// This allows checking asynchronously for initial style failures, as there /// is no way to return failures from map initialization. Future getLastStyleError() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2382,14 +2438,16 @@ class MapsApi { /// Clears the cache of tiles previously requseted from the tile provider. Future clearTileCache(String tileOverlayId) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([tileOverlayId]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([tileOverlayId]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2405,8 +2463,10 @@ class MapsApi { /// Takes a snapshot of the map and returns its image data. Future takeSnapshot() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2428,8 +2488,10 @@ class MapsApi { /// Returns true if the map supports advanced markers. Future isAdvancedMarkersAvailable() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2505,13 +2567,22 @@ abstract class MapsCallbackApi { void onGroundOverlayTap(String groundOverlayId); /// Called to get data for a map tile. - Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); - - static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { - messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + Future getTileOverlayTile( + String tileOverlayId, PlatformPoint location, int zoom); + + static void setUp( + MapsCallbackApi? api, { + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) { + messageChannelSuffix = + messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); @@ -2522,24 +2593,29 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.'); final List args = (message as List?)!; - final PlatformCameraPosition? arg_cameraPosition = (args[0] as PlatformCameraPosition?); + final PlatformCameraPosition? arg_cameraPosition = + (args[0] as PlatformCameraPosition?); assert(arg_cameraPosition != null, 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.'); try { @@ -2547,15 +2623,19 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); @@ -2566,22 +2646,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.'); final List args = (message as List?)!; final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); assert(arg_position != null, @@ -2591,22 +2675,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.'); final List args = (message as List?)!; final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); assert(arg_position != null, @@ -2616,22 +2704,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2641,22 +2733,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2669,22 +2765,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2697,22 +2797,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2725,22 +2829,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); assert(arg_markerId != null, @@ -2750,22 +2858,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.'); final List args = (message as List?)!; final String? arg_circleId = (args[0] as String?); assert(arg_circleId != null, @@ -2775,22 +2887,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.'); final List args = (message as List?)!; final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); assert(arg_cluster != null, @@ -2800,22 +2916,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.'); final List args = (message as List?)!; final String? arg_polygonId = (args[0] as String?); assert(arg_polygonId != null, @@ -2825,22 +2945,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.'); final List args = (message as List?)!; final String? arg_polylineId = (args[0] as String?); assert(arg_polylineId != null, @@ -2850,22 +2974,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.'); final List args = (message as List?)!; final String? arg_groundOverlayId = (args[0] as String?); assert(arg_groundOverlayId != null, @@ -2875,22 +3003,26 @@ abstract class MapsCallbackApi { return wrapResponse(empty: true); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } } { - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel< + Object?> pigeonVar_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.'); + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.'); final List args = (message as List?)!; final String? arg_tileOverlayId = (args[0] as String?); assert(arg_tileOverlayId != null, @@ -2902,12 +3034,14 @@ abstract class MapsCallbackApi { assert(arg_zoom != null, 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); try { - final PlatformTile output = await api.getTileOverlayTile(arg_tileOverlayId!, arg_location!, arg_zoom!); + final PlatformTile output = await api.getTileOverlayTile( + arg_tileOverlayId!, arg_location!, arg_zoom!); return wrapResponse(result: output); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString())); } }); } @@ -2922,9 +3056,11 @@ class MapsPlatformViewApi { /// Constructor for [MapsPlatformViewApi]. The [binaryMessenger] named argument is /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. - MapsPlatformViewApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + MapsPlatformViewApi( + {BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + pigeonVar_messageChannelSuffix = + messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -2932,8 +3068,10 @@ class MapsPlatformViewApi { final String pigeonVar_messageChannelSuffix; Future createView(PlatformMapViewCreationParams? type) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2959,9 +3097,11 @@ class MapsInspectorApi { /// Constructor for [MapsInspectorApi]. The [binaryMessenger] named argument is /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. - MapsInspectorApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + MapsInspectorApi( + {BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + pigeonVar_messageChannelSuffix = + messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -2969,8 +3109,10 @@ class MapsInspectorApi { final String pigeonVar_messageChannelSuffix; Future areBuildingsEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -2996,8 +3138,10 @@ class MapsInspectorApi { } Future areRotateGesturesEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3023,8 +3167,10 @@ class MapsInspectorApi { } Future areScrollGesturesEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3050,8 +3196,10 @@ class MapsInspectorApi { } Future areTiltGesturesEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3077,8 +3225,10 @@ class MapsInspectorApi { } Future areZoomGesturesEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3104,8 +3254,10 @@ class MapsInspectorApi { } Future isCompassEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3131,8 +3283,10 @@ class MapsInspectorApi { } Future isMyLocationButtonEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3158,8 +3312,10 @@ class MapsInspectorApi { } Future isTrafficEnabled() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3185,14 +3341,16 @@ class MapsInspectorApi { } Future getTileOverlayInfo(String tileOverlayId) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([tileOverlayId]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([tileOverlayId]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3206,15 +3364,18 @@ class MapsInspectorApi { } } - Future getGroundOverlayInfo(String groundOverlayId) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + Future getGroundOverlayInfo( + String groundOverlayId) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([groundOverlayId]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([groundOverlayId]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3229,8 +3390,10 @@ class MapsInspectorApi { } Future getHeatmapInfo(String heatmapId) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3251,8 +3414,10 @@ class MapsInspectorApi { } Future getZoomRange() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, @@ -3278,14 +3443,16 @@ class MapsInspectorApi { } Future> getClusters(String clusterManagerId) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final List? pigeonVar_replyList = - await pigeonVar_channel.send([clusterManagerId]) as List?; + final List? pigeonVar_replyList = await pigeonVar_channel + .send([clusterManagerId]) as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3300,13 +3467,16 @@ class MapsInspectorApi { message: 'Host platform returned null value for non-null return value.', ); } else { - return (pigeonVar_replyList[0] as List?)!.cast(); + return (pigeonVar_replyList[0] as List?)! + .cast(); } } Future getCameraPosition() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final String pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart index f3904ae2de7..6d8583e82a0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart @@ -131,7 +131,7 @@ void main() { }, ); - test( + test( 'default implementation of `animateCameraWithConfiguration` delegates to `animateCamera`', () { final GoogleMapsFlutterPlatform platform = From d17d644145a9d4125d6155337b4f74d89fd916f3 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 14 Apr 2025 15:13:05 +0300 Subject: [PATCH 116/130] Add missing license block --- .../google_maps_flutter/example/lib/collision_behavior.dart | 4 ++++ .../example/lib/collision_behavior.dart | 4 ++++ .../shared/maps_example_dart/lib/collision_behavior.dart | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/collision_behavior.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/collision_behavior.dart index 20ae8b43049..6597d0b5b9a 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/collision_behavior.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/collision_behavior.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'dart:math'; import 'package:flutter/material.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/collision_behavior.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/collision_behavior.dart index 6001e1ab67d..09ee5370871 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/collision_behavior.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/collision_behavior.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'dart:math'; import 'package:flutter/material.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/collision_behavior.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/collision_behavior.dart index 850e68bf7ff..5363688ab23 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/collision_behavior.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/shared/maps_example_dart/lib/collision_behavior.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'dart:math'; import 'package:flutter/material.dart'; From 95740a293a4fc80a3aa6598f012de05e03b3ef8e Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 14 Apr 2025 16:14:37 +0300 Subject: [PATCH 117/130] Fix enum name --- .../plugins/googlemaps/ClusterManagersControllerTest.java | 2 +- .../io/flutter/plugins/googlemaps/MarkersControllerTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java index adaae8c3b4c..9d9f0ad0cfb 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/ClusterManagersControllerTest.java @@ -269,7 +269,7 @@ private Messages.PlatformMarker createPlatformMarker( .setClusterManagerId(clusterManagerId) .setAnchor(anchor) .setInfoWindow(new Messages.PlatformInfoWindow.Builder().setAnchor(anchor).build()) - .setCollisionBehavior(PlatformMarkerCollisionBehavior.REQUIRED) + .setCollisionBehavior(PlatformMarkerCollisionBehavior.REQUIRED_DISPLAY) .build(); } } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java index 3fb75793255..8acd81a176a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/MarkersControllerTest.java @@ -87,7 +87,7 @@ private static Messages.PlatformMarker.Builder defaultMarkerBuilder() { .setConsumeTapEvents(false) .setIcon(icon) .setInfoWindow(infoWindow) - .setCollisionBehavior(PlatformMarkerCollisionBehavior.REQUIRED); + .setCollisionBehavior(PlatformMarkerCollisionBehavior.REQUIRED_DISPLAY); } @Before From 3dc400a1db0953faa00abacd46262b8ad4806540 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 15 Apr 2025 10:45:14 +0300 Subject: [PATCH 118/130] Restore icon anchor --- .../google_maps_flutter_web/lib/src/convert.dart | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index ae390e8cc69..dfb4533b29b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -313,6 +313,18 @@ void _setIconStyle({ ); } +void _setIconAnchor({ + required gmaps.Size size, + required Offset anchor, + required gmaps.Icon icon, +}) { + final gmaps.Point gmapsAnchor = gmaps.Point( + size.width * anchor.dx, + size.height * anchor.dy, + ); + icon.anchor = gmapsAnchor; +} + // Sets the size of the Google Maps icon. void _setIconSize({ required gmaps.Size size, @@ -547,6 +559,7 @@ Future _gmIconFromBitmapDescriptor( final gmaps.Size? size = await _getBitmapSize(bitmapDescriptor, url); if (size != null) { _setIconSize(size: size, icon: icon); + _setIconAnchor(size: size, anchor: anchor, icon: icon); } case MapBitmapScaling.none: break; From 67200fa92a0b8b136952d2965f11d4913f5454c8 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 15 Apr 2025 10:49:41 +0300 Subject: [PATCH 119/130] Fix missing semicolon --- .../ios/Classes/GoogleMapMarkerController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m index 713b756d8c8..d43a35994e4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m @@ -127,7 +127,7 @@ - (void)updateFromPlatformMarker:(FGMPlatformMarker *)platformMarker [self setPosition:FGMGetCoordinateForPigeonLatLng(platformMarker.position)]; [self setRotation:platformMarker.rotation]; [self setZIndex:platformMarker.zIndex]; - [self setCollisionBehavior:platformMarker.collisionBehavior] + [self setCollisionBehavior:platformMarker.collisionBehavior]; FGMPlatformInfoWindow *infoWindow = platformMarker.infoWindow; [self setInfoWindowAnchor:FGMGetCGPointForPigeonPoint(infoWindow.anchor)]; if (infoWindow.title) { From c8f6b0cd310c894670f95ed45ea6c2d7fb8fb93c Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 15 Apr 2025 12:59:36 +0300 Subject: [PATCH 120/130] Fix iOS tests --- .../GoogleMapsMarkerControllerTests.m | 175 +++++++++--------- 1 file changed, 92 insertions(+), 83 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/GoogleMapsMarkerControllerTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/GoogleMapsMarkerControllerTests.m index 5b5329e9880..f42330b527b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/GoogleMapsMarkerControllerTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/ios/RunnerTests/GoogleMapsMarkerControllerTests.m @@ -33,7 +33,8 @@ - (FLTMarkersController *)markersControllerWithMapView:(GMSMapView *)mapView { return [[FLTMarkersController alloc] initWithMapView:mapView callbackHandler:[[FGMMapsCallbackApi alloc] init] clusterManagersController:nil - registrar:mockRegistrar]; + registrar:mockRegistrar + markerType:FGMPlatformMarkerTypeMarker]; } - (FGMPlatformBitmap *)placeholderBitmap { @@ -53,23 +54,24 @@ - (void)testSetsMarkerNumericProperties { double latitutde = 10.0; double longitude = 20.0; [controller addMarkers:@[ [FGMPlatformMarker - makeWithAlpha:alpha - anchor:[FGMPlatformPoint makeWithX:anchorX y:anchorY] - consumeTapEvents:YES - draggable:YES - flat:YES - icon:[self placeholderBitmap] - infoWindow:[FGMPlatformInfoWindow - makeWithTitle:@"info title" - snippet:@"info snippet" - anchor:[FGMPlatformPoint makeWithX:0 y:0]] - position:[FGMPlatformLatLng makeWithLatitude:latitutde - longitude:longitude] - rotation:rotation - visible:YES - zIndex:zIndex - markerId:markerIdentifier - clusterManagerId:nil] ]]; + makeWithAlpha:alpha + anchor:[FGMPlatformPoint makeWithX:anchorX y:anchorY] + consumeTapEvents:YES + draggable:YES + flat:YES + icon:[self placeholderBitmap] + infoWindow:[FGMPlatformInfoWindow + makeWithTitle:@"info title" + snippet:@"info snippet" + anchor:[FGMPlatformPoint makeWithX:0 y:0]] + position:[FGMPlatformLatLng makeWithLatitude:latitutde + longitude:longitude] + rotation:rotation + visible:YES + zIndex:zIndex + markerId:markerIdentifier + clusterManagerId:nil + collisionBehavior:nil] ]]; FLTGoogleMapMarkerController *markerController = controller.markerIdentifierToController[markerIdentifier]; @@ -93,22 +95,24 @@ - (void)testSetsDraggable { NSString *markerIdentifier = @"marker"; [controller addMarkers:@[ [FGMPlatformMarker - makeWithAlpha:1.0 - anchor:[FGMPlatformPoint makeWithX:0 y:0] - consumeTapEvents:NO - draggable:YES - flat:NO - icon:[self placeholderBitmap] - infoWindow:[FGMPlatformInfoWindow - makeWithTitle:@"info title" - snippet:@"info snippet" - anchor:[FGMPlatformPoint makeWithX:0 y:0]] - position:[FGMPlatformLatLng makeWithLatitude:0.0 longitude:0.0] - rotation:0 - visible:NO - zIndex:0 - markerId:markerIdentifier - clusterManagerId:nil] ]]; + makeWithAlpha:1.0 + anchor:[FGMPlatformPoint makeWithX:0 y:0] + consumeTapEvents:NO + draggable:YES + flat:NO + icon:[self placeholderBitmap] + infoWindow:[FGMPlatformInfoWindow + makeWithTitle:@"info title" + snippet:@"info snippet" + anchor:[FGMPlatformPoint makeWithX:0 y:0]] + position:[FGMPlatformLatLng makeWithLatitude:0.0 + longitude:0.0] + rotation:0 + visible:NO + zIndex:0 + markerId:markerIdentifier + clusterManagerId:nil + collisionBehavior:nil] ]]; FLTGoogleMapMarkerController *markerController = controller.markerIdentifierToController[markerIdentifier]; @@ -125,22 +129,24 @@ - (void)testSetsFlat { NSString *markerIdentifier = @"marker"; [controller addMarkers:@[ [FGMPlatformMarker - makeWithAlpha:1.0 - anchor:[FGMPlatformPoint makeWithX:0 y:0] - consumeTapEvents:NO - draggable:NO - flat:YES - icon:[self placeholderBitmap] - infoWindow:[FGMPlatformInfoWindow - makeWithTitle:@"info title" - snippet:@"info snippet" - anchor:[FGMPlatformPoint makeWithX:0 y:0]] - position:[FGMPlatformLatLng makeWithLatitude:0.0 longitude:0.0] - rotation:0 - visible:NO - zIndex:0 - markerId:markerIdentifier - clusterManagerId:nil] ]]; + makeWithAlpha:1.0 + anchor:[FGMPlatformPoint makeWithX:0 y:0] + consumeTapEvents:NO + draggable:NO + flat:YES + icon:[self placeholderBitmap] + infoWindow:[FGMPlatformInfoWindow + makeWithTitle:@"info title" + snippet:@"info snippet" + anchor:[FGMPlatformPoint makeWithX:0 y:0]] + position:[FGMPlatformLatLng makeWithLatitude:0.0 + longitude:0.0] + rotation:0 + visible:NO + zIndex:0 + markerId:markerIdentifier + clusterManagerId:nil + collisionBehavior:nil] ]]; FLTGoogleMapMarkerController *markerController = controller.markerIdentifierToController[markerIdentifier]; @@ -157,22 +163,24 @@ - (void)testSetsVisible { NSString *markerIdentifier = @"marker"; [controller addMarkers:@[ [FGMPlatformMarker - makeWithAlpha:1.0 - anchor:[FGMPlatformPoint makeWithX:0 y:0] - consumeTapEvents:NO - draggable:NO - flat:NO - icon:[self placeholderBitmap] - infoWindow:[FGMPlatformInfoWindow - makeWithTitle:@"info title" - snippet:@"info snippet" - anchor:[FGMPlatformPoint makeWithX:0 y:0]] - position:[FGMPlatformLatLng makeWithLatitude:0.0 longitude:0.0] - rotation:0 - visible:YES - zIndex:0 - markerId:markerIdentifier - clusterManagerId:nil] ]]; + makeWithAlpha:1.0 + anchor:[FGMPlatformPoint makeWithX:0 y:0] + consumeTapEvents:NO + draggable:NO + flat:NO + icon:[self placeholderBitmap] + infoWindow:[FGMPlatformInfoWindow + makeWithTitle:@"info title" + snippet:@"info snippet" + anchor:[FGMPlatformPoint makeWithX:0 y:0]] + position:[FGMPlatformLatLng makeWithLatitude:0.0 + longitude:0.0] + rotation:0 + visible:YES + zIndex:0 + markerId:markerIdentifier + clusterManagerId:nil + collisionBehavior:nil] ]]; FLTGoogleMapMarkerController *markerController = controller.markerIdentifierToController[markerIdentifier]; @@ -193,23 +201,24 @@ - (void)testSetsMarkerInfoWindowProperties { double anchorY = 2.718; [controller addMarkers:@[ [FGMPlatformMarker - makeWithAlpha:1.0 - anchor:[FGMPlatformPoint makeWithX:0 y:0] - consumeTapEvents:YES - draggable:YES - flat:YES - icon:[self placeholderBitmap] - infoWindow:[FGMPlatformInfoWindow - makeWithTitle:title - snippet:snippet - anchor:[FGMPlatformPoint makeWithX:anchorX - y:anchorY]] - position:[FGMPlatformLatLng makeWithLatitude:0 longitude:0] - rotation:0 - visible:YES - zIndex:0 - markerId:markerIdentifier - clusterManagerId:nil] ]]; + makeWithAlpha:1.0 + anchor:[FGMPlatformPoint makeWithX:0 y:0] + consumeTapEvents:YES + draggable:YES + flat:YES + icon:[self placeholderBitmap] + infoWindow:[FGMPlatformInfoWindow + makeWithTitle:title + snippet:snippet + anchor:[FGMPlatformPoint makeWithX:anchorX + y:anchorY]] + position:[FGMPlatformLatLng makeWithLatitude:0 longitude:0] + rotation:0 + visible:YES + zIndex:0 + markerId:markerIdentifier + clusterManagerId:nil + collisionBehavior:nil] ]]; FLTGoogleMapMarkerController *markerController = controller.markerIdentifierToController[markerIdentifier]; From e55ce2acca0db3645affdb383bd95904de9155f1 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 22 Apr 2025 10:19:49 +0300 Subject: [PATCH 121/130] Revert trailing comma --- .../method_channel/method_channel_google_maps_flutter.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart index 3db472c92d2..254a5444dc7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart @@ -652,9 +652,8 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { creationId, onPlatformViewCreated, widgetConfiguration: MapWidgetConfiguration( - initialCameraPosition: initialCameraPosition, - textDirection: textDirection, - ), + initialCameraPosition: initialCameraPosition, + textDirection: textDirection), mapObjects: MapObjects( markers: markers, polygons: polygons, From 3f8622bc79caee4035ddde83dedb707f0c3d1bbf Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 23 Apr 2025 11:13:32 +0300 Subject: [PATCH 122/130] Change AdvancedMarker's zIndex type to int --- .../integration_test/google_maps_tests.dart | 2 +- .../google_maps_flutter_android_test.dart | 9 ++- .../integration_test/google_maps_test.dart | 2 +- .../lib/src/types/advanced_marker.dart | 8 +-- .../test/types/advanced_marker_test.dart | 8 +-- .../advanced_markers_test.dart | 58 +++++++++---------- 6 files changed, 45 insertions(+), 42 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart index 0913ff726ca..198798f0f85 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/integration_test/google_maps_tests.dart @@ -2240,7 +2240,7 @@ AdvancedMarker _copyAdvancedMarkerWithClusterManagerId( position: marker.position, rotation: marker.rotation, visible: marker.visible, - zIndex: marker.zIndex, + zIndex: marker.zIndex.toInt(), onTap: marker.onTap, onDragStart: marker.onDragStart, onDrag: marker.onDrag, diff --git a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart index 1eda4ef1055..e6703b4757f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart @@ -495,10 +495,13 @@ void main() { final (GoogleMapsFlutterAndroid maps, MockMapsApi api) = setUpMockMap(mapId: mapId); - const AdvancedMarker object1 = AdvancedMarker(markerId: MarkerId('1')); - const AdvancedMarker object2old = AdvancedMarker(markerId: MarkerId('2')); + final AdvancedMarker object1 = + AdvancedMarker(markerId: const MarkerId('1')); + final AdvancedMarker object2old = + AdvancedMarker(markerId: const MarkerId('2')); final AdvancedMarker object2new = object2old.copyWith(rotationParam: 42); - const AdvancedMarker object3 = AdvancedMarker(markerId: MarkerId('3')); + final AdvancedMarker object3 = + AdvancedMarker(markerId: const MarkerId('3')); await maps.updateMarkers( MarkerUpdates.from( {object1, object2old}, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart index dd1efe2af6b..9c325a4f483 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios14/integration_test/google_maps_test.dart @@ -2088,7 +2088,7 @@ AdvancedMarker _copyAdvancedMarkerWithClusterManagerId( position: marker.position, rotation: marker.rotation, visible: marker.visible, - zIndex: marker.zIndex, + zIndex: marker.zIndex.toInt(), onTap: marker.onTap, onDragStart: marker.onDragStart, onDrag: marker.onDrag, diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart index cd70d720d35..3877e928445 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/advanced_marker.dart @@ -16,7 +16,7 @@ class AdvancedMarker extends Marker { /// /// Specifies a marker with a given [collisionBehavior]. Default is /// [MarkerCollisionBehavior.required]. - const AdvancedMarker({ + AdvancedMarker({ required super.markerId, super.alpha, super.anchor, @@ -28,14 +28,14 @@ class AdvancedMarker extends Marker { super.position, super.rotation, super.visible, - super.zIndex, super.clusterManagerId, super.onTap, super.onDrag, super.onDragStart, super.onDragEnd, + int zIndex = 0, this.collisionBehavior = MarkerCollisionBehavior.requiredDisplay, - }); + }) : super(zIndex: zIndex.toDouble()); /// Indicates how the marker behaves when it collides with other markers. final MarkerCollisionBehavior collisionBehavior; @@ -75,7 +75,7 @@ class AdvancedMarker extends Marker { position: positionParam ?? position, rotation: rotationParam ?? rotation, visible: visibleParam ?? visible, - zIndex: zIndexParam ?? zIndex, + zIndex: (zIndexParam ?? zIndex).toInt(), onTap: onTapParam ?? onTap, onDragStart: onDragStartParam ?? onDragStart, onDrag: onDragParam ?? onDrag, diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/advanced_marker_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/advanced_marker_test.dart index e0143bdb908..d00ef98c052 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/advanced_marker_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/advanced_marker_test.dart @@ -9,8 +9,8 @@ void main() { group('$AdvancedMarker', () { test('constructor defaults', () { - const AdvancedMarker marker = - AdvancedMarker(markerId: MarkerId('ABC123')); + final AdvancedMarker marker = + AdvancedMarker(markerId: const MarkerId('ABC123')); expect(marker.alpha, equals(1.0)); expect(marker.anchor, equals(const Offset(0.5, 1.0))); @@ -94,7 +94,7 @@ void main() { }); test('clone', () { - const Marker marker = AdvancedMarker(markerId: MarkerId('ABC123')); + final Marker marker = AdvancedMarker(markerId: const MarkerId('ABC123')); final Marker clone = marker.clone(); expect(clone, isA()); @@ -104,7 +104,7 @@ void main() { test('copyWith', () { const MarkerId markerId = MarkerId('ABC123'); - const AdvancedMarker marker = AdvancedMarker(markerId: markerId); + final AdvancedMarker marker = AdvancedMarker(markerId: markerId); final BitmapDescriptor testDescriptor = BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueCyan); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart index 8465c6b3b7c..de9495130e0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart @@ -49,8 +49,8 @@ void main() { testWidgets('addMarkers', (WidgetTester tester) async { final Set markers = { - const AdvancedMarker(markerId: MarkerId('1')), - const AdvancedMarker(markerId: MarkerId('2')), + AdvancedMarker(markerId: const MarkerId('1')), + AdvancedMarker(markerId: const MarkerId('2')), }; await controller.addMarkers(markers); @@ -66,7 +66,7 @@ void main() { gmaps.LatLngLiteral? position; final Set markers = { - const AdvancedMarker(markerId: MarkerId('1')), + AdvancedMarker(markerId: const MarkerId('1')), }; await controller.addMarkers(markers); @@ -82,10 +82,10 @@ void main() { // Update the marker with draggable and position. final Set updatedMarkers = { - const AdvancedMarker( - markerId: MarkerId('1'), + AdvancedMarker( + markerId: const MarkerId('1'), draggable: true, - position: LatLng(42, 54), + position: const LatLng(42, 54), ), }; await controller.changeMarkers(updatedMarkers); @@ -108,9 +108,9 @@ void main() { gmaps.LatLngLiteral? position; final Set markers = { - const AdvancedMarker( - markerId: MarkerId('1'), - position: LatLng(42, 54), + AdvancedMarker( + markerId: const MarkerId('1'), + position: const LatLng(42, 54), ), }; await controller.addMarkers(markers); @@ -126,8 +126,8 @@ void main() { // Update the marker without position. final Set updatedMarkers = { - const AdvancedMarker( - markerId: MarkerId('1'), + AdvancedMarker( + markerId: const MarkerId('1'), draggable: true, ), }; @@ -146,9 +146,9 @@ void main() { testWidgets('removeMarkers', (WidgetTester tester) async { final Set markers = { - const AdvancedMarker(markerId: MarkerId('1')), - const AdvancedMarker(markerId: MarkerId('2')), - const AdvancedMarker(markerId: MarkerId('3')), + AdvancedMarker(markerId: const MarkerId('1')), + AdvancedMarker(markerId: const MarkerId('2')), + AdvancedMarker(markerId: const MarkerId('3')), }; await controller.addMarkers(markers); @@ -171,9 +171,9 @@ void main() { testWidgets('InfoWindow show/hide', (WidgetTester tester) async { final Set markers = { - const AdvancedMarker( - markerId: MarkerId('1'), - infoWindow: InfoWindow(title: 'Title', snippet: 'Snippet'), + AdvancedMarker( + markerId: const MarkerId('1'), + infoWindow: const InfoWindow(title: 'Title', snippet: 'Snippet'), ), }; @@ -193,13 +193,13 @@ void main() { testWidgets('only single InfoWindow is visible', (WidgetTester tester) async { final Set markers = { - const AdvancedMarker( - markerId: MarkerId('1'), - infoWindow: InfoWindow(title: 'Title', snippet: 'Snippet'), + AdvancedMarker( + markerId: const MarkerId('1'), + infoWindow: const InfoWindow(title: 'Title', snippet: 'Snippet'), ), - const AdvancedMarker( - markerId: MarkerId('2'), - infoWindow: InfoWindow(title: 'Title', snippet: 'Snippet'), + AdvancedMarker( + markerId: const MarkerId('2'), + infoWindow: const InfoWindow(title: 'Title', snippet: 'Snippet'), ), }; await controller.addMarkers(markers); @@ -566,9 +566,9 @@ void main() { testWidgets('InfoWindow snippet can have links', (WidgetTester tester) async { final Set markers = { - const AdvancedMarker( - markerId: MarkerId('1'), - infoWindow: InfoWindow( + AdvancedMarker( + markerId: const MarkerId('1'), + infoWindow: const InfoWindow( title: 'title for test', snippet: 'Go to Google >>>', ), @@ -593,9 +593,9 @@ void main() { testWidgets('InfoWindow content is clickable', (WidgetTester tester) async { final Set markers = { - const AdvancedMarker( - markerId: MarkerId('1'), - infoWindow: InfoWindow( + AdvancedMarker( + markerId: const MarkerId('1'), + infoWindow: const InfoWindow( title: 'title for test', snippet: 'some snippet', ), From 1b373876b4048c506fc8b53e6feb06c51fb3c9ba Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Fri, 16 May 2025 10:33:49 +0300 Subject: [PATCH 123/130] Fix duplicated test name --- .../example/integration_test/advanced_markers_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart index de9495130e0..62f1274bcad 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart @@ -515,7 +515,7 @@ void main() { ); }); - testWidgets('markers created with text glyph work', + testWidgets('markers created with bitmap glyph work', (WidgetTester widgetTester) async { final Set markers = { AdvancedMarker( From bc927154b77819090d708b7968be0564105587dd Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 19 May 2025 14:40:32 +0300 Subject: [PATCH 124/130] Annotate collisionBehavior parameter (Java) --- .../main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java | 2 +- .../java/io/flutter/plugins/googlemaps/MarkerController.java | 3 ++- .../java/io/flutter/plugins/googlemaps/MarkerOptionsSink.java | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java index fde0a3b6b84..7e0cdd5fc17 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerBuilder.java @@ -121,7 +121,7 @@ public void setZIndex(float zIndex) { } @Override - public void setCollisionBehavior(int collisionBehavior) { + public void setCollisionBehavior(@AdvancedMarkerOptions.CollisionBehavior int collisionBehavior) { if (markerOptions.getClass() == AdvancedMarkerOptions.class) { ((AdvancedMarkerOptions) markerOptions).collisionBehavior(collisionBehavior); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java index b1c0a144419..4dfaebc7d8d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java @@ -4,6 +4,7 @@ package io.flutter.plugins.googlemaps; +import com.google.android.gms.maps.model.AdvancedMarkerOptions; import com.google.android.gms.maps.model.BitmapDescriptor; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.Marker; @@ -144,7 +145,7 @@ public void setZIndex(float zIndex) { } @Override - public void setCollisionBehavior(int collisionBehavior) {} + public void setCollisionBehavior(@AdvancedMarkerOptions.CollisionBehavior int collisionBehavior) {} String getGoogleMapsMarkerId() { return googleMapsMarkerId; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerOptionsSink.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerOptionsSink.java index 9ffc27806a4..e88d3cd6e38 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerOptionsSink.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerOptionsSink.java @@ -4,6 +4,7 @@ package io.flutter.plugins.googlemaps; +import com.google.android.gms.maps.model.AdvancedMarkerOptions; import com.google.android.gms.maps.model.BitmapDescriptor; import com.google.android.gms.maps.model.LatLng; @@ -33,5 +34,5 @@ interface MarkerOptionsSink { void setZIndex(float zIndex); - void setCollisionBehavior(int collisionBehavior); + void setCollisionBehavior(@AdvancedMarkerOptions.CollisionBehavior int collisionBehavior); } From b0857e8bb640dc3d1ec902ae9f08ba373a6aee61 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Mon, 19 May 2025 14:40:51 +0300 Subject: [PATCH 125/130] Remove duplicated line --- .../example/integration_test/advanced_markers_test.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart index 62f1274bcad..9cdedc9b0ff 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart @@ -508,7 +508,6 @@ void main() { expect(paragraphElement, isNotNull); expect(paragraphElement!.innerHTML, 'Hey'); - expect(paragraphElement.innerHTML, 'Hey'); expect( paragraphElement.getAttribute('style')?.toLowerCase(), contains('color: #0000ff'), From 439d97a50a59baee065cf7b69b65790582ca59d6 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Tue, 20 May 2025 13:54:50 +0300 Subject: [PATCH 126/130] Fix collision behavior not being set correctly on iOS --- .../ios/Classes/GoogleMapMarkerController.m | 2 +- .../ios/Classes/messages.g.h | 20 ++-- .../ios/Classes/messages.g.m | 12 +-- .../lib/src/google_maps_flutter_ios.dart | 21 ++++ .../lib/src/messages.g.dart | 12 ++- .../pigeons/messages.dart | 4 +- .../test/google_maps_flutter_ios_test.dart | 102 ++++++++++++++++++ 7 files changed, 149 insertions(+), 24 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m index 1e0d450cf93..0ca06ebbed3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/GoogleMapMarkerController.m @@ -108,7 +108,7 @@ - (void)setZIndex:(int)zIndex { self.marker.zIndex = zIndex; } -- (void)setCollisionBehavior:(FGMMarkerCollisionBehaviorBox *)collisionBehavior { +- (void)setCollisionBehavior:(FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior { if ([self.marker isKindOfClass:[GMSAdvancedMarker class]]) { GMSCollisionBehavior collitionBehaviorValue = (GMSCollisionBehavior)collisionBehavior.value; [(GMSAdvancedMarker *)self.marker setCollisionBehavior:(collitionBehaviorValue)]; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h index 96e6f187c8b..c6b3901392f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h @@ -28,16 +28,16 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapType) { - (instancetype)initWithValue:(FGMPlatformMapType)value; @end -typedef NS_ENUM(NSUInteger, FGMMarkerCollisionBehavior) { - FGMMarkerCollisionBehaviorRequiredDisplay = 0, - FGMMarkerCollisionBehaviorOptionalAndHidesLowerPriority = 1, - FGMMarkerCollisionBehaviorRequiredAndHidesOptional = 2, +typedef NS_ENUM(NSUInteger, FGMPlatformMarkerCollisionBehavior) { + FGMPlatformMarkerCollisionBehaviorRequiredDisplay = 0, + FGMPlatformMarkerCollisionBehaviorOptionalAndHidesLowerPriority = 1, + FGMPlatformMarkerCollisionBehaviorRequiredAndHidesOptional = 2, }; -/// Wrapper for FGMMarkerCollisionBehavior to allow for nullability. -@interface FGMMarkerCollisionBehaviorBox : NSObject -@property(nonatomic, assign) FGMMarkerCollisionBehavior value; -- (instancetype)initWithValue:(FGMMarkerCollisionBehavior)value; +/// Wrapper for FGMPlatformMarkerCollisionBehavior to allow for nullability. +@interface FGMPlatformMarkerCollisionBehaviorBox : NSObject +@property(nonatomic, assign) FGMPlatformMarkerCollisionBehavior value; +- (instancetype)initWithValue:(FGMPlatformMarkerCollisionBehavior)value; @end /// Join types for polyline joints. @@ -310,7 +310,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { zIndex:(double)zIndex markerId:(NSString *)markerId clusterManagerId:(nullable NSString *)clusterManagerId - collisionBehavior:(nullable FGMMarkerCollisionBehaviorBox *)collisionBehavior; + collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior; @property(nonatomic, assign) double alpha; @property(nonatomic, strong) FGMPlatformPoint *anchor; @property(nonatomic, assign) BOOL consumeTapEvents; @@ -324,7 +324,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @property(nonatomic, assign) double zIndex; @property(nonatomic, copy) NSString *markerId; @property(nonatomic, copy, nullable) NSString *clusterManagerId; -@property(nonatomic, strong, nullable) FGMMarkerCollisionBehaviorBox *collisionBehavior; +@property(nonatomic, strong, nullable) FGMPlatformMarkerCollisionBehaviorBox *collisionBehavior; @end /// Pigeon equivalent of the Polygon class. diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m index 129ea09bcc8..4555717e082 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m @@ -50,8 +50,8 @@ - (instancetype)initWithValue:(FGMPlatformMapType)value { } @end -@implementation FGMMarkerCollisionBehaviorBox -- (instancetype)initWithValue:(FGMMarkerCollisionBehavior)value { +@implementation FGMPlatformMarkerCollisionBehaviorBox +- (instancetype)initWithValue:(FGMPlatformMarkerCollisionBehavior)value { self = [super init]; if (self) { _value = value; @@ -754,7 +754,7 @@ + (instancetype)makeWithAlpha:(double)alpha zIndex:(double)zIndex markerId:(NSString *)markerId clusterManagerId:(nullable NSString *)clusterManagerId - collisionBehavior:(nullable FGMMarkerCollisionBehaviorBox *)collisionBehavior { + collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior { FGMPlatformMarker *pigeonResult = [[FGMPlatformMarker alloc] init]; pigeonResult.alpha = alpha; pigeonResult.anchor = anchor; @@ -1693,7 +1693,7 @@ - (nullable id)readValueOfType:(UInt8)type { case 130: { NSNumber *enumAsNumber = [self readValue]; return enumAsNumber == nil ? nil - : [[FGMMarkerCollisionBehaviorBox alloc] + : [[FGMPlatformMarkerCollisionBehaviorBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 131: { @@ -1814,8 +1814,8 @@ - (void)writeValue:(id)value { FGMPlatformMapTypeBox *box = (FGMPlatformMapTypeBox *)value; [self writeByte:129]; [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])]; - } else if ([value isKindOfClass:[FGMMarkerCollisionBehaviorBox class]]) { - FGMMarkerCollisionBehaviorBox *box = (FGMMarkerCollisionBehaviorBox *)value; + } else if ([value isKindOfClass:[FGMPlatformMarkerCollisionBehaviorBox class]]) { + FGMPlatformMarkerCollisionBehaviorBox *box = (FGMPlatformMarkerCollisionBehaviorBox *)value; [self writeByte:130]; [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])]; } else if ([value isKindOfClass:[FGMPlatformJointTypeBox class]]) { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index ac1d7ab8cfb..04b5feeaa49 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -687,6 +687,10 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { zIndex: marker.zIndex, markerId: marker.markerId.value, clusterManagerId: marker.clusterManagerId?.value, + collisionBehavior: marker is AdvancedMarker + ? platformMarkerCollisionBehaviorFromCollisionBehavior( + marker.collisionBehavior) + : null, ); } @@ -842,6 +846,23 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { return PlatformMapBitmapScaling.auto; } + /// Converts [MarkersCollisionBehavior] from platform interface to + /// [PlatformMarkerCollisionBehavior] Pigeon. + @visibleForTesting + static PlatformMarkerCollisionBehavior + platformMarkerCollisionBehaviorFromCollisionBehavior( + MarkerCollisionBehavior collisionBehavior, + ) { + return switch (collisionBehavior) { + MarkerCollisionBehavior.requiredDisplay => + PlatformMarkerCollisionBehavior.requiredDisplay, + MarkerCollisionBehavior.optionalAndHidesLowerPriority => + PlatformMarkerCollisionBehavior.optionalAndHidesLowerPriority, + MarkerCollisionBehavior.requiredAndHidesOptional => + PlatformMarkerCollisionBehavior.requiredAndHidesOptional, + }; + } + /// Converts [BitmapDescriptor] from platform interface to [PlatformBitmap] pigeon. @visibleForTesting static PlatformBitmap platformBitmapFromBitmapDescriptor( diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart index 07307651b61..10b18e0a0c9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart @@ -38,7 +38,7 @@ enum PlatformMapType { hybrid, } -enum MarkerCollisionBehavior { +enum PlatformMarkerCollisionBehavior { requiredDisplay, optionalAndHidesLowerPriority, requiredAndHidesOptional, @@ -551,7 +551,7 @@ class PlatformMarker { String? clusterManagerId; - MarkerCollisionBehavior? collisionBehavior; + PlatformMarkerCollisionBehavior? collisionBehavior; Object encode() { return [ @@ -588,7 +588,7 @@ class PlatformMarker { zIndex: result[10]! as double, markerId: result[11]! as String, clusterManagerId: result[12] as String?, - collisionBehavior: result[13] as MarkerCollisionBehavior?, + collisionBehavior: result[13] as PlatformMarkerCollisionBehavior?, ); } } @@ -1598,7 +1598,7 @@ class _PigeonCodec extends StandardMessageCodec { } else if (value is PlatformMapType) { buffer.putUint8(129); writeValue(buffer, value.index); - } else if (value is MarkerCollisionBehavior) { + } else if (value is PlatformMarkerCollisionBehavior) { buffer.putUint8(130); writeValue(buffer, value.index); } else if (value is PlatformJointType) { @@ -1746,7 +1746,9 @@ class _PigeonCodec extends StandardMessageCodec { return value == null ? null : PlatformMapType.values[value]; case 130: final int? value = readValue(buffer) as int?; - return value == null ? null : MarkerCollisionBehavior.values[value]; + return value == null + ? null + : PlatformMarkerCollisionBehavior.values[value]; case 131: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformJointType.values[value]; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index 74256329826..d4a43def614 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -206,10 +206,10 @@ class PlatformMarker { final double zIndex; final String markerId; final String? clusterManagerId; - final MarkerCollisionBehavior? collisionBehavior; + final PlatformMarkerCollisionBehavior? collisionBehavior; } -enum MarkerCollisionBehavior { +enum PlatformMarkerCollisionBehavior { requiredDisplay, optionalAndHidesLowerPriority, requiredAndHidesOptional, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart index 39046c171e4..e3ed2e7ef60 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart @@ -10,6 +10,8 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:google_maps_flutter_ios/google_maps_flutter_ios.dart'; import 'package:google_maps_flutter_ios/src/messages.g.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; +import 'package:google_maps_flutter_platform_interface/src/types/advanced_marker.dart' + as advanced_marker; import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; @@ -479,6 +481,106 @@ void main() { } }); + test('updateMarkers passes expected arguments (AdvancedMarkers)', () async { + const int mapId = 1; + final (GoogleMapsFlutterIOS maps, MockMapsApi api) = + setUpMockMap(mapId: mapId); + + final AdvancedMarker object1 = + AdvancedMarker(markerId: const MarkerId('1')); + final AdvancedMarker object2old = + AdvancedMarker(markerId: const MarkerId('2')); + final AdvancedMarker object2new = object2old.copyWith( + rotationParam: 42, + collisionBehaviorParam: advanced_marker + .MarkerCollisionBehavior.optionalAndHidesLowerPriority); + final AdvancedMarker object3 = AdvancedMarker( + markerId: const MarkerId('3'), + collisionBehavior: + advanced_marker.MarkerCollisionBehavior.requiredAndHidesOptional); + await maps.updateMarkers( + MarkerUpdates.from({object1, object2old}, + {object2new, object3}), + mapId: mapId); + + final VerificationResult verification = + verify(api.updateMarkers(captureAny, captureAny, captureAny)); + final List toAdd = + verification.captured[0] as List; + final List toChange = + verification.captured[1] as List; + final List toRemove = verification.captured[2] as List; + // Object one should be removed. + expect(toRemove.length, 1); + expect(toRemove.first, object1.markerId.value); + // Object two should be changed. + { + expect(toChange.length, 1); + final PlatformMarker firstChanged = toChange.first; + expect(firstChanged.alpha, object2new.alpha); + expect(firstChanged.anchor.x, object2new.anchor.dx); + expect(firstChanged.anchor.y, object2new.anchor.dy); + expect(firstChanged.consumeTapEvents, object2new.consumeTapEvents); + expect(firstChanged.draggable, object2new.draggable); + expect(firstChanged.flat, object2new.flat); + expect( + firstChanged.icon.bitmap.runtimeType, + GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor( + object2new.icon) + .bitmap + .runtimeType); + expect(firstChanged.infoWindow.title, object2new.infoWindow.title); + expect(firstChanged.infoWindow.snippet, object2new.infoWindow.snippet); + expect(firstChanged.infoWindow.anchor.x, object2new.infoWindow.anchor.dx); + expect(firstChanged.infoWindow.anchor.y, object2new.infoWindow.anchor.dy); + expect(firstChanged.position.latitude, object2new.position.latitude); + expect(firstChanged.position.longitude, object2new.position.longitude); + expect(firstChanged.rotation, object2new.rotation); + expect(firstChanged.visible, object2new.visible); + expect(firstChanged.zIndex, object2new.zIndex); + expect(firstChanged.markerId, object2new.markerId.value); + expect(firstChanged.clusterManagerId, object2new.clusterManagerId?.value); + expect( + firstChanged.collisionBehavior, + GoogleMapsFlutterIOS + .platformMarkerCollisionBehaviorFromCollisionBehavior( + object2new.collisionBehavior), + ); + } + // Object 3 should be added. + { + expect(toAdd.length, 1); + final PlatformMarker firstAdded = toAdd.first; + expect(firstAdded.alpha, object3.alpha); + expect(firstAdded.anchor.x, object3.anchor.dx); + expect(firstAdded.anchor.y, object3.anchor.dy); + expect(firstAdded.consumeTapEvents, object3.consumeTapEvents); + expect(firstAdded.draggable, object3.draggable); + expect(firstAdded.flat, object3.flat); + expect( + firstAdded.icon.bitmap.runtimeType, + GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.icon) + .bitmap + .runtimeType); + expect(firstAdded.infoWindow.title, object3.infoWindow.title); + expect(firstAdded.infoWindow.snippet, object3.infoWindow.snippet); + expect(firstAdded.infoWindow.anchor.x, object3.infoWindow.anchor.dx); + expect(firstAdded.infoWindow.anchor.y, object3.infoWindow.anchor.dy); + expect(firstAdded.position.latitude, object3.position.latitude); + expect(firstAdded.position.longitude, object3.position.longitude); + expect(firstAdded.rotation, object3.rotation); + expect(firstAdded.visible, object3.visible); + expect(firstAdded.zIndex, object3.zIndex); + expect(firstAdded.markerId, object3.markerId.value); + expect(firstAdded.clusterManagerId, object3.clusterManagerId?.value); + expect( + firstAdded.collisionBehavior, + GoogleMapsFlutterIOS + .platformMarkerCollisionBehaviorFromCollisionBehavior( + object3.collisionBehavior)); + } + }); + test('updatePolygons passes expected arguments', () async { const int mapId = 1; final (GoogleMapsFlutterIOS maps, MockMapsApi api) = From 517d3beb45927aecadc55f1d085036f54c9c1cfa Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 21 May 2025 10:45:08 +0300 Subject: [PATCH 127/130] Convert innerHTML to String --- .../example/integration_test/advanced_markers_test.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart index 9cdedc9b0ff..fb03cb6ccd2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart @@ -507,7 +507,8 @@ void main() { } expect(paragraphElement, isNotNull); - expect(paragraphElement!.innerHTML, 'Hey'); + expect(paragraphElement!.innerHTML.toString(), 'Hey'); + expect( paragraphElement.getAttribute('style')?.toLowerCase(), contains('color: #0000ff'), From 351e3758f110ebeba97861ef829625fdd1d03372 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 21 May 2025 10:58:32 +0300 Subject: [PATCH 128/130] Tweak marker to platform marker conversion --- .../plugins/googlemaps/MarkerController.java | 3 +- .../google_maps_flutter_android_test.dart | 39 ++++++++++++------- .../lib/src/google_maps_flutter_ios.dart | 4 +- .../test/google_maps_flutter_ios_test.dart | 4 +- 4 files changed, 31 insertions(+), 19 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java index 4dfaebc7d8d..c86264b7bf8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/MarkerController.java @@ -145,7 +145,8 @@ public void setZIndex(float zIndex) { } @Override - public void setCollisionBehavior(@AdvancedMarkerOptions.CollisionBehavior int collisionBehavior) {} + public void setCollisionBehavior( + @AdvancedMarkerOptions.CollisionBehavior int collisionBehavior) {} String getGoogleMapsMarkerId() { return googleMapsMarkerId; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart index e6703b4757f..a35c8d3b855 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart @@ -499,30 +499,32 @@ void main() { AdvancedMarker(markerId: const MarkerId('1')); final AdvancedMarker object2old = AdvancedMarker(markerId: const MarkerId('2')); - final AdvancedMarker object2new = object2old.copyWith(rotationParam: 42); - final AdvancedMarker object3 = - AdvancedMarker(markerId: const MarkerId('3')); + final AdvancedMarker object2new = object2old.copyWith( + rotationParam: 42, + collisionBehaviorParam: + MarkerCollisionBehavior.optionalAndHidesLowerPriority); + final AdvancedMarker object3 = AdvancedMarker( + markerId: const MarkerId('3'), + collisionBehavior: MarkerCollisionBehavior.requiredAndHidesOptional); await maps.updateMarkers( - MarkerUpdates.from( - {object1, object2old}, - {object2new, object3}, - ), + MarkerUpdates.from({object1, object2old}, + {object2new, object3}), mapId: mapId); final VerificationResult verification = verify(api.updateMarkers(captureAny, captureAny, captureAny)); - final List toAdd = - verification.captured[0] as List; - final List toChange = - verification.captured[1] as List; - final List toRemove = verification.captured[2] as List; + final List toAdd = + verification.captured[0] as List; + final List toChange = + verification.captured[1] as List; + final List toRemove = verification.captured[2] as List; // Object one should be removed. expect(toRemove.length, 1); expect(toRemove.first, object1.markerId.value); // Object two should be changed. { expect(toChange.length, 1); - final PlatformMarker firstChanged = toChange.first!; + final PlatformMarker firstChanged = toChange.first; expect(firstChanged.alpha, object2new.alpha); expect(firstChanged.anchor.x, object2new.anchor.dx); expect(firstChanged.anchor.y, object2new.anchor.dy); @@ -546,11 +548,16 @@ void main() { expect(firstChanged.zIndex, object2new.zIndex); expect(firstChanged.markerId, object2new.markerId.value); expect(firstChanged.clusterManagerId, object2new.clusterManagerId?.value); + expect( + firstChanged.collisionBehavior, + platformMarkerCollisionBehaviorFromMarkerCollisionBehavior( + object2new.collisionBehavior), + ); } // Object 3 should be added. { expect(toAdd.length, 1); - final PlatformMarker firstAdded = toAdd.first!; + final PlatformMarker firstAdded = toAdd.first; expect(firstAdded.alpha, object3.alpha); expect(firstAdded.anchor.x, object3.anchor.dx); expect(firstAdded.anchor.y, object3.anchor.dy); @@ -574,6 +581,10 @@ void main() { expect(firstAdded.zIndex, object3.zIndex); expect(firstAdded.markerId, object3.markerId.value); expect(firstAdded.clusterManagerId, object3.clusterManagerId?.value); + expect( + firstAdded.collisionBehavior, + platformMarkerCollisionBehaviorFromMarkerCollisionBehavior( + object3.collisionBehavior)); } }); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index 04b5feeaa49..06975d98e72 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -688,7 +688,7 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { markerId: marker.markerId.value, clusterManagerId: marker.clusterManagerId?.value, collisionBehavior: marker is AdvancedMarker - ? platformMarkerCollisionBehaviorFromCollisionBehavior( + ? platformMarkerCollisionBehaviorFromMarkerCollisionBehavior( marker.collisionBehavior) : null, ); @@ -850,7 +850,7 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { /// [PlatformMarkerCollisionBehavior] Pigeon. @visibleForTesting static PlatformMarkerCollisionBehavior - platformMarkerCollisionBehaviorFromCollisionBehavior( + platformMarkerCollisionBehaviorFromMarkerCollisionBehavior( MarkerCollisionBehavior collisionBehavior, ) { return switch (collisionBehavior) { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart index e3ed2e7ef60..32a7bc60815 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart @@ -543,7 +543,7 @@ void main() { expect( firstChanged.collisionBehavior, GoogleMapsFlutterIOS - .platformMarkerCollisionBehaviorFromCollisionBehavior( + .platformMarkerCollisionBehaviorFromMarkerCollisionBehavior( object2new.collisionBehavior), ); } @@ -576,7 +576,7 @@ void main() { expect( firstAdded.collisionBehavior, GoogleMapsFlutterIOS - .platformMarkerCollisionBehaviorFromCollisionBehavior( + .platformMarkerCollisionBehaviorFromMarkerCollisionBehavior( object3.collisionBehavior)); } }); From f35b350354a444eaea5aec66fee1e95e007262d6 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Wed, 21 May 2025 13:39:16 +0300 Subject: [PATCH 129/130] Ignore decimal point --- .../example/integration_test/advanced_markers_test.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart index fb03cb6ccd2..305b9fc2e3d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart @@ -559,7 +559,10 @@ void main() { expect(imgElement!.src, endsWith('assets/red_square.png')); expect( imgElement.getAttribute('style')?.toLowerCase(), - contains('width: 12px; height: 12px;'), + // Style must contain width and height in pixels. Regex is used to + // ignore the decimal part of the pixel size which is present when + // compiled to WebAssembly. + matches(RegExp(r'width: 12(\.0){0,1}px; height: 12(\.0){0,1}px;')), ); }); From a91792c1815fe783f511c627576c49c17c9f01a5 Mon Sep 17 00:00:00 2001 From: Alexander Troshkov <20989940+aednlaxer@users.noreply.github.com> Date: Thu, 22 May 2025 10:28:05 +0300 Subject: [PATCH 130/130] Fix num to String conversion of an icon size --- .../example/integration_test/advanced_markers_test.dart | 5 +---- .../google_maps_flutter_web/lib/src/convert.dart | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart index 305b9fc2e3d..61cb1deff60 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/advanced_markers_test.dart @@ -559,10 +559,7 @@ void main() { expect(imgElement!.src, endsWith('assets/red_square.png')); expect( imgElement.getAttribute('style')?.toLowerCase(), - // Style must contain width and height in pixels. Regex is used to - // ignore the decimal part of the pixel size which is present when - // compiled to WebAssembly. - matches(RegExp(r'width: 12(\.0){0,1}px; height: 12(\.0){0,1}px;')), + contains('width: 12.0px; height: 12.0px;'), ); }); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index dfb4533b29b..44f489e3f28 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -304,8 +304,8 @@ void _setIconStyle({ 'style', [ if (size != null) ...[ - 'width: ${size.width}px;', - 'height: ${size.height}px;', + 'width: ${size.width.toStringAsFixed(1)}px;', + 'height: ${size.height.toStringAsFixed(1)}px;', ], if (opacity != null) 'opacity: $opacity;', if (isVisible != null) 'visibility: ${isVisible ? 'visible' : 'hidden'};',