From ae246f06a4e0705ee12d67cfacf37ca7b9341b6e Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Tue, 13 Aug 2024 15:17:10 -0400 Subject: [PATCH 01/20] Update polygon pigeon --- .../pigeons/messages.dart | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) 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 778aa17f547..ecff77d6e3e 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 @@ -156,14 +156,29 @@ class PlatformMarker { /// Pigeon equivalent of the Polygon class. class PlatformPolygon { - PlatformPolygon(this.json); + PlatformPolygon({ + required this.polygonId, + required this.consumesTapEvents, + required this.fillColor, + required this.geodesic, + required this.points, + required this.holes, + required this.visible, + required this.strokeColor, + required this.strokeWidth, + required this.zIndex, + }); - /// The polygon data, as JSON. This should only be set from - /// Polygon.toJson, and the native code must interpret it according to the - /// internal implementation details of that method. - // TODO(stuartmorgan): Replace this with structured data. This exists only to - // allow incremental migration to Pigeon. - final Map json; + final String polygonId; + final bool consumesTapEvents; + final int fillColor; + final bool geodesic; + final List points; + final List?> holes; + final bool visible; + final int strokeColor; + final int strokeWidth; + final int zIndex; } /// Pigeon equivalent of the Polyline class. From 1a0ae833b1536b28e088d4a840a79d198b987ff9 Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Tue, 13 Aug 2024 15:18:08 -0400 Subject: [PATCH 02/20] Generated pigeons --- .../flutter/plugins/googlemaps/Messages.java | 1460 +++++++---------- .../lib/src/messages.g.dart | 690 ++++---- 2 files changed, 918 insertions(+), 1232 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 18a3b0e5452..9781a79199d 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,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) @@ -103,7 +104,7 @@ private PlatformRendererType(final int index) { /** * 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; @@ -163,17 +164,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 @@ -252,13 +246,13 @@ 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 { /** - * The update data, as JSON. This should only be set from CameraUpdate.toJson, and the native - * code must interpret it according to the internal implementation details of the CameraUpdate - * class. + * The update data, as JSON. This should only be set from + * CameraUpdate.toJson, and the native code must interpret it according to the + * internal implementation details of the CameraUpdate class. */ private @NonNull Object json; @@ -278,12 +272,8 @@ public void setJson(@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 json.equals(that.json); } @@ -328,7 +318,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; @@ -453,36 +443,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 { @@ -594,22 +563,13 @@ ArrayList toList() { Object consumeTapEvents = __pigeon_list.get(0); pigeonResult.setConsumeTapEvents((Boolean) consumeTapEvents); Object fillColor = __pigeon_list.get(1); - pigeonResult.setFillColor( - (fillColor == null) - ? null - : ((fillColor instanceof Integer) ? (Integer) fillColor : (Long) fillColor)); + pigeonResult.setFillColor((fillColor == null) ? null : ((fillColor instanceof Integer) ? (Integer) fillColor : (Long) fillColor)); Object strokeColor = __pigeon_list.get(2); - pigeonResult.setStrokeColor( - (strokeColor == null) - ? null - : ((strokeColor instanceof Integer) ? (Integer) strokeColor : (Long) strokeColor)); + pigeonResult.setStrokeColor((strokeColor == null) ? null : ((strokeColor instanceof Integer) ? (Integer) strokeColor : (Long) strokeColor)); Object visible = __pigeon_list.get(3); pigeonResult.setVisible((Boolean) visible); Object strokeWidth = __pigeon_list.get(4); - pigeonResult.setStrokeWidth( - (strokeWidth == null) - ? null - : ((strokeWidth instanceof Integer) ? (Integer) strokeWidth : (Long) strokeWidth)); + pigeonResult.setStrokeWidth((strokeWidth == null) ? null : ((strokeWidth instanceof Integer) ? (Integer) strokeWidth : (Long) strokeWidth)); Object zIndex = __pigeon_list.get(5); pigeonResult.setZIndex((Double) zIndex); Object center = __pigeon_list.get(6); @@ -625,12 +585,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; @@ -650,12 +611,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); } @@ -700,7 +657,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; @@ -721,12 +678,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); } @@ -771,7 +724,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Offset 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 PlatformOffset { private @NonNull Double dx; @@ -805,12 +758,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; } PlatformOffset that = (PlatformOffset) o; return dx.equals(that.dx) && dy.equals(that.dy); } @@ -867,7 +816,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; @@ -908,16 +857,10 @@ public void setAnchor(@NonNull PlatformOffset 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 @@ -984,7 +927,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; @@ -1052,6 +995,7 @@ public void setFlat(@NonNull Boolean setterArg) { this.flat = setterArg; } + /** The icon as JSON data. */ private @NonNull Object icon; public @NonNull Object getIcon() { @@ -1158,44 +1102,15 @@ public void setClusterManagerId(@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; } 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); } @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); } public static final class Builder { @@ -1377,24 +1292,137 @@ 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 { - /** - * The polygon data, as JSON. This should only be set from Polygon.toJson, and the native code - * must interpret it according to the internal implementation details of that method. - */ - private @NonNull Map json; + private @NonNull String polygonId; - public @NonNull Map getJson() { - return json; + public @NonNull String getPolygonId() { + return polygonId; } - public void setJson(@NonNull Map setterArg) { + public void setPolygonId(@NonNull String setterArg) { if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"json\" is null."); + throw new IllegalStateException("Nonnull field \"polygonId\" is null."); } - this.json = setterArg; + this.polygonId = setterArg; + } + + private @NonNull Boolean consumesTapEvents; + + public @NonNull Boolean getConsumesTapEvents() { + return consumesTapEvents; + } + + public void setConsumesTapEvents(@NonNull Boolean setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"consumesTapEvents\" is null."); + } + this.consumesTapEvents = setterArg; + } + + private @NonNull Long fillColor; + + public @NonNull Long getFillColor() { + return fillColor; + } + + public void setFillColor(@NonNull Long setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"fillColor\" is null."); + } + this.fillColor = setterArg; + } + + private @NonNull Boolean geodesic; + + public @NonNull Boolean getGeodesic() { + return geodesic; + } + + public void setGeodesic(@NonNull Boolean setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"geodesic\" is null."); + } + this.geodesic = setterArg; + } + + private @NonNull List points; + + public @NonNull List getPoints() { + return points; + } + + public void setPoints(@NonNull List setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"points\" is null."); + } + this.points = setterArg; + } + + private @NonNull List> holes; + + public @NonNull List> getHoles() { + return holes; + } + + public void setHoles(@NonNull List> setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"holes\" is null."); + } + this.holes = setterArg; + } + + private @NonNull Boolean visible; + + public @NonNull Boolean getVisible() { + return visible; + } + + public void setVisible(@NonNull Boolean setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"visible\" is null."); + } + this.visible = setterArg; + } + + private @NonNull Long strokeColor; + + public @NonNull Long getStrokeColor() { + return strokeColor; + } + + public void setStrokeColor(@NonNull Long setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"strokeColor\" is null."); + } + this.strokeColor = setterArg; + } + + private @NonNull Long strokeWidth; + + public @NonNull Long getStrokeWidth() { + return strokeWidth; + } + + public void setStrokeWidth(@NonNull Long setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"strokeWidth\" is null."); + } + this.strokeWidth = setterArg; + } + + private @NonNull Long zIndex; + + public @NonNull Long getZIndex() { + return zIndex; + } + + public void setZIndex(@NonNull Long setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"zIndex\" is null."); + } + this.zIndex = setterArg; } /** Constructor is non-public to enforce null safety; use Builder. */ @@ -1402,49 +1430,153 @@ 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; } PlatformPolygon that = (PlatformPolygon) o; - return json.equals(that.json); + 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(json); + return Objects.hash(polygonId, consumesTapEvents, fillColor, geodesic, points, holes, visible, strokeColor, strokeWidth, zIndex); } public static final class Builder { - private @Nullable Map json; + private @Nullable String polygonId; @CanIgnoreReturnValue - public @NonNull Builder setJson(@NonNull Map setterArg) { - this.json = setterArg; + public @NonNull Builder setPolygonId(@NonNull String setterArg) { + this.polygonId = setterArg; + return this; + } + + private @Nullable Boolean consumesTapEvents; + + @CanIgnoreReturnValue + public @NonNull Builder setConsumesTapEvents(@NonNull Boolean setterArg) { + this.consumesTapEvents = setterArg; + return this; + } + + private @Nullable Long fillColor; + + @CanIgnoreReturnValue + public @NonNull Builder setFillColor(@NonNull Long setterArg) { + this.fillColor = setterArg; + return this; + } + + private @Nullable Boolean geodesic; + + @CanIgnoreReturnValue + public @NonNull Builder setGeodesic(@NonNull Boolean setterArg) { + this.geodesic = setterArg; + return this; + } + + private @Nullable List points; + + @CanIgnoreReturnValue + public @NonNull Builder setPoints(@NonNull List setterArg) { + this.points = setterArg; + return this; + } + + private @Nullable List> holes; + + @CanIgnoreReturnValue + public @NonNull Builder setHoles(@NonNull List> setterArg) { + this.holes = setterArg; + return this; + } + + private @Nullable Boolean visible; + + @CanIgnoreReturnValue + public @NonNull Builder setVisible(@NonNull Boolean setterArg) { + this.visible = setterArg; + return this; + } + + private @Nullable Long strokeColor; + + @CanIgnoreReturnValue + public @NonNull Builder setStrokeColor(@NonNull Long setterArg) { + this.strokeColor = setterArg; + return this; + } + + private @Nullable Long strokeWidth; + + @CanIgnoreReturnValue + public @NonNull Builder setStrokeWidth(@NonNull Long setterArg) { + this.strokeWidth = setterArg; + return this; + } + + private @Nullable Long zIndex; + + @CanIgnoreReturnValue + public @NonNull Builder setZIndex(@NonNull Long setterArg) { + this.zIndex = setterArg; return this; } public @NonNull PlatformPolygon build() { PlatformPolygon pigeonReturn = new PlatformPolygon(); - pigeonReturn.setJson(json); + pigeonReturn.setPolygonId(polygonId); + pigeonReturn.setConsumesTapEvents(consumesTapEvents); + pigeonReturn.setFillColor(fillColor); + pigeonReturn.setGeodesic(geodesic); + pigeonReturn.setPoints(points); + pigeonReturn.setHoles(holes); + pigeonReturn.setVisible(visible); + pigeonReturn.setStrokeColor(strokeColor); + pigeonReturn.setStrokeWidth(strokeWidth); + pigeonReturn.setZIndex(zIndex); return pigeonReturn; } } @NonNull ArrayList toList() { - ArrayList toListResult = new ArrayList(1); - toListResult.add(json); + ArrayList toListResult = new ArrayList(10); + toListResult.add(polygonId); + toListResult.add(consumesTapEvents); + toListResult.add(fillColor); + toListResult.add(geodesic); + toListResult.add(points); + toListResult.add(holes); + toListResult.add(visible); + toListResult.add(strokeColor); + toListResult.add(strokeWidth); + toListResult.add(zIndex); return toListResult; } static @NonNull PlatformPolygon fromList(@NonNull ArrayList __pigeon_list) { PlatformPolygon pigeonResult = new PlatformPolygon(); - Object json = __pigeon_list.get(0); - pigeonResult.setJson((Map) json); + Object polygonId = __pigeon_list.get(0); + pigeonResult.setPolygonId((String) polygonId); + Object consumesTapEvents = __pigeon_list.get(1); + pigeonResult.setConsumesTapEvents((Boolean) consumesTapEvents); + Object fillColor = __pigeon_list.get(2); + pigeonResult.setFillColor((fillColor == null) ? null : ((fillColor instanceof Integer) ? (Integer) fillColor : (Long) fillColor)); + Object geodesic = __pigeon_list.get(3); + pigeonResult.setGeodesic((Boolean) geodesic); + Object points = __pigeon_list.get(4); + pigeonResult.setPoints((List) points); + Object holes = __pigeon_list.get(5); + pigeonResult.setHoles((List>) holes); + Object visible = __pigeon_list.get(6); + pigeonResult.setVisible((Boolean) visible); + Object strokeColor = __pigeon_list.get(7); + pigeonResult.setStrokeColor((strokeColor == null) ? null : ((strokeColor instanceof Integer) ? (Integer) strokeColor : (Long) strokeColor)); + Object strokeWidth = __pigeon_list.get(8); + pigeonResult.setStrokeWidth((strokeWidth == null) ? null : ((strokeWidth instanceof Integer) ? (Integer) strokeWidth : (Long) strokeWidth)); + Object zIndex = __pigeon_list.get(9); + pigeonResult.setZIndex((zIndex == null) ? null : ((zIndex instanceof Integer) ? (Integer) zIndex : (Long) zIndex)); return pigeonResult; } } @@ -1452,12 +1584,13 @@ 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 { /** - * The polyline data, as JSON. This should only be set from Polyline.toJson, and the native code - * must interpret it according to the internal implementation details of that method. + * The polyline data, as JSON. This should only be set from + * Polyline.toJson, and the native code must interpret it according to the + * internal implementation details of that method. */ private @NonNull Map json; @@ -1477,12 +1610,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; } PlatformPolyline that = (PlatformPolyline) o; return json.equals(that.json); } @@ -1527,7 +1656,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; @@ -1571,16 +1700,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 @@ -1637,13 +1760,9 @@ ArrayList toList() { static @NonNull PlatformTile fromList(@NonNull ArrayList __pigeon_list) { PlatformTile pigeonResult = new PlatformTile(); Object width = __pigeon_list.get(0); - pigeonResult.setWidth( - (width == null) ? null : ((width instanceof Integer) ? (Integer) width : (Long) width)); + pigeonResult.setWidth((width == null) ? null : ((width instanceof Integer) ? (Integer) width : (Long) width)); Object height = __pigeon_list.get(1); - pigeonResult.setHeight( - (height == null) - ? null - : ((height instanceof Integer) ? (Integer) height : (Long) height)); + pigeonResult.setHeight((height == null) ? null : ((height instanceof Integer) ? (Integer) height : (Long) height)); Object data = __pigeon_list.get(2); pigeonResult.setData((byte[]) data); return pigeonResult; @@ -1653,13 +1772,13 @@ 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 { /** - * The tile overlay data, as JSON. This should only be set from TileOverlay.toJson, and the - * native code must interpret it according to the internal implementation details of that - * method. + * The tile overlay data, as JSON. This should only be set from + * TileOverlay.toJson, and the native code must interpret it according to the + * internal implementation details of that method. */ private @NonNull Map json; @@ -1679,12 +1798,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; } PlatformTileOverlay that = (PlatformTileOverlay) o; return json.equals(that.json); } @@ -1729,7 +1844,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; @@ -1789,17 +1904,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 @@ -1878,7 +1986,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; @@ -1912,12 +2020,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); } @@ -1974,7 +2078,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; @@ -2008,12 +2112,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); } @@ -2070,7 +2170,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; @@ -2130,17 +2230,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 @@ -2219,10 +2312,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; @@ -2237,12 +2330,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); } @@ -2287,7 +2376,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; @@ -2412,36 +2501,15 @@ public void setInitialClusterManagers(@NonNull List sett @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); + 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); } @Override public int hashCode() { - return Objects.hash( - initialCameraPosition, - mapConfiguration, - initialCircles, - initialMarkers, - initialPolygons, - initialPolylines, - initialHeatmaps, - initialTileOverlays, - initialClusterManagers); + return Objects.hash(initialCameraPosition, mapConfiguration, initialCircles, initialMarkers, initialPolygons, initialPolylines, initialHeatmaps, initialTileOverlays, initialClusterManagers); } public static final class Builder { @@ -2513,8 +2581,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; } @@ -2549,8 +2616,7 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformMapViewCreationParams fromList( - @NonNull ArrayList __pigeon_list) { + static @NonNull PlatformMapViewCreationParams fromList(@NonNull ArrayList __pigeon_list) { PlatformMapViewCreationParams pigeonResult = new PlatformMapViewCreationParams(); Object initialCameraPosition = __pigeon_list.get(0); pigeonResult.setInitialCameraPosition((PlatformCameraPosition) initialCameraPosition); @@ -2577,7 +2643,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; @@ -2782,58 +2848,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(cloudMapId, that.cloudMapId) && 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, cloudMapId, style); } public static final class Builder { @@ -2849,8 +2872,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; } @@ -3100,7 +3122,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; @@ -3134,12 +3156,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); } @@ -3196,7 +3214,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; @@ -3256,17 +3274,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 @@ -3345,7 +3356,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; @@ -3370,12 +3381,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); } @@ -3482,19 +3489,11 @@ protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { case (byte) 150: return PlatformZoomRange.fromList((ArrayList) readValue(buffer)); case (byte) 151: - // Manual edit to fix https://github.com/flutter/flutter/issues/150108 - // the way the generator will fix it once the PR lands. - { - Object value = readValue(buffer); - return value == null ? null : PlatformMapType.values()[(int) value]; - } + Object value = readValue(buffer); + return value == null ? null : PlatformMapType.values()[(int) value]; case (byte) 152: - // Manual edit to fix https://github.com/flutter/flutter/issues/150108 - // the way the generator will fix it once the PR lands. - { - Object value = readValue(buffer); - return value == null ? null : PlatformRendererType.values()[(int) value]; - } + Object value = readValue(buffer); + return value == null ? null : PlatformRendererType.values()[(int) value]; default: return super.readValueOfType(type, buffer); } @@ -3580,6 +3579,7 @@ 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. */ @@ -3607,9 +3607,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. */ @@ -3617,82 +3617,70 @@ 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); /** 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. */ void animateCamera(@NonNull PlatformCameraUpdate cameraUpdate); /** 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(); /** Clears the cache of tiles previously requseted from the tile provider. */ void clearTileCache(@NonNull String tileOverlayId); @@ -3703,23 +3691,16 @@ void updateTileOverlays( 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) -> { @@ -3746,10 +3727,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) -> { @@ -3759,7 +3737,8 @@ public void error(Throwable error) { try { api.updateMapConfiguration(configurationArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -3772,10 +3751,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) -> { @@ -3787,7 +3763,8 @@ public void error(Throwable error) { try { api.updateCircles(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -3800,10 +3777,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) -> { @@ -3815,7 +3789,8 @@ public void error(Throwable error) { try { api.updateHeatmaps(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -3828,10 +3803,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) -> { @@ -3842,7 +3814,8 @@ public void error(Throwable error) { try { api.updateClusterManagers(toAddArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -3855,10 +3828,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) -> { @@ -3870,7 +3840,8 @@ public void error(Throwable error) { try { api.updateMarkers(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -3883,10 +3854,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) -> { @@ -3898,7 +3866,8 @@ public void error(Throwable error) { try { api.updatePolygons(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -3911,10 +3880,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) -> { @@ -3926,7 +3892,8 @@ public void error(Throwable error) { try { api.updatePolylines(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -3939,10 +3906,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) -> { @@ -3954,7 +3918,8 @@ public void error(Throwable error) { try { api.updateTileOverlays(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -3967,10 +3932,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) -> { @@ -3980,7 +3942,8 @@ public void error(Throwable error) { try { PlatformPoint output = api.getScreenCoordinate(latLngArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -3993,10 +3956,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) -> { @@ -4006,7 +3966,8 @@ public void error(Throwable error) { try { PlatformLatLng output = api.getLatLng(screenCoordinateArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4019,10 +3980,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) -> { @@ -4030,7 +3988,8 @@ public void error(Throwable error) { try { PlatformLatLngBounds output = api.getVisibleRegion(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4043,10 +4002,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) -> { @@ -4056,7 +4012,8 @@ public void error(Throwable error) { try { api.moveCamera(cameraUpdateArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4069,10 +4026,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) -> { @@ -4082,7 +4036,8 @@ public void error(Throwable error) { try { api.animateCamera(cameraUpdateArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4095,10 +4050,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) -> { @@ -4106,7 +4058,8 @@ public void error(Throwable error) { try { Double output = api.getZoomLevel(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4119,10 +4072,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) -> { @@ -4132,7 +4082,8 @@ public void error(Throwable error) { try { api.showInfoWindow(markerIdArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4145,10 +4096,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) -> { @@ -4158,7 +4106,8 @@ public void error(Throwable error) { try { api.hideInfoWindow(markerIdArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4171,10 +4120,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) -> { @@ -4184,7 +4130,8 @@ public void error(Throwable error) { try { Boolean output = api.isInfoWindowShown(markerIdArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4197,10 +4144,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) -> { @@ -4210,7 +4154,8 @@ public void error(Throwable error) { try { Boolean output = api.setStyle(styleArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4223,10 +4168,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) -> { @@ -4234,7 +4176,8 @@ public void error(Throwable error) { try { Boolean output = api.didLastStyleSucceed(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4247,10 +4190,7 @@ 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) -> { @@ -4260,7 +4200,8 @@ public void error(Throwable error) { try { api.clearTileCache(tileOverlayIdArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4273,10 +4214,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) -> { @@ -4310,470 +4248,366 @@ 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. */ + /** 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), - (String) listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), (String) 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), - (String) listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), (String) 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), - (String) listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), (String) 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), - (String) listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), (String) 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), - (String) listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), (String) 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), - (String) listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), (String) 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), - (String) listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), (String) 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), - (String) listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), (String) 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), - (String) listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), (String) 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), - (String) listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), (String) 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), - (String) listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), (String) 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), - (String) listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), (String) 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), - (String) listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), (String) 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), - (String) listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), (String) 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), - (String) listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), (String) 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) -> { @@ -4802,10 +4636,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 { @@ -4815,26 +4650,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) -> { @@ -4844,7 +4669,8 @@ static void setUp( try { api.createView(typeArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4859,75 +4685,66 @@ 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); - @NonNull + @NonNull PlatformZoomRange getZoomRange(); - @NonNull + @NonNull List getClusters(@NonNull String clusterManagerId); /** 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) -> { @@ -4935,7 +4752,8 @@ static void setUp( try { Boolean output = api.areBuildingsEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4948,10 +4766,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) -> { @@ -4959,7 +4774,8 @@ static void setUp( try { Boolean output = api.areRotateGesturesEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4972,10 +4788,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) -> { @@ -4983,7 +4796,8 @@ static void setUp( try { Boolean output = api.areZoomControlsEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4996,10 +4810,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) -> { @@ -5007,7 +4818,8 @@ static void setUp( try { Boolean output = api.areScrollGesturesEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5020,10 +4832,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) -> { @@ -5031,7 +4840,8 @@ static void setUp( try { Boolean output = api.areTiltGesturesEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5044,10 +4854,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) -> { @@ -5055,7 +4862,8 @@ static void setUp( try { Boolean output = api.areZoomGesturesEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5068,10 +4876,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) -> { @@ -5079,7 +4884,8 @@ static void setUp( try { Boolean output = api.isCompassEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5092,10 +4898,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) -> { @@ -5103,7 +4906,8 @@ static void setUp( try { Boolean output = api.isLiteModeEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5116,10 +4920,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) -> { @@ -5127,7 +4928,8 @@ static void setUp( try { Boolean output = api.isMapToolbarEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5140,10 +4942,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) -> { @@ -5151,7 +4950,8 @@ static void setUp( try { Boolean output = api.isMyLocationButtonEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5164,10 +4964,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) -> { @@ -5175,7 +4972,8 @@ static void setUp( try { Boolean output = api.isTrafficEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5188,10 +4986,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) -> { @@ -5201,7 +4996,8 @@ static void setUp( try { PlatformTileLayer output = api.getTileOverlayInfo(tileOverlayIdArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5214,10 +5010,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) -> { @@ -5225,7 +5018,8 @@ static void setUp( try { PlatformZoomRange output = api.getZoomRange(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5238,10 +5032,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) -> { @@ -5251,7 +5042,8 @@ static void setUp( try { List output = api.getClusters(clusterManagerIdArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } 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 d28a12eb1b5..85dab564174 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,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 []; } @@ -301,6 +300,7 @@ class PlatformMarker { bool flat; + /// The icon as JSON data. Object icon; PlatformInfoWindow infoWindow; @@ -358,24 +358,66 @@ class PlatformMarker { /// Pigeon equivalent of the Polygon class. class PlatformPolygon { PlatformPolygon({ - required this.json, + required this.polygonId, + required this.consumesTapEvents, + required this.fillColor, + required this.geodesic, + required this.points, + required this.holes, + required this.visible, + required this.strokeColor, + required this.strokeWidth, + required this.zIndex, }); - /// The polygon data, as JSON. This should only be set from - /// Polygon.toJson, and the native code must interpret it according to the - /// internal implementation details of that method. - Map json; + String polygonId; + + bool consumesTapEvents; + + int fillColor; + + bool geodesic; + + List points; + + List?> holes; + + bool visible; + + int strokeColor; + + int strokeWidth; + + int zIndex; Object encode() { return [ - json, + polygonId, + consumesTapEvents, + fillColor, + geodesic, + points, + holes, + visible, + strokeColor, + strokeWidth, + zIndex, ]; } static PlatformPolygon decode(Object result) { result as List; return PlatformPolygon( - json: (result[0] as Map?)!.cast(), + polygonId: result[0]! as String, + consumesTapEvents: result[1]! as bool, + fillColor: result[2]! as int, + geodesic: result[3]! as bool, + points: (result[4] as List?)!.cast(), + holes: (result[5] as List?)!.cast?>(), + visible: result[6]! as bool, + strokeColor: result[7]! as int, + strokeWidth: result[8]! as int, + zIndex: result[9]! as int, ); } } @@ -669,13 +711,10 @@ class PlatformMapViewCreationParams { initialCircles: (result[2] as List?)!.cast(), initialMarkers: (result[3] as List?)!.cast(), initialPolygons: (result[4] as List?)!.cast(), - initialPolylines: - (result[5] 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(), + initialTileOverlays: (result[7] as List?)!.cast(), + initialClusterManagers: (result[8] as List?)!.cast(), ); } } @@ -888,6 +927,7 @@ class PlatformZoomRange { } } + class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -895,73 +935,73 @@ class _PigeonCodec extends StandardMessageCodec { if (value is PlatformCameraPosition) { buffer.putUint8(129); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { + } else if (value is PlatformCameraUpdate) { buffer.putUint8(130); writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { + } else if (value is PlatformCircle) { buffer.putUint8(131); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { + } else if (value is PlatformHeatmap) { buffer.putUint8(132); writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { + } else if (value is PlatformClusterManager) { buffer.putUint8(133); writeValue(buffer, value.encode()); - } else if (value is PlatformOffset) { + } else if (value is PlatformOffset) { buffer.putUint8(134); writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { + } else if (value is PlatformInfoWindow) { buffer.putUint8(135); writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { + } else if (value is PlatformMarker) { buffer.putUint8(136); writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { + } else if (value is PlatformPolygon) { buffer.putUint8(137); writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { + } else if (value is PlatformPolyline) { buffer.putUint8(138); writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { + } else if (value is PlatformTile) { buffer.putUint8(139); writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { + } else if (value is PlatformTileOverlay) { buffer.putUint8(140); writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { + } else if (value is PlatformEdgeInsets) { buffer.putUint8(141); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { + } else if (value is PlatformLatLng) { buffer.putUint8(142); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { + } else if (value is PlatformLatLngBounds) { buffer.putUint8(143); writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { + } else if (value is PlatformCluster) { buffer.putUint8(144); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { + } else if (value is PlatformCameraTargetBounds) { buffer.putUint8(145); writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { + } else if (value is PlatformMapViewCreationParams) { buffer.putUint8(146); writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { + } else if (value is PlatformMapConfiguration) { buffer.putUint8(147); writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { + } else if (value is PlatformPoint) { buffer.putUint8(148); writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { + } else if (value is PlatformTileLayer) { buffer.putUint8(149); writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { + } else if (value is PlatformZoomRange) { buffer.putUint8(150); writeValue(buffer, value.encode()); - } else if (value is PlatformMapType) { + } else if (value is PlatformMapType) { buffer.putUint8(151); writeValue(buffer, value.index); - } else if (value is PlatformRendererType) { + } else if (value is PlatformRendererType) { buffer.putUint8(152); writeValue(buffer, value.index); } else { @@ -972,54 +1012,54 @@ class _PigeonCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 129: + case 129: return PlatformCameraPosition.decode(readValue(buffer)!); - case 130: + case 130: return PlatformCameraUpdate.decode(readValue(buffer)!); - case 131: + case 131: return PlatformCircle.decode(readValue(buffer)!); - case 132: + case 132: return PlatformHeatmap.decode(readValue(buffer)!); - case 133: + case 133: return PlatformClusterManager.decode(readValue(buffer)!); - case 134: + case 134: return PlatformOffset.decode(readValue(buffer)!); - case 135: + case 135: return PlatformInfoWindow.decode(readValue(buffer)!); - case 136: + case 136: return PlatformMarker.decode(readValue(buffer)!); - case 137: + case 137: return PlatformPolygon.decode(readValue(buffer)!); - case 138: + case 138: return PlatformPolyline.decode(readValue(buffer)!); - case 139: + case 139: return PlatformTile.decode(readValue(buffer)!); - case 140: + case 140: return PlatformTileOverlay.decode(readValue(buffer)!); - case 141: + case 141: return PlatformEdgeInsets.decode(readValue(buffer)!); - case 142: + case 142: return PlatformLatLng.decode(readValue(buffer)!); - case 143: + case 143: return PlatformLatLngBounds.decode(readValue(buffer)!); - case 144: + case 144: return PlatformCluster.decode(readValue(buffer)!); - case 145: + case 145: return PlatformCameraTargetBounds.decode(readValue(buffer)!); - case 146: + case 146: return PlatformMapViewCreationParams.decode(readValue(buffer)!); - case 147: + case 147: return PlatformMapConfiguration.decode(readValue(buffer)!); - case 148: + case 148: return PlatformPoint.decode(readValue(buffer)!); - case 149: + case 149: return PlatformTileLayer.decode(readValue(buffer)!); - case 150: + case 150: return PlatformZoomRange.decode(readValue(buffer)!); - case 151: + case 151: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformMapType.values[value]; - case 152: + case 152: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformRendererType.values[value]; default: @@ -1037,8 +1077,7 @@ class MapsApi { /// BinaryMessenger will be used which routes to the host platform. MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : __pigeon_binaryMessenger = binaryMessenger, - __pigeon_messageChannelSuffix = - messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + __pigeon_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? __pigeon_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -1047,10 +1086,8 @@ class MapsApi { /// Returns once the map instance is available. Future waitForMap() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1074,12 +1111,9 @@ 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 __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + Future updateMapConfiguration(PlatformMapConfiguration configuration) async { + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1100,18 +1134,15 @@ class MapsApi { } /// Updates the set of circles on the map. - Future updateCircles(List toAdd, - List toChange, List idsToRemove) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + Future updateCircles(List toAdd, List toChange, List idsToRemove) async { + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = await __pigeon_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? __pigeon_replyList = + await __pigeon_channel.send([toAdd, toChange, idsToRemove]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -1126,18 +1157,15 @@ class MapsApi { } /// Updates the set of heatmaps on the map. - Future updateHeatmaps(List toAdd, - List toChange, List idsToRemove) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = await __pigeon_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? __pigeon_replyList = + await __pigeon_channel.send([toAdd, toChange, idsToRemove]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -1152,18 +1180,15 @@ class MapsApi { } /// Updates the set of custer managers for clusters on the map. - Future updateClusterManagers( - List toAdd, List idsToRemove) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + Future updateClusterManagers(List toAdd, List idsToRemove) async { + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = await __pigeon_channel - .send([toAdd, idsToRemove]) as List?; + final List? __pigeon_replyList = + await __pigeon_channel.send([toAdd, idsToRemove]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -1178,18 +1203,15 @@ class MapsApi { } /// Updates the set of markers on the map. - Future updateMarkers(List toAdd, - List toChange, List idsToRemove) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = await __pigeon_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? __pigeon_replyList = + await __pigeon_channel.send([toAdd, toChange, idsToRemove]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -1204,18 +1226,15 @@ class MapsApi { } /// Updates the set of polygonss on the map. - Future updatePolygons(List toAdd, - List toChange, List idsToRemove) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = await __pigeon_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? __pigeon_replyList = + await __pigeon_channel.send([toAdd, toChange, idsToRemove]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -1230,18 +1249,15 @@ class MapsApi { } /// Updates the set of polylines on the map. - Future updatePolylines(List toAdd, - List toChange, List idsToRemove) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = await __pigeon_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? __pigeon_replyList = + await __pigeon_channel.send([toAdd, toChange, idsToRemove]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -1256,18 +1272,15 @@ class MapsApi { } /// Updates the set of tile overlays on the map. - Future updateTileOverlays(List toAdd, - List toChange, List idsToRemove) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = await __pigeon_channel - .send([toAdd, toChange, idsToRemove]) as List?; + final List? __pigeon_replyList = + await __pigeon_channel.send([toAdd, toChange, idsToRemove]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -1283,10 +1296,8 @@ class MapsApi { /// Gets the screen coordinate for the given map location. Future getScreenCoordinate(PlatformLatLng latLng) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1313,16 +1324,14 @@ class MapsApi { /// Gets the map location for the given screen coordinate. Future getLatLng(PlatformPoint screenCoordinate) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = await __pigeon_channel - .send([screenCoordinate]) as List?; + final List? __pigeon_replyList = + await __pigeon_channel.send([screenCoordinate]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -1343,10 +1352,8 @@ class MapsApi { /// Gets the map region currently displayed on the map. Future getVisibleRegion() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1374,10 +1381,8 @@ class MapsApi { /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. Future moveCamera(PlatformCameraUpdate cameraUpdate) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1399,10 +1404,8 @@ class MapsApi { /// Moves the camera according to [cameraUpdate], animating the update. Future animateCamera(PlatformCameraUpdate cameraUpdate) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1424,10 +1427,8 @@ class MapsApi { /// Gets the current map zoom level. Future getZoomLevel() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1454,10 +1455,8 @@ class MapsApi { /// Show the info window for the marker with the given ID. Future showInfoWindow(String markerId) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1479,10 +1478,8 @@ class MapsApi { /// Hide the info window for the marker with the given ID. Future hideInfoWindow(String markerId) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1505,10 +1502,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 __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1539,10 +1534,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 __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1573,10 +1566,8 @@ 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 __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1603,10 +1594,8 @@ class MapsApi { /// Clears the cache of tiles previously requseted from the tile provider. Future clearTileCache(String tileOverlayId) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1628,10 +1617,8 @@ class MapsApi { /// Takes a snapshot of the map and returns its image data. Future takeSnapshot() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1703,21 +1690,13 @@ abstract class MapsCallbackApi { void onPolylineTap(String polylineId); /// 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 __pigeon_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); @@ -1728,28 +1707,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 __pigeon_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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 { @@ -1757,18 +1732,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 __pigeon_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); @@ -1779,25 +1751,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 __pigeon_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -1807,25 +1776,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 __pigeon_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -1835,25 +1801,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 __pigeon_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -1863,25 +1826,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 __pigeon_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -1894,25 +1854,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 __pigeon_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -1925,25 +1882,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 __pigeon_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -1956,25 +1910,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 __pigeon_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -1984,25 +1935,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 __pigeon_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -2012,25 +1960,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 __pigeon_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -2040,25 +1985,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 __pigeon_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -2068,25 +2010,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 __pigeon_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -2096,25 +2035,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 __pigeon_channel = BasicMessageChannel< - Object?>( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', - pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -2126,14 +2062,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())); } }); } @@ -2146,11 +2080,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 = ''}) : __pigeon_binaryMessenger = binaryMessenger, - __pigeon_messageChannelSuffix = - messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + __pigeon_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? __pigeon_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -2163,12 +2095,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 __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + Future initializeWithPreferredRenderer(PlatformRendererType? type) async { + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2201,11 +2130,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 = ''}) : __pigeon_binaryMessenger = binaryMessenger, - __pigeon_messageChannelSuffix = - messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + __pigeon_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? __pigeon_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -2213,10 +2140,8 @@ class MapsPlatformViewApi { final String __pigeon_messageChannelSuffix; Future createView(PlatformMapViewCreationParams? type) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2242,11 +2167,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 = ''}) : __pigeon_binaryMessenger = binaryMessenger, - __pigeon_messageChannelSuffix = - messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + __pigeon_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? __pigeon_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -2254,10 +2177,8 @@ class MapsInspectorApi { final String __pigeon_messageChannelSuffix; Future areBuildingsEnabled() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2283,10 +2204,8 @@ class MapsInspectorApi { } Future areRotateGesturesEnabled() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2312,10 +2231,8 @@ class MapsInspectorApi { } Future areZoomControlsEnabled() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2341,10 +2258,8 @@ class MapsInspectorApi { } Future areScrollGesturesEnabled() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2370,10 +2285,8 @@ class MapsInspectorApi { } Future areTiltGesturesEnabled() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2399,10 +2312,8 @@ class MapsInspectorApi { } Future areZoomGesturesEnabled() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2428,10 +2339,8 @@ class MapsInspectorApi { } Future isCompassEnabled() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2457,10 +2366,8 @@ class MapsInspectorApi { } Future isLiteModeEnabled() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2481,10 +2388,8 @@ class MapsInspectorApi { } Future isMapToolbarEnabled() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2510,10 +2415,8 @@ class MapsInspectorApi { } Future isMyLocationButtonEnabled() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2539,10 +2442,8 @@ class MapsInspectorApi { } Future isTrafficEnabled() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2568,10 +2469,8 @@ class MapsInspectorApi { } Future getTileOverlayInfo(String tileOverlayId) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2592,10 +2491,8 @@ class MapsInspectorApi { } Future getZoomRange() async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2621,16 +2518,14 @@ class MapsInspectorApi { } Future> getClusters(String clusterManagerId) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = - BasicMessageChannel( + final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = await __pigeon_channel - .send([clusterManagerId]) as List?; + final List? __pigeon_replyList = + await __pigeon_channel.send([clusterManagerId]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -2645,8 +2540,7 @@ class MapsInspectorApi { message: 'Host platform returned null value for non-null return value.', ); } else { - return (__pigeon_replyList[0] as List?)! - .cast(); + return (__pigeon_replyList[0] as List?)!.cast(); } } } From 29703f991776dcfa2c5a41362323520dffa35711 Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Tue, 13 Aug 2024 15:34:50 -0400 Subject: [PATCH 03/20] Pigeonify dart --- .../lib/src/google_maps_flutter_android.dart | 18 ++++++++--- .../google_maps_flutter_android_test.dart | 32 +++++++++++++++++-- 2 files changed, 44 insertions(+), 6 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 b7051ca679e..f78fa69f4e1 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 @@ -746,10 +746,20 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { } static PlatformPolygon _platformPolygonFromPolygon(Polygon polygon) { - // This cast is not ideal, but the Java code already assumes this format. - // See the TODOs at the top of this file and on the 'json' field in - // messages.dart. - return PlatformPolygon(json: polygon.toJson() as Map); + final List points = polygon.points.map(_platformLatLngFromLatLng).toList(); + final List?> holes = polygon.holes.map((List hole) {return hole.map(_platformLatLngFromLatLng).toList();}).toList(); + return PlatformPolygon( + polygonId: polygon.polygonId.value, + fillColor: polygon.fillColor.value, + geodesic: polygon.geodesic, + consumesTapEvents: polygon.consumeTapEvents, + points: points, + holes: holes, + strokeColor: polygon.strokeColor.value, + strokeWidth: polygon.strokeWidth, + zIndex: polygon.zIndex, + visible: polygon.visible, + ); } static PlatformPolyline _platformPolylineFromPolyline(Polyline polyline) { 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 95a06148a3b..4aec600514a 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 @@ -481,12 +481,40 @@ void main() { // Object one should be removed. expect(toRemove.length, 1); expect(toRemove.first, object1.polygonId.value); + void expectPolygon(PlatformPolygon actual, Polygon expected) { + final List encoded = actual.encode() as List; + expect(encoded.sublist(0, 4), [ + expected.polygonId.value, + expected.consumeTapEvents, + expected.fillColor.value, + expected.geodesic, + ]); + expect(actual.points.length, expected.points.length); + for (final (int i, PlatformLatLng? point) in actual.points.indexed) { + expect(point?.latitude, actual.points[i]?.latitude); + expect(point?.longitude, actual.points[i]?.longitude); + } + expect(actual.holes.length, expected.holes.length); + for (final (int i, List? hole) in actual.holes.indexed) { + final List expectedHole = expected.holes[i]; + for (final (int j, PlatformLatLng? point) in hole!.indexed) { + expect(point?.latitude, expectedHole[j].latitude); + expect(point?.longitude, expectedHole[j].longitude); + } + } + expect(encoded?.sublist(6), [ + expected.visible, + expected.strokeColor.value, + expected.strokeWidth, + expected.zIndex, + ]); + } // Object two should be changed. expect(toChange.length, 1); - expect(toChange.first?.json, object2new.toJson()); + expectPolygon(toChange.first!, object2new); // Object 3 should be added. expect(toAdd.length, 1); - expect(toAdd.first?.json, object3.toJson()); + expectPolygon(toAdd.first!, object3); }); test('updatePolylines passes expected arguments', () async { From 9181f19ff91f0ee68bf0cec99f936be16076af24 Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Tue, 13 Aug 2024 15:43:20 -0400 Subject: [PATCH 04/20] Java conversion --- .../flutter/plugins/googlemaps/Convert.java | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) 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 91c039e2537..a5c3aeb73a3 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 @@ -690,6 +690,19 @@ private static void interpretInfoWindowOptions( infoWindowAnchor.getDx().floatValue(), infoWindowAnchor.getDy().floatValue()); } + static String interpretPolygonOptions(Messages.PlatformPolygon polygon, PolygonOptionsSink sink) { + sink.setConsumeTapEvents(polygon.getConsumesTapEvents()); + sink.setGeodesic(polygon.getGeodesic()); + sink.setVisible(polygon.getVisible()); + sink.setFillColor(polygon.getFillColor().intValue()); + sink.setStrokeColor(polygon.getStrokeColor().intValue()); + sink.setStrokeWidth(polygon.getStrokeWidth()); + sink.setZIndex(polygon.getZIndex()); + sink.setPoints(toPoints(polygon.getPoints())); + sink.setHoles(toHoles(polygon.getHoles())); + return polygon.getPolygonId(); + } + static String interpretPolygonOptions(Map data, PolygonOptionsSink sink) { final Object consumeTapEvents = data.get("consumeTapEvents"); if (consumeTapEvents != null) { @@ -862,6 +875,15 @@ static List toPoints(Object o) { return points; } + static List toPoints(List data) { + final List points = new ArrayList<>(data.size()); + + for (Messages.PlatformLatLng rawPoint : data) { + points.add(new LatLng(rawPoint.getLatitude(), rawPoint.getLongitude())); + } + return points; + } + /** * Converts the given object to a list of WeightedLatLng objects. * @@ -928,6 +950,15 @@ private static List> toHoles(Object o) { return holes; } + private static List> toHoles(List> data) { + final List> holes = new ArrayList<>(data.size()); + + for (List rawHole : data) { + holes.add(toPoints(rawHole)); + } + return holes; + } + private static List toPattern(Object o) { final List data = toList(o); From 2711c8fb416f805138bfbb7eee23874b2fdeed3d Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Tue, 13 Aug 2024 15:47:18 -0400 Subject: [PATCH 05/20] Java conversion --- .../flutter/plugins/googlemaps/Messages.java | 6 ++++-- .../plugins/googlemaps/PolygonsController.java | 18 ++++++++++++++++-- 2 files changed, 20 insertions(+), 4 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 9781a79199d..b68f6587b6a 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 @@ -3488,12 +3488,14 @@ protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { return PlatformTileLayer.fromList((ArrayList) readValue(buffer)); case (byte) 150: return PlatformZoomRange.fromList((ArrayList) readValue(buffer)); - case (byte) 151: + case (byte) 151: { Object value = readValue(buffer); return value == null ? null : PlatformMapType.values()[(int) value]; - case (byte) 152: + } + case (byte) 152: { Object value = readValue(buffer); return value == null ? null : PlatformRendererType.values()[(int) value]; + } default: return super.readValueOfType(type, buffer); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/PolygonsController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/PolygonsController.java index 57d7a6a5271..9dd19e6d0a2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/PolygonsController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/PolygonsController.java @@ -34,13 +34,13 @@ void setGoogleMap(GoogleMap googleMap) { void addPolygons(@NonNull List polygonsToAdd) { for (Messages.PlatformPolygon polygonToAdd : polygonsToAdd) { - addJsonPolygon(polygonToAdd.getJson()); + addPolygon(polygonToAdd); } } void changePolygons(@NonNull List polygonsToChange) { for (Messages.PlatformPolygon polygonToChange : polygonsToChange) { - changeJsonPolygon(polygonToChange.getJson()); + changePolygon(polygonToChange); } } @@ -77,6 +77,13 @@ private void addJsonPolygon(Map polygon) { addPolygon(polygonId, options, polygonBuilder.consumeTapEvents()); } + private void addPolygon(@NonNull Messages.PlatformPolygon polygon) { + PolygonBuilder polygonBuilder = new PolygonBuilder(density); + String polygonId = Convert.interpretPolygonOptions(polygon, polygonBuilder); + PolygonOptions options = polygonBuilder.build(); + addPolygon(polygonId, options, polygonBuilder.consumeTapEvents()); + } + private void addPolygon( String polygonId, PolygonOptions polygonOptions, boolean consumeTapEvents) { final Polygon polygon = googleMap.addPolygon(polygonOptions); @@ -96,6 +103,13 @@ private void changeJsonPolygon(Map polygon) { } } + private void changePolygon(@NonNull Messages.PlatformPolygon polygon) { + PolygonController polygonController = polygonIdToController.get(polygon.getPolygonId()); + if (polygonController != null) { + Convert.interpretPolygonOptions(polygon, polygonController); + } + } + private static String getPolygonId(Map polygon) { return (String) polygon.get("polygonId"); } From 9fbcd49ab7702443af64fe4fe33e15395ad74320 Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Tue, 13 Aug 2024 15:50:57 -0400 Subject: [PATCH 06/20] Remove dead code --- .../flutter/plugins/googlemaps/Convert.java | 55 ------------------- .../googlemaps/PolygonsController.java | 21 ------- .../plugins/googlemaps/ConvertTest.java | 12 ++++ 3 files changed, 12 insertions(+), 76 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 a5c3aeb73a3..e3c8e3a4ee5 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 @@ -703,51 +703,6 @@ static String interpretPolygonOptions(Messages.PlatformPolygon polygon, PolygonO return polygon.getPolygonId(); } - static String interpretPolygonOptions(Map data, PolygonOptionsSink sink) { - final Object consumeTapEvents = data.get("consumeTapEvents"); - if (consumeTapEvents != null) { - sink.setConsumeTapEvents(toBoolean(consumeTapEvents)); - } - final Object geodesic = data.get("geodesic"); - if (geodesic != null) { - sink.setGeodesic(toBoolean(geodesic)); - } - final Object visible = data.get("visible"); - if (visible != null) { - sink.setVisible(toBoolean(visible)); - } - final Object fillColor = data.get("fillColor"); - if (fillColor != null) { - sink.setFillColor(toInt(fillColor)); - } - final Object strokeColor = data.get("strokeColor"); - if (strokeColor != null) { - sink.setStrokeColor(toInt(strokeColor)); - } - final Object strokeWidth = data.get("strokeWidth"); - if (strokeWidth != null) { - sink.setStrokeWidth(toInt(strokeWidth)); - } - final Object zIndex = data.get("zIndex"); - if (zIndex != null) { - sink.setZIndex(toFloat(zIndex)); - } - final Object points = data.get("points"); - if (points != null) { - sink.setPoints(toPoints(points)); - } - final Object holes = data.get("holes"); - if (holes != null) { - sink.setHoles(toHoles(holes)); - } - final String polygonId = (String) data.get("polygonId"); - if (polygonId == null) { - throw new IllegalArgumentException("polygonId was null"); - } else { - return polygonId; - } - } - static String interpretPolylineOptions( Map data, PolylineOptionsSink sink, AssetManager assetManager, float density) { final Object consumeTapEvents = data.get("consumeTapEvents"); @@ -940,16 +895,6 @@ static Gradient toGradient(Object o) { return new Gradient(colors, startPoints, colorMapSize); } - private static List> toHoles(Object o) { - final List data = toList(o); - final List> holes = new ArrayList<>(data.size()); - - for (Object rawHole : data) { - holes.add(toPoints(rawHole)); - } - return holes; - } - private static List> toHoles(List> data) { final List> holes = new ArrayList<>(data.size()); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/PolygonsController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/PolygonsController.java index 9dd19e6d0a2..98a43477765 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/PolygonsController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/PolygonsController.java @@ -67,16 +67,6 @@ boolean onPolygonTap(String googlePolygonId) { return false; } - private void addJsonPolygon(Map polygon) { - if (polygon == null) { - return; - } - PolygonBuilder polygonBuilder = new PolygonBuilder(density); - String polygonId = Convert.interpretPolygonOptions(polygon, polygonBuilder); - PolygonOptions options = polygonBuilder.build(); - addPolygon(polygonId, options, polygonBuilder.consumeTapEvents()); - } - private void addPolygon(@NonNull Messages.PlatformPolygon polygon) { PolygonBuilder polygonBuilder = new PolygonBuilder(density); String polygonId = Convert.interpretPolygonOptions(polygon, polygonBuilder); @@ -92,17 +82,6 @@ private void addPolygon( googleMapsPolygonIdToDartPolygonId.put(polygon.getId(), polygonId); } - private void changeJsonPolygon(Map polygon) { - if (polygon == null) { - return; - } - String polygonId = getPolygonId(polygon); - PolygonController polygonController = polygonIdToController.get(polygonId); - if (polygonController != null) { - Convert.interpretPolygonOptions(polygon, polygonController); - } - } - private void changePolygon(@NonNull Messages.PlatformPolygon polygon) { PolygonController polygonController = polygonIdToController.get(polygon.getPolygonId()); if (polygonController != null) { 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 1efab354086..87bf6291146 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 @@ -44,6 +44,7 @@ import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -100,6 +101,17 @@ public void ConvertToPointsConvertsThePointsWithFullPrecision() { Assert.assertEquals(longitude, latLng.longitude, 1e-15); } + @Test + public void ConvertToPointsPlatformConvertsThePointsWithFullPrecision() { + double latitude = 43.03725568057; + double longitude = -87.90466904649; + Messages.PlatformLatLng platLng = new Messages.PlatformLatLng.Builder().build(); + List latLngs = Convert.toPoints(Collections.singletonList(platLng)); + LatLng latLng = latLngs.get(0); + Assert.assertEquals(latitude, latLng.latitude, 1e-15); + Assert.assertEquals(longitude, latLng.longitude, 1e-15); + } + @Test public void ConvertClusterToPigeonReturnsCorrectData() { String clusterManagerId = "cm_1"; From 58fba4d0966998944d55a5d8eb0fd07dba1d37cb Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Tue, 13 Aug 2024 15:54:17 -0400 Subject: [PATCH 07/20] Define polyline pigeon --- .../pigeons/messages.dart | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) 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 ecff77d6e3e..2131fdfec42 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 @@ -183,14 +183,35 @@ class PlatformPolygon { /// Pigeon equivalent of the Polyline class. class PlatformPolyline { - PlatformPolyline(this.json); + PlatformPolyline({ + required this.polylineId, + required this.consumesTapEvents, + required this.color, + required this.geodesic, + required this.jointType, + required this.patterns, + required this.points, + required this.startCap, + required this.endCap, + required this.visible, + required this.width, + required this.zIndex, + }); - /// The polyline data, as JSON. This should only be set from - /// Polyline.toJson, and the native code must interpret it according to the - /// internal implementation details of that method. - // TODO(stuartmorgan): Replace this with structured data. This exists only to - // allow incremental migration to Pigeon. - final Map json; + final int polylineId; + final bool consumesTapEvents; + final int color; + final bool geodesic; + // TODO(schectman): convert to structured data. + final Object jointType; + // TODO(schectman): convert to structured data. + final List patterns; + final List points; + final Object startCap; + final Object endCap; + final bool visible; + final int width; + final int zIndex; } /// Pigeon equivalent of the Tile class. From 2f21d479fb87066ccc59d1e84b9694007ae0e7eb Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Tue, 13 Aug 2024 16:58:03 -0400 Subject: [PATCH 08/20] Dart side --- .../flutter/plugins/googlemaps/Messages.java | 312 ++++++++++++++++-- .../lib/src/google_maps_flutter_android.dart | 20 +- .../lib/src/messages.g.dart | 66 +++- .../pigeons/messages.dart | 5 +- .../google_maps_flutter_android_test.dart | 30 +- 5 files changed, 395 insertions(+), 38 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 b68f6587b6a..b4077efb877 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 @@ -1587,22 +1587,160 @@ ArrayList toList() { * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformPolyline { - /** - * The polyline data, as JSON. This should only be set from - * Polyline.toJson, and the native code must interpret it according to the - * internal implementation details of that method. - */ - private @NonNull Map json; + private @NonNull String polylineId; - public @NonNull Map getJson() { - return json; + public @NonNull String getPolylineId() { + return polylineId; } - public void setJson(@NonNull Map setterArg) { + public void setPolylineId(@NonNull String setterArg) { if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"json\" is null."); + throw new IllegalStateException("Nonnull field \"polylineId\" is null."); } - this.json = setterArg; + this.polylineId = setterArg; + } + + private @NonNull Boolean consumesTapEvents; + + public @NonNull Boolean getConsumesTapEvents() { + return consumesTapEvents; + } + + public void setConsumesTapEvents(@NonNull Boolean setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"consumesTapEvents\" is null."); + } + this.consumesTapEvents = setterArg; + } + + private @NonNull Long color; + + public @NonNull Long getColor() { + return color; + } + + public void setColor(@NonNull Long setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"color\" is null."); + } + this.color = setterArg; + } + + private @NonNull Boolean geodesic; + + public @NonNull Boolean getGeodesic() { + return geodesic; + } + + public void setGeodesic(@NonNull Boolean setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"geodesic\" is null."); + } + this.geodesic = setterArg; + } + + private @NonNull Long jointType; + + public @NonNull Long getJointType() { + return jointType; + } + + public void setJointType(@NonNull Long setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"jointType\" is null."); + } + this.jointType = setterArg; + } + + private @NonNull List patterns; + + public @NonNull List getPatterns() { + return patterns; + } + + public void setPatterns(@NonNull List setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"patterns\" is null."); + } + this.patterns = setterArg; + } + + private @NonNull List points; + + public @NonNull List getPoints() { + return points; + } + + public void setPoints(@NonNull List setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"points\" is null."); + } + this.points = setterArg; + } + + private @NonNull Object startCap; + + public @NonNull Object getStartCap() { + return startCap; + } + + public void setStartCap(@NonNull Object setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"startCap\" is null."); + } + this.startCap = setterArg; + } + + private @NonNull Object endCap; + + public @NonNull Object getEndCap() { + return endCap; + } + + public void setEndCap(@NonNull Object setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"endCap\" is null."); + } + this.endCap = setterArg; + } + + private @NonNull Boolean visible; + + public @NonNull Boolean getVisible() { + return visible; + } + + public void setVisible(@NonNull Boolean setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"visible\" is null."); + } + this.visible = setterArg; + } + + private @NonNull Long width; + + public @NonNull Long getWidth() { + return width; + } + + public void setWidth(@NonNull Long setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"width\" is null."); + } + this.width = setterArg; + } + + private @NonNull Long zIndex; + + public @NonNull Long getZIndex() { + return zIndex; + } + + public void setZIndex(@NonNull Long setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"zIndex\" is null."); + } + this.zIndex = setterArg; } /** Constructor is non-public to enforce null safety; use Builder. */ @@ -1613,42 +1751,174 @@ public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PlatformPolyline that = (PlatformPolyline) o; - return json.equals(that.json); + 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(json); + return Objects.hash(polylineId, consumesTapEvents, color, geodesic, jointType, patterns, points, startCap, endCap, visible, width, zIndex); } public static final class Builder { - private @Nullable Map json; + private @Nullable String polylineId; @CanIgnoreReturnValue - public @NonNull Builder setJson(@NonNull Map setterArg) { - this.json = setterArg; + public @NonNull Builder setPolylineId(@NonNull String setterArg) { + this.polylineId = setterArg; + return this; + } + + private @Nullable Boolean consumesTapEvents; + + @CanIgnoreReturnValue + public @NonNull Builder setConsumesTapEvents(@NonNull Boolean setterArg) { + this.consumesTapEvents = setterArg; + return this; + } + + private @Nullable Long color; + + @CanIgnoreReturnValue + public @NonNull Builder setColor(@NonNull Long setterArg) { + this.color = setterArg; + return this; + } + + private @Nullable Boolean geodesic; + + @CanIgnoreReturnValue + public @NonNull Builder setGeodesic(@NonNull Boolean setterArg) { + this.geodesic = setterArg; + return this; + } + + private @Nullable Long jointType; + + @CanIgnoreReturnValue + public @NonNull Builder setJointType(@NonNull Long setterArg) { + this.jointType = setterArg; + return this; + } + + private @Nullable List patterns; + + @CanIgnoreReturnValue + public @NonNull Builder setPatterns(@NonNull List setterArg) { + this.patterns = setterArg; + return this; + } + + private @Nullable List points; + + @CanIgnoreReturnValue + public @NonNull Builder setPoints(@NonNull List setterArg) { + this.points = setterArg; + return this; + } + + private @Nullable Object startCap; + + @CanIgnoreReturnValue + public @NonNull Builder setStartCap(@NonNull Object setterArg) { + this.startCap = setterArg; + return this; + } + + private @Nullable Object endCap; + + @CanIgnoreReturnValue + public @NonNull Builder setEndCap(@NonNull Object setterArg) { + this.endCap = setterArg; + return this; + } + + private @Nullable Boolean visible; + + @CanIgnoreReturnValue + public @NonNull Builder setVisible(@NonNull Boolean setterArg) { + this.visible = setterArg; + return this; + } + + private @Nullable Long width; + + @CanIgnoreReturnValue + public @NonNull Builder setWidth(@NonNull Long setterArg) { + this.width = setterArg; + return this; + } + + private @Nullable Long zIndex; + + @CanIgnoreReturnValue + public @NonNull Builder setZIndex(@NonNull Long setterArg) { + this.zIndex = setterArg; return this; } public @NonNull PlatformPolyline build() { PlatformPolyline pigeonReturn = new PlatformPolyline(); - pigeonReturn.setJson(json); + pigeonReturn.setPolylineId(polylineId); + pigeonReturn.setConsumesTapEvents(consumesTapEvents); + pigeonReturn.setColor(color); + pigeonReturn.setGeodesic(geodesic); + pigeonReturn.setJointType(jointType); + pigeonReturn.setPatterns(patterns); + pigeonReturn.setPoints(points); + pigeonReturn.setStartCap(startCap); + pigeonReturn.setEndCap(endCap); + pigeonReturn.setVisible(visible); + pigeonReturn.setWidth(width); + pigeonReturn.setZIndex(zIndex); return pigeonReturn; } } @NonNull ArrayList toList() { - ArrayList toListResult = new ArrayList(1); - toListResult.add(json); + ArrayList toListResult = new ArrayList(12); + toListResult.add(polylineId); + toListResult.add(consumesTapEvents); + toListResult.add(color); + toListResult.add(geodesic); + toListResult.add(jointType); + toListResult.add(patterns); + toListResult.add(points); + toListResult.add(startCap); + toListResult.add(endCap); + toListResult.add(visible); + toListResult.add(width); + toListResult.add(zIndex); return toListResult; } static @NonNull PlatformPolyline fromList(@NonNull ArrayList __pigeon_list) { PlatformPolyline pigeonResult = new PlatformPolyline(); - Object json = __pigeon_list.get(0); - pigeonResult.setJson((Map) json); + Object polylineId = __pigeon_list.get(0); + pigeonResult.setPolylineId((String) polylineId); + Object consumesTapEvents = __pigeon_list.get(1); + pigeonResult.setConsumesTapEvents((Boolean) consumesTapEvents); + Object color = __pigeon_list.get(2); + pigeonResult.setColor((color == null) ? null : ((color instanceof Integer) ? (Integer) color : (Long) color)); + Object geodesic = __pigeon_list.get(3); + pigeonResult.setGeodesic((Boolean) geodesic); + Object jointType = __pigeon_list.get(4); + pigeonResult.setJointType((jointType == null) ? null : ((jointType instanceof Integer) ? (Integer) jointType : (Long) jointType)); + Object patterns = __pigeon_list.get(5); + pigeonResult.setPatterns((List) patterns); + Object points = __pigeon_list.get(6); + pigeonResult.setPoints((List) points); + Object startCap = __pigeon_list.get(7); + pigeonResult.setStartCap(startCap); + Object endCap = __pigeon_list.get(8); + pigeonResult.setEndCap(endCap); + Object visible = __pigeon_list.get(9); + pigeonResult.setVisible((Boolean) visible); + Object width = __pigeon_list.get(10); + pigeonResult.setWidth((width == null) ? null : ((width instanceof Integer) ? (Integer) width : (Long) width)); + Object zIndex = __pigeon_list.get(11); + pigeonResult.setZIndex((zIndex == null) ? null : ((zIndex instanceof Integer) ? (Integer) zIndex : (Long) zIndex)); return pigeonResult; } } 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 f78fa69f4e1..d1f8cbce257 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 @@ -763,10 +763,22 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { } static PlatformPolyline _platformPolylineFromPolyline(Polyline polyline) { - // This cast is not ideal, but the Java code already assumes this format. - // See the TODOs at the top of this file and on the 'json' field in - // messages.dart. - return PlatformPolyline(json: polyline.toJson() as Map); + final List points = polyline.points.map(_platformLatLngFromLatLng).toList(); + final List pattern = polyline.patterns.map((PatternItem item) {return item.toJson();}).toList(); + return PlatformPolyline( + polylineId: polyline.polylineId.value, + consumesTapEvents: polyline.consumeTapEvents, + color: polyline.color.value, + startCap: polyline.startCap.toJson(), + endCap: polyline.endCap.toJson(), + geodesic: polyline.geodesic, + visible: polyline.visible, + width: polyline.width, + zIndex: polyline.zIndex, + points: points, + jointType: polyline.jointType.value, + patterns: pattern, + ); } static PlatformTileOverlay _platformTileOverlayFromTileOverlay( 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 85dab564174..ba8d7422751 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 @@ -425,24 +425,76 @@ class PlatformPolygon { /// Pigeon equivalent of the Polyline class. class PlatformPolyline { PlatformPolyline({ - required this.json, + required this.polylineId, + required this.consumesTapEvents, + required this.color, + required this.geodesic, + required this.jointType, + required this.patterns, + required this.points, + required this.startCap, + required this.endCap, + required this.visible, + required this.width, + required this.zIndex, }); - /// The polyline data, as JSON. This should only be set from - /// Polyline.toJson, and the native code must interpret it according to the - /// internal implementation details of that method. - Map json; + String polylineId; + + bool consumesTapEvents; + + int color; + + bool geodesic; + + int jointType; + + List patterns; + + List points; + + Object startCap; + + Object endCap; + + bool visible; + + int width; + + int zIndex; Object encode() { return [ - json, + polylineId, + consumesTapEvents, + color, + geodesic, + jointType, + patterns, + points, + startCap, + endCap, + visible, + width, + zIndex, ]; } static PlatformPolyline decode(Object result) { result as List; return PlatformPolyline( - json: (result[0] as Map?)!.cast(), + polylineId: result[0]! as String, + consumesTapEvents: result[1]! as bool, + color: result[2]! as int, + geodesic: result[3]! as bool, + jointType: result[4]! as int, + patterns: (result[5] as List?)!.cast(), + points: (result[6] as List?)!.cast(), + startCap: result[7]!, + endCap: result[8]!, + visible: result[9]! as bool, + width: result[10]! as int, + zIndex: result[11]! as int, ); } } 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 2131fdfec42..abc93ac6498 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 @@ -198,12 +198,11 @@ class PlatformPolyline { required this.zIndex, }); - final int polylineId; + final String polylineId; final bool consumesTapEvents; final int color; final bool geodesic; - // TODO(schectman): convert to structured data. - final Object jointType; + final int jointType; // TODO(schectman): convert to structured data. final List patterns; final List points; 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 4aec600514a..ac6bda7e43a 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 @@ -502,7 +502,7 @@ void main() { expect(point?.longitude, expectedHole[j].longitude); } } - expect(encoded?.sublist(6), [ + expect(encoded.sublist(6), [ expected.visible, expected.strokeColor.value, expected.strokeWidth, @@ -538,15 +538,39 @@ void main() { final List toChange = verification.captured[1] as List; final List toRemove = verification.captured[2] as List; + void expectPolyline(PlatformPolyline actual, Polyline expected) { + final List encoded = actual.encode() as List; + expect(encoded.sublist(0, 5), [ + expected.polylineId.value, + expected.consumeTapEvents, + expected.color.value, + expected.geodesic, + expected.jointType.value, + ]); + expect(encoded.sublist(9), [ + expected.visible, + expected.width, + expected.zIndex, + ]); + expect(actual.points.length, expected.points.length); + for (final (int i, PlatformLatLng? point) in actual.points.indexed) { + expect(point?.latitude, actual.points[i]?.latitude); + expect(point?.longitude, actual.points[i]?.longitude); + } + expect(actual.patterns.length, expected.patterns.length); + for (final (int i, Object? pattern) in actual.patterns.indexed) { + expect(pattern, expected.patterns[i].toJson()); + } + } // Object one should be removed. expect(toRemove.length, 1); expect(toRemove.first, object1.polylineId.value); // Object two should be changed. expect(toChange.length, 1); - expect(toChange.first?.json, object2new.toJson()); + expectPolyline(toChange.first!, object2new); // Object 3 should be added. expect(toAdd.length, 1); - expect(toAdd.first?.json, object3.toJson()); + expectPolyline(toAdd.first!, object3); }); test('updateTileOverlays passes expected arguments', () async { From 57aa433db55d343d64e6ebfad8cecde5846d6bb3 Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Tue, 13 Aug 2024 17:03:45 -0400 Subject: [PATCH 09/20] Java pigeon conversion --- .../flutter/plugins/googlemaps/Convert.java | 15 ++++++++++++++ .../googlemaps/PolylinesController.java | 20 +++++++++++++++++-- 2 files changed, 33 insertions(+), 2 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 e3c8e3a4ee5..259df168bab 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 @@ -703,6 +703,21 @@ static String interpretPolygonOptions(Messages.PlatformPolygon polygon, PolygonO return polygon.getPolygonId(); } + static String interpretPolylineOptions(Messages.PlatformPolyline polyline, PolylineOptionsSink sink, AssetManager assetManager, float density) { + sink.setConsumeTapEvents(polyline.getConsumesTapEvents()); + sink.setColor(polyline.getColor().intValue()); + sink.setEndCap(toCap(polyline.getEndCap(), assetManager, density)); + sink.setStartCap(toCap(polyline.getStartCap(), assetManager, density)); + sink.setGeodesic(polyline.getGeodesic()); + sink.setJointType(polyline.getJointType().intValue()); + sink.setVisible(polyline.getVisible()); + sink.setWidth(polyline.getWidth()); + sink.setZIndex(polyline.getZIndex()); + sink.setPoints(toPoints(polyline.getPoints())); + sink.setPattern(toPattern(polyline.getPatterns())); + return polyline.getPolylineId(); + } + static String interpretPolylineOptions( Map data, PolylineOptionsSink sink, AssetManager assetManager, float density) { final Object consumeTapEvents = data.get("consumeTapEvents"); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/PolylinesController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/PolylinesController.java index 646f14c4497..a32efe43a54 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/PolylinesController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/PolylinesController.java @@ -38,13 +38,13 @@ void setGoogleMap(GoogleMap googleMap) { void addPolylines(@NonNull List polylinesToAdd) { for (Messages.PlatformPolyline polylineToAdd : polylinesToAdd) { - addJsonPolyline(polylineToAdd.getJson()); + addPolyline(polylineToAdd); } } void changePolylines(@NonNull List polylinesToChange) { for (Messages.PlatformPolyline polylineToChange : polylinesToChange) { - changeJsonPolyline(polylineToChange.getJson()); + changePolyline(polylineToChange); } } @@ -82,6 +82,14 @@ private void addJsonPolyline(Map polyline) { addPolyline(polylineId, options, polylineBuilder.consumeTapEvents()); } + private void addPolyline(@NonNull Messages.PlatformPolyline polyline) { + PolylineBuilder polylineBuilder = new PolylineBuilder(density); + String polylineId = + Convert.interpretPolylineOptions(polyline, polylineBuilder, assetManager, density); + PolylineOptions options = polylineBuilder.build(); + addPolyline(polylineId, options, polylineBuilder.consumeTapEvents()); + } + private void addPolyline( String polylineId, PolylineOptions polylineOptions, boolean consumeTapEvents) { final Polyline polyline = googleMap.addPolyline(polylineOptions); @@ -101,6 +109,14 @@ private void changeJsonPolyline(Map polyline) { } } + private void changePolyline(@NonNull Messages.PlatformPolyline polyline) { + String polylineId = polyline.getPolylineId(); + PolylineController polylineController = polylineIdToController.get(polylineId); + if (polylineController != null) { + Convert.interpretPolylineOptions(polyline, polylineController, assetManager, density); + } + } + private static String getPolylineId(Map polyline) { return (String) polyline.get("polylineId"); } From 42c2e2b2611ace50aea35a4a08c4b3c351743710 Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Tue, 13 Aug 2024 17:07:48 -0400 Subject: [PATCH 10/20] Formatting --- .../flutter/plugins/googlemaps/Convert.java | 6 +- .../flutter/plugins/googlemaps/Messages.java | 1281 ++++++++++++----- .../lib/src/google_maps_flutter_android.dart | 15 +- .../lib/src/messages.g.dart | 633 ++++---- .../google_maps_flutter_android_test.dart | 2 + 5 files changed, 1293 insertions(+), 644 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 259df168bab..bdff0f87122 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 @@ -703,7 +703,11 @@ static String interpretPolygonOptions(Messages.PlatformPolygon polygon, PolygonO return polygon.getPolygonId(); } - static String interpretPolylineOptions(Messages.PlatformPolyline polyline, PolylineOptionsSink sink, AssetManager assetManager, float density) { + static String interpretPolylineOptions( + Messages.PlatformPolyline polyline, + PolylineOptionsSink sink, + AssetManager assetManager, + float density) { sink.setConsumeTapEvents(polyline.getConsumesTapEvents()); sink.setColor(polyline.getColor().intValue()); sink.setEndCap(toCap(polyline.getEndCap(), assetManager, density)); 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 b4077efb877..7148e097b60 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) @@ -104,7 +103,7 @@ private PlatformRendererType(final int index) { /** * 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; @@ -164,10 +163,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 @@ -246,13 +252,13 @@ 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 { /** - * The update data, as JSON. This should only be set from - * CameraUpdate.toJson, and the native code must interpret it according to the - * internal implementation details of the CameraUpdate class. + * The update data, as JSON. This should only be set from CameraUpdate.toJson, and the native + * code must interpret it according to the internal implementation details of the CameraUpdate + * class. */ private @NonNull Object json; @@ -272,8 +278,12 @@ public void setJson(@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 json.equals(that.json); } @@ -318,7 +328,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; @@ -443,15 +453,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 { @@ -563,13 +594,22 @@ ArrayList toList() { Object consumeTapEvents = __pigeon_list.get(0); pigeonResult.setConsumeTapEvents((Boolean) consumeTapEvents); Object fillColor = __pigeon_list.get(1); - pigeonResult.setFillColor((fillColor == null) ? null : ((fillColor instanceof Integer) ? (Integer) fillColor : (Long) fillColor)); + pigeonResult.setFillColor( + (fillColor == null) + ? null + : ((fillColor instanceof Integer) ? (Integer) fillColor : (Long) fillColor)); Object strokeColor = __pigeon_list.get(2); - pigeonResult.setStrokeColor((strokeColor == null) ? null : ((strokeColor instanceof Integer) ? (Integer) strokeColor : (Long) strokeColor)); + pigeonResult.setStrokeColor( + (strokeColor == null) + ? null + : ((strokeColor instanceof Integer) ? (Integer) strokeColor : (Long) strokeColor)); Object visible = __pigeon_list.get(3); pigeonResult.setVisible((Boolean) visible); Object strokeWidth = __pigeon_list.get(4); - pigeonResult.setStrokeWidth((strokeWidth == null) ? null : ((strokeWidth instanceof Integer) ? (Integer) strokeWidth : (Long) strokeWidth)); + pigeonResult.setStrokeWidth( + (strokeWidth == null) + ? null + : ((strokeWidth instanceof Integer) ? (Integer) strokeWidth : (Long) strokeWidth)); Object zIndex = __pigeon_list.get(5); pigeonResult.setZIndex((Double) zIndex); Object center = __pigeon_list.get(6); @@ -585,13 +625,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; @@ -611,8 +650,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); } @@ -657,7 +700,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; @@ -678,8 +721,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); } @@ -724,7 +771,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Offset 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 PlatformOffset { private @NonNull Double dx; @@ -758,8 +805,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; + } PlatformOffset that = (PlatformOffset) o; return dx.equals(that.dx) && dy.equals(that.dy); } @@ -816,7 +867,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; @@ -857,10 +908,16 @@ public void setAnchor(@NonNull PlatformOffset 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 @@ -927,7 +984,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; @@ -1102,15 +1159,44 @@ public void setClusterManagerId(@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; + } 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); } @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); } public static final class Builder { @@ -1292,7 +1378,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; @@ -1430,15 +1516,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 { @@ -1562,7 +1671,10 @@ ArrayList toList() { Object consumesTapEvents = __pigeon_list.get(1); pigeonResult.setConsumesTapEvents((Boolean) consumesTapEvents); Object fillColor = __pigeon_list.get(2); - pigeonResult.setFillColor((fillColor == null) ? null : ((fillColor instanceof Integer) ? (Integer) fillColor : (Long) fillColor)); + pigeonResult.setFillColor( + (fillColor == null) + ? null + : ((fillColor instanceof Integer) ? (Integer) fillColor : (Long) fillColor)); Object geodesic = __pigeon_list.get(3); pigeonResult.setGeodesic((Boolean) geodesic); Object points = __pigeon_list.get(4); @@ -1572,11 +1684,20 @@ ArrayList toList() { Object visible = __pigeon_list.get(6); pigeonResult.setVisible((Boolean) visible); Object strokeColor = __pigeon_list.get(7); - pigeonResult.setStrokeColor((strokeColor == null) ? null : ((strokeColor instanceof Integer) ? (Integer) strokeColor : (Long) strokeColor)); + pigeonResult.setStrokeColor( + (strokeColor == null) + ? null + : ((strokeColor instanceof Integer) ? (Integer) strokeColor : (Long) strokeColor)); Object strokeWidth = __pigeon_list.get(8); - pigeonResult.setStrokeWidth((strokeWidth == null) ? null : ((strokeWidth instanceof Integer) ? (Integer) strokeWidth : (Long) strokeWidth)); + pigeonResult.setStrokeWidth( + (strokeWidth == null) + ? null + : ((strokeWidth instanceof Integer) ? (Integer) strokeWidth : (Long) strokeWidth)); Object zIndex = __pigeon_list.get(9); - pigeonResult.setZIndex((zIndex == null) ? null : ((zIndex instanceof Integer) ? (Integer) zIndex : (Long) zIndex)); + pigeonResult.setZIndex( + (zIndex == null) + ? null + : ((zIndex instanceof Integer) ? (Integer) zIndex : (Long) zIndex)); return pigeonResult; } } @@ -1584,7 +1705,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; @@ -1748,15 +1869,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 { @@ -1900,11 +2048,15 @@ ArrayList toList() { Object consumesTapEvents = __pigeon_list.get(1); pigeonResult.setConsumesTapEvents((Boolean) consumesTapEvents); Object color = __pigeon_list.get(2); - pigeonResult.setColor((color == null) ? null : ((color instanceof Integer) ? (Integer) color : (Long) color)); + pigeonResult.setColor( + (color == null) ? null : ((color instanceof Integer) ? (Integer) color : (Long) color)); Object geodesic = __pigeon_list.get(3); pigeonResult.setGeodesic((Boolean) geodesic); Object jointType = __pigeon_list.get(4); - pigeonResult.setJointType((jointType == null) ? null : ((jointType instanceof Integer) ? (Integer) jointType : (Long) jointType)); + pigeonResult.setJointType( + (jointType == null) + ? null + : ((jointType instanceof Integer) ? (Integer) jointType : (Long) jointType)); Object patterns = __pigeon_list.get(5); pigeonResult.setPatterns((List) patterns); Object points = __pigeon_list.get(6); @@ -1916,9 +2068,13 @@ ArrayList toList() { Object visible = __pigeon_list.get(9); pigeonResult.setVisible((Boolean) visible); Object width = __pigeon_list.get(10); - pigeonResult.setWidth((width == null) ? null : ((width instanceof Integer) ? (Integer) width : (Long) width)); + pigeonResult.setWidth( + (width == null) ? null : ((width instanceof Integer) ? (Integer) width : (Long) width)); Object zIndex = __pigeon_list.get(11); - pigeonResult.setZIndex((zIndex == null) ? null : ((zIndex instanceof Integer) ? (Integer) zIndex : (Long) zIndex)); + pigeonResult.setZIndex( + (zIndex == null) + ? null + : ((zIndex instanceof Integer) ? (Integer) zIndex : (Long) zIndex)); return pigeonResult; } } @@ -1926,7 +2082,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; @@ -1970,10 +2126,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 @@ -2030,9 +2192,13 @@ ArrayList toList() { static @NonNull PlatformTile fromList(@NonNull ArrayList __pigeon_list) { PlatformTile pigeonResult = new PlatformTile(); Object width = __pigeon_list.get(0); - pigeonResult.setWidth((width == null) ? null : ((width instanceof Integer) ? (Integer) width : (Long) width)); + pigeonResult.setWidth( + (width == null) ? null : ((width instanceof Integer) ? (Integer) width : (Long) width)); Object height = __pigeon_list.get(1); - pigeonResult.setHeight((height == null) ? null : ((height instanceof Integer) ? (Integer) height : (Long) height)); + pigeonResult.setHeight( + (height == null) + ? null + : ((height instanceof Integer) ? (Integer) height : (Long) height)); Object data = __pigeon_list.get(2); pigeonResult.setData((byte[]) data); return pigeonResult; @@ -2042,13 +2208,13 @@ 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 { /** - * The tile overlay data, as JSON. This should only be set from - * TileOverlay.toJson, and the native code must interpret it according to the - * internal implementation details of that method. + * The tile overlay data, as JSON. This should only be set from TileOverlay.toJson, and the + * native code must interpret it according to the internal implementation details of that + * method. */ private @NonNull Map json; @@ -2068,8 +2234,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; + } PlatformTileOverlay that = (PlatformTileOverlay) o; return json.equals(that.json); } @@ -2114,7 +2284,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; @@ -2174,10 +2344,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 @@ -2256,7 +2433,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; @@ -2290,8 +2467,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); } @@ -2348,7 +2529,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; @@ -2382,8 +2563,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); } @@ -2440,7 +2625,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; @@ -2500,10 +2685,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 @@ -2582,10 +2774,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; @@ -2600,8 +2792,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); } @@ -2646,7 +2842,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; @@ -2771,15 +2967,36 @@ public void setInitialClusterManagers(@NonNull List sett @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); + 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); } @Override public int hashCode() { - return Objects.hash(initialCameraPosition, mapConfiguration, initialCircles, initialMarkers, initialPolygons, initialPolylines, initialHeatmaps, initialTileOverlays, initialClusterManagers); + return Objects.hash( + initialCameraPosition, + mapConfiguration, + initialCircles, + initialMarkers, + initialPolygons, + initialPolylines, + initialHeatmaps, + initialTileOverlays, + initialClusterManagers); } public static final class Builder { @@ -2851,7 +3068,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; } @@ -2886,7 +3104,8 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformMapViewCreationParams fromList(@NonNull ArrayList __pigeon_list) { + static @NonNull PlatformMapViewCreationParams fromList( + @NonNull ArrayList __pigeon_list) { PlatformMapViewCreationParams pigeonResult = new PlatformMapViewCreationParams(); Object initialCameraPosition = __pigeon_list.get(0); pigeonResult.setInitialCameraPosition((PlatformCameraPosition) initialCameraPosition); @@ -2913,7 +3132,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; @@ -3118,15 +3337,58 @@ 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(cloudMapId, that.cloudMapId) + && 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, + cloudMapId, + style); } public static final class Builder { @@ -3142,7 +3404,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; } @@ -3392,7 +3655,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; @@ -3426,8 +3689,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); } @@ -3484,7 +3751,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; @@ -3544,10 +3811,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 @@ -3626,7 +3900,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; @@ -3651,8 +3925,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); } @@ -3758,14 +4036,16 @@ protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { return PlatformTileLayer.fromList((ArrayList) readValue(buffer)); case (byte) 150: return PlatformZoomRange.fromList((ArrayList) readValue(buffer)); - case (byte) 151: { - Object value = readValue(buffer); - return value == null ? null : PlatformMapType.values()[(int) value]; - } - case (byte) 152: { - Object value = readValue(buffer); - return value == null ? null : PlatformRendererType.values()[(int) value]; - } + case (byte) 151: + { + Object value = readValue(buffer); + return value == null ? null : PlatformMapType.values()[(int) value]; + } + case (byte) 152: + { + Object value = readValue(buffer); + return value == null ? null : PlatformRendererType.values()[(int) value]; + } default: return super.readValueOfType(type, buffer); } @@ -3851,7 +4131,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. */ @@ -3879,9 +4158,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. */ @@ -3889,70 +4168,82 @@ 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); /** 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. */ void animateCamera(@NonNull PlatformCameraUpdate cameraUpdate); /** 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(); /** Clears the cache of tiles previously requseted from the tile provider. */ void clearTileCache(@NonNull String tileOverlayId); @@ -3963,16 +4254,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) -> { @@ -3999,7 +4297,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) -> { @@ -4009,8 +4310,7 @@ public void error(Throwable error) { try { api.updateMapConfiguration(configurationArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4023,7 +4323,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) -> { @@ -4035,8 +4338,7 @@ public void error(Throwable error) { try { api.updateCircles(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4049,7 +4351,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) -> { @@ -4061,8 +4366,7 @@ public void error(Throwable error) { try { api.updateHeatmaps(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4075,7 +4379,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) -> { @@ -4086,8 +4393,7 @@ public void error(Throwable error) { try { api.updateClusterManagers(toAddArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4100,7 +4406,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) -> { @@ -4112,8 +4421,7 @@ public void error(Throwable error) { try { api.updateMarkers(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4126,7 +4434,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) -> { @@ -4138,8 +4449,7 @@ public void error(Throwable error) { try { api.updatePolygons(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4152,7 +4462,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) -> { @@ -4164,8 +4477,7 @@ public void error(Throwable error) { try { api.updatePolylines(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4178,7 +4490,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) -> { @@ -4190,8 +4505,7 @@ public void error(Throwable error) { try { api.updateTileOverlays(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4204,7 +4518,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) -> { @@ -4214,8 +4531,7 @@ public void error(Throwable error) { try { PlatformPoint output = api.getScreenCoordinate(latLngArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4228,7 +4544,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) -> { @@ -4238,8 +4557,7 @@ public void error(Throwable error) { try { PlatformLatLng output = api.getLatLng(screenCoordinateArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4252,7 +4570,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) -> { @@ -4260,8 +4581,7 @@ public void error(Throwable error) { try { PlatformLatLngBounds output = api.getVisibleRegion(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4274,7 +4594,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) -> { @@ -4284,8 +4607,7 @@ public void error(Throwable error) { try { api.moveCamera(cameraUpdateArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4298,7 +4620,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) -> { @@ -4308,8 +4633,7 @@ public void error(Throwable error) { try { api.animateCamera(cameraUpdateArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4322,7 +4646,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) -> { @@ -4330,8 +4657,7 @@ public void error(Throwable error) { try { Double output = api.getZoomLevel(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4344,7 +4670,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) -> { @@ -4354,8 +4683,7 @@ public void error(Throwable error) { try { api.showInfoWindow(markerIdArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4368,7 +4696,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) -> { @@ -4378,8 +4709,7 @@ public void error(Throwable error) { try { api.hideInfoWindow(markerIdArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4392,7 +4722,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) -> { @@ -4402,8 +4735,7 @@ public void error(Throwable error) { try { Boolean output = api.isInfoWindowShown(markerIdArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4416,7 +4748,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) -> { @@ -4426,8 +4761,7 @@ public void error(Throwable error) { try { Boolean output = api.setStyle(styleArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4440,7 +4774,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) -> { @@ -4448,8 +4785,7 @@ public void error(Throwable error) { try { Boolean output = api.didLastStyleSucceed(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4462,7 +4798,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) -> { @@ -4472,8 +4811,7 @@ public void error(Throwable error) { try { api.clearTileCache(tileOverlayIdArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4486,7 +4824,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) -> { @@ -4520,366 +4861,470 @@ 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. */ + /** 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), (String) listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), + (String) listReply.get(1), + (String) 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), (String) listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), + (String) listReply.get(1), + (String) 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), (String) listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), + (String) listReply.get(1), + (String) 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), (String) listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), + (String) listReply.get(1), + (String) 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), (String) listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), + (String) listReply.get(1), + (String) 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), (String) listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), + (String) listReply.get(1), + (String) 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), (String) listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), + (String) listReply.get(1), + (String) 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), (String) listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), + (String) listReply.get(1), + (String) 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), (String) listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), + (String) listReply.get(1), + (String) 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), (String) listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), + (String) listReply.get(1), + (String) 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), (String) listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), + (String) listReply.get(1), + (String) 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), (String) listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), + (String) listReply.get(1), + (String) 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), (String) listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), + (String) listReply.get(1), + (String) 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), (String) listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), + (String) listReply.get(1), + (String) 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), (String) listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), + (String) listReply.get(1), + (String) 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) -> { @@ -4908,11 +5353,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 { @@ -4922,16 +5366,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) -> { @@ -4941,8 +5395,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { api.createView(typeArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -4957,66 +5410,75 @@ 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); - @NonNull + @NonNull PlatformZoomRange getZoomRange(); - @NonNull + @NonNull List getClusters(@NonNull String clusterManagerId); /** 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) -> { @@ -5024,8 +5486,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) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5038,7 +5499,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) -> { @@ -5046,8 +5510,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) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5060,7 +5523,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) -> { @@ -5068,8 +5534,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) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5082,7 +5547,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) -> { @@ -5090,8 +5558,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) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5104,7 +5571,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) -> { @@ -5112,8 +5582,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) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5126,7 +5595,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) -> { @@ -5134,8 +5606,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) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5148,7 +5619,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) -> { @@ -5156,8 +5630,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) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5170,7 +5643,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) -> { @@ -5178,8 +5654,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) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5192,7 +5667,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) -> { @@ -5200,8 +5678,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) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5214,7 +5691,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) -> { @@ -5222,8 +5702,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) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5236,7 +5715,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) -> { @@ -5244,8 +5726,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) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5258,7 +5739,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) -> { @@ -5268,8 +5752,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) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5282,7 +5765,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) -> { @@ -5290,8 +5776,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) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -5304,7 +5789,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) -> { @@ -5314,8 +5802,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) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } 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 d1f8cbce257..e42b57a9146 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 @@ -746,8 +746,12 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { } static PlatformPolygon _platformPolygonFromPolygon(Polygon polygon) { - final List points = polygon.points.map(_platformLatLngFromLatLng).toList(); - final List?> holes = polygon.holes.map((List hole) {return hole.map(_platformLatLngFromLatLng).toList();}).toList(); + final List points = + polygon.points.map(_platformLatLngFromLatLng).toList(); + final List?> holes = + polygon.holes.map((List hole) { + return hole.map(_platformLatLngFromLatLng).toList(); + }).toList(); return PlatformPolygon( polygonId: polygon.polygonId.value, fillColor: polygon.fillColor.value, @@ -763,8 +767,11 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { } static PlatformPolyline _platformPolylineFromPolyline(Polyline polyline) { - final List points = polyline.points.map(_platformLatLngFromLatLng).toList(); - final List pattern = polyline.patterns.map((PatternItem item) {return item.toJson();}).toList(); + final List points = + polyline.points.map(_platformLatLngFromLatLng).toList(); + final List pattern = polyline.patterns.map((PatternItem item) { + return item.toJson(); + }).toList(); return PlatformPolyline( polylineId: polyline.polylineId.value, consumesTapEvents: polyline.consumeTapEvents, 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 ba8d7422751..d0c2d1537e6 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 []; } @@ -763,10 +764,13 @@ class PlatformMapViewCreationParams { initialCircles: (result[2] as List?)!.cast(), initialMarkers: (result[3] as List?)!.cast(), initialPolygons: (result[4] as List?)!.cast(), - initialPolylines: (result[5] 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(), + initialTileOverlays: + (result[7] as List?)!.cast(), + initialClusterManagers: + (result[8] as List?)!.cast(), ); } } @@ -979,7 +983,6 @@ class PlatformZoomRange { } } - class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -987,73 +990,73 @@ class _PigeonCodec extends StandardMessageCodec { if (value is PlatformCameraPosition) { buffer.putUint8(129); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { + } else if (value is PlatformCameraUpdate) { buffer.putUint8(130); writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { + } else if (value is PlatformCircle) { buffer.putUint8(131); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { + } else if (value is PlatformHeatmap) { buffer.putUint8(132); writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { + } else if (value is PlatformClusterManager) { buffer.putUint8(133); writeValue(buffer, value.encode()); - } else if (value is PlatformOffset) { + } else if (value is PlatformOffset) { buffer.putUint8(134); writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { + } else if (value is PlatformInfoWindow) { buffer.putUint8(135); writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { + } else if (value is PlatformMarker) { buffer.putUint8(136); writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { + } else if (value is PlatformPolygon) { buffer.putUint8(137); writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { + } else if (value is PlatformPolyline) { buffer.putUint8(138); writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { + } else if (value is PlatformTile) { buffer.putUint8(139); writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { + } else if (value is PlatformTileOverlay) { buffer.putUint8(140); writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { + } else if (value is PlatformEdgeInsets) { buffer.putUint8(141); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { + } else if (value is PlatformLatLng) { buffer.putUint8(142); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { + } else if (value is PlatformLatLngBounds) { buffer.putUint8(143); writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { + } else if (value is PlatformCluster) { buffer.putUint8(144); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { + } else if (value is PlatformCameraTargetBounds) { buffer.putUint8(145); writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { + } else if (value is PlatformMapViewCreationParams) { buffer.putUint8(146); writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { + } else if (value is PlatformMapConfiguration) { buffer.putUint8(147); writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { + } else if (value is PlatformPoint) { buffer.putUint8(148); writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { + } else if (value is PlatformTileLayer) { buffer.putUint8(149); writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { + } else if (value is PlatformZoomRange) { buffer.putUint8(150); writeValue(buffer, value.encode()); - } else if (value is PlatformMapType) { + } else if (value is PlatformMapType) { buffer.putUint8(151); writeValue(buffer, value.index); - } else if (value is PlatformRendererType) { + } else if (value is PlatformRendererType) { buffer.putUint8(152); writeValue(buffer, value.index); } else { @@ -1064,54 +1067,54 @@ class _PigeonCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 129: + case 129: return PlatformCameraPosition.decode(readValue(buffer)!); - case 130: + case 130: return PlatformCameraUpdate.decode(readValue(buffer)!); - case 131: + case 131: return PlatformCircle.decode(readValue(buffer)!); - case 132: + case 132: return PlatformHeatmap.decode(readValue(buffer)!); - case 133: + case 133: return PlatformClusterManager.decode(readValue(buffer)!); - case 134: + case 134: return PlatformOffset.decode(readValue(buffer)!); - case 135: + case 135: return PlatformInfoWindow.decode(readValue(buffer)!); - case 136: + case 136: return PlatformMarker.decode(readValue(buffer)!); - case 137: + case 137: return PlatformPolygon.decode(readValue(buffer)!); - case 138: + case 138: return PlatformPolyline.decode(readValue(buffer)!); - case 139: + case 139: return PlatformTile.decode(readValue(buffer)!); - case 140: + case 140: return PlatformTileOverlay.decode(readValue(buffer)!); - case 141: + case 141: return PlatformEdgeInsets.decode(readValue(buffer)!); - case 142: + case 142: return PlatformLatLng.decode(readValue(buffer)!); - case 143: + case 143: return PlatformLatLngBounds.decode(readValue(buffer)!); - case 144: + case 144: return PlatformCluster.decode(readValue(buffer)!); - case 145: + case 145: return PlatformCameraTargetBounds.decode(readValue(buffer)!); - case 146: + case 146: return PlatformMapViewCreationParams.decode(readValue(buffer)!); - case 147: + case 147: return PlatformMapConfiguration.decode(readValue(buffer)!); - case 148: + case 148: return PlatformPoint.decode(readValue(buffer)!); - case 149: + case 149: return PlatformTileLayer.decode(readValue(buffer)!); - case 150: + case 150: return PlatformZoomRange.decode(readValue(buffer)!); - case 151: + case 151: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformMapType.values[value]; - case 152: + case 152: final int? value = readValue(buffer) as int?; return value == null ? null : PlatformRendererType.values[value]; default: @@ -1129,7 +1132,8 @@ class MapsApi { /// BinaryMessenger will be used which routes to the host platform. MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : __pigeon_binaryMessenger = binaryMessenger, - __pigeon_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + __pigeon_messageChannelSuffix = + messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? __pigeon_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -1138,8 +1142,10 @@ class MapsApi { /// Returns once the map instance is available. Future waitForMap() async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1163,9 +1169,12 @@ 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 __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + Future updateMapConfiguration( + PlatformMapConfiguration configuration) async { + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1186,15 +1195,18 @@ class MapsApi { } /// Updates the set of circles on the map. - Future updateCircles(List toAdd, List toChange, List idsToRemove) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + Future updateCircles(List toAdd, + List toChange, List idsToRemove) async { + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = - await __pigeon_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? __pigeon_replyList = await __pigeon_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -1209,15 +1221,18 @@ class MapsApi { } /// Updates the set of heatmaps on the map. - Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + Future updateHeatmaps(List toAdd, + List toChange, List idsToRemove) async { + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = - await __pigeon_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? __pigeon_replyList = await __pigeon_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -1232,15 +1247,18 @@ class MapsApi { } /// Updates the set of custer managers for clusters on the map. - Future updateClusterManagers(List toAdd, List idsToRemove) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + Future updateClusterManagers( + List toAdd, List idsToRemove) async { + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = - await __pigeon_channel.send([toAdd, idsToRemove]) as List?; + final List? __pigeon_replyList = await __pigeon_channel + .send([toAdd, idsToRemove]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -1255,15 +1273,18 @@ class MapsApi { } /// Updates the set of markers on the map. - Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + Future updateMarkers(List toAdd, + List toChange, List idsToRemove) async { + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = - await __pigeon_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? __pigeon_replyList = await __pigeon_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -1278,15 +1299,18 @@ class MapsApi { } /// Updates the set of polygonss on the map. - Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + Future updatePolygons(List toAdd, + List toChange, List idsToRemove) async { + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = - await __pigeon_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? __pigeon_replyList = await __pigeon_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -1301,15 +1325,18 @@ class MapsApi { } /// Updates the set of polylines on the map. - Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + Future updatePolylines(List toAdd, + List toChange, List idsToRemove) async { + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = - await __pigeon_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? __pigeon_replyList = await __pigeon_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -1324,15 +1351,18 @@ class MapsApi { } /// Updates the set of tile overlays on the map. - Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + Future updateTileOverlays(List toAdd, + List toChange, List idsToRemove) async { + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = - await __pigeon_channel.send([toAdd, toChange, idsToRemove]) as List?; + final List? __pigeon_replyList = await __pigeon_channel + .send([toAdd, toChange, idsToRemove]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -1348,8 +1378,10 @@ class MapsApi { /// Gets the screen coordinate for the given map location. Future getScreenCoordinate(PlatformLatLng latLng) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1376,14 +1408,16 @@ class MapsApi { /// Gets the map location for the given screen coordinate. Future getLatLng(PlatformPoint screenCoordinate) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = - await __pigeon_channel.send([screenCoordinate]) as List?; + final List? __pigeon_replyList = await __pigeon_channel + .send([screenCoordinate]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -1404,8 +1438,10 @@ class MapsApi { /// Gets the map region currently displayed on the map. Future getVisibleRegion() async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1433,8 +1469,10 @@ class MapsApi { /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. Future moveCamera(PlatformCameraUpdate cameraUpdate) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1456,8 +1494,10 @@ class MapsApi { /// Moves the camera according to [cameraUpdate], animating the update. Future animateCamera(PlatformCameraUpdate cameraUpdate) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1479,8 +1519,10 @@ class MapsApi { /// Gets the current map zoom level. Future getZoomLevel() async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1507,8 +1549,10 @@ class MapsApi { /// Show the info window for the marker with the given ID. Future showInfoWindow(String markerId) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1530,8 +1574,10 @@ class MapsApi { /// Hide the info window for the marker with the given ID. Future hideInfoWindow(String markerId) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1554,8 +1600,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 __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1586,8 +1634,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 __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1618,8 +1668,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 __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1646,8 +1698,10 @@ class MapsApi { /// Clears the cache of tiles previously requseted from the tile provider. Future clearTileCache(String tileOverlayId) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1669,8 +1723,10 @@ class MapsApi { /// Takes a snapshot of the map and returns its image data. Future takeSnapshot() async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -1742,13 +1798,21 @@ abstract class MapsCallbackApi { void onPolylineTap(String polylineId); /// 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 __pigeon_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); @@ -1759,24 +1823,28 @@ 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 __pigeon_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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 { @@ -1784,15 +1852,18 @@ 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 __pigeon_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); @@ -1803,22 +1874,25 @@ 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 __pigeon_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -1828,22 +1902,25 @@ 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 __pigeon_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -1853,22 +1930,25 @@ 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 __pigeon_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -1878,22 +1958,25 @@ 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 __pigeon_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -1906,22 +1989,25 @@ 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 __pigeon_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -1934,22 +2020,25 @@ 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 __pigeon_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -1962,22 +2051,25 @@ 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 __pigeon_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -1987,22 +2079,25 @@ 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 __pigeon_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -2012,22 +2107,25 @@ 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 __pigeon_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -2037,22 +2135,25 @@ 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 __pigeon_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -2062,22 +2163,25 @@ 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 __pigeon_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -2087,22 +2191,25 @@ 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 __pigeon_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, + final BasicMessageChannel __pigeon_channel = BasicMessageChannel< + Object?>( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', + pigeonChannelCodec, binaryMessenger: binaryMessenger); if (api == null) { __pigeon_channel.setMessageHandler(null); } else { __pigeon_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, @@ -2114,12 +2221,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())); } }); } @@ -2132,9 +2241,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 = ''}) : __pigeon_binaryMessenger = binaryMessenger, - __pigeon_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + __pigeon_messageChannelSuffix = + messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? __pigeon_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -2147,9 +2258,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 __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + Future initializeWithPreferredRenderer( + PlatformRendererType? type) async { + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2182,9 +2296,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 = ''}) : __pigeon_binaryMessenger = binaryMessenger, - __pigeon_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + __pigeon_messageChannelSuffix = + messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? __pigeon_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -2192,8 +2308,10 @@ class MapsPlatformViewApi { final String __pigeon_messageChannelSuffix; Future createView(PlatformMapViewCreationParams? type) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2219,9 +2337,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 = ''}) : __pigeon_binaryMessenger = binaryMessenger, - __pigeon_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + __pigeon_messageChannelSuffix = + messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? __pigeon_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -2229,8 +2349,10 @@ class MapsInspectorApi { final String __pigeon_messageChannelSuffix; Future areBuildingsEnabled() async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2256,8 +2378,10 @@ class MapsInspectorApi { } Future areRotateGesturesEnabled() async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2283,8 +2407,10 @@ class MapsInspectorApi { } Future areZoomControlsEnabled() async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2310,8 +2436,10 @@ class MapsInspectorApi { } Future areScrollGesturesEnabled() async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2337,8 +2465,10 @@ class MapsInspectorApi { } Future areTiltGesturesEnabled() async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2364,8 +2494,10 @@ class MapsInspectorApi { } Future areZoomGesturesEnabled() async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2391,8 +2523,10 @@ class MapsInspectorApi { } Future isCompassEnabled() async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2418,8 +2552,10 @@ class MapsInspectorApi { } Future isLiteModeEnabled() async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2440,8 +2576,10 @@ class MapsInspectorApi { } Future isMapToolbarEnabled() async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2467,8 +2605,10 @@ class MapsInspectorApi { } Future isMyLocationButtonEnabled() async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2494,8 +2634,10 @@ class MapsInspectorApi { } Future isTrafficEnabled() async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2521,8 +2663,10 @@ class MapsInspectorApi { } Future getTileOverlayInfo(String tileOverlayId) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2543,8 +2687,10 @@ class MapsInspectorApi { } Future getZoomRange() async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, @@ -2570,14 +2716,16 @@ class MapsInspectorApi { } Future> getClusters(String clusterManagerId) async { - final String __pigeon_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = BasicMessageChannel( + final String __pigeon_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters$__pigeon_messageChannelSuffix'; + final BasicMessageChannel __pigeon_channel = + BasicMessageChannel( __pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); - final List? __pigeon_replyList = - await __pigeon_channel.send([clusterManagerId]) as List?; + final List? __pigeon_replyList = await __pigeon_channel + .send([clusterManagerId]) as List?; if (__pigeon_replyList == null) { throw _createConnectionError(__pigeon_channelName); } else if (__pigeon_replyList.length > 1) { @@ -2592,7 +2740,8 @@ class MapsInspectorApi { message: 'Host platform returned null value for non-null return value.', ); } else { - return (__pigeon_replyList[0] as List?)!.cast(); + return (__pigeon_replyList[0] as List?)! + .cast(); } } } 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 ac6bda7e43a..2c8769f4106 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 @@ -509,6 +509,7 @@ void main() { expected.zIndex, ]); } + // Object two should be changed. expect(toChange.length, 1); expectPolygon(toChange.first!, object2new); @@ -562,6 +563,7 @@ void main() { expect(pattern, expected.patterns[i].toJson()); } } + // Object one should be removed. expect(toRemove.length, 1); expect(toRemove.first, object1.polylineId.value); From 0f1fdd6238ae5ef2aec81359c12abe5d8149e334 Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Tue, 13 Aug 2024 17:10:14 -0400 Subject: [PATCH 11/20] Version bump --- .../google_maps_flutter_android/CHANGELOG.md | 4 ++++ .../google_maps_flutter_android/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md index d9649c41256..96d96fe3527 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.14.2 + +* Converts `PlatformPolygon` and `PlatformPolyline` to pigeon. + ## 2.14.1 * Converts `PlatformCircle` and `PlatformMarker` to pigeon. 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 204de640572..01d95416829 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter_android description: Android implementation of the google_maps_flutter plugin. repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 2.14.1 +version: 2.14.2 environment: sdk: ^3.4.0 From dbc784fe0169e7f82f19951118df1091efa7c2af Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Tue, 13 Aug 2024 17:11:00 -0400 Subject: [PATCH 12/20] Remove dead code --- .../flutter/plugins/googlemaps/Convert.java | 54 ------------------- .../googlemaps/PolylinesController.java | 22 -------- 2 files changed, 76 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 bdff0f87122..4ee1eb0d771 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 @@ -722,60 +722,6 @@ static String interpretPolylineOptions( return polyline.getPolylineId(); } - static String interpretPolylineOptions( - Map data, PolylineOptionsSink sink, AssetManager assetManager, float density) { - final Object consumeTapEvents = data.get("consumeTapEvents"); - if (consumeTapEvents != null) { - sink.setConsumeTapEvents(toBoolean(consumeTapEvents)); - } - final Object color = data.get("color"); - if (color != null) { - sink.setColor(toInt(color)); - } - final Object endCap = data.get("endCap"); - if (endCap != null) { - sink.setEndCap(toCap(endCap, assetManager, density)); - } - final Object geodesic = data.get("geodesic"); - if (geodesic != null) { - sink.setGeodesic(toBoolean(geodesic)); - } - final Object jointType = data.get("jointType"); - if (jointType != null) { - sink.setJointType(toInt(jointType)); - } - final Object startCap = data.get("startCap"); - if (startCap != null) { - sink.setStartCap(toCap(startCap, assetManager, density)); - } - final Object visible = data.get("visible"); - if (visible != null) { - sink.setVisible(toBoolean(visible)); - } - final Object width = data.get("width"); - if (width != null) { - sink.setWidth(toInt(width)); - } - final Object zIndex = data.get("zIndex"); - if (zIndex != null) { - sink.setZIndex(toFloat(zIndex)); - } - final Object points = data.get("points"); - if (points != null) { - sink.setPoints(toPoints(points)); - } - final Object pattern = data.get("pattern"); - if (pattern != null) { - sink.setPattern(toPattern(pattern)); - } - final String polylineId = (String) data.get("polylineId"); - if (polylineId == null) { - throw new IllegalArgumentException("polylineId was null"); - } else { - return polylineId; - } - } - static String interpretCircleOptions(Messages.PlatformCircle circle, CircleOptionsSink sink) { sink.setConsumeTapEvents(circle.getConsumeTapEvents()); sink.setFillColor(circle.getFillColor().intValue()); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/PolylinesController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/PolylinesController.java index a32efe43a54..65b53eb7e07 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/PolylinesController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/PolylinesController.java @@ -71,17 +71,6 @@ boolean onPolylineTap(String googlePolylineId) { return false; } - private void addJsonPolyline(Map polyline) { - if (polyline == null) { - return; - } - PolylineBuilder polylineBuilder = new PolylineBuilder(density); - String polylineId = - Convert.interpretPolylineOptions(polyline, polylineBuilder, assetManager, density); - PolylineOptions options = polylineBuilder.build(); - addPolyline(polylineId, options, polylineBuilder.consumeTapEvents()); - } - private void addPolyline(@NonNull Messages.PlatformPolyline polyline) { PolylineBuilder polylineBuilder = new PolylineBuilder(density); String polylineId = @@ -98,17 +87,6 @@ private void addPolyline( googleMapsPolylineIdToDartPolylineId.put(polyline.getId(), polylineId); } - private void changeJsonPolyline(Map polyline) { - if (polyline == null) { - return; - } - String polylineId = getPolylineId(polyline); - PolylineController polylineController = polylineIdToController.get(polylineId); - if (polylineController != null) { - Convert.interpretPolylineOptions(polyline, polylineController, assetManager, density); - } - } - private void changePolyline(@NonNull Messages.PlatformPolyline polyline) { String polylineId = polyline.getPolylineId(); PolylineController polylineController = polylineIdToController.get(polylineId); From fd582f78945fc8293a9caeba7d121003bb3fd979 Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Wed, 14 Aug 2024 13:09:34 -0400 Subject: [PATCH 13/20] Set params in test --- .../test/java/io/flutter/plugins/googlemaps/ConvertTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 87bf6291146..09d0ee10fc1 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 @@ -105,7 +105,8 @@ public void ConvertToPointsConvertsThePointsWithFullPrecision() { public void ConvertToPointsPlatformConvertsThePointsWithFullPrecision() { double latitude = 43.03725568057; double longitude = -87.90466904649; - Messages.PlatformLatLng platLng = new Messages.PlatformLatLng.Builder().build(); + Messages.PlatformLatLng platLng = + new Messages.PlatformLatLng.Builder().setLatitude(latitude).setLongitude(longitude).build(); List latLngs = Convert.toPoints(Collections.singletonList(platLng)); LatLng latLng = latLngs.get(0); Assert.assertEquals(latitude, latLng.latitude, 1e-15); From 5dfa64ec5eed701163ef5eb43db8dac152449d74 Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Fri, 16 Aug 2024 14:05:55 -0400 Subject: [PATCH 14/20] PR Feedback --- .../main/java/io/flutter/plugins/googlemaps/Convert.java | 6 +++--- .../java/io/flutter/plugins/googlemaps/ConvertTest.java | 2 +- .../google_maps_flutter_android/pigeons/messages.dart | 8 +++++++- 3 files changed, 11 insertions(+), 5 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 4ee1eb0d771..e0a9e6b2bf2 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 @@ -784,7 +784,7 @@ static String interpretHeatmapOptions(Map data, HeatmapOptionsSink si } @VisibleForTesting - static List toPoints(Object o) { + static List pointsFromPigeon(Object o) { final List data = toList(o); final List points = new ArrayList<>(data.size()); @@ -863,8 +863,8 @@ static Gradient toGradient(Object o) { private static List> toHoles(List> data) { final List> holes = new ArrayList<>(data.size()); - for (List rawHole : data) { - holes.add(toPoints(rawHole)); + for (List hole : data) { + holes.add(toPoints(hole)); } return holes; } 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 09d0ee10fc1..ccc52200536 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 @@ -95,7 +95,7 @@ public void ConvertToPointsConvertsThePointsWithFullPrecision() { point.add(longitude); ArrayList> pointsList = new ArrayList<>(); pointsList.add(point); - List latLngs = Convert.toPoints(pointsList); + List latLngs = Convert.pointsFromPigeon(pointsList); LatLng latLng = latLngs.get(0); Assert.assertEquals(latitude, latLng.latitude, 1e-15); Assert.assertEquals(longitude, latLng.longitude, 1e-15); 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 abc93ac6498..d78826f3daa 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,10 +202,16 @@ class PlatformPolyline { final bool consumesTapEvents; final int color; final bool geodesic; + // TODO(schectman): Convert field to enum. final int jointType; - // TODO(schectman): convert to structured data. + + /// The pattern data, as JSON. Each element in this list should be set only from PatternItem.toJson, and the native code must interpret it according to the internal implementation details of that method. + // TODO(schectman): Convert field to structured data. final List patterns; final List points; + + /// The start and end cap data, as JSON. These should be set only from Cap.toJson, and the native code must interpret it according to the internal implementation details of that method. + // TODO(schectman): Convert below two fields to structured data. final Object startCap; final Object endCap; final bool visible; From 2129e96e44ce3c79ae1409a4526e252ce9f6b488 Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Mon, 19 Aug 2024 12:33:01 -0400 Subject: [PATCH 15/20] PR Feedback --- .../flutter/plugins/googlemaps/Convert.java | 10 ++-- .../plugins/googlemaps/ConvertTest.java | 4 +- .../plugins/googlemaps/PigeonTestHelper.java | 46 +++++++++++++++++++ .../googlemaps/PolygonsControllerTest.java | 20 ++++++++ .../pigeons/messages.dart | 2 + 5 files changed, 75 insertions(+), 7 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/PigeonTestHelper.java create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/PolygonsControllerTest.java 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 e0a9e6b2bf2..8caec29164c 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 @@ -698,7 +698,7 @@ static String interpretPolygonOptions(Messages.PlatformPolygon polygon, PolygonO sink.setStrokeColor(polygon.getStrokeColor().intValue()); sink.setStrokeWidth(polygon.getStrokeWidth()); sink.setZIndex(polygon.getZIndex()); - sink.setPoints(toPoints(polygon.getPoints())); + sink.setPoints(pointsFromPigeon(polygon.getPoints())); sink.setHoles(toHoles(polygon.getHoles())); return polygon.getPolygonId(); } @@ -717,7 +717,7 @@ static String interpretPolylineOptions( sink.setVisible(polyline.getVisible()); sink.setWidth(polyline.getWidth()); sink.setZIndex(polyline.getZIndex()); - sink.setPoints(toPoints(polyline.getPoints())); + sink.setPoints(pointsFromPigeon(polyline.getPoints())); sink.setPattern(toPattern(polyline.getPatterns())); return polyline.getPolylineId(); } @@ -784,7 +784,7 @@ static String interpretHeatmapOptions(Map data, HeatmapOptionsSink si } @VisibleForTesting - static List pointsFromPigeon(Object o) { + static List toPoints(Object o) { final List data = toList(o); final List points = new ArrayList<>(data.size()); @@ -795,7 +795,7 @@ static List pointsFromPigeon(Object o) { return points; } - static List toPoints(List data) { + static List pointsFromPigeon(List data) { final List points = new ArrayList<>(data.size()); for (Messages.PlatformLatLng rawPoint : data) { @@ -864,7 +864,7 @@ private static List> toHoles(List> da final List> holes = new ArrayList<>(data.size()); for (List hole : data) { - holes.add(toPoints(hole)); + holes.add(pointsFromPigeon(hole)); } return holes; } 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 ccc52200536..d121782303a 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 @@ -95,7 +95,7 @@ public void ConvertToPointsConvertsThePointsWithFullPrecision() { point.add(longitude); ArrayList> pointsList = new ArrayList<>(); pointsList.add(point); - List latLngs = Convert.pointsFromPigeon(pointsList); + List latLngs = Convert.toPoints(pointsList); LatLng latLng = latLngs.get(0); Assert.assertEquals(latitude, latLng.latitude, 1e-15); Assert.assertEquals(longitude, latLng.longitude, 1e-15); @@ -107,7 +107,7 @@ public void ConvertToPointsPlatformConvertsThePointsWithFullPrecision() { double longitude = -87.90466904649; Messages.PlatformLatLng platLng = new Messages.PlatformLatLng.Builder().setLatitude(latitude).setLongitude(longitude).build(); - List latLngs = Convert.toPoints(Collections.singletonList(platLng)); + List latLngs = Convert.pointsFromPigeon(Collections.singletonList(platLng)); LatLng latLng = latLngs.get(0); Assert.assertEquals(latitude, latLng.latitude, 1e-15); Assert.assertEquals(longitude, latLng.longitude, 1e-15); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/PigeonTestHelper.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/PigeonTestHelper.java new file mode 100644 index 00000000000..54e89db383f --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/PigeonTestHelper.java @@ -0,0 +1,46 @@ +package io.flutter.plugins.googlemaps; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import android.content.res.AssetManager; +import android.graphics.Bitmap; +import com.google.android.gms.maps.model.BitmapDescriptor; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; + +public class PigeonTestHelper { + public static final String FAKE_ASSET_NAME = "fake_asset_name"; + public static final String FAKE_ASSET_KEY = "fake_asset_key"; + public final Convert.FlutterInjectorWrapper flutterInjectorWrapper; + + public final AssetManager assetManager; + + public final Convert.BitmapDescriptorFactoryWrapper bitmapDescriptorFactoryWrapper; + + public final BitmapDescriptor mockBitmapDescriptor; + + public static InputStream buildImageInputStream() { + Bitmap fakeBitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888); + ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + fakeBitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream); + byte[] byteArray = byteArrayOutputStream.toByteArray(); + return new ByteArrayInputStream(byteArray); + } + + public PigeonTestHelper() { + flutterInjectorWrapper = mock(Convert.FlutterInjectorWrapper.class); + assetManager = mock(AssetManager.class); + bitmapDescriptorFactoryWrapper = mock(Convert.BitmapDescriptorFactoryWrapper.class); + mockBitmapDescriptor = mock(BitmapDescriptor.class); + } + + public void setupFakeAssetBitmap() throws IOException { + when(flutterInjectorWrapper.getLookupKeyForAsset(FAKE_ASSET_NAME)).thenReturn(FAKE_ASSET_NAME); + when(assetManager.open(FAKE_ASSET_KEY)).thenReturn(buildImageInputStream()); + when(bitmapDescriptorFactoryWrapper.fromAsset(any())).thenReturn(mockBitmapDescriptor); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/PolygonsControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/PolygonsControllerTest.java new file mode 100644 index 00000000000..cb91ec78ed0 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/PolygonsControllerTest.java @@ -0,0 +1,20 @@ +// 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. + +package io.flutter.plugins.googlemaps; + +import com.google.android.gms.maps.GoogleMap; +import org.junit.Before; +import org.mockito.Mock; + +public class PolygonsControllerTest { + @Mock GoogleMap googleMap; + + private PigeonTestHelper pigeonTestHelper; + + @Before + public void setup() { + pigeonTestHelper = new PigeonTestHelper(); + } +} 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 d78826f3daa..5c709c344fb 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,6 +202,8 @@ class PlatformPolyline { final bool consumesTapEvents; final int color; final bool geodesic; + + /// The joint type as an integer. This must be a value corresponding to one of the values defined in the platform interface package's JointType enum. The integer values specified in this enum must match those used by the native SDK. // TODO(schectman): Convert field to enum. final int jointType; From f8af5f5d71a2a6ce8938a9bc798ece2b9844d964 Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Mon, 19 Aug 2024 13:01:38 -0400 Subject: [PATCH 16/20] Remove accidents --- .../plugins/googlemaps/PigeonTestHelper.java | 46 ------------------- .../googlemaps/PolygonsControllerTest.java | 20 -------- 2 files changed, 66 deletions(-) delete mode 100644 packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/PigeonTestHelper.java delete mode 100644 packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/PolygonsControllerTest.java diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/PigeonTestHelper.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/PigeonTestHelper.java deleted file mode 100644 index 54e89db383f..00000000000 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/PigeonTestHelper.java +++ /dev/null @@ -1,46 +0,0 @@ -package io.flutter.plugins.googlemaps; - -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import android.content.res.AssetManager; -import android.graphics.Bitmap; -import com.google.android.gms.maps.model.BitmapDescriptor; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; - -public class PigeonTestHelper { - public static final String FAKE_ASSET_NAME = "fake_asset_name"; - public static final String FAKE_ASSET_KEY = "fake_asset_key"; - public final Convert.FlutterInjectorWrapper flutterInjectorWrapper; - - public final AssetManager assetManager; - - public final Convert.BitmapDescriptorFactoryWrapper bitmapDescriptorFactoryWrapper; - - public final BitmapDescriptor mockBitmapDescriptor; - - public static InputStream buildImageInputStream() { - Bitmap fakeBitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888); - ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - fakeBitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream); - byte[] byteArray = byteArrayOutputStream.toByteArray(); - return new ByteArrayInputStream(byteArray); - } - - public PigeonTestHelper() { - flutterInjectorWrapper = mock(Convert.FlutterInjectorWrapper.class); - assetManager = mock(AssetManager.class); - bitmapDescriptorFactoryWrapper = mock(Convert.BitmapDescriptorFactoryWrapper.class); - mockBitmapDescriptor = mock(BitmapDescriptor.class); - } - - public void setupFakeAssetBitmap() throws IOException { - when(flutterInjectorWrapper.getLookupKeyForAsset(FAKE_ASSET_NAME)).thenReturn(FAKE_ASSET_NAME); - when(assetManager.open(FAKE_ASSET_KEY)).thenReturn(buildImageInputStream()); - when(bitmapDescriptorFactoryWrapper.fromAsset(any())).thenReturn(mockBitmapDescriptor); - } -} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/PolygonsControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/PolygonsControllerTest.java deleted file mode 100644 index cb91ec78ed0..00000000000 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/PolygonsControllerTest.java +++ /dev/null @@ -1,20 +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. - -package io.flutter.plugins.googlemaps; - -import com.google.android.gms.maps.GoogleMap; -import org.junit.Before; -import org.mockito.Mock; - -public class PolygonsControllerTest { - @Mock GoogleMap googleMap; - - private PigeonTestHelper pigeonTestHelper; - - @Before - public void setup() { - pigeonTestHelper = new PigeonTestHelper(); - } -} From 570788d742123ae1edba7c8a9fcc77cea6f632bc Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Mon, 19 Aug 2024 14:08:33 -0400 Subject: [PATCH 17/20] Dead code --- .../io/flutter/plugins/googlemaps/Convert.java | 12 ------------ .../flutter/plugins/googlemaps/ConvertTest.java | 17 +---------------- 2 files changed, 1 insertion(+), 28 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 8caec29164c..78b9f34a8cf 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 @@ -783,18 +783,6 @@ static String interpretHeatmapOptions(Map data, HeatmapOptionsSink si } } - @VisibleForTesting - static List toPoints(Object o) { - final List data = toList(o); - final List points = new ArrayList<>(data.size()); - - for (Object rawPoint : data) { - final List point = toList(rawPoint); - points.add(new LatLng(toDouble(point.get(0)), toDouble(point.get(1)))); - } - return points; - } - static List pointsFromPigeon(List data) { final List points = new ArrayList<>(data.size()); 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 d121782303a..3ee87f25959 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 @@ -87,22 +87,7 @@ public void tearDown() throws Exception { } @Test - public void ConvertToPointsConvertsThePointsWithFullPrecision() { - double latitude = 43.03725568057; - double longitude = -87.90466904649; - ArrayList point = new ArrayList<>(); - point.add(latitude); - point.add(longitude); - ArrayList> pointsList = new ArrayList<>(); - pointsList.add(point); - List latLngs = Convert.toPoints(pointsList); - LatLng latLng = latLngs.get(0); - Assert.assertEquals(latitude, latLng.latitude, 1e-15); - Assert.assertEquals(longitude, latLng.longitude, 1e-15); - } - - @Test - public void ConvertToPointsPlatformConvertsThePointsWithFullPrecision() { + public void ConvertPointsFromPigeonConvertsThePointsWithFullPrecision() { double latitude = 43.03725568057; double longitude = -87.90466904649; Messages.PlatformLatLng platLng = From 49e115d601dc6d0b850a45fdd85c71688e26afff Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Mon, 19 Aug 2024 15:06:23 -0400 Subject: [PATCH 18/20] Add reference for TODO --- .../google_maps_flutter_android/pigeons/messages.dart | 1 + 1 file changed, 1 insertion(+) 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 5c709c344fb..52ce09a1430 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 @@ -205,6 +205,7 @@ class PlatformPolyline { /// The joint type as an integer. This must be a value corresponding to one of the values defined in the platform interface package's JointType enum. The integer values specified in this enum must match those used by the native SDK. // TODO(schectman): Convert field to enum. + // https://github.com/flutter/flutter/issues/153718 final int jointType; /// The pattern data, as JSON. Each element in this list should be set only from PatternItem.toJson, and the native code must interpret it according to the internal implementation details of that method. From 3f0b8cf2652c952374bdfe6019319da7d26b675b Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Mon, 19 Aug 2024 15:59:05 -0400 Subject: [PATCH 19/20] Formatting --- .../src/test/java/io/flutter/plugins/googlemaps/ConvertTest.java | 1 - 1 file changed, 1 deletion(-) 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 3ee87f25959..a7331b89f79 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 @@ -43,7 +43,6 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStream; -import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; From 2f12966190de697ee8f99a9ae827c6eace4d7176 Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Wed, 21 Aug 2024 12:38:53 -0400 Subject: [PATCH 20/20] Update version --- .../google_maps_flutter_android/CHANGELOG.md | 2 +- .../google_maps_flutter_android/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md index 96d96fe3527..8018a9df086 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md @@ -1,4 +1,4 @@ -## 2.14.2 +## 2.14.3 * Converts `PlatformPolygon` and `PlatformPolyline` to pigeon. 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 01d95416829..71aa5320b40 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter_android description: Android implementation of the google_maps_flutter plugin. repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 2.14.2 +version: 2.14.3 environment: sdk: ^3.4.0