From 2edee93455c7c7e839afd1d0f824ef4b3afc2e46 Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Tue, 20 Aug 2024 16:49:09 -0400 Subject: [PATCH 1/5] Define pigeon PlatformTileOverlay --- .../flutter/plugins/googlemaps/Messages.java | 1360 +++++++---------- .../lib/src/google_maps_flutter_android.dart | 8 +- .../lib/src/messages.g.dart | 670 ++++---- .../pigeons/messages.dart | 21 +- .../google_maps_flutter_android_test.dart | 14 +- 5 files changed, 831 insertions(+), 1242 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..37360400cdd 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,12 +1292,13 @@ 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. + * 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; @@ -1402,12 +1318,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; } PlatformPolygon that = (PlatformPolygon) o; return json.equals(that.json); } @@ -1452,12 +1364,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 +1390,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 +1436,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 +1480,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 +1540,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,25 +1552,85 @@ 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. - */ - private @NonNull Map json; + private @NonNull String tileOverlayId; - public @NonNull Map getJson() { - return json; + public @NonNull String getTileOverlayId() { + return tileOverlayId; } - public void setJson(@NonNull Map setterArg) { + public void setTileOverlayId(@NonNull String setterArg) { if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"json\" is null."); + throw new IllegalStateException("Nonnull field \"tileOverlayId\" is null."); } - this.json = setterArg; + this.tileOverlayId = setterArg; + } + + private @NonNull Boolean fadeIn; + + public @NonNull Boolean getFadeIn() { + return fadeIn; + } + + public void setFadeIn(@NonNull Boolean setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"fadeIn\" is null."); + } + this.fadeIn = setterArg; + } + + private @NonNull Double transparency; + + public @NonNull Double getTransparency() { + return transparency; + } + + public void setTransparency(@NonNull Double setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"transparency\" is null."); + } + this.transparency = 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; + } + + 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 tileSize; + + public @NonNull Long getTileSize() { + return tileSize; + } + + public void setTileSize(@NonNull Long setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"tileSize\" is null."); + } + this.tileSize = setterArg; } /** Constructor is non-public to enforce null safety; use Builder. */ @@ -1679,49 +1638,105 @@ 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); + return tileOverlayId.equals(that.tileOverlayId) && fadeIn.equals(that.fadeIn) && transparency.equals(that.transparency) && zIndex.equals(that.zIndex) && visible.equals(that.visible) && tileSize.equals(that.tileSize); } @Override public int hashCode() { - return Objects.hash(json); + return Objects.hash(tileOverlayId, fadeIn, transparency, zIndex, visible, tileSize); } public static final class Builder { - private @Nullable Map json; + private @Nullable String tileOverlayId; @CanIgnoreReturnValue - public @NonNull Builder setJson(@NonNull Map setterArg) { - this.json = setterArg; + public @NonNull Builder setTileOverlayId(@NonNull String setterArg) { + this.tileOverlayId = setterArg; + return this; + } + + private @Nullable Boolean fadeIn; + + @CanIgnoreReturnValue + public @NonNull Builder setFadeIn(@NonNull Boolean setterArg) { + this.fadeIn = setterArg; + return this; + } + + private @Nullable Double transparency; + + @CanIgnoreReturnValue + public @NonNull Builder setTransparency(@NonNull Double setterArg) { + this.transparency = setterArg; + return this; + } + + private @Nullable Long zIndex; + + @CanIgnoreReturnValue + public @NonNull Builder setZIndex(@NonNull Long setterArg) { + this.zIndex = setterArg; + return this; + } + + private @Nullable Boolean visible; + + @CanIgnoreReturnValue + public @NonNull Builder setVisible(@NonNull Boolean setterArg) { + this.visible = setterArg; + return this; + } + + private @Nullable Long tileSize; + + @CanIgnoreReturnValue + public @NonNull Builder setTileSize(@NonNull Long setterArg) { + this.tileSize = setterArg; return this; } public @NonNull PlatformTileOverlay build() { PlatformTileOverlay pigeonReturn = new PlatformTileOverlay(); - pigeonReturn.setJson(json); + pigeonReturn.setTileOverlayId(tileOverlayId); + pigeonReturn.setFadeIn(fadeIn); + pigeonReturn.setTransparency(transparency); + pigeonReturn.setZIndex(zIndex); + pigeonReturn.setVisible(visible); + pigeonReturn.setTileSize(tileSize); return pigeonReturn; } } @NonNull ArrayList toList() { - ArrayList toListResult = new ArrayList(1); - toListResult.add(json); + ArrayList toListResult = new ArrayList(6); + toListResult.add(tileOverlayId); + toListResult.add(fadeIn); + toListResult.add(transparency); + toListResult.add(zIndex); + toListResult.add(visible); + toListResult.add(tileSize); return toListResult; } static @NonNull PlatformTileOverlay fromList(@NonNull ArrayList __pigeon_list) { PlatformTileOverlay pigeonResult = new PlatformTileOverlay(); - Object json = __pigeon_list.get(0); - pigeonResult.setJson((Map) json); + Object tileOverlayId = __pigeon_list.get(0); + pigeonResult.setTileOverlayId((String) tileOverlayId); + Object fadeIn = __pigeon_list.get(1); + pigeonResult.setFadeIn((Boolean) fadeIn); + Object transparency = __pigeon_list.get(2); + pigeonResult.setTransparency((Double) transparency); + Object zIndex = __pigeon_list.get(3); + pigeonResult.setZIndex((zIndex == null) ? null : ((zIndex instanceof Integer) ? (Integer) zIndex : (Long) zIndex)); + Object visible = __pigeon_list.get(4); + pigeonResult.setVisible((Boolean) visible); + Object tileSize = __pigeon_list.get(5); + pigeonResult.setTileSize((tileSize == null) ? null : ((tileSize instanceof Integer) ? (Integer) tileSize : (Long) tileSize)); return pigeonResult; } } @@ -1729,7 +1744,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 +1804,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 +1886,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 +1920,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 +1978,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 +2012,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 +2070,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 +2130,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 +2212,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 +2230,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 +2276,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 +2401,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 +2481,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 +2516,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 +2543,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 +2748,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 +2772,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 +3022,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 +3056,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 +3114,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 +3174,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 +3256,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 +3281,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 +3389,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 +3479,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 +3507,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 +3517,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 +3591,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 +3627,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 +3637,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 +3651,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 +3663,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 +3677,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 +3689,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 +3703,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 +3714,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 +3728,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 +3740,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 +3754,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 +3766,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 +3780,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 +3792,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 +3806,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 +3818,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 +3832,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 +3842,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 +3856,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 +3866,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 +3880,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 +3888,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 +3902,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 +3912,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 +3926,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 +3936,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 +3950,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 +3958,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 +3972,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 +3982,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 +3996,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 +4006,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 +4020,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 +4030,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 +4044,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 +4054,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 +4068,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 +4076,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 +4090,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 +4100,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 +4114,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 +4148,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 +4536,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 +4550,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 +4569,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 +4585,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 +4652,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 +4666,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 +4674,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 +4688,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 +4696,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 +4710,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 +4718,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 +4732,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 +4740,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 +4754,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 +4762,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 +4776,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 +4784,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 +4798,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 +4806,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 +4820,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 +4828,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 +4842,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 +4850,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 +4864,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 +4872,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 +4886,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 +4896,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 +4910,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 +4918,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 +4932,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 +4942,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/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index b7051ca679e..55f4d9a99a6 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 @@ -765,7 +765,13 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { // See the TODOs at the top of this file and on the 'json' field in // messages.dart. return PlatformTileOverlay( - json: tileOverlay.toJson() as Map); + tileOverlayId: tileOverlay.tileOverlayId.value, + fadeIn: tileOverlay.fadeIn, + transparency: tileOverlay.transparency, + zIndex: tileOverlay.zIndex, + visible: tileOverlay.visible, + tileSize: tileOverlay.tileSize, + ); } } 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..430ac9ada3a 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; @@ -440,24 +440,46 @@ class PlatformTile { /// Pigeon equivalent of the TileOverlay class. class PlatformTileOverlay { PlatformTileOverlay({ - required this.json, + required this.tileOverlayId, + required this.fadeIn, + required this.transparency, + required this.zIndex, + required this.visible, + required this.tileSize, }); - /// 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. - Map json; + String tileOverlayId; + + bool fadeIn; + + double transparency; + + int zIndex; + + bool visible; + + int tileSize; Object encode() { return [ - json, + tileOverlayId, + fadeIn, + transparency, + zIndex, + visible, + tileSize, ]; } static PlatformTileOverlay decode(Object result) { result as List; return PlatformTileOverlay( - json: (result[0] as Map?)!.cast(), + tileOverlayId: result[0]! as String, + fadeIn: result[1]! as bool, + transparency: result[2]! as double, + zIndex: result[3]! as int, + visible: result[4]! as bool, + tileSize: result[5]! as int, ); } } @@ -669,13 +691,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 +907,7 @@ class PlatformZoomRange { } } + class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -895,73 +915,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 +992,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 +1057,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 +1066,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 +1091,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 +1114,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 +1137,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 +1160,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 +1183,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 +1206,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 +1229,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 +1252,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 +1276,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 +1304,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 +1332,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 +1361,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 +1384,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 +1407,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 +1435,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 +1458,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 +1482,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 +1514,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 +1546,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 +1574,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 +1597,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 +1670,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 +1687,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 +1712,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 +1731,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 +1756,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 +1781,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 +1806,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 +1834,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 +1862,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 +1890,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 +1915,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 +1940,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 +1965,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 +1990,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 +2015,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 +2042,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 +2060,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 +2075,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 +2110,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 +2120,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 +2147,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 +2157,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 +2184,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 +2211,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 +2238,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 +2265,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 +2292,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 +2319,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 +2346,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 +2368,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 +2395,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 +2422,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 +2449,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 +2471,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 +2498,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 +2520,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(); } } } 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..7b1b8787279 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 @@ -189,14 +189,21 @@ class PlatformTile { /// Pigeon equivalent of the TileOverlay class. class PlatformTileOverlay { - PlatformTileOverlay(this.json); + PlatformTileOverlay({ + required this.tileOverlayId, + required this.fadeIn, + required this.transparency, + required this.zIndex, + required this.visible, + required this.tileSize, + }); - /// 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. - // TODO(stuartmorgan): Replace this with structured data. This exists only to - // allow incremental migration to Pigeon. - final Map json; + final String tileOverlayId; + final bool fadeIn; + final double transparency; + final int zIndex; + final bool visible; + final int tileSize; } /// Pigeon equivalent of Flutter's EdgeInsets. 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..b3efaefe4ec 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 @@ -547,15 +547,25 @@ void main() { final List toChange = verification.captured[1] as List; final List toRemove = verification.captured[2] as List; + void expectTileOverlay(PlatformTileOverlay? actual, TileOverlay expected) { + expect(actual?.encode(), [ + expected.tileOverlayId.value, + expected.fadeIn, + expected.transparency, + expected.zIndex, + expected.visible, + expected.tileSize, + ]); + } // Object one should be removed. expect(toRemove.length, 1); expect(toRemove.first, object1.tileOverlayId.value); // Object two should be changed. expect(toChange.length, 1); - expect(toChange.first?.json, object2new.toJson()); + expectTileOverlay(toChange.first, object2new); // Object 3 should be added. expect(toAdd.length, 1); - expect(toAdd.first?.json, object3.toJson()); + expectTileOverlay(toAdd.first, object3); }); test('markers send drag event to correct streams', () async { From 4957942e4b5ec5ab4528d4aceb589659adb6b2a6 Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Tue, 20 Aug 2024 16:55:07 -0400 Subject: [PATCH 2/5] Java updates --- .../flutter/plugins/googlemaps/Convert.java | 29 ++++--------------- .../flutter/plugins/googlemaps/Messages.java | 6 ++-- .../googlemaps/TileOverlaysController.java | 24 +++++---------- 3 files changed, 17 insertions(+), 42 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 91c039e2537..6d213399249 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 @@ -978,29 +978,12 @@ private static Cap toCap(Object o, AssetManager assetManager, float density) { } } - static String interpretTileOverlayOptions(Map data, TileOverlaySink sink) { - final Object fadeIn = data.get("fadeIn"); - if (fadeIn != null) { - sink.setFadeIn(toBoolean(fadeIn)); - } - final Object transparency = data.get("transparency"); - if (transparency != null) { - sink.setTransparency(toFloat(transparency)); - } - final Object zIndex = data.get("zIndex"); - if (zIndex != null) { - sink.setZIndex(toFloat(zIndex)); - } - final Object visible = data.get("visible"); - if (visible != null) { - sink.setVisible(toBoolean(visible)); - } - final String tileOverlayId = (String) data.get("tileOverlayId"); - if (tileOverlayId == null) { - throw new IllegalArgumentException("tileOverlayId was null"); - } else { - return tileOverlayId; - } + static String interpretTileOverlayOptions(Messages.PlatformTileOverlay tileOverlay, TileOverlaySink sink) { + sink.setFadeIn(tileOverlay.getFadeIn()); + sink.setTransparency(tileOverlay.getTransparency().floatValue()); + sink.setZIndex(tileOverlay.getZIndex()); + sink.setVisible(tileOverlay.getVisible()); + return tileOverlay.getTileOverlayId(); } static Tile tileFromPigeon(Messages.PlatformTile tile) { 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 37360400cdd..ee76bf15dde 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 @@ -3388,12 +3388,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/TileOverlaysController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/TileOverlaysController.java index fcc5c212d8d..2ee8dcac857 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/TileOverlaysController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/TileOverlaysController.java @@ -31,17 +31,13 @@ void setGoogleMap(GoogleMap googleMap) { void addTileOverlays(@NonNull List tileOverlaysToAdd) { for (Messages.PlatformTileOverlay tileOverlayToAdd : tileOverlaysToAdd) { - @SuppressWarnings("unchecked") - final Map overlayJson = (Map) tileOverlayToAdd.getJson(); - addJsonTileOverlay(overlayJson); + addTileOverlay(tileOverlayToAdd); } } void changeTileOverlays(@NonNull List tileOverlaysToChange) { for (Messages.PlatformTileOverlay tileOverlayToChange : tileOverlaysToChange) { - @SuppressWarnings("unchecked") - final Map overlayJson = (Map) tileOverlayToChange.getJson(); - changeJsonTileOverlay(overlayJson); + changeTileOverlay(tileOverlayToChange); } } @@ -79,13 +75,10 @@ TileOverlay getTileOverlay(String tileOverlayId) { return tileOverlayController.getTileOverlay(); } - private void addJsonTileOverlay(Map tileOverlayOptions) { - if (tileOverlayOptions == null) { - return; - } + private void addTileOverlay(@NonNull Messages.PlatformTileOverlay platformTileOverlay) { TileOverlayBuilder tileOverlayOptionsBuilder = new TileOverlayBuilder(); String tileOverlayId = - Convert.interpretTileOverlayOptions(tileOverlayOptions, tileOverlayOptionsBuilder); + Convert.interpretTileOverlayOptions(platformTileOverlay, tileOverlayOptionsBuilder); TileProviderController tileProviderController = new TileProviderController(flutterApi, tileOverlayId); tileOverlayOptionsBuilder.setTileProvider(tileProviderController); @@ -95,14 +88,11 @@ private void addJsonTileOverlay(Map tileOverlayOptions) { tileOverlayIdToController.put(tileOverlayId, tileOverlayController); } - private void changeJsonTileOverlay(Map tileOverlayOptions) { - if (tileOverlayOptions == null) { - return; - } - String tileOverlayId = getTileOverlayId(tileOverlayOptions); + private void changeTileOverlay(@NonNull Messages.PlatformTileOverlay platformTileOverlay) { + String tileOverlayId = platformTileOverlay.getTileOverlayId(); TileOverlayController tileOverlayController = tileOverlayIdToController.get(tileOverlayId); if (tileOverlayController != null) { - Convert.interpretTileOverlayOptions(tileOverlayOptions, tileOverlayController); + Convert.interpretTileOverlayOptions(platformTileOverlay, tileOverlayController); } } From 66927c1b4a87b7be3e6428265ecad3f118a351d2 Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Tue, 20 Aug 2024 16:56:00 -0400 Subject: [PATCH 3/5] Formatting --- .../flutter/plugins/googlemaps/Convert.java | 3 +- .../flutter/plugins/googlemaps/Messages.java | 1216 +++++++++++------ .../lib/src/messages.g.dart | 633 +++++---- .../google_maps_flutter_android_test.dart | 1 + 4 files changed, 1219 insertions(+), 634 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 6d213399249..93219ead29d 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 @@ -978,7 +978,8 @@ private static Cap toCap(Object o, AssetManager assetManager, float density) { } } - static String interpretTileOverlayOptions(Messages.PlatformTileOverlay tileOverlay, TileOverlaySink sink) { + static String interpretTileOverlayOptions( + Messages.PlatformTileOverlay tileOverlay, TileOverlaySink sink) { sink.setFadeIn(tileOverlay.getFadeIn()); sink.setTransparency(tileOverlay.getTransparency().floatValue()); sink.setZIndex(tileOverlay.getZIndex()); 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 ee76bf15dde..4e1558c4cca 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,13 +1378,12 @@ 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. + * 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; @@ -1318,8 +1403,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; + } PlatformPolygon that = (PlatformPolygon) o; return json.equals(that.json); } @@ -1364,13 +1453,12 @@ 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; @@ -1390,8 +1478,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; + } PlatformPolyline that = (PlatformPolyline) o; return json.equals(that.json); } @@ -1436,7 +1528,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; @@ -1480,10 +1572,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 @@ -1540,9 +1638,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; @@ -1552,7 +1654,7 @@ ArrayList toList() { /** * Pigeon equivalent of the TileOverlay class. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformTileOverlay { private @NonNull String tileOverlayId; @@ -1638,10 +1740,19 @@ public void setTileSize(@NonNull Long setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformTileOverlay that = (PlatformTileOverlay) o; - return tileOverlayId.equals(that.tileOverlayId) && fadeIn.equals(that.fadeIn) && transparency.equals(that.transparency) && zIndex.equals(that.zIndex) && visible.equals(that.visible) && tileSize.equals(that.tileSize); + return tileOverlayId.equals(that.tileOverlayId) + && fadeIn.equals(that.fadeIn) + && transparency.equals(that.transparency) + && zIndex.equals(that.zIndex) + && visible.equals(that.visible) + && tileSize.equals(that.tileSize); } @Override @@ -1732,11 +1843,17 @@ ArrayList toList() { Object transparency = __pigeon_list.get(2); pigeonResult.setTransparency((Double) transparency); Object zIndex = __pigeon_list.get(3); - pigeonResult.setZIndex((zIndex == null) ? null : ((zIndex instanceof Integer) ? (Integer) zIndex : (Long) zIndex)); + pigeonResult.setZIndex( + (zIndex == null) + ? null + : ((zIndex instanceof Integer) ? (Integer) zIndex : (Long) zIndex)); Object visible = __pigeon_list.get(4); pigeonResult.setVisible((Boolean) visible); Object tileSize = __pigeon_list.get(5); - pigeonResult.setTileSize((tileSize == null) ? null : ((tileSize instanceof Integer) ? (Integer) tileSize : (Long) tileSize)); + pigeonResult.setTileSize( + (tileSize == null) + ? null + : ((tileSize instanceof Integer) ? (Integer) tileSize : (Long) tileSize)); return pigeonResult; } } @@ -1744,7 +1861,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; @@ -1804,10 +1921,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 @@ -1886,7 +2010,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; @@ -1920,8 +2044,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); } @@ -1978,7 +2106,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; @@ -2012,8 +2140,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); } @@ -2070,7 +2202,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,10 +2262,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 @@ -2212,10 +2351,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; @@ -2230,8 +2369,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); } @@ -2276,7 +2419,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; @@ -2401,15 +2544,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 { @@ -2481,7 +2645,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; } @@ -2516,7 +2681,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); @@ -2543,7 +2709,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; @@ -2748,15 +2914,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 { @@ -2772,7 +2981,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; } @@ -3022,7 +3232,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; @@ -3056,8 +3266,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); } @@ -3114,7 +3328,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; @@ -3174,10 +3388,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 @@ -3256,7 +3477,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; @@ -3281,8 +3502,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); } @@ -3388,14 +3613,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); } @@ -3481,7 +3708,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. */ @@ -3509,9 +3735,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. */ @@ -3519,70 +3745,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); @@ -3593,16 +3831,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) -> { @@ -3629,7 +3874,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) -> { @@ -3639,8 +3887,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; } @@ -3653,7 +3900,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) -> { @@ -3665,8 +3915,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; } @@ -3679,7 +3928,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) -> { @@ -3691,8 +3943,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; } @@ -3705,7 +3956,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) -> { @@ -3716,8 +3970,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; } @@ -3730,7 +3983,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) -> { @@ -3742,8 +3998,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; } @@ -3756,7 +4011,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) -> { @@ -3768,8 +4026,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; } @@ -3782,7 +4039,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) -> { @@ -3794,8 +4054,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; } @@ -3808,7 +4067,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) -> { @@ -3820,8 +4082,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; } @@ -3834,7 +4095,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) -> { @@ -3844,8 +4108,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; } @@ -3858,7 +4121,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) -> { @@ -3868,8 +4134,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; } @@ -3882,7 +4147,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) -> { @@ -3890,8 +4158,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; } @@ -3904,7 +4171,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) -> { @@ -3914,8 +4184,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; } @@ -3928,7 +4197,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) -> { @@ -3938,8 +4210,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; } @@ -3952,7 +4223,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) -> { @@ -3960,8 +4234,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; } @@ -3974,7 +4247,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) -> { @@ -3984,8 +4260,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; } @@ -3998,7 +4273,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) -> { @@ -4008,8 +4286,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; } @@ -4022,7 +4299,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) -> { @@ -4032,8 +4312,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; } @@ -4046,7 +4325,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) -> { @@ -4056,8 +4338,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; } @@ -4070,7 +4351,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) -> { @@ -4078,8 +4362,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; } @@ -4092,7 +4375,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) -> { @@ -4102,8 +4388,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; } @@ -4116,7 +4401,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) -> { @@ -4150,366 +4438,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) -> { @@ -4538,11 +4930,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 { @@ -4552,16 +4943,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) -> { @@ -4571,8 +4972,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; } @@ -4587,66 +4987,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) -> { @@ -4654,8 +5063,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; } @@ -4668,7 +5076,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) -> { @@ -4676,8 +5087,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; } @@ -4690,7 +5100,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) -> { @@ -4698,8 +5111,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; } @@ -4712,7 +5124,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) -> { @@ -4720,8 +5135,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; } @@ -4734,7 +5148,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) -> { @@ -4742,8 +5159,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; } @@ -4756,7 +5172,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) -> { @@ -4764,8 +5183,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; } @@ -4778,7 +5196,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) -> { @@ -4786,8 +5207,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; } @@ -4800,7 +5220,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) -> { @@ -4808,8 +5231,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; } @@ -4822,7 +5244,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) -> { @@ -4830,8 +5255,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; } @@ -4844,7 +5268,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) -> { @@ -4852,8 +5279,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; } @@ -4866,7 +5292,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) -> { @@ -4874,8 +5303,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; } @@ -4888,7 +5316,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) -> { @@ -4898,8 +5329,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; } @@ -4912,7 +5342,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) -> { @@ -4920,8 +5353,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; } @@ -4934,7 +5366,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) -> { @@ -4944,8 +5379,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/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart index 430ac9ada3a..74675ed0ded 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 []; } @@ -691,10 +692,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(), ); } } @@ -907,7 +911,6 @@ class PlatformZoomRange { } } - class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -915,73 +918,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 { @@ -992,54 +995,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: @@ -1057,7 +1060,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(); @@ -1066,8 +1070,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, @@ -1091,9 +1097,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, @@ -1114,15 +1123,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) { @@ -1137,15 +1149,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) { @@ -1160,15 +1175,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) { @@ -1183,15 +1201,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) { @@ -1206,15 +1227,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) { @@ -1229,15 +1253,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) { @@ -1252,15 +1279,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) { @@ -1276,8 +1306,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, @@ -1304,14 +1336,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) { @@ -1332,8 +1366,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, @@ -1361,8 +1397,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, @@ -1384,8 +1422,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, @@ -1407,8 +1447,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, @@ -1435,8 +1477,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, @@ -1458,8 +1502,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, @@ -1482,8 +1528,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, @@ -1514,8 +1562,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, @@ -1546,8 +1596,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, @@ -1574,8 +1626,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, @@ -1597,8 +1651,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, @@ -1670,13 +1726,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); @@ -1687,24 +1751,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 { @@ -1712,15 +1780,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); @@ -1731,22 +1802,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, @@ -1756,22 +1830,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, @@ -1781,22 +1858,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, @@ -1806,22 +1886,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, @@ -1834,22 +1917,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, @@ -1862,22 +1948,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, @@ -1890,22 +1979,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, @@ -1915,22 +2007,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, @@ -1940,22 +2035,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, @@ -1965,22 +2063,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, @@ -1990,22 +2091,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, @@ -2015,22 +2119,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, @@ -2042,12 +2149,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())); } }); } @@ -2060,9 +2169,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(); @@ -2075,9 +2186,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, @@ -2110,9 +2224,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(); @@ -2120,8 +2236,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, @@ -2147,9 +2265,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(); @@ -2157,8 +2277,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, @@ -2184,8 +2306,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, @@ -2211,8 +2335,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, @@ -2238,8 +2364,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, @@ -2265,8 +2393,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, @@ -2292,8 +2422,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, @@ -2319,8 +2451,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, @@ -2346,8 +2480,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, @@ -2368,8 +2504,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, @@ -2395,8 +2533,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, @@ -2422,8 +2562,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, @@ -2449,8 +2591,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, @@ -2471,8 +2615,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, @@ -2498,14 +2644,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) { @@ -2520,7 +2668,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 b3efaefe4ec..fd4a4286ac8 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 @@ -557,6 +557,7 @@ void main() { expected.tileSize, ]); } + // Object one should be removed. expect(toRemove.length, 1); expect(toRemove.first, object1.tileOverlayId.value); From 8a1d3d8e359c6cb32fb563b159ed0c5faad77c5d Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Wed, 21 Aug 2024 12:25:20 -0400 Subject: [PATCH 4/5] Version --- .../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 7c21eb45725..3f2ad37b8c7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md @@ -1,5 +1,9 @@ ## 2.14.2 +* Converts 'PlatformTileOverlay' to pigeon. + +## 2.14.2 + * Bumps `com.android.tools.build:gradle` from 7.3.1 to 8.5.1. ## 2.14.1 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 From fa85a7ac545a8f1a447f9e6c0a12a07c29121937 Mon Sep 17 00:00:00 2001 From: Yaakov Schectman Date: Fri, 23 Aug 2024 13:52:48 -0400 Subject: [PATCH 5/5] Bump version --- .../google_maps_flutter_android/CHANGELOG.md | 8 ++++---- .../lib/src/google_maps_flutter_android.dart | 3 --- .../google_maps_flutter_android/pubspec.yaml | 2 +- 3 files changed, 5 insertions(+), 8 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 e1fc37b1bd2..05213232e0e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md @@ -1,10 +1,10 @@ -## 2.14.3 +## 2.14.4 -* Converts `PlatformPolygon` and `PlatformPolyline` to pigeon. +* Converts 'PlatformTileOverlay' to pigeon. -## 2.14.2 +## 2.14.3 -* Converts 'PlatformTileOverlay' to pigeon. +* Converts `PlatformPolygon` and `PlatformPolyline` to pigeon. ## 2.14.2 diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index a27ba279a3d..7b4fa381126 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 @@ -790,9 +790,6 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { static PlatformTileOverlay _platformTileOverlayFromTileOverlay( TileOverlay tileOverlay) { - // 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 PlatformTileOverlay( tileOverlayId: tileOverlay.tileOverlayId.value, fadeIn: tileOverlay.fadeIn, 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 71aa5320b40..38c840c810d 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.3 +version: 2.14.4 environment: sdk: ^3.4.0