From 11cc8c9751c18bb11f019013707214396a219f2c Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Wed, 4 Feb 2026 19:14:38 +0530 Subject: [PATCH 01/46] [google_maps_flutter] Added Point of Interest Tapping --- .../lib/google_maps_flutter.dart | 3 + .../lib/src/controller.dart | 5 + .../lib/src/google_map.dart | 10 + .../googlemaps/GoogleMapController.java | 22 + .../flutter/plugins/googlemaps/Messages.java | 1878 ++++++---------- .../lib/src/google_maps_flutter_android.dart | 20 + .../lib/src/messages.g.dart | 1733 +++++++-------- .../pigeons/messages.dart | 18 + .../GoogleMapController.m | 14 + .../google_maps_flutter_pigeon_messages.g.m | 1955 +++++++---------- .../google_maps_flutter_pigeon_messages.g.h | 801 ++++--- .../lib/src/google_maps_flutter_ios.dart | 19 + .../lib/src/messages.g.dart | 1646 +++++++------- .../pigeons/messages.dart | 18 + .../lib/src/events/map_event.dart | 6 + .../method_channel_google_maps_flutter.dart | 24 + .../google_maps_flutter_platform.dart | 5 + .../lib/src/types/callbacks.dart | 3 + .../lib/src/types/point_of_interest.dart | 47 + .../lib/src/types/types.dart | 1 + 20 files changed, 3837 insertions(+), 4391 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/point_of_interest.dart diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart index 7ca650dceb75..4b0e26a9a09f 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart @@ -12,6 +12,8 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_android/google_maps_flutter_android.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + export 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart' show ArgumentCallback, @@ -47,6 +49,7 @@ export 'package:google_maps_flutter_platform_interface/google_maps_flutter_platf MarkerId, MinMaxZoomPreference, PatternItem, + PointOfInterest, Polygon, PolygonId, Polyline, diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/controller.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/controller.dart index 80f019d5a006..64aaec30660e 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/controller.dart @@ -99,6 +99,11 @@ class GoogleMapController { (InfoWindowTapEvent e) => _googleMapState.onInfoWindowTap(e.value), ), ); + _streamSubscriptions.add( + GoogleMapsFlutterPlatform.instance + .onPoiTap(mapId: mapId) + .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)), + ); _streamSubscriptions.add( GoogleMapsFlutterPlatform.instance .onPolylineTap(mapId: mapId) diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index 627efae290de..0ea1af487e7f 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -133,6 +133,7 @@ class GoogleMap extends StatefulWidget { this.onCameraIdle, this.onTap, this.onLongPress, + this.onPoiTap, this.cloudMapId, }); @@ -235,6 +236,9 @@ class GoogleMap extends StatefulWidget { /// See https://pub.dev/packages/google_maps_flutter_web. final Set clusterManagers; + /// Callback for Point of Interests tap + final ArgumentCallback? onPoiTap; + /// Ground overlays to be initialized for the map. /// /// Support table for Ground Overlay features: @@ -612,6 +616,12 @@ class _GoogleMapState extends State { } } + void onPoiTap(PointOfInterest poi) { + if (widget.onPoiTap != null) { + widget.onPoiTap!(poi); + } + } + void onPolygonTap(PolygonId polygonId) { final Polygon? polygon = _polygons[polygonId]; if (polygon == null) { diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java index bd87c923ccea..03328d51a2d1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java @@ -37,6 +37,7 @@ import com.google.android.gms.maps.model.LatLngBounds; import com.google.android.gms.maps.model.MapStyleOptions; import com.google.android.gms.maps.model.Marker; +import com.google.android.gms.maps.model.PointOfInterest; import com.google.android.gms.maps.model.Polygon; import com.google.android.gms.maps.model.Polyline; import com.google.android.gms.maps.model.TileOverlay; @@ -50,11 +51,16 @@ import io.flutter.plugins.googlemaps.Messages.MapsApi; import io.flutter.plugins.googlemaps.Messages.MapsCallbackApi; import io.flutter.plugins.googlemaps.Messages.MapsInspectorApi; +import io.flutter.plugin.common.MethodChannel; import java.io.ByteArrayOutputStream; +import java.util.Arrays; import java.util.ArrayList; import java.util.List; +import java.util.HashMap; import java.util.Objects; import java.util.Set; +import java.util.Map; + /** Controller of a single GoogleMaps MapView instance. */ class GoogleMapController @@ -67,6 +73,7 @@ class GoogleMapController MapsApi, MapsInspectorApi, OnMapReadyCallback, + GoogleMap.OnPoiClickListener, PlatformView { private static final String TAG = "GoogleMapController"; @@ -200,6 +207,7 @@ public void onMapReady(@NonNull GoogleMap googleMap) { this.googleMap.setIndoorEnabled(this.indoorEnabled); this.googleMap.setTrafficEnabled(this.trafficEnabled); this.googleMap.setBuildingsEnabled(this.buildingsEnabled); + this.googleMap.setOnPoiClickListener(this); installInvalidator(); if (mapReadyResult != null) { mapReadyResult.success(); @@ -363,6 +371,20 @@ public void onMarkerDragEnd(Marker marker) { markersController.onMarkerDragEnd(marker.getId(), marker.getPosition()); } + @Override + public void onPoiClick(PointOfInterest poi) { + Log.e("POI_TEST", "Native POI Click Detected: " + poi.name); + Log.e("POI_TEST", "Native Tap! Sending to Channel ID: " + id); + Messages.PlatformPointOfInterest platformPoi = + new Messages.PlatformPointOfInterest.Builder() + .setPosition(Convert.latLngToPigeon(poi.latLng)) + .setName(poi.name) + .setPlaceId(poi.placeId) + .build(); + + flutterApi.onPoiTap(platformPoi, new NoOpVoidResult()); + } + @Override public void onPolygonClick(Polygon polygon) { polygonsController.onPolygonTap(polygon.getId()); 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 f8d44e8c4bf9..c3ead766d24f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.5), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon package io.flutter.plugins.googlemaps; @@ -23,7 +23,9 @@ 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; /** Generated class from Pigeon. */ @@ -39,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; @@ -58,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) @@ -113,9 +115,9 @@ public enum PlatformJointType { } /** - * Enumeration of possible types of PlatformCap, corresponding to the subclasses of Cap in the - * Google Maps Android SDK. See - * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. + * Enumeration of possible types of PlatformCap, corresponding to the + * subclasses of Cap in the Google Maps Android SDK. + * See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. */ public enum PlatformCapType { BUTT_CAP(0), @@ -158,7 +160,7 @@ public enum PlatformMapBitmapScaling { /** * Pigeon representatation of a CameraPosition. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraPosition { private @NonNull Double bearing; @@ -218,17 +220,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 @@ -307,14 +302,16 @@ ArrayList toList() { /** * Pigeon representation of a CameraUpdate. * - *

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

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

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

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

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

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

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

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

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateZoomTo { private @NonNull Double zoom; @@ -1007,12 +964,8 @@ public void setZoom(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformCameraUpdateZoomTo that = (PlatformCameraUpdateZoomTo) o; return zoom.equals(that.zoom); } @@ -1057,7 +1010,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; @@ -1182,36 +1135,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 { @@ -1345,7 +1277,7 @@ 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 { private @NonNull String heatmapId; @@ -1425,19 +1357,10 @@ public void setMaxIntensity(@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; } PlatformHeatmap that = (PlatformHeatmap) o; - return heatmapId.equals(that.heatmapId) - && data.equals(that.data) - && Objects.equals(gradient, that.gradient) - && opacity.equals(that.opacity) - && radius.equals(that.radius) - && Objects.equals(maxIntensity, that.maxIntensity); + return heatmapId.equals(that.heatmapId) && data.equals(that.data) && Objects.equals(gradient, that.gradient) && opacity.equals(that.opacity) && radius.equals(that.radius) && Objects.equals(maxIntensity, that.maxIntensity); } @Override @@ -1540,11 +1463,11 @@ ArrayList toList() { /** * Pigeon equivalent of the HeatmapGradient class. * - *

The Java Gradient structure is slightly different from HeatmapGradient, so this matches the - * Android API so that conversion can be done on the Dart side where the structures are easier to - * work with. + * The Java Gradient structure is slightly different from HeatmapGradient, so + * this matches the Android API so that conversion can be done on the Dart side + * where the structures are easier to work with. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformHeatmapGradient { private @NonNull List colors; @@ -1591,16 +1514,10 @@ public void setColorMapSize(@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; } PlatformHeatmapGradient that = (PlatformHeatmapGradient) o; - return colors.equals(that.colors) - && startPoints.equals(that.startPoints) - && colorMapSize.equals(that.colorMapSize); + return colors.equals(that.colors) && startPoints.equals(that.startPoints) && colorMapSize.equals(that.colorMapSize); } @Override @@ -1667,7 +1584,7 @@ ArrayList toList() { /** * Pigeon equivalent of the WeightedLatLng 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 PlatformWeightedLatLng { private @NonNull PlatformLatLng point; @@ -1701,12 +1618,8 @@ public void setWeight(@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; } PlatformWeightedLatLng that = (PlatformWeightedLatLng) o; return point.equals(that.point) && weight.equals(that.weight); } @@ -1763,7 +1676,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; @@ -1784,12 +1697,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); } @@ -1834,7 +1743,7 @@ ArrayList toList() { /** * Pair of double values, such as for an offset or size. * - *

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

See https://developer.android.com/reference/android/graphics/Color.html. + * See https://developer.android.com/reference/android/graphics/Color.html. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformColor { private @NonNull Long argbValue; @@ -1953,12 +1858,8 @@ public void setArgbValue(@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; } PlatformColor that = (PlatformColor) o; return argbValue.equals(that.argbValue); } @@ -2003,7 +1904,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; @@ -2044,16 +1945,10 @@ public void setAnchor(@NonNull PlatformDoublePair setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformInfoWindow that = (PlatformInfoWindow) o; - return Objects.equals(title, that.title) - && Objects.equals(snippet, that.snippet) - && anchor.equals(that.anchor); + return Objects.equals(title, that.title) && Objects.equals(snippet, that.snippet) && anchor.equals(that.anchor); } @Override @@ -2120,7 +2015,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; @@ -2294,44 +2189,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 { @@ -2510,10 +2376,127 @@ ArrayList toList() { } } + /** + * Pigeon equivalent of the Point of Interest class. + * + * Generated class from Pigeon that represents data sent in messages. + */ + public static final class PlatformPointOfInterest { + private @NonNull PlatformLatLng position; + + public @NonNull PlatformLatLng getPosition() { + return position; + } + + public void setPosition(@NonNull PlatformLatLng setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"position\" is null."); + } + this.position = setterArg; + } + + private @NonNull String name; + + public @NonNull String getName() { + return name; + } + + public void setName(@NonNull String setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"name\" is null."); + } + this.name = setterArg; + } + + private @NonNull String placeId; + + public @NonNull String getPlaceId() { + return placeId; + } + + public void setPlaceId(@NonNull String setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"placeId\" is null."); + } + this.placeId = setterArg; + } + + /** Constructor is non-public to enforce null safety; use Builder. */ + PlatformPointOfInterest() {} + + @Override + public boolean equals(Object o) { + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } + PlatformPointOfInterest that = (PlatformPointOfInterest) o; + return position.equals(that.position) && name.equals(that.name) && placeId.equals(that.placeId); + } + + @Override + public int hashCode() { + return Objects.hash(position, name, placeId); + } + + public static final class Builder { + + private @Nullable PlatformLatLng position; + + @CanIgnoreReturnValue + public @NonNull Builder setPosition(@NonNull PlatformLatLng setterArg) { + this.position = setterArg; + return this; + } + + private @Nullable String name; + + @CanIgnoreReturnValue + public @NonNull Builder setName(@NonNull String setterArg) { + this.name = setterArg; + return this; + } + + private @Nullable String placeId; + + @CanIgnoreReturnValue + public @NonNull Builder setPlaceId(@NonNull String setterArg) { + this.placeId = setterArg; + return this; + } + + public @NonNull PlatformPointOfInterest build() { + PlatformPointOfInterest pigeonReturn = new PlatformPointOfInterest(); + pigeonReturn.setPosition(position); + pigeonReturn.setName(name); + pigeonReturn.setPlaceId(placeId); + return pigeonReturn; + } + } + + @NonNull + ArrayList toList() { + ArrayList toListResult = new ArrayList<>(3); + toListResult.add(position); + toListResult.add(name); + toListResult.add(placeId); + return toListResult; + } + + static @NonNull PlatformPointOfInterest fromList(@NonNull ArrayList pigeonVar_list) { + PlatformPointOfInterest pigeonResult = new PlatformPointOfInterest(); + Object position = pigeonVar_list.get(0); + pigeonResult.setPosition((PlatformLatLng) position); + Object name = pigeonVar_list.get(1); + pigeonResult.setName((String) name); + Object placeId = pigeonVar_list.get(2); + pigeonResult.setPlaceId((String) placeId); + return pigeonResult; + } + } + /** * Pigeon equivalent of the Polygon class. * - *

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

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

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

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformPatternItem { private @NonNull PlatformPatternItemType type; @@ -3352,12 +3279,8 @@ public void setLength(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformPatternItem that = (PlatformPatternItem) o; return type.equals(that.type) && Objects.equals(length, that.length); } @@ -3414,7 +3337,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; @@ -3458,16 +3381,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 @@ -3536,7 +3453,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; @@ -3622,19 +3539,10 @@ public void setTileSize(@NonNull Long setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformTileOverlay that = (PlatformTileOverlay) o; - return tileOverlayId.equals(that.tileOverlayId) - && fadeIn.equals(that.fadeIn) - && transparency.equals(that.transparency) - && zIndex.equals(that.zIndex) - && visible.equals(that.visible) - && tileSize.equals(that.tileSize); + return tileOverlayId.equals(that.tileOverlayId) && fadeIn.equals(that.fadeIn) && transparency.equals(that.transparency) && zIndex.equals(that.zIndex) && visible.equals(that.visible) && tileSize.equals(that.tileSize); } @Override @@ -3737,7 +3645,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; @@ -3797,17 +3705,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 @@ -3886,7 +3787,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; @@ -3920,12 +3821,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); } @@ -3982,7 +3879,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; @@ -4016,12 +3913,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); } @@ -4078,7 +3971,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; @@ -4138,17 +4031,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 @@ -4227,7 +4113,7 @@ ArrayList toList() { /** * Pigeon equivalent of the GroundOverlay class. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformGroundOverlay { private @NonNull String groundOverlayId; @@ -4376,42 +4262,15 @@ public void setClickable(@NonNull Boolean setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformGroundOverlay that = (PlatformGroundOverlay) o; - return groundOverlayId.equals(that.groundOverlayId) - && image.equals(that.image) - && Objects.equals(position, that.position) - && Objects.equals(bounds, that.bounds) - && Objects.equals(width, that.width) - && Objects.equals(height, that.height) - && Objects.equals(anchor, that.anchor) - && transparency.equals(that.transparency) - && bearing.equals(that.bearing) - && zIndex.equals(that.zIndex) - && visible.equals(that.visible) - && clickable.equals(that.clickable); + return groundOverlayId.equals(that.groundOverlayId) && image.equals(that.image) && Objects.equals(position, that.position) && Objects.equals(bounds, that.bounds) && Objects.equals(width, that.width) && Objects.equals(height, that.height) && Objects.equals(anchor, that.anchor) && transparency.equals(that.transparency) && bearing.equals(that.bearing) && zIndex.equals(that.zIndex) && visible.equals(that.visible) && clickable.equals(that.clickable); } @Override public int hashCode() { - return Objects.hash( - groundOverlayId, - image, - position, - bounds, - width, - height, - anchor, - transparency, - bearing, - zIndex, - visible, - clickable); + return Objects.hash(groundOverlayId, image, position, bounds, width, height, anchor, transparency, bearing, zIndex, visible, clickable); } public static final class Builder { @@ -4581,10 +4440,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; @@ -4599,12 +4458,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); } @@ -4649,7 +4504,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; @@ -4787,38 +4642,15 @@ public void setInitialGroundOverlays(@NonNull List setter @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformMapViewCreationParams that = (PlatformMapViewCreationParams) o; - return initialCameraPosition.equals(that.initialCameraPosition) - && mapConfiguration.equals(that.mapConfiguration) - && initialCircles.equals(that.initialCircles) - && initialMarkers.equals(that.initialMarkers) - && initialPolygons.equals(that.initialPolygons) - && initialPolylines.equals(that.initialPolylines) - && initialHeatmaps.equals(that.initialHeatmaps) - && initialTileOverlays.equals(that.initialTileOverlays) - && initialClusterManagers.equals(that.initialClusterManagers) - && initialGroundOverlays.equals(that.initialGroundOverlays); + return initialCameraPosition.equals(that.initialCameraPosition) && mapConfiguration.equals(that.mapConfiguration) && initialCircles.equals(that.initialCircles) && initialMarkers.equals(that.initialMarkers) && initialPolygons.equals(that.initialPolygons) && initialPolylines.equals(that.initialPolylines) && initialHeatmaps.equals(that.initialHeatmaps) && initialTileOverlays.equals(that.initialTileOverlays) && initialClusterManagers.equals(that.initialClusterManagers) && initialGroundOverlays.equals(that.initialGroundOverlays); } @Override public int hashCode() { - return Objects.hash( - initialCameraPosition, - mapConfiguration, - initialCircles, - initialMarkers, - initialPolygons, - initialPolylines, - initialHeatmaps, - initialTileOverlays, - initialClusterManagers, - initialGroundOverlays); + return Objects.hash(initialCameraPosition, mapConfiguration, initialCircles, initialMarkers, initialPolygons, initialPolylines, initialHeatmaps, initialTileOverlays, initialClusterManagers, initialGroundOverlays); } public static final class Builder { @@ -4890,8 +4722,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; } @@ -4899,8 +4730,7 @@ public static final class Builder { private @Nullable List initialGroundOverlays; @CanIgnoreReturnValue - public @NonNull Builder setInitialGroundOverlays( - @NonNull List setterArg) { + public @NonNull Builder setInitialGroundOverlays(@NonNull List setterArg) { this.initialGroundOverlays = setterArg; return this; } @@ -4937,8 +4767,7 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformMapViewCreationParams fromList( - @NonNull ArrayList pigeonVar_list) { + static @NonNull PlatformMapViewCreationParams fromList(@NonNull ArrayList pigeonVar_list) { PlatformMapViewCreationParams pigeonResult = new PlatformMapViewCreationParams(); Object initialCameraPosition = pigeonVar_list.get(0); pigeonResult.setInitialCameraPosition((PlatformCameraPosition) initialCameraPosition); @@ -4967,7 +4796,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; @@ -5172,58 +5001,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(mapId, that.mapId) - && Objects.equals(style, that.style); + return Objects.equals(compassEnabled, that.compassEnabled) && Objects.equals(cameraTargetBounds, that.cameraTargetBounds) && Objects.equals(mapType, that.mapType) && Objects.equals(minMaxZoomPreference, that.minMaxZoomPreference) && Objects.equals(mapToolbarEnabled, that.mapToolbarEnabled) && Objects.equals(rotateGesturesEnabled, that.rotateGesturesEnabled) && Objects.equals(scrollGesturesEnabled, that.scrollGesturesEnabled) && Objects.equals(tiltGesturesEnabled, that.tiltGesturesEnabled) && Objects.equals(trackCameraPosition, that.trackCameraPosition) && Objects.equals(zoomControlsEnabled, that.zoomControlsEnabled) && Objects.equals(zoomGesturesEnabled, that.zoomGesturesEnabled) && Objects.equals(myLocationEnabled, that.myLocationEnabled) && Objects.equals(myLocationButtonEnabled, that.myLocationButtonEnabled) && Objects.equals(padding, that.padding) && Objects.equals(indoorViewEnabled, that.indoorViewEnabled) && Objects.equals(trafficEnabled, that.trafficEnabled) && Objects.equals(buildingsEnabled, that.buildingsEnabled) && Objects.equals(liteModeEnabled, that.liteModeEnabled) && Objects.equals(mapId, that.mapId) && Objects.equals(style, that.style); } @Override public int hashCode() { - return Objects.hash( - compassEnabled, - cameraTargetBounds, - mapType, - minMaxZoomPreference, - mapToolbarEnabled, - rotateGesturesEnabled, - scrollGesturesEnabled, - tiltGesturesEnabled, - trackCameraPosition, - zoomControlsEnabled, - zoomGesturesEnabled, - myLocationEnabled, - myLocationButtonEnabled, - padding, - indoorViewEnabled, - trafficEnabled, - buildingsEnabled, - liteModeEnabled, - mapId, - style); + return Objects.hash(compassEnabled, cameraTargetBounds, mapType, minMaxZoomPreference, mapToolbarEnabled, rotateGesturesEnabled, scrollGesturesEnabled, tiltGesturesEnabled, trackCameraPosition, zoomControlsEnabled, zoomGesturesEnabled, myLocationEnabled, myLocationButtonEnabled, padding, indoorViewEnabled, trafficEnabled, buildingsEnabled, liteModeEnabled, mapId, style); } public static final class Builder { @@ -5239,8 +5025,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; } @@ -5490,7 +5275,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; @@ -5524,12 +5309,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); } @@ -5586,7 +5367,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; @@ -5646,17 +5427,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 @@ -5735,7 +5509,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; @@ -5760,12 +5534,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); } @@ -5820,18 +5590,20 @@ ArrayList toList() { } /** - * Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint types of - * [BitmapDescriptor], [PlatformBitmap] contains a single field which may hold the pigeon - * equivalent type of any of them. + * Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint + * types of [BitmapDescriptor], [PlatformBitmap] contains a single field which + * may hold the pigeon equivalent type of any of them. * - *

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

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

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

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

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

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

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapBytesMap { private @NonNull byte[] byteData; @@ -6516,18 +6259,10 @@ public void setHeight(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformBitmapBytesMap that = (PlatformBitmapBytesMap) o; - return Arrays.equals(byteData, that.byteData) - && bitmapScaling.equals(that.bitmapScaling) - && imagePixelRatio.equals(that.imagePixelRatio) - && Objects.equals(width, that.width) - && Objects.equals(height, that.height); + return Arrays.equals(byteData, that.byteData) && bitmapScaling.equals(that.bitmapScaling) && imagePixelRatio.equals(that.imagePixelRatio) && Objects.equals(width, that.width) && Objects.equals(height, that.height); } @Override @@ -6625,52 +6360,40 @@ private PigeonCodec() {} @Override protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { switch (type) { - case (byte) 129: - { - Object value = readValue(buffer); - return value == null ? null : PlatformMapType.values()[((Long) value).intValue()]; - } - case (byte) 130: - { - Object value = readValue(buffer); - return value == null ? null : PlatformRendererType.values()[((Long) value).intValue()]; - } - case (byte) 131: - { - Object value = readValue(buffer); - return value == null ? null : PlatformJointType.values()[((Long) value).intValue()]; - } - case (byte) 132: - { - Object value = readValue(buffer); - return value == null ? null : PlatformCapType.values()[((Long) value).intValue()]; - } - case (byte) 133: - { - Object value = readValue(buffer); - return value == null - ? null - : PlatformPatternItemType.values()[((Long) value).intValue()]; - } - case (byte) 134: - { - Object value = readValue(buffer); - return value == null - ? null - : PlatformMapBitmapScaling.values()[((Long) value).intValue()]; - } + case (byte) 129: { + Object value = readValue(buffer); + return value == null ? null : PlatformMapType.values()[((Long) value).intValue()]; + } + case (byte) 130: { + Object value = readValue(buffer); + return value == null ? null : PlatformRendererType.values()[((Long) value).intValue()]; + } + case (byte) 131: { + Object value = readValue(buffer); + return value == null ? null : PlatformJointType.values()[((Long) value).intValue()]; + } + case (byte) 132: { + Object value = readValue(buffer); + return value == null ? null : PlatformCapType.values()[((Long) value).intValue()]; + } + case (byte) 133: { + Object value = readValue(buffer); + return value == null ? null : PlatformPatternItemType.values()[((Long) value).intValue()]; + } + case (byte) 134: { + Object value = readValue(buffer); + return value == null ? null : PlatformMapBitmapScaling.values()[((Long) value).intValue()]; + } case (byte) 135: return PlatformCameraPosition.fromList((ArrayList) readValue(buffer)); case (byte) 136: return PlatformCameraUpdate.fromList((ArrayList) readValue(buffer)); case (byte) 137: - return PlatformCameraUpdateNewCameraPosition.fromList( - (ArrayList) readValue(buffer)); + return PlatformCameraUpdateNewCameraPosition.fromList((ArrayList) readValue(buffer)); case (byte) 138: return PlatformCameraUpdateNewLatLng.fromList((ArrayList) readValue(buffer)); case (byte) 139: - return PlatformCameraUpdateNewLatLngBounds.fromList( - (ArrayList) readValue(buffer)); + return PlatformCameraUpdateNewLatLngBounds.fromList((ArrayList) readValue(buffer)); case (byte) 140: return PlatformCameraUpdateNewLatLngZoom.fromList((ArrayList) readValue(buffer)); case (byte) 141: @@ -6700,52 +6423,54 @@ protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { case (byte) 153: return PlatformMarker.fromList((ArrayList) readValue(buffer)); case (byte) 154: - return PlatformPolygon.fromList((ArrayList) readValue(buffer)); + return PlatformPointOfInterest.fromList((ArrayList) readValue(buffer)); case (byte) 155: - return PlatformPolyline.fromList((ArrayList) readValue(buffer)); + return PlatformPolygon.fromList((ArrayList) readValue(buffer)); case (byte) 156: - return PlatformCap.fromList((ArrayList) readValue(buffer)); + return PlatformPolyline.fromList((ArrayList) readValue(buffer)); case (byte) 157: - return PlatformPatternItem.fromList((ArrayList) readValue(buffer)); + return PlatformCap.fromList((ArrayList) readValue(buffer)); case (byte) 158: - return PlatformTile.fromList((ArrayList) readValue(buffer)); + return PlatformPatternItem.fromList((ArrayList) readValue(buffer)); case (byte) 159: - return PlatformTileOverlay.fromList((ArrayList) readValue(buffer)); + return PlatformTile.fromList((ArrayList) readValue(buffer)); case (byte) 160: - return PlatformEdgeInsets.fromList((ArrayList) readValue(buffer)); + return PlatformTileOverlay.fromList((ArrayList) readValue(buffer)); case (byte) 161: - return PlatformLatLng.fromList((ArrayList) readValue(buffer)); + return PlatformEdgeInsets.fromList((ArrayList) readValue(buffer)); case (byte) 162: - return PlatformLatLngBounds.fromList((ArrayList) readValue(buffer)); + return PlatformLatLng.fromList((ArrayList) readValue(buffer)); case (byte) 163: - return PlatformCluster.fromList((ArrayList) readValue(buffer)); + return PlatformLatLngBounds.fromList((ArrayList) readValue(buffer)); case (byte) 164: - return PlatformGroundOverlay.fromList((ArrayList) readValue(buffer)); + return PlatformCluster.fromList((ArrayList) readValue(buffer)); case (byte) 165: - return PlatformCameraTargetBounds.fromList((ArrayList) readValue(buffer)); + return PlatformGroundOverlay.fromList((ArrayList) readValue(buffer)); case (byte) 166: - return PlatformMapViewCreationParams.fromList((ArrayList) readValue(buffer)); + return PlatformCameraTargetBounds.fromList((ArrayList) readValue(buffer)); case (byte) 167: - return PlatformMapConfiguration.fromList((ArrayList) readValue(buffer)); + return PlatformMapViewCreationParams.fromList((ArrayList) readValue(buffer)); case (byte) 168: - return PlatformPoint.fromList((ArrayList) readValue(buffer)); + return PlatformMapConfiguration.fromList((ArrayList) readValue(buffer)); case (byte) 169: - return PlatformTileLayer.fromList((ArrayList) readValue(buffer)); + return PlatformPoint.fromList((ArrayList) readValue(buffer)); case (byte) 170: - return PlatformZoomRange.fromList((ArrayList) readValue(buffer)); + return PlatformTileLayer.fromList((ArrayList) readValue(buffer)); case (byte) 171: - return PlatformBitmap.fromList((ArrayList) readValue(buffer)); + return PlatformZoomRange.fromList((ArrayList) readValue(buffer)); case (byte) 172: - return PlatformBitmapDefaultMarker.fromList((ArrayList) readValue(buffer)); + return PlatformBitmap.fromList((ArrayList) readValue(buffer)); case (byte) 173: - return PlatformBitmapBytes.fromList((ArrayList) readValue(buffer)); + return PlatformBitmapDefaultMarker.fromList((ArrayList) readValue(buffer)); case (byte) 174: - return PlatformBitmapAsset.fromList((ArrayList) readValue(buffer)); + return PlatformBitmapBytes.fromList((ArrayList) readValue(buffer)); case (byte) 175: - return PlatformBitmapAssetImage.fromList((ArrayList) readValue(buffer)); + return PlatformBitmapAsset.fromList((ArrayList) readValue(buffer)); case (byte) 176: - return PlatformBitmapAssetMap.fromList((ArrayList) readValue(buffer)); + return PlatformBitmapAssetImage.fromList((ArrayList) readValue(buffer)); case (byte) 177: + return PlatformBitmapAssetMap.fromList((ArrayList) readValue(buffer)); + case (byte) 178: return PlatformBitmapBytesMap.fromList((ArrayList) readValue(buffer)); default: return super.readValueOfType(type, buffer); @@ -6829,77 +6554,80 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) { } else if (value instanceof PlatformMarker) { stream.write(153); writeValue(stream, ((PlatformMarker) value).toList()); - } else if (value instanceof PlatformPolygon) { + } else if (value instanceof PlatformPointOfInterest) { stream.write(154); + writeValue(stream, ((PlatformPointOfInterest) value).toList()); + } else if (value instanceof PlatformPolygon) { + stream.write(155); writeValue(stream, ((PlatformPolygon) value).toList()); } else if (value instanceof PlatformPolyline) { - stream.write(155); + stream.write(156); writeValue(stream, ((PlatformPolyline) value).toList()); } else if (value instanceof PlatformCap) { - stream.write(156); + stream.write(157); writeValue(stream, ((PlatformCap) value).toList()); } else if (value instanceof PlatformPatternItem) { - stream.write(157); + stream.write(158); writeValue(stream, ((PlatformPatternItem) value).toList()); } else if (value instanceof PlatformTile) { - stream.write(158); + stream.write(159); writeValue(stream, ((PlatformTile) value).toList()); } else if (value instanceof PlatformTileOverlay) { - stream.write(159); + stream.write(160); writeValue(stream, ((PlatformTileOverlay) value).toList()); } else if (value instanceof PlatformEdgeInsets) { - stream.write(160); + stream.write(161); writeValue(stream, ((PlatformEdgeInsets) value).toList()); } else if (value instanceof PlatformLatLng) { - stream.write(161); + stream.write(162); writeValue(stream, ((PlatformLatLng) value).toList()); } else if (value instanceof PlatformLatLngBounds) { - stream.write(162); + stream.write(163); writeValue(stream, ((PlatformLatLngBounds) value).toList()); } else if (value instanceof PlatformCluster) { - stream.write(163); + stream.write(164); writeValue(stream, ((PlatformCluster) value).toList()); } else if (value instanceof PlatformGroundOverlay) { - stream.write(164); + stream.write(165); writeValue(stream, ((PlatformGroundOverlay) value).toList()); } else if (value instanceof PlatformCameraTargetBounds) { - stream.write(165); + stream.write(166); writeValue(stream, ((PlatformCameraTargetBounds) value).toList()); } else if (value instanceof PlatformMapViewCreationParams) { - stream.write(166); + stream.write(167); writeValue(stream, ((PlatformMapViewCreationParams) value).toList()); } else if (value instanceof PlatformMapConfiguration) { - stream.write(167); + stream.write(168); writeValue(stream, ((PlatformMapConfiguration) value).toList()); } else if (value instanceof PlatformPoint) { - stream.write(168); + stream.write(169); writeValue(stream, ((PlatformPoint) value).toList()); } else if (value instanceof PlatformTileLayer) { - stream.write(169); + stream.write(170); writeValue(stream, ((PlatformTileLayer) value).toList()); } else if (value instanceof PlatformZoomRange) { - stream.write(170); + stream.write(171); writeValue(stream, ((PlatformZoomRange) value).toList()); } else if (value instanceof PlatformBitmap) { - stream.write(171); + stream.write(172); writeValue(stream, ((PlatformBitmap) value).toList()); } else if (value instanceof PlatformBitmapDefaultMarker) { - stream.write(172); + stream.write(173); writeValue(stream, ((PlatformBitmapDefaultMarker) value).toList()); } else if (value instanceof PlatformBitmapBytes) { - stream.write(173); + stream.write(174); writeValue(stream, ((PlatformBitmapBytes) value).toList()); } else if (value instanceof PlatformBitmapAsset) { - stream.write(174); + stream.write(175); writeValue(stream, ((PlatformBitmapAsset) value).toList()); } else if (value instanceof PlatformBitmapAssetImage) { - stream.write(175); + stream.write(176); writeValue(stream, ((PlatformBitmapAssetImage) value).toList()); } else if (value instanceof PlatformBitmapAssetMap) { - stream.write(176); + stream.write(177); writeValue(stream, ((PlatformBitmapAssetMap) value).toList()); } else if (value instanceof PlatformBitmapBytesMap) { - stream.write(177); + stream.write(178); writeValue(stream, ((PlatformBitmapBytesMap) value).toList()); } else { super.writeValue(stream, value); @@ -6907,6 +6635,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. */ @@ -6934,9 +6663,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. */ @@ -6944,91 +6673,75 @@ public interface MapsApi { /** * Updates the map's configuration options. * - *

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

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

This allows checking asynchronously for initial style failures, as there is no way to - * return failures from map initialization. + * This allows checking asynchronously for initial style failures, as there + * is no way to return failures from map initialization. */ - @NonNull + @NonNull Boolean didLastStyleSucceed(); /** Clears the cache of tiles previously requseted from the tile provider. */ void clearTileCache(@NonNull String tileOverlayId); @@ -7039,23 +6752,16 @@ void animateCamera( static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } - /** Sets up an instance of `MapsApi` to handle messages through the `binaryMessenger`. */ + /**Sets up an instance of `MapsApi` to handle messages through the `binaryMessenger`. */ static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable MapsApi api) { setUp(binaryMessenger, "", api); } - - static void setUp( - @NonNull BinaryMessenger binaryMessenger, - @NonNull String messageChannelSuffix, - @Nullable MapsApi api) { + static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String messageChannelSuffix, @Nullable MapsApi api) { messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7082,10 +6788,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) -> { @@ -7095,7 +6798,8 @@ public void error(Throwable error) { try { api.updateMapConfiguration(configurationArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7107,10 +6811,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) -> { @@ -7122,7 +6823,8 @@ public void error(Throwable error) { try { api.updateCircles(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7134,10 +6836,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) -> { @@ -7149,7 +6848,8 @@ public void error(Throwable error) { try { api.updateHeatmaps(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7161,10 +6861,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) -> { @@ -7175,7 +6872,8 @@ public void error(Throwable error) { try { api.updateClusterManagers(toAddArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7187,10 +6885,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) -> { @@ -7202,7 +6897,8 @@ public void error(Throwable error) { try { api.updateMarkers(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7214,10 +6910,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) -> { @@ -7229,7 +6922,8 @@ public void error(Throwable error) { try { api.updatePolygons(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7241,10 +6935,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) -> { @@ -7256,7 +6947,8 @@ public void error(Throwable error) { try { api.updatePolylines(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7268,10 +6960,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) -> { @@ -7283,7 +6972,8 @@ public void error(Throwable error) { try { api.updateTileOverlays(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7295,10 +6985,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7310,7 +6997,8 @@ public void error(Throwable error) { try { api.updateGroundOverlays(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7322,10 +7010,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) -> { @@ -7335,7 +7020,8 @@ public void error(Throwable error) { try { PlatformPoint output = api.getScreenCoordinate(latLngArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7347,10 +7033,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) -> { @@ -7360,7 +7043,8 @@ public void error(Throwable error) { try { PlatformLatLng output = api.getLatLng(screenCoordinateArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7372,10 +7056,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) -> { @@ -7383,7 +7064,8 @@ public void error(Throwable error) { try { PlatformLatLngBounds output = api.getVisibleRegion(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7395,10 +7077,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) -> { @@ -7408,7 +7087,8 @@ public void error(Throwable error) { try { api.moveCamera(cameraUpdateArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7420,10 +7100,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) -> { @@ -7434,7 +7111,8 @@ public void error(Throwable error) { try { api.animateCamera(cameraUpdateArg, durationMillisecondsArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7446,10 +7124,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) -> { @@ -7457,7 +7132,8 @@ public void error(Throwable error) { try { Double output = api.getZoomLevel(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7469,10 +7145,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) -> { @@ -7482,7 +7155,8 @@ public void error(Throwable error) { try { api.showInfoWindow(markerIdArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7494,10 +7168,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) -> { @@ -7507,7 +7178,8 @@ public void error(Throwable error) { try { api.hideInfoWindow(markerIdArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7519,10 +7191,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) -> { @@ -7532,7 +7201,8 @@ public void error(Throwable error) { try { Boolean output = api.isInfoWindowShown(markerIdArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7544,10 +7214,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) -> { @@ -7557,7 +7224,8 @@ public void error(Throwable error) { try { Boolean output = api.setStyle(styleArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7569,10 +7237,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) -> { @@ -7580,7 +7245,8 @@ public void error(Throwable error) { try { Boolean output = api.didLastStyleSucceed(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7592,10 +7258,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) -> { @@ -7605,7 +7268,8 @@ public void error(Throwable error) { try { api.clearTileCache(tileOverlayIdArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7617,10 +7281,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) -> { @@ -7654,442 +7315,398 @@ public static class MapsCallbackApi { public MapsCallbackApi(@NonNull BinaryMessenger argBinaryMessenger) { this(argBinaryMessenger, ""); } - - public MapsCallbackApi( - @NonNull BinaryMessenger argBinaryMessenger, @NonNull String messageChannelSuffix) { + public MapsCallbackApi(@NonNull BinaryMessenger argBinaryMessenger, @NonNull String messageChannelSuffix) { this.binaryMessenger = argBinaryMessenger; this.messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; } - /** Public interface for sending reply. The codec used by MapsCallbackApi. */ + /** + * Public interface for sending reply. + * The codec used by MapsCallbackApi. + */ static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } /** Called when the map camera starts moving. */ public void onCameraMoveStarted(@NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( null, channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map camera moves. */ - public void onCameraMove( - @NonNull PlatformCameraPosition cameraPositionArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove" - + messageChannelSuffix; + public void onCameraMove(@NonNull PlatformCameraPosition cameraPositionArg, @NonNull VoidResult result) { + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(cameraPositionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map camera stops moving. */ public void onCameraIdle(@NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( null, channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map, not a specifc map object, is tapped. */ public void onTap(@NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map, not a specifc map object, is long pressed. */ public void onLongPress(@NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker is tapped. */ public void onMarkerTap(@NonNull String markerIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(markerIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag starts. */ - public void onMarkerDragStart( - @NonNull String markerIdArg, - @NonNull PlatformLatLng positionArg, - @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart" - + messageChannelSuffix; + public void onMarkerDragStart(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag updates. */ - public void onMarkerDrag( - @NonNull String markerIdArg, - @NonNull PlatformLatLng positionArg, - @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag" - + messageChannelSuffix; + public void onMarkerDrag(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag ends. */ - public void onMarkerDragEnd( - @NonNull String markerIdArg, - @NonNull PlatformLatLng positionArg, - @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd" - + messageChannelSuffix; + public void onMarkerDragEnd(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker's info window is tapped. */ public void onInfoWindowTap(@NonNull String markerIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(markerIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a circle is tapped. */ public void onCircleTap(@NonNull String circleIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(circleIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker cluster is tapped. */ public void onClusterTap(@NonNull PlatformCluster clusterArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(clusterArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } + }); + } + /** Called when a POI is tapped. */ + public void onPoiTap(@NonNull PlatformPointOfInterest poiArg, @NonNull VoidResult result) { + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap" + messageChannelSuffix; + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); + channel.send( + new ArrayList<>(Collections.singletonList(poiArg)), + channelReply -> { + if (channelReply instanceof List) { + List listReply = (List) channelReply; + if (listReply.size() > 1) { + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + } else { + result.success(); + } + } else { + result.error(createConnectionError(channelName)); + } }); } /** Called when a polygon is tapped. */ public void onPolygonTap(@NonNull String polygonIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(polygonIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a polyline is tapped. */ public void onPolylineTap(@NonNull String polylineIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(polylineIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a ground overlay is tapped. */ public void onGroundOverlayTap(@NonNull String groundOverlayIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(groundOverlayIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called to get data for a map tile. */ - public void getTileOverlayTile( - @NonNull String tileOverlayIdArg, - @NonNull PlatformPoint locationArg, - @NonNull Long zoomArg, - @NonNull Result result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile" - + messageChannelSuffix; + public void getTileOverlayTile(@NonNull String tileOverlayIdArg, @NonNull PlatformPoint locationArg, @NonNull Long zoomArg, @NonNull Result result) { + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(tileOverlayIdArg, locationArg, zoomArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else if (listReply.get(0) == null) { - result.error( - new FlutterError( - "null-error", - "Flutter api returned null value for non-null return value.", - "")); + result.error(new FlutterError("null-error", "Flutter api returned null value for non-null return value.", "")); } else { @SuppressWarnings("ConstantConditions") PlatformTile output = (PlatformTile) listReply.get(0); result.success(output); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } } /** * Interface for global SDK initialization. * - *

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

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

Calling this more than once in the lifetime of an application will result in an error. + * Calling this more than once in the lifetime of an application will result + * in an error. */ - void initializeWithPreferredRenderer( - @Nullable PlatformRendererType type, @NonNull Result result); + void initializeWithPreferredRenderer(@Nullable PlatformRendererType type, @NonNull Result result); /** - * Attempts to trigger any thread-blocking work the Google Maps SDK normally does when a map is - * shown for the first time. + * Attempts to trigger any thread-blocking work + * the Google Maps SDK normally does when a map is shown for the first time. */ void warmup(); @@ -8097,25 +7714,16 @@ void initializeWithPreferredRenderer( 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) -> { @@ -8144,10 +7752,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8155,7 +7760,8 @@ public void error(Throwable error) { try { api.warmup(); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8167,10 +7773,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 { @@ -8180,26 +7787,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) -> { @@ -8209,7 +7806,8 @@ static void setUp( try { api.createView(typeArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8223,81 +7821,72 @@ static void setUp( /** * Inspector API only intended for use in integration tests. * - *

Generated interface from Pigeon that represents a handler of messages from Flutter. + * Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface MapsInspectorApi { - @NonNull + @NonNull Boolean areBuildingsEnabled(); - @NonNull + @NonNull Boolean areRotateGesturesEnabled(); - @NonNull + @NonNull Boolean areZoomControlsEnabled(); - @NonNull + @NonNull Boolean areScrollGesturesEnabled(); - @NonNull + @NonNull Boolean areTiltGesturesEnabled(); - @NonNull + @NonNull Boolean areZoomGesturesEnabled(); - @NonNull + @NonNull Boolean isCompassEnabled(); - @Nullable + @Nullable Boolean isLiteModeEnabled(); - @NonNull + @NonNull Boolean isMapToolbarEnabled(); - @NonNull + @NonNull Boolean isMyLocationButtonEnabled(); - @NonNull + @NonNull Boolean isTrafficEnabled(); - @Nullable + @Nullable PlatformTileLayer getTileOverlayInfo(@NonNull String tileOverlayId); - @Nullable + @Nullable PlatformGroundOverlay getGroundOverlayInfo(@NonNull String groundOverlayId); - @NonNull + @NonNull PlatformZoomRange getZoomRange(); - @NonNull + @NonNull List getClusters(@NonNull String clusterManagerId); - @NonNull + @NonNull PlatformCameraPosition getCameraPosition(); /** The codec used by MapsInspectorApi. */ static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } - /** - * Sets up an instance of `MapsInspectorApi` to handle messages through the `binaryMessenger`. - */ + /**Sets up an instance of `MapsInspectorApi` to handle messages through the `binaryMessenger`. */ static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable MapsInspectorApi api) { setUp(binaryMessenger, "", api); } - - static void setUp( - @NonNull BinaryMessenger binaryMessenger, - @NonNull String messageChannelSuffix, - @Nullable MapsInspectorApi api) { + static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String messageChannelSuffix, @Nullable MapsInspectorApi api) { messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8305,7 +7894,8 @@ static void setUp( try { Boolean output = api.areBuildingsEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8317,10 +7907,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) -> { @@ -8328,7 +7915,8 @@ static void setUp( try { Boolean output = api.areRotateGesturesEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8340,10 +7928,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) -> { @@ -8351,7 +7936,8 @@ static void setUp( try { Boolean output = api.areZoomControlsEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8363,10 +7949,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) -> { @@ -8374,7 +7957,8 @@ static void setUp( try { Boolean output = api.areScrollGesturesEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8386,10 +7970,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) -> { @@ -8397,7 +7978,8 @@ static void setUp( try { Boolean output = api.areTiltGesturesEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8409,10 +7991,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) -> { @@ -8420,7 +7999,8 @@ static void setUp( try { Boolean output = api.areZoomGesturesEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8432,10 +8012,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) -> { @@ -8443,7 +8020,8 @@ static void setUp( try { Boolean output = api.isCompassEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8455,10 +8033,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) -> { @@ -8466,7 +8041,8 @@ static void setUp( try { Boolean output = api.isLiteModeEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8478,10 +8054,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) -> { @@ -8489,7 +8062,8 @@ static void setUp( try { Boolean output = api.isMapToolbarEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8501,10 +8075,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) -> { @@ -8512,7 +8083,8 @@ static void setUp( try { Boolean output = api.isMyLocationButtonEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8524,10 +8096,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) -> { @@ -8535,7 +8104,8 @@ static void setUp( try { Boolean output = api.isTrafficEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8547,10 +8117,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) -> { @@ -8560,7 +8127,8 @@ static void setUp( try { PlatformTileLayer output = api.getTileOverlayInfo(tileOverlayIdArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8572,10 +8140,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8585,7 +8150,8 @@ static void setUp( try { PlatformGroundOverlay output = api.getGroundOverlayInfo(groundOverlayIdArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8597,10 +8163,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) -> { @@ -8608,7 +8171,8 @@ static void setUp( try { PlatformZoomRange output = api.getZoomRange(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8620,10 +8184,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) -> { @@ -8633,7 +8194,8 @@ static void setUp( try { List output = api.getClusters(clusterManagerIdArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8645,10 +8207,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8656,7 +8215,8 @@ static void setUp( try { PlatformCameraPosition output = api.getCameraPosition(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart index b371e7a3a1f6..fc1296abd57d 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 @@ -228,6 +228,11 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { return _events(mapId).whereType(); } + @override + Stream onPoiTap({required int mapId}) { + return _events(mapId).whereType(); + } + @override Future updateMapConfiguration( MapConfiguration configuration, { @@ -1257,6 +1262,21 @@ class HostMapMessageHandler implements MapsCallbackApi { streamController.add(MarkerTapEvent(mapId, MarkerId(markerId))); } + @override + void onPoiTap(PlatformPointOfInterest poi) { + print('🎯 DART HostMapMessageHandler.onPoiTap received: ${poi.name}'); + streamController.add( + MapPoiTapEvent( + mapId, + PointOfInterest( + LatLng(poi.position.latitude, poi.position.longitude), + poi.name, + poi.placeId, + ), + ), + ); + } + @override void onPolygonTap(String polygonId) { streamController.add(PolygonTapEvent(mapId, PolygonId(polygonId))); 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 ba5674412009..d396ed2a7def 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.5), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,11 +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 []; } @@ -31,43 +27,64 @@ List wrapResponse({ } return [error.code, error.message, error.details]; } - bool _deepEquals(Object? a, Object? b) { if (a is List && b is List) { return a.length == b.length && - a.indexed.every( - ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), - ); + a.indexed + .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); } if (a is Map && b is Map) { - return a.length == b.length && - a.entries.every( - (MapEntry entry) => - (b as Map).containsKey(entry.key) && - _deepEquals(entry.value, b[entry.key]), - ); + return a.length == b.length && a.entries.every((MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key])); } return a == b; } + /// Pigeon equivalent of MapType -enum PlatformMapType { none, normal, satellite, terrain, hybrid } +enum PlatformMapType { + none, + normal, + satellite, + terrain, + hybrid, +} -enum PlatformRendererType { legacy, latest } +enum PlatformRendererType { + legacy, + latest, +} /// Join types for polyline joints. -enum PlatformJointType { mitered, bevel, round } +enum PlatformJointType { + mitered, + bevel, + round, +} /// Enumeration of possible types of PlatformCap, corresponding to the /// subclasses of Cap in the Google Maps Android SDK. /// See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. -enum PlatformCapType { buttCap, roundCap, squareCap, customCap } +enum PlatformCapType { + buttCap, + roundCap, + squareCap, + customCap, +} /// Enumeration of possible types for PatternItem. -enum PlatformPatternItemType { dot, dash, gap } +enum PlatformPatternItemType { + dot, + dash, + gap, +} /// Pigeon equivalent of [MapBitmapScaling]. -enum PlatformMapBitmapScaling { auto, none } +enum PlatformMapBitmapScaling { + auto, + none, +} /// Pigeon representatation of a CameraPosition. class PlatformCameraPosition { @@ -87,12 +104,16 @@ class PlatformCameraPosition { double zoom; List _toList() { - return [bearing, target, tilt, zoom]; + return [ + bearing, + target, + tilt, + zoom, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraPosition decode(Object result) { result as List; @@ -118,12 +139,15 @@ class PlatformCameraPosition { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon representation of a CameraUpdate. class PlatformCameraUpdate { - PlatformCameraUpdate({required this.cameraUpdate}); + PlatformCameraUpdate({ + required this.cameraUpdate, + }); /// This Object shall be any of the below classes prefixed with /// PlatformCameraUpdate. Each such class represents a different type of @@ -134,16 +158,19 @@ class PlatformCameraUpdate { Object cameraUpdate; List _toList() { - return [cameraUpdate]; + return [ + cameraUpdate, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdate decode(Object result) { result as List; - return PlatformCameraUpdate(cameraUpdate: result[0]!); + return PlatformCameraUpdate( + cameraUpdate: result[0]!, + ); } @override @@ -160,22 +187,26 @@ class PlatformCameraUpdate { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of NewCameraPosition class PlatformCameraUpdateNewCameraPosition { - PlatformCameraUpdateNewCameraPosition({required this.cameraPosition}); + PlatformCameraUpdateNewCameraPosition({ + required this.cameraPosition, + }); PlatformCameraPosition cameraPosition; List _toList() { - return [cameraPosition]; + return [ + cameraPosition, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdateNewCameraPosition decode(Object result) { result as List; @@ -187,8 +218,7 @@ class PlatformCameraUpdateNewCameraPosition { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewCameraPosition || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateNewCameraPosition || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -199,33 +229,38 @@ class PlatformCameraUpdateNewCameraPosition { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of NewLatLng class PlatformCameraUpdateNewLatLng { - PlatformCameraUpdateNewLatLng({required this.latLng}); + PlatformCameraUpdateNewLatLng({ + required this.latLng, + }); PlatformLatLng latLng; List _toList() { - return [latLng]; + return [ + latLng, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdateNewLatLng decode(Object result) { result as List; - return PlatformCameraUpdateNewLatLng(latLng: result[0]! as PlatformLatLng); + return PlatformCameraUpdateNewLatLng( + latLng: result[0]! as PlatformLatLng, + ); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLng || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateNewLatLng || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -236,7 +271,8 @@ class PlatformCameraUpdateNewLatLng { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of NewLatLngBounds @@ -251,12 +287,14 @@ class PlatformCameraUpdateNewLatLngBounds { double padding; List _toList() { - return [bounds, padding]; + return [ + bounds, + padding, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdateNewLatLngBounds decode(Object result) { result as List; @@ -269,8 +307,7 @@ class PlatformCameraUpdateNewLatLngBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLngBounds || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateNewLatLngBounds || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -281,24 +318,30 @@ class PlatformCameraUpdateNewLatLngBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of NewLatLngZoom class PlatformCameraUpdateNewLatLngZoom { - PlatformCameraUpdateNewLatLngZoom({required this.latLng, required this.zoom}); + PlatformCameraUpdateNewLatLngZoom({ + required this.latLng, + required this.zoom, + }); PlatformLatLng latLng; double zoom; List _toList() { - return [latLng, zoom]; + return [ + latLng, + zoom, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdateNewLatLngZoom decode(Object result) { result as List; @@ -311,8 +354,7 @@ class PlatformCameraUpdateNewLatLngZoom { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLngZoom || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateNewLatLngZoom || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -323,24 +365,30 @@ class PlatformCameraUpdateNewLatLngZoom { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of ScrollBy class PlatformCameraUpdateScrollBy { - PlatformCameraUpdateScrollBy({required this.dx, required this.dy}); + PlatformCameraUpdateScrollBy({ + required this.dx, + required this.dy, + }); double dx; double dy; List _toList() { - return [dx, dy]; + return [ + dx, + dy, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdateScrollBy decode(Object result) { result as List; @@ -353,8 +401,7 @@ class PlatformCameraUpdateScrollBy { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateScrollBy || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateScrollBy || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -365,24 +412,30 @@ class PlatformCameraUpdateScrollBy { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of ZoomBy class PlatformCameraUpdateZoomBy { - PlatformCameraUpdateZoomBy({required this.amount, this.focus}); + PlatformCameraUpdateZoomBy({ + required this.amount, + this.focus, + }); double amount; PlatformDoublePair? focus; List _toList() { - return [amount, focus]; + return [ + amount, + focus, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdateZoomBy decode(Object result) { result as List; @@ -395,8 +448,7 @@ class PlatformCameraUpdateZoomBy { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoomBy || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateZoomBy || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -407,33 +459,38 @@ class PlatformCameraUpdateZoomBy { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of ZoomIn/ZoomOut class PlatformCameraUpdateZoom { - PlatformCameraUpdateZoom({required this.out}); + PlatformCameraUpdateZoom({ + required this.out, + }); bool out; List _toList() { - return [out]; + return [ + out, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdateZoom decode(Object result) { result as List; - return PlatformCameraUpdateZoom(out: result[0]! as bool); + return PlatformCameraUpdateZoom( + out: result[0]! as bool, + ); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoom || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateZoom || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -444,33 +501,38 @@ class PlatformCameraUpdateZoom { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of ZoomTo class PlatformCameraUpdateZoomTo { - PlatformCameraUpdateZoomTo({required this.zoom}); + PlatformCameraUpdateZoomTo({ + required this.zoom, + }); double zoom; List _toList() { - return [zoom]; + return [ + zoom, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdateZoomTo decode(Object result) { result as List; - return PlatformCameraUpdateZoomTo(zoom: result[0]! as double); + return PlatformCameraUpdateZoomTo( + zoom: result[0]! as double, + ); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoomTo || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateZoomTo || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -481,7 +543,8 @@ class PlatformCameraUpdateZoomTo { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the Circle class. @@ -531,8 +594,7 @@ class PlatformCircle { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCircle decode(Object result) { result as List; @@ -563,7 +625,8 @@ class PlatformCircle { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the Heatmap class. @@ -590,12 +653,18 @@ class PlatformHeatmap { double? maxIntensity; List _toList() { - return [heatmapId, data, gradient, opacity, radius, maxIntensity]; + return [ + heatmapId, + data, + gradient, + opacity, + radius, + maxIntensity, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformHeatmap decode(Object result) { result as List; @@ -623,7 +692,8 @@ class PlatformHeatmap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the HeatmapGradient class. @@ -645,12 +715,15 @@ class PlatformHeatmapGradient { int colorMapSize; List _toList() { - return [colors, startPoints, colorMapSize]; + return [ + colors, + startPoints, + colorMapSize, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformHeatmapGradient decode(Object result) { result as List; @@ -675,24 +748,30 @@ class PlatformHeatmapGradient { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the WeightedLatLng class. class PlatformWeightedLatLng { - PlatformWeightedLatLng({required this.point, required this.weight}); + PlatformWeightedLatLng({ + required this.point, + required this.weight, + }); PlatformLatLng point; double weight; List _toList() { - return [point, weight]; + return [ + point, + weight, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformWeightedLatLng decode(Object result) { result as List; @@ -716,26 +795,32 @@ class PlatformWeightedLatLng { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the ClusterManager class. class PlatformClusterManager { - PlatformClusterManager({required this.identifier}); + PlatformClusterManager({ + required this.identifier, + }); String identifier; List _toList() { - return [identifier]; + return [ + identifier, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformClusterManager decode(Object result) { result as List; - return PlatformClusterManager(identifier: result[0]! as String); + return PlatformClusterManager( + identifier: result[0]! as String, + ); } @override @@ -752,28 +837,37 @@ class PlatformClusterManager { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pair of double values, such as for an offset or size. class PlatformDoublePair { - PlatformDoublePair({required this.x, required this.y}); + PlatformDoublePair({ + required this.x, + required this.y, + }); double x; double y; List _toList() { - return [x, y]; + return [ + x, + y, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformDoublePair decode(Object result) { result as List; - return PlatformDoublePair(x: result[0]! as double, y: result[1]! as double); + return PlatformDoublePair( + x: result[0]! as double, + y: result[1]! as double, + ); } @override @@ -790,28 +884,34 @@ class PlatformDoublePair { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the Color class. /// /// See https://developer.android.com/reference/android/graphics/Color.html. class PlatformColor { - PlatformColor({required this.argbValue}); + PlatformColor({ + required this.argbValue, + }); int argbValue; List _toList() { - return [argbValue]; + return [ + argbValue, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformColor decode(Object result) { result as List; - return PlatformColor(argbValue: result[0]! as int); + return PlatformColor( + argbValue: result[0]! as int, + ); } @override @@ -828,12 +928,17 @@ class PlatformColor { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the InfoWindow class. class PlatformInfoWindow { - PlatformInfoWindow({this.title, this.snippet, required this.anchor}); + PlatformInfoWindow({ + this.title, + this.snippet, + required this.anchor, + }); String? title; @@ -842,12 +947,15 @@ class PlatformInfoWindow { PlatformDoublePair anchor; List _toList() { - return [title, snippet, anchor]; + return [ + title, + snippet, + anchor, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformInfoWindow decode(Object result) { result as List; @@ -872,7 +980,8 @@ class PlatformInfoWindow { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the Marker class. @@ -938,8 +1047,7 @@ class PlatformMarker { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformMarker decode(Object result) { result as List; @@ -974,7 +1082,60 @@ class PlatformMarker { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Point of Interest class. +class PlatformPointOfInterest { + PlatformPointOfInterest({ + required this.position, + required this.name, + required this.placeId, + }); + + PlatformLatLng position; + + String name; + + String placeId; + + List _toList() { + return [ + position, + name, + placeId, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPointOfInterest decode(Object result) { + result as List; + return PlatformPointOfInterest( + position: result[0]! as PlatformLatLng, + name: result[1]! as String, + placeId: result[2]! as String, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPointOfInterest || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the Polygon class. @@ -1028,8 +1189,7 @@ class PlatformPolygon { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformPolygon decode(Object result) { result as List; @@ -1061,7 +1221,8 @@ class PlatformPolygon { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the Polyline class. @@ -1127,8 +1288,7 @@ class PlatformPolyline { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformPolyline decode(Object result) { result as List; @@ -1162,13 +1322,18 @@ class PlatformPolyline { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of Cap from the platform interface. /// https://github.com/flutter/packages/blob/main/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/cap.dart class PlatformCap { - PlatformCap({required this.type, this.bitmapDescriptor, this.refWidth}); + PlatformCap({ + required this.type, + this.bitmapDescriptor, + this.refWidth, + }); PlatformCapType type; @@ -1177,12 +1342,15 @@ class PlatformCap { double? refWidth; List _toList() { - return [type, bitmapDescriptor, refWidth]; + return [ + type, + bitmapDescriptor, + refWidth, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCap decode(Object result) { result as List; @@ -1207,24 +1375,30 @@ class PlatformCap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the PatternItem class. class PlatformPatternItem { - PlatformPatternItem({required this.type, this.length}); + PlatformPatternItem({ + required this.type, + this.length, + }); PlatformPatternItemType type; double? length; List _toList() { - return [type, length]; + return [ + type, + length, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformPatternItem decode(Object result) { result as List; @@ -1248,12 +1422,17 @@ class PlatformPatternItem { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the Tile class. class PlatformTile { - PlatformTile({required this.width, required this.height, this.data}); + PlatformTile({ + required this.width, + required this.height, + this.data, + }); int width; @@ -1262,12 +1441,15 @@ class PlatformTile { Uint8List? data; List _toList() { - return [width, height, data]; + return [ + width, + height, + data, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformTile decode(Object result) { result as List; @@ -1292,7 +1474,8 @@ class PlatformTile { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the TileOverlay class. @@ -1330,8 +1513,7 @@ class PlatformTileOverlay { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformTileOverlay decode(Object result) { result as List; @@ -1359,7 +1541,8 @@ class PlatformTileOverlay { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of Flutter's EdgeInsets. @@ -1380,12 +1563,16 @@ class PlatformEdgeInsets { double right; List _toList() { - return [top, bottom, left, right]; + return [ + top, + bottom, + left, + right, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformEdgeInsets decode(Object result) { result as List; @@ -1411,24 +1598,30 @@ class PlatformEdgeInsets { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of LatLng. class PlatformLatLng { - PlatformLatLng({required this.latitude, required this.longitude}); + PlatformLatLng({ + required this.latitude, + required this.longitude, + }); double latitude; double longitude; List _toList() { - return [latitude, longitude]; + return [ + latitude, + longitude, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformLatLng decode(Object result) { result as List; @@ -1452,24 +1645,30 @@ class PlatformLatLng { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of LatLngBounds. class PlatformLatLngBounds { - PlatformLatLngBounds({required this.northeast, required this.southwest}); + PlatformLatLngBounds({ + required this.northeast, + required this.southwest, + }); PlatformLatLng northeast; PlatformLatLng southwest; List _toList() { - return [northeast, southwest]; + return [ + northeast, + southwest, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformLatLngBounds decode(Object result) { result as List; @@ -1493,7 +1692,8 @@ class PlatformLatLngBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of Cluster. @@ -1514,12 +1714,16 @@ class PlatformCluster { List markerIds; List _toList() { - return [clusterManagerId, position, bounds, markerIds]; + return [ + clusterManagerId, + position, + bounds, + markerIds, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCluster decode(Object result) { result as List; @@ -1545,7 +1749,8 @@ class PlatformCluster { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the GroundOverlay class. @@ -1607,8 +1812,7 @@ class PlatformGroundOverlay { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformGroundOverlay decode(Object result) { result as List; @@ -1642,7 +1846,8 @@ class PlatformGroundOverlay { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of CameraTargetBounds. @@ -1650,17 +1855,20 @@ class PlatformGroundOverlay { /// As with the Dart version, it exists to distinguish between not setting a /// a target, and having an explicitly unbounded target (null [bounds]). class PlatformCameraTargetBounds { - PlatformCameraTargetBounds({this.bounds}); + PlatformCameraTargetBounds({ + this.bounds, + }); PlatformLatLngBounds? bounds; List _toList() { - return [bounds]; + return [ + bounds, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraTargetBounds decode(Object result) { result as List; @@ -1672,8 +1880,7 @@ class PlatformCameraTargetBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraTargetBounds || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraTargetBounds || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -1684,7 +1891,8 @@ class PlatformCameraTargetBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Information passed to the platform view creation. @@ -1738,8 +1946,7 @@ class PlatformMapViewCreationParams { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformMapViewCreationParams decode(Object result) { result as List; @@ -1751,20 +1958,16 @@ class PlatformMapViewCreationParams { initialPolygons: (result[4] as List?)!.cast(), initialPolylines: (result[5] as List?)!.cast(), initialHeatmaps: (result[6] as List?)!.cast(), - initialTileOverlays: (result[7] as List?)! - .cast(), - initialClusterManagers: (result[8] as List?)! - .cast(), - initialGroundOverlays: (result[9] as List?)! - .cast(), + initialTileOverlays: (result[7] as List?)!.cast(), + initialClusterManagers: (result[8] as List?)!.cast(), + initialGroundOverlays: (result[9] as List?)!.cast(), ); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformMapViewCreationParams || - other.runtimeType != runtimeType) { + if (other is! PlatformMapViewCreationParams || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -1775,7 +1978,8 @@ class PlatformMapViewCreationParams { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of MapConfiguration. @@ -1869,8 +2073,7 @@ class PlatformMapConfiguration { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformMapConfiguration decode(Object result) { result as List; @@ -1901,8 +2104,7 @@ class PlatformMapConfiguration { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformMapConfiguration || - other.runtimeType != runtimeType) { + if (other is! PlatformMapConfiguration || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -1913,28 +2115,37 @@ class PlatformMapConfiguration { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon representation of an x,y coordinate. class PlatformPoint { - PlatformPoint({required this.x, required this.y}); + PlatformPoint({ + required this.x, + required this.y, + }); int x; int y; List _toList() { - return [x, y]; + return [ + x, + y, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformPoint decode(Object result) { result as List; - return PlatformPoint(x: result[0]! as int, y: result[1]! as int); + return PlatformPoint( + x: result[0]! as int, + y: result[1]! as int, + ); } @override @@ -1951,7 +2162,8 @@ class PlatformPoint { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of native TileOverlay properties. @@ -1972,12 +2184,16 @@ class PlatformTileLayer { double zIndex; List _toList() { - return [visible, fadeIn, transparency, zIndex]; + return [ + visible, + fadeIn, + transparency, + zIndex, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformTileLayer decode(Object result) { result as List; @@ -2003,24 +2219,30 @@ class PlatformTileLayer { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Possible outcomes of launching a URL. class PlatformZoomRange { - PlatformZoomRange({this.min, this.max}); + PlatformZoomRange({ + this.min, + this.max, + }); double? min; double? max; List _toList() { - return [min, max]; + return [ + min, + max, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformZoomRange decode(Object result) { result as List; @@ -2044,14 +2266,17 @@ class PlatformZoomRange { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint /// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which /// may hold the pigeon equivalent type of any of them. class PlatformBitmap { - PlatformBitmap({required this.bitmap}); + PlatformBitmap({ + required this.bitmap, + }); /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], @@ -2063,16 +2288,19 @@ class PlatformBitmap { Object bitmap; List _toList() { - return [bitmap]; + return [ + bitmap, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmap decode(Object result) { result as List; - return PlatformBitmap(bitmap: result[0]!); + return PlatformBitmap( + bitmap: result[0]!, + ); } @override @@ -2089,34 +2317,39 @@ class PlatformBitmap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of [DefaultMarker]. See /// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#defaultMarker(float) class PlatformBitmapDefaultMarker { - PlatformBitmapDefaultMarker({this.hue}); + PlatformBitmapDefaultMarker({ + this.hue, + }); double? hue; List _toList() { - return [hue]; + return [ + hue, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmapDefaultMarker decode(Object result) { result as List; - return PlatformBitmapDefaultMarker(hue: result[0] as double?); + return PlatformBitmapDefaultMarker( + hue: result[0] as double?, + ); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformBitmapDefaultMarker || - other.runtimeType != runtimeType) { + if (other is! PlatformBitmapDefaultMarker || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -2127,25 +2360,31 @@ class PlatformBitmapDefaultMarker { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of [BytesBitmap]. See /// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#fromBitmap(android.graphics.Bitmap) class PlatformBitmapBytes { - PlatformBitmapBytes({required this.byteData, this.size}); + PlatformBitmapBytes({ + required this.byteData, + this.size, + }); Uint8List byteData; PlatformDoublePair? size; List _toList() { - return [byteData, size]; + return [ + byteData, + size, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmapBytes decode(Object result) { result as List; @@ -2169,25 +2408,31 @@ class PlatformBitmapBytes { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of [AssetBitmap]. See /// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname class PlatformBitmapAsset { - PlatformBitmapAsset({required this.name, this.pkg}); + PlatformBitmapAsset({ + required this.name, + this.pkg, + }); String name; String? pkg; List _toList() { - return [name, pkg]; + return [ + name, + pkg, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmapAsset decode(Object result) { result as List; @@ -2211,7 +2456,8 @@ class PlatformBitmapAsset { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of [AssetImageBitmap]. See @@ -2230,12 +2476,15 @@ class PlatformBitmapAssetImage { PlatformDoublePair? size; List _toList() { - return [name, scale, size]; + return [ + name, + scale, + size, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmapAssetImage decode(Object result) { result as List; @@ -2249,8 +2498,7 @@ class PlatformBitmapAssetImage { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformBitmapAssetImage || - other.runtimeType != runtimeType) { + if (other is! PlatformBitmapAssetImage || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -2261,7 +2509,8 @@ class PlatformBitmapAssetImage { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of [AssetMapBitmap]. See @@ -2286,12 +2535,17 @@ class PlatformBitmapAssetMap { double? height; List _toList() { - return [assetName, bitmapScaling, imagePixelRatio, width, height]; + return [ + assetName, + bitmapScaling, + imagePixelRatio, + width, + height, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmapAssetMap decode(Object result) { result as List; @@ -2318,7 +2572,8 @@ class PlatformBitmapAssetMap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of [BytesMapBitmap]. See @@ -2343,12 +2598,17 @@ class PlatformBitmapBytesMap { double? height; List _toList() { - return [byteData, bitmapScaling, imagePixelRatio, width, height]; + return [ + byteData, + bitmapScaling, + imagePixelRatio, + width, + height, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmapBytesMap decode(Object result) { result as List; @@ -2375,9 +2635,11 @@ class PlatformBitmapBytesMap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } + class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -2385,153 +2647,156 @@ class _PigeonCodec extends StandardMessageCodec { if (value is int) { buffer.putUint8(4); buffer.putInt64(value); - } else if (value is PlatformMapType) { + } else if (value is PlatformMapType) { buffer.putUint8(129); writeValue(buffer, value.index); - } else if (value is PlatformRendererType) { + } else if (value is PlatformRendererType) { buffer.putUint8(130); writeValue(buffer, value.index); - } else if (value is PlatformJointType) { + } else if (value is PlatformJointType) { buffer.putUint8(131); writeValue(buffer, value.index); - } else if (value is PlatformCapType) { + } else if (value is PlatformCapType) { buffer.putUint8(132); writeValue(buffer, value.index); - } else if (value is PlatformPatternItemType) { + } else if (value is PlatformPatternItemType) { buffer.putUint8(133); writeValue(buffer, value.index); - } else if (value is PlatformMapBitmapScaling) { + } else if (value is PlatformMapBitmapScaling) { buffer.putUint8(134); writeValue(buffer, value.index); - } else if (value is PlatformCameraPosition) { + } else if (value is PlatformCameraPosition) { buffer.putUint8(135); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { + } else if (value is PlatformCameraUpdate) { buffer.putUint8(136); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewCameraPosition) { + } else if (value is PlatformCameraUpdateNewCameraPosition) { buffer.putUint8(137); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLng) { + } else if (value is PlatformCameraUpdateNewLatLng) { buffer.putUint8(138); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngBounds) { + } else if (value is PlatformCameraUpdateNewLatLngBounds) { buffer.putUint8(139); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngZoom) { + } else if (value is PlatformCameraUpdateNewLatLngZoom) { buffer.putUint8(140); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateScrollBy) { + } else if (value is PlatformCameraUpdateScrollBy) { buffer.putUint8(141); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomBy) { + } else if (value is PlatformCameraUpdateZoomBy) { buffer.putUint8(142); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoom) { + } else if (value is PlatformCameraUpdateZoom) { buffer.putUint8(143); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomTo) { + } else if (value is PlatformCameraUpdateZoomTo) { buffer.putUint8(144); writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { + } else if (value is PlatformCircle) { buffer.putUint8(145); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { + } else if (value is PlatformHeatmap) { buffer.putUint8(146); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmapGradient) { + } else if (value is PlatformHeatmapGradient) { buffer.putUint8(147); writeValue(buffer, value.encode()); - } else if (value is PlatformWeightedLatLng) { + } else if (value is PlatformWeightedLatLng) { buffer.putUint8(148); writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { + } else if (value is PlatformClusterManager) { buffer.putUint8(149); writeValue(buffer, value.encode()); - } else if (value is PlatformDoublePair) { + } else if (value is PlatformDoublePair) { buffer.putUint8(150); writeValue(buffer, value.encode()); - } else if (value is PlatformColor) { + } else if (value is PlatformColor) { buffer.putUint8(151); writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { + } else if (value is PlatformInfoWindow) { buffer.putUint8(152); writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { + } else if (value is PlatformMarker) { buffer.putUint8(153); writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { + } else if (value is PlatformPointOfInterest) { buffer.putUint8(154); writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { + } else if (value is PlatformPolygon) { buffer.putUint8(155); writeValue(buffer, value.encode()); - } else if (value is PlatformCap) { + } else if (value is PlatformPolyline) { buffer.putUint8(156); writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { + } else if (value is PlatformCap) { buffer.putUint8(157); writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { + } else if (value is PlatformPatternItem) { buffer.putUint8(158); writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { + } else if (value is PlatformTile) { buffer.putUint8(159); writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { + } else if (value is PlatformTileOverlay) { buffer.putUint8(160); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { + } else if (value is PlatformEdgeInsets) { buffer.putUint8(161); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { + } else if (value is PlatformLatLng) { buffer.putUint8(162); writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { + } else if (value is PlatformLatLngBounds) { buffer.putUint8(163); writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { + } else if (value is PlatformCluster) { buffer.putUint8(164); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { + } else if (value is PlatformGroundOverlay) { buffer.putUint8(165); writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { + } else if (value is PlatformCameraTargetBounds) { buffer.putUint8(166); writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { + } else if (value is PlatformMapViewCreationParams) { buffer.putUint8(167); writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { + } else if (value is PlatformMapConfiguration) { buffer.putUint8(168); writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { + } else if (value is PlatformPoint) { buffer.putUint8(169); writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { + } else if (value is PlatformTileLayer) { buffer.putUint8(170); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { + } else if (value is PlatformZoomRange) { buffer.putUint8(171); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { + } else if (value is PlatformBitmap) { buffer.putUint8(172); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { + } else if (value is PlatformBitmapDefaultMarker) { buffer.putUint8(173); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { + } else if (value is PlatformBitmapBytes) { buffer.putUint8(174); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { + } else if (value is PlatformBitmapAsset) { buffer.putUint8(175); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { + } else if (value is PlatformBitmapAssetImage) { buffer.putUint8(176); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { + } else if (value is PlatformBitmapAssetMap) { buffer.putUint8(177); writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapBytesMap) { + buffer.putUint8(178); + writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); } @@ -2540,109 +2805,111 @@ class _PigeonCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 129: + case 129: final value = readValue(buffer) as int?; return value == null ? null : PlatformMapType.values[value]; - case 130: + case 130: final value = readValue(buffer) as int?; return value == null ? null : PlatformRendererType.values[value]; - case 131: + case 131: final value = readValue(buffer) as int?; return value == null ? null : PlatformJointType.values[value]; - case 132: + case 132: final value = readValue(buffer) as int?; return value == null ? null : PlatformCapType.values[value]; - case 133: + case 133: final value = readValue(buffer) as int?; return value == null ? null : PlatformPatternItemType.values[value]; - case 134: + case 134: final value = readValue(buffer) as int?; return value == null ? null : PlatformMapBitmapScaling.values[value]; - case 135: + case 135: return PlatformCameraPosition.decode(readValue(buffer)!); - case 136: + case 136: return PlatformCameraUpdate.decode(readValue(buffer)!); - case 137: + case 137: return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!); - case 138: + case 138: return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!); - case 139: + case 139: return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); - case 140: + case 140: return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); - case 141: + case 141: return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); - case 142: + case 142: return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); - case 143: + case 143: return PlatformCameraUpdateZoom.decode(readValue(buffer)!); - case 144: + case 144: return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); - case 145: + case 145: return PlatformCircle.decode(readValue(buffer)!); - case 146: + case 146: return PlatformHeatmap.decode(readValue(buffer)!); - case 147: + case 147: return PlatformHeatmapGradient.decode(readValue(buffer)!); - case 148: + case 148: return PlatformWeightedLatLng.decode(readValue(buffer)!); - case 149: + case 149: return PlatformClusterManager.decode(readValue(buffer)!); - case 150: + case 150: return PlatformDoublePair.decode(readValue(buffer)!); - case 151: + case 151: return PlatformColor.decode(readValue(buffer)!); - case 152: + case 152: return PlatformInfoWindow.decode(readValue(buffer)!); - case 153: + case 153: return PlatformMarker.decode(readValue(buffer)!); - case 154: + case 154: + return PlatformPointOfInterest.decode(readValue(buffer)!); + case 155: return PlatformPolygon.decode(readValue(buffer)!); - case 155: + case 156: return PlatformPolyline.decode(readValue(buffer)!); - case 156: + case 157: return PlatformCap.decode(readValue(buffer)!); - case 157: + case 158: return PlatformPatternItem.decode(readValue(buffer)!); - case 158: + case 159: return PlatformTile.decode(readValue(buffer)!); - case 159: + case 160: return PlatformTileOverlay.decode(readValue(buffer)!); - case 160: + case 161: return PlatformEdgeInsets.decode(readValue(buffer)!); - case 161: + case 162: return PlatformLatLng.decode(readValue(buffer)!); - case 162: + case 163: return PlatformLatLngBounds.decode(readValue(buffer)!); - case 163: + case 164: return PlatformCluster.decode(readValue(buffer)!); - case 164: + case 165: return PlatformGroundOverlay.decode(readValue(buffer)!); - case 165: + case 166: return PlatformCameraTargetBounds.decode(readValue(buffer)!); - case 166: + case 167: return PlatformMapViewCreationParams.decode(readValue(buffer)!); - case 167: + case 168: return PlatformMapConfiguration.decode(readValue(buffer)!); - case 168: + case 169: return PlatformPoint.decode(readValue(buffer)!); - case 169: + case 170: return PlatformTileLayer.decode(readValue(buffer)!); - case 170: + case 171: return PlatformZoomRange.decode(readValue(buffer)!); - case 171: + case 172: return PlatformBitmap.decode(readValue(buffer)!); - case 172: + case 173: return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); - case 173: + case 174: return PlatformBitmapBytes.decode(readValue(buffer)!); - case 174: + case 175: return PlatformBitmapAsset.decode(readValue(buffer)!); - case 175: + case 176: return PlatformBitmapAssetImage.decode(readValue(buffer)!); - case 176: + case 177: return PlatformBitmapAssetMap.decode(readValue(buffer)!); - case 177: + case 178: return PlatformBitmapBytesMap.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -2658,10 +2925,8 @@ class MapsApi { /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty - ? '.$messageChannelSuffix' - : ''; + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -2670,8 +2935,7 @@ class MapsApi { /// Returns once the map instance is available. Future waitForMap() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -2696,19 +2960,14 @@ class MapsApi { /// /// Only non-null configuration values will result in updates; options with /// null values will remain unchanged. - Future updateMapConfiguration( - PlatformMapConfiguration configuration, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; + Future updateMapConfiguration(PlatformMapConfiguration configuration) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [configuration], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2724,21 +2983,14 @@ class MapsApi { } /// Updates the set of circles on the map. - Future updateCircles( - List toAdd, - List toChange, - List idsToRemove, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; + Future updateCircles(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [toAdd, toChange, idsToRemove], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2754,21 +3006,14 @@ class MapsApi { } /// Updates the set of heatmaps on the map. - Future updateHeatmaps( - List toAdd, - List toChange, - List idsToRemove, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; + Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [toAdd, toChange, idsToRemove], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2784,20 +3029,14 @@ class MapsApi { } /// Updates the set of custer managers for clusters on the map. - Future updateClusterManagers( - List toAdd, - List idsToRemove, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; + Future updateClusterManagers(List toAdd, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [toAdd, idsToRemove], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2813,21 +3052,14 @@ class MapsApi { } /// Updates the set of markers on the map. - Future updateMarkers( - List toAdd, - List toChange, - List idsToRemove, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; + Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [toAdd, toChange, idsToRemove], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2843,21 +3075,14 @@ class MapsApi { } /// Updates the set of polygonss on the map. - Future updatePolygons( - List toAdd, - List toChange, - List idsToRemove, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; + Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [toAdd, toChange, idsToRemove], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2873,21 +3098,14 @@ class MapsApi { } /// Updates the set of polylines on the map. - Future updatePolylines( - List toAdd, - List toChange, - List idsToRemove, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; + Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [toAdd, toChange, idsToRemove], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2903,21 +3121,14 @@ class MapsApi { } /// Updates the set of tile overlays on the map. - Future updateTileOverlays( - List toAdd, - List toChange, - List idsToRemove, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; + Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [toAdd, toChange, idsToRemove], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2933,21 +3144,14 @@ class MapsApi { } /// Updates the set of ground overlays on the map. - Future updateGroundOverlays( - List toAdd, - List toChange, - List idsToRemove, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; + Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [toAdd, toChange, idsToRemove], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2964,16 +3168,13 @@ class MapsApi { /// Gets the screen coordinate for the given map location. Future getScreenCoordinate(PlatformLatLng latLng) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [latLng], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2995,16 +3196,13 @@ class MapsApi { /// Gets the map location for the given screen coordinate. Future getLatLng(PlatformPoint screenCoordinate) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [screenCoordinate], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3026,8 +3224,7 @@ class MapsApi { /// Gets the map region currently displayed on the map. Future getVisibleRegion() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3056,16 +3253,13 @@ class MapsApi { /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. Future moveCamera(PlatformCameraUpdate cameraUpdate) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [cameraUpdate], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3082,20 +3276,14 @@ class MapsApi { /// Moves the camera according to [cameraUpdate], animating the update using a /// duration in milliseconds if provided. - Future animateCamera( - PlatformCameraUpdate cameraUpdate, - int? durationMilliseconds, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; + Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [cameraUpdate, durationMilliseconds], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3112,8 +3300,7 @@ class MapsApi { /// Gets the current map zoom level. Future getZoomLevel() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3141,16 +3328,13 @@ class MapsApi { /// Show the info window for the marker with the given ID. Future showInfoWindow(String markerId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [markerId], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3167,16 +3351,13 @@ class MapsApi { /// Hide the info window for the marker with the given ID. Future hideInfoWindow(String markerId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [markerId], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3194,16 +3375,13 @@ class MapsApi { /// Returns true if the marker with the given ID is currently displaying its /// info window. Future isInfoWindowShown(String markerId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [markerId], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3229,16 +3407,13 @@ class MapsApi { /// Returns false if there was an error setting the style, such as an invalid /// style string. Future setStyle(String style) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [style], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3264,8 +3439,7 @@ 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 pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3293,16 +3467,13 @@ class MapsApi { /// Clears the cache of tiles previously requseted from the tile provider. Future clearTileCache(String tileOverlayId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [tileOverlayId], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3319,8 +3490,7 @@ class MapsApi { /// Takes a snapshot of the map and returns its image data. Future takeSnapshot() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3386,6 +3556,9 @@ abstract class MapsCallbackApi { /// Called when a marker cluster is tapped. void onClusterTap(PlatformCluster cluster); + /// Called when a POI is tapped. + void onPoiTap(PlatformPointOfInterest poi); + /// Called when a polygon is tapped. void onPolygonTap(String polygonId); @@ -3396,26 +3569,14 @@ abstract class MapsCallbackApi { void onGroundOverlayTap(String groundOverlayId); /// Called to get data for a map tile. - Future getTileOverlayTile( - String tileOverlayId, - PlatformPoint location, - int zoom, - ); + Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); - static void setUp( - MapsCallbackApi? api, { - BinaryMessenger? binaryMessenger, - String messageChannelSuffix = '', - }) { - messageChannelSuffix = messageChannelSuffix.isNotEmpty - ? '.$messageChannelSuffix' - : ''; + static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { + messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; { final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { @@ -3425,54 +3586,41 @@ 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null.', - ); + assert(message != 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?); - assert( - arg_cameraPosition != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null, expected non-null 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 { api.onCameraMove(arg_cameraPosition!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { @@ -3482,468 +3630,373 @@ 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null.', - ); + assert(message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.', - ); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); try { api.onTap(arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null.', - ); + assert(message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.', - ); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); try { api.onLongPress(arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null.', - ); + assert(message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null, expected non-null String.', - ); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); try { api.onMarkerTap(arg_markerId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null.', - ); + assert(message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.', - ); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert( - arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.', - ); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); try { api.onMarkerDragStart(arg_markerId!, arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null.', - ); + assert(message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null String.', - ); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert( - arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.', - ); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); try { api.onMarkerDrag(arg_markerId!, arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null.', - ); + assert(message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.', - ); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert( - arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.', - ); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); try { api.onMarkerDragEnd(arg_markerId!, arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null.', - ); + assert(message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.', - ); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); try { api.onInfoWindowTap(arg_markerId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null.', - ); + assert(message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null, expected non-null String.', - ); + assert(arg_circleId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null, expected non-null String.'); try { api.onCircleTap(arg_circleId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null.', - ); + assert(message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.', - ); + assert(arg_cluster != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); try { api.onClusterTap(arg_cluster!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.'); + final List args = (message as List?)!; + final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); + assert(arg_poi != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); + try { + api.onPoiTap(arg_poi!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null.', - ); + assert(message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null, expected non-null String.', - ); + assert(arg_polygonId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); try { api.onPolygonTap(arg_polygonId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null.', - ); + assert(message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null, expected non-null String.', - ); + assert(arg_polylineId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); try { api.onPolylineTap(arg_polylineId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.', - ); + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.'); final List args = (message as List?)!; final String? arg_groundOverlayId = (args[0] as String?); - assert( - arg_groundOverlayId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.', - ); + assert(arg_groundOverlayId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); try { api.onGroundOverlayTap(arg_groundOverlayId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null.', - ); + assert(message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.', - ); + assert(arg_tileOverlayId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); final PlatformPoint? arg_location = (args[1] as PlatformPoint?); - assert( - arg_location != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.', - ); + assert(arg_location != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); final int? arg_zoom = (args[2] as int?); - assert( - arg_zoom != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.', - ); + 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())); } }); } @@ -3956,13 +4009,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 = '', - }) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty - ? '.$messageChannelSuffix' - : ''; + MapsInitializerApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -3975,19 +4024,14 @@ class MapsInitializerApi { /// /// Calling this more than once in the lifetime of an application will result /// in an error. - Future initializeWithPreferredRenderer( - PlatformRendererType? type, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer$pigeonVar_messageChannelSuffix'; + Future initializeWithPreferredRenderer(PlatformRendererType? type) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [type], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -4010,8 +4054,7 @@ class MapsInitializerApi { /// Attempts to trigger any thread-blocking work /// the Google Maps SDK normally does when a map is shown for the first time. Future warmup() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4040,13 +4083,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 = '', - }) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty - ? '.$messageChannelSuffix' - : ''; + MapsPlatformViewApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -4054,16 +4093,13 @@ class MapsPlatformViewApi { final String pigeonVar_messageChannelSuffix; Future createView(PlatformMapViewCreationParams? type) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [type], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -4084,13 +4120,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 = '', - }) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty - ? '.$messageChannelSuffix' - : ''; + MapsInspectorApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -4098,8 +4130,7 @@ class MapsInspectorApi { final String pigeonVar_messageChannelSuffix; Future areBuildingsEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4126,8 +4157,7 @@ class MapsInspectorApi { } Future areRotateGesturesEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4154,8 +4184,7 @@ class MapsInspectorApi { } Future areZoomControlsEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4182,8 +4211,7 @@ class MapsInspectorApi { } Future areScrollGesturesEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4210,8 +4238,7 @@ class MapsInspectorApi { } Future areTiltGesturesEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4238,8 +4265,7 @@ class MapsInspectorApi { } Future areZoomGesturesEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4266,8 +4292,7 @@ class MapsInspectorApi { } Future isCompassEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4294,8 +4319,7 @@ class MapsInspectorApi { } Future isLiteModeEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4317,8 +4341,7 @@ class MapsInspectorApi { } Future isMapToolbarEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4345,8 +4368,7 @@ class MapsInspectorApi { } Future isMyLocationButtonEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4373,8 +4395,7 @@ class MapsInspectorApi { } Future isTrafficEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4401,16 +4422,13 @@ class MapsInspectorApi { } Future getTileOverlayInfo(String tileOverlayId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [tileOverlayId], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -4425,19 +4443,14 @@ class MapsInspectorApi { } } - Future getGroundOverlayInfo( - String groundOverlayId, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; + Future getGroundOverlayInfo(String groundOverlayId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [groundOverlayId], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -4453,8 +4466,7 @@ class MapsInspectorApi { } Future getZoomRange() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4481,16 +4493,13 @@ class MapsInspectorApi { } Future> getClusters(String clusterManagerId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [clusterManagerId], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -4506,14 +4515,12 @@ class MapsInspectorApi { message: 'Host platform returned null value for non-null return value.', ); } else { - return (pigeonVar_replyList[0] as List?)! - .cast(); + return (pigeonVar_replyList[0] as List?)!.cast(); } } Future getCameraPosition() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, 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 60096d9cf3af..8423c7b733dd 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 @@ -235,6 +235,20 @@ class PlatformMarker { final String? clusterManagerId; } + +/// Pigeon equivalent of the Point of Interest class. +class PlatformPointOfInterest { + PlatformPointOfInterest({ + required this.position, + required this.name, + required this.placeId, + }); + + final PlatformLatLng position; + final String name; + final String placeId; +} + /// Pigeon equivalent of the Polygon class. class PlatformPolygon { PlatformPolygon({ @@ -643,6 +657,7 @@ class PlatformBitmapBytesMap { final double? height; } + /// Interface for non-test interactions with the native SDK. /// /// For test-only state queries, see [MapsInspectorApi]. @@ -806,6 +821,9 @@ abstract class MapsCallbackApi { /// Called when a marker cluster is tapped. void onClusterTap(PlatformCluster cluster); + /// Called when a POI is tapped. + void onPoiTap(PlatformPointOfInterest poi); + /// Called when a polygon is tapped. void onPolygonTap(String polygonId); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m index 0537d48ba9ce..c308fac36ca7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m @@ -421,6 +421,20 @@ - (void)mapView:(GMSMapView *)mapView didTapAtCoordinate:(CLLocationCoordinate2D }]; } +- (void)mapView:(GMSMapView *)mapView + didTapPOIWithPlaceID:(NSString *)placeID + name:(NSString *)name + location:(CLLocationCoordinate2D)location { + FGMPlatformPointOfInterest *poi = [FGMPlatformPointOfInterest + makeWithPosition:FGMGetPigeonLatLngForCoordinate(location) + name:name + placeId:placeID]; + + [self.dartCallbackHandler didTapPointOfInterest:poi + completion:^(FlutterError *_Nullable _){ + }]; +} + - (void)mapView:(GMSMapView *)mapView didLongPressAtCoordinate:(CLLocationCoordinate2D)coordinate { [self.dartCallbackHandler didLongPressAtPosition:FGMGetPigeonLatLngForCoordinate(coordinate) completion:^(FlutterError *_Nullable _){ diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m index e833e2f24f42..57fafffc3044 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m @@ -1,19 +1,15 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.5), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "google_maps_flutter_pigeon_messages.g.h" #if TARGET_OS_OSX -#import +@import FlutterMacOS; #else -#import -#endif - -#if !__has_feature(objc_arc) -#error File requires ARC to be enabled. +@import Flutter; #endif static NSArray *wrapResult(id result, FlutterError *error) { @@ -26,12 +22,7 @@ } static FlutterError *createConnectionError(NSString *channelName) { - return [FlutterError - errorWithCode:@"channel-error" - message:[NSString stringWithFormat:@"%@/%@/%@", - @"Unable to establish connection on channel: '", - channelName, @"'."] - details:@""]; + return [FlutterError errorWithCode:@"channel-error" message:[NSString stringWithFormat:@"%@/%@/%@", @"Unable to establish connection on channel: '", channelName, @"'."] details:@""]; } static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { @@ -191,6 +182,12 @@ + (nullable FGMPlatformMarker *)nullableFromList:(NSArray *)list; - (NSArray *)toList; @end +@interface FGMPlatformPointOfInterest () ++ (FGMPlatformPointOfInterest *)fromList:(NSArray *)list; ++ (nullable FGMPlatformPointOfInterest *)nullableFromList:(NSArray *)list; +- (NSArray *)toList; +@end + @interface FGMPlatformPolygon () + (FGMPlatformPolygon *)fromList:(NSArray *)list; + (nullable FGMPlatformPolygon *)nullableFromList:(NSArray *)list; @@ -336,11 +333,11 @@ + (nullable FGMPlatformBitmapBytesMap *)nullableFromList:(NSArray *)list; @end @implementation FGMPlatformCameraPosition -+ (instancetype)makeWithBearing:(double)bearing - target:(FGMPlatformLatLng *)target - tilt:(double)tilt - zoom:(double)zoom { - FGMPlatformCameraPosition *pigeonResult = [[FGMPlatformCameraPosition alloc] init]; ++ (instancetype)makeWithBearing:(double )bearing + target:(FGMPlatformLatLng *)target + tilt:(double )tilt + zoom:(double )zoom { + FGMPlatformCameraPosition* pigeonResult = [[FGMPlatformCameraPosition alloc] init]; pigeonResult.bearing = bearing; pigeonResult.target = target; pigeonResult.tilt = tilt; @@ -369,8 +366,8 @@ + (nullable FGMPlatformCameraPosition *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformCameraUpdate -+ (instancetype)makeWithCameraUpdate:(id)cameraUpdate { - FGMPlatformCameraUpdate *pigeonResult = [[FGMPlatformCameraUpdate alloc] init]; ++ (instancetype)makeWithCameraUpdate:(id )cameraUpdate { + FGMPlatformCameraUpdate* pigeonResult = [[FGMPlatformCameraUpdate alloc] init]; pigeonResult.cameraUpdate = cameraUpdate; return pigeonResult; } @@ -391,14 +388,12 @@ + (nullable FGMPlatformCameraUpdate *)nullableFromList:(NSArray *)list { @implementation FGMPlatformCameraUpdateNewCameraPosition + (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition { - FGMPlatformCameraUpdateNewCameraPosition *pigeonResult = - [[FGMPlatformCameraUpdateNewCameraPosition alloc] init]; + FGMPlatformCameraUpdateNewCameraPosition* pigeonResult = [[FGMPlatformCameraUpdateNewCameraPosition alloc] init]; pigeonResult.cameraPosition = cameraPosition; return pigeonResult; } + (FGMPlatformCameraUpdateNewCameraPosition *)fromList:(NSArray *)list { - FGMPlatformCameraUpdateNewCameraPosition *pigeonResult = - [[FGMPlatformCameraUpdateNewCameraPosition alloc] init]; + FGMPlatformCameraUpdateNewCameraPosition *pigeonResult = [[FGMPlatformCameraUpdateNewCameraPosition alloc] init]; pigeonResult.cameraPosition = GetNullableObjectAtIndex(list, 0); return pigeonResult; } @@ -414,7 +409,7 @@ + (nullable FGMPlatformCameraUpdateNewCameraPosition *)nullableFromList:(NSArray @implementation FGMPlatformCameraUpdateNewLatLng + (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng { - FGMPlatformCameraUpdateNewLatLng *pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init]; + FGMPlatformCameraUpdateNewLatLng* pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init]; pigeonResult.latLng = latLng; return pigeonResult; } @@ -434,16 +429,15 @@ + (nullable FGMPlatformCameraUpdateNewLatLng *)nullableFromList:(NSArray *)l @end @implementation FGMPlatformCameraUpdateNewLatLngBounds -+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding { - FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult = - [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init]; ++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds + padding:(double )padding { + FGMPlatformCameraUpdateNewLatLngBounds* pigeonResult = [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init]; pigeonResult.bounds = bounds; pigeonResult.padding = padding; return pigeonResult; } + (FGMPlatformCameraUpdateNewLatLngBounds *)fromList:(NSArray *)list { - FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult = - [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init]; + FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult = [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init]; pigeonResult.bounds = GetNullableObjectAtIndex(list, 0); pigeonResult.padding = [GetNullableObjectAtIndex(list, 1) doubleValue]; return pigeonResult; @@ -460,16 +454,15 @@ + (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray *)list { - FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult = - [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init]; + FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult = [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init]; pigeonResult.latLng = GetNullableObjectAtIndex(list, 0); pigeonResult.zoom = [GetNullableObjectAtIndex(list, 1) doubleValue]; return pigeonResult; @@ -486,8 +479,9 @@ + (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray @end @implementation FGMPlatformCameraUpdateScrollBy -+ (instancetype)makeWithDx:(double)dx dy:(double)dy { - FGMPlatformCameraUpdateScrollBy *pigeonResult = [[FGMPlatformCameraUpdateScrollBy alloc] init]; ++ (instancetype)makeWithDx:(double )dx + dy:(double )dy { + FGMPlatformCameraUpdateScrollBy* pigeonResult = [[FGMPlatformCameraUpdateScrollBy alloc] init]; pigeonResult.dx = dx; pigeonResult.dy = dy; return pigeonResult; @@ -510,8 +504,9 @@ + (nullable FGMPlatformCameraUpdateScrollBy *)nullableFromList:(NSArray *)li @end @implementation FGMPlatformCameraUpdateZoomBy -+ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus { - FGMPlatformCameraUpdateZoomBy *pigeonResult = [[FGMPlatformCameraUpdateZoomBy alloc] init]; ++ (instancetype)makeWithAmount:(double )amount + focus:(nullable FGMPlatformPoint *)focus { + FGMPlatformCameraUpdateZoomBy* pigeonResult = [[FGMPlatformCameraUpdateZoomBy alloc] init]; pigeonResult.amount = amount; pigeonResult.focus = focus; return pigeonResult; @@ -534,8 +529,8 @@ + (nullable FGMPlatformCameraUpdateZoomBy *)nullableFromList:(NSArray *)list @end @implementation FGMPlatformCameraUpdateZoom -+ (instancetype)makeWithOut:(BOOL)out { - FGMPlatformCameraUpdateZoom *pigeonResult = [[FGMPlatformCameraUpdateZoom alloc] init]; ++ (instancetype)makeWithOut:(BOOL )out { + FGMPlatformCameraUpdateZoom* pigeonResult = [[FGMPlatformCameraUpdateZoom alloc] init]; pigeonResult.out = out; return pigeonResult; } @@ -555,8 +550,8 @@ + (nullable FGMPlatformCameraUpdateZoom *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformCameraUpdateZoomTo -+ (instancetype)makeWithZoom:(double)zoom { - FGMPlatformCameraUpdateZoomTo *pigeonResult = [[FGMPlatformCameraUpdateZoomTo alloc] init]; ++ (instancetype)makeWithZoom:(double )zoom { + FGMPlatformCameraUpdateZoomTo* pigeonResult = [[FGMPlatformCameraUpdateZoomTo alloc] init]; pigeonResult.zoom = zoom; return pigeonResult; } @@ -576,16 +571,16 @@ + (nullable FGMPlatformCameraUpdateZoomTo *)nullableFromList:(NSArray *)list @end @implementation FGMPlatformCircle -+ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents - fillColor:(FGMPlatformColor *)fillColor - strokeColor:(FGMPlatformColor *)strokeColor - visible:(BOOL)visible - strokeWidth:(NSInteger)strokeWidth - zIndex:(double)zIndex - center:(FGMPlatformLatLng *)center - radius:(double)radius - circleId:(NSString *)circleId { - FGMPlatformCircle *pigeonResult = [[FGMPlatformCircle alloc] init]; ++ (instancetype)makeWithConsumeTapEvents:(BOOL )consumeTapEvents + fillColor:(FGMPlatformColor *)fillColor + strokeColor:(FGMPlatformColor *)strokeColor + visible:(BOOL )visible + strokeWidth:(NSInteger )strokeWidth + zIndex:(double )zIndex + center:(FGMPlatformLatLng *)center + radius:(double )radius + circleId:(NSString *)circleId { + FGMPlatformCircle* pigeonResult = [[FGMPlatformCircle alloc] init]; pigeonResult.consumeTapEvents = consumeTapEvents; pigeonResult.fillColor = fillColor; pigeonResult.strokeColor = strokeColor; @@ -630,13 +625,13 @@ + (nullable FGMPlatformCircle *)nullableFromList:(NSArray *)list { @implementation FGMPlatformHeatmap + (instancetype)makeWithHeatmapId:(NSString *)heatmapId - data:(NSArray *)data - gradient:(nullable FGMPlatformHeatmapGradient *)gradient - opacity:(double)opacity - radius:(NSInteger)radius - minimumZoomIntensity:(NSInteger)minimumZoomIntensity - maximumZoomIntensity:(NSInteger)maximumZoomIntensity { - FGMPlatformHeatmap *pigeonResult = [[FGMPlatformHeatmap alloc] init]; + data:(NSArray *)data + gradient:(nullable FGMPlatformHeatmapGradient *)gradient + opacity:(double )opacity + radius:(NSInteger )radius + minimumZoomIntensity:(NSInteger )minimumZoomIntensity + maximumZoomIntensity:(NSInteger )maximumZoomIntensity { + FGMPlatformHeatmap* pigeonResult = [[FGMPlatformHeatmap alloc] init]; pigeonResult.heatmapId = heatmapId; pigeonResult.data = data; pigeonResult.gradient = gradient; @@ -675,9 +670,9 @@ + (nullable FGMPlatformHeatmap *)nullableFromList:(NSArray *)list { @implementation FGMPlatformHeatmapGradient + (instancetype)makeWithColors:(NSArray *)colors - startPoints:(NSArray *)startPoints - colorMapSize:(NSInteger)colorMapSize { - FGMPlatformHeatmapGradient *pigeonResult = [[FGMPlatformHeatmapGradient alloc] init]; + startPoints:(NSArray *)startPoints + colorMapSize:(NSInteger )colorMapSize { + FGMPlatformHeatmapGradient* pigeonResult = [[FGMPlatformHeatmapGradient alloc] init]; pigeonResult.colors = colors; pigeonResult.startPoints = startPoints; pigeonResult.colorMapSize = colorMapSize; @@ -703,8 +698,9 @@ + (nullable FGMPlatformHeatmapGradient *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformWeightedLatLng -+ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point weight:(double)weight { - FGMPlatformWeightedLatLng *pigeonResult = [[FGMPlatformWeightedLatLng alloc] init]; ++ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point + weight:(double )weight { + FGMPlatformWeightedLatLng* pigeonResult = [[FGMPlatformWeightedLatLng alloc] init]; pigeonResult.point = point; pigeonResult.weight = weight; return pigeonResult; @@ -728,9 +724,9 @@ + (nullable FGMPlatformWeightedLatLng *)nullableFromList:(NSArray *)list { @implementation FGMPlatformInfoWindow + (instancetype)makeWithTitle:(nullable NSString *)title - snippet:(nullable NSString *)snippet - anchor:(FGMPlatformPoint *)anchor { - FGMPlatformInfoWindow *pigeonResult = [[FGMPlatformInfoWindow alloc] init]; + snippet:(nullable NSString *)snippet + anchor:(FGMPlatformPoint *)anchor { + FGMPlatformInfoWindow* pigeonResult = [[FGMPlatformInfoWindow alloc] init]; pigeonResult.title = title; pigeonResult.snippet = snippet; pigeonResult.anchor = anchor; @@ -757,10 +753,10 @@ + (nullable FGMPlatformInfoWindow *)nullableFromList:(NSArray *)list { @implementation FGMPlatformCluster + (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId - position:(FGMPlatformLatLng *)position - bounds:(FGMPlatformLatLngBounds *)bounds - markerIds:(NSArray *)markerIds { - FGMPlatformCluster *pigeonResult = [[FGMPlatformCluster alloc] init]; + position:(FGMPlatformLatLng *)position + bounds:(FGMPlatformLatLngBounds *)bounds + markerIds:(NSArray *)markerIds { + FGMPlatformCluster* pigeonResult = [[FGMPlatformCluster alloc] init]; pigeonResult.clusterManagerId = clusterManagerId; pigeonResult.position = position; pigeonResult.bounds = bounds; @@ -790,7 +786,7 @@ + (nullable FGMPlatformCluster *)nullableFromList:(NSArray *)list { @implementation FGMPlatformClusterManager + (instancetype)makeWithIdentifier:(NSString *)identifier { - FGMPlatformClusterManager *pigeonResult = [[FGMPlatformClusterManager alloc] init]; + FGMPlatformClusterManager* pigeonResult = [[FGMPlatformClusterManager alloc] init]; pigeonResult.identifier = identifier; return pigeonResult; } @@ -810,20 +806,20 @@ + (nullable FGMPlatformClusterManager *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformMarker -+ (instancetype)makeWithAlpha:(double)alpha - anchor:(FGMPlatformPoint *)anchor - consumeTapEvents:(BOOL)consumeTapEvents - draggable:(BOOL)draggable - flat:(BOOL)flat - icon:(FGMPlatformBitmap *)icon - infoWindow:(FGMPlatformInfoWindow *)infoWindow - position:(FGMPlatformLatLng *)position - rotation:(double)rotation - visible:(BOOL)visible - zIndex:(NSInteger)zIndex - markerId:(NSString *)markerId - clusterManagerId:(nullable NSString *)clusterManagerId { - FGMPlatformMarker *pigeonResult = [[FGMPlatformMarker alloc] init]; ++ (instancetype)makeWithAlpha:(double )alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL )consumeTapEvents + draggable:(BOOL )draggable + flat:(BOOL )flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double )rotation + visible:(BOOL )visible + zIndex:(NSInteger )zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId { + FGMPlatformMarker* pigeonResult = [[FGMPlatformMarker alloc] init]; pigeonResult.alpha = alpha; pigeonResult.anchor = anchor; pigeonResult.consumeTapEvents = consumeTapEvents; @@ -878,18 +874,47 @@ + (nullable FGMPlatformMarker *)nullableFromList:(NSArray *)list { } @end +@implementation FGMPlatformPointOfInterest ++ (instancetype)makeWithPosition:(FGMPlatformLatLng *)position + name:(NSString *)name + placeId:(NSString *)placeId { + FGMPlatformPointOfInterest* pigeonResult = [[FGMPlatformPointOfInterest alloc] init]; + pigeonResult.position = position; + pigeonResult.name = name; + pigeonResult.placeId = placeId; + return pigeonResult; +} ++ (FGMPlatformPointOfInterest *)fromList:(NSArray *)list { + FGMPlatformPointOfInterest *pigeonResult = [[FGMPlatformPointOfInterest alloc] init]; + pigeonResult.position = GetNullableObjectAtIndex(list, 0); + pigeonResult.name = GetNullableObjectAtIndex(list, 1); + pigeonResult.placeId = GetNullableObjectAtIndex(list, 2); + return pigeonResult; +} ++ (nullable FGMPlatformPointOfInterest *)nullableFromList:(NSArray *)list { + return (list) ? [FGMPlatformPointOfInterest fromList:list] : nil; +} +- (NSArray *)toList { + return @[ + self.position ?: [NSNull null], + self.name ?: [NSNull null], + self.placeId ?: [NSNull null], + ]; +} +@end + @implementation FGMPlatformPolygon + (instancetype)makeWithPolygonId:(NSString *)polygonId - consumesTapEvents:(BOOL)consumesTapEvents - fillColor:(FGMPlatformColor *)fillColor - geodesic:(BOOL)geodesic - points:(NSArray *)points - holes:(NSArray *> *)holes - visible:(BOOL)visible - strokeColor:(FGMPlatformColor *)strokeColor - strokeWidth:(NSInteger)strokeWidth - zIndex:(NSInteger)zIndex { - FGMPlatformPolygon *pigeonResult = [[FGMPlatformPolygon alloc] init]; + consumesTapEvents:(BOOL )consumesTapEvents + fillColor:(FGMPlatformColor *)fillColor + geodesic:(BOOL )geodesic + points:(NSArray *)points + holes:(NSArray *> *)holes + visible:(BOOL )visible + strokeColor:(FGMPlatformColor *)strokeColor + strokeWidth:(NSInteger )strokeWidth + zIndex:(NSInteger )zIndex { + FGMPlatformPolygon* pigeonResult = [[FGMPlatformPolygon alloc] init]; pigeonResult.polygonId = polygonId; pigeonResult.consumesTapEvents = consumesTapEvents; pigeonResult.fillColor = fillColor; @@ -937,16 +962,16 @@ + (nullable FGMPlatformPolygon *)nullableFromList:(NSArray *)list { @implementation FGMPlatformPolyline + (instancetype)makeWithPolylineId:(NSString *)polylineId - consumesTapEvents:(BOOL)consumesTapEvents - color:(FGMPlatformColor *)color - geodesic:(BOOL)geodesic - jointType:(FGMPlatformJointType)jointType - patterns:(NSArray *)patterns - points:(NSArray *)points - visible:(BOOL)visible - width:(NSInteger)width - zIndex:(NSInteger)zIndex { - FGMPlatformPolyline *pigeonResult = [[FGMPlatformPolyline alloc] init]; + consumesTapEvents:(BOOL )consumesTapEvents + color:(FGMPlatformColor *)color + geodesic:(BOOL )geodesic + jointType:(FGMPlatformJointType)jointType + patterns:(NSArray *)patterns + points:(NSArray *)points + visible:(BOOL )visible + width:(NSInteger )width + zIndex:(NSInteger )zIndex { + FGMPlatformPolyline* pigeonResult = [[FGMPlatformPolyline alloc] init]; pigeonResult.polylineId = polylineId; pigeonResult.consumesTapEvents = consumesTapEvents; pigeonResult.color = color; @@ -994,16 +1019,16 @@ + (nullable FGMPlatformPolyline *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformPatternItem -+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length { - FGMPlatformPatternItem *pigeonResult = [[FGMPlatformPatternItem alloc] init]; ++ (instancetype)makeWithType:(FGMPlatformPatternItemType)type + length:(nullable NSNumber *)length { + FGMPlatformPatternItem* pigeonResult = [[FGMPlatformPatternItem alloc] init]; pigeonResult.type = type; pigeonResult.length = length; return pigeonResult; } + (FGMPlatformPatternItem *)fromList:(NSArray *)list { FGMPlatformPatternItem *pigeonResult = [[FGMPlatformPatternItem alloc] init]; - FGMPlatformPatternItemTypeBox *boxedFGMPlatformPatternItemType = - GetNullableObjectAtIndex(list, 0); + FGMPlatformPatternItemTypeBox *boxedFGMPlatformPatternItemType = GetNullableObjectAtIndex(list, 0); pigeonResult.type = boxedFGMPlatformPatternItemType.value; pigeonResult.length = GetNullableObjectAtIndex(list, 1); return pigeonResult; @@ -1020,10 +1045,10 @@ + (nullable FGMPlatformPatternItem *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformTile -+ (instancetype)makeWithWidth:(NSInteger)width - height:(NSInteger)height - data:(nullable FlutterStandardTypedData *)data { - FGMPlatformTile *pigeonResult = [[FGMPlatformTile alloc] init]; ++ (instancetype)makeWithWidth:(NSInteger )width + height:(NSInteger )height + data:(nullable FlutterStandardTypedData *)data { + FGMPlatformTile* pigeonResult = [[FGMPlatformTile alloc] init]; pigeonResult.width = width; pigeonResult.height = height; pigeonResult.data = data; @@ -1050,12 +1075,12 @@ + (nullable FGMPlatformTile *)nullableFromList:(NSArray *)list { @implementation FGMPlatformTileOverlay + (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId - fadeIn:(BOOL)fadeIn - transparency:(double)transparency - zIndex:(NSInteger)zIndex - visible:(BOOL)visible - tileSize:(NSInteger)tileSize { - FGMPlatformTileOverlay *pigeonResult = [[FGMPlatformTileOverlay alloc] init]; + fadeIn:(BOOL )fadeIn + transparency:(double )transparency + zIndex:(NSInteger )zIndex + visible:(BOOL )visible + tileSize:(NSInteger )tileSize { + FGMPlatformTileOverlay* pigeonResult = [[FGMPlatformTileOverlay alloc] init]; pigeonResult.tileOverlayId = tileOverlayId; pigeonResult.fadeIn = fadeIn; pigeonResult.transparency = transparency; @@ -1090,11 +1115,11 @@ + (nullable FGMPlatformTileOverlay *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformEdgeInsets -+ (instancetype)makeWithTop:(double)top - bottom:(double)bottom - left:(double)left - right:(double)right { - FGMPlatformEdgeInsets *pigeonResult = [[FGMPlatformEdgeInsets alloc] init]; ++ (instancetype)makeWithTop:(double )top + bottom:(double )bottom + left:(double )left + right:(double )right { + FGMPlatformEdgeInsets* pigeonResult = [[FGMPlatformEdgeInsets alloc] init]; pigeonResult.top = top; pigeonResult.bottom = bottom; pigeonResult.left = left; @@ -1123,8 +1148,9 @@ + (nullable FGMPlatformEdgeInsets *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformLatLng -+ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude { - FGMPlatformLatLng *pigeonResult = [[FGMPlatformLatLng alloc] init]; ++ (instancetype)makeWithLatitude:(double )latitude + longitude:(double )longitude { + FGMPlatformLatLng* pigeonResult = [[FGMPlatformLatLng alloc] init]; pigeonResult.latitude = latitude; pigeonResult.longitude = longitude; return pigeonResult; @@ -1148,8 +1174,8 @@ + (nullable FGMPlatformLatLng *)nullableFromList:(NSArray *)list { @implementation FGMPlatformLatLngBounds + (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast - southwest:(FGMPlatformLatLng *)southwest { - FGMPlatformLatLngBounds *pigeonResult = [[FGMPlatformLatLngBounds alloc] init]; + southwest:(FGMPlatformLatLng *)southwest { + FGMPlatformLatLngBounds* pigeonResult = [[FGMPlatformLatLngBounds alloc] init]; pigeonResult.northeast = northeast; pigeonResult.southwest = southwest; return pigeonResult; @@ -1173,7 +1199,7 @@ + (nullable FGMPlatformLatLngBounds *)nullableFromList:(NSArray *)list { @implementation FGMPlatformCameraTargetBounds + (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds { - FGMPlatformCameraTargetBounds *pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init]; + FGMPlatformCameraTargetBounds* pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init]; pigeonResult.bounds = bounds; return pigeonResult; } @@ -1194,17 +1220,17 @@ + (nullable FGMPlatformCameraTargetBounds *)nullableFromList:(NSArray *)list @implementation FGMPlatformGroundOverlay + (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId - image:(FGMPlatformBitmap *)image - position:(nullable FGMPlatformLatLng *)position - bounds:(nullable FGMPlatformLatLngBounds *)bounds - anchor:(nullable FGMPlatformPoint *)anchor - transparency:(double)transparency - bearing:(double)bearing - zIndex:(NSInteger)zIndex - visible:(BOOL)visible - clickable:(BOOL)clickable - zoomLevel:(nullable NSNumber *)zoomLevel { - FGMPlatformGroundOverlay *pigeonResult = [[FGMPlatformGroundOverlay alloc] init]; + image:(FGMPlatformBitmap *)image + position:(nullable FGMPlatformLatLng *)position + bounds:(nullable FGMPlatformLatLngBounds *)bounds + anchor:(nullable FGMPlatformPoint *)anchor + transparency:(double )transparency + bearing:(double )bearing + zIndex:(NSInteger )zIndex + visible:(BOOL )visible + clickable:(BOOL )clickable + zoomLevel:(nullable NSNumber *)zoomLevel { + FGMPlatformGroundOverlay* pigeonResult = [[FGMPlatformGroundOverlay alloc] init]; pigeonResult.groundOverlayId = groundOverlayId; pigeonResult.image = image; pigeonResult.position = position; @@ -1254,18 +1280,17 @@ + (nullable FGMPlatformGroundOverlay *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformMapViewCreationParams -+ (instancetype) - makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition - mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration - initialCircles:(NSArray *)initialCircles - initialMarkers:(NSArray *)initialMarkers - initialPolygons:(NSArray *)initialPolygons - initialPolylines:(NSArray *)initialPolylines - initialHeatmaps:(NSArray *)initialHeatmaps - initialTileOverlays:(NSArray *)initialTileOverlays - initialClusterManagers:(NSArray *)initialClusterManagers - initialGroundOverlays:(NSArray *)initialGroundOverlays { - FGMPlatformMapViewCreationParams *pigeonResult = [[FGMPlatformMapViewCreationParams alloc] init]; ++ (instancetype)makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition + mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration + initialCircles:(NSArray *)initialCircles + initialMarkers:(NSArray *)initialMarkers + initialPolygons:(NSArray *)initialPolygons + initialPolylines:(NSArray *)initialPolylines + initialHeatmaps:(NSArray *)initialHeatmaps + initialTileOverlays:(NSArray *)initialTileOverlays + initialClusterManagers:(NSArray *)initialClusterManagers + initialGroundOverlays:(NSArray *)initialGroundOverlays { + FGMPlatformMapViewCreationParams* pigeonResult = [[FGMPlatformMapViewCreationParams alloc] init]; pigeonResult.initialCameraPosition = initialCameraPosition; pigeonResult.mapConfiguration = mapConfiguration; pigeonResult.initialCircles = initialCircles; @@ -1313,23 +1338,23 @@ + (nullable FGMPlatformMapViewCreationParams *)nullableFromList:(NSArray *)l @implementation FGMPlatformMapConfiguration + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style { - FGMPlatformMapConfiguration *pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style { + FGMPlatformMapConfiguration* pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; pigeonResult.compassEnabled = compassEnabled; pigeonResult.cameraTargetBounds = cameraTargetBounds; pigeonResult.mapType = mapType; @@ -1397,8 +1422,9 @@ + (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformPoint -+ (instancetype)makeWithX:(double)x y:(double)y { - FGMPlatformPoint *pigeonResult = [[FGMPlatformPoint alloc] init]; ++ (instancetype)makeWithX:(double )x + y:(double )y { + FGMPlatformPoint* pigeonResult = [[FGMPlatformPoint alloc] init]; pigeonResult.x = x; pigeonResult.y = y; return pigeonResult; @@ -1421,8 +1447,9 @@ + (nullable FGMPlatformPoint *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformSize -+ (instancetype)makeWithWidth:(double)width height:(double)height { - FGMPlatformSize *pigeonResult = [[FGMPlatformSize alloc] init]; ++ (instancetype)makeWithWidth:(double )width + height:(double )height { + FGMPlatformSize* pigeonResult = [[FGMPlatformSize alloc] init]; pigeonResult.width = width; pigeonResult.height = height; return pigeonResult; @@ -1445,8 +1472,11 @@ + (nullable FGMPlatformSize *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformColor -+ (instancetype)makeWithRed:(double)red green:(double)green blue:(double)blue alpha:(double)alpha { - FGMPlatformColor *pigeonResult = [[FGMPlatformColor alloc] init]; ++ (instancetype)makeWithRed:(double )red + green:(double )green + blue:(double )blue + alpha:(double )alpha { + FGMPlatformColor* pigeonResult = [[FGMPlatformColor alloc] init]; pigeonResult.red = red; pigeonResult.green = green; pigeonResult.blue = blue; @@ -1475,11 +1505,11 @@ + (nullable FGMPlatformColor *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformTileLayer -+ (instancetype)makeWithVisible:(BOOL)visible - fadeIn:(BOOL)fadeIn - opacity:(double)opacity - zIndex:(NSInteger)zIndex { - FGMPlatformTileLayer *pigeonResult = [[FGMPlatformTileLayer alloc] init]; ++ (instancetype)makeWithVisible:(BOOL )visible + fadeIn:(BOOL )fadeIn + opacity:(double )opacity + zIndex:(NSInteger )zIndex { + FGMPlatformTileLayer* pigeonResult = [[FGMPlatformTileLayer alloc] init]; pigeonResult.visible = visible; pigeonResult.fadeIn = fadeIn; pigeonResult.opacity = opacity; @@ -1508,8 +1538,9 @@ + (nullable FGMPlatformTileLayer *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformZoomRange -+ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max { - FGMPlatformZoomRange *pigeonResult = [[FGMPlatformZoomRange alloc] init]; ++ (instancetype)makeWithMin:(nullable NSNumber *)min + max:(nullable NSNumber *)max { + FGMPlatformZoomRange* pigeonResult = [[FGMPlatformZoomRange alloc] init]; pigeonResult.min = min; pigeonResult.max = max; return pigeonResult; @@ -1532,8 +1563,8 @@ + (nullable FGMPlatformZoomRange *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformBitmap -+ (instancetype)makeWithBitmap:(id)bitmap { - FGMPlatformBitmap *pigeonResult = [[FGMPlatformBitmap alloc] init]; ++ (instancetype)makeWithBitmap:(id )bitmap { + FGMPlatformBitmap* pigeonResult = [[FGMPlatformBitmap alloc] init]; pigeonResult.bitmap = bitmap; return pigeonResult; } @@ -1554,7 +1585,7 @@ + (nullable FGMPlatformBitmap *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapDefaultMarker + (instancetype)makeWithHue:(nullable NSNumber *)hue { - FGMPlatformBitmapDefaultMarker *pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init]; + FGMPlatformBitmapDefaultMarker* pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init]; pigeonResult.hue = hue; return pigeonResult; } @@ -1575,8 +1606,8 @@ + (nullable FGMPlatformBitmapDefaultMarker *)nullableFromList:(NSArray *)lis @implementation FGMPlatformBitmapBytes + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - size:(nullable FGMPlatformSize *)size { - FGMPlatformBitmapBytes *pigeonResult = [[FGMPlatformBitmapBytes alloc] init]; + size:(nullable FGMPlatformSize *)size { + FGMPlatformBitmapBytes* pigeonResult = [[FGMPlatformBitmapBytes alloc] init]; pigeonResult.byteData = byteData; pigeonResult.size = size; return pigeonResult; @@ -1599,8 +1630,9 @@ + (nullable FGMPlatformBitmapBytes *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformBitmapAsset -+ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg { - FGMPlatformBitmapAsset *pigeonResult = [[FGMPlatformBitmapAsset alloc] init]; ++ (instancetype)makeWithName:(NSString *)name + pkg:(nullable NSString *)pkg { + FGMPlatformBitmapAsset* pigeonResult = [[FGMPlatformBitmapAsset alloc] init]; pigeonResult.name = name; pigeonResult.pkg = pkg; return pigeonResult; @@ -1624,9 +1656,9 @@ + (nullable FGMPlatformBitmapAsset *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapAssetImage + (instancetype)makeWithName:(NSString *)name - scale:(double)scale - size:(nullable FGMPlatformSize *)size { - FGMPlatformBitmapAssetImage *pigeonResult = [[FGMPlatformBitmapAssetImage alloc] init]; + scale:(double )scale + size:(nullable FGMPlatformSize *)size { + FGMPlatformBitmapAssetImage* pigeonResult = [[FGMPlatformBitmapAssetImage alloc] init]; pigeonResult.name = name; pigeonResult.scale = scale; pigeonResult.size = size; @@ -1653,11 +1685,11 @@ + (nullable FGMPlatformBitmapAssetImage *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapAssetMap + (instancetype)makeWithAssetName:(NSString *)assetName - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double)imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height { - FGMPlatformBitmapAssetMap *pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init]; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double )imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height { + FGMPlatformBitmapAssetMap* pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init]; pigeonResult.assetName = assetName; pigeonResult.bitmapScaling = bitmapScaling; pigeonResult.imagePixelRatio = imagePixelRatio; @@ -1668,8 +1700,7 @@ + (instancetype)makeWithAssetName:(NSString *)assetName + (FGMPlatformBitmapAssetMap *)fromList:(NSArray *)list { FGMPlatformBitmapAssetMap *pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init]; pigeonResult.assetName = GetNullableObjectAtIndex(list, 0); - FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling = - GetNullableObjectAtIndex(list, 1); + FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling = GetNullableObjectAtIndex(list, 1); pigeonResult.bitmapScaling = boxedFGMPlatformMapBitmapScaling.value; pigeonResult.imagePixelRatio = [GetNullableObjectAtIndex(list, 2) doubleValue]; pigeonResult.width = GetNullableObjectAtIndex(list, 3); @@ -1692,11 +1723,11 @@ + (nullable FGMPlatformBitmapAssetMap *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapBytesMap + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double)imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height { - FGMPlatformBitmapBytesMap *pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init]; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double )imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height { + FGMPlatformBitmapBytesMap* pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init]; pigeonResult.byteData = byteData; pigeonResult.bitmapScaling = bitmapScaling; pigeonResult.imagePixelRatio = imagePixelRatio; @@ -1707,8 +1738,7 @@ + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData + (FGMPlatformBitmapBytesMap *)fromList:(NSArray *)list { FGMPlatformBitmapBytesMap *pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init]; pigeonResult.byteData = GetNullableObjectAtIndex(list, 0); - FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling = - GetNullableObjectAtIndex(list, 1); + FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling = GetNullableObjectAtIndex(list, 1); pigeonResult.bitmapScaling = boxedFGMPlatformMapBitmapScaling.value; pigeonResult.imagePixelRatio = [GetNullableObjectAtIndex(list, 2) doubleValue]; pigeonResult.width = GetNullableObjectAtIndex(list, 3); @@ -1736,111 +1766,105 @@ - (nullable id)readValueOfType:(UInt8)type { switch (type) { case 129: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil - ? nil - : [[FGMPlatformMapTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformMapTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 130: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil - ? nil - : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 131: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil - : [[FGMPlatformPatternItemTypeBox alloc] - initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformPatternItemTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 132: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil - : [[FGMPlatformMapBitmapScalingBox alloc] - initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformMapBitmapScalingBox alloc] initWithValue:[enumAsNumber integerValue]]; } - case 133: + case 133: return [FGMPlatformCameraPosition fromList:[self readValue]]; - case 134: + case 134: return [FGMPlatformCameraUpdate fromList:[self readValue]]; - case 135: + case 135: return [FGMPlatformCameraUpdateNewCameraPosition fromList:[self readValue]]; - case 136: + case 136: return [FGMPlatformCameraUpdateNewLatLng fromList:[self readValue]]; - case 137: + case 137: return [FGMPlatformCameraUpdateNewLatLngBounds fromList:[self readValue]]; - case 138: + case 138: return [FGMPlatformCameraUpdateNewLatLngZoom fromList:[self readValue]]; - case 139: + case 139: return [FGMPlatformCameraUpdateScrollBy fromList:[self readValue]]; - case 140: + case 140: return [FGMPlatformCameraUpdateZoomBy fromList:[self readValue]]; - case 141: + case 141: return [FGMPlatformCameraUpdateZoom fromList:[self readValue]]; - case 142: + case 142: return [FGMPlatformCameraUpdateZoomTo fromList:[self readValue]]; - case 143: + case 143: return [FGMPlatformCircle fromList:[self readValue]]; - case 144: + case 144: return [FGMPlatformHeatmap fromList:[self readValue]]; - case 145: + case 145: return [FGMPlatformHeatmapGradient fromList:[self readValue]]; - case 146: + case 146: return [FGMPlatformWeightedLatLng fromList:[self readValue]]; - case 147: + case 147: return [FGMPlatformInfoWindow fromList:[self readValue]]; - case 148: + case 148: return [FGMPlatformCluster fromList:[self readValue]]; - case 149: + case 149: return [FGMPlatformClusterManager fromList:[self readValue]]; - case 150: + case 150: return [FGMPlatformMarker fromList:[self readValue]]; - case 151: + case 151: + return [FGMPlatformPointOfInterest fromList:[self readValue]]; + case 152: return [FGMPlatformPolygon fromList:[self readValue]]; - case 152: + case 153: return [FGMPlatformPolyline fromList:[self readValue]]; - case 153: + case 154: return [FGMPlatformPatternItem fromList:[self readValue]]; - case 154: + case 155: return [FGMPlatformTile fromList:[self readValue]]; - case 155: + case 156: return [FGMPlatformTileOverlay fromList:[self readValue]]; - case 156: + case 157: return [FGMPlatformEdgeInsets fromList:[self readValue]]; - case 157: + case 158: return [FGMPlatformLatLng fromList:[self readValue]]; - case 158: + case 159: return [FGMPlatformLatLngBounds fromList:[self readValue]]; - case 159: + case 160: return [FGMPlatformCameraTargetBounds fromList:[self readValue]]; - case 160: + case 161: return [FGMPlatformGroundOverlay fromList:[self readValue]]; - case 161: + case 162: return [FGMPlatformMapViewCreationParams fromList:[self readValue]]; - case 162: + case 163: return [FGMPlatformMapConfiguration fromList:[self readValue]]; - case 163: + case 164: return [FGMPlatformPoint fromList:[self readValue]]; - case 164: + case 165: return [FGMPlatformSize fromList:[self readValue]]; - case 165: + case 166: return [FGMPlatformColor fromList:[self readValue]]; - case 166: + case 167: return [FGMPlatformTileLayer fromList:[self readValue]]; - case 167: + case 168: return [FGMPlatformZoomRange fromList:[self readValue]]; - case 168: + case 169: return [FGMPlatformBitmap fromList:[self readValue]]; - case 169: + case 170: return [FGMPlatformBitmapDefaultMarker fromList:[self readValue]]; - case 170: + case 171: return [FGMPlatformBitmapBytes fromList:[self readValue]]; - case 171: + case 172: return [FGMPlatformBitmapAsset fromList:[self readValue]]; - case 172: + case 173: return [FGMPlatformBitmapAssetImage fromList:[self readValue]]; - case 173: + case 174: return [FGMPlatformBitmapAssetMap fromList:[self readValue]]; - case 174: + case 175: return [FGMPlatformBitmapBytesMap fromList:[self readValue]]; default: return [super readValueOfType:type]; @@ -1922,78 +1946,81 @@ - (void)writeValue:(id)value { } else if ([value isKindOfClass:[FGMPlatformMarker class]]) { [self writeByte:150]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) { + } else if ([value isKindOfClass:[FGMPlatformPointOfInterest class]]) { [self writeByte:151]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) { + } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) { [self writeByte:152]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) { + } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) { [self writeByte:153]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTile class]]) { + } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) { [self writeByte:154]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) { + } else if ([value isKindOfClass:[FGMPlatformTile class]]) { [self writeByte:155]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) { + } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) { [self writeByte:156]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) { + } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) { [self writeByte:157]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) { + } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) { [self writeByte:158]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) { + } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) { [self writeByte:159]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) { [self writeByte:160]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) { + } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) { [self writeByte:161]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) { + } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) { [self writeByte:162]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPoint class]]) { + } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) { [self writeByte:163]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformSize class]]) { + } else if ([value isKindOfClass:[FGMPlatformPoint class]]) { [self writeByte:164]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformColor class]]) { + } else if ([value isKindOfClass:[FGMPlatformSize class]]) { [self writeByte:165]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) { + } else if ([value isKindOfClass:[FGMPlatformColor class]]) { [self writeByte:166]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) { + } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) { [self writeByte:167]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) { + } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) { [self writeByte:168]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) { [self writeByte:169]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) { [self writeByte:170]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) { [self writeByte:171]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) { [self writeByte:172]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) { [self writeByte:173]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) { [self writeByte:174]; [self writeValue:[value toList]]; + } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) { + [self writeByte:175]; + [self writeValue:[value toList]]; } else { [super writeValue:value]; } @@ -2015,8 +2042,7 @@ - (FlutterStandardReader *)readerWithData:(NSData *)data { static FlutterStandardMessageCodec *sSharedObject = nil; static dispatch_once_t sPred = 0; dispatch_once(&sPred, ^{ - FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter *readerWriter = - [[FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter alloc] init]; + FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter *readerWriter = [[FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter alloc] init]; sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter]; }); return sSharedObject; @@ -2025,24 +2051,17 @@ void SetUpFGMMapsApi(id binaryMessenger, NSObject binaryMessenger, - NSObject *api, NSString *messageChannelSuffix) { - messageChannelSuffix = messageChannelSuffix.length > 0 - ? [NSString stringWithFormat:@".%@", messageChannelSuffix] - : @""; +void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObject *api, NSString *messageChannelSuffix) { + messageChannelSuffix = messageChannelSuffix.length > 0 ? [NSString stringWithFormat: @".%@", messageChannelSuffix] : @""; /// Returns once the map instance is available. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(waitForMapWithError:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(waitForMapWithError:)", api); + NSCAssert([api respondsToSelector:@selector(waitForMapWithError:)], @"FGMMapsApi api (%@) doesn't respond to @selector(waitForMapWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; [api waitForMapWithError:&error]; @@ -2057,18 +2076,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, /// Only non-null configuration values will result in updates; options with /// null values will remain unchanged. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.updateMapConfiguration", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(updateWithMapConfiguration:error:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(updateWithMapConfiguration:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateWithMapConfiguration:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateWithMapConfiguration:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformMapConfiguration *arg_configuration = GetNullableObjectAtIndex(args, 0); @@ -2082,29 +2096,20 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Updates the set of circles on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateCirclesByAdding:changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateCirclesByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateCirclesByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateCirclesByAdding:changing:removing:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateCirclesByAdding:arg_toAdd - changing:arg_toChange - removing:arg_idsToRemove - error:&error]; + [api updateCirclesByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2113,28 +2118,20 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Updates the set of heatmaps on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.updateHeatmaps", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateHeatmapsByAdding:changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateHeatmapsByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateHeatmapsByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateHeatmapsByAdding:changing:removing:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateHeatmapsByAdding:arg_toAdd - changing:arg_toChange - removing:arg_idsToRemove - error:&error]; + [api updateHeatmapsByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2143,18 +2140,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Updates the set of custer managers for clusters on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.updateClusterManagers", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateClusterManagersByAdding:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateClusterManagersByAdding:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateClusterManagersByAdding:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateClusterManagersByAdding:removing:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); @@ -2169,29 +2161,20 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Updates the set of markers on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateMarkersByAdding:changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateMarkersByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateMarkersByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateMarkersByAdding:changing:removing:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateMarkersByAdding:arg_toAdd - changing:arg_toChange - removing:arg_idsToRemove - error:&error]; + [api updateMarkersByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2200,28 +2183,20 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Updates the set of polygonss on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.updatePolygons", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updatePolygonsByAdding:changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updatePolygonsByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updatePolygonsByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updatePolygonsByAdding:changing:removing:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updatePolygonsByAdding:arg_toAdd - changing:arg_toChange - removing:arg_idsToRemove - error:&error]; + [api updatePolygonsByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2230,29 +2205,20 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Updates the set of polylines on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.updatePolylines", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updatePolylinesByAdding: - changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updatePolylinesByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updatePolylinesByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updatePolylinesByAdding:changing:removing:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updatePolylinesByAdding:arg_toAdd - changing:arg_toChange - removing:arg_idsToRemove - error:&error]; + [api updatePolylinesByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2261,29 +2227,20 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Updates the set of tile overlays on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.updateTileOverlays", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateTileOverlaysByAdding: - changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateTileOverlaysByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateTileOverlaysByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateTileOverlaysByAdding:changing:removing:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateTileOverlaysByAdding:arg_toAdd - changing:arg_toChange - removing:arg_idsToRemove - error:&error]; + [api updateTileOverlaysByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2292,29 +2249,20 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Updates the set of ground overlays on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.updateGroundOverlays", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateGroundOverlaysByAdding: - changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateGroundOverlaysByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateGroundOverlaysByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateGroundOverlaysByAdding:changing:removing:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateGroundOverlaysByAdding:arg_toAdd - changing:arg_toChange - removing:arg_idsToRemove - error:&error]; + [api updateGroundOverlaysByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2323,18 +2271,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Gets the screen coordinate for the given map location. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.getScreenCoordinate", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(screenCoordinatesForLatLng:error:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(screenCoordinatesForLatLng:error:)", - api); + NSCAssert([api respondsToSelector:@selector(screenCoordinatesForLatLng:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(screenCoordinatesForLatLng:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformLatLng *arg_latLng = GetNullableObjectAtIndex(args, 0); @@ -2348,25 +2291,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Gets the map location for the given screen coordinate. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName: - [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(latLngForScreenCoordinate:error:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(latLngForScreenCoordinate:error:)", - api); + NSCAssert([api respondsToSelector:@selector(latLngForScreenCoordinate:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(latLngForScreenCoordinate:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformPoint *arg_screenCoordinate = GetNullableObjectAtIndex(args, 0); FlutterError *error; - FGMPlatformLatLng *output = [api latLngForScreenCoordinate:arg_screenCoordinate - error:&error]; + FGMPlatformLatLng *output = [api latLngForScreenCoordinate:arg_screenCoordinate error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -2375,16 +2311,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Gets the map region currently displayed on the map. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.getVisibleRegion", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(visibleMapRegion:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(visibleMapRegion:)", api); + NSCAssert([api respondsToSelector:@selector(visibleMapRegion:)], @"FGMMapsApi api (%@) doesn't respond to @selector(visibleMapRegion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; FGMPlatformLatLngBounds *output = [api visibleMapRegion:&error]; @@ -2397,18 +2330,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(moveCameraWithUpdate:error:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(moveCameraWithUpdate:error:)", - api); + NSCAssert([api respondsToSelector:@selector(moveCameraWithUpdate:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(moveCameraWithUpdate:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformCameraUpdate *arg_cameraUpdate = GetNullableObjectAtIndex(args, 0); @@ -2423,27 +2351,19 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, /// Moves the camera according to [cameraUpdate], animating the update using a /// duration in milliseconds if provided. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(animateCameraWithUpdate:duration:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(animateCameraWithUpdate:duration:error:)", - api); + NSCAssert([api respondsToSelector:@selector(animateCameraWithUpdate:duration:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(animateCameraWithUpdate:duration:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformCameraUpdate *arg_cameraUpdate = GetNullableObjectAtIndex(args, 0); NSNumber *arg_durationMilliseconds = GetNullableObjectAtIndex(args, 1); FlutterError *error; - [api animateCameraWithUpdate:arg_cameraUpdate - duration:arg_durationMilliseconds - error:&error]; + [api animateCameraWithUpdate:arg_cameraUpdate duration:arg_durationMilliseconds error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2452,17 +2372,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Gets the current map zoom level. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(currentZoomLevel:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(currentZoomLevel:)", api); + NSCAssert([api respondsToSelector:@selector(currentZoomLevel:)], @"FGMMapsApi api (%@) doesn't respond to @selector(currentZoomLevel:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api currentZoomLevel:&error]; @@ -2474,18 +2390,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Show the info window for the marker with the given ID. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.showInfoWindow", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(showInfoWindowForMarkerWithIdentifier:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(showInfoWindowForMarkerWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(showInfoWindowForMarkerWithIdentifier:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(showInfoWindowForMarkerWithIdentifier:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_markerId = GetNullableObjectAtIndex(args, 0); @@ -2499,18 +2410,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Hide the info window for the marker with the given ID. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.hideInfoWindow", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(hideInfoWindowForMarkerWithIdentifier:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(hideInfoWindowForMarkerWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(hideInfoWindowForMarkerWithIdentifier:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(hideInfoWindowForMarkerWithIdentifier:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_markerId = GetNullableObjectAtIndex(args, 0); @@ -2525,25 +2431,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, /// Returns true if the marker with the given ID is currently displaying its /// info window. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.isInfoWindowShown", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier: - error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(isShowingInfoWindowForMarkerWithIdentifier:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_markerId = GetNullableObjectAtIndex(args, 0); FlutterError *error; - NSNumber *output = [api isShowingInfoWindowForMarkerWithIdentifier:arg_markerId - error:&error]; + NSNumber *output = [api isShowingInfoWindowForMarkerWithIdentifier:arg_markerId error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -2556,17 +2455,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, /// If there was an error setting the style, such as an invalid style string, /// returns the error message. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName: - [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(setStyle:error:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(setStyle:error:)", api); + NSCAssert([api respondsToSelector:@selector(setStyle:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(setStyle:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_style = GetNullableObjectAtIndex(args, 0); @@ -2584,16 +2479,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, /// This allows checking asynchronously for initial style failures, as there /// is no way to return failures from map initialization. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.getLastStyleError", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(lastStyleError:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(lastStyleError:)", api); + NSCAssert([api respondsToSelector:@selector(lastStyleError:)], @"FGMMapsApi api (%@) doesn't respond to @selector(lastStyleError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSString *output = [api lastStyleError:&error]; @@ -2605,18 +2497,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Clears the cache of tiles previously requseted from the tile provider. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.clearTileCache", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(clearTileCacheForOverlayWithIdentifier:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(clearTileCacheForOverlayWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(clearTileCacheForOverlayWithIdentifier:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(clearTileCacheForOverlayWithIdentifier:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_tileOverlayId = GetNullableObjectAtIndex(args, 0); @@ -2630,17 +2517,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Takes a snapshot of the map and returns its image data. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(takeSnapshotWithError:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(takeSnapshotWithError:)", api); + NSCAssert([api respondsToSelector:@selector(takeSnapshotWithError:)], @"FGMMapsApi api (%@) doesn't respond to @selector(takeSnapshotWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; FlutterStandardTypedData *output = [api takeSnapshotWithError:&error]; @@ -2661,450 +2544,354 @@ @implementation FGMMapsCallbackApi - (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger { return [self initWithBinaryMessenger:binaryMessenger messageChannelSuffix:@""]; } -- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger - messageChannelSuffix:(nullable NSString *)messageChannelSuffix { +- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger messageChannelSuffix:(nullable NSString*)messageChannelSuffix{ self = [self init]; if (self) { _binaryMessenger = binaryMessenger; - _messageChannelSuffix = [messageChannelSuffix length] == 0 - ? @"" - : [NSString stringWithFormat:@".%@", messageChannelSuffix]; + _messageChannelSuffix = [messageChannelSuffix length] == 0 ? @"" : [NSString stringWithFormat: @".%@", messageChannelSuffix]; } return self; } - (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:nil - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)arg_cameraPosition - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:nil reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)arg_cameraPosition completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[ arg_cameraPosition ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[arg_cameraPosition ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; } - (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:nil reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapAtPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:nil - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapAtPosition:(FGMPlatformLatLng *)arg_position - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[arg_position ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didLongPressAtPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[ arg_position ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didLongPressAtPosition:(FGMPlatformLatLng *)arg_position - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[arg_position ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapMarkerWithIdentifier:(NSString *)arg_markerId completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[ arg_position ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapMarkerWithIdentifier:(NSString *)arg_markerId - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[arg_markerId ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didStartDragForMarkerWithIdentifier:(NSString *)arg_markerId atPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[ arg_markerId ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didStartDragForMarkerWithIdentifier:(NSString *)arg_markerId - atPosition:(FGMPlatformLatLng *)arg_position - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat: - @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[arg_markerId ?: [NSNull null], arg_position ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didDragMarkerWithIdentifier:(NSString *)arg_markerId atPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didDragMarkerWithIdentifier:(NSString *)arg_markerId - atPosition:(FGMPlatformLatLng *)arg_position - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[arg_markerId ?: [NSNull null], arg_position ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didEndDragForMarkerWithIdentifier:(NSString *)arg_markerId atPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didEndDragForMarkerWithIdentifier:(NSString *)arg_markerId - atPosition:(FGMPlatformLatLng *)arg_position - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat: - @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[arg_markerId ?: [NSNull null], arg_position ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)arg_markerId completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)arg_markerId - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat: - @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[arg_markerId ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapCircleWithIdentifier:(NSString *)arg_circleId completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[ arg_markerId ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapCircleWithIdentifier:(NSString *)arg_circleId - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[arg_circleId ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapCluster:(FGMPlatformCluster *)arg_cluster completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[ arg_circleId ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapCluster:(FGMPlatformCluster *)arg_cluster - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[arg_cluster ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapPolygonWithIdentifier:(NSString *)arg_polygonId completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[ arg_cluster ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapPolygonWithIdentifier:(NSString *)arg_polygonId - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[arg_polygonId ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapPolylineWithIdentifier:(NSString *)arg_polylineId completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[ arg_polygonId ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapPolylineWithIdentifier:(NSString *)arg_polylineId - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[arg_polylineId ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapGroundOverlayWithIdentifier:(NSString *)arg_groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[ arg_polylineId ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapGroundOverlayWithIdentifier:(NSString *)arg_groundOverlayId - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat: - @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[arg_groundOverlayId ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapPointOfInterest:(FGMPlatformPointOfInterest *)arg_poi completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[ arg_groundOverlayId ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId - location:(FGMPlatformPoint *)arg_location - zoom:(NSInteger)arg_zoom - completion:(void (^)(FGMPlatformTile *_Nullable, - FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat: - @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[arg_poi ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId location:(FGMPlatformPoint *)arg_location zoom:(NSInteger)arg_zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[ - arg_tileOverlayId ?: [NSNull null], arg_location ?: [NSNull null], @(arg_zoom) - ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion(nil, [FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - FGMPlatformTile *output = reply[0] == [NSNull null] ? nil : reply[0]; - completion(output, nil); - } - } else { - completion(nil, createConnectionError(channelName)); - } - }]; -} -@end - -void SetUpFGMMapsPlatformViewApi(id binaryMessenger, - NSObject *api) { + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[arg_tileOverlayId ?: [NSNull null], arg_location ?: [NSNull null], @(arg_zoom)] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion(nil, [FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + FGMPlatformTile *output = reply[0] == [NSNull null] ? nil : reply[0]; + completion(output, nil); + } + } else { + completion(nil, createConnectionError(channelName)); + } + }]; +} +@end + +void SetUpFGMMapsPlatformViewApi(id binaryMessenger, NSObject *api) { SetUpFGMMapsPlatformViewApiWithSuffix(binaryMessenger, api, @""); } -void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, - NSObject *api, - NSString *messageChannelSuffix) { - messageChannelSuffix = messageChannelSuffix.length > 0 - ? [NSString stringWithFormat:@".%@", messageChannelSuffix] - : @""; +void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, NSObject *api, NSString *messageChannelSuffix) { + messageChannelSuffix = messageChannelSuffix.length > 0 ? [NSString stringWithFormat: @".%@", messageChannelSuffix] : @""; { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsPlatformViewApi.createView", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(createViewType:error:)], - @"FGMMapsPlatformViewApi api (%@) doesn't respond to @selector(createViewType:error:)", - api); + NSCAssert([api respondsToSelector:@selector(createViewType:error:)], @"FGMMapsPlatformViewApi api (%@) doesn't respond to @selector(createViewType:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformMapViewCreationParams *arg_type = GetNullableObjectAtIndex(args, 0); @@ -3117,30 +2904,20 @@ void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMess } } } -void SetUpFGMMapsInspectorApi(id binaryMessenger, - NSObject *api) { +void SetUpFGMMapsInspectorApi(id binaryMessenger, NSObject *api) { SetUpFGMMapsInspectorApiWithSuffix(binaryMessenger, api, @""); } -void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, - NSObject *api, - NSString *messageChannelSuffix) { - messageChannelSuffix = messageChannelSuffix.length > 0 - ? [NSString stringWithFormat:@".%@", messageChannelSuffix] - : @""; +void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, NSObject *api, NSString *messageChannelSuffix) { + messageChannelSuffix = messageChannelSuffix.length > 0 ? [NSString stringWithFormat: @".%@", messageChannelSuffix] : @""; { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.areBuildingsEnabled", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areBuildingsEnabledWithError:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(areBuildingsEnabledWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(areBuildingsEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areBuildingsEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areBuildingsEnabledWithError:&error]; @@ -3151,18 +2928,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.areRotateGesturesEnabled", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areRotateGesturesEnabledWithError:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(areRotateGesturesEnabledWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(areRotateGesturesEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areRotateGesturesEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areRotateGesturesEnabledWithError:&error]; @@ -3173,18 +2945,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.areScrollGesturesEnabled", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areScrollGesturesEnabledWithError:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(areScrollGesturesEnabledWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(areScrollGesturesEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areScrollGesturesEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areScrollGesturesEnabledWithError:&error]; @@ -3195,18 +2962,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.areTiltGesturesEnabled", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areTiltGesturesEnabledWithError:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(areTiltGesturesEnabledWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(areTiltGesturesEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areTiltGesturesEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areTiltGesturesEnabledWithError:&error]; @@ -3217,18 +2979,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.areZoomGesturesEnabled", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areZoomGesturesEnabledWithError:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(areZoomGesturesEnabledWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(areZoomGesturesEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areZoomGesturesEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areZoomGesturesEnabledWithError:&error]; @@ -3239,18 +2996,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.isCompassEnabled", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(isCompassEnabledWithError:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isCompassEnabledWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(isCompassEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isCompassEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isCompassEnabledWithError:&error]; @@ -3261,18 +3013,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.isMyLocationButtonEnabled", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isMyLocationButtonEnabledWithError:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(isMyLocationButtonEnabledWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(isMyLocationButtonEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isMyLocationButtonEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isMyLocationButtonEnabledWithError:&error]; @@ -3283,18 +3030,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.isTrafficEnabled", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(isTrafficEnabledWithError:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isTrafficEnabledWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(isTrafficEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isTrafficEnabledWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isTrafficEnabledWithError:&error]; @@ -3305,24 +3047,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.getTileOverlayInfo", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(tileOverlayWithIdentifier:error:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(tileOverlayWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(tileOverlayWithIdentifier:error:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(tileOverlayWithIdentifier:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_tileOverlayId = GetNullableObjectAtIndex(args, 0); FlutterError *error; - FGMPlatformTileLayer *output = [api tileOverlayWithIdentifier:arg_tileOverlayId - error:&error]; + FGMPlatformTileLayer *output = [api tileOverlayWithIdentifier:arg_tileOverlayId error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -3330,24 +3066,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.getGroundOverlayInfo", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(groundOverlayWithIdentifier:error:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(groundOverlayWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(groundOverlayWithIdentifier:error:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(groundOverlayWithIdentifier:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_groundOverlayId = GetNullableObjectAtIndex(args, 0); FlutterError *error; - FGMPlatformGroundOverlay *output = [api groundOverlayWithIdentifier:arg_groundOverlayId - error:&error]; + FGMPlatformGroundOverlay *output = [api groundOverlayWithIdentifier:arg_groundOverlayId error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -3355,18 +3085,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.getHeatmapInfo", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(heatmapWithIdentifier:error:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(heatmapWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(heatmapWithIdentifier:error:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(heatmapWithIdentifier:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_heatmapId = GetNullableObjectAtIndex(args, 0); @@ -3379,16 +3104,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.getZoomRange", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(zoomRange:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(zoomRange:)", api); + NSCAssert([api respondsToSelector:@selector(zoomRange:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(zoomRange:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; FGMPlatformZoomRange *output = [api zoomRange:&error]; @@ -3399,24 +3121,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.getClusters", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(clustersWithIdentifier:error:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to " - @"@selector(clustersWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(clustersWithIdentifier:error:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(clustersWithIdentifier:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_clusterManagerId = GetNullableObjectAtIndex(args, 0); FlutterError *error; - NSArray *output = [api clustersWithIdentifier:arg_clusterManagerId - error:&error]; + NSArray *output = [api clustersWithIdentifier:arg_clusterManagerId error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -3424,16 +3140,13 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsInspectorApi.getCameraPosition", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(cameraPosition:)], - @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(cameraPosition:)", api); + NSCAssert([api respondsToSelector:@selector(cameraPosition:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(cameraPosition:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; FGMPlatformCameraPosition *output = [api cameraPosition:&error]; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h index db11f425c37c..e52fe5cfa423 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h @@ -1,10 +1,10 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.5), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon -#import +@import Foundation; @protocol FlutterBinaryMessenger; @protocol FlutterMessageCodec; @@ -84,6 +84,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @class FGMPlatformCluster; @class FGMPlatformClusterManager; @class FGMPlatformMarker; +@class FGMPlatformPointOfInterest; @class FGMPlatformPolygon; @class FGMPlatformPolyline; @class FGMPlatformPatternItem; @@ -113,26 +114,26 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @interface FGMPlatformCameraPosition : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBearing:(double)bearing - target:(FGMPlatformLatLng *)target - tilt:(double)tilt - zoom:(double)zoom; -@property(nonatomic, assign) double bearing; -@property(nonatomic, strong) FGMPlatformLatLng *target; -@property(nonatomic, assign) double tilt; -@property(nonatomic, assign) double zoom; ++ (instancetype)makeWithBearing:(double )bearing + target:(FGMPlatformLatLng *)target + tilt:(double )tilt + zoom:(double )zoom; +@property(nonatomic, assign) double bearing; +@property(nonatomic, strong) FGMPlatformLatLng * target; +@property(nonatomic, assign) double tilt; +@property(nonatomic, assign) double zoom; @end /// Pigeon representation of a CameraUpdate. @interface FGMPlatformCameraUpdate : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithCameraUpdate:(id)cameraUpdate; ++ (instancetype)makeWithCameraUpdate:(id )cameraUpdate; /// This Object must be one of the classes below prefixed with /// PlatformCameraUpdate. Each such class represents a different type of /// camera update, and each holds a different set of data, preventing the /// use of a single unified class. -@property(nonatomic, strong) id cameraUpdate; +@property(nonatomic, strong) id cameraUpdate; @end /// Pigeon equivalent of NewCameraPosition @@ -140,7 +141,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition; -@property(nonatomic, strong) FGMPlatformCameraPosition *cameraPosition; +@property(nonatomic, strong) FGMPlatformCameraPosition * cameraPosition; @end /// Pigeon equivalent of NewLatLng @@ -148,83 +149,87 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng; -@property(nonatomic, strong) FGMPlatformLatLng *latLng; +@property(nonatomic, strong) FGMPlatformLatLng * latLng; @end /// Pigeon equivalent of NewLatLngBounds @interface FGMPlatformCameraUpdateNewLatLngBounds : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding; -@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds; -@property(nonatomic, assign) double padding; ++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds + padding:(double )padding; +@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, assign) double padding; @end /// Pigeon equivalent of NewLatLngZoom @interface FGMPlatformCameraUpdateNewLatLngZoom : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom; -@property(nonatomic, strong) FGMPlatformLatLng *latLng; -@property(nonatomic, assign) double zoom; ++ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng + zoom:(double )zoom; +@property(nonatomic, strong) FGMPlatformLatLng * latLng; +@property(nonatomic, assign) double zoom; @end /// Pigeon equivalent of ScrollBy @interface FGMPlatformCameraUpdateScrollBy : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithDx:(double)dx dy:(double)dy; -@property(nonatomic, assign) double dx; -@property(nonatomic, assign) double dy; ++ (instancetype)makeWithDx:(double )dx + dy:(double )dy; +@property(nonatomic, assign) double dx; +@property(nonatomic, assign) double dy; @end /// Pigeon equivalent of ZoomBy @interface FGMPlatformCameraUpdateZoomBy : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus; -@property(nonatomic, assign) double amount; -@property(nonatomic, strong, nullable) FGMPlatformPoint *focus; ++ (instancetype)makeWithAmount:(double )amount + focus:(nullable FGMPlatformPoint *)focus; +@property(nonatomic, assign) double amount; +@property(nonatomic, strong, nullable) FGMPlatformPoint * focus; @end /// Pigeon equivalent of ZoomIn/ZoomOut @interface FGMPlatformCameraUpdateZoom : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithOut:(BOOL)out; -@property(nonatomic, assign) BOOL out; ++ (instancetype)makeWithOut:(BOOL )out; +@property(nonatomic, assign) BOOL out; @end /// Pigeon equivalent of ZoomTo @interface FGMPlatformCameraUpdateZoomTo : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithZoom:(double)zoom; -@property(nonatomic, assign) double zoom; ++ (instancetype)makeWithZoom:(double )zoom; +@property(nonatomic, assign) double zoom; @end /// Pigeon equivalent of the Circle class. @interface FGMPlatformCircle : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents - fillColor:(FGMPlatformColor *)fillColor - strokeColor:(FGMPlatformColor *)strokeColor - visible:(BOOL)visible - strokeWidth:(NSInteger)strokeWidth - zIndex:(double)zIndex - center:(FGMPlatformLatLng *)center - radius:(double)radius - circleId:(NSString *)circleId; -@property(nonatomic, assign) BOOL consumeTapEvents; -@property(nonatomic, strong) FGMPlatformColor *fillColor; -@property(nonatomic, strong) FGMPlatformColor *strokeColor; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger strokeWidth; -@property(nonatomic, assign) double zIndex; -@property(nonatomic, strong) FGMPlatformLatLng *center; -@property(nonatomic, assign) double radius; -@property(nonatomic, copy) NSString *circleId; ++ (instancetype)makeWithConsumeTapEvents:(BOOL )consumeTapEvents + fillColor:(FGMPlatformColor *)fillColor + strokeColor:(FGMPlatformColor *)strokeColor + visible:(BOOL )visible + strokeWidth:(NSInteger )strokeWidth + zIndex:(double )zIndex + center:(FGMPlatformLatLng *)center + radius:(double )radius + circleId:(NSString *)circleId; +@property(nonatomic, assign) BOOL consumeTapEvents; +@property(nonatomic, strong) FGMPlatformColor * fillColor; +@property(nonatomic, strong) FGMPlatformColor * strokeColor; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger strokeWidth; +@property(nonatomic, assign) double zIndex; +@property(nonatomic, strong) FGMPlatformLatLng * center; +@property(nonatomic, assign) double radius; +@property(nonatomic, copy) NSString * circleId; @end /// Pigeon equivalent of the Heatmap class. @@ -232,19 +237,19 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithHeatmapId:(NSString *)heatmapId - data:(NSArray *)data - gradient:(nullable FGMPlatformHeatmapGradient *)gradient - opacity:(double)opacity - radius:(NSInteger)radius - minimumZoomIntensity:(NSInteger)minimumZoomIntensity - maximumZoomIntensity:(NSInteger)maximumZoomIntensity; -@property(nonatomic, copy) NSString *heatmapId; -@property(nonatomic, copy) NSArray *data; -@property(nonatomic, strong, nullable) FGMPlatformHeatmapGradient *gradient; -@property(nonatomic, assign) double opacity; -@property(nonatomic, assign) NSInteger radius; -@property(nonatomic, assign) NSInteger minimumZoomIntensity; -@property(nonatomic, assign) NSInteger maximumZoomIntensity; + data:(NSArray *)data + gradient:(nullable FGMPlatformHeatmapGradient *)gradient + opacity:(double )opacity + radius:(NSInteger )radius + minimumZoomIntensity:(NSInteger )minimumZoomIntensity + maximumZoomIntensity:(NSInteger )maximumZoomIntensity; +@property(nonatomic, copy) NSString * heatmapId; +@property(nonatomic, copy) NSArray * data; +@property(nonatomic, strong, nullable) FGMPlatformHeatmapGradient * gradient; +@property(nonatomic, assign) double opacity; +@property(nonatomic, assign) NSInteger radius; +@property(nonatomic, assign) NSInteger minimumZoomIntensity; +@property(nonatomic, assign) NSInteger maximumZoomIntensity; @end /// Pigeon equivalent of the HeatmapGradient class. @@ -256,20 +261,21 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithColors:(NSArray *)colors - startPoints:(NSArray *)startPoints - colorMapSize:(NSInteger)colorMapSize; -@property(nonatomic, copy) NSArray *colors; -@property(nonatomic, copy) NSArray *startPoints; -@property(nonatomic, assign) NSInteger colorMapSize; + startPoints:(NSArray *)startPoints + colorMapSize:(NSInteger )colorMapSize; +@property(nonatomic, copy) NSArray * colors; +@property(nonatomic, copy) NSArray * startPoints; +@property(nonatomic, assign) NSInteger colorMapSize; @end /// Pigeon equivalent of the WeightedLatLng class. @interface FGMPlatformWeightedLatLng : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point weight:(double)weight; -@property(nonatomic, strong) FGMPlatformLatLng *point; -@property(nonatomic, assign) double weight; ++ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point + weight:(double )weight; +@property(nonatomic, strong) FGMPlatformLatLng * point; +@property(nonatomic, assign) double weight; @end /// Pigeon equivalent of the InfoWindow class. @@ -277,11 +283,11 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithTitle:(nullable NSString *)title - snippet:(nullable NSString *)snippet - anchor:(FGMPlatformPoint *)anchor; -@property(nonatomic, copy, nullable) NSString *title; -@property(nonatomic, copy, nullable) NSString *snippet; -@property(nonatomic, strong) FGMPlatformPoint *anchor; + snippet:(nullable NSString *)snippet + anchor:(FGMPlatformPoint *)anchor; +@property(nonatomic, copy, nullable) NSString * title; +@property(nonatomic, copy, nullable) NSString * snippet; +@property(nonatomic, strong) FGMPlatformPoint * anchor; @end /// Pigeon equivalent of Cluster. @@ -289,13 +295,13 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId - position:(FGMPlatformLatLng *)position - bounds:(FGMPlatformLatLngBounds *)bounds - markerIds:(NSArray *)markerIds; -@property(nonatomic, copy) NSString *clusterManagerId; -@property(nonatomic, strong) FGMPlatformLatLng *position; -@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds; -@property(nonatomic, copy) NSArray *markerIds; + position:(FGMPlatformLatLng *)position + bounds:(FGMPlatformLatLngBounds *)bounds + markerIds:(NSArray *)markerIds; +@property(nonatomic, copy) NSString * clusterManagerId; +@property(nonatomic, strong) FGMPlatformLatLng * position; +@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, copy) NSArray * markerIds; @end /// Pigeon equivalent of the ClusterManager class. @@ -303,39 +309,51 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithIdentifier:(NSString *)identifier; -@property(nonatomic, copy) NSString *identifier; +@property(nonatomic, copy) NSString * identifier; @end /// Pigeon equivalent of the Marker class. @interface FGMPlatformMarker : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAlpha:(double)alpha - anchor:(FGMPlatformPoint *)anchor - consumeTapEvents:(BOOL)consumeTapEvents - draggable:(BOOL)draggable - flat:(BOOL)flat - icon:(FGMPlatformBitmap *)icon - infoWindow:(FGMPlatformInfoWindow *)infoWindow - position:(FGMPlatformLatLng *)position - rotation:(double)rotation - visible:(BOOL)visible - zIndex:(NSInteger)zIndex - markerId:(NSString *)markerId - clusterManagerId:(nullable NSString *)clusterManagerId; -@property(nonatomic, assign) double alpha; -@property(nonatomic, strong) FGMPlatformPoint *anchor; -@property(nonatomic, assign) BOOL consumeTapEvents; -@property(nonatomic, assign) BOOL draggable; -@property(nonatomic, assign) BOOL flat; -@property(nonatomic, strong) FGMPlatformBitmap *icon; -@property(nonatomic, strong) FGMPlatformInfoWindow *infoWindow; -@property(nonatomic, strong) FGMPlatformLatLng *position; -@property(nonatomic, assign) double rotation; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, copy) NSString *markerId; -@property(nonatomic, copy, nullable) NSString *clusterManagerId; ++ (instancetype)makeWithAlpha:(double )alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL )consumeTapEvents + draggable:(BOOL )draggable + flat:(BOOL )flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double )rotation + visible:(BOOL )visible + zIndex:(NSInteger )zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId; +@property(nonatomic, assign) double alpha; +@property(nonatomic, strong) FGMPlatformPoint * anchor; +@property(nonatomic, assign) BOOL consumeTapEvents; +@property(nonatomic, assign) BOOL draggable; +@property(nonatomic, assign) BOOL flat; +@property(nonatomic, strong) FGMPlatformBitmap * icon; +@property(nonatomic, strong) FGMPlatformInfoWindow * infoWindow; +@property(nonatomic, strong) FGMPlatformLatLng * position; +@property(nonatomic, assign) double rotation; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, copy) NSString * markerId; +@property(nonatomic, copy, nullable) NSString * clusterManagerId; +@end + +/// Pigeon equivalent of the Point of Interest class. +@interface FGMPlatformPointOfInterest : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithPosition:(FGMPlatformLatLng *)position + name:(NSString *)name + placeId:(NSString *)placeId; +@property(nonatomic, strong) FGMPlatformLatLng * position; +@property(nonatomic, copy) NSString * name; +@property(nonatomic, copy) NSString * placeId; @end /// Pigeon equivalent of the Polygon class. @@ -343,25 +361,25 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithPolygonId:(NSString *)polygonId - consumesTapEvents:(BOOL)consumesTapEvents - fillColor:(FGMPlatformColor *)fillColor - geodesic:(BOOL)geodesic - points:(NSArray *)points - holes:(NSArray *> *)holes - visible:(BOOL)visible - strokeColor:(FGMPlatformColor *)strokeColor - strokeWidth:(NSInteger)strokeWidth - zIndex:(NSInteger)zIndex; -@property(nonatomic, copy) NSString *polygonId; -@property(nonatomic, assign) BOOL consumesTapEvents; -@property(nonatomic, strong) FGMPlatformColor *fillColor; -@property(nonatomic, assign) BOOL geodesic; -@property(nonatomic, copy) NSArray *points; -@property(nonatomic, copy) NSArray *> *holes; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, strong) FGMPlatformColor *strokeColor; -@property(nonatomic, assign) NSInteger strokeWidth; -@property(nonatomic, assign) NSInteger zIndex; + consumesTapEvents:(BOOL )consumesTapEvents + fillColor:(FGMPlatformColor *)fillColor + geodesic:(BOOL )geodesic + points:(NSArray *)points + holes:(NSArray *> *)holes + visible:(BOOL )visible + strokeColor:(FGMPlatformColor *)strokeColor + strokeWidth:(NSInteger )strokeWidth + zIndex:(NSInteger )zIndex; +@property(nonatomic, copy) NSString * polygonId; +@property(nonatomic, assign) BOOL consumesTapEvents; +@property(nonatomic, strong) FGMPlatformColor * fillColor; +@property(nonatomic, assign) BOOL geodesic; +@property(nonatomic, copy) NSArray * points; +@property(nonatomic, copy) NSArray *> * holes; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, strong) FGMPlatformColor * strokeColor; +@property(nonatomic, assign) NSInteger strokeWidth; +@property(nonatomic, assign) NSInteger zIndex; @end /// Pigeon equivalent of the Polyline class. @@ -369,48 +387,49 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithPolylineId:(NSString *)polylineId - consumesTapEvents:(BOOL)consumesTapEvents - color:(FGMPlatformColor *)color - geodesic:(BOOL)geodesic - jointType:(FGMPlatformJointType)jointType - patterns:(NSArray *)patterns - points:(NSArray *)points - visible:(BOOL)visible - width:(NSInteger)width - zIndex:(NSInteger)zIndex; -@property(nonatomic, copy) NSString *polylineId; -@property(nonatomic, assign) BOOL consumesTapEvents; -@property(nonatomic, strong) FGMPlatformColor *color; -@property(nonatomic, assign) BOOL geodesic; + consumesTapEvents:(BOOL )consumesTapEvents + color:(FGMPlatformColor *)color + geodesic:(BOOL )geodesic + jointType:(FGMPlatformJointType)jointType + patterns:(NSArray *)patterns + points:(NSArray *)points + visible:(BOOL )visible + width:(NSInteger )width + zIndex:(NSInteger )zIndex; +@property(nonatomic, copy) NSString * polylineId; +@property(nonatomic, assign) BOOL consumesTapEvents; +@property(nonatomic, strong) FGMPlatformColor * color; +@property(nonatomic, assign) BOOL geodesic; /// The joint type. @property(nonatomic, assign) FGMPlatformJointType jointType; /// The pattern data, as a list of pattern items. -@property(nonatomic, copy) NSArray *patterns; -@property(nonatomic, copy) NSArray *points; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger width; -@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, copy) NSArray * patterns; +@property(nonatomic, copy) NSArray * points; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger width; +@property(nonatomic, assign) NSInteger zIndex; @end /// Pigeon equivalent of the PatternItem class. @interface FGMPlatformPatternItem : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length; ++ (instancetype)makeWithType:(FGMPlatformPatternItemType)type + length:(nullable NSNumber *)length; @property(nonatomic, assign) FGMPlatformPatternItemType type; -@property(nonatomic, strong, nullable) NSNumber *length; +@property(nonatomic, strong, nullable) NSNumber * length; @end /// Pigeon equivalent of the Tile class. @interface FGMPlatformTile : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithWidth:(NSInteger)width - height:(NSInteger)height - data:(nullable FlutterStandardTypedData *)data; -@property(nonatomic, assign) NSInteger width; -@property(nonatomic, assign) NSInteger height; -@property(nonatomic, strong, nullable) FlutterStandardTypedData *data; ++ (instancetype)makeWithWidth:(NSInteger )width + height:(NSInteger )height + data:(nullable FlutterStandardTypedData *)data; +@property(nonatomic, assign) NSInteger width; +@property(nonatomic, assign) NSInteger height; +@property(nonatomic, strong, nullable) FlutterStandardTypedData * data; @end /// Pigeon equivalent of the TileOverlay class. @@ -418,37 +437,41 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId - fadeIn:(BOOL)fadeIn - transparency:(double)transparency - zIndex:(NSInteger)zIndex - visible:(BOOL)visible - tileSize:(NSInteger)tileSize; -@property(nonatomic, copy) NSString *tileOverlayId; -@property(nonatomic, assign) BOOL fadeIn; -@property(nonatomic, assign) double transparency; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger tileSize; + fadeIn:(BOOL )fadeIn + transparency:(double )transparency + zIndex:(NSInteger )zIndex + visible:(BOOL )visible + tileSize:(NSInteger )tileSize; +@property(nonatomic, copy) NSString * tileOverlayId; +@property(nonatomic, assign) BOOL fadeIn; +@property(nonatomic, assign) double transparency; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger tileSize; @end /// Pigeon equivalent of Flutter's EdgeInsets. @interface FGMPlatformEdgeInsets : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithTop:(double)top bottom:(double)bottom left:(double)left right:(double)right; -@property(nonatomic, assign) double top; -@property(nonatomic, assign) double bottom; -@property(nonatomic, assign) double left; -@property(nonatomic, assign) double right; ++ (instancetype)makeWithTop:(double )top + bottom:(double )bottom + left:(double )left + right:(double )right; +@property(nonatomic, assign) double top; +@property(nonatomic, assign) double bottom; +@property(nonatomic, assign) double left; +@property(nonatomic, assign) double right; @end /// Pigeon equivalent of LatLng. @interface FGMPlatformLatLng : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude; -@property(nonatomic, assign) double latitude; -@property(nonatomic, assign) double longitude; ++ (instancetype)makeWithLatitude:(double )latitude + longitude:(double )longitude; +@property(nonatomic, assign) double latitude; +@property(nonatomic, assign) double longitude; @end /// Pigeon equivalent of LatLngBounds. @@ -456,9 +479,9 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast - southwest:(FGMPlatformLatLng *)southwest; -@property(nonatomic, strong) FGMPlatformLatLng *northeast; -@property(nonatomic, strong) FGMPlatformLatLng *southwest; + southwest:(FGMPlatformLatLng *)southwest; +@property(nonatomic, strong) FGMPlatformLatLng * northeast; +@property(nonatomic, strong) FGMPlatformLatLng * southwest; @end /// Pigeon equivalent of CameraTargetBounds. @@ -467,7 +490,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// a target, and having an explicitly unbounded target (null [bounds]). @interface FGMPlatformCameraTargetBounds : NSObject + (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds; -@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds; +@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; @end /// Pigeon equivalent of the GroundOverlay class. @@ -475,142 +498,147 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId - image:(FGMPlatformBitmap *)image - position:(nullable FGMPlatformLatLng *)position - bounds:(nullable FGMPlatformLatLngBounds *)bounds - anchor:(nullable FGMPlatformPoint *)anchor - transparency:(double)transparency - bearing:(double)bearing - zIndex:(NSInteger)zIndex - visible:(BOOL)visible - clickable:(BOOL)clickable - zoomLevel:(nullable NSNumber *)zoomLevel; -@property(nonatomic, copy) NSString *groundOverlayId; -@property(nonatomic, strong) FGMPlatformBitmap *image; -@property(nonatomic, strong, nullable) FGMPlatformLatLng *position; -@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds; -@property(nonatomic, strong, nullable) FGMPlatformPoint *anchor; -@property(nonatomic, assign) double transparency; -@property(nonatomic, assign) double bearing; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) BOOL clickable; -@property(nonatomic, strong, nullable) NSNumber *zoomLevel; + image:(FGMPlatformBitmap *)image + position:(nullable FGMPlatformLatLng *)position + bounds:(nullable FGMPlatformLatLngBounds *)bounds + anchor:(nullable FGMPlatformPoint *)anchor + transparency:(double )transparency + bearing:(double )bearing + zIndex:(NSInteger )zIndex + visible:(BOOL )visible + clickable:(BOOL )clickable + zoomLevel:(nullable NSNumber *)zoomLevel; +@property(nonatomic, copy) NSString * groundOverlayId; +@property(nonatomic, strong) FGMPlatformBitmap * image; +@property(nonatomic, strong, nullable) FGMPlatformLatLng * position; +@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, strong, nullable) FGMPlatformPoint * anchor; +@property(nonatomic, assign) double transparency; +@property(nonatomic, assign) double bearing; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) BOOL clickable; +@property(nonatomic, strong, nullable) NSNumber * zoomLevel; @end /// Information passed to the platform view creation. @interface FGMPlatformMapViewCreationParams : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype) - makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition - mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration - initialCircles:(NSArray *)initialCircles - initialMarkers:(NSArray *)initialMarkers - initialPolygons:(NSArray *)initialPolygons - initialPolylines:(NSArray *)initialPolylines - initialHeatmaps:(NSArray *)initialHeatmaps - initialTileOverlays:(NSArray *)initialTileOverlays - initialClusterManagers:(NSArray *)initialClusterManagers - initialGroundOverlays:(NSArray *)initialGroundOverlays; -@property(nonatomic, strong) FGMPlatformCameraPosition *initialCameraPosition; -@property(nonatomic, strong) FGMPlatformMapConfiguration *mapConfiguration; -@property(nonatomic, copy) NSArray *initialCircles; -@property(nonatomic, copy) NSArray *initialMarkers; -@property(nonatomic, copy) NSArray *initialPolygons; -@property(nonatomic, copy) NSArray *initialPolylines; -@property(nonatomic, copy) NSArray *initialHeatmaps; -@property(nonatomic, copy) NSArray *initialTileOverlays; -@property(nonatomic, copy) NSArray *initialClusterManagers; -@property(nonatomic, copy) NSArray *initialGroundOverlays; ++ (instancetype)makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition + mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration + initialCircles:(NSArray *)initialCircles + initialMarkers:(NSArray *)initialMarkers + initialPolygons:(NSArray *)initialPolygons + initialPolylines:(NSArray *)initialPolylines + initialHeatmaps:(NSArray *)initialHeatmaps + initialTileOverlays:(NSArray *)initialTileOverlays + initialClusterManagers:(NSArray *)initialClusterManagers + initialGroundOverlays:(NSArray *)initialGroundOverlays; +@property(nonatomic, strong) FGMPlatformCameraPosition * initialCameraPosition; +@property(nonatomic, strong) FGMPlatformMapConfiguration * mapConfiguration; +@property(nonatomic, copy) NSArray * initialCircles; +@property(nonatomic, copy) NSArray * initialMarkers; +@property(nonatomic, copy) NSArray * initialPolygons; +@property(nonatomic, copy) NSArray * initialPolylines; +@property(nonatomic, copy) NSArray * initialHeatmaps; +@property(nonatomic, copy) NSArray * initialTileOverlays; +@property(nonatomic, copy) NSArray * initialClusterManagers; +@property(nonatomic, copy) NSArray * initialGroundOverlays; @end /// Pigeon equivalent of MapConfiguration. @interface FGMPlatformMapConfiguration : NSObject + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style; -@property(nonatomic, strong, nullable) NSNumber *compassEnabled; -@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds *cameraTargetBounds; -@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox *mapType; -@property(nonatomic, strong, nullable) FGMPlatformZoomRange *minMaxZoomPreference; -@property(nonatomic, strong, nullable) NSNumber *rotateGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *scrollGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *tiltGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *trackCameraPosition; -@property(nonatomic, strong, nullable) NSNumber *zoomGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *myLocationEnabled; -@property(nonatomic, strong, nullable) NSNumber *myLocationButtonEnabled; -@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets *padding; -@property(nonatomic, strong, nullable) NSNumber *indoorViewEnabled; -@property(nonatomic, strong, nullable) NSNumber *trafficEnabled; -@property(nonatomic, strong, nullable) NSNumber *buildingsEnabled; -@property(nonatomic, copy, nullable) NSString *mapId; -@property(nonatomic, copy, nullable) NSString *style; + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style; +@property(nonatomic, strong, nullable) NSNumber * compassEnabled; +@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds * cameraTargetBounds; +@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox * mapType; +@property(nonatomic, strong, nullable) FGMPlatformZoomRange * minMaxZoomPreference; +@property(nonatomic, strong, nullable) NSNumber * rotateGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * scrollGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * tiltGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * trackCameraPosition; +@property(nonatomic, strong, nullable) NSNumber * zoomGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * myLocationEnabled; +@property(nonatomic, strong, nullable) NSNumber * myLocationButtonEnabled; +@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets * padding; +@property(nonatomic, strong, nullable) NSNumber * indoorViewEnabled; +@property(nonatomic, strong, nullable) NSNumber * trafficEnabled; +@property(nonatomic, strong, nullable) NSNumber * buildingsEnabled; +@property(nonatomic, copy, nullable) NSString * mapId; +@property(nonatomic, copy, nullable) NSString * style; @end /// Pigeon representation of an x,y coordinate. @interface FGMPlatformPoint : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithX:(double)x y:(double)y; -@property(nonatomic, assign) double x; -@property(nonatomic, assign) double y; ++ (instancetype)makeWithX:(double )x + y:(double )y; +@property(nonatomic, assign) double x; +@property(nonatomic, assign) double y; @end /// Pigeon representation of a size. @interface FGMPlatformSize : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithWidth:(double)width height:(double)height; -@property(nonatomic, assign) double width; -@property(nonatomic, assign) double height; ++ (instancetype)makeWithWidth:(double )width + height:(double )height; +@property(nonatomic, assign) double width; +@property(nonatomic, assign) double height; @end /// Pigeon representation of a color. @interface FGMPlatformColor : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithRed:(double)red green:(double)green blue:(double)blue alpha:(double)alpha; -@property(nonatomic, assign) double red; -@property(nonatomic, assign) double green; -@property(nonatomic, assign) double blue; -@property(nonatomic, assign) double alpha; ++ (instancetype)makeWithRed:(double )red + green:(double )green + blue:(double )blue + alpha:(double )alpha; +@property(nonatomic, assign) double red; +@property(nonatomic, assign) double green; +@property(nonatomic, assign) double blue; +@property(nonatomic, assign) double alpha; @end /// Pigeon equivalent of GMSTileLayer properties. @interface FGMPlatformTileLayer : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithVisible:(BOOL)visible - fadeIn:(BOOL)fadeIn - opacity:(double)opacity - zIndex:(NSInteger)zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) BOOL fadeIn; -@property(nonatomic, assign) double opacity; -@property(nonatomic, assign) NSInteger zIndex; ++ (instancetype)makeWithVisible:(BOOL )visible + fadeIn:(BOOL )fadeIn + opacity:(double )opacity + zIndex:(NSInteger )zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) BOOL fadeIn; +@property(nonatomic, assign) double opacity; +@property(nonatomic, assign) NSInteger zIndex; @end /// Pigeon equivalent of MinMaxZoomPreference. @interface FGMPlatformZoomRange : NSObject -+ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max; -@property(nonatomic, strong, nullable) NSNumber *min; -@property(nonatomic, strong, nullable) NSNumber *max; ++ (instancetype)makeWithMin:(nullable NSNumber *)min + max:(nullable NSNumber *)max; +@property(nonatomic, strong, nullable) NSNumber * min; +@property(nonatomic, strong, nullable) NSNumber * max; @end /// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint @@ -619,7 +647,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @interface FGMPlatformBitmap : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBitmap:(id)bitmap; ++ (instancetype)makeWithBitmap:(id )bitmap; /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. @@ -627,13 +655,13 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// approach allows for the different bitmap implementations to be valid /// argument and return types of the API methods. See /// https://github.com/flutter/flutter/issues/117819. -@property(nonatomic, strong) id bitmap; +@property(nonatomic, strong) id bitmap; @end /// Pigeon equivalent of [DefaultMarker]. @interface FGMPlatformBitmapDefaultMarker : NSObject + (instancetype)makeWithHue:(nullable NSNumber *)hue; -@property(nonatomic, strong, nullable) NSNumber *hue; +@property(nonatomic, strong, nullable) NSNumber * hue; @end /// Pigeon equivalent of [BytesBitmap]. @@ -641,18 +669,19 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - size:(nullable FGMPlatformSize *)size; -@property(nonatomic, strong) FlutterStandardTypedData *byteData; -@property(nonatomic, strong, nullable) FGMPlatformSize *size; + size:(nullable FGMPlatformSize *)size; +@property(nonatomic, strong) FlutterStandardTypedData * byteData; +@property(nonatomic, strong, nullable) FGMPlatformSize * size; @end /// Pigeon equivalent of [AssetBitmap]. @interface FGMPlatformBitmapAsset : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg; -@property(nonatomic, copy) NSString *name; -@property(nonatomic, copy, nullable) NSString *pkg; ++ (instancetype)makeWithName:(NSString *)name + pkg:(nullable NSString *)pkg; +@property(nonatomic, copy) NSString * name; +@property(nonatomic, copy, nullable) NSString * pkg; @end /// Pigeon equivalent of [AssetImageBitmap]. @@ -660,11 +689,11 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithName:(NSString *)name - scale:(double)scale - size:(nullable FGMPlatformSize *)size; -@property(nonatomic, copy) NSString *name; -@property(nonatomic, assign) double scale; -@property(nonatomic, strong, nullable) FGMPlatformSize *size; + scale:(double )scale + size:(nullable FGMPlatformSize *)size; +@property(nonatomic, copy) NSString * name; +@property(nonatomic, assign) double scale; +@property(nonatomic, strong, nullable) FGMPlatformSize * size; @end /// Pigeon equivalent of [AssetMapBitmap]. @@ -672,15 +701,15 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithAssetName:(NSString *)assetName - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double)imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height; -@property(nonatomic, copy) NSString *assetName; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double )imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height; +@property(nonatomic, copy) NSString * assetName; @property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; -@property(nonatomic, assign) double imagePixelRatio; -@property(nonatomic, strong, nullable) NSNumber *width; -@property(nonatomic, strong, nullable) NSNumber *height; +@property(nonatomic, assign) double imagePixelRatio; +@property(nonatomic, strong, nullable) NSNumber * width; +@property(nonatomic, strong, nullable) NSNumber * height; @end /// Pigeon equivalent of [BytesMapBitmap]. @@ -688,15 +717,15 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double)imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height; -@property(nonatomic, strong) FlutterStandardTypedData *byteData; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double )imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height; +@property(nonatomic, strong) FlutterStandardTypedData * byteData; @property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; -@property(nonatomic, assign) double imagePixelRatio; -@property(nonatomic, strong, nullable) NSNumber *width; -@property(nonatomic, strong, nullable) NSNumber *height; +@property(nonatomic, assign) double imagePixelRatio; +@property(nonatomic, strong, nullable) NSNumber * width; +@property(nonatomic, strong, nullable) NSNumber * height; @end /// The codec used by all APIs. @@ -712,87 +741,54 @@ NSObject *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void); /// /// Only non-null configuration values will result in updates; options with /// null values will remain unchanged. -- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of circles on the map. -- (void)updateCirclesByAdding:(NSArray *)toAdd - changing:(NSArray *)toChange - removing:(NSArray *)idsToRemove - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateCirclesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of heatmaps on the map. -- (void)updateHeatmapsByAdding:(NSArray *)toAdd - changing:(NSArray *)toChange - removing:(NSArray *)idsToRemove - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateHeatmapsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of custer managers for clusters on the map. -- (void)updateClusterManagersByAdding:(NSArray *)toAdd - removing:(NSArray *)idsToRemove - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateClusterManagersByAdding:(NSArray *)toAdd removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of markers on the map. -- (void)updateMarkersByAdding:(NSArray *)toAdd - changing:(NSArray *)toChange - removing:(NSArray *)idsToRemove - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateMarkersByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of polygonss on the map. -- (void)updatePolygonsByAdding:(NSArray *)toAdd - changing:(NSArray *)toChange - removing:(NSArray *)idsToRemove - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updatePolygonsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of polylines on the map. -- (void)updatePolylinesByAdding:(NSArray *)toAdd - changing:(NSArray *)toChange - removing:(NSArray *)idsToRemove - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updatePolylinesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of tile overlays on the map. -- (void)updateTileOverlaysByAdding:(NSArray *)toAdd - changing:(NSArray *)toChange - removing:(NSArray *)idsToRemove - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateTileOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of ground overlays on the map. -- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd - changing:(NSArray *)toChange - removing:(NSArray *)idsToRemove - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; /// Gets the screen coordinate for the given map location. /// /// @return `nil` only when `error != nil`. -- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng error:(FlutterError *_Nullable *_Nonnull)error; /// Gets the map location for the given screen coordinate. /// /// @return `nil` only when `error != nil`. -- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate error:(FlutterError *_Nullable *_Nonnull)error; /// Gets the map region currently displayed on the map. /// /// @return `nil` only when `error != nil`. - (nullable FGMPlatformLatLngBounds *)visibleMapRegion:(FlutterError *_Nullable *_Nonnull)error; /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. -- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate error:(FlutterError *_Nullable *_Nonnull)error; /// Moves the camera according to [cameraUpdate], animating the update using a /// duration in milliseconds if provided. -- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate - duration:(nullable NSNumber *)durationMilliseconds - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate duration:(nullable NSNumber *)durationMilliseconds error:(FlutterError *_Nullable *_Nonnull)error; /// Gets the current map zoom level. /// /// @return `nil` only when `error != nil`. - (nullable NSNumber *)currentZoomLevel:(FlutterError *_Nullable *_Nonnull)error; /// Show the info window for the marker with the given ID. -- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; /// Hide the info window for the marker with the given ID. -- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; /// Returns true if the marker with the given ID is currently displaying its /// info window. /// /// @return `nil` only when `error != nil`. -- (nullable NSNumber *) - isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSNumber *)isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; /// Sets the style to the given map style string, where an empty string /// indicates that the style should be cleared. /// @@ -806,93 +802,68 @@ NSObject *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void); /// is no way to return failures from map initialization. - (nullable NSString *)lastStyleError:(FlutterError *_Nullable *_Nonnull)error; /// Clears the cache of tiles previously requseted from the tile provider. -- (void)clearTileCacheForOverlayWithIdentifier:(NSString *)tileOverlayId - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)clearTileCacheForOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; /// Takes a snapshot of the map and returns its image data. -- (nullable FlutterStandardTypedData *)takeSnapshotWithError: - (FlutterError *_Nullable *_Nonnull)error; +- (nullable FlutterStandardTypedData *)takeSnapshotWithError:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsApi(id binaryMessenger, - NSObject *_Nullable api); +extern void SetUpFGMMapsApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); -extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, - NSObject *_Nullable api, - NSString *messageChannelSuffix); /// Interface for calls from the native SDK to Dart. @interface FGMMapsCallbackApi : NSObject - (instancetype)initWithBinaryMessenger:(id)binaryMessenger; -- (instancetype)initWithBinaryMessenger:(id)binaryMessenger - messageChannelSuffix:(nullable NSString *)messageChannelSuffix; +- (instancetype)initWithBinaryMessenger:(id)binaryMessenger messageChannelSuffix:(nullable NSString *)messageChannelSuffix; /// Called when the map camera starts moving. - (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map camera moves. -- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition completion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map camera stops moving. - (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map, not a specifc map object, is tapped. -- (void)didTapAtPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map, not a specifc map object, is long pressed. -- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker is tapped. -- (void)didTapMarkerWithIdentifier:(NSString *)markerId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag starts. -- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag updates. -- (void)didDragMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag ends. -- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker's info window is tapped. -- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a circle is tapped. -- (void)didTapCircleWithIdentifier:(NSString *)circleId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapCircleWithIdentifier:(NSString *)circleId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker cluster is tapped. -- (void)didTapCluster:(FGMPlatformCluster *)cluster - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapCluster:(FGMPlatformCluster *)cluster completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a polygon is tapped. -- (void)didTapPolygonWithIdentifier:(NSString *)polygonId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPolygonWithIdentifier:(NSString *)polygonId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a polyline is tapped. -- (void)didTapPolylineWithIdentifier:(NSString *)polylineId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPolylineWithIdentifier:(NSString *)polylineId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a ground overlay is tapped. -- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a point of interest is tapped. +- (void)didTapPointOfInterest:(FGMPlatformPointOfInterest *)poi completion:(void (^)(FlutterError *_Nullable))completion; /// Called to get data for a map tile. -- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId - location:(FGMPlatformPoint *)location - zoom:(NSInteger)zoom - completion:(void (^)(FGMPlatformTile *_Nullable, - FlutterError *_Nullable))completion; +- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId location:(FGMPlatformPoint *)location zoom:(NSInteger)zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion; @end + /// Dummy interface to force generation of the platform view creation params, /// which are not used in any Pigeon calls, only the platform view creation /// call made internally by Flutter. @protocol FGMMapsPlatformViewApi -- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type error:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, - NSObject *_Nullable api); +extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); -extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, - NSObject *_Nullable api, - NSString *messageChannelSuffix); /// Inspector API only intended for use in integration tests. @protocol FGMMapsInspectorApi @@ -912,29 +883,19 @@ extern void SetUpFGMMapsPlatformViewApiWithSuffix(id bin - (nullable NSNumber *)isMyLocationButtonEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. - (nullable NSNumber *)isTrafficEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId - error: - (FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformGroundOverlay *) - groundOverlayWithIdentifier:(NSString *)groundOverlayId - error:(FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformGroundOverlay *)groundOverlayWithIdentifier:(NSString *)groundOverlayId error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId error:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. - (nullable FGMPlatformZoomRange *)zoomRange:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. -- (nullable NSArray *) - clustersWithIdentifier:(NSString *)clusterManagerId - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSArray *)clustersWithIdentifier:(NSString *)clusterManagerId error:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. - (nullable FGMPlatformCameraPosition *)cameraPosition:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsInspectorApi(id binaryMessenger, - NSObject *_Nullable api); +extern void SetUpFGMMapsInspectorApi(id binaryMessenger, NSObject *_Nullable api); -extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, - NSObject *_Nullable api, - NSString *messageChannelSuffix); +extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); NS_ASSUME_NONNULL_END diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index c7e469ad1491..865b91ee9abf 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -206,6 +206,11 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { return _events(mapId).whereType(); } + @override + Stream onPoiTap({required int mapId}) { + return _events(mapId).whereType(); + } + @override Future updateMapConfiguration( MapConfiguration configuration, { @@ -1161,6 +1166,20 @@ class HostMapMessageHandler implements MapsCallbackApi { MapTapEvent(mapId, _latLngFromPlatformLatLng(position)), ); } + + @override + void onPoiTap(PlatformPointOfInterest poi) { + streamController.add( + MapPoiTapEvent( + mapId, + PointOfInterest( + LatLng(poi.position.latitude, poi.position.longitude), + poi.name, + poi.placeId, + ), + ), + ); + } } LatLng _latLngFromPlatformLatLng(PlatformLatLng latLng) { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart index bd54d5f62322..bb5abe76fb87 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.5), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,11 +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 []; } @@ -31,36 +27,49 @@ List wrapResponse({ } return [error.code, error.message, error.details]; } - bool _deepEquals(Object? a, Object? b) { if (a is List && b is List) { return a.length == b.length && - a.indexed.every( - ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), - ); + a.indexed + .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); } if (a is Map && b is Map) { - return a.length == b.length && - a.entries.every( - (MapEntry entry) => - (b as Map).containsKey(entry.key) && - _deepEquals(entry.value, b[entry.key]), - ); + return a.length == b.length && a.entries.every((MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key])); } return a == b; } + /// Pigeon equivalent of MapType -enum PlatformMapType { none, normal, satellite, terrain, hybrid } +enum PlatformMapType { + none, + normal, + satellite, + terrain, + hybrid, +} /// Join types for polyline joints. -enum PlatformJointType { mitered, bevel, round } +enum PlatformJointType { + mitered, + bevel, + round, +} /// Enumeration of possible types for PatternItem. -enum PlatformPatternItemType { dot, dash, gap } +enum PlatformPatternItemType { + dot, + dash, + gap, +} /// Pigeon equivalent of [MapBitmapScaling]. -enum PlatformMapBitmapScaling { auto, none } +enum PlatformMapBitmapScaling { + auto, + none, +} /// Pigeon representatation of a CameraPosition. class PlatformCameraPosition { @@ -80,12 +89,16 @@ class PlatformCameraPosition { double zoom; List _toList() { - return [bearing, target, tilt, zoom]; + return [ + bearing, + target, + tilt, + zoom, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraPosition decode(Object result) { result as List; @@ -111,12 +124,15 @@ class PlatformCameraPosition { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon representation of a CameraUpdate. class PlatformCameraUpdate { - PlatformCameraUpdate({required this.cameraUpdate}); + PlatformCameraUpdate({ + required this.cameraUpdate, + }); /// This Object must be one of the classes below prefixed with /// PlatformCameraUpdate. Each such class represents a different type of @@ -125,16 +141,19 @@ class PlatformCameraUpdate { Object cameraUpdate; List _toList() { - return [cameraUpdate]; + return [ + cameraUpdate, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdate decode(Object result) { result as List; - return PlatformCameraUpdate(cameraUpdate: result[0]!); + return PlatformCameraUpdate( + cameraUpdate: result[0]!, + ); } @override @@ -151,22 +170,26 @@ class PlatformCameraUpdate { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of NewCameraPosition class PlatformCameraUpdateNewCameraPosition { - PlatformCameraUpdateNewCameraPosition({required this.cameraPosition}); + PlatformCameraUpdateNewCameraPosition({ + required this.cameraPosition, + }); PlatformCameraPosition cameraPosition; List _toList() { - return [cameraPosition]; + return [ + cameraPosition, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdateNewCameraPosition decode(Object result) { result as List; @@ -178,8 +201,7 @@ class PlatformCameraUpdateNewCameraPosition { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewCameraPosition || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateNewCameraPosition || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -190,33 +212,38 @@ class PlatformCameraUpdateNewCameraPosition { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of NewLatLng class PlatformCameraUpdateNewLatLng { - PlatformCameraUpdateNewLatLng({required this.latLng}); + PlatformCameraUpdateNewLatLng({ + required this.latLng, + }); PlatformLatLng latLng; List _toList() { - return [latLng]; + return [ + latLng, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdateNewLatLng decode(Object result) { result as List; - return PlatformCameraUpdateNewLatLng(latLng: result[0]! as PlatformLatLng); + return PlatformCameraUpdateNewLatLng( + latLng: result[0]! as PlatformLatLng, + ); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLng || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateNewLatLng || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -227,7 +254,8 @@ class PlatformCameraUpdateNewLatLng { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of NewLatLngBounds @@ -242,12 +270,14 @@ class PlatformCameraUpdateNewLatLngBounds { double padding; List _toList() { - return [bounds, padding]; + return [ + bounds, + padding, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdateNewLatLngBounds decode(Object result) { result as List; @@ -260,8 +290,7 @@ class PlatformCameraUpdateNewLatLngBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLngBounds || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateNewLatLngBounds || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -272,24 +301,30 @@ class PlatformCameraUpdateNewLatLngBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of NewLatLngZoom class PlatformCameraUpdateNewLatLngZoom { - PlatformCameraUpdateNewLatLngZoom({required this.latLng, required this.zoom}); + PlatformCameraUpdateNewLatLngZoom({ + required this.latLng, + required this.zoom, + }); PlatformLatLng latLng; double zoom; List _toList() { - return [latLng, zoom]; + return [ + latLng, + zoom, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdateNewLatLngZoom decode(Object result) { result as List; @@ -302,8 +337,7 @@ class PlatformCameraUpdateNewLatLngZoom { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLngZoom || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateNewLatLngZoom || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -314,24 +348,30 @@ class PlatformCameraUpdateNewLatLngZoom { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of ScrollBy class PlatformCameraUpdateScrollBy { - PlatformCameraUpdateScrollBy({required this.dx, required this.dy}); + PlatformCameraUpdateScrollBy({ + required this.dx, + required this.dy, + }); double dx; double dy; List _toList() { - return [dx, dy]; + return [ + dx, + dy, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdateScrollBy decode(Object result) { result as List; @@ -344,8 +384,7 @@ class PlatformCameraUpdateScrollBy { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateScrollBy || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateScrollBy || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -356,24 +395,30 @@ class PlatformCameraUpdateScrollBy { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of ZoomBy class PlatformCameraUpdateZoomBy { - PlatformCameraUpdateZoomBy({required this.amount, this.focus}); + PlatformCameraUpdateZoomBy({ + required this.amount, + this.focus, + }); double amount; PlatformPoint? focus; List _toList() { - return [amount, focus]; + return [ + amount, + focus, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdateZoomBy decode(Object result) { result as List; @@ -386,8 +431,7 @@ class PlatformCameraUpdateZoomBy { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoomBy || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateZoomBy || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -398,33 +442,38 @@ class PlatformCameraUpdateZoomBy { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of ZoomIn/ZoomOut class PlatformCameraUpdateZoom { - PlatformCameraUpdateZoom({required this.out}); + PlatformCameraUpdateZoom({ + required this.out, + }); bool out; List _toList() { - return [out]; + return [ + out, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdateZoom decode(Object result) { result as List; - return PlatformCameraUpdateZoom(out: result[0]! as bool); + return PlatformCameraUpdateZoom( + out: result[0]! as bool, + ); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoom || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateZoom || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -435,33 +484,38 @@ class PlatformCameraUpdateZoom { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of ZoomTo class PlatformCameraUpdateZoomTo { - PlatformCameraUpdateZoomTo({required this.zoom}); + PlatformCameraUpdateZoomTo({ + required this.zoom, + }); double zoom; List _toList() { - return [zoom]; + return [ + zoom, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraUpdateZoomTo decode(Object result) { result as List; - return PlatformCameraUpdateZoomTo(zoom: result[0]! as double); + return PlatformCameraUpdateZoomTo( + zoom: result[0]! as double, + ); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoomTo || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateZoomTo || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -472,7 +526,8 @@ class PlatformCameraUpdateZoomTo { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the Circle class. @@ -522,8 +577,7 @@ class PlatformCircle { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCircle decode(Object result) { result as List; @@ -554,7 +608,8 @@ class PlatformCircle { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the Heatmap class. @@ -596,8 +651,7 @@ class PlatformHeatmap { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformHeatmap decode(Object result) { result as List; @@ -626,7 +680,8 @@ class PlatformHeatmap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the HeatmapGradient class. @@ -648,12 +703,15 @@ class PlatformHeatmapGradient { int colorMapSize; List _toList() { - return [colors, startPoints, colorMapSize]; + return [ + colors, + startPoints, + colorMapSize, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformHeatmapGradient decode(Object result) { result as List; @@ -678,24 +736,30 @@ class PlatformHeatmapGradient { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the WeightedLatLng class. class PlatformWeightedLatLng { - PlatformWeightedLatLng({required this.point, required this.weight}); + PlatformWeightedLatLng({ + required this.point, + required this.weight, + }); PlatformLatLng point; double weight; List _toList() { - return [point, weight]; + return [ + point, + weight, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformWeightedLatLng decode(Object result) { result as List; @@ -719,12 +783,17 @@ class PlatformWeightedLatLng { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the InfoWindow class. class PlatformInfoWindow { - PlatformInfoWindow({this.title, this.snippet, required this.anchor}); + PlatformInfoWindow({ + this.title, + this.snippet, + required this.anchor, + }); String? title; @@ -733,12 +802,15 @@ class PlatformInfoWindow { PlatformPoint anchor; List _toList() { - return [title, snippet, anchor]; + return [ + title, + snippet, + anchor, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformInfoWindow decode(Object result) { result as List; @@ -763,7 +835,8 @@ class PlatformInfoWindow { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of Cluster. @@ -784,12 +857,16 @@ class PlatformCluster { List markerIds; List _toList() { - return [clusterManagerId, position, bounds, markerIds]; + return [ + clusterManagerId, + position, + bounds, + markerIds, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCluster decode(Object result) { result as List; @@ -815,26 +892,32 @@ class PlatformCluster { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the ClusterManager class. class PlatformClusterManager { - PlatformClusterManager({required this.identifier}); + PlatformClusterManager({ + required this.identifier, + }); String identifier; List _toList() { - return [identifier]; + return [ + identifier, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformClusterManager decode(Object result) { result as List; - return PlatformClusterManager(identifier: result[0]! as String); + return PlatformClusterManager( + identifier: result[0]! as String, + ); } @override @@ -851,7 +934,8 @@ class PlatformClusterManager { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the Marker class. @@ -917,8 +1001,7 @@ class PlatformMarker { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformMarker decode(Object result) { result as List; @@ -953,7 +1036,60 @@ class PlatformMarker { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Point of Interest class. +class PlatformPointOfInterest { + PlatformPointOfInterest({ + required this.position, + required this.name, + required this.placeId, + }); + + PlatformLatLng position; + + String name; + + String placeId; + + List _toList() { + return [ + position, + name, + placeId, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPointOfInterest decode(Object result) { + result as List; + return PlatformPointOfInterest( + position: result[0]! as PlatformLatLng, + name: result[1]! as String, + placeId: result[2]! as String, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPointOfInterest || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the Polygon class. @@ -1007,8 +1143,7 @@ class PlatformPolygon { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformPolygon decode(Object result) { result as List; @@ -1040,7 +1175,8 @@ class PlatformPolygon { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the Polyline class. @@ -1096,8 +1232,7 @@ class PlatformPolyline { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformPolyline decode(Object result) { result as List; @@ -1129,24 +1264,30 @@ class PlatformPolyline { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the PatternItem class. class PlatformPatternItem { - PlatformPatternItem({required this.type, this.length}); + PlatformPatternItem({ + required this.type, + this.length, + }); PlatformPatternItemType type; double? length; List _toList() { - return [type, length]; + return [ + type, + length, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformPatternItem decode(Object result) { result as List; @@ -1170,12 +1311,17 @@ class PlatformPatternItem { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the Tile class. class PlatformTile { - PlatformTile({required this.width, required this.height, this.data}); + PlatformTile({ + required this.width, + required this.height, + this.data, + }); int width; @@ -1184,12 +1330,15 @@ class PlatformTile { Uint8List? data; List _toList() { - return [width, height, data]; + return [ + width, + height, + data, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformTile decode(Object result) { result as List; @@ -1214,7 +1363,8 @@ class PlatformTile { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the TileOverlay class. @@ -1252,8 +1402,7 @@ class PlatformTileOverlay { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformTileOverlay decode(Object result) { result as List; @@ -1281,7 +1430,8 @@ class PlatformTileOverlay { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of Flutter's EdgeInsets. @@ -1302,12 +1452,16 @@ class PlatformEdgeInsets { double right; List _toList() { - return [top, bottom, left, right]; + return [ + top, + bottom, + left, + right, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformEdgeInsets decode(Object result) { result as List; @@ -1333,24 +1487,30 @@ class PlatformEdgeInsets { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of LatLng. class PlatformLatLng { - PlatformLatLng({required this.latitude, required this.longitude}); + PlatformLatLng({ + required this.latitude, + required this.longitude, + }); double latitude; double longitude; List _toList() { - return [latitude, longitude]; + return [ + latitude, + longitude, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformLatLng decode(Object result) { result as List; @@ -1374,24 +1534,30 @@ class PlatformLatLng { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of LatLngBounds. class PlatformLatLngBounds { - PlatformLatLngBounds({required this.northeast, required this.southwest}); + PlatformLatLngBounds({ + required this.northeast, + required this.southwest, + }); PlatformLatLng northeast; PlatformLatLng southwest; List _toList() { - return [northeast, southwest]; + return [ + northeast, + southwest, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformLatLngBounds decode(Object result) { result as List; @@ -1415,7 +1581,8 @@ class PlatformLatLngBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of CameraTargetBounds. @@ -1423,17 +1590,20 @@ class PlatformLatLngBounds { /// As with the Dart version, it exists to distinguish between not setting a /// a target, and having an explicitly unbounded target (null [bounds]). class PlatformCameraTargetBounds { - PlatformCameraTargetBounds({this.bounds}); + PlatformCameraTargetBounds({ + this.bounds, + }); PlatformLatLngBounds? bounds; List _toList() { - return [bounds]; + return [ + bounds, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCameraTargetBounds decode(Object result) { result as List; @@ -1445,8 +1615,7 @@ class PlatformCameraTargetBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraTargetBounds || - other.runtimeType != runtimeType) { + if (other is! PlatformCameraTargetBounds || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -1457,7 +1626,8 @@ class PlatformCameraTargetBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of the GroundOverlay class. @@ -1515,8 +1685,7 @@ class PlatformGroundOverlay { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformGroundOverlay decode(Object result) { result as List; @@ -1549,7 +1718,8 @@ class PlatformGroundOverlay { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Information passed to the platform view creation. @@ -1603,8 +1773,7 @@ class PlatformMapViewCreationParams { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformMapViewCreationParams decode(Object result) { result as List; @@ -1616,20 +1785,16 @@ class PlatformMapViewCreationParams { initialPolygons: (result[4] as List?)!.cast(), initialPolylines: (result[5] as List?)!.cast(), initialHeatmaps: (result[6] as List?)!.cast(), - initialTileOverlays: (result[7] as List?)! - .cast(), - initialClusterManagers: (result[8] as List?)! - .cast(), - initialGroundOverlays: (result[9] as List?)! - .cast(), + initialTileOverlays: (result[7] as List?)!.cast(), + initialClusterManagers: (result[8] as List?)!.cast(), + initialGroundOverlays: (result[9] as List?)!.cast(), ); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformMapViewCreationParams || - other.runtimeType != runtimeType) { + if (other is! PlatformMapViewCreationParams || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -1640,7 +1805,8 @@ class PlatformMapViewCreationParams { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of MapConfiguration. @@ -1722,8 +1888,7 @@ class PlatformMapConfiguration { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformMapConfiguration decode(Object result) { result as List; @@ -1751,8 +1916,7 @@ class PlatformMapConfiguration { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformMapConfiguration || - other.runtimeType != runtimeType) { + if (other is! PlatformMapConfiguration || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -1763,28 +1927,37 @@ class PlatformMapConfiguration { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon representation of an x,y coordinate. class PlatformPoint { - PlatformPoint({required this.x, required this.y}); + PlatformPoint({ + required this.x, + required this.y, + }); double x; double y; List _toList() { - return [x, y]; + return [ + x, + y, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformPoint decode(Object result) { result as List; - return PlatformPoint(x: result[0]! as double, y: result[1]! as double); + return PlatformPoint( + x: result[0]! as double, + y: result[1]! as double, + ); } @override @@ -1801,24 +1974,30 @@ class PlatformPoint { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon representation of a size. class PlatformSize { - PlatformSize({required this.width, required this.height}); + PlatformSize({ + required this.width, + required this.height, + }); double width; double height; List _toList() { - return [width, height]; + return [ + width, + height, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformSize decode(Object result) { result as List; @@ -1842,7 +2021,8 @@ class PlatformSize { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon representation of a color. @@ -1863,12 +2043,16 @@ class PlatformColor { double alpha; List _toList() { - return [red, green, blue, alpha]; + return [ + red, + green, + blue, + alpha, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformColor decode(Object result) { result as List; @@ -1894,7 +2078,8 @@ class PlatformColor { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of GMSTileLayer properties. @@ -1915,12 +2100,16 @@ class PlatformTileLayer { int zIndex; List _toList() { - return [visible, fadeIn, opacity, zIndex]; + return [ + visible, + fadeIn, + opacity, + zIndex, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformTileLayer decode(Object result) { result as List; @@ -1946,24 +2135,30 @@ class PlatformTileLayer { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of MinMaxZoomPreference. class PlatformZoomRange { - PlatformZoomRange({this.min, this.max}); + PlatformZoomRange({ + this.min, + this.max, + }); double? min; double? max; List _toList() { - return [min, max]; + return [ + min, + max, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformZoomRange decode(Object result) { result as List; @@ -1987,14 +2182,17 @@ class PlatformZoomRange { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint /// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which /// may hold the pigeon equivalent type of any of them. class PlatformBitmap { - PlatformBitmap({required this.bitmap}); + PlatformBitmap({ + required this.bitmap, + }); /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], @@ -2006,16 +2204,19 @@ class PlatformBitmap { Object bitmap; List _toList() { - return [bitmap]; + return [ + bitmap, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmap decode(Object result) { result as List; - return PlatformBitmap(bitmap: result[0]!); + return PlatformBitmap( + bitmap: result[0]!, + ); } @override @@ -2032,33 +2233,38 @@ class PlatformBitmap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of [DefaultMarker]. class PlatformBitmapDefaultMarker { - PlatformBitmapDefaultMarker({this.hue}); + PlatformBitmapDefaultMarker({ + this.hue, + }); double? hue; List _toList() { - return [hue]; + return [ + hue, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmapDefaultMarker decode(Object result) { result as List; - return PlatformBitmapDefaultMarker(hue: result[0] as double?); + return PlatformBitmapDefaultMarker( + hue: result[0] as double?, + ); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformBitmapDefaultMarker || - other.runtimeType != runtimeType) { + if (other is! PlatformBitmapDefaultMarker || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -2069,24 +2275,30 @@ class PlatformBitmapDefaultMarker { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of [BytesBitmap]. class PlatformBitmapBytes { - PlatformBitmapBytes({required this.byteData, this.size}); + PlatformBitmapBytes({ + required this.byteData, + this.size, + }); Uint8List byteData; PlatformSize? size; List _toList() { - return [byteData, size]; + return [ + byteData, + size, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmapBytes decode(Object result) { result as List; @@ -2110,24 +2322,30 @@ class PlatformBitmapBytes { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of [AssetBitmap]. class PlatformBitmapAsset { - PlatformBitmapAsset({required this.name, this.pkg}); + PlatformBitmapAsset({ + required this.name, + this.pkg, + }); String name; String? pkg; List _toList() { - return [name, pkg]; + return [ + name, + pkg, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmapAsset decode(Object result) { result as List; @@ -2151,7 +2369,8 @@ class PlatformBitmapAsset { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of [AssetImageBitmap]. @@ -2169,12 +2388,15 @@ class PlatformBitmapAssetImage { PlatformSize? size; List _toList() { - return [name, scale, size]; + return [ + name, + scale, + size, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmapAssetImage decode(Object result) { result as List; @@ -2188,8 +2410,7 @@ class PlatformBitmapAssetImage { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformBitmapAssetImage || - other.runtimeType != runtimeType) { + if (other is! PlatformBitmapAssetImage || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -2200,7 +2421,8 @@ class PlatformBitmapAssetImage { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of [AssetMapBitmap]. @@ -2224,12 +2446,17 @@ class PlatformBitmapAssetMap { double? height; List _toList() { - return [assetName, bitmapScaling, imagePixelRatio, width, height]; + return [ + assetName, + bitmapScaling, + imagePixelRatio, + width, + height, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmapAssetMap decode(Object result) { result as List; @@ -2256,7 +2483,8 @@ class PlatformBitmapAssetMap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } /// Pigeon equivalent of [BytesMapBitmap]. @@ -2280,12 +2508,17 @@ class PlatformBitmapBytesMap { double? height; List _toList() { - return [byteData, bitmapScaling, imagePixelRatio, width, height]; + return [ + byteData, + bitmapScaling, + imagePixelRatio, + width, + height, + ]; } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmapBytesMap decode(Object result) { result as List; @@ -2312,9 +2545,11 @@ class PlatformBitmapBytesMap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => Object.hashAll(_toList()) +; } + class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -2322,144 +2557,147 @@ class _PigeonCodec extends StandardMessageCodec { if (value is int) { buffer.putUint8(4); buffer.putInt64(value); - } else if (value is PlatformMapType) { + } else if (value is PlatformMapType) { buffer.putUint8(129); writeValue(buffer, value.index); - } else if (value is PlatformJointType) { + } else if (value is PlatformJointType) { buffer.putUint8(130); writeValue(buffer, value.index); - } else if (value is PlatformPatternItemType) { + } else if (value is PlatformPatternItemType) { buffer.putUint8(131); writeValue(buffer, value.index); - } else if (value is PlatformMapBitmapScaling) { + } else if (value is PlatformMapBitmapScaling) { buffer.putUint8(132); writeValue(buffer, value.index); - } else if (value is PlatformCameraPosition) { + } else if (value is PlatformCameraPosition) { buffer.putUint8(133); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { + } else if (value is PlatformCameraUpdate) { buffer.putUint8(134); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewCameraPosition) { + } else if (value is PlatformCameraUpdateNewCameraPosition) { buffer.putUint8(135); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLng) { + } else if (value is PlatformCameraUpdateNewLatLng) { buffer.putUint8(136); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngBounds) { + } else if (value is PlatformCameraUpdateNewLatLngBounds) { buffer.putUint8(137); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngZoom) { + } else if (value is PlatformCameraUpdateNewLatLngZoom) { buffer.putUint8(138); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateScrollBy) { + } else if (value is PlatformCameraUpdateScrollBy) { buffer.putUint8(139); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomBy) { + } else if (value is PlatformCameraUpdateZoomBy) { buffer.putUint8(140); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoom) { + } else if (value is PlatformCameraUpdateZoom) { buffer.putUint8(141); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomTo) { + } else if (value is PlatformCameraUpdateZoomTo) { buffer.putUint8(142); writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { + } else if (value is PlatformCircle) { buffer.putUint8(143); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { + } else if (value is PlatformHeatmap) { buffer.putUint8(144); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmapGradient) { + } else if (value is PlatformHeatmapGradient) { buffer.putUint8(145); writeValue(buffer, value.encode()); - } else if (value is PlatformWeightedLatLng) { + } else if (value is PlatformWeightedLatLng) { buffer.putUint8(146); writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { + } else if (value is PlatformInfoWindow) { buffer.putUint8(147); writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { + } else if (value is PlatformCluster) { buffer.putUint8(148); writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { + } else if (value is PlatformClusterManager) { buffer.putUint8(149); writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { + } else if (value is PlatformMarker) { buffer.putUint8(150); writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { + } else if (value is PlatformPointOfInterest) { buffer.putUint8(151); writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { + } else if (value is PlatformPolygon) { buffer.putUint8(152); writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { + } else if (value is PlatformPolyline) { buffer.putUint8(153); writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { + } else if (value is PlatformPatternItem) { buffer.putUint8(154); writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { + } else if (value is PlatformTile) { buffer.putUint8(155); writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { + } else if (value is PlatformTileOverlay) { buffer.putUint8(156); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { + } else if (value is PlatformEdgeInsets) { buffer.putUint8(157); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { + } else if (value is PlatformLatLng) { buffer.putUint8(158); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { + } else if (value is PlatformLatLngBounds) { buffer.putUint8(159); writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { + } else if (value is PlatformCameraTargetBounds) { buffer.putUint8(160); writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { + } else if (value is PlatformGroundOverlay) { buffer.putUint8(161); writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { + } else if (value is PlatformMapViewCreationParams) { buffer.putUint8(162); writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { + } else if (value is PlatformMapConfiguration) { buffer.putUint8(163); writeValue(buffer, value.encode()); - } else if (value is PlatformSize) { + } else if (value is PlatformPoint) { buffer.putUint8(164); writeValue(buffer, value.encode()); - } else if (value is PlatformColor) { + } else if (value is PlatformSize) { buffer.putUint8(165); writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { + } else if (value is PlatformColor) { buffer.putUint8(166); writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { + } else if (value is PlatformTileLayer) { buffer.putUint8(167); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { + } else if (value is PlatformZoomRange) { buffer.putUint8(168); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { + } else if (value is PlatformBitmap) { buffer.putUint8(169); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { + } else if (value is PlatformBitmapDefaultMarker) { buffer.putUint8(170); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { + } else if (value is PlatformBitmapBytes) { buffer.putUint8(171); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { + } else if (value is PlatformBitmapAsset) { buffer.putUint8(172); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { + } else if (value is PlatformBitmapAssetImage) { buffer.putUint8(173); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { + } else if (value is PlatformBitmapAssetMap) { buffer.putUint8(174); writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapBytesMap) { + buffer.putUint8(175); + writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); } @@ -2468,101 +2706,103 @@ class _PigeonCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 129: + case 129: final value = readValue(buffer) as int?; return value == null ? null : PlatformMapType.values[value]; - case 130: + case 130: final value = readValue(buffer) as int?; return value == null ? null : PlatformJointType.values[value]; - case 131: + case 131: final value = readValue(buffer) as int?; return value == null ? null : PlatformPatternItemType.values[value]; - case 132: + case 132: final value = readValue(buffer) as int?; return value == null ? null : PlatformMapBitmapScaling.values[value]; - case 133: + case 133: return PlatformCameraPosition.decode(readValue(buffer)!); - case 134: + case 134: return PlatformCameraUpdate.decode(readValue(buffer)!); - case 135: + case 135: return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!); - case 136: + case 136: return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!); - case 137: + case 137: return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); - case 138: + case 138: return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); - case 139: + case 139: return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); - case 140: + case 140: return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); - case 141: + case 141: return PlatformCameraUpdateZoom.decode(readValue(buffer)!); - case 142: + case 142: return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); - case 143: + case 143: return PlatformCircle.decode(readValue(buffer)!); - case 144: + case 144: return PlatformHeatmap.decode(readValue(buffer)!); - case 145: + case 145: return PlatformHeatmapGradient.decode(readValue(buffer)!); - case 146: + case 146: return PlatformWeightedLatLng.decode(readValue(buffer)!); - case 147: + case 147: return PlatformInfoWindow.decode(readValue(buffer)!); - case 148: + case 148: return PlatformCluster.decode(readValue(buffer)!); - case 149: + case 149: return PlatformClusterManager.decode(readValue(buffer)!); - case 150: + case 150: return PlatformMarker.decode(readValue(buffer)!); - case 151: + case 151: + return PlatformPointOfInterest.decode(readValue(buffer)!); + case 152: return PlatformPolygon.decode(readValue(buffer)!); - case 152: + case 153: return PlatformPolyline.decode(readValue(buffer)!); - case 153: + case 154: return PlatformPatternItem.decode(readValue(buffer)!); - case 154: + case 155: return PlatformTile.decode(readValue(buffer)!); - case 155: + case 156: return PlatformTileOverlay.decode(readValue(buffer)!); - case 156: + case 157: return PlatformEdgeInsets.decode(readValue(buffer)!); - case 157: + case 158: return PlatformLatLng.decode(readValue(buffer)!); - case 158: + case 159: return PlatformLatLngBounds.decode(readValue(buffer)!); - case 159: + case 160: return PlatformCameraTargetBounds.decode(readValue(buffer)!); - case 160: + case 161: return PlatformGroundOverlay.decode(readValue(buffer)!); - case 161: + case 162: return PlatformMapViewCreationParams.decode(readValue(buffer)!); - case 162: + case 163: return PlatformMapConfiguration.decode(readValue(buffer)!); - case 163: + case 164: return PlatformPoint.decode(readValue(buffer)!); - case 164: + case 165: return PlatformSize.decode(readValue(buffer)!); - case 165: + case 166: return PlatformColor.decode(readValue(buffer)!); - case 166: + case 167: return PlatformTileLayer.decode(readValue(buffer)!); - case 167: + case 168: return PlatformZoomRange.decode(readValue(buffer)!); - case 168: + case 169: return PlatformBitmap.decode(readValue(buffer)!); - case 169: + case 170: return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); - case 170: + case 171: return PlatformBitmapBytes.decode(readValue(buffer)!); - case 171: + case 172: return PlatformBitmapAsset.decode(readValue(buffer)!); - case 172: + case 173: return PlatformBitmapAssetImage.decode(readValue(buffer)!); - case 173: + case 174: return PlatformBitmapAssetMap.decode(readValue(buffer)!); - case 174: + case 175: return PlatformBitmapBytesMap.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -2578,10 +2818,8 @@ class MapsApi { /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty - ? '.$messageChannelSuffix' - : ''; + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -2590,8 +2828,7 @@ class MapsApi { /// Returns once the map instance is available. Future waitForMap() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -2616,19 +2853,14 @@ class MapsApi { /// /// Only non-null configuration values will result in updates; options with /// null values will remain unchanged. - Future updateMapConfiguration( - PlatformMapConfiguration configuration, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; + Future updateMapConfiguration(PlatformMapConfiguration configuration) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [configuration], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2644,21 +2876,14 @@ class MapsApi { } /// Updates the set of circles on the map. - Future updateCircles( - List toAdd, - List toChange, - List idsToRemove, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; + Future updateCircles(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [toAdd, toChange, idsToRemove], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2674,21 +2899,14 @@ class MapsApi { } /// Updates the set of heatmaps on the map. - Future updateHeatmaps( - List toAdd, - List toChange, - List idsToRemove, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; + Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [toAdd, toChange, idsToRemove], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2704,20 +2922,14 @@ class MapsApi { } /// Updates the set of custer managers for clusters on the map. - Future updateClusterManagers( - List toAdd, - List idsToRemove, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; + Future updateClusterManagers(List toAdd, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [toAdd, idsToRemove], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2733,21 +2945,14 @@ class MapsApi { } /// Updates the set of markers on the map. - Future updateMarkers( - List toAdd, - List toChange, - List idsToRemove, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; + Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [toAdd, toChange, idsToRemove], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2763,21 +2968,14 @@ class MapsApi { } /// Updates the set of polygonss on the map. - Future updatePolygons( - List toAdd, - List toChange, - List idsToRemove, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; + Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [toAdd, toChange, idsToRemove], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2793,21 +2991,14 @@ class MapsApi { } /// Updates the set of polylines on the map. - Future updatePolylines( - List toAdd, - List toChange, - List idsToRemove, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; + Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [toAdd, toChange, idsToRemove], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2823,21 +3014,14 @@ class MapsApi { } /// Updates the set of tile overlays on the map. - Future updateTileOverlays( - List toAdd, - List toChange, - List idsToRemove, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; + Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [toAdd, toChange, idsToRemove], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2853,21 +3037,14 @@ class MapsApi { } /// Updates the set of ground overlays on the map. - Future updateGroundOverlays( - List toAdd, - List toChange, - List idsToRemove, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; + Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [toAdd, toChange, idsToRemove], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2884,16 +3061,13 @@ class MapsApi { /// Gets the screen coordinate for the given map location. Future getScreenCoordinate(PlatformLatLng latLng) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [latLng], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2915,16 +3089,13 @@ class MapsApi { /// Gets the map location for the given screen coordinate. Future getLatLng(PlatformPoint screenCoordinate) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [screenCoordinate], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2946,8 +3117,7 @@ class MapsApi { /// Gets the map region currently displayed on the map. Future getVisibleRegion() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -2976,16 +3146,13 @@ class MapsApi { /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. Future moveCamera(PlatformCameraUpdate cameraUpdate) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [cameraUpdate], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3002,20 +3169,14 @@ class MapsApi { /// Moves the camera according to [cameraUpdate], animating the update using a /// duration in milliseconds if provided. - Future animateCamera( - PlatformCameraUpdate cameraUpdate, - int? durationMilliseconds, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; + Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [cameraUpdate, durationMilliseconds], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3032,8 +3193,7 @@ class MapsApi { /// Gets the current map zoom level. Future getZoomLevel() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3061,16 +3221,13 @@ class MapsApi { /// Show the info window for the marker with the given ID. Future showInfoWindow(String markerId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [markerId], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3087,16 +3244,13 @@ class MapsApi { /// Hide the info window for the marker with the given ID. Future hideInfoWindow(String markerId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [markerId], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3114,16 +3268,13 @@ class MapsApi { /// Returns true if the marker with the given ID is currently displaying its /// info window. Future isInfoWindowShown(String markerId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [markerId], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3149,16 +3300,13 @@ class MapsApi { /// If there was an error setting the style, such as an invalid style string, /// returns the error message. Future setStyle(String style) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [style], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3179,8 +3327,7 @@ class MapsApi { /// This allows checking asynchronously for initial style failures, as there /// is no way to return failures from map initialization. Future getLastStyleError() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3203,16 +3350,13 @@ class MapsApi { /// Clears the cache of tiles previously requseted from the tile provider. Future clearTileCache(String tileOverlayId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [tileOverlayId], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3229,8 +3373,7 @@ class MapsApi { /// Takes a snapshot of the map and returns its image data. Future takeSnapshot() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3301,27 +3444,18 @@ abstract class MapsCallbackApi { /// Called when a ground overlay is tapped. void onGroundOverlayTap(String groundOverlayId); + /// Called when a point of interest is tapped. + void onPoiTap(PlatformPointOfInterest poi); + /// Called to get data for a map tile. - Future getTileOverlayTile( - String tileOverlayId, - PlatformPoint location, - int zoom, - ); + Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); - static void setUp( - MapsCallbackApi? api, { - BinaryMessenger? binaryMessenger, - String messageChannelSuffix = '', - }) { - messageChannelSuffix = messageChannelSuffix.isNotEmpty - ? '.$messageChannelSuffix' - : ''; + static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { + messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; { final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { @@ -3331,54 +3465,41 @@ 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.', - ); + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.'); final List args = (message as List?)!; - final PlatformCameraPosition? arg_cameraPosition = - (args[0] as PlatformCameraPosition?); - assert( - arg_cameraPosition != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.', - ); + final PlatformCameraPosition? arg_cameraPosition = (args[0] as PlatformCameraPosition?); + assert(arg_cameraPosition != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.'); try { api.onCameraMove(arg_cameraPosition!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { @@ -3388,468 +3509,373 @@ 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.', - ); + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.'); final List args = (message as List?)!; final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); - assert( - arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.', - ); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); try { api.onTap(arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.', - ); + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.'); final List args = (message as List?)!; final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); - assert( - arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.', - ); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); try { api.onLongPress(arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.', - ); + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); - assert( - arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null, expected non-null String.', - ); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); try { api.onMarkerTap(arg_markerId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.', - ); + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); - assert( - arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.', - ); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert( - arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.', - ); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); try { api.onMarkerDragStart(arg_markerId!, arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.', - ); + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); - assert( - arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null String.', - ); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert( - arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.', - ); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); try { api.onMarkerDrag(arg_markerId!, arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.', - ); + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); - assert( - arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.', - ); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert( - arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.', - ); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); try { api.onMarkerDragEnd(arg_markerId!, arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.', - ); + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.'); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); - assert( - arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.', - ); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); try { api.onInfoWindowTap(arg_markerId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.', - ); + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.'); final List args = (message as List?)!; final String? arg_circleId = (args[0] as String?); - assert( - arg_circleId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null, expected non-null String.', - ); + assert(arg_circleId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null, expected non-null String.'); try { api.onCircleTap(arg_circleId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.', - ); + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.'); final List args = (message as List?)!; final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); - assert( - arg_cluster != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.', - ); + assert(arg_cluster != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); try { api.onClusterTap(arg_cluster!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.', - ); + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.'); final List args = (message as List?)!; final String? arg_polygonId = (args[0] as String?); - assert( - arg_polygonId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null, expected non-null String.', - ); + assert(arg_polygonId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); try { api.onPolygonTap(arg_polygonId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.', - ); + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.'); final List args = (message as List?)!; final String? arg_polylineId = (args[0] as String?); - assert( - arg_polylineId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null, expected non-null String.', - ); + assert(arg_polylineId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); try { api.onPolylineTap(arg_polylineId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.', - ); + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.'); final List args = (message as List?)!; final String? arg_groundOverlayId = (args[0] as String?); - assert( - arg_groundOverlayId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.', - ); + assert(arg_groundOverlayId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); try { api.onGroundOverlayTap(arg_groundOverlayId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.', - ); + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.'); + final List args = (message as List?)!; + final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); + assert(arg_poi != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); + try { + api.onPoiTap(arg_poi!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.'); final List args = (message as List?)!; final String? arg_tileOverlayId = (args[0] as String?); - assert( - arg_tileOverlayId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.', - ); + assert(arg_tileOverlayId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); final PlatformPoint? arg_location = (args[1] as PlatformPoint?); - assert( - arg_location != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.', - ); + assert(arg_location != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); final int? arg_zoom = (args[2] as int?); - assert( - arg_zoom != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.', - ); + assert(arg_zoom != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); try { - final PlatformTile output = await api.getTileOverlayTile( - arg_tileOverlayId!, - arg_location!, - arg_zoom!, - ); + final PlatformTile output = await api.getTileOverlayTile(arg_tileOverlayId!, arg_location!, arg_zoom!); return wrapResponse(result: output); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString()), - ); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); } }); } @@ -3864,13 +3890,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 = '', - }) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty - ? '.$messageChannelSuffix' - : ''; + MapsPlatformViewApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -3878,16 +3900,13 @@ class MapsPlatformViewApi { final String pigeonVar_messageChannelSuffix; Future createView(PlatformMapViewCreationParams? type) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [type], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3908,13 +3927,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 = '', - }) : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty - ? '.$messageChannelSuffix' - : ''; + MapsInspectorApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -3922,8 +3937,7 @@ class MapsInspectorApi { final String pigeonVar_messageChannelSuffix; Future areBuildingsEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3950,8 +3964,7 @@ class MapsInspectorApi { } Future areRotateGesturesEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3978,8 +3991,7 @@ class MapsInspectorApi { } Future areScrollGesturesEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4006,8 +4018,7 @@ class MapsInspectorApi { } Future areTiltGesturesEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4034,8 +4045,7 @@ class MapsInspectorApi { } Future areZoomGesturesEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4062,8 +4072,7 @@ class MapsInspectorApi { } Future isCompassEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4090,8 +4099,7 @@ class MapsInspectorApi { } Future isMyLocationButtonEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4118,8 +4126,7 @@ class MapsInspectorApi { } Future isTrafficEnabled() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4146,16 +4153,13 @@ class MapsInspectorApi { } Future getTileOverlayInfo(String tileOverlayId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [tileOverlayId], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -4170,19 +4174,14 @@ class MapsInspectorApi { } } - Future getGroundOverlayInfo( - String groundOverlayId, - ) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; + Future getGroundOverlayInfo(String groundOverlayId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [groundOverlayId], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -4198,16 +4197,13 @@ class MapsInspectorApi { } Future getHeatmapInfo(String heatmapId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [heatmapId], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([heatmapId]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -4223,8 +4219,7 @@ class MapsInspectorApi { } Future getZoomRange() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4251,16 +4246,13 @@ class MapsInspectorApi { } Future> getClusters(String clusterManagerId) async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send( - [clusterManagerId], - ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -4276,14 +4268,12 @@ class MapsInspectorApi { message: 'Host platform returned null value for non-null return value.', ); } else { - return (pigeonVar_replyList[0] as List?)! - .cast(); + return (pigeonVar_replyList[0] as List?)!.cast(); } } Future getCameraPosition() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index 233e91151b36..097f3d6d9641 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -237,6 +237,20 @@ class PlatformMarker { final String? clusterManagerId; } + +/// Pigeon equivalent of the Point of Interest class. +class PlatformPointOfInterest { + PlatformPointOfInterest({ + required this.position, + required this.name, + required this.placeId, + }); + + final PlatformLatLng position; + final String name; + final String placeId; +} + /// Pigeon equivalent of the Polygon class. class PlatformPolygon { PlatformPolygon({ @@ -823,6 +837,10 @@ abstract class MapsCallbackApi { @ObjCSelector('didTapGroundOverlayWithIdentifier:') void onGroundOverlayTap(String groundOverlayId); + /// Called when a point of interest is tapped. + @ObjCSelector('didTapPointOfInterest:') + void onPoiTap(PlatformPointOfInterest poi); + /// Called to get data for a map tile. @async @ObjCSelector('tileWithOverlayIdentifier:location:zoom:') diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/events/map_event.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/events/map_event.dart index 0d3f47cde019..ead7c7b06832 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/events/map_event.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/events/map_event.dart @@ -128,6 +128,12 @@ class MarkerDragEndEvent extends _PositionedMapEvent { MarkerDragEndEvent(super.mapId, super.position, super.markerId); } +/// An event fired when a [PointOfInterest] is tapped. +class MapPoiTapEvent extends MapEvent { + /// Creates a [MapPoiTapEvent]. + MapPoiTapEvent(super.mapId, super.value); +} + /// An event fired when a [Polyline] is tapped. class PolylineTapEvent extends MapEvent { /// Build an PolylineTap Event triggered from the map represented by `mapId`. diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart index f9ad5d8def7b..d6a74efea92f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart @@ -81,6 +81,7 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { @override Future init(int mapId) { + print("TestPOI: Inside method Channel"); final MethodChannel channel = ensureChannelInitialized(mapId); return channel.invokeMethod('map#waitForMap'); } @@ -143,6 +144,12 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { return _events(mapId).whereType(); } + @override + Stream onPoiTap({required int mapId}) { + print("TestPOI: inside onPoiTap stream"); + return _events(mapId).whereType(); + } + @override Stream onPolylineTap({required int mapId}) { return _events(mapId).whereType(); @@ -174,6 +181,7 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { } Future _handleMethodCall(MethodCall call, int mapId) async { + print("📞 Channel Message: ${call.method} for mapId: $mapId"); switch (call.method) { case 'camera#onMoveStarted': _mapEventStreamController.add(CameraMoveStartedEvent(mapId)); @@ -211,6 +219,7 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { ), ); case 'marker#onDragEnd': + print("💙 Flutter MethodChannel Received POI Tap!"); final Map arguments = _getArgumentDictionary(call); _mapEventStreamController.add( MarkerDragEndEvent( @@ -219,6 +228,21 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { MarkerId(arguments['markerId']! as String), ), ); + + case 'map#onPoiTap': + final Map arguments = _getArgumentDictionary(call); + _mapEventStreamController.add( + MapPoiTapEvent( + mapId, + PointOfInterest( + LatLng.fromJson(arguments['position'])!, + arguments['name']! as String, + arguments['placeId']! as String, + ), + ), + ); + break; + case 'infoWindow#onTap': final Map arguments = _getArgumentDictionary(call); _mapEventStreamController.add( diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart index 06920d3ea741..80372b6b38f8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart @@ -369,6 +369,11 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface { throw UnimplementedError('onMarkerDragEnd() has not been implemented.'); } + /// A [PointOfInterest] has been tapped. + Stream onPoiTap({required int mapId}) { + throw UnimplementedError('onPoiTap() has not been implemented.'); + } + /// A [Polyline] has been tapped. Stream onPolylineTap({required int mapId}) { throw UnimplementedError('onPolylineTap() has not been implemented.'); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/callbacks.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/callbacks.dart index 76dd69455c4b..b3c51b2f97b8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/callbacks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/callbacks.dart @@ -15,6 +15,9 @@ typedef CameraPositionCallback = void Function(CameraPosition position); /// Callback function taking a single argument. typedef ArgumentCallback = void Function(T argument); +/// Callback method for when a [PointOfInterest] is tapped. +typedef POIClickCallback = void Function(PointOfInterest poi); + /// Mutable collection of [ArgumentCallback] instances, itself an [ArgumentCallback]. /// /// Additions and removals happening during a single [call] invocation do not diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/point_of_interest.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/point_of_interest.dart new file mode 100644 index 000000000000..e241ca7213b1 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/point_of_interest.dart @@ -0,0 +1,47 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/foundation.dart' show immutable; + +import 'types.dart'; + +/// A point of interest (POI) on the map, such as a park, school, or business. +/// +/// This object is returned when a user taps on a POI on the map. +@immutable +class PointOfInterest { + /// Creates an immutable representation of a point of interest. + const PointOfInterest(this.position, this.name, this.placeId); + + /// The geographical location of the POI. + final LatLng position; + + /// The name of the POI (e.g., "Googleplex"). + final String name; + + /// The unique Place ID defined by Google (e.g., "ChIJj61dQgK6j4AR4GeTYWZsKWw"). + final String placeId; + + @override + bool operator ==(Object other) { + if (identical(this, other)) { + return true; + } + if (other.runtimeType != runtimeType) { + return false; + } + return other is PointOfInterest && + position == other.position && + name == other.name && + placeId == other.placeId; + } + + @override + int get hashCode => Object.hash(position, name, placeId); + + @override + String toString() { + return 'PointOfInterest{position: $position, name: $name, placeId: $placeId}'; + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart index a2483a24c544..a48e2eefcdae 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart @@ -27,6 +27,7 @@ export 'maps_object_updates.dart'; export 'marker.dart'; export 'marker_updates.dart'; export 'pattern_item.dart'; +export 'point_of_interest.dart'; export 'polygon.dart'; export 'polygon_updates.dart'; export 'polyline.dart'; From 18d0e199a7141791eae8e5f00158b616fa4b1231 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Wed, 4 Feb 2026 19:15:16 +0530 Subject: [PATCH 02/46] [google_maps_flutter] Added example for Point of Interest Tapping --- .../google_maps_flutter/example/lib/main.dart | 2 + .../example/lib/place_poi.dart | 88 +++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart index 2cee263eeba3..aad729c6b47a 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart @@ -28,6 +28,7 @@ import 'place_polyline.dart'; import 'scrolling_map.dart'; import 'snapshot.dart'; import 'tile_overlay.dart'; +import 'place_poi.dart'; final List _allPages = [ const MapUiPage(), @@ -41,6 +42,7 @@ final List _allPages = [ const PlacePolylinePage(), const PlacePolygonPage(), const PlaceCirclePage(), + const PlacePoiPage(), const PaddingPage(), const SnapshotPage(), const LiteModePage(), diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart new file mode 100644 index 000000000000..3696de557cb6 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart @@ -0,0 +1,88 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; + +import 'page.dart'; + +class PlacePoiPage extends GoogleMapExampleAppPage { + const PlacePoiPage({super.key}) + : super(const Icon(Icons.business), 'Place POI'); + + @override + Widget build(BuildContext context) { + return const PlacePoiBody(); + } +} + +class PlacePoiBody extends StatefulWidget { + const PlacePoiBody({super.key}); + + @override + State createState() => PlacePoiBodyState(); +} + +class PlacePoiBodyState extends State { + GoogleMapController? controller; + PointOfInterest? _lastPoi; + + final CameraPosition _kSydney = const CameraPosition( + target: LatLng(22.54222641620606, 88.34560669761545), + zoom: 16.0, + ); + + void _onMapCreated(GoogleMapController controller) { + this.controller = controller; + } + + void _onPoiTap(PointOfInterest poi) { + setState(() { + _lastPoi = poi; + }); + + controller?.animateCamera(CameraUpdate.newLatLng(poi.position)); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Expanded( + child: GoogleMap( + onMapCreated: _onMapCreated, + initialCameraPosition: _kSydney, + onPoiTap: _onPoiTap, + myLocationButtonEnabled: false, + mapType: MapType.normal, + ), + ), + Container( + color: Colors.white, + width: double.infinity, + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + const Text( + 'Last Tapped POI:', + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16), + ), + const SizedBox(height: 8), + if (_lastPoi != null) ...[ + Text('Name: ${_lastPoi!.name}'), + Text('Place ID: ${_lastPoi!.placeId}'), + Text( + 'Lat/Lng: ${_lastPoi!.position.latitude.toStringAsFixed(5)}, ${_lastPoi!.position.longitude.toStringAsFixed(5)}', + ), + ] else + const Text('Tap on a business or landmark icon...'), + ], + ), + ), + ], + ); + } +} From fa00c6ac3824e05976ea404ce6e978335ec1b83d Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Wed, 4 Feb 2026 20:45:11 +0530 Subject: [PATCH 03/46] [google_maps_flutter] Added tests for onPoiTap Callback --- .../fake_google_maps_flutter_platform.dart | 5 +++ .../test/google_map_test.dart | 33 +++++++++++++++++++ .../googlemaps/GoogleMapControllerTest.java | 14 ++++++++ .../lib/src/google_maps_flutter_android.dart | 1 - .../method_channel_google_maps_flutter.dart | 4 --- ...thod_channel_google_maps_flutter_test.dart | 32 ++++++++++++++++++ 6 files changed, 84 insertions(+), 5 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/test/fake_google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter/test/fake_google_maps_flutter_platform.dart index fe0439d6c69d..e1c8b29b46a6 100644 --- a/packages/google_maps_flutter/google_maps_flutter/test/fake_google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter/test/fake_google_maps_flutter_platform.dart @@ -280,6 +280,11 @@ class FakeGoogleMapsFlutterPlatform extends GoogleMapsFlutterPlatform { return mapEventStreamController.stream.whereType(); } + @override + Stream onPoiTap({required int mapId}) { + return mapEventStreamController.stream.whereType(); + } + @override Stream onLongPress({required int mapId}) { return mapEventStreamController.stream.whereType(); diff --git a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart index 4aedfdbb78f8..0c7621295cea 100644 --- a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart @@ -659,4 +659,37 @@ void main() { expect(map.tileOverlaySets.length, 1); }); + + testWidgets('onPoiTap callback is called', (WidgetTester tester) async { + PointOfInterest? tappedPoi; + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: GoogleMap( + initialCameraPosition: const CameraPosition(target: LatLng(0, 0)), + onPoiTap: (PointOfInterest poi) => tappedPoi = poi, + ), + ), + ); + + // 🔥 IMPORTANT: Wait for the map initialization (onMapCreated) to complete + await tester.pumpAndSettle(); + + final FakeGoogleMapsFlutterPlatform platform = + GoogleMapsFlutterPlatform.instance as FakeGoogleMapsFlutterPlatform; + + final PointOfInterest poi = PointOfInterest( + const LatLng(10, 10), + 'name', + 'id', + ); + + // 🔥 Inject the event through the stream controller + platform.mapEventStreamController.add(MapPoiTapEvent(0, poi)); + + // 🔥 Wait for the stream event to be processed by the listener in _GoogleMapState + await tester.pump(); + + expect(tappedPoi, poi); + }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java index d2339531eba1..f83c57e5016a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java @@ -317,4 +317,18 @@ public void getCameraPositionReturnsCorrectData() { Assert.assertEquals(cameraPosition.tilt, result.getTilt(), 1e-15); Assert.assertEquals(cameraPosition.bearing, result.getBearing(), 1e-15); } + + @Test + public void onPoiClick_SendsMethodCall() { + PointOfInterest poi = new PointOfInterest(new LatLng(1.0, 2.0), "placeId", "name"); + + // controller is the instance of GoogleMapController in your test file + controller.onPoiClick(poi); + + // Verify the messenger sent the message to the correct channel + verify(binaryMessenger).send( + eq("plugins.flutter.io/google_maps_0"), + any(ByteBuffer.class), + any(BinaryMessenger.BinaryReply.class)); + } } 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 fc1296abd57d..bc6eb1e2cdb6 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 @@ -1264,7 +1264,6 @@ class HostMapMessageHandler implements MapsCallbackApi { @override void onPoiTap(PlatformPointOfInterest poi) { - print('🎯 DART HostMapMessageHandler.onPoiTap received: ${poi.name}'); streamController.add( MapPoiTapEvent( mapId, diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart index d6a74efea92f..8b5c140cc81d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart @@ -81,7 +81,6 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { @override Future init(int mapId) { - print("TestPOI: Inside method Channel"); final MethodChannel channel = ensureChannelInitialized(mapId); return channel.invokeMethod('map#waitForMap'); } @@ -146,7 +145,6 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { @override Stream onPoiTap({required int mapId}) { - print("TestPOI: inside onPoiTap stream"); return _events(mapId).whereType(); } @@ -181,7 +179,6 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { } Future _handleMethodCall(MethodCall call, int mapId) async { - print("📞 Channel Message: ${call.method} for mapId: $mapId"); switch (call.method) { case 'camera#onMoveStarted': _mapEventStreamController.add(CameraMoveStartedEvent(mapId)); @@ -219,7 +216,6 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { ), ); case 'marker#onDragEnd': - print("💙 Flutter MethodChannel Received POI Tap!"); final Map arguments = _getArgumentDictionary(call); _mapEventStreamController.add( MarkerDragEndEvent( diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/method_channel/method_channel_google_maps_flutter_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/method_channel/method_channel_google_maps_flutter_test.dart index 83d9adfe247d..75db63d88708 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/method_channel/method_channel_google_maps_flutter_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/method_channel/method_channel_google_maps_flutter_test.dart @@ -138,5 +138,37 @@ void main() { equals('drag-end-marker'), ); }); + test('onPoiTap', () async { + final MethodChannelGoogleMapsFlutter platform = + MethodChannelGoogleMapsFlutter(); + const int mapId = 0; + platform.ensureChannelInitialized(mapId); + + final List events = []; + platform + .onPoiTap(mapId: mapId) + .listen((MapPoiTapEvent event) => events.add(event)); + + final Map poiData = { + 'placeId': 'place123', + 'name': 'Googleplex', + 'position': [37.422, -122.084], + }; + + await platform + .ensureChannelInitialized(mapId) + .binaryMessenger + .handlePlatformMessage( + 'plugins.flutter.io/google_maps_0', + const StandardMethodCodec().encodeMethodCall( + MethodCall('map#onPoiTap', poiData), + ), + (ByteData? data) {}, + ); + + expect(events.length, 1); + expect(events[0].value.name, 'Googleplex'); + expect(events[0].value.placeId, 'place123'); + }); }); } From ca71a075abb10307f18d7a927590238980d6c9a6 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Wed, 4 Feb 2026 20:46:29 +0530 Subject: [PATCH 04/46] [google_maps_flutter] Updated Changelogs and Pubspec.yml files --- .../google_maps_flutter/google_maps_flutter/CHANGELOG.md | 5 +++++ .../google_maps_flutter/google_maps_flutter/pubspec.yaml | 8 ++++---- .../google_maps_flutter_android/CHANGELOG.md | 4 ++++ .../google_maps_flutter_android/pubspec.yaml | 4 ++-- .../google_maps_flutter_ios/CHANGELOG.md | 4 ++++ .../google_maps_flutter_ios/pubspec.yaml | 4 ++-- .../google_maps_flutter_platform_interface/CHANGELOG.md | 5 +++++ .../google_maps_flutter_platform_interface/pubspec.yaml | 2 +- 8 files changed, 27 insertions(+), 9 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md index b2c1be73c130..6579ae788e94 100644 --- a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.15.0 + +* Adds `onPoiTap` support to the `GoogleMap` widget to handle taps on base map landmarks and businesses. +* Adds a "Place POI" example to the example app. + ## 2.14.1 * Replaces internal use of deprecated methods. diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index d928fb3b21f5..09e15a27a48e 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter description: A Flutter plugin for integrating Google Maps in iOS and Android applications. repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 2.14.1 +version: 2.15.0 environment: sdk: ^3.8.0 @@ -21,9 +21,9 @@ flutter: dependencies: flutter: sdk: flutter - google_maps_flutter_android: ^2.16.1 - google_maps_flutter_ios: ^2.15.4 - google_maps_flutter_platform_interface: ^2.14.0 + google_maps_flutter_android: ^2.19.0 + google_maps_flutter_ios: ^2.18.0 + google_maps_flutter_platform_interface: ^2.15.0 google_maps_flutter_web: ^0.5.14 dev_dependencies: 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 21b41d813f9b..ad76f7545c97 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.19.0 + +* Implements `onPoiTap` support for Android using `OnPoiClickListener`. + ## 2.18.12 * Bumps com.google.maps.android:android-maps-utils from 3.20.1 to 4.0.0. 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 d721130dfee1..1b4bee76a545 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.18.12 +version: 2.19.0 environment: sdk: ^3.9.0 @@ -21,7 +21,7 @@ dependencies: flutter: sdk: flutter flutter_plugin_android_lifecycle: ^2.0.1 - google_maps_flutter_platform_interface: ^2.13.0 + google_maps_flutter_platform_interface: ^2.15.0 stream_transform: ^2.0.0 dev_dependencies: diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md index 5e577772cba2..234dfa5e1170 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.18.0 + +* Implements `onPoiTap` support for iOS using `didTapPOIWithPlaceID`. + ## 2.17.0 * Restructures code to prepare for SwiftPM support. diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml index d2b6449e77e3..35b7c131c74a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter_ios description: iOS implementation of the google_maps_flutter plugin. repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_ios issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 2.17.0 +version: 2.18.0 environment: sdk: ^3.9.0 @@ -19,7 +19,7 @@ flutter: dependencies: flutter: sdk: flutter - google_maps_flutter_platform_interface: ^2.13.0 + google_maps_flutter_platform_interface: ^2.14.0 stream_transform: ^2.0.0 dev_dependencies: diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md index 163cb160043b..be29338d9f15 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.15.0 + +* Adds `PointOfInterest` type. +* Adds `MapPoiTapEvent` to support point-of-interest tap events. + ## 2.14.1 * Replaces internal use of deprecated methods. diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml index 9aa5ed828406..92bf349686d9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml @@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/google_maps_f issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 # NOTE: We strongly prefer non-breaking changes, even at the expense of a # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes -version: 2.14.1 +version: 2.15.0 environment: sdk: ^3.8.0 From 2aa24ed1c871ace3421aaccf22295f476f76a4cf Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury <85804741+AsimRoyChowdhury@users.noreply.github.com> Date: Wed, 4 Feb 2026 20:54:49 +0530 Subject: [PATCH 05/46] Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- .../google_maps_flutter/example/lib/place_poi.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart index 3696de557cb6..17ff873eb563 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart @@ -28,7 +28,7 @@ class PlacePoiBodyState extends State { GoogleMapController? controller; PointOfInterest? _lastPoi; - final CameraPosition _kSydney = const CameraPosition( + final CameraPosition _kKolkata = const CameraPosition( target: LatLng(22.54222641620606, 88.34560669761545), zoom: 16.0, ); From 3c8b5b6ee3fbf94f2525a0192f9907f64eeeb019 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Thu, 5 Feb 2026 20:22:29 +0530 Subject: [PATCH 06/46] [google_maps_flutter] corrected version for google_maps_flutter_platform_interface --- .../google_maps_flutter/google_maps_flutter_ios/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml index 35b7c131c74a..a80547846148 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml @@ -19,7 +19,7 @@ flutter: dependencies: flutter: sdk: flutter - google_maps_flutter_platform_interface: ^2.14.0 + google_maps_flutter_platform_interface: ^2.15.0 stream_transform: ^2.0.0 dev_dependencies: From d54f1b399dfb4e5a55ebd4c99963818219234524 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Thu, 5 Feb 2026 20:23:05 +0530 Subject: [PATCH 07/46] [google_maps_flutter] removed redundant import --- .../google_maps_flutter/lib/google_maps_flutter.dart | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart index 4b0e26a9a09f..470469d73a68 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart @@ -12,8 +12,6 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter_android/google_maps_flutter_android.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; -import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; - export 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart' show ArgumentCallback, From 904a09251e039705fee4fa326bc6f88dde9e666d Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Thu, 5 Feb 2026 21:05:30 +0530 Subject: [PATCH 08/46] [google_maps_flutter] changed tester.pumpAndSettle() to await on onMapCreated --- .../test/google_map_test.dart | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart index 0c7621295cea..e43c0f9c9a8a 100644 --- a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart @@ -661,33 +661,37 @@ void main() { }); testWidgets('onPoiTap callback is called', (WidgetTester tester) async { + // 1. Setup variables to capture the result PointOfInterest? tappedPoi; + final Completer mapCreatedCompleter = Completer(); + await tester.pumpWidget( Directionality( textDirection: TextDirection.ltr, child: GoogleMap( initialCameraPosition: const CameraPosition(target: LatLng(0, 0)), onPoiTap: (PointOfInterest poi) => tappedPoi = poi, + // 2. Signal when initialization is done + onMapCreated: (_) => mapCreatedCompleter.complete(), ), ), ); - // 🔥 IMPORTANT: Wait for the map initialization (onMapCreated) to complete - await tester.pumpAndSettle(); + // 3. 🔥 FIX: Wait for the logic-specific Future, NOT a rendering timer + await mapCreatedCompleter.future; - final FakeGoogleMapsFlutterPlatform platform = + final platform = GoogleMapsFlutterPlatform.instance as FakeGoogleMapsFlutterPlatform; - final PointOfInterest poi = PointOfInterest( + const poi = PointOfInterest( const LatLng(10, 10), 'name', 'id', ); - // 🔥 Inject the event through the stream controller + // 4. Inject the event platform.mapEventStreamController.add(MapPoiTapEvent(0, poi)); - // 🔥 Wait for the stream event to be processed by the listener in _GoogleMapState await tester.pump(); expect(tappedPoi, poi); From 7b8f809e055a5662ded301f1c381123aad4b0452 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Thu, 5 Feb 2026 21:06:07 +0530 Subject: [PATCH 09/46] [google_maps_flutter] removed unnecessary logging to console --- .../java/io/flutter/plugins/googlemaps/GoogleMapController.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java index 03328d51a2d1..a3db16a53da2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java @@ -373,8 +373,6 @@ public void onMarkerDragEnd(Marker marker) { @Override public void onPoiClick(PointOfInterest poi) { - Log.e("POI_TEST", "Native POI Click Detected: " + poi.name); - Log.e("POI_TEST", "Native Tap! Sending to Channel ID: " + id); Messages.PlatformPointOfInterest platformPoi = new Messages.PlatformPointOfInterest.Builder() .setPosition(Convert.latLngToPigeon(poi.latLng)) From e8d06826a7b9c801c03a63bbf87ac16c341b6f43 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Thu, 5 Feb 2026 21:08:09 +0530 Subject: [PATCH 10/46] [google_maps_flutter] changed the test code to test for the actual message content being passed rather than the detecting if a binary message is being sent --- .../googlemaps/GoogleMapControllerTest.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java index f83c57e5016a..8fe639bf22e7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java @@ -319,16 +319,19 @@ public void getCameraPositionReturnsCorrectData() { } @Test - public void onPoiClick_SendsMethodCall() { + public void onPoiClick_sendsCorrectData() { + // Assuming 'controller' and 'flutterApi' are set up as in other tests. PointOfInterest poi = new PointOfInterest(new LatLng(1.0, 2.0), "placeId", "name"); - - // controller is the instance of GoogleMapController in your test file + controller.onPoiClick(poi); - // Verify the messenger sent the message to the correct channel - verify(binaryMessenger).send( - eq("plugins.flutter.io/google_maps_0"), - any(ByteBuffer.class), - any(BinaryMessenger.BinaryReply.class)); + ArgumentCaptor poiCaptor = ArgumentCaptor.forClass(Messages.PlatformPointOfInterest.class); + verify(flutterApi).onPoiTap(poiCaptor.capture(), any(Messages.VoidResult.class)); + + Messages.PlatformPointOfInterest capturedPoi = poiCaptor.getValue(); + assertEquals("name", capturedPoi.getName()); + assertEquals("placeId", capturedPoi.getPlaceId()); + assertEquals(1.0, capturedPoi.getPosition().getLatitude(), 1e-6); + assertEquals(2.0, capturedPoi.getPosition().getLongitude(), 1e-6); } } From 752925fa3855f04ba703e3f242110f1ecaa7a718 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Thu, 5 Feb 2026 21:08:47 +0530 Subject: [PATCH 11/46] [google_maps_flutter] removed the unnecessary POIClickCallback typedef --- .../lib/src/types/callbacks.dart | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/callbacks.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/callbacks.dart index b3c51b2f97b8..76dd69455c4b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/callbacks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/callbacks.dart @@ -15,9 +15,6 @@ typedef CameraPositionCallback = void Function(CameraPosition position); /// Callback function taking a single argument. typedef ArgumentCallback = void Function(T argument); -/// Callback method for when a [PointOfInterest] is tapped. -typedef POIClickCallback = void Function(PointOfInterest poi); - /// Mutable collection of [ArgumentCallback] instances, itself an [ArgumentCallback]. /// /// Additions and removals happening during a single [call] invocation do not From 69ecb49ddec8e220285edeeb16bd4e590cf3ecdb Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Fri, 6 Feb 2026 00:02:13 +0530 Subject: [PATCH 12/46] [google_maps_flutter] added support for onPoiTap for flutter web --- .../lib/src/google_maps_controller.dart | 25 ++++++++++++++++--- .../lib/src/google_maps_flutter_web.dart | 5 ++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index 8e862f6e3dd7..c5f02b906b8e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -260,9 +260,28 @@ class GoogleMapController { ) { assert(event.latLng != null); if (!_streamController.isClosed) { - _streamController.add( - MapTapEvent(_mapId, gmLatLngToLatLng(event.latLng!)), - ); + if (event is gmaps.IconMouseEvent && event.placeId != null) { + final String placeId = event.placeId!; + + // Stop the event to prevent the default Google Maps InfoWindow from popping up + event.stop(); + + _streamController.add( + MapPoiTapEvent( + _mapId, + PointOfInterest( + gmLatLngToLatLng(event.latLng!), + '', // Name is not available in the Web SDK click event + placeId, + ), + ), + ); + } else { + // If no placeId, treat it as a standard map tap + _streamController.add( + MapTapEvent(_mapId, gmLatLngToLatLng(event.latLng!)), + ); + } } }); _onRightClickSubscription = map.onRightclick.listen(( diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart index e980252e7c89..fd83749d4c21 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart @@ -289,6 +289,11 @@ class GoogleMapsPlugin extends GoogleMapsFlutterPlatform { return _events(mapId).whereType(); } + @override + Stream onPoiTap({required int mapId}) { + return _events(mapId).whereType(); + } + @override Stream onTap({required int mapId}) { return _events(mapId).whereType(); From 8e522fa5c00adab97e8ea231aa9649a5d8e1133c Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Fri, 6 Feb 2026 00:04:01 +0530 Subject: [PATCH 13/46] [google_maps_flutter] created tests for onPoiTap Callback for flutter web --- .../example/integration_test/poi_test.dart | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart new file mode 100644 index 000000000000..bea64e0dcca3 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart @@ -0,0 +1,102 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:async'; +import 'dart:js_interop'; + +import 'package:flutter/widgets.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:google_maps/google_maps.dart' as gmaps; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; +import 'package:google_maps_flutter_web/google_maps_flutter_web.dart'; +import 'package:google_maps_flutter_web/src/utils.dart'; +import 'package:integration_test/integration_test.dart'; + + + +@JS() +@anonymous +extension type FakeIconMouseEvent._(JSObject _) implements JSObject { + external factory FakeIconMouseEvent({ + gmaps.LatLng? latLng, + String? placeId, + JSFunction? stop, + }); +} + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('POI Tap Events', () { + late GoogleMapController controller; + late StreamController> stream; + late gmaps.Map map; + + setUp(() { + stream = StreamController>.broadcast(); + map = gmaps.Map(createDivElement()); + + controller = GoogleMapController( + mapId: 1, + streamController: stream, + widgetConfiguration: const MapWidgetConfiguration( + initialCameraPosition: CameraPosition(target: LatLng(0, 0)), + textDirection: TextDirection.ltr, + ), + ); + + controller.debugSetOverrides(createMap: (_, __) => map); + controller.init(); + }); + + tearDown(() { + controller.dispose(); + }); + + testWidgets('Emits MapPoiTapEvent when clicking a POI', (WidgetTester tester) async { + final latLng = gmaps.LatLng(10, 20); + bool stopCalled = false; + + final event = FakeIconMouseEvent( + latLng: latLng, + placeId: 'test_place_id', + stop: (() { + stopCalled = true; + }).toJS, + ); + gmaps.event.trigger(map, 'click', event as JSAny); + + final MapEvent emittedEvent = await stream.stream.first; + + expect(emittedEvent, isA()); + final poiEvent = emittedEvent as MapPoiTapEvent; + + expect(poiEvent.mapId, 1); + expect(poiEvent.value.placeId, 'test_place_id'); + expect(poiEvent.value.position.latitude, 10); + expect(poiEvent.value.position.longitude, 20); + + expect(stopCalled, isTrue); + }); + + testWidgets('Emits MapTapEvent when clicking (no POI)', (WidgetTester tester) async { + final latLng = gmaps.LatLng(30, 40); + final event = gmaps.MapMouseEvent() + ..latLng = latLng; + + gmaps.event.trigger(map, 'click', event); + + final MapEvent emittedEvent = await stream.stream.first; + + expect(emittedEvent, isA()); + final tapEvent = emittedEvent as MapTapEvent; + + expect(tapEvent.mapId, 1); + expect(tapEvent.position.latitude, 30); + expect(tapEvent.position.longitude, 40); + + expect(emittedEvent, isNot(isA())); + }); + }); +} \ No newline at end of file From 7552d2379acf3114bbaaabf4ca3298d39777dfcb Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Fri, 6 Feb 2026 00:13:33 +0530 Subject: [PATCH 14/46] [google_maps_flutter] updated versions for google map flutter web package --- packages/google_maps_flutter/google_maps_flutter/pubspec.yaml | 2 +- .../google_maps_flutter_web/example/pubspec.yaml | 2 +- .../google_maps_flutter/google_maps_flutter_web/pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index 09e15a27a48e..62641cbcfe7a 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: google_maps_flutter_android: ^2.19.0 google_maps_flutter_ios: ^2.18.0 google_maps_flutter_platform_interface: ^2.15.0 - google_maps_flutter_web: ^0.5.14 + google_maps_flutter_web: ^0.6.0+4 dev_dependencies: flutter_test: diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml index a82a05b9be17..e3bc7ed1744d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml @@ -8,7 +8,7 @@ environment: dependencies: flutter: sdk: flutter - google_maps_flutter_platform_interface: ^2.14.0 + google_maps_flutter_platform_interface: ^2.15.0 google_maps_flutter_web: path: ../ web: ^1.0.0 diff --git a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml index f87b3ea66e81..944705e23404 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter_web description: Web platform implementation of google_maps_flutter repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_web issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 0.5.14+3 +version: 0.6.0+4 environment: sdk: ^3.9.0 From 3145ae7b2342efee2ed0594a23ad20580381d23c Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Fri, 6 Feb 2026 12:28:22 +0530 Subject: [PATCH 15/46] [google_maps_flutter] added dependency overrides for gogle_maps_flutter_interface --- .../google_maps_flutter/example/pubspec.yaml | 1 + .../google_maps_flutter/google_maps_flutter/pubspec.yaml | 1 + .../google_maps_flutter_android/example/pubspec.yaml | 1 + .../google_maps_flutter_android/pubspec.yaml | 1 + .../google_maps_flutter_ios/example/pubspec.yaml | 1 + .../google_maps_flutter_ios/pubspec.yaml | 1 + .../google_maps_flutter_web/example/pubspec.yaml | 7 +------ .../google_maps_flutter_web/pubspec.yaml | 1 + 8 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml index 0e002e4f535a..bfb64ef9ba44 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml @@ -33,3 +33,4 @@ flutter: uses-material-design: true assets: - assets/ +dependency_overrides: {} diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index 62641cbcfe7a..abb2ed158748 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -41,3 +41,4 @@ topics: # The example deliberately includes limited-use secrets. false_secrets: - /example/web/index.html +dependency_overrides: {} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml index 58cec3dcf1a5..d46f9b83d336 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml @@ -33,3 +33,4 @@ flutter: uses-material-design: true assets: - assets/ +dependency_overrides: {} 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 1b4bee76a545..5fdcf3cd0258 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml @@ -37,3 +37,4 @@ topics: - google-maps - google-maps-flutter - map +dependency_overrides: {} diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml index 72b3f21ed9ca..21e1f7a0378e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml @@ -31,3 +31,4 @@ flutter: uses-material-design: true assets: - assets/ +dependency_overrides: {} diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml index a80547846148..e6a9b152b814 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml @@ -35,3 +35,4 @@ topics: - google-maps - google-maps-flutter - map +dependency_overrides: {} diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml index e3bc7ed1744d..b15fd9142d5f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml @@ -28,9 +28,4 @@ flutter: assets: - assets/ -dependency_overrides: - # Override the google_maps_flutter dependency on google_maps_flutter_web. - # TODO(ditman): Unwind the circular dependency. This will create problems - # if we need to make a breaking change to google_maps_flutter_web. - google_maps_flutter_web: - path: ../ +dependency_overrides: {} diff --git a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml index 944705e23404..f224bb1cdb6c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml @@ -40,3 +40,4 @@ topics: # The example deliberately includes limited-use secrets. false_secrets: - /example/web/index.html +dependency_overrides: {} From 4e0803ebf01c831fb3f7aee8cd4c6353749d6cfa Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Fri, 6 Feb 2026 13:43:14 +0530 Subject: [PATCH 16/46] [google_maps_flutter] updated dependency overrides --- .../google_maps_flutter/example/pubspec.yaml | 16 +++++++++++++--- .../google_maps_flutter/pubspec.yaml | 10 +++++++++- .../example/pubspec.yaml | 6 ++++-- .../google_maps_flutter_android/pubspec.yaml | 4 +++- .../google_maps_flutter_ios/example/pubspec.yaml | 6 ++++-- .../google_maps_flutter_ios/pubspec.yaml | 4 +++- .../google_maps_flutter_web/example/pubspec.yaml | 13 +++++++++++-- .../google_maps_flutter_web/pubspec.yaml | 6 ++++-- 8 files changed, 51 insertions(+), 14 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml index bfb64ef9ba44..e81c3ac39e63 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml @@ -18,8 +18,8 @@ dependencies: # The example app is bundled with the plugin so we use a path dependency on # the parent directory to use the current plugin's version. path: ../ - google_maps_flutter_android: ^2.16.1 - google_maps_flutter_platform_interface: ^2.14.0 + google_maps_flutter_android: ^2.19.0 + google_maps_flutter_platform_interface: ^2.15.0 dev_dependencies: build_runner: ^2.1.10 @@ -33,4 +33,14 @@ flutter: uses-material-design: true assets: - assets/ -dependency_overrides: {} +dependency_overrides: + google_maps_flutter_web: + path: ../../google_maps_flutter_web + google_maps_flutter_platform_interface: + path: ../../google_maps_flutter_platform_interface + google_maps_flutter: + path: ../ + google_maps_flutter_android: + path: ../../google_maps_flutter_android + google_maps_flutter_ios: + path: ../../google_maps_flutter_ios diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index abb2ed158748..150fb8baf1f1 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -41,4 +41,12 @@ topics: # The example deliberately includes limited-use secrets. false_secrets: - /example/web/index.html -dependency_overrides: {} +dependency_overrides: + google_maps_flutter_android: + path: ../google_maps_flutter_android + google_maps_flutter_ios: + path: ../google_maps_flutter_ios + google_maps_flutter_platform_interface: + path: ../google_maps_flutter_platform_interface + google_maps_flutter_web: + path: ../google_maps_flutter_web diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml index d46f9b83d336..ba52ecaa2f46 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: # The example app is bundled with the plugin so we use a path dependency on # the parent directory to use the current plugin's version. path: ../ - google_maps_flutter_platform_interface: ^2.13.0 + google_maps_flutter_platform_interface: ^2.15.0 dev_dependencies: build_runner: ^2.1.10 @@ -33,4 +33,6 @@ flutter: uses-material-design: true assets: - assets/ -dependency_overrides: {} +dependency_overrides: + google_maps_flutter_platform_interface: + path: ../../google_maps_flutter_platform_interface diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml index 5fdcf3cd0258..bac69828a9a9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml @@ -37,4 +37,6 @@ topics: - google-maps - google-maps-flutter - map -dependency_overrides: {} +dependency_overrides: + google_maps_flutter_platform_interface: + path: ../google_maps_flutter_platform_interface diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml index 21e1f7a0378e..e2b9b6898439 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: # The example app is bundled with the plugin so we use a path dependency on # the parent directory to use the current plugin's version. path: ../ - google_maps_flutter_platform_interface: ^2.13.0 + google_maps_flutter_platform_interface: ^2.15.0 dev_dependencies: flutter_test: @@ -31,4 +31,6 @@ flutter: uses-material-design: true assets: - assets/ -dependency_overrides: {} +dependency_overrides: + google_maps_flutter_platform_interface: + path: ../../google_maps_flutter_platform_interface diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml index e6a9b152b814..eaf316617735 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml @@ -35,4 +35,6 @@ topics: - google-maps - google-maps-flutter - map -dependency_overrides: {} +dependency_overrides: + google_maps_flutter_platform_interface: + path: ../google_maps_flutter_platform_interface diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml index b15fd9142d5f..69866e854123 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml @@ -27,5 +27,14 @@ dev_dependencies: flutter: assets: - assets/ - -dependency_overrides: {} +dependency_overrides: + google_maps_flutter_web: + path: ../ + google_maps_flutter_platform_interface: + path: ../../google_maps_flutter_platform_interface + google_maps_flutter: + path: ../../google_maps_flutter + google_maps_flutter_android: + path: ../../google_maps_flutter_android + google_maps_flutter_ios: + path: ../../google_maps_flutter_ios diff --git a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml index f224bb1cdb6c..8f9cfd8ff577 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: flutter_web_plugins: sdk: flutter google_maps: ^8.1.0 - google_maps_flutter_platform_interface: ^2.14.0 + google_maps_flutter_platform_interface: ^2.15.0 sanitize_html: ^2.0.0 stream_transform: ^2.0.0 web: ">=0.5.1 <2.0.0" @@ -40,4 +40,6 @@ topics: # The example deliberately includes limited-use secrets. false_secrets: - /example/web/index.html -dependency_overrides: {} +dependency_overrides: + google_maps_flutter_platform_interface: + path: ../google_maps_flutter_platform_interface From 2382ad421685f4b0834a6831a67fc2ab2fe01113 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 00:14:56 +0530 Subject: [PATCH 17/46] [google_maps_flutter] changed the onPoiTap to accept named paramters instead of positional parameters and also made name nullable --- .../example/lib/place_poi.dart | 2 +- .../example/lib/example_google_map.dart | 11 +++ .../example/lib/main.dart | 2 + .../example/lib/place_poi.dart | 89 +++++++++++++++++++ .../lib/src/google_maps_flutter_android.dart | 6 +- .../lib/src/messages.g.dart | 4 +- .../pigeons/messages.dart | 4 +- .../lib/src/google_maps_flutter_ios.dart | 6 +- .../lib/src/messages.g.dart | 4 +- .../pigeons/messages.dart | 4 +- .../method_channel_google_maps_flutter.dart | 6 +- .../lib/src/types/point_of_interest.dart | 8 +- .../lib/src/google_maps_controller.dart | 6 +- 13 files changed, 129 insertions(+), 23 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart index 17ff873eb563..a65d0a3e2e98 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart @@ -52,7 +52,7 @@ class PlacePoiBodyState extends State { Expanded( child: GoogleMap( onMapCreated: _onMapCreated, - initialCameraPosition: _kSydney, + initialCameraPosition: _kKolkata, onPoiTap: _onPoiTap, myLocationButtonEnabled: false, mapType: MapType.normal, diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart index 518304c93fd9..8698b8a4eaa5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart @@ -101,6 +101,9 @@ class ExampleGoogleMapController { GoogleMapsFlutterPlatform.instance .onTap(mapId: mapId) .listen((MapTapEvent e) => _googleMapState.onTap(e.position)); + GoogleMapsFlutterPlatform.instance + .onPoiTap(mapId: mapId) + .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)); GoogleMapsFlutterPlatform.instance .onLongPress(mapId: mapId) .listen( @@ -307,6 +310,7 @@ class ExampleGoogleMap extends StatefulWidget { this.markers = const {}, this.polygons = const {}, this.polylines = const {}, + this.onPoiTap, this.circles = const {}, this.clusterManagers = const {}, this.onCameraMoveStarted, @@ -379,6 +383,9 @@ class ExampleGoogleMap extends StatefulWidget { /// Polylines to be placed on the map. final Set polylines; + ///Point of Interest Callback + final ArgumentCallback? onPoiTap; + /// Circles to be placed on the map. final Set circles; @@ -648,6 +655,10 @@ class _ExampleGoogleMapState extends State { widget.onTap?.call(position); } + void onPoiTap(PointOfInterest pointOfInterest) { + widget.onPoiTap?.call(pointOfInterest); + } + void onLongPress(LatLng position) { widget.onLongPress?.call(position); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart index f7b60568657c..b074218a0529 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart @@ -22,6 +22,7 @@ import 'padding.dart'; import 'page.dart'; import 'place_circle.dart'; import 'place_marker.dart'; +import 'place_poi.dart'; import 'place_polygon.dart'; import 'place_polyline.dart'; import 'scrolling_map.dart'; @@ -40,6 +41,7 @@ final List _allPages = [ const PlacePolylinePage(), const PlacePolygonPage(), const PlaceCirclePage(), + const PlacePoiPage(), const PaddingPage(), const SnapshotPage(), const LiteModePage(), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart new file mode 100644 index 000000000000..c9f55c0f5106 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart @@ -0,0 +1,89 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter_example/example_google_map.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +import 'page.dart'; + +class PlacePoiPage extends GoogleMapExampleAppPage { + const PlacePoiPage({super.key}) + : super(const Icon(Icons.business), 'Place POI'); + + @override + Widget build(BuildContext context) { + return const PlacePoiBody(); + } +} + +class PlacePoiBody extends StatefulWidget { + const PlacePoiBody({super.key}); + + @override + State createState() => PlacePoiBodyState(); +} + +class PlacePoiBodyState extends State { + ExampleGoogleMapController? controller; + PointOfInterest? _lastPoi; + + final CameraPosition _kSydney = const CameraPosition( + target: LatLng(22.54222641620606, 88.34560669761545), + zoom: 16.0, + ); + + void _onMapCreated(ExampleGoogleMapController controller) { + this.controller = controller; + } + + void _onPoiTap(PointOfInterest poi) { + setState(() { + _lastPoi = poi; + }); + + controller?.animateCamera(CameraUpdate.newLatLng(poi.position)); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Expanded( + child: ExampleGoogleMap( + onMapCreated: _onMapCreated, + initialCameraPosition: _kSydney, + onPoiTap: _onPoiTap, + myLocationButtonEnabled: false, + mapType: MapType.normal, + ), + ), + Container( + color: Colors.white, + width: double.infinity, + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + const Text( + 'Last Tapped POI:', + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16), + ), + const SizedBox(height: 8), + if (_lastPoi != null) ...[ + Text('Name: ${_lastPoi!.name}'), + Text('Place ID: ${_lastPoi!.placeId}'), + Text( + 'Lat/Lng: ${_lastPoi!.position.latitude.toStringAsFixed(5)}, ${_lastPoi!.position.longitude.toStringAsFixed(5)}', + ), + ] else + const Text('Tap on a business or landmark icon...'), + ], + ), + ), + ], + ); + } +} 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 bc6eb1e2cdb6..35b3440fbde1 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 @@ -1268,9 +1268,9 @@ class HostMapMessageHandler implements MapsCallbackApi { MapPoiTapEvent( mapId, PointOfInterest( - LatLng(poi.position.latitude, poi.position.longitude), - poi.name, - poi.placeId, + position: LatLng(poi.position.latitude, poi.position.longitude), + name: poi.name, + placeId: poi.placeId, ), ), ); 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 d396ed2a7def..2c5106bb0f75 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 @@ -1090,13 +1090,13 @@ class PlatformMarker { class PlatformPointOfInterest { PlatformPointOfInterest({ required this.position, - required this.name, + this.name, required this.placeId, }); PlatformLatLng position; - String name; + String? name; String placeId; 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 8423c7b733dd..ef5aead5ec55 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 @@ -240,12 +240,12 @@ class PlatformMarker { class PlatformPointOfInterest { PlatformPointOfInterest({ required this.position, - required this.name, + this.name, required this.placeId, }); final PlatformLatLng position; - final String name; + final String? name; final String placeId; } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index 865b91ee9abf..2a9b1d1a76f3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -1173,9 +1173,9 @@ class HostMapMessageHandler implements MapsCallbackApi { MapPoiTapEvent( mapId, PointOfInterest( - LatLng(poi.position.latitude, poi.position.longitude), - poi.name, - poi.placeId, + position: LatLng(poi.position.latitude, poi.position.longitude), + name: poi.name, + placeId: poi.placeId, ), ), ); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart index bb5abe76fb87..20c055a57bdc 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart @@ -1044,13 +1044,13 @@ class PlatformMarker { class PlatformPointOfInterest { PlatformPointOfInterest({ required this.position, - required this.name, + this.name, required this.placeId, }); PlatformLatLng position; - String name; + String? name; String placeId; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index 097f3d6d9641..3a6a56cccc53 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -242,12 +242,12 @@ class PlatformMarker { class PlatformPointOfInterest { PlatformPointOfInterest({ required this.position, - required this.name, + this.name, required this.placeId, }); final PlatformLatLng position; - final String name; + final String? name; final String placeId; } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart index 8b5c140cc81d..ff407a5607a2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart @@ -231,9 +231,9 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { MapPoiTapEvent( mapId, PointOfInterest( - LatLng.fromJson(arguments['position'])!, - arguments['name']! as String, - arguments['placeId']! as String, + position: LatLng.fromJson(arguments['position'])!, + name: arguments['name']! as String, + placeId: arguments['placeId']! as String, ), ), ); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/point_of_interest.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/point_of_interest.dart index e241ca7213b1..33b47b43de34 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/point_of_interest.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/point_of_interest.dart @@ -12,13 +12,17 @@ import 'types.dart'; @immutable class PointOfInterest { /// Creates an immutable representation of a point of interest. - const PointOfInterest(this.position, this.name, this.placeId); + const PointOfInterest({ + required this.position, + this.name, + required this.placeId, + }); /// The geographical location of the POI. final LatLng position; /// The name of the POI (e.g., "Googleplex"). - final String name; + final String? name; /// The unique Place ID defined by Google (e.g., "ChIJj61dQgK6j4AR4GeTYWZsKWw"). final String placeId; diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index c5f02b906b8e..1b3eec65d8f4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -270,9 +270,9 @@ class GoogleMapController { MapPoiTapEvent( _mapId, PointOfInterest( - gmLatLngToLatLng(event.latLng!), - '', // Name is not available in the Web SDK click event - placeId, + position: gmLatLngToLatLng(event.latLng!), + name: null, + placeId: placeId, ), ), ); From 5781bdc86dd911041c2c50fd74d5e13fe6d2d81b Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 00:15:20 +0530 Subject: [PATCH 18/46] google_maps_flutter] added much more test for the federated package --- .../test/google_map_test.dart | 6 +- .../google_maps_flutter_android_test.dart | 36 ++++++++++ .../test/google_maps_flutter_ios_test.dart | 36 ++++++++++ .../google_maps_flutter_platform_test.dart | 8 +++ .../test/types/point_of_interest_test.dart | 65 +++++++++++++++++++ 5 files changed, 148 insertions(+), 3 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/point_of_interest_test.dart diff --git a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart index e43c0f9c9a8a..5a94cdfc69b6 100644 --- a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart @@ -684,9 +684,9 @@ void main() { GoogleMapsFlutterPlatform.instance as FakeGoogleMapsFlutterPlatform; const poi = PointOfInterest( - const LatLng(10, 10), - 'name', - 'id', + position: const LatLng(10, 10), + name: 'name', + placeId: 'id', ); // 4. Inject the event 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 403adf3df6c6..f7d6fbb5ce37 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 @@ -1496,4 +1496,40 @@ void main() { reason: 'Should pass mapId in PlatformView creation message', ); }); + + test('onPoiTap sends events to correct stream', () async { + const int mapId = 1; + final PlatformLatLng fakePosition = PlatformLatLng(latitude: 12.34, longitude: 56.78); + const String fakeName = 'Googleplex'; + const String fakePlaceId = 'iso_id_123'; + + final GoogleMapsFlutterAndroid maps = GoogleMapsFlutterAndroid(); + // Initialize the handler which receives messages from the native side + final HostMapMessageHandler callbackHandler = maps.ensureHandlerInitialized( + mapId, + ); + + final StreamQueue stream = StreamQueue( + maps.onPoiTap(mapId: mapId), + ); + + // Simulate a message from the native Android side (via Pigeon generated handler) + callbackHandler.onPoiTap( + PlatformPointOfInterest( + position: fakePosition, + name: fakeName, + placeId: fakePlaceId, + ), + ); + + // Verify the event in the stream + final MapPoiTapEvent event = await stream.next; + expect(event.mapId, mapId); + + final PointOfInterest poi = event.value; + expect(poi.position.latitude, fakePosition.latitude); + expect(poi.position.longitude, fakePosition.longitude); + expect(poi.name, fakeName); + expect(poi.placeId, fakePlaceId); + }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart index 23c7fd0c9fac..cca014718107 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart @@ -1348,6 +1348,42 @@ void main() { reason: 'Should pass mapId on PlatformView creation message', ); }); + + test('onPoiTap sends events to correct stream', () async { + const int mapId = 1; + final PlatformLatLng fakePosition = PlatformLatLng(latitude: 12.34, longitude: 56.78); + const String fakeName = 'Googleplex'; + const String fakePlaceId = 'iso_id_123'; + + final GoogleMapsFlutterIOS maps = GoogleMapsFlutterIOS(); + // Initialize the handler which receives messages from the native side + final HostMapMessageHandler callbackHandler = maps.ensureHandlerInitialized( + mapId, + ); + + final StreamQueue stream = StreamQueue( + maps.onPoiTap(mapId: mapId), + ); + + // Simulate a message from the native side via the Pigeon generated handler + callbackHandler.onPoiTap( + PlatformPointOfInterest( + position: fakePosition, + name: fakeName, + placeId: fakePlaceId, + ), + ); + + // Verify the event in the stream + final MapPoiTapEvent event = await stream.next; + expect(event.mapId, mapId); + + final PointOfInterest poi = event.value; + expect(poi.position.latitude, fakePosition.latitude); + expect(poi.position.longitude, fakePosition.longitude); + expect(poi.name, fakeName); + expect(poi.placeId, fakePlaceId); + }); } void _expectColorsEqual(PlatformColor actual, Color expected) { diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart index 1f72413a9485..29324ead86b0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart @@ -154,6 +154,14 @@ void main() { }, ); }); + + test('onPoiTap default implementation throws UnimplementedError', () { + final ExtendsGoogleMapsFlutterPlatform platform = + ExtendsGoogleMapsFlutterPlatform(); + // Most stream methods in the platform interface should provide a stream or throw. + // Verify that your new onPoiTap is reachable. + expect(() => platform.onPoiTap(mapId: 0), throwsUnimplementedError); + }); } class GoogleMapsFlutterPlatformMock extends Mock diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/point_of_interest_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/point_of_interest_test.dart new file mode 100644 index 000000000000..c0e441e0c1be --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/point_of_interest_test.dart @@ -0,0 +1,65 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter_test/flutter_test.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +void main() { + group('PointOfInterest', () { + test('constructor with all named parameters', () { + const PointOfInterest poi = PointOfInterest( + position: LatLng(10.0, 20.0), + name: 'Test Name', + placeId: 'test_id', + ); + expect(poi.position, const LatLng(10.0, 20.0)); + expect(poi.name, 'Test Name'); + expect(poi.placeId, 'test_id'); + }); + + test('constructor with null name (Web support)', () { + const PointOfInterest poi = PointOfInterest( + position: LatLng(10.0, 20.0), + placeId: 'test_id', + ); + expect(poi.name, isNull); + }); + + test('equality', () { + const PointOfInterest poi1 = PointOfInterest( + position: LatLng(10.0, 20.0), + name: 'A', + placeId: 'ID', + ); + const PointOfInterest poi2 = PointOfInterest( + position: LatLng(10.0, 20.0), + name: 'A', + placeId: 'ID', + ); + const PointOfInterest poi3 = PointOfInterest( + position: LatLng(10.1, 20.0), + name: 'A', + placeId: 'ID', + ); + + expect(poi1, poi2); + expect(poi1, isNot(poi3)); + }); + + test('hashCode', () { + const PointOfInterest poi1 = PointOfInterest( + position: LatLng(10.0, 20.0), + name: 'A', + placeId: 'ID', + ); + const PointOfInterest poi2 = PointOfInterest( + position: LatLng(10.0, 20.0), + name: 'A', + placeId: 'ID', + ); + + expect(poi1.hashCode, poi2.hashCode); + }); + }); +} \ No newline at end of file From 347d0a96d00c39ed12f2751aba0ccf2b8fd20c4c Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 00:45:40 +0530 Subject: [PATCH 19/46] [google_maps_flutter] updated all flutter analyze checks --- .../google_maps_flutter/example/lib/main.dart | 2 +- .../example/lib/place_poi.dart | 12 ++++++++-- .../google_maps_flutter/example/pubspec.yaml | 8 +++---- .../test/google_map_test.dart | 22 +++++++++---------- .../example/lib/place_poi.dart | 13 ++++++++--- .../google_maps_flutter_android_test.dart | 12 +++++----- .../test/google_maps_flutter_ios_test.dart | 12 +++++----- .../method_channel_google_maps_flutter.dart | 1 - ...thod_channel_google_maps_flutter_test.dart | 8 +++---- .../google_maps_flutter_platform_test.dart | 2 +- .../test/types/point_of_interest_test.dart | 16 +++++++------- .../example/integration_test/poi_test.dart | 4 ++-- .../example/pubspec.yaml | 8 +++---- .../lib/src/google_maps_controller.dart | 1 - 14 files changed, 67 insertions(+), 54 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart index aad729c6b47a..d47efa87a2bc 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart @@ -23,12 +23,12 @@ import 'padding.dart'; import 'page.dart'; import 'place_circle.dart'; import 'place_marker.dart'; +import 'place_poi.dart'; import 'place_polygon.dart'; import 'place_polyline.dart'; import 'scrolling_map.dart'; import 'snapshot.dart'; import 'tile_overlay.dart'; -import 'place_poi.dart'; final List _allPages = [ const MapUiPage(), diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart index a65d0a3e2e98..d208bc9f07cf 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart @@ -7,9 +7,11 @@ import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'page.dart'; +/// Page for demonstrating Point of Interest (POI) tapping. class PlacePoiPage extends GoogleMapExampleAppPage { + /// Default constructor. const PlacePoiPage({super.key}) - : super(const Icon(Icons.business), 'Place POI'); + : super(const Icon(Icons.business), 'Place POI'); @override Widget build(BuildContext context) { @@ -17,14 +19,20 @@ class PlacePoiPage extends GoogleMapExampleAppPage { } } +/// Body of the POI page. class PlacePoiBody extends StatefulWidget { + /// Default constructor. const PlacePoiBody({super.key}); @override State createState() => PlacePoiBodyState(); } +/// State for [PlacePoiBody]. class PlacePoiBodyState extends State { + /// The controller for the map. + /// + /// This is public to match the example pattern, but marked with a doc comment. GoogleMapController? controller; PointOfInterest? _lastPoi; @@ -33,6 +41,7 @@ class PlacePoiBodyState extends State { zoom: 16.0, ); + // ignore: use_setters_to_change_properties void _onMapCreated(GoogleMapController controller) { this.controller = controller; } @@ -55,7 +64,6 @@ class PlacePoiBodyState extends State { initialCameraPosition: _kKolkata, onPoiTap: _onPoiTap, myLocationButtonEnabled: false, - mapType: MapType.normal, ), ), Container( diff --git a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml index e81c3ac39e63..f0ad9085874d 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml @@ -34,13 +34,13 @@ flutter: assets: - assets/ dependency_overrides: - google_maps_flutter_web: - path: ../../google_maps_flutter_web - google_maps_flutter_platform_interface: - path: ../../google_maps_flutter_platform_interface google_maps_flutter: path: ../ google_maps_flutter_android: path: ../../google_maps_flutter_android google_maps_flutter_ios: path: ../../google_maps_flutter_ios + google_maps_flutter_platform_interface: + path: ../../google_maps_flutter_platform_interface + google_maps_flutter_web: + path: ../../google_maps_flutter_web diff --git a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart index 5a94cdfc69b6..e7ddf1b73f36 100644 --- a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart @@ -661,9 +661,8 @@ void main() { }); testWidgets('onPoiTap callback is called', (WidgetTester tester) async { - // 1. Setup variables to capture the result PointOfInterest? tappedPoi; - final Completer mapCreatedCompleter = Completer(); + final mapCreatedCompleter = Completer(); await tester.pumpWidget( Directionality( @@ -671,29 +670,30 @@ void main() { child: GoogleMap( initialCameraPosition: const CameraPosition(target: LatLng(0, 0)), onPoiTap: (PointOfInterest poi) => tappedPoi = poi, - // 2. Signal when initialization is done onMapCreated: (_) => mapCreatedCompleter.complete(), ), ), ); - // 3. 🔥 FIX: Wait for the logic-specific Future, NOT a rendering timer + // Wait for the map to be fully initialized in the fake platform. await mapCreatedCompleter.future; - final platform = - GoogleMapsFlutterPlatform.instance as FakeGoogleMapsFlutterPlatform; - + // Use the top-level 'platform' variable instead of redeclaring it. const poi = PointOfInterest( - position: const LatLng(10, 10), - name: 'name', - placeId: 'id', + position: LatLng(10.0, 10.0), + name: 'Test POI', + placeId: 'test_id_123', ); - // 4. Inject the event + // Inject the event into the fake platform's stream. + // mapId 0 is used as it's the first map created in the test. platform.mapEventStreamController.add(MapPoiTapEvent(0, poi)); + // Allow the stream and callback to process. await tester.pump(); expect(tappedPoi, poi); + expect(tappedPoi!.name, 'Test POI'); + expect(tappedPoi!.placeId, 'test_id_123'); }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart index c9f55c0f5106..28fb4a222a9c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart @@ -3,14 +3,17 @@ // found in the LICENSE file. import 'package:flutter/material.dart'; -import 'package:google_maps_flutter_example/example_google_map.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; +// ignore: prefer_relative_imports +import 'example_google_map.dart'; import 'page.dart'; +/// Page for demonstrating Point of Interest (POI) tapping. class PlacePoiPage extends GoogleMapExampleAppPage { + /// Default constructor. const PlacePoiPage({super.key}) - : super(const Icon(Icons.business), 'Place POI'); + : super(const Icon(Icons.business), 'Place POI'); @override Widget build(BuildContext context) { @@ -18,14 +21,18 @@ class PlacePoiPage extends GoogleMapExampleAppPage { } } +/// Body of the POI page. class PlacePoiBody extends StatefulWidget { + /// Default constructor. const PlacePoiBody({super.key}); @override State createState() => PlacePoiBodyState(); } +/// State for [PlacePoiBody]. class PlacePoiBodyState extends State { + /// The controller for the map. ExampleGoogleMapController? controller; PointOfInterest? _lastPoi; @@ -34,6 +41,7 @@ class PlacePoiBodyState extends State { zoom: 16.0, ); + // ignore: use_setters_to_change_properties void _onMapCreated(ExampleGoogleMapController controller) { this.controller = controller; } @@ -56,7 +64,6 @@ class PlacePoiBodyState extends State { initialCameraPosition: _kSydney, onPoiTap: _onPoiTap, myLocationButtonEnabled: false, - mapType: MapType.normal, ), ), Container( 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 f7d6fbb5ce37..1aa30cbeccb8 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 @@ -1498,18 +1498,18 @@ void main() { }); test('onPoiTap sends events to correct stream', () async { - const int mapId = 1; - final PlatformLatLng fakePosition = PlatformLatLng(latitude: 12.34, longitude: 56.78); - const String fakeName = 'Googleplex'; - const String fakePlaceId = 'iso_id_123'; + const mapId = 1; + final fakePosition = PlatformLatLng(latitude: 12.34, longitude: 56.78); + const fakeName = 'Googleplex'; + const fakePlaceId = 'iso_id_123'; - final GoogleMapsFlutterAndroid maps = GoogleMapsFlutterAndroid(); + final maps = GoogleMapsFlutterAndroid(); // Initialize the handler which receives messages from the native side final HostMapMessageHandler callbackHandler = maps.ensureHandlerInitialized( mapId, ); - final StreamQueue stream = StreamQueue( + final stream = StreamQueue( maps.onPoiTap(mapId: mapId), ); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart index cca014718107..9a75ba20f4f3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart @@ -1350,18 +1350,18 @@ void main() { }); test('onPoiTap sends events to correct stream', () async { - const int mapId = 1; - final PlatformLatLng fakePosition = PlatformLatLng(latitude: 12.34, longitude: 56.78); - const String fakeName = 'Googleplex'; - const String fakePlaceId = 'iso_id_123'; + const mapId = 1; + final fakePosition = PlatformLatLng(latitude: 12.34, longitude: 56.78); + const fakeName = 'Googleplex'; + const fakePlaceId = 'iso_id_123'; - final GoogleMapsFlutterIOS maps = GoogleMapsFlutterIOS(); + final maps = GoogleMapsFlutterIOS(); // Initialize the handler which receives messages from the native side final HostMapMessageHandler callbackHandler = maps.ensureHandlerInitialized( mapId, ); - final StreamQueue stream = StreamQueue( + final stream = StreamQueue( maps.onPoiTap(mapId: mapId), ); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart index ff407a5607a2..d7d9d3efb38b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart @@ -237,7 +237,6 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { ), ), ); - break; case 'infoWindow#onTap': final Map arguments = _getArgumentDictionary(call); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/method_channel/method_channel_google_maps_flutter_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/method_channel/method_channel_google_maps_flutter_test.dart index 75db63d88708..5fb762454478 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/method_channel/method_channel_google_maps_flutter_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/method_channel/method_channel_google_maps_flutter_test.dart @@ -139,17 +139,17 @@ void main() { ); }); test('onPoiTap', () async { - final MethodChannelGoogleMapsFlutter platform = + final platform = MethodChannelGoogleMapsFlutter(); - const int mapId = 0; + const mapId = 0; platform.ensureChannelInitialized(mapId); - final List events = []; + final events = []; platform .onPoiTap(mapId: mapId) .listen((MapPoiTapEvent event) => events.add(event)); - final Map poiData = { + final poiData = { 'placeId': 'place123', 'name': 'Googleplex', 'position': [37.422, -122.084], diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart index 29324ead86b0..97a31f6dd369 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart @@ -156,7 +156,7 @@ void main() { }); test('onPoiTap default implementation throws UnimplementedError', () { - final ExtendsGoogleMapsFlutterPlatform platform = + final platform = ExtendsGoogleMapsFlutterPlatform(); // Most stream methods in the platform interface should provide a stream or throw. // Verify that your new onPoiTap is reachable. diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/point_of_interest_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/point_of_interest_test.dart index c0e441e0c1be..f92a748d6244 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/point_of_interest_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/point_of_interest_test.dart @@ -8,7 +8,7 @@ import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platf void main() { group('PointOfInterest', () { test('constructor with all named parameters', () { - const PointOfInterest poi = PointOfInterest( + const poi = PointOfInterest( position: LatLng(10.0, 20.0), name: 'Test Name', placeId: 'test_id', @@ -19,7 +19,7 @@ void main() { }); test('constructor with null name (Web support)', () { - const PointOfInterest poi = PointOfInterest( + const poi = PointOfInterest( position: LatLng(10.0, 20.0), placeId: 'test_id', ); @@ -27,17 +27,17 @@ void main() { }); test('equality', () { - const PointOfInterest poi1 = PointOfInterest( + const poi1 = PointOfInterest( position: LatLng(10.0, 20.0), name: 'A', placeId: 'ID', ); - const PointOfInterest poi2 = PointOfInterest( + const poi2 = PointOfInterest( position: LatLng(10.0, 20.0), name: 'A', placeId: 'ID', ); - const PointOfInterest poi3 = PointOfInterest( + const poi3 = PointOfInterest( position: LatLng(10.1, 20.0), name: 'A', placeId: 'ID', @@ -48,12 +48,12 @@ void main() { }); test('hashCode', () { - const PointOfInterest poi1 = PointOfInterest( + const poi1 = PointOfInterest( position: LatLng(10.0, 20.0), name: 'A', placeId: 'ID', ); - const PointOfInterest poi2 = PointOfInterest( + const poi2 = PointOfInterest( position: LatLng(10.0, 20.0), name: 'A', placeId: 'ID', @@ -62,4 +62,4 @@ void main() { expect(poi1.hashCode, poi2.hashCode); }); }); -} \ No newline at end of file +} diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart index bea64e0dcca3..a922fc42b8b2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart @@ -56,7 +56,7 @@ void main() { testWidgets('Emits MapPoiTapEvent when clicking a POI', (WidgetTester tester) async { final latLng = gmaps.LatLng(10, 20); - bool stopCalled = false; + bool? stopCalled = false; final event = FakeIconMouseEvent( latLng: latLng, @@ -99,4 +99,4 @@ void main() { expect(emittedEvent, isNot(isA())); }); }); -} \ No newline at end of file +} diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml index 69866e854123..f76e0d8e3e6b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml @@ -28,13 +28,13 @@ flutter: assets: - assets/ dependency_overrides: - google_maps_flutter_web: - path: ../ - google_maps_flutter_platform_interface: - path: ../../google_maps_flutter_platform_interface google_maps_flutter: path: ../../google_maps_flutter google_maps_flutter_android: path: ../../google_maps_flutter_android google_maps_flutter_ios: path: ../../google_maps_flutter_ios + google_maps_flutter_platform_interface: + path: ../../google_maps_flutter_platform_interface + google_maps_flutter_web: + path: ../ diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index 1b3eec65d8f4..3df878f43389 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -271,7 +271,6 @@ class GoogleMapController { _mapId, PointOfInterest( position: gmLatLngToLatLng(event.latLng!), - name: null, placeId: placeId, ), ), From ece8e5c7c3f4819ba7501bc53b583f615d4146ec Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 01:02:59 +0530 Subject: [PATCH 20/46] [google_maps_flutter] fixed the fake google maps for automated unit tests --- .../googlemaps/GoogleMapControllerTest.java | 34 +++++++++++-------- .../example/lib/example_google_map.dart | 3 ++ .../fake_google_maps_flutter_platform.dart | 5 +++ .../fake_google_maps_flutter_platform.dart | 5 +++ 4 files changed, 33 insertions(+), 14 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java index 8fe639bf22e7..4b285b3ecfce 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java @@ -4,6 +4,7 @@ package io.flutter.plugins.googlemaps; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.mockito.ArgumentMatchers.any; @@ -26,6 +27,7 @@ import com.google.android.gms.maps.model.CameraPosition; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.Marker; +import com.google.android.gms.maps.model.PointOfInterest; import com.google.maps.android.clustering.ClusterManager; import io.flutter.plugin.common.BinaryMessenger; import java.util.ArrayList; @@ -35,6 +37,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.MockitoAnnotations; @@ -319,19 +322,22 @@ public void getCameraPositionReturnsCorrectData() { } @Test - public void onPoiClick_sendsCorrectData() { - // Assuming 'controller' and 'flutterApi' are set up as in other tests. - PointOfInterest poi = new PointOfInterest(new LatLng(1.0, 2.0), "placeId", "name"); - - controller.onPoiClick(poi); - - ArgumentCaptor poiCaptor = ArgumentCaptor.forClass(Messages.PlatformPointOfInterest.class); - verify(flutterApi).onPoiTap(poiCaptor.capture(), any(Messages.VoidResult.class)); - - Messages.PlatformPointOfInterest capturedPoi = poiCaptor.getValue(); - assertEquals("name", capturedPoi.getName()); - assertEquals("placeId", capturedPoi.getPlaceId()); - assertEquals(1.0, capturedPoi.getPosition().getLatitude(), 1e-6); - assertEquals(2.0, capturedPoi.getPosition().getLongitude(), 1e-6); + public void onPoiClick() { + // Note: ensure googleMapController is initialized in your @Before method + PointOfInterest poi = new PointOfInterest(new LatLng(1.0, 2.0), "placeId", "name"); + + googleMapController.onPoiClick(poi); // Use the correct variable name + + ArgumentCaptor poiCaptor = + ArgumentCaptor.forClass(Messages.PlatformPointOfInterest.class); + + // Verify that the listener was called and capture the result + verify(mockListener).onPoiClick(poiCaptor.capture()); + + Messages.PlatformPointOfInterest capturedPoi = poiCaptor.getValue(); + assertEquals("name", capturedPoi.getName()); + assertEquals("placeId", capturedPoi.getPlaceId()); + assertEquals(1.0, capturedPoi.getPosition().getLatitude(), 1e-6); + assertEquals(2.0, capturedPoi.getPosition().getLongitude(), 1e-6); } } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart index 8698b8a4eaa5..2107a44ad662 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart @@ -83,6 +83,9 @@ class ExampleGoogleMapController { .listen( (InfoWindowTapEvent e) => _googleMapState.onInfoWindowTap(e.value), ); + GoogleMapsFlutterPlatform.instance + .onPoiTap(mapId: mapId) + .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)); GoogleMapsFlutterPlatform.instance .onPolylineTap(mapId: mapId) .listen((PolylineTapEvent e) => _googleMapState.onPolylineTap(e.value)); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/test/fake_google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/test/fake_google_maps_flutter_platform.dart index a589658f5c6e..148e1406c481 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/test/fake_google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/test/fake_google_maps_flutter_platform.dart @@ -234,6 +234,11 @@ class FakeGoogleMapsFlutterPlatform extends GoogleMapsFlutterPlatform { return mapEventStreamController.stream.whereType(); } + @override + Stream onPoiTap({required int mapId}) { + return mapEventStreamController.stream.whereType(); + } + @override Stream onPolylineTap({required int mapId}) { return mapEventStreamController.stream.whereType(); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/test/fake_google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/test/fake_google_maps_flutter_platform.dart index 899a7709c548..ed0a7f354f6a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/test/fake_google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/test/fake_google_maps_flutter_platform.dart @@ -234,6 +234,11 @@ class FakeGoogleMapsFlutterPlatform extends GoogleMapsFlutterPlatform { return mapEventStreamController.stream.whereType(); } + @override + Stream onPoiTap({required int mapId}) { + return mapEventStreamController.stream.whereType(); + } + @override Stream onPolylineTap({required int mapId}) { return mapEventStreamController.stream.whereType(); From a2507362366cc915996f86e133c2e8b0cdd05a65 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 01:05:08 +0530 Subject: [PATCH 21/46] [google_maps_flutter] formatted java code with formatter --- .../googlemaps/GoogleMapController.java | 9 +- .../flutter/plugins/googlemaps/Messages.java | 1668 +++++++++++------ .../googlemaps/GoogleMapControllerTest.java | 32 +- 3 files changed, 1148 insertions(+), 561 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java index a3db16a53da2..30f0bd240cc9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java @@ -51,16 +51,11 @@ import io.flutter.plugins.googlemaps.Messages.MapsApi; import io.flutter.plugins.googlemaps.Messages.MapsCallbackApi; import io.flutter.plugins.googlemaps.Messages.MapsInspectorApi; -import io.flutter.plugin.common.MethodChannel; import java.io.ByteArrayOutputStream; -import java.util.Arrays; import java.util.ArrayList; import java.util.List; -import java.util.HashMap; import java.util.Objects; import java.util.Set; -import java.util.Map; - /** Controller of a single GoogleMaps MapView instance. */ class GoogleMapController @@ -373,13 +368,13 @@ public void onMarkerDragEnd(Marker marker) { @Override public void onPoiClick(PointOfInterest poi) { - Messages.PlatformPointOfInterest platformPoi = + Messages.PlatformPointOfInterest platformPoi = new Messages.PlatformPointOfInterest.Builder() .setPosition(Convert.latLngToPigeon(poi.latLng)) .setName(poi.name) .setPlaceId(poi.placeId) .build(); - + flutterApi.onPoiTap(platformPoi, new NoOpVoidResult()); } 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 c3ead766d24f..fb0d56c8c81b 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,9 +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; /** Generated class from Pigeon. */ @@ -41,8 +39,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 +58,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) @@ -115,9 +113,9 @@ public enum PlatformJointType { } /** - * Enumeration of possible types of PlatformCap, corresponding to the - * subclasses of Cap in the Google Maps Android SDK. - * See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. + * Enumeration of possible types of PlatformCap, corresponding to the subclasses of Cap in the + * Google Maps Android SDK. See + * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. */ public enum PlatformCapType { BUTT_CAP(0), @@ -160,7 +158,7 @@ public enum PlatformMapBitmapScaling { /** * Pigeon representatation of a CameraPosition. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraPosition { private @NonNull Double bearing; @@ -220,10 +218,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 @@ -302,16 +307,14 @@ ArrayList toList() { /** * Pigeon representation of a CameraUpdate. * - * Generated class from Pigeon that represents data sent in messages. + *

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

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

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

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

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

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

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

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

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateZoomTo { private @NonNull Double zoom; @@ -964,8 +1007,12 @@ public void setZoom(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformCameraUpdateZoomTo that = (PlatformCameraUpdateZoomTo) o; return zoom.equals(that.zoom); } @@ -1010,7 +1057,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; @@ -1135,15 +1182,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 { @@ -1277,7 +1345,7 @@ 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 { private @NonNull String heatmapId; @@ -1357,10 +1425,19 @@ public void setMaxIntensity(@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; + } PlatformHeatmap that = (PlatformHeatmap) o; - return heatmapId.equals(that.heatmapId) && data.equals(that.data) && Objects.equals(gradient, that.gradient) && opacity.equals(that.opacity) && radius.equals(that.radius) && Objects.equals(maxIntensity, that.maxIntensity); + return heatmapId.equals(that.heatmapId) + && data.equals(that.data) + && Objects.equals(gradient, that.gradient) + && opacity.equals(that.opacity) + && radius.equals(that.radius) + && Objects.equals(maxIntensity, that.maxIntensity); } @Override @@ -1463,11 +1540,11 @@ ArrayList toList() { /** * Pigeon equivalent of the HeatmapGradient class. * - * The Java Gradient structure is slightly different from HeatmapGradient, so - * this matches the Android API so that conversion can be done on the Dart side - * where the structures are easier to work with. + *

The Java Gradient structure is slightly different from HeatmapGradient, so this matches the + * Android API so that conversion can be done on the Dart side where the structures are easier to + * work with. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformHeatmapGradient { private @NonNull List colors; @@ -1514,10 +1591,16 @@ public void setColorMapSize(@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; + } PlatformHeatmapGradient that = (PlatformHeatmapGradient) o; - return colors.equals(that.colors) && startPoints.equals(that.startPoints) && colorMapSize.equals(that.colorMapSize); + return colors.equals(that.colors) + && startPoints.equals(that.startPoints) + && colorMapSize.equals(that.colorMapSize); } @Override @@ -1584,7 +1667,7 @@ ArrayList toList() { /** * Pigeon equivalent of the WeightedLatLng 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 PlatformWeightedLatLng { private @NonNull PlatformLatLng point; @@ -1618,8 +1701,12 @@ public void setWeight(@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; + } PlatformWeightedLatLng that = (PlatformWeightedLatLng) o; return point.equals(that.point) && weight.equals(that.weight); } @@ -1676,7 +1763,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; @@ -1697,8 +1784,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); } @@ -1743,7 +1834,7 @@ ArrayList toList() { /** * Pair of double values, such as for an offset or size. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformDoublePair { private @NonNull Double x; @@ -1777,8 +1868,12 @@ public void setY(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformDoublePair that = (PlatformDoublePair) o; return x.equals(that.x) && y.equals(that.y); } @@ -1835,9 +1930,9 @@ ArrayList toList() { /** * Pigeon equivalent of the Color class. * - * See https://developer.android.com/reference/android/graphics/Color.html. + *

See https://developer.android.com/reference/android/graphics/Color.html. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformColor { private @NonNull Long argbValue; @@ -1858,8 +1953,12 @@ public void setArgbValue(@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; + } PlatformColor that = (PlatformColor) o; return argbValue.equals(that.argbValue); } @@ -1904,7 +2003,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; @@ -1945,10 +2044,16 @@ public void setAnchor(@NonNull PlatformDoublePair setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformInfoWindow that = (PlatformInfoWindow) o; - return Objects.equals(title, that.title) && Objects.equals(snippet, that.snippet) && anchor.equals(that.anchor); + return Objects.equals(title, that.title) + && Objects.equals(snippet, that.snippet) + && anchor.equals(that.anchor); } @Override @@ -2015,7 +2120,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; @@ -2189,15 +2294,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 { @@ -2379,7 +2513,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Point of Interest 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 PlatformPointOfInterest { private @NonNull PlatformLatLng position; @@ -2426,10 +2560,16 @@ public void setPlaceId(@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; + } PlatformPointOfInterest that = (PlatformPointOfInterest) o; - return position.equals(that.position) && name.equals(that.name) && placeId.equals(that.placeId); + return position.equals(that.position) + && name.equals(that.name) + && placeId.equals(that.placeId); } @Override @@ -2496,7 +2636,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Polygon class. * - * Generated class from Pigeon that represents data sent in messages. + *

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

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

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

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformPatternItem { private @NonNull PlatformPatternItemType type; @@ -3279,8 +3475,12 @@ public void setLength(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformPatternItem that = (PlatformPatternItem) o; return type.equals(that.type) && Objects.equals(length, that.length); } @@ -3337,7 +3537,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; @@ -3381,10 +3581,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 @@ -3453,7 +3659,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; @@ -3539,10 +3745,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 @@ -3645,7 +3860,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; @@ -3705,10 +3920,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 @@ -3787,7 +4009,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; @@ -3821,8 +4043,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); } @@ -3879,7 +4105,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; @@ -3913,8 +4139,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); } @@ -3971,7 +4201,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; @@ -4031,10 +4261,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 @@ -4113,7 +4350,7 @@ ArrayList toList() { /** * Pigeon equivalent of the GroundOverlay class. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformGroundOverlay { private @NonNull String groundOverlayId; @@ -4262,15 +4499,42 @@ public void setClickable(@NonNull Boolean setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformGroundOverlay that = (PlatformGroundOverlay) o; - return groundOverlayId.equals(that.groundOverlayId) && image.equals(that.image) && Objects.equals(position, that.position) && Objects.equals(bounds, that.bounds) && Objects.equals(width, that.width) && Objects.equals(height, that.height) && Objects.equals(anchor, that.anchor) && transparency.equals(that.transparency) && bearing.equals(that.bearing) && zIndex.equals(that.zIndex) && visible.equals(that.visible) && clickable.equals(that.clickable); + return groundOverlayId.equals(that.groundOverlayId) + && image.equals(that.image) + && Objects.equals(position, that.position) + && Objects.equals(bounds, that.bounds) + && Objects.equals(width, that.width) + && Objects.equals(height, that.height) + && Objects.equals(anchor, that.anchor) + && transparency.equals(that.transparency) + && bearing.equals(that.bearing) + && zIndex.equals(that.zIndex) + && visible.equals(that.visible) + && clickable.equals(that.clickable); } @Override public int hashCode() { - return Objects.hash(groundOverlayId, image, position, bounds, width, height, anchor, transparency, bearing, zIndex, visible, clickable); + return Objects.hash( + groundOverlayId, + image, + position, + bounds, + width, + height, + anchor, + transparency, + bearing, + zIndex, + visible, + clickable); } public static final class Builder { @@ -4440,10 +4704,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; @@ -4458,8 +4722,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); } @@ -4504,7 +4772,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; @@ -4642,15 +4910,38 @@ public void setInitialGroundOverlays(@NonNull List setter @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformMapViewCreationParams that = (PlatformMapViewCreationParams) o; - return initialCameraPosition.equals(that.initialCameraPosition) && mapConfiguration.equals(that.mapConfiguration) && initialCircles.equals(that.initialCircles) && initialMarkers.equals(that.initialMarkers) && initialPolygons.equals(that.initialPolygons) && initialPolylines.equals(that.initialPolylines) && initialHeatmaps.equals(that.initialHeatmaps) && initialTileOverlays.equals(that.initialTileOverlays) && initialClusterManagers.equals(that.initialClusterManagers) && initialGroundOverlays.equals(that.initialGroundOverlays); + return initialCameraPosition.equals(that.initialCameraPosition) + && mapConfiguration.equals(that.mapConfiguration) + && initialCircles.equals(that.initialCircles) + && initialMarkers.equals(that.initialMarkers) + && initialPolygons.equals(that.initialPolygons) + && initialPolylines.equals(that.initialPolylines) + && initialHeatmaps.equals(that.initialHeatmaps) + && initialTileOverlays.equals(that.initialTileOverlays) + && initialClusterManagers.equals(that.initialClusterManagers) + && initialGroundOverlays.equals(that.initialGroundOverlays); } @Override public int hashCode() { - return Objects.hash(initialCameraPosition, mapConfiguration, initialCircles, initialMarkers, initialPolygons, initialPolylines, initialHeatmaps, initialTileOverlays, initialClusterManagers, initialGroundOverlays); + return Objects.hash( + initialCameraPosition, + mapConfiguration, + initialCircles, + initialMarkers, + initialPolygons, + initialPolylines, + initialHeatmaps, + initialTileOverlays, + initialClusterManagers, + initialGroundOverlays); } public static final class Builder { @@ -4722,7 +5013,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; } @@ -4730,7 +5022,8 @@ public static final class Builder { private @Nullable List initialGroundOverlays; @CanIgnoreReturnValue - public @NonNull Builder setInitialGroundOverlays(@NonNull List setterArg) { + public @NonNull Builder setInitialGroundOverlays( + @NonNull List setterArg) { this.initialGroundOverlays = setterArg; return this; } @@ -4767,7 +5060,8 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformMapViewCreationParams fromList(@NonNull ArrayList pigeonVar_list) { + static @NonNull PlatformMapViewCreationParams fromList( + @NonNull ArrayList pigeonVar_list) { PlatformMapViewCreationParams pigeonResult = new PlatformMapViewCreationParams(); Object initialCameraPosition = pigeonVar_list.get(0); pigeonResult.setInitialCameraPosition((PlatformCameraPosition) initialCameraPosition); @@ -4796,7 +5090,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; @@ -5001,15 +5295,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(mapId, that.mapId) && Objects.equals(style, that.style); + return Objects.equals(compassEnabled, that.compassEnabled) + && Objects.equals(cameraTargetBounds, that.cameraTargetBounds) + && Objects.equals(mapType, that.mapType) + && Objects.equals(minMaxZoomPreference, that.minMaxZoomPreference) + && Objects.equals(mapToolbarEnabled, that.mapToolbarEnabled) + && Objects.equals(rotateGesturesEnabled, that.rotateGesturesEnabled) + && Objects.equals(scrollGesturesEnabled, that.scrollGesturesEnabled) + && Objects.equals(tiltGesturesEnabled, that.tiltGesturesEnabled) + && Objects.equals(trackCameraPosition, that.trackCameraPosition) + && Objects.equals(zoomControlsEnabled, that.zoomControlsEnabled) + && Objects.equals(zoomGesturesEnabled, that.zoomGesturesEnabled) + && Objects.equals(myLocationEnabled, that.myLocationEnabled) + && Objects.equals(myLocationButtonEnabled, that.myLocationButtonEnabled) + && Objects.equals(padding, that.padding) + && Objects.equals(indoorViewEnabled, that.indoorViewEnabled) + && Objects.equals(trafficEnabled, that.trafficEnabled) + && Objects.equals(buildingsEnabled, that.buildingsEnabled) + && Objects.equals(liteModeEnabled, that.liteModeEnabled) + && Objects.equals(mapId, that.mapId) + && Objects.equals(style, that.style); } @Override public int hashCode() { - return Objects.hash(compassEnabled, cameraTargetBounds, mapType, minMaxZoomPreference, mapToolbarEnabled, rotateGesturesEnabled, scrollGesturesEnabled, tiltGesturesEnabled, trackCameraPosition, zoomControlsEnabled, zoomGesturesEnabled, myLocationEnabled, myLocationButtonEnabled, padding, indoorViewEnabled, trafficEnabled, buildingsEnabled, liteModeEnabled, mapId, style); + return Objects.hash( + compassEnabled, + cameraTargetBounds, + mapType, + minMaxZoomPreference, + mapToolbarEnabled, + rotateGesturesEnabled, + scrollGesturesEnabled, + tiltGesturesEnabled, + trackCameraPosition, + zoomControlsEnabled, + zoomGesturesEnabled, + myLocationEnabled, + myLocationButtonEnabled, + padding, + indoorViewEnabled, + trafficEnabled, + buildingsEnabled, + liteModeEnabled, + mapId, + style); } public static final class Builder { @@ -5025,7 +5362,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; } @@ -5275,7 +5613,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; @@ -5309,8 +5647,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); } @@ -5367,7 +5709,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; @@ -5427,10 +5769,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 @@ -5509,7 +5858,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; @@ -5534,8 +5883,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); } @@ -5590,20 +5943,18 @@ ArrayList toList() { } /** - * Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint - * types of [BitmapDescriptor], [PlatformBitmap] contains a single field which - * may hold the pigeon equivalent type of any of them. + * Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint types of + * [BitmapDescriptor], [PlatformBitmap] contains a single field which may hold the pigeon + * equivalent type of any of them. * - * Generated class from Pigeon that represents data sent in messages. + *

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

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

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

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

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

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

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapBytesMap { private @NonNull byte[] byteData; @@ -6259,10 +6639,18 @@ public void setHeight(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformBitmapBytesMap that = (PlatformBitmapBytesMap) o; - return Arrays.equals(byteData, that.byteData) && bitmapScaling.equals(that.bitmapScaling) && imagePixelRatio.equals(that.imagePixelRatio) && Objects.equals(width, that.width) && Objects.equals(height, that.height); + return Arrays.equals(byteData, that.byteData) + && bitmapScaling.equals(that.bitmapScaling) + && imagePixelRatio.equals(that.imagePixelRatio) + && Objects.equals(width, that.width) + && Objects.equals(height, that.height); } @Override @@ -6360,40 +6748,52 @@ private PigeonCodec() {} @Override protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { switch (type) { - case (byte) 129: { - Object value = readValue(buffer); - return value == null ? null : PlatformMapType.values()[((Long) value).intValue()]; - } - case (byte) 130: { - Object value = readValue(buffer); - return value == null ? null : PlatformRendererType.values()[((Long) value).intValue()]; - } - case (byte) 131: { - Object value = readValue(buffer); - return value == null ? null : PlatformJointType.values()[((Long) value).intValue()]; - } - case (byte) 132: { - Object value = readValue(buffer); - return value == null ? null : PlatformCapType.values()[((Long) value).intValue()]; - } - case (byte) 133: { - Object value = readValue(buffer); - return value == null ? null : PlatformPatternItemType.values()[((Long) value).intValue()]; - } - case (byte) 134: { - Object value = readValue(buffer); - return value == null ? null : PlatformMapBitmapScaling.values()[((Long) value).intValue()]; - } + case (byte) 129: + { + Object value = readValue(buffer); + return value == null ? null : PlatformMapType.values()[((Long) value).intValue()]; + } + case (byte) 130: + { + Object value = readValue(buffer); + return value == null ? null : PlatformRendererType.values()[((Long) value).intValue()]; + } + case (byte) 131: + { + Object value = readValue(buffer); + return value == null ? null : PlatformJointType.values()[((Long) value).intValue()]; + } + case (byte) 132: + { + Object value = readValue(buffer); + return value == null ? null : PlatformCapType.values()[((Long) value).intValue()]; + } + case (byte) 133: + { + Object value = readValue(buffer); + return value == null + ? null + : PlatformPatternItemType.values()[((Long) value).intValue()]; + } + case (byte) 134: + { + Object value = readValue(buffer); + return value == null + ? null + : PlatformMapBitmapScaling.values()[((Long) value).intValue()]; + } case (byte) 135: return PlatformCameraPosition.fromList((ArrayList) readValue(buffer)); case (byte) 136: return PlatformCameraUpdate.fromList((ArrayList) readValue(buffer)); case (byte) 137: - return PlatformCameraUpdateNewCameraPosition.fromList((ArrayList) readValue(buffer)); + return PlatformCameraUpdateNewCameraPosition.fromList( + (ArrayList) readValue(buffer)); case (byte) 138: return PlatformCameraUpdateNewLatLng.fromList((ArrayList) readValue(buffer)); case (byte) 139: - return PlatformCameraUpdateNewLatLngBounds.fromList((ArrayList) readValue(buffer)); + return PlatformCameraUpdateNewLatLngBounds.fromList( + (ArrayList) readValue(buffer)); case (byte) 140: return PlatformCameraUpdateNewLatLngZoom.fromList((ArrayList) readValue(buffer)); case (byte) 141: @@ -6635,7 +7035,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. */ @@ -6663,9 +7062,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. */ @@ -6673,75 +7072,91 @@ public interface MapsApi { /** * Updates the map's configuration options. * - * Only non-null configuration values will result in updates; options with - * null values will remain unchanged. + *

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

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

This allows checking asynchronously for initial style failures, as there is no way to + * return failures from map initialization. */ - @NonNull + @NonNull Boolean didLastStyleSucceed(); /** Clears the cache of tiles previously requseted from the tile provider. */ void clearTileCache(@NonNull String tileOverlayId); @@ -6752,16 +7167,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) -> { @@ -6788,7 +7210,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) -> { @@ -6798,8 +7223,7 @@ public void error(Throwable error) { try { api.updateMapConfiguration(configurationArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6811,7 +7235,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) -> { @@ -6823,8 +7250,7 @@ public void error(Throwable error) { try { api.updateCircles(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6836,7 +7262,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) -> { @@ -6848,8 +7277,7 @@ public void error(Throwable error) { try { api.updateHeatmaps(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6861,7 +7289,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) -> { @@ -6872,8 +7303,7 @@ public void error(Throwable error) { try { api.updateClusterManagers(toAddArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6885,7 +7315,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) -> { @@ -6897,8 +7330,7 @@ public void error(Throwable error) { try { api.updateMarkers(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6910,7 +7342,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) -> { @@ -6922,8 +7357,7 @@ public void error(Throwable error) { try { api.updatePolygons(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6935,7 +7369,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) -> { @@ -6947,8 +7384,7 @@ public void error(Throwable error) { try { api.updatePolylines(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6960,7 +7396,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) -> { @@ -6972,8 +7411,7 @@ public void error(Throwable error) { try { api.updateTileOverlays(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6985,7 +7423,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6997,8 +7438,7 @@ public void error(Throwable error) { try { api.updateGroundOverlays(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7010,7 +7450,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) -> { @@ -7020,8 +7463,7 @@ public void error(Throwable error) { try { PlatformPoint output = api.getScreenCoordinate(latLngArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7033,7 +7475,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) -> { @@ -7043,8 +7488,7 @@ public void error(Throwable error) { try { PlatformLatLng output = api.getLatLng(screenCoordinateArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7056,7 +7500,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) -> { @@ -7064,8 +7511,7 @@ public void error(Throwable error) { try { PlatformLatLngBounds output = api.getVisibleRegion(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7077,7 +7523,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) -> { @@ -7087,8 +7536,7 @@ public void error(Throwable error) { try { api.moveCamera(cameraUpdateArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7100,7 +7548,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) -> { @@ -7111,8 +7562,7 @@ public void error(Throwable error) { try { api.animateCamera(cameraUpdateArg, durationMillisecondsArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7124,7 +7574,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) -> { @@ -7132,8 +7585,7 @@ public void error(Throwable error) { try { Double output = api.getZoomLevel(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7145,7 +7597,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) -> { @@ -7155,8 +7610,7 @@ public void error(Throwable error) { try { api.showInfoWindow(markerIdArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7168,7 +7622,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) -> { @@ -7178,8 +7635,7 @@ public void error(Throwable error) { try { api.hideInfoWindow(markerIdArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7191,7 +7647,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) -> { @@ -7201,8 +7660,7 @@ public void error(Throwable error) { try { Boolean output = api.isInfoWindowShown(markerIdArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7214,7 +7672,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) -> { @@ -7224,8 +7685,7 @@ public void error(Throwable error) { try { Boolean output = api.setStyle(styleArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7237,7 +7697,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) -> { @@ -7245,8 +7708,7 @@ public void error(Throwable error) { try { Boolean output = api.didLastStyleSucceed(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7258,7 +7720,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) -> { @@ -7268,8 +7733,7 @@ public void error(Throwable error) { try { api.clearTileCache(tileOverlayIdArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7281,7 +7745,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) -> { @@ -7315,398 +7782,466 @@ public static class MapsCallbackApi { public MapsCallbackApi(@NonNull BinaryMessenger argBinaryMessenger) { this(argBinaryMessenger, ""); } - public MapsCallbackApi(@NonNull BinaryMessenger argBinaryMessenger, @NonNull String messageChannelSuffix) { + + public MapsCallbackApi( + @NonNull BinaryMessenger argBinaryMessenger, @NonNull String messageChannelSuffix) { this.binaryMessenger = argBinaryMessenger; this.messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; } - /** - * Public interface for sending reply. - * The codec used by MapsCallbackApi. - */ + /** Public interface for sending reply. The codec used by MapsCallbackApi. */ static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } /** Called when the map camera starts moving. */ public void onCameraMoveStarted(@NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( null, channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map camera moves. */ - public void onCameraMove(@NonNull PlatformCameraPosition cameraPositionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove" + messageChannelSuffix; + public void onCameraMove( + @NonNull PlatformCameraPosition cameraPositionArg, @NonNull VoidResult result) { + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(cameraPositionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map camera stops moving. */ public void onCameraIdle(@NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( null, channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map, not a specifc map object, is tapped. */ public void onTap(@NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map, not a specifc map object, is long pressed. */ public void onLongPress(@NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker is tapped. */ public void onMarkerTap(@NonNull String markerIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(markerIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag starts. */ - public void onMarkerDragStart(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart" + messageChannelSuffix; + public void onMarkerDragStart( + @NonNull String markerIdArg, + @NonNull PlatformLatLng positionArg, + @NonNull VoidResult result) { + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag updates. */ - public void onMarkerDrag(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag" + messageChannelSuffix; + public void onMarkerDrag( + @NonNull String markerIdArg, + @NonNull PlatformLatLng positionArg, + @NonNull VoidResult result) { + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag ends. */ - public void onMarkerDragEnd(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd" + messageChannelSuffix; + public void onMarkerDragEnd( + @NonNull String markerIdArg, + @NonNull PlatformLatLng positionArg, + @NonNull VoidResult result) { + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker's info window is tapped. */ public void onInfoWindowTap(@NonNull String markerIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(markerIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a circle is tapped. */ public void onCircleTap(@NonNull String circleIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(circleIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker cluster is tapped. */ public void onClusterTap(@NonNull PlatformCluster clusterArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(clusterArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a POI is tapped. */ public void onPoiTap(@NonNull PlatformPointOfInterest poiArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(poiArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a polygon is tapped. */ public void onPolygonTap(@NonNull String polygonIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(polygonIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a polyline is tapped. */ public void onPolylineTap(@NonNull String polylineIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(polylineIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a ground overlay is tapped. */ public void onGroundOverlayTap(@NonNull String groundOverlayIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(groundOverlayIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called to get data for a map tile. */ - public void getTileOverlayTile(@NonNull String tileOverlayIdArg, @NonNull PlatformPoint locationArg, @NonNull Long zoomArg, @NonNull Result result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile" + messageChannelSuffix; + public void getTileOverlayTile( + @NonNull String tileOverlayIdArg, + @NonNull PlatformPoint locationArg, + @NonNull Long zoomArg, + @NonNull Result result) { + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(tileOverlayIdArg, locationArg, zoomArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else if (listReply.get(0) == null) { - result.error(new FlutterError("null-error", "Flutter api returned null value for non-null return value.", "")); + result.error( + new FlutterError( + "null-error", + "Flutter api returned null value for non-null return value.", + "")); } else { @SuppressWarnings("ConstantConditions") PlatformTile output = (PlatformTile) listReply.get(0); result.success(output); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } } /** * Interface for global SDK initialization. * - * Generated interface from Pigeon that represents a handler of messages from Flutter. + *

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

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

Calling this more than once in the lifetime of an application will result in an error. */ - void initializeWithPreferredRenderer(@Nullable PlatformRendererType type, @NonNull Result result); + void initializeWithPreferredRenderer( + @Nullable PlatformRendererType type, @NonNull Result result); /** - * Attempts to trigger any thread-blocking work - * the Google Maps SDK normally does when a map is shown for the first time. + * Attempts to trigger any thread-blocking work the Google Maps SDK normally does when a map is + * shown for the first time. */ void warmup(); @@ -7714,16 +8249,25 @@ public interface 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) -> { @@ -7752,7 +8296,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7760,8 +8307,7 @@ public void error(Throwable error) { try { api.warmup(); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7773,11 +8319,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 { @@ -7787,16 +8332,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) -> { @@ -7806,8 +8361,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { api.createView(typeArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7821,72 +8375,81 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess /** * Inspector API only intended for use in integration tests. * - * Generated interface from Pigeon that represents a handler of messages from Flutter. + *

Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface MapsInspectorApi { - @NonNull + @NonNull Boolean areBuildingsEnabled(); - @NonNull + @NonNull Boolean areRotateGesturesEnabled(); - @NonNull + @NonNull Boolean areZoomControlsEnabled(); - @NonNull + @NonNull Boolean areScrollGesturesEnabled(); - @NonNull + @NonNull Boolean areTiltGesturesEnabled(); - @NonNull + @NonNull Boolean areZoomGesturesEnabled(); - @NonNull + @NonNull Boolean isCompassEnabled(); - @Nullable + @Nullable Boolean isLiteModeEnabled(); - @NonNull + @NonNull Boolean isMapToolbarEnabled(); - @NonNull + @NonNull Boolean isMyLocationButtonEnabled(); - @NonNull + @NonNull Boolean isTrafficEnabled(); - @Nullable + @Nullable PlatformTileLayer getTileOverlayInfo(@NonNull String tileOverlayId); - @Nullable + @Nullable PlatformGroundOverlay getGroundOverlayInfo(@NonNull String groundOverlayId); - @NonNull + @NonNull PlatformZoomRange getZoomRange(); - @NonNull + @NonNull List getClusters(@NonNull String clusterManagerId); - @NonNull + @NonNull PlatformCameraPosition getCameraPosition(); /** The codec used by MapsInspectorApi. */ static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } - /**Sets up an instance of `MapsInspectorApi` to handle messages through the `binaryMessenger`. */ + /** + * Sets up an instance of `MapsInspectorApi` to handle messages through the `binaryMessenger`. + */ static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable MapsInspectorApi api) { setUp(binaryMessenger, "", api); } - static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String messageChannelSuffix, @Nullable MapsInspectorApi api) { + + static void setUp( + @NonNull BinaryMessenger binaryMessenger, + @NonNull String messageChannelSuffix, + @Nullable MapsInspectorApi api) { messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7894,8 +8457,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areBuildingsEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7907,7 +8469,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) -> { @@ -7915,8 +8480,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areRotateGesturesEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7928,7 +8492,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) -> { @@ -7936,8 +8503,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areZoomControlsEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7949,7 +8515,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) -> { @@ -7957,8 +8526,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areScrollGesturesEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7970,7 +8538,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) -> { @@ -7978,8 +8549,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areTiltGesturesEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7991,7 +8561,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) -> { @@ -7999,8 +8572,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areZoomGesturesEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8012,7 +8584,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) -> { @@ -8020,8 +8595,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.isCompassEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8033,7 +8607,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) -> { @@ -8041,8 +8618,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.isLiteModeEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8054,7 +8630,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) -> { @@ -8062,8 +8641,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.isMapToolbarEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8075,7 +8653,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) -> { @@ -8083,8 +8664,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.isMyLocationButtonEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8096,7 +8676,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) -> { @@ -8104,8 +8687,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.isTrafficEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8117,7 +8699,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) -> { @@ -8127,8 +8712,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { PlatformTileLayer output = api.getTileOverlayInfo(tileOverlayIdArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8140,7 +8724,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8150,8 +8737,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { PlatformGroundOverlay output = api.getGroundOverlayInfo(groundOverlayIdArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8163,7 +8749,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) -> { @@ -8171,8 +8760,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { PlatformZoomRange output = api.getZoomRange(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8184,7 +8772,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) -> { @@ -8194,8 +8785,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { List output = api.getClusters(clusterManagerIdArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8207,7 +8797,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8215,8 +8808,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { PlatformCameraPosition output = api.getCameraPosition(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java index 4b285b3ecfce..6d4e9e7d5fe4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java @@ -323,21 +323,21 @@ public void getCameraPositionReturnsCorrectData() { @Test public void onPoiClick() { - // Note: ensure googleMapController is initialized in your @Before method - PointOfInterest poi = new PointOfInterest(new LatLng(1.0, 2.0), "placeId", "name"); - - googleMapController.onPoiClick(poi); // Use the correct variable name - - ArgumentCaptor poiCaptor = - ArgumentCaptor.forClass(Messages.PlatformPointOfInterest.class); - - // Verify that the listener was called and capture the result - verify(mockListener).onPoiClick(poiCaptor.capture()); - - Messages.PlatformPointOfInterest capturedPoi = poiCaptor.getValue(); - assertEquals("name", capturedPoi.getName()); - assertEquals("placeId", capturedPoi.getPlaceId()); - assertEquals(1.0, capturedPoi.getPosition().getLatitude(), 1e-6); - assertEquals(2.0, capturedPoi.getPosition().getLongitude(), 1e-6); + // Note: ensure googleMapController is initialized in your @Before method + PointOfInterest poi = new PointOfInterest(new LatLng(1.0, 2.0), "placeId", "name"); + + googleMapController.onPoiClick(poi); // Use the correct variable name + + ArgumentCaptor poiCaptor = + ArgumentCaptor.forClass(Messages.PlatformPointOfInterest.class); + + // Verify that the listener was called and capture the result + verify(mockListener).onPoiClick(poiCaptor.capture()); + + Messages.PlatformPointOfInterest capturedPoi = poiCaptor.getValue(); + assertEquals("name", capturedPoi.getName()); + assertEquals("placeId", capturedPoi.getPlaceId()); + assertEquals(1.0, capturedPoi.getPosition().getLatitude(), 1e-6); + assertEquals(2.0, capturedPoi.getPosition().getLongitude(), 1e-6); } } From a10dbdb5bc48714b10b0a41e58af3d39a2330145 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 01:09:07 +0530 Subject: [PATCH 22/46] [google_maps_flutter] updated changelog for google_maps_flutter_web package --- .../google_maps_flutter/google_maps_flutter_web/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md index 149dba550204..c9b42640a4ea 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md @@ -2,6 +2,10 @@ * Updates minimum supported SDK version to Flutter 3.35/Dart 3.9. +## 0.6.0+4 + +* Added support for Tap detection on Point of Interest + ## 0.5.14+3 * Replaces uses of deprecated `Color` properties. From cdabd123556da9c6053cbe08b4f869c5f8ec529f Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 09:15:54 +0530 Subject: [PATCH 23/46] [google_maps_flutter] removed linting issues and updated code for CI checks --- .../example/lib/place_poi.dart | 8 +- .../flutter/plugins/googlemaps/Messages.java | 1679 ++++++----------- .../googlemaps/GoogleMapControllerTest.java | 7 +- .../example/lib/example_google_map.dart | 4 +- .../example/lib/place_poi.dart | 10 +- .../lib/src/messages.g.dart | 2 +- .../pigeons/messages.dart | 2 - .../google_maps_flutter_android_test.dart | 3 - 8 files changed, 557 insertions(+), 1158 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart index d208bc9f07cf..64f3cd7fed7f 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart @@ -11,7 +11,7 @@ import 'page.dart'; class PlacePoiPage extends GoogleMapExampleAppPage { /// Default constructor. const PlacePoiPage({super.key}) - : super(const Icon(Icons.business), 'Place POI'); + : super(const Icon(Icons.business), 'Place POI'); @override Widget build(BuildContext context) { @@ -31,7 +31,7 @@ class PlacePoiBody extends StatefulWidget { /// State for [PlacePoiBody]. class PlacePoiBodyState extends State { /// The controller for the map. - /// + /// /// This is public to match the example pattern, but marked with a doc comment. GoogleMapController? controller; PointOfInterest? _lastPoi; @@ -80,7 +80,7 @@ class PlacePoiBodyState extends State { ), const SizedBox(height: 8), if (_lastPoi != null) ...[ - Text('Name: ${_lastPoi!.name}'), + Text('Name: ${_lastPoi!.name ?? "Unknown"}'), Text('Place ID: ${_lastPoi!.placeId}'), Text( 'Lat/Lng: ${_lastPoi!.position.latitude.toStringAsFixed(5)}, ${_lastPoi!.position.longitude.toStringAsFixed(5)}', @@ -93,4 +93,4 @@ class PlacePoiBodyState extends State { ], ); } -} +} \ No newline at end of file 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 fb0d56c8c81b..69956f6fa556 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,9 @@ 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; /** Generated class from Pigeon. */ @@ -39,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; @@ -58,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) @@ -113,9 +115,9 @@ public enum PlatformJointType { } /** - * Enumeration of possible types of PlatformCap, corresponding to the subclasses of Cap in the - * Google Maps Android SDK. See - * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. + * Enumeration of possible types of PlatformCap, corresponding to the + * subclasses of Cap in the Google Maps Android SDK. + * See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. */ public enum PlatformCapType { BUTT_CAP(0), @@ -158,7 +160,7 @@ public enum PlatformMapBitmapScaling { /** * Pigeon representatation of a CameraPosition. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraPosition { private @NonNull Double bearing; @@ -218,17 +220,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 @@ -307,14 +302,16 @@ ArrayList toList() { /** * Pigeon representation of a CameraUpdate. * - *

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

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

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

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

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

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

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

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

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateZoomTo { private @NonNull Double zoom; @@ -1007,12 +964,8 @@ public void setZoom(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformCameraUpdateZoomTo that = (PlatformCameraUpdateZoomTo) o; return zoom.equals(that.zoom); } @@ -1057,7 +1010,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; @@ -1182,36 +1135,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 { @@ -1345,7 +1277,7 @@ 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 { private @NonNull String heatmapId; @@ -1425,19 +1357,10 @@ public void setMaxIntensity(@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; } PlatformHeatmap that = (PlatformHeatmap) o; - return heatmapId.equals(that.heatmapId) - && data.equals(that.data) - && Objects.equals(gradient, that.gradient) - && opacity.equals(that.opacity) - && radius.equals(that.radius) - && Objects.equals(maxIntensity, that.maxIntensity); + return heatmapId.equals(that.heatmapId) && data.equals(that.data) && Objects.equals(gradient, that.gradient) && opacity.equals(that.opacity) && radius.equals(that.radius) && Objects.equals(maxIntensity, that.maxIntensity); } @Override @@ -1540,11 +1463,11 @@ ArrayList toList() { /** * Pigeon equivalent of the HeatmapGradient class. * - *

The Java Gradient structure is slightly different from HeatmapGradient, so this matches the - * Android API so that conversion can be done on the Dart side where the structures are easier to - * work with. + * The Java Gradient structure is slightly different from HeatmapGradient, so + * this matches the Android API so that conversion can be done on the Dart side + * where the structures are easier to work with. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformHeatmapGradient { private @NonNull List colors; @@ -1591,16 +1514,10 @@ public void setColorMapSize(@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; } PlatformHeatmapGradient that = (PlatformHeatmapGradient) o; - return colors.equals(that.colors) - && startPoints.equals(that.startPoints) - && colorMapSize.equals(that.colorMapSize); + return colors.equals(that.colors) && startPoints.equals(that.startPoints) && colorMapSize.equals(that.colorMapSize); } @Override @@ -1667,7 +1584,7 @@ ArrayList toList() { /** * Pigeon equivalent of the WeightedLatLng 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 PlatformWeightedLatLng { private @NonNull PlatformLatLng point; @@ -1701,12 +1618,8 @@ public void setWeight(@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; } PlatformWeightedLatLng that = (PlatformWeightedLatLng) o; return point.equals(that.point) && weight.equals(that.weight); } @@ -1763,7 +1676,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; @@ -1784,12 +1697,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); } @@ -1834,7 +1743,7 @@ ArrayList toList() { /** * Pair of double values, such as for an offset or size. * - *

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

See https://developer.android.com/reference/android/graphics/Color.html. + * See https://developer.android.com/reference/android/graphics/Color.html. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformColor { private @NonNull Long argbValue; @@ -1953,12 +1858,8 @@ public void setArgbValue(@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; } PlatformColor that = (PlatformColor) o; return argbValue.equals(that.argbValue); } @@ -2003,7 +1904,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; @@ -2044,16 +1945,10 @@ public void setAnchor(@NonNull PlatformDoublePair setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformInfoWindow that = (PlatformInfoWindow) o; - return Objects.equals(title, that.title) - && Objects.equals(snippet, that.snippet) - && anchor.equals(that.anchor); + return Objects.equals(title, that.title) && Objects.equals(snippet, that.snippet) && anchor.equals(that.anchor); } @Override @@ -2120,7 +2015,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; @@ -2294,44 +2189,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 { @@ -2513,7 +2379,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Point of Interest 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 PlatformPointOfInterest { private @NonNull PlatformLatLng position; @@ -2529,16 +2395,13 @@ public void setPosition(@NonNull PlatformLatLng setterArg) { this.position = setterArg; } - private @NonNull String name; + private @Nullable String name; - public @NonNull String getName() { + public @Nullable String getName() { return name; } - public void setName(@NonNull String setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"name\" is null."); - } + public void setName(@Nullable String setterArg) { this.name = setterArg; } @@ -2560,16 +2423,10 @@ public void setPlaceId(@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; } PlatformPointOfInterest that = (PlatformPointOfInterest) o; - return position.equals(that.position) - && name.equals(that.name) - && placeId.equals(that.placeId); + return position.equals(that.position) && Objects.equals(name, that.name) && placeId.equals(that.placeId); } @Override @@ -2590,7 +2447,7 @@ public static final class Builder { private @Nullable String name; @CanIgnoreReturnValue - public @NonNull Builder setName(@NonNull String setterArg) { + public @NonNull Builder setName(@Nullable String setterArg) { this.name = setterArg; return this; } @@ -2636,7 +2493,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Polygon class. * - *

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

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

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

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformPatternItem { private @NonNull PlatformPatternItemType type; @@ -3475,12 +3276,8 @@ public void setLength(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformPatternItem that = (PlatformPatternItem) o; return type.equals(that.type) && Objects.equals(length, that.length); } @@ -3537,7 +3334,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; @@ -3581,16 +3378,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 @@ -3659,7 +3450,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; @@ -3745,19 +3536,10 @@ public void setTileSize(@NonNull Long setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformTileOverlay that = (PlatformTileOverlay) o; - return tileOverlayId.equals(that.tileOverlayId) - && fadeIn.equals(that.fadeIn) - && transparency.equals(that.transparency) - && zIndex.equals(that.zIndex) - && visible.equals(that.visible) - && tileSize.equals(that.tileSize); + return tileOverlayId.equals(that.tileOverlayId) && fadeIn.equals(that.fadeIn) && transparency.equals(that.transparency) && zIndex.equals(that.zIndex) && visible.equals(that.visible) && tileSize.equals(that.tileSize); } @Override @@ -3860,7 +3642,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; @@ -3920,17 +3702,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 @@ -4009,7 +3784,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; @@ -4043,12 +3818,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); } @@ -4105,7 +3876,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; @@ -4139,12 +3910,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); } @@ -4201,7 +3968,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; @@ -4261,17 +4028,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 @@ -4350,7 +4110,7 @@ ArrayList toList() { /** * Pigeon equivalent of the GroundOverlay class. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformGroundOverlay { private @NonNull String groundOverlayId; @@ -4499,42 +4259,15 @@ public void setClickable(@NonNull Boolean setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformGroundOverlay that = (PlatformGroundOverlay) o; - return groundOverlayId.equals(that.groundOverlayId) - && image.equals(that.image) - && Objects.equals(position, that.position) - && Objects.equals(bounds, that.bounds) - && Objects.equals(width, that.width) - && Objects.equals(height, that.height) - && Objects.equals(anchor, that.anchor) - && transparency.equals(that.transparency) - && bearing.equals(that.bearing) - && zIndex.equals(that.zIndex) - && visible.equals(that.visible) - && clickable.equals(that.clickable); + return groundOverlayId.equals(that.groundOverlayId) && image.equals(that.image) && Objects.equals(position, that.position) && Objects.equals(bounds, that.bounds) && Objects.equals(width, that.width) && Objects.equals(height, that.height) && Objects.equals(anchor, that.anchor) && transparency.equals(that.transparency) && bearing.equals(that.bearing) && zIndex.equals(that.zIndex) && visible.equals(that.visible) && clickable.equals(that.clickable); } @Override public int hashCode() { - return Objects.hash( - groundOverlayId, - image, - position, - bounds, - width, - height, - anchor, - transparency, - bearing, - zIndex, - visible, - clickable); + return Objects.hash(groundOverlayId, image, position, bounds, width, height, anchor, transparency, bearing, zIndex, visible, clickable); } public static final class Builder { @@ -4704,10 +4437,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; @@ -4722,12 +4455,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); } @@ -4772,7 +4501,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; @@ -4910,38 +4639,15 @@ public void setInitialGroundOverlays(@NonNull List setter @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformMapViewCreationParams that = (PlatformMapViewCreationParams) o; - return initialCameraPosition.equals(that.initialCameraPosition) - && mapConfiguration.equals(that.mapConfiguration) - && initialCircles.equals(that.initialCircles) - && initialMarkers.equals(that.initialMarkers) - && initialPolygons.equals(that.initialPolygons) - && initialPolylines.equals(that.initialPolylines) - && initialHeatmaps.equals(that.initialHeatmaps) - && initialTileOverlays.equals(that.initialTileOverlays) - && initialClusterManagers.equals(that.initialClusterManagers) - && initialGroundOverlays.equals(that.initialGroundOverlays); + return initialCameraPosition.equals(that.initialCameraPosition) && mapConfiguration.equals(that.mapConfiguration) && initialCircles.equals(that.initialCircles) && initialMarkers.equals(that.initialMarkers) && initialPolygons.equals(that.initialPolygons) && initialPolylines.equals(that.initialPolylines) && initialHeatmaps.equals(that.initialHeatmaps) && initialTileOverlays.equals(that.initialTileOverlays) && initialClusterManagers.equals(that.initialClusterManagers) && initialGroundOverlays.equals(that.initialGroundOverlays); } @Override public int hashCode() { - return Objects.hash( - initialCameraPosition, - mapConfiguration, - initialCircles, - initialMarkers, - initialPolygons, - initialPolylines, - initialHeatmaps, - initialTileOverlays, - initialClusterManagers, - initialGroundOverlays); + return Objects.hash(initialCameraPosition, mapConfiguration, initialCircles, initialMarkers, initialPolygons, initialPolylines, initialHeatmaps, initialTileOverlays, initialClusterManagers, initialGroundOverlays); } public static final class Builder { @@ -5013,8 +4719,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; } @@ -5022,8 +4727,7 @@ public static final class Builder { private @Nullable List initialGroundOverlays; @CanIgnoreReturnValue - public @NonNull Builder setInitialGroundOverlays( - @NonNull List setterArg) { + public @NonNull Builder setInitialGroundOverlays(@NonNull List setterArg) { this.initialGroundOverlays = setterArg; return this; } @@ -5060,8 +4764,7 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformMapViewCreationParams fromList( - @NonNull ArrayList pigeonVar_list) { + static @NonNull PlatformMapViewCreationParams fromList(@NonNull ArrayList pigeonVar_list) { PlatformMapViewCreationParams pigeonResult = new PlatformMapViewCreationParams(); Object initialCameraPosition = pigeonVar_list.get(0); pigeonResult.setInitialCameraPosition((PlatformCameraPosition) initialCameraPosition); @@ -5090,7 +4793,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; @@ -5295,58 +4998,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(mapId, that.mapId) - && Objects.equals(style, that.style); + return Objects.equals(compassEnabled, that.compassEnabled) && Objects.equals(cameraTargetBounds, that.cameraTargetBounds) && Objects.equals(mapType, that.mapType) && Objects.equals(minMaxZoomPreference, that.minMaxZoomPreference) && Objects.equals(mapToolbarEnabled, that.mapToolbarEnabled) && Objects.equals(rotateGesturesEnabled, that.rotateGesturesEnabled) && Objects.equals(scrollGesturesEnabled, that.scrollGesturesEnabled) && Objects.equals(tiltGesturesEnabled, that.tiltGesturesEnabled) && Objects.equals(trackCameraPosition, that.trackCameraPosition) && Objects.equals(zoomControlsEnabled, that.zoomControlsEnabled) && Objects.equals(zoomGesturesEnabled, that.zoomGesturesEnabled) && Objects.equals(myLocationEnabled, that.myLocationEnabled) && Objects.equals(myLocationButtonEnabled, that.myLocationButtonEnabled) && Objects.equals(padding, that.padding) && Objects.equals(indoorViewEnabled, that.indoorViewEnabled) && Objects.equals(trafficEnabled, that.trafficEnabled) && Objects.equals(buildingsEnabled, that.buildingsEnabled) && Objects.equals(liteModeEnabled, that.liteModeEnabled) && Objects.equals(mapId, that.mapId) && Objects.equals(style, that.style); } @Override public int hashCode() { - return Objects.hash( - compassEnabled, - cameraTargetBounds, - mapType, - minMaxZoomPreference, - mapToolbarEnabled, - rotateGesturesEnabled, - scrollGesturesEnabled, - tiltGesturesEnabled, - trackCameraPosition, - zoomControlsEnabled, - zoomGesturesEnabled, - myLocationEnabled, - myLocationButtonEnabled, - padding, - indoorViewEnabled, - trafficEnabled, - buildingsEnabled, - liteModeEnabled, - mapId, - style); + return Objects.hash(compassEnabled, cameraTargetBounds, mapType, minMaxZoomPreference, mapToolbarEnabled, rotateGesturesEnabled, scrollGesturesEnabled, tiltGesturesEnabled, trackCameraPosition, zoomControlsEnabled, zoomGesturesEnabled, myLocationEnabled, myLocationButtonEnabled, padding, indoorViewEnabled, trafficEnabled, buildingsEnabled, liteModeEnabled, mapId, style); } public static final class Builder { @@ -5362,8 +5022,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; } @@ -5613,7 +5272,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; @@ -5647,12 +5306,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); } @@ -5709,7 +5364,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; @@ -5769,17 +5424,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 @@ -5858,7 +5506,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; @@ -5883,12 +5531,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); } @@ -5943,18 +5587,20 @@ ArrayList toList() { } /** - * Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint types of - * [BitmapDescriptor], [PlatformBitmap] contains a single field which may hold the pigeon - * equivalent type of any of them. + * Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint + * types of [BitmapDescriptor], [PlatformBitmap] contains a single field which + * may hold the pigeon equivalent type of any of them. * - *

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

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

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

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

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

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

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapBytesMap { private @NonNull byte[] byteData; @@ -6639,18 +6256,10 @@ public void setHeight(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } PlatformBitmapBytesMap that = (PlatformBitmapBytesMap) o; - return Arrays.equals(byteData, that.byteData) - && bitmapScaling.equals(that.bitmapScaling) - && imagePixelRatio.equals(that.imagePixelRatio) - && Objects.equals(width, that.width) - && Objects.equals(height, that.height); + return Arrays.equals(byteData, that.byteData) && bitmapScaling.equals(that.bitmapScaling) && imagePixelRatio.equals(that.imagePixelRatio) && Objects.equals(width, that.width) && Objects.equals(height, that.height); } @Override @@ -6748,52 +6357,40 @@ private PigeonCodec() {} @Override protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { switch (type) { - case (byte) 129: - { - Object value = readValue(buffer); - return value == null ? null : PlatformMapType.values()[((Long) value).intValue()]; - } - case (byte) 130: - { - Object value = readValue(buffer); - return value == null ? null : PlatformRendererType.values()[((Long) value).intValue()]; - } - case (byte) 131: - { - Object value = readValue(buffer); - return value == null ? null : PlatformJointType.values()[((Long) value).intValue()]; - } - case (byte) 132: - { - Object value = readValue(buffer); - return value == null ? null : PlatformCapType.values()[((Long) value).intValue()]; - } - case (byte) 133: - { - Object value = readValue(buffer); - return value == null - ? null - : PlatformPatternItemType.values()[((Long) value).intValue()]; - } - case (byte) 134: - { - Object value = readValue(buffer); - return value == null - ? null - : PlatformMapBitmapScaling.values()[((Long) value).intValue()]; - } + case (byte) 129: { + Object value = readValue(buffer); + return value == null ? null : PlatformMapType.values()[((Long) value).intValue()]; + } + case (byte) 130: { + Object value = readValue(buffer); + return value == null ? null : PlatformRendererType.values()[((Long) value).intValue()]; + } + case (byte) 131: { + Object value = readValue(buffer); + return value == null ? null : PlatformJointType.values()[((Long) value).intValue()]; + } + case (byte) 132: { + Object value = readValue(buffer); + return value == null ? null : PlatformCapType.values()[((Long) value).intValue()]; + } + case (byte) 133: { + Object value = readValue(buffer); + return value == null ? null : PlatformPatternItemType.values()[((Long) value).intValue()]; + } + case (byte) 134: { + Object value = readValue(buffer); + return value == null ? null : PlatformMapBitmapScaling.values()[((Long) value).intValue()]; + } case (byte) 135: return PlatformCameraPosition.fromList((ArrayList) readValue(buffer)); case (byte) 136: return PlatformCameraUpdate.fromList((ArrayList) readValue(buffer)); case (byte) 137: - return PlatformCameraUpdateNewCameraPosition.fromList( - (ArrayList) readValue(buffer)); + return PlatformCameraUpdateNewCameraPosition.fromList((ArrayList) readValue(buffer)); case (byte) 138: return PlatformCameraUpdateNewLatLng.fromList((ArrayList) readValue(buffer)); case (byte) 139: - return PlatformCameraUpdateNewLatLngBounds.fromList( - (ArrayList) readValue(buffer)); + return PlatformCameraUpdateNewLatLngBounds.fromList((ArrayList) readValue(buffer)); case (byte) 140: return PlatformCameraUpdateNewLatLngZoom.fromList((ArrayList) readValue(buffer)); case (byte) 141: @@ -7035,6 +6632,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. */ @@ -7062,9 +6660,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. */ @@ -7072,91 +6670,75 @@ public interface MapsApi { /** * Updates the map's configuration options. * - *

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

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

This allows checking asynchronously for initial style failures, as there is no way to - * return failures from map initialization. + * This allows checking asynchronously for initial style failures, as there + * is no way to return failures from map initialization. */ - @NonNull + @NonNull Boolean didLastStyleSucceed(); /** Clears the cache of tiles previously requseted from the tile provider. */ void clearTileCache(@NonNull String tileOverlayId); @@ -7167,23 +6749,16 @@ void animateCamera( static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } - /** Sets up an instance of `MapsApi` to handle messages through the `binaryMessenger`. */ + /**Sets up an instance of `MapsApi` to handle messages through the `binaryMessenger`. */ static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable MapsApi api) { setUp(binaryMessenger, "", api); } - - static void setUp( - @NonNull BinaryMessenger binaryMessenger, - @NonNull String messageChannelSuffix, - @Nullable MapsApi api) { + static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String messageChannelSuffix, @Nullable MapsApi api) { messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7210,10 +6785,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) -> { @@ -7223,7 +6795,8 @@ public void error(Throwable error) { try { api.updateMapConfiguration(configurationArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7235,10 +6808,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) -> { @@ -7250,7 +6820,8 @@ public void error(Throwable error) { try { api.updateCircles(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7262,10 +6833,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) -> { @@ -7277,7 +6845,8 @@ public void error(Throwable error) { try { api.updateHeatmaps(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7289,10 +6858,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) -> { @@ -7303,7 +6869,8 @@ public void error(Throwable error) { try { api.updateClusterManagers(toAddArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7315,10 +6882,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) -> { @@ -7330,7 +6894,8 @@ public void error(Throwable error) { try { api.updateMarkers(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7342,10 +6907,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) -> { @@ -7357,7 +6919,8 @@ public void error(Throwable error) { try { api.updatePolygons(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7369,10 +6932,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) -> { @@ -7384,7 +6944,8 @@ public void error(Throwable error) { try { api.updatePolylines(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7396,10 +6957,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) -> { @@ -7411,7 +6969,8 @@ public void error(Throwable error) { try { api.updateTileOverlays(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7423,10 +6982,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7438,7 +6994,8 @@ public void error(Throwable error) { try { api.updateGroundOverlays(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7450,10 +7007,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) -> { @@ -7463,7 +7017,8 @@ public void error(Throwable error) { try { PlatformPoint output = api.getScreenCoordinate(latLngArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7475,10 +7030,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) -> { @@ -7488,7 +7040,8 @@ public void error(Throwable error) { try { PlatformLatLng output = api.getLatLng(screenCoordinateArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7500,10 +7053,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) -> { @@ -7511,7 +7061,8 @@ public void error(Throwable error) { try { PlatformLatLngBounds output = api.getVisibleRegion(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7523,10 +7074,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) -> { @@ -7536,7 +7084,8 @@ public void error(Throwable error) { try { api.moveCamera(cameraUpdateArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7548,10 +7097,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) -> { @@ -7562,7 +7108,8 @@ public void error(Throwable error) { try { api.animateCamera(cameraUpdateArg, durationMillisecondsArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7574,10 +7121,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) -> { @@ -7585,7 +7129,8 @@ public void error(Throwable error) { try { Double output = api.getZoomLevel(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7597,10 +7142,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) -> { @@ -7610,7 +7152,8 @@ public void error(Throwable error) { try { api.showInfoWindow(markerIdArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7622,10 +7165,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) -> { @@ -7635,7 +7175,8 @@ public void error(Throwable error) { try { api.hideInfoWindow(markerIdArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7647,10 +7188,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) -> { @@ -7660,7 +7198,8 @@ public void error(Throwable error) { try { Boolean output = api.isInfoWindowShown(markerIdArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7672,10 +7211,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) -> { @@ -7685,7 +7221,8 @@ public void error(Throwable error) { try { Boolean output = api.setStyle(styleArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7697,10 +7234,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) -> { @@ -7708,7 +7242,8 @@ public void error(Throwable error) { try { Boolean output = api.didLastStyleSucceed(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7720,10 +7255,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) -> { @@ -7733,7 +7265,8 @@ public void error(Throwable error) { try { api.clearTileCache(tileOverlayIdArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7745,10 +7278,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) -> { @@ -7782,466 +7312,398 @@ public static class MapsCallbackApi { public MapsCallbackApi(@NonNull BinaryMessenger argBinaryMessenger) { this(argBinaryMessenger, ""); } - - public MapsCallbackApi( - @NonNull BinaryMessenger argBinaryMessenger, @NonNull String messageChannelSuffix) { + public MapsCallbackApi(@NonNull BinaryMessenger argBinaryMessenger, @NonNull String messageChannelSuffix) { this.binaryMessenger = argBinaryMessenger; this.messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; } - /** Public interface for sending reply. The codec used by MapsCallbackApi. */ + /** + * Public interface for sending reply. + * The codec used by MapsCallbackApi. + */ static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } /** Called when the map camera starts moving. */ public void onCameraMoveStarted(@NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( null, channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map camera moves. */ - public void onCameraMove( - @NonNull PlatformCameraPosition cameraPositionArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove" - + messageChannelSuffix; + public void onCameraMove(@NonNull PlatformCameraPosition cameraPositionArg, @NonNull VoidResult result) { + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(cameraPositionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map camera stops moving. */ public void onCameraIdle(@NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( null, channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map, not a specifc map object, is tapped. */ public void onTap(@NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map, not a specifc map object, is long pressed. */ public void onLongPress(@NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker is tapped. */ public void onMarkerTap(@NonNull String markerIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(markerIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag starts. */ - public void onMarkerDragStart( - @NonNull String markerIdArg, - @NonNull PlatformLatLng positionArg, - @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart" - + messageChannelSuffix; + public void onMarkerDragStart(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag updates. */ - public void onMarkerDrag( - @NonNull String markerIdArg, - @NonNull PlatformLatLng positionArg, - @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag" - + messageChannelSuffix; + public void onMarkerDrag(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag ends. */ - public void onMarkerDragEnd( - @NonNull String markerIdArg, - @NonNull PlatformLatLng positionArg, - @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd" - + messageChannelSuffix; + public void onMarkerDragEnd(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker's info window is tapped. */ public void onInfoWindowTap(@NonNull String markerIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(markerIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a circle is tapped. */ public void onCircleTap(@NonNull String circleIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(circleIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker cluster is tapped. */ public void onClusterTap(@NonNull PlatformCluster clusterArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(clusterArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a POI is tapped. */ public void onPoiTap(@NonNull PlatformPointOfInterest poiArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(poiArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a polygon is tapped. */ public void onPolygonTap(@NonNull String polygonIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(polygonIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a polyline is tapped. */ public void onPolylineTap(@NonNull String polylineIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(polylineIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a ground overlay is tapped. */ public void onGroundOverlayTap(@NonNull String groundOverlayIdArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap" - + messageChannelSuffix; + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(groundOverlayIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called to get data for a map tile. */ - public void getTileOverlayTile( - @NonNull String tileOverlayIdArg, - @NonNull PlatformPoint locationArg, - @NonNull Long zoomArg, - @NonNull Result result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile" - + messageChannelSuffix; + public void getTileOverlayTile(@NonNull String tileOverlayIdArg, @NonNull PlatformPoint locationArg, @NonNull Long zoomArg, @NonNull Result result) { + final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile" + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>( + binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(tileOverlayIdArg, locationArg, zoomArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else if (listReply.get(0) == null) { - result.error( - new FlutterError( - "null-error", - "Flutter api returned null value for non-null return value.", - "")); + result.error(new FlutterError("null-error", "Flutter api returned null value for non-null return value.", "")); } else { @SuppressWarnings("ConstantConditions") PlatformTile output = (PlatformTile) listReply.get(0); result.success(output); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } } /** * Interface for global SDK initialization. * - *

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

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

Calling this more than once in the lifetime of an application will result in an error. + * Calling this more than once in the lifetime of an application will result + * in an error. */ - void initializeWithPreferredRenderer( - @Nullable PlatformRendererType type, @NonNull Result result); + void initializeWithPreferredRenderer(@Nullable PlatformRendererType type, @NonNull Result result); /** - * Attempts to trigger any thread-blocking work the Google Maps SDK normally does when a map is - * shown for the first time. + * Attempts to trigger any thread-blocking work + * the Google Maps SDK normally does when a map is shown for the first time. */ void warmup(); @@ -8249,25 +7711,16 @@ void initializeWithPreferredRenderer( 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) -> { @@ -8296,10 +7749,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8307,7 +7757,8 @@ public void error(Throwable error) { try { api.warmup(); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8319,10 +7770,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 { @@ -8332,26 +7784,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) -> { @@ -8361,7 +7803,8 @@ static void setUp( try { api.createView(typeArg); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8375,81 +7818,72 @@ static void setUp( /** * Inspector API only intended for use in integration tests. * - *

Generated interface from Pigeon that represents a handler of messages from Flutter. + * Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface MapsInspectorApi { - @NonNull + @NonNull Boolean areBuildingsEnabled(); - @NonNull + @NonNull Boolean areRotateGesturesEnabled(); - @NonNull + @NonNull Boolean areZoomControlsEnabled(); - @NonNull + @NonNull Boolean areScrollGesturesEnabled(); - @NonNull + @NonNull Boolean areTiltGesturesEnabled(); - @NonNull + @NonNull Boolean areZoomGesturesEnabled(); - @NonNull + @NonNull Boolean isCompassEnabled(); - @Nullable + @Nullable Boolean isLiteModeEnabled(); - @NonNull + @NonNull Boolean isMapToolbarEnabled(); - @NonNull + @NonNull Boolean isMyLocationButtonEnabled(); - @NonNull + @NonNull Boolean isTrafficEnabled(); - @Nullable + @Nullable PlatformTileLayer getTileOverlayInfo(@NonNull String tileOverlayId); - @Nullable + @Nullable PlatformGroundOverlay getGroundOverlayInfo(@NonNull String groundOverlayId); - @NonNull + @NonNull PlatformZoomRange getZoomRange(); - @NonNull + @NonNull List getClusters(@NonNull String clusterManagerId); - @NonNull + @NonNull PlatformCameraPosition getCameraPosition(); /** The codec used by MapsInspectorApi. */ static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } - /** - * Sets up an instance of `MapsInspectorApi` to handle messages through the `binaryMessenger`. - */ + /**Sets up an instance of `MapsInspectorApi` to handle messages through the `binaryMessenger`. */ static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable MapsInspectorApi api) { setUp(binaryMessenger, "", api); } - - static void setUp( - @NonNull BinaryMessenger binaryMessenger, - @NonNull String messageChannelSuffix, - @Nullable MapsInspectorApi api) { + static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String messageChannelSuffix, @Nullable MapsInspectorApi api) { messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8457,7 +7891,8 @@ static void setUp( try { Boolean output = api.areBuildingsEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8469,10 +7904,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) -> { @@ -8480,7 +7912,8 @@ static void setUp( try { Boolean output = api.areRotateGesturesEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8492,10 +7925,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) -> { @@ -8503,7 +7933,8 @@ static void setUp( try { Boolean output = api.areZoomControlsEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8515,10 +7946,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) -> { @@ -8526,7 +7954,8 @@ static void setUp( try { Boolean output = api.areScrollGesturesEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8538,10 +7967,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) -> { @@ -8549,7 +7975,8 @@ static void setUp( try { Boolean output = api.areTiltGesturesEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8561,10 +7988,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) -> { @@ -8572,7 +7996,8 @@ static void setUp( try { Boolean output = api.areZoomGesturesEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8584,10 +8009,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) -> { @@ -8595,7 +8017,8 @@ static void setUp( try { Boolean output = api.isCompassEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8607,10 +8030,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) -> { @@ -8618,7 +8038,8 @@ static void setUp( try { Boolean output = api.isLiteModeEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8630,10 +8051,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) -> { @@ -8641,7 +8059,8 @@ static void setUp( try { Boolean output = api.isMapToolbarEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8653,10 +8072,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) -> { @@ -8664,7 +8080,8 @@ static void setUp( try { Boolean output = api.isMyLocationButtonEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8676,10 +8093,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) -> { @@ -8687,7 +8101,8 @@ static void setUp( try { Boolean output = api.isTrafficEnabled(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8699,10 +8114,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) -> { @@ -8712,7 +8124,8 @@ static void setUp( try { PlatformTileLayer output = api.getTileOverlayInfo(tileOverlayIdArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8724,10 +8137,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8737,7 +8147,8 @@ static void setUp( try { PlatformGroundOverlay output = api.getGroundOverlayInfo(groundOverlayIdArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8749,10 +8160,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) -> { @@ -8760,7 +8168,8 @@ static void setUp( try { PlatformZoomRange output = api.getZoomRange(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8772,10 +8181,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) -> { @@ -8785,7 +8191,8 @@ static void setUp( try { List output = api.getClusters(clusterManagerIdArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8797,10 +8204,7 @@ static void setUp( { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition" - + messageChannelSuffix, - getCodec()); + binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition" + messageChannelSuffix, getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8808,7 +8212,8 @@ static void setUp( try { PlatformCameraPosition output = api.getCameraPosition(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java index 6d4e9e7d5fe4..8bb8d59da545 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java @@ -323,16 +323,15 @@ public void getCameraPositionReturnsCorrectData() { @Test public void onPoiClick() { - // Note: ensure googleMapController is initialized in your @Before method + GoogleMapController controller = getGoogleMapControllerWithMockedDependencies(); PointOfInterest poi = new PointOfInterest(new LatLng(1.0, 2.0), "placeId", "name"); - googleMapController.onPoiClick(poi); // Use the correct variable name + controller.onPoiClick(poi); ArgumentCaptor poiCaptor = ArgumentCaptor.forClass(Messages.PlatformPointOfInterest.class); - // Verify that the listener was called and capture the result - verify(mockListener).onPoiClick(poiCaptor.capture()); + verify(flutterApi).onPoiTap(poiCaptor.capture(), any(Messages.VoidResult.class)); Messages.PlatformPointOfInterest capturedPoi = poiCaptor.getValue(); assertEquals("name", capturedPoi.getName()); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart index 2107a44ad662..ccdfe8abafce 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart @@ -84,8 +84,8 @@ class ExampleGoogleMapController { (InfoWindowTapEvent e) => _googleMapState.onInfoWindowTap(e.value), ); GoogleMapsFlutterPlatform.instance - .onPoiTap(mapId: mapId) - .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)); + .onPoiTap(mapId: mapId) + .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)); GoogleMapsFlutterPlatform.instance .onPolylineTap(mapId: mapId) .listen((PolylineTapEvent e) => _googleMapState.onPolylineTap(e.value)); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart index 28fb4a222a9c..e3f3c682f3c0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart @@ -13,7 +13,7 @@ import 'page.dart'; class PlacePoiPage extends GoogleMapExampleAppPage { /// Default constructor. const PlacePoiPage({super.key}) - : super(const Icon(Icons.business), 'Place POI'); + : super(const Icon(Icons.business), 'Place POI'); @override Widget build(BuildContext context) { @@ -36,7 +36,7 @@ class PlacePoiBodyState extends State { ExampleGoogleMapController? controller; PointOfInterest? _lastPoi; - final CameraPosition _kSydney = const CameraPosition( + final CameraPosition _kKolkata = const CameraPosition( target: LatLng(22.54222641620606, 88.34560669761545), zoom: 16.0, ); @@ -61,7 +61,7 @@ class PlacePoiBodyState extends State { Expanded( child: ExampleGoogleMap( onMapCreated: _onMapCreated, - initialCameraPosition: _kSydney, + initialCameraPosition: _kKolkata, onPoiTap: _onPoiTap, myLocationButtonEnabled: false, ), @@ -80,7 +80,7 @@ class PlacePoiBodyState extends State { ), const SizedBox(height: 8), if (_lastPoi != null) ...[ - Text('Name: ${_lastPoi!.name}'), + Text('Name: ${_lastPoi!.name ?? "Unknown"}'), Text('Place ID: ${_lastPoi!.placeId}'), Text( 'Lat/Lng: ${_lastPoi!.position.latitude.toStringAsFixed(5)}, ${_lastPoi!.position.longitude.toStringAsFixed(5)}', @@ -93,4 +93,4 @@ class PlacePoiBodyState extends State { ], ); } -} +} \ No newline at end of file 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 2c5106bb0f75..cf8c6a809a0c 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 @@ -1115,7 +1115,7 @@ class PlatformPointOfInterest { result as List; return PlatformPointOfInterest( position: result[0]! as PlatformLatLng, - name: result[1]! as String, + name: result[1] as String?, placeId: result[2]! as String, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_android/pigeons/messages.dart index ef5aead5ec55..3f01ed8e14c4 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 @@ -235,7 +235,6 @@ class PlatformMarker { final String? clusterManagerId; } - /// Pigeon equivalent of the Point of Interest class. class PlatformPointOfInterest { PlatformPointOfInterest({ @@ -657,7 +656,6 @@ class PlatformBitmapBytesMap { final double? height; } - /// Interface for non-test interactions with the native SDK. /// /// For test-only state queries, see [MapsInspectorApi]. diff --git a/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart b/packages/google_maps_flutter/google_maps_flutter_android/test/google_maps_flutter_android_test.dart index 1aa30cbeccb8..f1b680a753b2 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 @@ -1504,7 +1504,6 @@ void main() { const fakePlaceId = 'iso_id_123'; final maps = GoogleMapsFlutterAndroid(); - // Initialize the handler which receives messages from the native side final HostMapMessageHandler callbackHandler = maps.ensureHandlerInitialized( mapId, ); @@ -1513,7 +1512,6 @@ void main() { maps.onPoiTap(mapId: mapId), ); - // Simulate a message from the native Android side (via Pigeon generated handler) callbackHandler.onPoiTap( PlatformPointOfInterest( position: fakePosition, @@ -1522,7 +1520,6 @@ void main() { ), ); - // Verify the event in the stream final MapPoiTapEvent event = await stream.next; expect(event.mapId, mapId); From 689a05e48188db6b91fffa9ad94bce4d41854ac2 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 09:48:20 +0530 Subject: [PATCH 24/46] [google_map_flutter] added tests for ios --- .../example/lib/example_google_map.dart | 11 +++++++ .../example/test/example_google_map_test.dart | 32 +++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/lib/example_google_map.dart index 152f83c16f38..5fc64a32f02c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/lib/example_google_map.dart @@ -106,6 +106,9 @@ class ExampleGoogleMapController { .listen( (MapLongPressEvent e) => _googleMapState.onLongPress(e.position), ); + GoogleMapsFlutterPlatform.instance + .onPoiTap(mapId: mapId) + .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)); GoogleMapsFlutterPlatform.instance .onClusterTap(mapId: mapId) .listen((ClusterTapEvent e) => _googleMapState.onClusterTap(e.value)); @@ -303,6 +306,7 @@ class ExampleGoogleMap extends StatefulWidget { this.trafficEnabled = false, this.buildingsEnabled = true, this.markers = const {}, + this.onPoiTap, this.polygons = const {}, this.polylines = const {}, this.circles = const {}, @@ -365,6 +369,9 @@ class ExampleGoogleMap extends StatefulWidget { /// Markers to be placed on the map. final Set markers; + /// Point of Interest Callback + final void Function(PointOfInterest poi)? onPoiTap; + /// Polygons to be placed on the map. final Set polygons; @@ -640,6 +647,10 @@ class _ExampleGoogleMapState extends State { widget.onTap?.call(position); } + void onPoiTap(PointOfInterest poi) { + widget.onPoiTap?.call(poi); + } + void onLongPress(LatLng position) { widget.onLongPress?.call(position); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart index 261fc473e8bb..a5af3b5249ab 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:async'; import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:google_maps_flutter_example/example_google_map.dart'; @@ -173,4 +174,35 @@ void main() { await tester.pumpAndSettle(); }); + testWidgets('onPoiTap callback is called', (WidgetTester tester) async { + PointOfInterest? tappedPoi; + final Completer mapCreatedCompleter = Completer(); + + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: ExampleGoogleMap( + initialCameraPosition: const CameraPosition(target: LatLng(0, 0)), + onPoiTap: (PointOfInterest poi) => tappedPoi = poi, + onMapCreated: (_) => mapCreatedCompleter.complete(), + ), + ), + ); + + await mapCreatedCompleter.future; + + const PointOfInterest poi = PointOfInterest( + position: LatLng(10.0, 10.0), + name: 'Test POI', + placeId: 'test_id_123', + ); + + platform.mapEventStreamController.add(MapPoiTapEvent(0, poi)); + + await tester.pump(); + + expect(tappedPoi, poi); + expect(tappedPoi!.name, 'Test POI'); + expect(tappedPoi!.placeId, 'test_id_123'); + }); } From aa9f69641228639757e85ea9dbd13a42fce73449 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 09:49:02 +0530 Subject: [PATCH 25/46] [google_map_flutter] removed eol and linting issues --- .../google_maps_flutter/example/lib/place_poi.dart | 2 +- .../src/main/java/io/flutter/plugins/googlemaps/Messages.java | 2 -- .../google_maps_flutter_android/example/lib/place_poi.dart | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart index 64f3cd7fed7f..fda0bab244cc 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart @@ -93,4 +93,4 @@ class PlacePoiBodyState extends State { ], ); } -} \ No newline at end of file +} 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 69956f6fa556..e0a45b22a44e 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,9 +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; /** Generated class from Pigeon. */ diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart index e3f3c682f3c0..4d1f8cf553cf 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart @@ -93,4 +93,4 @@ class PlacePoiBodyState extends State { ], ); } -} \ No newline at end of file +} From 5aea2d07560072391fb6f84c4219d6a0ef475a61 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 10:34:26 +0530 Subject: [PATCH 26/46] [google_maps_flutter] removed unnecesary type annotation --- .../example/test/example_google_map_test.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart index a5af3b5249ab..ea6030705316 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart @@ -176,7 +176,7 @@ void main() { }); testWidgets('onPoiTap callback is called', (WidgetTester tester) async { PointOfInterest? tappedPoi; - final Completer mapCreatedCompleter = Completer(); + final mapCreatedCompleter = Completer(); await tester.pumpWidget( Directionality( @@ -191,7 +191,7 @@ void main() { await mapCreatedCompleter.future; - const PointOfInterest poi = PointOfInterest( + const poi = PointOfInterest( position: LatLng(10.0, 10.0), name: 'Test POI', placeId: 'test_id_123', From a58d87cb9e7987152e3c3f67e56dd1f6eb193b7c Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 10:55:45 +0530 Subject: [PATCH 27/46] [google_maps_flutter] corrected java formatting issue --- .../flutter/plugins/googlemaps/Messages.java | 1666 +++++++++++------ 1 file changed, 1130 insertions(+), 536 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 e0a45b22a44e..dd44bc42a157 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 @@ -39,8 +39,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; @@ -59,14 +58,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) @@ -113,9 +113,9 @@ public enum PlatformJointType { } /** - * Enumeration of possible types of PlatformCap, corresponding to the - * subclasses of Cap in the Google Maps Android SDK. - * See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. + * Enumeration of possible types of PlatformCap, corresponding to the subclasses of Cap in the + * Google Maps Android SDK. See + * https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. */ public enum PlatformCapType { BUTT_CAP(0), @@ -158,7 +158,7 @@ public enum PlatformMapBitmapScaling { /** * Pigeon representatation of a CameraPosition. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraPosition { private @NonNull Double bearing; @@ -218,10 +218,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 @@ -300,16 +307,14 @@ ArrayList toList() { /** * Pigeon representation of a CameraUpdate. * - * Generated class from Pigeon that represents data sent in messages. + *

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

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

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

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

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

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

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

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

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformCameraUpdateZoomTo { private @NonNull Double zoom; @@ -962,8 +1007,12 @@ public void setZoom(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformCameraUpdateZoomTo that = (PlatformCameraUpdateZoomTo) o; return zoom.equals(that.zoom); } @@ -1008,7 +1057,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; @@ -1133,15 +1182,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 { @@ -1275,7 +1345,7 @@ 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 { private @NonNull String heatmapId; @@ -1355,10 +1425,19 @@ public void setMaxIntensity(@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; + } PlatformHeatmap that = (PlatformHeatmap) o; - return heatmapId.equals(that.heatmapId) && data.equals(that.data) && Objects.equals(gradient, that.gradient) && opacity.equals(that.opacity) && radius.equals(that.radius) && Objects.equals(maxIntensity, that.maxIntensity); + return heatmapId.equals(that.heatmapId) + && data.equals(that.data) + && Objects.equals(gradient, that.gradient) + && opacity.equals(that.opacity) + && radius.equals(that.radius) + && Objects.equals(maxIntensity, that.maxIntensity); } @Override @@ -1461,11 +1540,11 @@ ArrayList toList() { /** * Pigeon equivalent of the HeatmapGradient class. * - * The Java Gradient structure is slightly different from HeatmapGradient, so - * this matches the Android API so that conversion can be done on the Dart side - * where the structures are easier to work with. + *

The Java Gradient structure is slightly different from HeatmapGradient, so this matches the + * Android API so that conversion can be done on the Dart side where the structures are easier to + * work with. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformHeatmapGradient { private @NonNull List colors; @@ -1512,10 +1591,16 @@ public void setColorMapSize(@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; + } PlatformHeatmapGradient that = (PlatformHeatmapGradient) o; - return colors.equals(that.colors) && startPoints.equals(that.startPoints) && colorMapSize.equals(that.colorMapSize); + return colors.equals(that.colors) + && startPoints.equals(that.startPoints) + && colorMapSize.equals(that.colorMapSize); } @Override @@ -1582,7 +1667,7 @@ ArrayList toList() { /** * Pigeon equivalent of the WeightedLatLng 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 PlatformWeightedLatLng { private @NonNull PlatformLatLng point; @@ -1616,8 +1701,12 @@ public void setWeight(@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; + } PlatformWeightedLatLng that = (PlatformWeightedLatLng) o; return point.equals(that.point) && weight.equals(that.weight); } @@ -1674,7 +1763,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; @@ -1695,8 +1784,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); } @@ -1741,7 +1834,7 @@ ArrayList toList() { /** * Pair of double values, such as for an offset or size. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformDoublePair { private @NonNull Double x; @@ -1775,8 +1868,12 @@ public void setY(@NonNull Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformDoublePair that = (PlatformDoublePair) o; return x.equals(that.x) && y.equals(that.y); } @@ -1833,9 +1930,9 @@ ArrayList toList() { /** * Pigeon equivalent of the Color class. * - * See https://developer.android.com/reference/android/graphics/Color.html. + *

See https://developer.android.com/reference/android/graphics/Color.html. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformColor { private @NonNull Long argbValue; @@ -1856,8 +1953,12 @@ public void setArgbValue(@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; + } PlatformColor that = (PlatformColor) o; return argbValue.equals(that.argbValue); } @@ -1902,7 +2003,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; @@ -1943,10 +2044,16 @@ public void setAnchor(@NonNull PlatformDoublePair setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformInfoWindow that = (PlatformInfoWindow) o; - return Objects.equals(title, that.title) && Objects.equals(snippet, that.snippet) && anchor.equals(that.anchor); + return Objects.equals(title, that.title) + && Objects.equals(snippet, that.snippet) + && anchor.equals(that.anchor); } @Override @@ -2013,7 +2120,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; @@ -2187,15 +2294,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 { @@ -2377,7 +2513,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Point of Interest 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 PlatformPointOfInterest { private @NonNull PlatformLatLng position; @@ -2421,10 +2557,16 @@ public void setPlaceId(@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; + } PlatformPointOfInterest that = (PlatformPointOfInterest) o; - return position.equals(that.position) && Objects.equals(name, that.name) && placeId.equals(that.placeId); + return position.equals(that.position) + && Objects.equals(name, that.name) + && placeId.equals(that.placeId); } @Override @@ -2491,7 +2633,7 @@ ArrayList toList() { /** * Pigeon equivalent of the Polygon class. * - * Generated class from Pigeon that represents data sent in messages. + *

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

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

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

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformPatternItem { private @NonNull PlatformPatternItemType type; @@ -3274,8 +3472,12 @@ public void setLength(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformPatternItem that = (PlatformPatternItem) o; return type.equals(that.type) && Objects.equals(length, that.length); } @@ -3332,7 +3534,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; @@ -3376,10 +3578,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 @@ -3448,7 +3656,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; @@ -3534,10 +3742,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 @@ -3640,7 +3857,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; @@ -3700,10 +3917,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 @@ -3782,7 +4006,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; @@ -3816,8 +4040,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); } @@ -3874,7 +4102,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; @@ -3908,8 +4136,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); } @@ -3966,7 +4198,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; @@ -4026,10 +4258,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 @@ -4108,7 +4347,7 @@ ArrayList toList() { /** * Pigeon equivalent of the GroundOverlay class. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformGroundOverlay { private @NonNull String groundOverlayId; @@ -4257,15 +4496,42 @@ public void setClickable(@NonNull Boolean setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformGroundOverlay that = (PlatformGroundOverlay) o; - return groundOverlayId.equals(that.groundOverlayId) && image.equals(that.image) && Objects.equals(position, that.position) && Objects.equals(bounds, that.bounds) && Objects.equals(width, that.width) && Objects.equals(height, that.height) && Objects.equals(anchor, that.anchor) && transparency.equals(that.transparency) && bearing.equals(that.bearing) && zIndex.equals(that.zIndex) && visible.equals(that.visible) && clickable.equals(that.clickable); + return groundOverlayId.equals(that.groundOverlayId) + && image.equals(that.image) + && Objects.equals(position, that.position) + && Objects.equals(bounds, that.bounds) + && Objects.equals(width, that.width) + && Objects.equals(height, that.height) + && Objects.equals(anchor, that.anchor) + && transparency.equals(that.transparency) + && bearing.equals(that.bearing) + && zIndex.equals(that.zIndex) + && visible.equals(that.visible) + && clickable.equals(that.clickable); } @Override public int hashCode() { - return Objects.hash(groundOverlayId, image, position, bounds, width, height, anchor, transparency, bearing, zIndex, visible, clickable); + return Objects.hash( + groundOverlayId, + image, + position, + bounds, + width, + height, + anchor, + transparency, + bearing, + zIndex, + visible, + clickable); } public static final class Builder { @@ -4435,10 +4701,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; @@ -4453,8 +4719,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); } @@ -4499,7 +4769,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; @@ -4637,15 +4907,38 @@ public void setInitialGroundOverlays(@NonNull List setter @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformMapViewCreationParams that = (PlatformMapViewCreationParams) o; - return initialCameraPosition.equals(that.initialCameraPosition) && mapConfiguration.equals(that.mapConfiguration) && initialCircles.equals(that.initialCircles) && initialMarkers.equals(that.initialMarkers) && initialPolygons.equals(that.initialPolygons) && initialPolylines.equals(that.initialPolylines) && initialHeatmaps.equals(that.initialHeatmaps) && initialTileOverlays.equals(that.initialTileOverlays) && initialClusterManagers.equals(that.initialClusterManagers) && initialGroundOverlays.equals(that.initialGroundOverlays); + return initialCameraPosition.equals(that.initialCameraPosition) + && mapConfiguration.equals(that.mapConfiguration) + && initialCircles.equals(that.initialCircles) + && initialMarkers.equals(that.initialMarkers) + && initialPolygons.equals(that.initialPolygons) + && initialPolylines.equals(that.initialPolylines) + && initialHeatmaps.equals(that.initialHeatmaps) + && initialTileOverlays.equals(that.initialTileOverlays) + && initialClusterManagers.equals(that.initialClusterManagers) + && initialGroundOverlays.equals(that.initialGroundOverlays); } @Override public int hashCode() { - return Objects.hash(initialCameraPosition, mapConfiguration, initialCircles, initialMarkers, initialPolygons, initialPolylines, initialHeatmaps, initialTileOverlays, initialClusterManagers, initialGroundOverlays); + return Objects.hash( + initialCameraPosition, + mapConfiguration, + initialCircles, + initialMarkers, + initialPolygons, + initialPolylines, + initialHeatmaps, + initialTileOverlays, + initialClusterManagers, + initialGroundOverlays); } public static final class Builder { @@ -4717,7 +5010,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; } @@ -4725,7 +5019,8 @@ public static final class Builder { private @Nullable List initialGroundOverlays; @CanIgnoreReturnValue - public @NonNull Builder setInitialGroundOverlays(@NonNull List setterArg) { + public @NonNull Builder setInitialGroundOverlays( + @NonNull List setterArg) { this.initialGroundOverlays = setterArg; return this; } @@ -4762,7 +5057,8 @@ ArrayList toList() { return toListResult; } - static @NonNull PlatformMapViewCreationParams fromList(@NonNull ArrayList pigeonVar_list) { + static @NonNull PlatformMapViewCreationParams fromList( + @NonNull ArrayList pigeonVar_list) { PlatformMapViewCreationParams pigeonResult = new PlatformMapViewCreationParams(); Object initialCameraPosition = pigeonVar_list.get(0); pigeonResult.setInitialCameraPosition((PlatformCameraPosition) initialCameraPosition); @@ -4791,7 +5087,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; @@ -4996,15 +5292,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(mapId, that.mapId) && Objects.equals(style, that.style); + return Objects.equals(compassEnabled, that.compassEnabled) + && Objects.equals(cameraTargetBounds, that.cameraTargetBounds) + && Objects.equals(mapType, that.mapType) + && Objects.equals(minMaxZoomPreference, that.minMaxZoomPreference) + && Objects.equals(mapToolbarEnabled, that.mapToolbarEnabled) + && Objects.equals(rotateGesturesEnabled, that.rotateGesturesEnabled) + && Objects.equals(scrollGesturesEnabled, that.scrollGesturesEnabled) + && Objects.equals(tiltGesturesEnabled, that.tiltGesturesEnabled) + && Objects.equals(trackCameraPosition, that.trackCameraPosition) + && Objects.equals(zoomControlsEnabled, that.zoomControlsEnabled) + && Objects.equals(zoomGesturesEnabled, that.zoomGesturesEnabled) + && Objects.equals(myLocationEnabled, that.myLocationEnabled) + && Objects.equals(myLocationButtonEnabled, that.myLocationButtonEnabled) + && Objects.equals(padding, that.padding) + && Objects.equals(indoorViewEnabled, that.indoorViewEnabled) + && Objects.equals(trafficEnabled, that.trafficEnabled) + && Objects.equals(buildingsEnabled, that.buildingsEnabled) + && Objects.equals(liteModeEnabled, that.liteModeEnabled) + && Objects.equals(mapId, that.mapId) + && Objects.equals(style, that.style); } @Override public int hashCode() { - return Objects.hash(compassEnabled, cameraTargetBounds, mapType, minMaxZoomPreference, mapToolbarEnabled, rotateGesturesEnabled, scrollGesturesEnabled, tiltGesturesEnabled, trackCameraPosition, zoomControlsEnabled, zoomGesturesEnabled, myLocationEnabled, myLocationButtonEnabled, padding, indoorViewEnabled, trafficEnabled, buildingsEnabled, liteModeEnabled, mapId, style); + return Objects.hash( + compassEnabled, + cameraTargetBounds, + mapType, + minMaxZoomPreference, + mapToolbarEnabled, + rotateGesturesEnabled, + scrollGesturesEnabled, + tiltGesturesEnabled, + trackCameraPosition, + zoomControlsEnabled, + zoomGesturesEnabled, + myLocationEnabled, + myLocationButtonEnabled, + padding, + indoorViewEnabled, + trafficEnabled, + buildingsEnabled, + liteModeEnabled, + mapId, + style); } public static final class Builder { @@ -5020,7 +5359,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; } @@ -5270,7 +5610,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; @@ -5304,8 +5644,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); } @@ -5362,7 +5706,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; @@ -5422,10 +5766,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 @@ -5504,7 +5855,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; @@ -5529,8 +5880,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); } @@ -5585,20 +5940,18 @@ ArrayList toList() { } /** - * Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint - * types of [BitmapDescriptor], [PlatformBitmap] contains a single field which - * may hold the pigeon equivalent type of any of them. + * Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint types of + * [BitmapDescriptor], [PlatformBitmap] contains a single field which may hold the pigeon + * equivalent type of any of them. * - * Generated class from Pigeon that represents data sent in messages. + *

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

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

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

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

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

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

Generated class from Pigeon that represents data sent in messages. */ public static final class PlatformBitmapBytesMap { private @NonNull byte[] byteData; @@ -6254,10 +6636,18 @@ public void setHeight(@Nullable Double setterArg) { @Override public boolean equals(Object o) { - if (this == o) { return true; } - if (o == null || getClass() != o.getClass()) { return false; } + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } PlatformBitmapBytesMap that = (PlatformBitmapBytesMap) o; - return Arrays.equals(byteData, that.byteData) && bitmapScaling.equals(that.bitmapScaling) && imagePixelRatio.equals(that.imagePixelRatio) && Objects.equals(width, that.width) && Objects.equals(height, that.height); + return Arrays.equals(byteData, that.byteData) + && bitmapScaling.equals(that.bitmapScaling) + && imagePixelRatio.equals(that.imagePixelRatio) + && Objects.equals(width, that.width) + && Objects.equals(height, that.height); } @Override @@ -6355,40 +6745,52 @@ private PigeonCodec() {} @Override protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { switch (type) { - case (byte) 129: { - Object value = readValue(buffer); - return value == null ? null : PlatformMapType.values()[((Long) value).intValue()]; - } - case (byte) 130: { - Object value = readValue(buffer); - return value == null ? null : PlatformRendererType.values()[((Long) value).intValue()]; - } - case (byte) 131: { - Object value = readValue(buffer); - return value == null ? null : PlatformJointType.values()[((Long) value).intValue()]; - } - case (byte) 132: { - Object value = readValue(buffer); - return value == null ? null : PlatformCapType.values()[((Long) value).intValue()]; - } - case (byte) 133: { - Object value = readValue(buffer); - return value == null ? null : PlatformPatternItemType.values()[((Long) value).intValue()]; - } - case (byte) 134: { - Object value = readValue(buffer); - return value == null ? null : PlatformMapBitmapScaling.values()[((Long) value).intValue()]; - } + case (byte) 129: + { + Object value = readValue(buffer); + return value == null ? null : PlatformMapType.values()[((Long) value).intValue()]; + } + case (byte) 130: + { + Object value = readValue(buffer); + return value == null ? null : PlatformRendererType.values()[((Long) value).intValue()]; + } + case (byte) 131: + { + Object value = readValue(buffer); + return value == null ? null : PlatformJointType.values()[((Long) value).intValue()]; + } + case (byte) 132: + { + Object value = readValue(buffer); + return value == null ? null : PlatformCapType.values()[((Long) value).intValue()]; + } + case (byte) 133: + { + Object value = readValue(buffer); + return value == null + ? null + : PlatformPatternItemType.values()[((Long) value).intValue()]; + } + case (byte) 134: + { + Object value = readValue(buffer); + return value == null + ? null + : PlatformMapBitmapScaling.values()[((Long) value).intValue()]; + } case (byte) 135: return PlatformCameraPosition.fromList((ArrayList) readValue(buffer)); case (byte) 136: return PlatformCameraUpdate.fromList((ArrayList) readValue(buffer)); case (byte) 137: - return PlatformCameraUpdateNewCameraPosition.fromList((ArrayList) readValue(buffer)); + return PlatformCameraUpdateNewCameraPosition.fromList( + (ArrayList) readValue(buffer)); case (byte) 138: return PlatformCameraUpdateNewLatLng.fromList((ArrayList) readValue(buffer)); case (byte) 139: - return PlatformCameraUpdateNewLatLngBounds.fromList((ArrayList) readValue(buffer)); + return PlatformCameraUpdateNewLatLngBounds.fromList( + (ArrayList) readValue(buffer)); case (byte) 140: return PlatformCameraUpdateNewLatLngZoom.fromList((ArrayList) readValue(buffer)); case (byte) 141: @@ -6630,7 +7032,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. */ @@ -6658,9 +7059,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. */ @@ -6668,75 +7069,91 @@ public interface MapsApi { /** * Updates the map's configuration options. * - * Only non-null configuration values will result in updates; options with - * null values will remain unchanged. + *

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

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

This allows checking asynchronously for initial style failures, as there is no way to + * return failures from map initialization. */ - @NonNull + @NonNull Boolean didLastStyleSucceed(); /** Clears the cache of tiles previously requseted from the tile provider. */ void clearTileCache(@NonNull String tileOverlayId); @@ -6747,16 +7164,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) -> { @@ -6783,7 +7207,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) -> { @@ -6793,8 +7220,7 @@ public void error(Throwable error) { try { api.updateMapConfiguration(configurationArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6806,7 +7232,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) -> { @@ -6818,8 +7247,7 @@ public void error(Throwable error) { try { api.updateCircles(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6831,7 +7259,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) -> { @@ -6843,8 +7274,7 @@ public void error(Throwable error) { try { api.updateHeatmaps(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6856,7 +7286,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) -> { @@ -6867,8 +7300,7 @@ public void error(Throwable error) { try { api.updateClusterManagers(toAddArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6880,7 +7312,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) -> { @@ -6892,8 +7327,7 @@ public void error(Throwable error) { try { api.updateMarkers(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6905,7 +7339,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) -> { @@ -6917,8 +7354,7 @@ public void error(Throwable error) { try { api.updatePolygons(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6930,7 +7366,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) -> { @@ -6942,8 +7381,7 @@ public void error(Throwable error) { try { api.updatePolylines(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6955,7 +7393,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) -> { @@ -6967,8 +7408,7 @@ public void error(Throwable error) { try { api.updateTileOverlays(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -6980,7 +7420,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -6992,8 +7435,7 @@ public void error(Throwable error) { try { api.updateGroundOverlays(toAddArg, toChangeArg, idsToRemoveArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7005,7 +7447,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) -> { @@ -7015,8 +7460,7 @@ public void error(Throwable error) { try { PlatformPoint output = api.getScreenCoordinate(latLngArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7028,7 +7472,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) -> { @@ -7038,8 +7485,7 @@ public void error(Throwable error) { try { PlatformLatLng output = api.getLatLng(screenCoordinateArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7051,7 +7497,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) -> { @@ -7059,8 +7508,7 @@ public void error(Throwable error) { try { PlatformLatLngBounds output = api.getVisibleRegion(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7072,7 +7520,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) -> { @@ -7082,8 +7533,7 @@ public void error(Throwable error) { try { api.moveCamera(cameraUpdateArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7095,7 +7545,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) -> { @@ -7106,8 +7559,7 @@ public void error(Throwable error) { try { api.animateCamera(cameraUpdateArg, durationMillisecondsArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7119,7 +7571,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) -> { @@ -7127,8 +7582,7 @@ public void error(Throwable error) { try { Double output = api.getZoomLevel(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7140,7 +7594,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) -> { @@ -7150,8 +7607,7 @@ public void error(Throwable error) { try { api.showInfoWindow(markerIdArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7163,7 +7619,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) -> { @@ -7173,8 +7632,7 @@ public void error(Throwable error) { try { api.hideInfoWindow(markerIdArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7186,7 +7644,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) -> { @@ -7196,8 +7657,7 @@ public void error(Throwable error) { try { Boolean output = api.isInfoWindowShown(markerIdArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7209,7 +7669,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) -> { @@ -7219,8 +7682,7 @@ public void error(Throwable error) { try { Boolean output = api.setStyle(styleArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7232,7 +7694,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) -> { @@ -7240,8 +7705,7 @@ public void error(Throwable error) { try { Boolean output = api.didLastStyleSucceed(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7253,7 +7717,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) -> { @@ -7263,8 +7730,7 @@ public void error(Throwable error) { try { api.clearTileCache(tileOverlayIdArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7276,7 +7742,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) -> { @@ -7310,398 +7779,466 @@ public static class MapsCallbackApi { public MapsCallbackApi(@NonNull BinaryMessenger argBinaryMessenger) { this(argBinaryMessenger, ""); } - public MapsCallbackApi(@NonNull BinaryMessenger argBinaryMessenger, @NonNull String messageChannelSuffix) { + + public MapsCallbackApi( + @NonNull BinaryMessenger argBinaryMessenger, @NonNull String messageChannelSuffix) { this.binaryMessenger = argBinaryMessenger; this.messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; } - /** - * Public interface for sending reply. - * The codec used by MapsCallbackApi. - */ + /** Public interface for sending reply. The codec used by MapsCallbackApi. */ static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } /** Called when the map camera starts moving. */ public void onCameraMoveStarted(@NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( null, channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map camera moves. */ - public void onCameraMove(@NonNull PlatformCameraPosition cameraPositionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove" + messageChannelSuffix; + public void onCameraMove( + @NonNull PlatformCameraPosition cameraPositionArg, @NonNull VoidResult result) { + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(cameraPositionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map camera stops moving. */ public void onCameraIdle(@NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( null, channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map, not a specifc map object, is tapped. */ public void onTap(@NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when the map, not a specifc map object, is long pressed. */ public void onLongPress(@NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker is tapped. */ public void onMarkerTap(@NonNull String markerIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(markerIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag starts. */ - public void onMarkerDragStart(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart" + messageChannelSuffix; + public void onMarkerDragStart( + @NonNull String markerIdArg, + @NonNull PlatformLatLng positionArg, + @NonNull VoidResult result) { + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag updates. */ - public void onMarkerDrag(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag" + messageChannelSuffix; + public void onMarkerDrag( + @NonNull String markerIdArg, + @NonNull PlatformLatLng positionArg, + @NonNull VoidResult result) { + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker drag ends. */ - public void onMarkerDragEnd(@NonNull String markerIdArg, @NonNull PlatformLatLng positionArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd" + messageChannelSuffix; + public void onMarkerDragEnd( + @NonNull String markerIdArg, + @NonNull PlatformLatLng positionArg, + @NonNull VoidResult result) { + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(markerIdArg, positionArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker's info window is tapped. */ public void onInfoWindowTap(@NonNull String markerIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(markerIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a circle is tapped. */ public void onCircleTap(@NonNull String circleIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(circleIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a marker cluster is tapped. */ public void onClusterTap(@NonNull PlatformCluster clusterArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(clusterArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a POI is tapped. */ public void onPoiTap(@NonNull PlatformPointOfInterest poiArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(poiArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a polygon is tapped. */ public void onPolygonTap(@NonNull String polygonIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(polygonIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a polyline is tapped. */ public void onPolylineTap(@NonNull String polylineIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(polylineIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called when a ground overlay is tapped. */ public void onGroundOverlayTap(@NonNull String groundOverlayIdArg, @NonNull VoidResult result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap" + messageChannelSuffix; + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Collections.singletonList(groundOverlayIdArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else { result.success(); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } /** Called to get data for a map tile. */ - public void getTileOverlayTile(@NonNull String tileOverlayIdArg, @NonNull PlatformPoint locationArg, @NonNull Long zoomArg, @NonNull Result result) { - final String channelName = "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile" + messageChannelSuffix; + public void getTileOverlayTile( + @NonNull String tileOverlayIdArg, + @NonNull PlatformPoint locationArg, + @NonNull Long zoomArg, + @NonNull Result result) { + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile" + + messageChannelSuffix; BasicMessageChannel channel = - new BasicMessageChannel<>( - binaryMessenger, channelName, getCodec()); + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); channel.send( new ArrayList<>(Arrays.asList(tileOverlayIdArg, locationArg, zoomArg)), channelReply -> { if (channelReply instanceof List) { List listReply = (List) channelReply; if (listReply.size() > 1) { - result.error(new FlutterError((String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); } else if (listReply.get(0) == null) { - result.error(new FlutterError("null-error", "Flutter api returned null value for non-null return value.", "")); + result.error( + new FlutterError( + "null-error", + "Flutter api returned null value for non-null return value.", + "")); } else { @SuppressWarnings("ConstantConditions") PlatformTile output = (PlatformTile) listReply.get(0); result.success(output); } - } else { + } else { result.error(createConnectionError(channelName)); - } + } }); } } /** * Interface for global SDK initialization. * - * Generated interface from Pigeon that represents a handler of messages from Flutter. + *

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

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

Calling this more than once in the lifetime of an application will result in an error. */ - void initializeWithPreferredRenderer(@Nullable PlatformRendererType type, @NonNull Result result); + void initializeWithPreferredRenderer( + @Nullable PlatformRendererType type, @NonNull Result result); /** - * Attempts to trigger any thread-blocking work - * the Google Maps SDK normally does when a map is shown for the first time. + * Attempts to trigger any thread-blocking work the Google Maps SDK normally does when a map is + * shown for the first time. */ void warmup(); @@ -7709,16 +8246,25 @@ public interface 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) -> { @@ -7747,7 +8293,10 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7755,8 +8304,7 @@ public void error(Throwable error) { try { api.warmup(); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7768,11 +8316,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 { @@ -7782,16 +8329,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) -> { @@ -7801,8 +8358,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { api.createView(typeArg); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7816,72 +8372,81 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess /** * Inspector API only intended for use in integration tests. * - * Generated interface from Pigeon that represents a handler of messages from Flutter. + *

Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface MapsInspectorApi { - @NonNull + @NonNull Boolean areBuildingsEnabled(); - @NonNull + @NonNull Boolean areRotateGesturesEnabled(); - @NonNull + @NonNull Boolean areZoomControlsEnabled(); - @NonNull + @NonNull Boolean areScrollGesturesEnabled(); - @NonNull + @NonNull Boolean areTiltGesturesEnabled(); - @NonNull + @NonNull Boolean areZoomGesturesEnabled(); - @NonNull + @NonNull Boolean isCompassEnabled(); - @Nullable + @Nullable Boolean isLiteModeEnabled(); - @NonNull + @NonNull Boolean isMapToolbarEnabled(); - @NonNull + @NonNull Boolean isMyLocationButtonEnabled(); - @NonNull + @NonNull Boolean isTrafficEnabled(); - @Nullable + @Nullable PlatformTileLayer getTileOverlayInfo(@NonNull String tileOverlayId); - @Nullable + @Nullable PlatformGroundOverlay getGroundOverlayInfo(@NonNull String groundOverlayId); - @NonNull + @NonNull PlatformZoomRange getZoomRange(); - @NonNull + @NonNull List getClusters(@NonNull String clusterManagerId); - @NonNull + @NonNull PlatformCameraPosition getCameraPosition(); /** The codec used by MapsInspectorApi. */ static @NonNull MessageCodec getCodec() { return PigeonCodec.INSTANCE; } - /**Sets up an instance of `MapsInspectorApi` to handle messages through the `binaryMessenger`. */ + /** + * Sets up an instance of `MapsInspectorApi` to handle messages through the `binaryMessenger`. + */ static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable MapsInspectorApi api) { setUp(binaryMessenger, "", api); } - static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String messageChannelSuffix, @Nullable MapsInspectorApi api) { + + static void setUp( + @NonNull BinaryMessenger binaryMessenger, + @NonNull String messageChannelSuffix, + @Nullable MapsInspectorApi api) { messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -7889,8 +8454,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areBuildingsEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7902,7 +8466,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) -> { @@ -7910,8 +8477,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areRotateGesturesEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7923,7 +8489,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) -> { @@ -7931,8 +8500,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areZoomControlsEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7944,7 +8512,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) -> { @@ -7952,8 +8523,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areScrollGesturesEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7965,7 +8535,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) -> { @@ -7973,8 +8546,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areTiltGesturesEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -7986,7 +8558,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) -> { @@ -7994,8 +8569,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.areZoomGesturesEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8007,7 +8581,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) -> { @@ -8015,8 +8592,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.isCompassEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8028,7 +8604,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) -> { @@ -8036,8 +8615,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.isLiteModeEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8049,7 +8627,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) -> { @@ -8057,8 +8638,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.isMapToolbarEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8070,7 +8650,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) -> { @@ -8078,8 +8661,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.isMyLocationButtonEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8091,7 +8673,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) -> { @@ -8099,8 +8684,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { Boolean output = api.isTrafficEnabled(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8112,7 +8696,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) -> { @@ -8122,8 +8709,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { PlatformTileLayer output = api.getTileOverlayInfo(tileOverlayIdArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8135,7 +8721,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8145,8 +8734,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { PlatformGroundOverlay output = api.getGroundOverlayInfo(groundOverlayIdArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8158,7 +8746,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) -> { @@ -8166,8 +8757,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { PlatformZoomRange output = api.getZoomRange(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8179,7 +8769,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) -> { @@ -8189,8 +8782,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { List output = api.getClusters(clusterManagerIdArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); @@ -8202,7 +8794,10 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition" + messageChannelSuffix, getCodec()); + binaryMessenger, + "dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition" + + messageChannelSuffix, + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -8210,8 +8805,7 @@ static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String mess try { PlatformCameraPosition output = api.getCameraPosition(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { wrapped = wrapError(exception); } reply.reply(wrapped); From 70c2e69d8e36f849c09ba28fa13557ed351eda49 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 11:26:10 +0530 Subject: [PATCH 28/46] [google_maps_flutter] fixed repo check issues --- .../example/lib/example_google_map.dart | 2 +- .../example/lib/example_google_map.dart.rej | 11 + .../lib/src/messages.g.dart | 873 ++-- .../lib/src/messages.g.dart.orig | 4548 +++++++++++++++++ .../lib/src/messages.g.dart.rej | 1574 ++++++ .../pigeons/messages.dart | 2 +- .../google_maps_flutter_android_test.dart | 6 +- .../GoogleMapController.m | 14 +- .../google_maps_flutter_pigeon_messages.g.m | 1888 ++++--- .../google_maps_flutter_pigeon_messages.g.h | 236 +- ...ogle_maps_flutter_pigeon_messages.g.h.orig | 901 ++++ ...oogle_maps_flutter_pigeon_messages.g.h.rej | 807 +++ .../lib/src/messages.g.dart | 824 ++- .../lib/src/messages.g.dart.orig | 4301 ++++++++++++++++ .../lib/src/messages.g.dart.rej | 1496 ++++++ .../pigeons/messages.dart | 1 - .../test/google_maps_flutter_ios_test.dart | 6 +- ...thod_channel_google_maps_flutter_test.dart | 3 +- .../google_maps_flutter_platform_test.dart | 3 +- .../example/integration_test/poi_test.dart | 13 +- .../lib/src/google_maps_controller.dart | 4 +- 21 files changed, 15577 insertions(+), 1936 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart.rej create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.orig create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.rej create mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.orig create mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.rej create mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.orig create mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.rej diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart index ccdfe8abafce..1404a4b4049c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart @@ -104,7 +104,7 @@ class ExampleGoogleMapController { GoogleMapsFlutterPlatform.instance .onTap(mapId: mapId) .listen((MapTapEvent e) => _googleMapState.onTap(e.position)); - GoogleMapsFlutterPlatform.instance + GoogleMapsFlutterPlatform.instance .onPoiTap(mapId: mapId) .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)); GoogleMapsFlutterPlatform.instance diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart.rej b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart.rej new file mode 100644 index 000000000000..b2d158e95efb --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart.rej @@ -0,0 +1,11 @@ +--- packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart ++++ packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart +@@ -104,7 +104,7 @@ class ExampleGoogleMapController { + GoogleMapsFlutterPlatform.instance + .onTap(mapId: mapId) + .listen((MapTapEvent e) => _googleMapState.onTap(e.position)); +- GoogleMapsFlutterPlatform.instance ++ GoogleMapsFlutterPlatform.instance + .onPoiTap(mapId: mapId) + .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)); + GoogleMapsFlutterPlatform.instance 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 cf8c6a809a0c..d03c64a1d86d 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,11 @@ 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 []; } @@ -104,16 +108,12 @@ class PlatformCameraPosition { double zoom; List _toList() { - return [ - bearing, - target, - tilt, - zoom, - ]; + return [bearing, target, tilt, zoom]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraPosition decode(Object result) { result as List; @@ -139,15 +139,12 @@ class PlatformCameraPosition { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon representation of a CameraUpdate. class PlatformCameraUpdate { - PlatformCameraUpdate({ - required this.cameraUpdate, - }); + PlatformCameraUpdate({required this.cameraUpdate}); /// This Object shall be any of the below classes prefixed with /// PlatformCameraUpdate. Each such class represents a different type of @@ -158,19 +155,16 @@ class PlatformCameraUpdate { Object cameraUpdate; List _toList() { - return [ - cameraUpdate, - ]; + return [cameraUpdate]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdate decode(Object result) { result as List; - return PlatformCameraUpdate( - cameraUpdate: result[0]!, - ); + return PlatformCameraUpdate(cameraUpdate: result[0]!); } @override @@ -187,26 +181,22 @@ class PlatformCameraUpdate { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of NewCameraPosition class PlatformCameraUpdateNewCameraPosition { - PlatformCameraUpdateNewCameraPosition({ - required this.cameraPosition, - }); + PlatformCameraUpdateNewCameraPosition({required this.cameraPosition}); PlatformCameraPosition cameraPosition; List _toList() { - return [ - cameraPosition, - ]; + return [cameraPosition]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdateNewCameraPosition decode(Object result) { result as List; @@ -218,7 +208,8 @@ class PlatformCameraUpdateNewCameraPosition { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewCameraPosition || other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateNewCameraPosition || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -229,38 +220,33 @@ class PlatformCameraUpdateNewCameraPosition { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of NewLatLng class PlatformCameraUpdateNewLatLng { - PlatformCameraUpdateNewLatLng({ - required this.latLng, - }); + PlatformCameraUpdateNewLatLng({required this.latLng}); PlatformLatLng latLng; List _toList() { - return [ - latLng, - ]; + return [latLng]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdateNewLatLng decode(Object result) { result as List; - return PlatformCameraUpdateNewLatLng( - latLng: result[0]! as PlatformLatLng, - ); + return PlatformCameraUpdateNewLatLng(latLng: result[0]! as PlatformLatLng); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLng || other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateNewLatLng || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -271,8 +257,7 @@ class PlatformCameraUpdateNewLatLng { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of NewLatLngBounds @@ -287,14 +272,12 @@ class PlatformCameraUpdateNewLatLngBounds { double padding; List _toList() { - return [ - bounds, - padding, - ]; + return [bounds, padding]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdateNewLatLngBounds decode(Object result) { result as List; @@ -307,7 +290,8 @@ class PlatformCameraUpdateNewLatLngBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLngBounds || other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateNewLatLngBounds || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -318,30 +302,24 @@ class PlatformCameraUpdateNewLatLngBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of NewLatLngZoom class PlatformCameraUpdateNewLatLngZoom { - PlatformCameraUpdateNewLatLngZoom({ - required this.latLng, - required this.zoom, - }); + PlatformCameraUpdateNewLatLngZoom({required this.latLng, required this.zoom}); PlatformLatLng latLng; double zoom; List _toList() { - return [ - latLng, - zoom, - ]; + return [latLng, zoom]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdateNewLatLngZoom decode(Object result) { result as List; @@ -354,7 +332,8 @@ class PlatformCameraUpdateNewLatLngZoom { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLngZoom || other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateNewLatLngZoom || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -365,30 +344,24 @@ class PlatformCameraUpdateNewLatLngZoom { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of ScrollBy class PlatformCameraUpdateScrollBy { - PlatformCameraUpdateScrollBy({ - required this.dx, - required this.dy, - }); + PlatformCameraUpdateScrollBy({required this.dx, required this.dy}); double dx; double dy; List _toList() { - return [ - dx, - dy, - ]; + return [dx, dy]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdateScrollBy decode(Object result) { result as List; @@ -401,7 +374,8 @@ class PlatformCameraUpdateScrollBy { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateScrollBy || other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateScrollBy || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -412,30 +386,24 @@ class PlatformCameraUpdateScrollBy { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of ZoomBy class PlatformCameraUpdateZoomBy { - PlatformCameraUpdateZoomBy({ - required this.amount, - this.focus, - }); + PlatformCameraUpdateZoomBy({required this.amount, this.focus}); double amount; PlatformDoublePair? focus; List _toList() { - return [ - amount, - focus, - ]; + return [amount, focus]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdateZoomBy decode(Object result) { result as List; @@ -448,7 +416,8 @@ class PlatformCameraUpdateZoomBy { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoomBy || other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateZoomBy || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -459,38 +428,33 @@ class PlatformCameraUpdateZoomBy { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of ZoomIn/ZoomOut class PlatformCameraUpdateZoom { - PlatformCameraUpdateZoom({ - required this.out, - }); + PlatformCameraUpdateZoom({required this.out}); bool out; List _toList() { - return [ - out, - ]; + return [out]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdateZoom decode(Object result) { result as List; - return PlatformCameraUpdateZoom( - out: result[0]! as bool, - ); + return PlatformCameraUpdateZoom(out: result[0]! as bool); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoom || other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateZoom || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -501,38 +465,33 @@ class PlatformCameraUpdateZoom { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of ZoomTo class PlatformCameraUpdateZoomTo { - PlatformCameraUpdateZoomTo({ - required this.zoom, - }); + PlatformCameraUpdateZoomTo({required this.zoom}); double zoom; List _toList() { - return [ - zoom, - ]; + return [zoom]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdateZoomTo decode(Object result) { result as List; - return PlatformCameraUpdateZoomTo( - zoom: result[0]! as double, - ); + return PlatformCameraUpdateZoomTo(zoom: result[0]! as double); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoomTo || other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateZoomTo || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -543,8 +502,7 @@ class PlatformCameraUpdateZoomTo { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Circle class. @@ -594,7 +552,8 @@ class PlatformCircle { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCircle decode(Object result) { result as List; @@ -625,8 +584,7 @@ class PlatformCircle { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Heatmap class. @@ -653,18 +611,12 @@ class PlatformHeatmap { double? maxIntensity; List _toList() { - return [ - heatmapId, - data, - gradient, - opacity, - radius, - maxIntensity, - ]; + return [heatmapId, data, gradient, opacity, radius, maxIntensity]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformHeatmap decode(Object result) { result as List; @@ -692,8 +644,7 @@ class PlatformHeatmap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the HeatmapGradient class. @@ -715,15 +666,12 @@ class PlatformHeatmapGradient { int colorMapSize; List _toList() { - return [ - colors, - startPoints, - colorMapSize, - ]; + return [colors, startPoints, colorMapSize]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformHeatmapGradient decode(Object result) { result as List; @@ -748,30 +696,24 @@ class PlatformHeatmapGradient { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the WeightedLatLng class. class PlatformWeightedLatLng { - PlatformWeightedLatLng({ - required this.point, - required this.weight, - }); + PlatformWeightedLatLng({required this.point, required this.weight}); PlatformLatLng point; double weight; List _toList() { - return [ - point, - weight, - ]; + return [point, weight]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformWeightedLatLng decode(Object result) { result as List; @@ -795,32 +737,26 @@ class PlatformWeightedLatLng { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the ClusterManager class. class PlatformClusterManager { - PlatformClusterManager({ - required this.identifier, - }); + PlatformClusterManager({required this.identifier}); String identifier; List _toList() { - return [ - identifier, - ]; + return [identifier]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformClusterManager decode(Object result) { result as List; - return PlatformClusterManager( - identifier: result[0]! as String, - ); + return PlatformClusterManager(identifier: result[0]! as String); } @override @@ -837,37 +773,28 @@ class PlatformClusterManager { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pair of double values, such as for an offset or size. class PlatformDoublePair { - PlatformDoublePair({ - required this.x, - required this.y, - }); + PlatformDoublePair({required this.x, required this.y}); double x; double y; List _toList() { - return [ - x, - y, - ]; + return [x, y]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformDoublePair decode(Object result) { result as List; - return PlatformDoublePair( - x: result[0]! as double, - y: result[1]! as double, - ); + return PlatformDoublePair(x: result[0]! as double, y: result[1]! as double); } @override @@ -884,34 +811,28 @@ class PlatformDoublePair { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Color class. /// /// See https://developer.android.com/reference/android/graphics/Color.html. class PlatformColor { - PlatformColor({ - required this.argbValue, - }); + PlatformColor({required this.argbValue}); int argbValue; List _toList() { - return [ - argbValue, - ]; + return [argbValue]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformColor decode(Object result) { result as List; - return PlatformColor( - argbValue: result[0]! as int, - ); + return PlatformColor(argbValue: result[0]! as int); } @override @@ -928,17 +849,12 @@ class PlatformColor { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the InfoWindow class. class PlatformInfoWindow { - PlatformInfoWindow({ - this.title, - this.snippet, - required this.anchor, - }); + PlatformInfoWindow({this.title, this.snippet, required this.anchor}); String? title; @@ -947,15 +863,12 @@ class PlatformInfoWindow { PlatformDoublePair anchor; List _toList() { - return [ - title, - snippet, - anchor, - ]; + return [title, snippet, anchor]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformInfoWindow decode(Object result) { result as List; @@ -980,8 +893,7 @@ class PlatformInfoWindow { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Marker class. @@ -1047,7 +959,8 @@ class PlatformMarker { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformMarker decode(Object result) { result as List; @@ -1082,8 +995,7 @@ class PlatformMarker { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Point of Interest class. @@ -1101,15 +1013,12 @@ class PlatformPointOfInterest { String placeId; List _toList() { - return [ - position, - name, - placeId, - ]; + return [position, name, placeId]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformPointOfInterest decode(Object result) { result as List; @@ -1134,8 +1043,7 @@ class PlatformPointOfInterest { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Polygon class. @@ -1189,7 +1097,8 @@ class PlatformPolygon { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformPolygon decode(Object result) { result as List; @@ -1221,8 +1130,7 @@ class PlatformPolygon { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Polyline class. @@ -1288,7 +1196,8 @@ class PlatformPolyline { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformPolyline decode(Object result) { result as List; @@ -1322,18 +1231,13 @@ class PlatformPolyline { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of Cap from the platform interface. /// https://github.com/flutter/packages/blob/main/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/cap.dart class PlatformCap { - PlatformCap({ - required this.type, - this.bitmapDescriptor, - this.refWidth, - }); + PlatformCap({required this.type, this.bitmapDescriptor, this.refWidth}); PlatformCapType type; @@ -1342,15 +1246,12 @@ class PlatformCap { double? refWidth; List _toList() { - return [ - type, - bitmapDescriptor, - refWidth, - ]; + return [type, bitmapDescriptor, refWidth]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCap decode(Object result) { result as List; @@ -1375,30 +1276,24 @@ class PlatformCap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the PatternItem class. class PlatformPatternItem { - PlatformPatternItem({ - required this.type, - this.length, - }); + PlatformPatternItem({required this.type, this.length}); PlatformPatternItemType type; double? length; List _toList() { - return [ - type, - length, - ]; + return [type, length]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformPatternItem decode(Object result) { result as List; @@ -1422,17 +1317,12 @@ class PlatformPatternItem { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Tile class. class PlatformTile { - PlatformTile({ - required this.width, - required this.height, - this.data, - }); + PlatformTile({required this.width, required this.height, this.data}); int width; @@ -1441,15 +1331,12 @@ class PlatformTile { Uint8List? data; List _toList() { - return [ - width, - height, - data, - ]; + return [width, height, data]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformTile decode(Object result) { result as List; @@ -1474,8 +1361,7 @@ class PlatformTile { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the TileOverlay class. @@ -1513,7 +1399,8 @@ class PlatformTileOverlay { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformTileOverlay decode(Object result) { result as List; @@ -1541,8 +1428,7 @@ class PlatformTileOverlay { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of Flutter's EdgeInsets. @@ -1563,16 +1449,12 @@ class PlatformEdgeInsets { double right; List _toList() { - return [ - top, - bottom, - left, - right, - ]; + return [top, bottom, left, right]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformEdgeInsets decode(Object result) { result as List; @@ -1598,30 +1480,24 @@ class PlatformEdgeInsets { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of LatLng. class PlatformLatLng { - PlatformLatLng({ - required this.latitude, - required this.longitude, - }); + PlatformLatLng({required this.latitude, required this.longitude}); double latitude; double longitude; List _toList() { - return [ - latitude, - longitude, - ]; + return [latitude, longitude]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformLatLng decode(Object result) { result as List; @@ -1645,30 +1521,24 @@ class PlatformLatLng { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of LatLngBounds. class PlatformLatLngBounds { - PlatformLatLngBounds({ - required this.northeast, - required this.southwest, - }); + PlatformLatLngBounds({required this.northeast, required this.southwest}); PlatformLatLng northeast; PlatformLatLng southwest; List _toList() { - return [ - northeast, - southwest, - ]; + return [northeast, southwest]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformLatLngBounds decode(Object result) { result as List; @@ -1692,8 +1562,7 @@ class PlatformLatLngBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of Cluster. @@ -1714,16 +1583,12 @@ class PlatformCluster { List markerIds; List _toList() { - return [ - clusterManagerId, - position, - bounds, - markerIds, - ]; + return [clusterManagerId, position, bounds, markerIds]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCluster decode(Object result) { result as List; @@ -1749,8 +1614,7 @@ class PlatformCluster { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the GroundOverlay class. @@ -1812,7 +1676,8 @@ class PlatformGroundOverlay { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformGroundOverlay decode(Object result) { result as List; @@ -1846,8 +1711,7 @@ class PlatformGroundOverlay { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of CameraTargetBounds. @@ -1855,20 +1719,17 @@ class PlatformGroundOverlay { /// As with the Dart version, it exists to distinguish between not setting a /// a target, and having an explicitly unbounded target (null [bounds]). class PlatformCameraTargetBounds { - PlatformCameraTargetBounds({ - this.bounds, - }); + PlatformCameraTargetBounds({this.bounds}); PlatformLatLngBounds? bounds; List _toList() { - return [ - bounds, - ]; + return [bounds]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraTargetBounds decode(Object result) { result as List; @@ -1880,7 +1741,8 @@ class PlatformCameraTargetBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraTargetBounds || other.runtimeType != runtimeType) { + if (other is! PlatformCameraTargetBounds || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -1891,8 +1753,7 @@ class PlatformCameraTargetBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Information passed to the platform view creation. @@ -1946,7 +1807,8 @@ class PlatformMapViewCreationParams { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformMapViewCreationParams decode(Object result) { result as List; @@ -1958,16 +1820,20 @@ class PlatformMapViewCreationParams { initialPolygons: (result[4] as List?)!.cast(), initialPolylines: (result[5] as List?)!.cast(), initialHeatmaps: (result[6] as List?)!.cast(), - initialTileOverlays: (result[7] as List?)!.cast(), - initialClusterManagers: (result[8] as List?)!.cast(), - initialGroundOverlays: (result[9] as List?)!.cast(), + initialTileOverlays: (result[7] as List?)! + .cast(), + initialClusterManagers: (result[8] as List?)! + .cast(), + initialGroundOverlays: (result[9] as List?)! + .cast(), ); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformMapViewCreationParams || other.runtimeType != runtimeType) { + if (other is! PlatformMapViewCreationParams || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -1978,8 +1844,7 @@ class PlatformMapViewCreationParams { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of MapConfiguration. @@ -2073,7 +1938,8 @@ class PlatformMapConfiguration { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformMapConfiguration decode(Object result) { result as List; @@ -2104,7 +1970,8 @@ class PlatformMapConfiguration { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformMapConfiguration || other.runtimeType != runtimeType) { + if (other is! PlatformMapConfiguration || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -2115,37 +1982,28 @@ class PlatformMapConfiguration { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon representation of an x,y coordinate. class PlatformPoint { - PlatformPoint({ - required this.x, - required this.y, - }); + PlatformPoint({required this.x, required this.y}); int x; int y; List _toList() { - return [ - x, - y, - ]; + return [x, y]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformPoint decode(Object result) { result as List; - return PlatformPoint( - x: result[0]! as int, - y: result[1]! as int, - ); + return PlatformPoint(x: result[0]! as int, y: result[1]! as int); } @override @@ -2162,8 +2020,7 @@ class PlatformPoint { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of native TileOverlay properties. @@ -2184,16 +2041,12 @@ class PlatformTileLayer { double zIndex; List _toList() { - return [ - visible, - fadeIn, - transparency, - zIndex, - ]; + return [visible, fadeIn, transparency, zIndex]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformTileLayer decode(Object result) { result as List; @@ -2219,30 +2072,24 @@ class PlatformTileLayer { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Possible outcomes of launching a URL. class PlatformZoomRange { - PlatformZoomRange({ - this.min, - this.max, - }); + PlatformZoomRange({this.min, this.max}); double? min; double? max; List _toList() { - return [ - min, - max, - ]; + return [min, max]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformZoomRange decode(Object result) { result as List; @@ -2266,17 +2113,14 @@ class PlatformZoomRange { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint /// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which /// may hold the pigeon equivalent type of any of them. class PlatformBitmap { - PlatformBitmap({ - required this.bitmap, - }); + PlatformBitmap({required this.bitmap}); /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], @@ -2288,19 +2132,16 @@ class PlatformBitmap { Object bitmap; List _toList() { - return [ - bitmap, - ]; + return [bitmap]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformBitmap decode(Object result) { result as List; - return PlatformBitmap( - bitmap: result[0]!, - ); + return PlatformBitmap(bitmap: result[0]!); } @override @@ -2317,39 +2158,34 @@ class PlatformBitmap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [DefaultMarker]. See /// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#defaultMarker(float) class PlatformBitmapDefaultMarker { - PlatformBitmapDefaultMarker({ - this.hue, - }); + PlatformBitmapDefaultMarker({this.hue}); double? hue; List _toList() { - return [ - hue, - ]; + return [hue]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformBitmapDefaultMarker decode(Object result) { result as List; - return PlatformBitmapDefaultMarker( - hue: result[0] as double?, - ); + return PlatformBitmapDefaultMarker(hue: result[0] as double?); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformBitmapDefaultMarker || other.runtimeType != runtimeType) { + if (other is! PlatformBitmapDefaultMarker || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -2360,31 +2196,25 @@ class PlatformBitmapDefaultMarker { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [BytesBitmap]. See /// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#fromBitmap(android.graphics.Bitmap) class PlatformBitmapBytes { - PlatformBitmapBytes({ - required this.byteData, - this.size, - }); + PlatformBitmapBytes({required this.byteData, this.size}); Uint8List byteData; PlatformDoublePair? size; List _toList() { - return [ - byteData, - size, - ]; + return [byteData, size]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformBitmapBytes decode(Object result) { result as List; @@ -2408,31 +2238,25 @@ class PlatformBitmapBytes { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [AssetBitmap]. See /// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname class PlatformBitmapAsset { - PlatformBitmapAsset({ - required this.name, - this.pkg, - }); + PlatformBitmapAsset({required this.name, this.pkg}); String name; String? pkg; List _toList() { - return [ - name, - pkg, - ]; + return [name, pkg]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformBitmapAsset decode(Object result) { result as List; @@ -2456,8 +2280,7 @@ class PlatformBitmapAsset { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [AssetImageBitmap]. See @@ -2476,15 +2299,12 @@ class PlatformBitmapAssetImage { PlatformDoublePair? size; List _toList() { - return [ - name, - scale, - size, - ]; + return [name, scale, size]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformBitmapAssetImage decode(Object result) { result as List; @@ -2498,7 +2318,8 @@ class PlatformBitmapAssetImage { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformBitmapAssetImage || other.runtimeType != runtimeType) { + if (other is! PlatformBitmapAssetImage || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -2509,8 +2330,7 @@ class PlatformBitmapAssetImage { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [AssetMapBitmap]. See @@ -2535,17 +2355,12 @@ class PlatformBitmapAssetMap { double? height; List _toList() { - return [ - assetName, - bitmapScaling, - imagePixelRatio, - width, - height, - ]; + return [assetName, bitmapScaling, imagePixelRatio, width, height]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformBitmapAssetMap decode(Object result) { result as List; @@ -2572,8 +2387,7 @@ class PlatformBitmapAssetMap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [BytesMapBitmap]. See @@ -2598,17 +2412,12 @@ class PlatformBitmapBytesMap { double? height; List _toList() { - return [ - byteData, - bitmapScaling, - imagePixelRatio, - width, - height, - ]; + return [byteData, bitmapScaling, imagePixelRatio, width, height]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformBitmapBytesMap decode(Object result) { result as List; @@ -2635,11 +2444,9 @@ class PlatformBitmapBytesMap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } - class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -2647,154 +2454,154 @@ class _PigeonCodec extends StandardMessageCodec { if (value is int) { buffer.putUint8(4); buffer.putInt64(value); - } else if (value is PlatformMapType) { + } else if (value is PlatformMapType) { buffer.putUint8(129); writeValue(buffer, value.index); - } else if (value is PlatformRendererType) { + } else if (value is PlatformRendererType) { buffer.putUint8(130); writeValue(buffer, value.index); - } else if (value is PlatformJointType) { + } else if (value is PlatformJointType) { buffer.putUint8(131); writeValue(buffer, value.index); - } else if (value is PlatformCapType) { + } else if (value is PlatformCapType) { buffer.putUint8(132); writeValue(buffer, value.index); - } else if (value is PlatformPatternItemType) { + } else if (value is PlatformPatternItemType) { buffer.putUint8(133); writeValue(buffer, value.index); - } else if (value is PlatformMapBitmapScaling) { + } else if (value is PlatformMapBitmapScaling) { buffer.putUint8(134); writeValue(buffer, value.index); - } else if (value is PlatformCameraPosition) { + } else if (value is PlatformCameraPosition) { buffer.putUint8(135); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { + } else if (value is PlatformCameraUpdate) { buffer.putUint8(136); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewCameraPosition) { + } else if (value is PlatformCameraUpdateNewCameraPosition) { buffer.putUint8(137); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLng) { + } else if (value is PlatformCameraUpdateNewLatLng) { buffer.putUint8(138); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngBounds) { + } else if (value is PlatformCameraUpdateNewLatLngBounds) { buffer.putUint8(139); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngZoom) { + } else if (value is PlatformCameraUpdateNewLatLngZoom) { buffer.putUint8(140); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateScrollBy) { + } else if (value is PlatformCameraUpdateScrollBy) { buffer.putUint8(141); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomBy) { + } else if (value is PlatformCameraUpdateZoomBy) { buffer.putUint8(142); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoom) { + } else if (value is PlatformCameraUpdateZoom) { buffer.putUint8(143); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomTo) { + } else if (value is PlatformCameraUpdateZoomTo) { buffer.putUint8(144); writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { + } else if (value is PlatformCircle) { buffer.putUint8(145); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { + } else if (value is PlatformHeatmap) { buffer.putUint8(146); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmapGradient) { + } else if (value is PlatformHeatmapGradient) { buffer.putUint8(147); writeValue(buffer, value.encode()); - } else if (value is PlatformWeightedLatLng) { + } else if (value is PlatformWeightedLatLng) { buffer.putUint8(148); writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { + } else if (value is PlatformClusterManager) { buffer.putUint8(149); writeValue(buffer, value.encode()); - } else if (value is PlatformDoublePair) { + } else if (value is PlatformDoublePair) { buffer.putUint8(150); writeValue(buffer, value.encode()); - } else if (value is PlatformColor) { + } else if (value is PlatformColor) { buffer.putUint8(151); writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { + } else if (value is PlatformInfoWindow) { buffer.putUint8(152); writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { + } else if (value is PlatformMarker) { buffer.putUint8(153); writeValue(buffer, value.encode()); - } else if (value is PlatformPointOfInterest) { + } else if (value is PlatformPointOfInterest) { buffer.putUint8(154); writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { + } else if (value is PlatformPolygon) { buffer.putUint8(155); writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { + } else if (value is PlatformPolyline) { buffer.putUint8(156); writeValue(buffer, value.encode()); - } else if (value is PlatformCap) { + } else if (value is PlatformCap) { buffer.putUint8(157); writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { + } else if (value is PlatformPatternItem) { buffer.putUint8(158); writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { + } else if (value is PlatformTile) { buffer.putUint8(159); writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { + } else if (value is PlatformTileOverlay) { buffer.putUint8(160); writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { + } else if (value is PlatformEdgeInsets) { buffer.putUint8(161); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { + } else if (value is PlatformLatLng) { buffer.putUint8(162); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { + } else if (value is PlatformLatLngBounds) { buffer.putUint8(163); writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { + } else if (value is PlatformCluster) { buffer.putUint8(164); writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { + } else if (value is PlatformGroundOverlay) { buffer.putUint8(165); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { + } else if (value is PlatformCameraTargetBounds) { buffer.putUint8(166); writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { + } else if (value is PlatformMapViewCreationParams) { buffer.putUint8(167); writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { + } else if (value is PlatformMapConfiguration) { buffer.putUint8(168); writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { + } else if (value is PlatformPoint) { buffer.putUint8(169); writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { + } else if (value is PlatformTileLayer) { buffer.putUint8(170); writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { + } else if (value is PlatformZoomRange) { buffer.putUint8(171); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { + } else if (value is PlatformBitmap) { buffer.putUint8(172); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { + } else if (value is PlatformBitmapDefaultMarker) { buffer.putUint8(173); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { + } else if (value is PlatformBitmapBytes) { buffer.putUint8(174); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { + } else if (value is PlatformBitmapAsset) { buffer.putUint8(175); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { + } else if (value is PlatformBitmapAssetImage) { buffer.putUint8(176); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { + } else if (value is PlatformBitmapAssetMap) { buffer.putUint8(177); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { + } else if (value is PlatformBitmapBytesMap) { buffer.putUint8(178); writeValue(buffer, value.encode()); } else { @@ -2805,111 +2612,111 @@ class _PigeonCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 129: + case 129: final value = readValue(buffer) as int?; return value == null ? null : PlatformMapType.values[value]; - case 130: + case 130: final value = readValue(buffer) as int?; return value == null ? null : PlatformRendererType.values[value]; - case 131: + case 131: final value = readValue(buffer) as int?; return value == null ? null : PlatformJointType.values[value]; - case 132: + case 132: final value = readValue(buffer) as int?; return value == null ? null : PlatformCapType.values[value]; - case 133: + case 133: final value = readValue(buffer) as int?; return value == null ? null : PlatformPatternItemType.values[value]; - case 134: + case 134: final value = readValue(buffer) as int?; return value == null ? null : PlatformMapBitmapScaling.values[value]; - case 135: + case 135: return PlatformCameraPosition.decode(readValue(buffer)!); - case 136: + case 136: return PlatformCameraUpdate.decode(readValue(buffer)!); - case 137: + case 137: return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!); - case 138: + case 138: return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!); - case 139: + case 139: return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); - case 140: + case 140: return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); - case 141: + case 141: return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); - case 142: + case 142: return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); - case 143: + case 143: return PlatformCameraUpdateZoom.decode(readValue(buffer)!); - case 144: + case 144: return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); - case 145: + case 145: return PlatformCircle.decode(readValue(buffer)!); - case 146: + case 146: return PlatformHeatmap.decode(readValue(buffer)!); - case 147: + case 147: return PlatformHeatmapGradient.decode(readValue(buffer)!); - case 148: + case 148: return PlatformWeightedLatLng.decode(readValue(buffer)!); - case 149: + case 149: return PlatformClusterManager.decode(readValue(buffer)!); - case 150: + case 150: return PlatformDoublePair.decode(readValue(buffer)!); - case 151: + case 151: return PlatformColor.decode(readValue(buffer)!); - case 152: + case 152: return PlatformInfoWindow.decode(readValue(buffer)!); - case 153: + case 153: return PlatformMarker.decode(readValue(buffer)!); - case 154: + case 154: return PlatformPointOfInterest.decode(readValue(buffer)!); - case 155: + case 155: return PlatformPolygon.decode(readValue(buffer)!); - case 156: + case 156: return PlatformPolyline.decode(readValue(buffer)!); - case 157: + case 157: return PlatformCap.decode(readValue(buffer)!); - case 158: + case 158: return PlatformPatternItem.decode(readValue(buffer)!); - case 159: + case 159: return PlatformTile.decode(readValue(buffer)!); - case 160: + case 160: return PlatformTileOverlay.decode(readValue(buffer)!); - case 161: + case 161: return PlatformEdgeInsets.decode(readValue(buffer)!); - case 162: + case 162: return PlatformLatLng.decode(readValue(buffer)!); - case 163: + case 163: return PlatformLatLngBounds.decode(readValue(buffer)!); - case 164: + case 164: return PlatformCluster.decode(readValue(buffer)!); - case 165: + case 165: return PlatformGroundOverlay.decode(readValue(buffer)!); - case 166: + case 166: return PlatformCameraTargetBounds.decode(readValue(buffer)!); - case 167: + case 167: return PlatformMapViewCreationParams.decode(readValue(buffer)!); - case 168: + case 168: return PlatformMapConfiguration.decode(readValue(buffer)!); - case 169: + case 169: return PlatformPoint.decode(readValue(buffer)!); - case 170: + case 170: return PlatformTileLayer.decode(readValue(buffer)!); - case 171: + case 171: return PlatformZoomRange.decode(readValue(buffer)!); - case 172: + case 172: return PlatformBitmap.decode(readValue(buffer)!); - case 173: + case 173: return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); - case 174: + case 174: return PlatformBitmapBytes.decode(readValue(buffer)!); - case 175: + case 175: return PlatformBitmapAsset.decode(readValue(buffer)!); - case 176: + case 176: return PlatformBitmapAssetImage.decode(readValue(buffer)!); - case 177: + case 177: return PlatformBitmapAssetMap.decode(readValue(buffer)!); - case 178: + case 178: return PlatformBitmapBytesMap.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.orig b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.orig new file mode 100644 index 000000000000..cf8c6a809a0c --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.orig @@ -0,0 +1,4548 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +PlatformException _createConnectionError(String channelName) { + return PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel: "$channelName".', + ); +} + +List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { + if (empty) { + return []; + } + if (error == null) { + return [result]; + } + return [error.code, error.message, error.details]; +} +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed + .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); + } + if (a is Map && b is Map) { + return a.length == b.length && a.entries.every((MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key])); + } + return a == b; +} + + +/// Pigeon equivalent of MapType +enum PlatformMapType { + none, + normal, + satellite, + terrain, + hybrid, +} + +enum PlatformRendererType { + legacy, + latest, +} + +/// Join types for polyline joints. +enum PlatformJointType { + mitered, + bevel, + round, +} + +/// Enumeration of possible types of PlatformCap, corresponding to the +/// subclasses of Cap in the Google Maps Android SDK. +/// See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. +enum PlatformCapType { + buttCap, + roundCap, + squareCap, + customCap, +} + +/// Enumeration of possible types for PatternItem. +enum PlatformPatternItemType { + dot, + dash, + gap, +} + +/// Pigeon equivalent of [MapBitmapScaling]. +enum PlatformMapBitmapScaling { + auto, + none, +} + +/// Pigeon representatation of a CameraPosition. +class PlatformCameraPosition { + PlatformCameraPosition({ + required this.bearing, + required this.target, + required this.tilt, + required this.zoom, + }); + + double bearing; + + PlatformLatLng target; + + double tilt; + + double zoom; + + List _toList() { + return [ + bearing, + target, + tilt, + zoom, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraPosition decode(Object result) { + result as List; + return PlatformCameraPosition( + bearing: result[0]! as double, + target: result[1]! as PlatformLatLng, + tilt: result[2]! as double, + zoom: result[3]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraPosition || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon representation of a CameraUpdate. +class PlatformCameraUpdate { + PlatformCameraUpdate({ + required this.cameraUpdate, + }); + + /// This Object shall be any of the below classes prefixed with + /// PlatformCameraUpdate. Each such class represents a different type of + /// camera update, and each holds a different set of data, preventing the + /// use of a single unified class. Pigeon does not support inheritance, which + /// prevents a more strict type bound. + /// See https://github.com/flutter/flutter/issues/117819. + Object cameraUpdate; + + List _toList() { + return [ + cameraUpdate, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdate decode(Object result) { + result as List; + return PlatformCameraUpdate( + cameraUpdate: result[0]!, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdate || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of NewCameraPosition +class PlatformCameraUpdateNewCameraPosition { + PlatformCameraUpdateNewCameraPosition({ + required this.cameraPosition, + }); + + PlatformCameraPosition cameraPosition; + + List _toList() { + return [ + cameraPosition, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewCameraPosition decode(Object result) { + result as List; + return PlatformCameraUpdateNewCameraPosition( + cameraPosition: result[0]! as PlatformCameraPosition, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewCameraPosition || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of NewLatLng +class PlatformCameraUpdateNewLatLng { + PlatformCameraUpdateNewLatLng({ + required this.latLng, + }); + + PlatformLatLng latLng; + + List _toList() { + return [ + latLng, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewLatLng decode(Object result) { + result as List; + return PlatformCameraUpdateNewLatLng( + latLng: result[0]! as PlatformLatLng, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLng || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of NewLatLngBounds +class PlatformCameraUpdateNewLatLngBounds { + PlatformCameraUpdateNewLatLngBounds({ + required this.bounds, + required this.padding, + }); + + PlatformLatLngBounds bounds; + + double padding; + + List _toList() { + return [ + bounds, + padding, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewLatLngBounds decode(Object result) { + result as List; + return PlatformCameraUpdateNewLatLngBounds( + bounds: result[0]! as PlatformLatLngBounds, + padding: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLngBounds || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of NewLatLngZoom +class PlatformCameraUpdateNewLatLngZoom { + PlatformCameraUpdateNewLatLngZoom({ + required this.latLng, + required this.zoom, + }); + + PlatformLatLng latLng; + + double zoom; + + List _toList() { + return [ + latLng, + zoom, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewLatLngZoom decode(Object result) { + result as List; + return PlatformCameraUpdateNewLatLngZoom( + latLng: result[0]! as PlatformLatLng, + zoom: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLngZoom || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of ScrollBy +class PlatformCameraUpdateScrollBy { + PlatformCameraUpdateScrollBy({ + required this.dx, + required this.dy, + }); + + double dx; + + double dy; + + List _toList() { + return [ + dx, + dy, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateScrollBy decode(Object result) { + result as List; + return PlatformCameraUpdateScrollBy( + dx: result[0]! as double, + dy: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateScrollBy || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of ZoomBy +class PlatformCameraUpdateZoomBy { + PlatformCameraUpdateZoomBy({ + required this.amount, + this.focus, + }); + + double amount; + + PlatformDoublePair? focus; + + List _toList() { + return [ + amount, + focus, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateZoomBy decode(Object result) { + result as List; + return PlatformCameraUpdateZoomBy( + amount: result[0]! as double, + focus: result[1] as PlatformDoublePair?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoomBy || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of ZoomIn/ZoomOut +class PlatformCameraUpdateZoom { + PlatformCameraUpdateZoom({ + required this.out, + }); + + bool out; + + List _toList() { + return [ + out, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateZoom decode(Object result) { + result as List; + return PlatformCameraUpdateZoom( + out: result[0]! as bool, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoom || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of ZoomTo +class PlatformCameraUpdateZoomTo { + PlatformCameraUpdateZoomTo({ + required this.zoom, + }); + + double zoom; + + List _toList() { + return [ + zoom, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateZoomTo decode(Object result) { + result as List; + return PlatformCameraUpdateZoomTo( + zoom: result[0]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoomTo || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Circle class. +class PlatformCircle { + PlatformCircle({ + this.consumeTapEvents = false, + required this.fillColor, + required this.strokeColor, + this.visible = true, + this.strokeWidth = 10, + this.zIndex = 0.0, + required this.center, + this.radius = 0, + required this.circleId, + }); + + bool consumeTapEvents; + + PlatformColor fillColor; + + PlatformColor strokeColor; + + bool visible; + + int strokeWidth; + + double zIndex; + + PlatformLatLng center; + + double radius; + + String circleId; + + List _toList() { + return [ + consumeTapEvents, + fillColor, + strokeColor, + visible, + strokeWidth, + zIndex, + center, + radius, + circleId, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCircle decode(Object result) { + result as List; + return PlatformCircle( + consumeTapEvents: result[0]! as bool, + fillColor: result[1]! as PlatformColor, + strokeColor: result[2]! as PlatformColor, + visible: result[3]! as bool, + strokeWidth: result[4]! as int, + zIndex: result[5]! as double, + center: result[6]! as PlatformLatLng, + radius: result[7]! as double, + circleId: result[8]! as String, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCircle || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Heatmap class. +class PlatformHeatmap { + PlatformHeatmap({ + required this.heatmapId, + required this.data, + this.gradient, + required this.opacity, + required this.radius, + this.maxIntensity, + }); + + String heatmapId; + + List data; + + PlatformHeatmapGradient? gradient; + + double opacity; + + int radius; + + double? maxIntensity; + + List _toList() { + return [ + heatmapId, + data, + gradient, + opacity, + radius, + maxIntensity, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformHeatmap decode(Object result) { + result as List; + return PlatformHeatmap( + heatmapId: result[0]! as String, + data: (result[1] as List?)!.cast(), + gradient: result[2] as PlatformHeatmapGradient?, + opacity: result[3]! as double, + radius: result[4]! as int, + maxIntensity: result[5] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformHeatmap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the HeatmapGradient class. +/// +/// The Java Gradient structure is slightly different from HeatmapGradient, so +/// this matches the Android API so that conversion can be done on the Dart side +/// where the structures are easier to work with. +class PlatformHeatmapGradient { + PlatformHeatmapGradient({ + required this.colors, + required this.startPoints, + required this.colorMapSize, + }); + + List colors; + + List startPoints; + + int colorMapSize; + + List _toList() { + return [ + colors, + startPoints, + colorMapSize, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformHeatmapGradient decode(Object result) { + result as List; + return PlatformHeatmapGradient( + colors: (result[0] as List?)!.cast(), + startPoints: (result[1] as List?)!.cast(), + colorMapSize: result[2]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformHeatmapGradient || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the WeightedLatLng class. +class PlatformWeightedLatLng { + PlatformWeightedLatLng({ + required this.point, + required this.weight, + }); + + PlatformLatLng point; + + double weight; + + List _toList() { + return [ + point, + weight, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformWeightedLatLng decode(Object result) { + result as List; + return PlatformWeightedLatLng( + point: result[0]! as PlatformLatLng, + weight: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformWeightedLatLng || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the ClusterManager class. +class PlatformClusterManager { + PlatformClusterManager({ + required this.identifier, + }); + + String identifier; + + List _toList() { + return [ + identifier, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformClusterManager decode(Object result) { + result as List; + return PlatformClusterManager( + identifier: result[0]! as String, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformClusterManager || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pair of double values, such as for an offset or size. +class PlatformDoublePair { + PlatformDoublePair({ + required this.x, + required this.y, + }); + + double x; + + double y; + + List _toList() { + return [ + x, + y, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformDoublePair decode(Object result) { + result as List; + return PlatformDoublePair( + x: result[0]! as double, + y: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformDoublePair || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Color class. +/// +/// See https://developer.android.com/reference/android/graphics/Color.html. +class PlatformColor { + PlatformColor({ + required this.argbValue, + }); + + int argbValue; + + List _toList() { + return [ + argbValue, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformColor decode(Object result) { + result as List; + return PlatformColor( + argbValue: result[0]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformColor || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the InfoWindow class. +class PlatformInfoWindow { + PlatformInfoWindow({ + this.title, + this.snippet, + required this.anchor, + }); + + String? title; + + String? snippet; + + PlatformDoublePair anchor; + + List _toList() { + return [ + title, + snippet, + anchor, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformInfoWindow decode(Object result) { + result as List; + return PlatformInfoWindow( + title: result[0] as String?, + snippet: result[1] as String?, + anchor: result[2]! as PlatformDoublePair, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformInfoWindow || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Marker class. +class PlatformMarker { + PlatformMarker({ + this.alpha = 1.0, + required this.anchor, + this.consumeTapEvents = false, + this.draggable = false, + this.flat = false, + required this.icon, + required this.infoWindow, + required this.position, + this.rotation = 0.0, + this.visible = true, + this.zIndex = 0.0, + required this.markerId, + this.clusterManagerId, + }); + + double alpha; + + PlatformDoublePair anchor; + + bool consumeTapEvents; + + bool draggable; + + bool flat; + + PlatformBitmap icon; + + PlatformInfoWindow infoWindow; + + PlatformLatLng position; + + double rotation; + + bool visible; + + double zIndex; + + String markerId; + + String? clusterManagerId; + + List _toList() { + return [ + alpha, + anchor, + consumeTapEvents, + draggable, + flat, + icon, + infoWindow, + position, + rotation, + visible, + zIndex, + markerId, + clusterManagerId, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformMarker decode(Object result) { + result as List; + return PlatformMarker( + alpha: result[0]! as double, + anchor: result[1]! as PlatformDoublePair, + consumeTapEvents: result[2]! as bool, + draggable: result[3]! as bool, + flat: result[4]! as bool, + icon: result[5]! as PlatformBitmap, + infoWindow: result[6]! as PlatformInfoWindow, + position: result[7]! as PlatformLatLng, + rotation: result[8]! as double, + visible: result[9]! as bool, + zIndex: result[10]! as double, + markerId: result[11]! as String, + clusterManagerId: result[12] as String?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMarker || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Point of Interest class. +class PlatformPointOfInterest { + PlatformPointOfInterest({ + required this.position, + this.name, + required this.placeId, + }); + + PlatformLatLng position; + + String? name; + + String placeId; + + List _toList() { + return [ + position, + name, + placeId, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPointOfInterest decode(Object result) { + result as List; + return PlatformPointOfInterest( + position: result[0]! as PlatformLatLng, + name: result[1] as String?, + placeId: result[2]! as String, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPointOfInterest || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Polygon class. +class PlatformPolygon { + PlatformPolygon({ + required this.polygonId, + required this.consumesTapEvents, + required this.fillColor, + required this.geodesic, + required this.points, + required this.holes, + required this.visible, + required this.strokeColor, + required this.strokeWidth, + required this.zIndex, + }); + + String polygonId; + + bool consumesTapEvents; + + PlatformColor fillColor; + + bool geodesic; + + List points; + + List> holes; + + bool visible; + + PlatformColor strokeColor; + + int strokeWidth; + + int zIndex; + + List _toList() { + return [ + polygonId, + consumesTapEvents, + fillColor, + geodesic, + points, + holes, + visible, + strokeColor, + strokeWidth, + zIndex, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPolygon decode(Object result) { + result as List; + return PlatformPolygon( + polygonId: result[0]! as String, + consumesTapEvents: result[1]! as bool, + fillColor: result[2]! as PlatformColor, + geodesic: result[3]! as bool, + points: (result[4] as List?)!.cast(), + holes: (result[5] as List?)!.cast>(), + visible: result[6]! as bool, + strokeColor: result[7]! as PlatformColor, + strokeWidth: result[8]! as int, + zIndex: result[9]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPolygon || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Polyline class. +class PlatformPolyline { + PlatformPolyline({ + required this.polylineId, + required this.consumesTapEvents, + required this.color, + required this.geodesic, + required this.jointType, + required this.patterns, + required this.points, + required this.startCap, + required this.endCap, + required this.visible, + required this.width, + required this.zIndex, + }); + + String polylineId; + + bool consumesTapEvents; + + PlatformColor color; + + bool geodesic; + + /// The joint type. + PlatformJointType jointType; + + /// The pattern data, as a list of pattern items. + List patterns; + + List points; + + /// The cap at the start and end vertex of a polyline. + /// See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. + PlatformCap startCap; + + PlatformCap endCap; + + bool visible; + + int width; + + int zIndex; + + List _toList() { + return [ + polylineId, + consumesTapEvents, + color, + geodesic, + jointType, + patterns, + points, + startCap, + endCap, + visible, + width, + zIndex, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPolyline decode(Object result) { + result as List; + return PlatformPolyline( + polylineId: result[0]! as String, + consumesTapEvents: result[1]! as bool, + color: result[2]! as PlatformColor, + geodesic: result[3]! as bool, + jointType: result[4]! as PlatformJointType, + patterns: (result[5] as List?)!.cast(), + points: (result[6] as List?)!.cast(), + startCap: result[7]! as PlatformCap, + endCap: result[8]! as PlatformCap, + visible: result[9]! as bool, + width: result[10]! as int, + zIndex: result[11]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPolyline || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of Cap from the platform interface. +/// https://github.com/flutter/packages/blob/main/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/cap.dart +class PlatformCap { + PlatformCap({ + required this.type, + this.bitmapDescriptor, + this.refWidth, + }); + + PlatformCapType type; + + PlatformBitmap? bitmapDescriptor; + + double? refWidth; + + List _toList() { + return [ + type, + bitmapDescriptor, + refWidth, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCap decode(Object result) { + result as List; + return PlatformCap( + type: result[0]! as PlatformCapType, + bitmapDescriptor: result[1] as PlatformBitmap?, + refWidth: result[2] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the PatternItem class. +class PlatformPatternItem { + PlatformPatternItem({ + required this.type, + this.length, + }); + + PlatformPatternItemType type; + + double? length; + + List _toList() { + return [ + type, + length, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPatternItem decode(Object result) { + result as List; + return PlatformPatternItem( + type: result[0]! as PlatformPatternItemType, + length: result[1] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPatternItem || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Tile class. +class PlatformTile { + PlatformTile({ + required this.width, + required this.height, + this.data, + }); + + int width; + + int height; + + Uint8List? data; + + List _toList() { + return [ + width, + height, + data, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformTile decode(Object result) { + result as List; + return PlatformTile( + width: result[0]! as int, + height: result[1]! as int, + data: result[2] as Uint8List?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTile || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the TileOverlay class. +class PlatformTileOverlay { + PlatformTileOverlay({ + required this.tileOverlayId, + required this.fadeIn, + required this.transparency, + required this.zIndex, + required this.visible, + required this.tileSize, + }); + + String tileOverlayId; + + bool fadeIn; + + double transparency; + + int zIndex; + + bool visible; + + int tileSize; + + List _toList() { + return [ + tileOverlayId, + fadeIn, + transparency, + zIndex, + visible, + tileSize, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformTileOverlay decode(Object result) { + result as List; + return PlatformTileOverlay( + 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, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTileOverlay || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of Flutter's EdgeInsets. +class PlatformEdgeInsets { + PlatformEdgeInsets({ + required this.top, + required this.bottom, + required this.left, + required this.right, + }); + + double top; + + double bottom; + + double left; + + double right; + + List _toList() { + return [ + top, + bottom, + left, + right, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformEdgeInsets decode(Object result) { + result as List; + return PlatformEdgeInsets( + top: result[0]! as double, + bottom: result[1]! as double, + left: result[2]! as double, + right: result[3]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformEdgeInsets || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of LatLng. +class PlatformLatLng { + PlatformLatLng({ + required this.latitude, + required this.longitude, + }); + + double latitude; + + double longitude; + + List _toList() { + return [ + latitude, + longitude, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformLatLng decode(Object result) { + result as List; + return PlatformLatLng( + latitude: result[0]! as double, + longitude: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformLatLng || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of LatLngBounds. +class PlatformLatLngBounds { + PlatformLatLngBounds({ + required this.northeast, + required this.southwest, + }); + + PlatformLatLng northeast; + + PlatformLatLng southwest; + + List _toList() { + return [ + northeast, + southwest, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformLatLngBounds decode(Object result) { + result as List; + return PlatformLatLngBounds( + northeast: result[0]! as PlatformLatLng, + southwest: result[1]! as PlatformLatLng, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformLatLngBounds || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of Cluster. +class PlatformCluster { + PlatformCluster({ + required this.clusterManagerId, + required this.position, + required this.bounds, + required this.markerIds, + }); + + String clusterManagerId; + + PlatformLatLng position; + + PlatformLatLngBounds bounds; + + List markerIds; + + List _toList() { + return [ + clusterManagerId, + position, + bounds, + markerIds, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCluster decode(Object result) { + result as List; + return PlatformCluster( + clusterManagerId: result[0]! as String, + position: result[1]! as PlatformLatLng, + bounds: result[2]! as PlatformLatLngBounds, + markerIds: (result[3] as List?)!.cast(), + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCluster || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the GroundOverlay class. +class PlatformGroundOverlay { + PlatformGroundOverlay({ + required this.groundOverlayId, + required this.image, + this.position, + this.bounds, + this.width, + this.height, + this.anchor, + required this.transparency, + required this.bearing, + required this.zIndex, + required this.visible, + required this.clickable, + }); + + String groundOverlayId; + + PlatformBitmap image; + + PlatformLatLng? position; + + PlatformLatLngBounds? bounds; + + double? width; + + double? height; + + PlatformDoublePair? anchor; + + double transparency; + + double bearing; + + int zIndex; + + bool visible; + + bool clickable; + + List _toList() { + return [ + groundOverlayId, + image, + position, + bounds, + width, + height, + anchor, + transparency, + bearing, + zIndex, + visible, + clickable, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformGroundOverlay decode(Object result) { + result as List; + return PlatformGroundOverlay( + groundOverlayId: result[0]! as String, + image: result[1]! as PlatformBitmap, + position: result[2] as PlatformLatLng?, + bounds: result[3] as PlatformLatLngBounds?, + width: result[4] as double?, + height: result[5] as double?, + anchor: result[6] as PlatformDoublePair?, + transparency: result[7]! as double, + bearing: result[8]! as double, + zIndex: result[9]! as int, + visible: result[10]! as bool, + clickable: result[11]! as bool, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformGroundOverlay || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_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]). +class PlatformCameraTargetBounds { + PlatformCameraTargetBounds({ + this.bounds, + }); + + PlatformLatLngBounds? bounds; + + List _toList() { + return [ + bounds, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraTargetBounds decode(Object result) { + result as List; + return PlatformCameraTargetBounds( + bounds: result[0] as PlatformLatLngBounds?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraTargetBounds || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Information passed to the platform view creation. +class PlatformMapViewCreationParams { + PlatformMapViewCreationParams({ + required this.initialCameraPosition, + required this.mapConfiguration, + required this.initialCircles, + required this.initialMarkers, + required this.initialPolygons, + required this.initialPolylines, + required this.initialHeatmaps, + required this.initialTileOverlays, + required this.initialClusterManagers, + required this.initialGroundOverlays, + }); + + PlatformCameraPosition initialCameraPosition; + + PlatformMapConfiguration mapConfiguration; + + List initialCircles; + + List initialMarkers; + + List initialPolygons; + + List initialPolylines; + + List initialHeatmaps; + + List initialTileOverlays; + + List initialClusterManagers; + + List initialGroundOverlays; + + List _toList() { + return [ + initialCameraPosition, + mapConfiguration, + initialCircles, + initialMarkers, + initialPolygons, + initialPolylines, + initialHeatmaps, + initialTileOverlays, + initialClusterManagers, + initialGroundOverlays, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformMapViewCreationParams decode(Object result) { + result as List; + return PlatformMapViewCreationParams( + initialCameraPosition: result[0]! as PlatformCameraPosition, + mapConfiguration: result[1]! as PlatformMapConfiguration, + initialCircles: (result[2] as List?)!.cast(), + initialMarkers: (result[3] as List?)!.cast(), + initialPolygons: (result[4] as List?)!.cast(), + initialPolylines: (result[5] as List?)!.cast(), + initialHeatmaps: (result[6] as List?)!.cast(), + initialTileOverlays: (result[7] as List?)!.cast(), + initialClusterManagers: (result[8] as List?)!.cast(), + initialGroundOverlays: (result[9] as List?)!.cast(), + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMapViewCreationParams || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of MapConfiguration. +class PlatformMapConfiguration { + PlatformMapConfiguration({ + this.compassEnabled, + this.cameraTargetBounds, + this.mapType, + this.minMaxZoomPreference, + this.mapToolbarEnabled, + this.rotateGesturesEnabled, + this.scrollGesturesEnabled, + this.tiltGesturesEnabled, + this.trackCameraPosition, + this.zoomControlsEnabled, + this.zoomGesturesEnabled, + this.myLocationEnabled, + this.myLocationButtonEnabled, + this.padding, + this.indoorViewEnabled, + this.trafficEnabled, + this.buildingsEnabled, + this.liteModeEnabled, + this.mapId, + this.style, + }); + + bool? compassEnabled; + + PlatformCameraTargetBounds? cameraTargetBounds; + + PlatformMapType? mapType; + + PlatformZoomRange? minMaxZoomPreference; + + bool? mapToolbarEnabled; + + bool? rotateGesturesEnabled; + + bool? scrollGesturesEnabled; + + bool? tiltGesturesEnabled; + + bool? trackCameraPosition; + + bool? zoomControlsEnabled; + + bool? zoomGesturesEnabled; + + bool? myLocationEnabled; + + bool? myLocationButtonEnabled; + + PlatformEdgeInsets? padding; + + bool? indoorViewEnabled; + + bool? trafficEnabled; + + bool? buildingsEnabled; + + bool? liteModeEnabled; + + String? mapId; + + String? style; + + List _toList() { + return [ + compassEnabled, + cameraTargetBounds, + mapType, + minMaxZoomPreference, + mapToolbarEnabled, + rotateGesturesEnabled, + scrollGesturesEnabled, + tiltGesturesEnabled, + trackCameraPosition, + zoomControlsEnabled, + zoomGesturesEnabled, + myLocationEnabled, + myLocationButtonEnabled, + padding, + indoorViewEnabled, + trafficEnabled, + buildingsEnabled, + liteModeEnabled, + mapId, + style, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformMapConfiguration decode(Object result) { + result as List; + return PlatformMapConfiguration( + compassEnabled: result[0] as bool?, + cameraTargetBounds: result[1] as PlatformCameraTargetBounds?, + mapType: result[2] as PlatformMapType?, + minMaxZoomPreference: result[3] as PlatformZoomRange?, + mapToolbarEnabled: result[4] as bool?, + rotateGesturesEnabled: result[5] as bool?, + scrollGesturesEnabled: result[6] as bool?, + tiltGesturesEnabled: result[7] as bool?, + trackCameraPosition: result[8] as bool?, + zoomControlsEnabled: result[9] as bool?, + zoomGesturesEnabled: result[10] as bool?, + myLocationEnabled: result[11] as bool?, + myLocationButtonEnabled: result[12] as bool?, + padding: result[13] as PlatformEdgeInsets?, + indoorViewEnabled: result[14] as bool?, + trafficEnabled: result[15] as bool?, + buildingsEnabled: result[16] as bool?, + liteModeEnabled: result[17] as bool?, + mapId: result[18] as String?, + style: result[19] as String?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMapConfiguration || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon representation of an x,y coordinate. +class PlatformPoint { + PlatformPoint({ + required this.x, + required this.y, + }); + + int x; + + int y; + + List _toList() { + return [ + x, + y, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPoint decode(Object result) { + result as List; + return PlatformPoint( + x: result[0]! as int, + y: result[1]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPoint || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of native TileOverlay properties. +class PlatformTileLayer { + PlatformTileLayer({ + required this.visible, + required this.fadeIn, + required this.transparency, + required this.zIndex, + }); + + bool visible; + + bool fadeIn; + + double transparency; + + double zIndex; + + List _toList() { + return [ + visible, + fadeIn, + transparency, + zIndex, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformTileLayer decode(Object result) { + result as List; + return PlatformTileLayer( + visible: result[0]! as bool, + fadeIn: result[1]! as bool, + transparency: result[2]! as double, + zIndex: result[3]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTileLayer || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Possible outcomes of launching a URL. +class PlatformZoomRange { + PlatformZoomRange({ + this.min, + this.max, + }); + + double? min; + + double? max; + + List _toList() { + return [ + min, + max, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformZoomRange decode(Object result) { + result as List; + return PlatformZoomRange( + min: result[0] as double?, + max: result[1] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformZoomRange || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint +/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which +/// may hold the pigeon equivalent type of any of them. +class PlatformBitmap { + PlatformBitmap({ + required this.bitmap, + }); + + /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], + /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], + /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. + /// As Pigeon does not currently support data class inheritance, this + /// approach allows for the different bitmap implementations to be valid + /// argument and return types of the API methods. See + /// https://github.com/flutter/flutter/issues/117819. + Object bitmap; + + List _toList() { + return [ + bitmap, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmap decode(Object result) { + result as List; + return PlatformBitmap( + bitmap: result[0]!, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [DefaultMarker]. See +/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#defaultMarker(float) +class PlatformBitmapDefaultMarker { + PlatformBitmapDefaultMarker({ + this.hue, + }); + + double? hue; + + List _toList() { + return [ + hue, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapDefaultMarker decode(Object result) { + result as List; + return PlatformBitmapDefaultMarker( + hue: result[0] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapDefaultMarker || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [BytesBitmap]. See +/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#fromBitmap(android.graphics.Bitmap) +class PlatformBitmapBytes { + PlatformBitmapBytes({ + required this.byteData, + this.size, + }); + + Uint8List byteData; + + PlatformDoublePair? size; + + List _toList() { + return [ + byteData, + size, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapBytes decode(Object result) { + result as List; + return PlatformBitmapBytes( + byteData: result[0]! as Uint8List, + size: result[1] as PlatformDoublePair?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapBytes || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [AssetBitmap]. See +/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname +class PlatformBitmapAsset { + PlatformBitmapAsset({ + required this.name, + this.pkg, + }); + + String name; + + String? pkg; + + List _toList() { + return [ + name, + pkg, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapAsset decode(Object result) { + result as List; + return PlatformBitmapAsset( + name: result[0]! as String, + pkg: result[1] as String?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAsset || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [AssetImageBitmap]. See +/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname +class PlatformBitmapAssetImage { + PlatformBitmapAssetImage({ + required this.name, + required this.scale, + this.size, + }); + + String name; + + double scale; + + PlatformDoublePair? size; + + List _toList() { + return [ + name, + scale, + size, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapAssetImage decode(Object result) { + result as List; + return PlatformBitmapAssetImage( + name: result[0]! as String, + scale: result[1]! as double, + size: result[2] as PlatformDoublePair?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAssetImage || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [AssetMapBitmap]. See +/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname +class PlatformBitmapAssetMap { + PlatformBitmapAssetMap({ + required this.assetName, + required this.bitmapScaling, + required this.imagePixelRatio, + this.width, + this.height, + }); + + String assetName; + + PlatformMapBitmapScaling bitmapScaling; + + double imagePixelRatio; + + double? width; + + double? height; + + List _toList() { + return [ + assetName, + bitmapScaling, + imagePixelRatio, + width, + height, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapAssetMap decode(Object result) { + result as List; + return PlatformBitmapAssetMap( + assetName: result[0]! as String, + bitmapScaling: result[1]! as PlatformMapBitmapScaling, + imagePixelRatio: result[2]! as double, + width: result[3] as double?, + height: result[4] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAssetMap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [BytesMapBitmap]. See +/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-frombitmap-bitmap-image +class PlatformBitmapBytesMap { + PlatformBitmapBytesMap({ + required this.byteData, + required this.bitmapScaling, + required this.imagePixelRatio, + this.width, + this.height, + }); + + Uint8List byteData; + + PlatformMapBitmapScaling bitmapScaling; + + double imagePixelRatio; + + double? width; + + double? height; + + List _toList() { + return [ + byteData, + bitmapScaling, + imagePixelRatio, + width, + height, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapBytesMap decode(Object result) { + result as List; + return PlatformBitmapBytesMap( + byteData: result[0]! as Uint8List, + bitmapScaling: result[1]! as PlatformMapBitmapScaling, + imagePixelRatio: result[2]! as double, + width: result[3] as double?, + height: result[4] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapBytesMap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + + +class _PigeonCodec extends StandardMessageCodec { + const _PigeonCodec(); + @override + void writeValue(WriteBuffer buffer, Object? value) { + if (value is int) { + buffer.putUint8(4); + buffer.putInt64(value); + } else if (value is PlatformMapType) { + buffer.putUint8(129); + writeValue(buffer, value.index); + } else if (value is PlatformRendererType) { + buffer.putUint8(130); + writeValue(buffer, value.index); + } else if (value is PlatformJointType) { + buffer.putUint8(131); + writeValue(buffer, value.index); + } else if (value is PlatformCapType) { + buffer.putUint8(132); + writeValue(buffer, value.index); + } else if (value is PlatformPatternItemType) { + buffer.putUint8(133); + writeValue(buffer, value.index); + } else if (value is PlatformMapBitmapScaling) { + buffer.putUint8(134); + writeValue(buffer, value.index); + } else if (value is PlatformCameraPosition) { + buffer.putUint8(135); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdate) { + buffer.putUint8(136); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateNewCameraPosition) { + buffer.putUint8(137); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateNewLatLng) { + buffer.putUint8(138); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateNewLatLngBounds) { + buffer.putUint8(139); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateNewLatLngZoom) { + buffer.putUint8(140); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateScrollBy) { + buffer.putUint8(141); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateZoomBy) { + buffer.putUint8(142); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateZoom) { + buffer.putUint8(143); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateZoomTo) { + buffer.putUint8(144); + writeValue(buffer, value.encode()); + } else if (value is PlatformCircle) { + buffer.putUint8(145); + writeValue(buffer, value.encode()); + } else if (value is PlatformHeatmap) { + buffer.putUint8(146); + writeValue(buffer, value.encode()); + } else if (value is PlatformHeatmapGradient) { + buffer.putUint8(147); + writeValue(buffer, value.encode()); + } else if (value is PlatformWeightedLatLng) { + buffer.putUint8(148); + writeValue(buffer, value.encode()); + } else if (value is PlatformClusterManager) { + buffer.putUint8(149); + writeValue(buffer, value.encode()); + } else if (value is PlatformDoublePair) { + buffer.putUint8(150); + writeValue(buffer, value.encode()); + } else if (value is PlatformColor) { + buffer.putUint8(151); + writeValue(buffer, value.encode()); + } else if (value is PlatformInfoWindow) { + buffer.putUint8(152); + writeValue(buffer, value.encode()); + } else if (value is PlatformMarker) { + buffer.putUint8(153); + writeValue(buffer, value.encode()); + } else if (value is PlatformPointOfInterest) { + buffer.putUint8(154); + writeValue(buffer, value.encode()); + } else if (value is PlatformPolygon) { + buffer.putUint8(155); + writeValue(buffer, value.encode()); + } else if (value is PlatformPolyline) { + buffer.putUint8(156); + writeValue(buffer, value.encode()); + } else if (value is PlatformCap) { + buffer.putUint8(157); + writeValue(buffer, value.encode()); + } else if (value is PlatformPatternItem) { + buffer.putUint8(158); + writeValue(buffer, value.encode()); + } else if (value is PlatformTile) { + buffer.putUint8(159); + writeValue(buffer, value.encode()); + } else if (value is PlatformTileOverlay) { + buffer.putUint8(160); + writeValue(buffer, value.encode()); + } else if (value is PlatformEdgeInsets) { + buffer.putUint8(161); + writeValue(buffer, value.encode()); + } else if (value is PlatformLatLng) { + buffer.putUint8(162); + writeValue(buffer, value.encode()); + } else if (value is PlatformLatLngBounds) { + buffer.putUint8(163); + writeValue(buffer, value.encode()); + } else if (value is PlatformCluster) { + buffer.putUint8(164); + writeValue(buffer, value.encode()); + } else if (value is PlatformGroundOverlay) { + buffer.putUint8(165); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraTargetBounds) { + buffer.putUint8(166); + writeValue(buffer, value.encode()); + } else if (value is PlatformMapViewCreationParams) { + buffer.putUint8(167); + writeValue(buffer, value.encode()); + } else if (value is PlatformMapConfiguration) { + buffer.putUint8(168); + writeValue(buffer, value.encode()); + } else if (value is PlatformPoint) { + buffer.putUint8(169); + writeValue(buffer, value.encode()); + } else if (value is PlatformTileLayer) { + buffer.putUint8(170); + writeValue(buffer, value.encode()); + } else if (value is PlatformZoomRange) { + buffer.putUint8(171); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmap) { + buffer.putUint8(172); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapDefaultMarker) { + buffer.putUint8(173); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapBytes) { + buffer.putUint8(174); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapAsset) { + buffer.putUint8(175); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapAssetImage) { + buffer.putUint8(176); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapAssetMap) { + buffer.putUint8(177); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapBytesMap) { + buffer.putUint8(178); + writeValue(buffer, value.encode()); + } else { + super.writeValue(buffer, value); + } + } + + @override + Object? readValueOfType(int type, ReadBuffer buffer) { + switch (type) { + case 129: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformMapType.values[value]; + case 130: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformRendererType.values[value]; + case 131: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformJointType.values[value]; + case 132: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformCapType.values[value]; + case 133: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformPatternItemType.values[value]; + case 134: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformMapBitmapScaling.values[value]; + case 135: + return PlatformCameraPosition.decode(readValue(buffer)!); + case 136: + return PlatformCameraUpdate.decode(readValue(buffer)!); + case 137: + return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!); + case 138: + return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!); + case 139: + return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); + case 140: + return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); + case 141: + return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); + case 142: + return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); + case 143: + return PlatformCameraUpdateZoom.decode(readValue(buffer)!); + case 144: + return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); + case 145: + return PlatformCircle.decode(readValue(buffer)!); + case 146: + return PlatformHeatmap.decode(readValue(buffer)!); + case 147: + return PlatformHeatmapGradient.decode(readValue(buffer)!); + case 148: + return PlatformWeightedLatLng.decode(readValue(buffer)!); + case 149: + return PlatformClusterManager.decode(readValue(buffer)!); + case 150: + return PlatformDoublePair.decode(readValue(buffer)!); + case 151: + return PlatformColor.decode(readValue(buffer)!); + case 152: + return PlatformInfoWindow.decode(readValue(buffer)!); + case 153: + return PlatformMarker.decode(readValue(buffer)!); + case 154: + return PlatformPointOfInterest.decode(readValue(buffer)!); + case 155: + return PlatformPolygon.decode(readValue(buffer)!); + case 156: + return PlatformPolyline.decode(readValue(buffer)!); + case 157: + return PlatformCap.decode(readValue(buffer)!); + case 158: + return PlatformPatternItem.decode(readValue(buffer)!); + case 159: + return PlatformTile.decode(readValue(buffer)!); + case 160: + return PlatformTileOverlay.decode(readValue(buffer)!); + case 161: + return PlatformEdgeInsets.decode(readValue(buffer)!); + case 162: + return PlatformLatLng.decode(readValue(buffer)!); + case 163: + return PlatformLatLngBounds.decode(readValue(buffer)!); + case 164: + return PlatformCluster.decode(readValue(buffer)!); + case 165: + return PlatformGroundOverlay.decode(readValue(buffer)!); + case 166: + return PlatformCameraTargetBounds.decode(readValue(buffer)!); + case 167: + return PlatformMapViewCreationParams.decode(readValue(buffer)!); + case 168: + return PlatformMapConfiguration.decode(readValue(buffer)!); + case 169: + return PlatformPoint.decode(readValue(buffer)!); + case 170: + return PlatformTileLayer.decode(readValue(buffer)!); + case 171: + return PlatformZoomRange.decode(readValue(buffer)!); + case 172: + return PlatformBitmap.decode(readValue(buffer)!); + case 173: + return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); + case 174: + return PlatformBitmapBytes.decode(readValue(buffer)!); + case 175: + return PlatformBitmapAsset.decode(readValue(buffer)!); + case 176: + return PlatformBitmapAssetImage.decode(readValue(buffer)!); + case 177: + return PlatformBitmapAssetMap.decode(readValue(buffer)!); + case 178: + return PlatformBitmapBytesMap.decode(readValue(buffer)!); + default: + return super.readValueOfType(type, buffer); + } + } +} + +/// Interface for non-test interactions with the native SDK. +/// +/// For test-only state queries, see [MapsInspectorApi]. +class MapsApi { + /// Constructor for [MapsApi]. 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. + MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + /// Returns once the map instance is available. + Future waitForMap() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the map's configuration options. + /// + /// Only non-null configuration values will result in updates; options with + /// null values will remain unchanged. + Future updateMapConfiguration(PlatformMapConfiguration configuration) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of circles on the map. + Future updateCircles(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of heatmaps on the map. + Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of custer managers for clusters on the map. + Future updateClusterManagers(List toAdd, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of markers on the map. + Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of polygonss on the map. + Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of polylines on the map. + Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of tile overlays on the map. + Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of ground overlays on the map. + Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Gets the screen coordinate for the given map location. + Future getScreenCoordinate(PlatformLatLng latLng) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformPoint?)!; + } + } + + /// Gets the map location for the given screen coordinate. + Future getLatLng(PlatformPoint screenCoordinate) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformLatLng?)!; + } + } + + /// Gets the map region currently displayed on the map. + Future getVisibleRegion() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformLatLngBounds?)!; + } + } + + /// Moves the camera according to [cameraUpdate] immediately, with no + /// animation. + Future moveCamera(PlatformCameraUpdate cameraUpdate) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Moves the camera according to [cameraUpdate], animating the update using a + /// duration in milliseconds if provided. + Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Gets the current map zoom level. + Future getZoomLevel() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as double?)!; + } + } + + /// Show the info window for the marker with the given ID. + Future showInfoWindow(String markerId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Hide the info window for the marker with the given ID. + Future hideInfoWindow(String markerId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Returns true if the marker with the given ID is currently displaying its + /// info window. + Future isInfoWindowShown(String markerId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + /// 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. + Future setStyle(String style) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + /// Returns true if 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. + Future didLastStyleSucceed() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + /// Clears the cache of tiles previously requseted from the tile provider. + Future clearTileCache(String tileOverlayId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Takes a snapshot of the map and returns its image data. + Future takeSnapshot() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as Uint8List?)!; + } + } +} + +abstract class MapsCallbackApi { + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + /// Called when the map camera starts moving. + void onCameraMoveStarted(); + + /// Called when the map camera moves. + void onCameraMove(PlatformCameraPosition cameraPosition); + + /// Called when the map camera stops moving. + void onCameraIdle(); + + /// Called when the map, not a specifc map object, is tapped. + void onTap(PlatformLatLng position); + + /// Called when the map, not a specifc map object, is long pressed. + void onLongPress(PlatformLatLng position); + + /// Called when a marker is tapped. + void onMarkerTap(String markerId); + + /// Called when a marker drag starts. + void onMarkerDragStart(String markerId, PlatformLatLng position); + + /// Called when a marker drag updates. + void onMarkerDrag(String markerId, PlatformLatLng position); + + /// Called when a marker drag ends. + void onMarkerDragEnd(String markerId, PlatformLatLng position); + + /// Called when a marker's info window is tapped. + void onInfoWindowTap(String markerId); + + /// Called when a circle is tapped. + void onCircleTap(String circleId); + + /// Called when a marker cluster is tapped. + void onClusterTap(PlatformCluster cluster); + + /// Called when a POI is tapped. + void onPoiTap(PlatformPointOfInterest poi); + + /// Called when a polygon is tapped. + void onPolygonTap(String polygonId); + + /// Called when a polyline is tapped. + void onPolylineTap(String polylineId); + + /// Called when a ground overlay is tapped. + void onGroundOverlayTap(String groundOverlayId); + + /// Called to get data for a map tile. + Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); + + static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { + messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + try { + api.onCameraMoveStarted(); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null.'); + final List args = (message as List?)!; + 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 { + api.onCameraMove(arg_cameraPosition!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + try { + api.onCameraIdle(); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null.'); + final List args = (message as List?)!; + final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); + try { + api.onTap(arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null.'); + final List args = (message as List?)!; + final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); + try { + api.onLongPress(arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); + try { + api.onMarkerTap(arg_markerId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); + try { + api.onMarkerDragStart(arg_markerId!, arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); + try { + api.onMarkerDrag(arg_markerId!, arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); + try { + api.onMarkerDragEnd(arg_markerId!, arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); + try { + api.onInfoWindowTap(arg_markerId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null.'); + final List args = (message as List?)!; + final String? arg_circleId = (args[0] as String?); + assert(arg_circleId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null, expected non-null String.'); + try { + api.onCircleTap(arg_circleId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null.'); + final List args = (message as List?)!; + final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); + assert(arg_cluster != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); + try { + api.onClusterTap(arg_cluster!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.'); + final List args = (message as List?)!; + final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); + assert(arg_poi != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); + try { + api.onPoiTap(arg_poi!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null.'); + final List args = (message as List?)!; + final String? arg_polygonId = (args[0] as String?); + assert(arg_polygonId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); + try { + api.onPolygonTap(arg_polygonId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null.'); + final List args = (message as List?)!; + final String? arg_polylineId = (args[0] as String?); + assert(arg_polylineId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); + try { + api.onPolylineTap(arg_polylineId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.'); + final List args = (message as List?)!; + final String? arg_groundOverlayId = (args[0] as String?); + assert(arg_groundOverlayId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); + try { + api.onGroundOverlayTap(arg_groundOverlayId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null.'); + final List args = (message as List?)!; + final String? arg_tileOverlayId = (args[0] as String?); + assert(arg_tileOverlayId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); + final PlatformPoint? arg_location = (args[1] as PlatformPoint?); + assert(arg_location != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); + final int? arg_zoom = (args[2] as int?); + 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!); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + } +} + +/// Interface for global SDK initialization. +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 = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + /// Initializes the Google Maps SDK with the given renderer preference. + /// + /// 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. + Future initializeWithPreferredRenderer(PlatformRendererType? type) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformRendererType?)!; + } + } + + /// Attempts to trigger any thread-blocking work + /// the Google Maps SDK normally does when a map is shown for the first time. + Future warmup() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } +} + +/// 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. +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 = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + Future createView(PlatformMapViewCreationParams? type) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } +} + +/// Inspector API only intended for use in integration tests. +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 = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + Future areBuildingsEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areRotateGesturesEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areZoomControlsEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areScrollGesturesEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areTiltGesturesEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areZoomGesturesEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future isCompassEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future isLiteModeEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as bool?); + } + } + + Future isMapToolbarEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future isMyLocationButtonEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future isTrafficEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future getTileOverlayInfo(String tileOverlayId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as PlatformTileLayer?); + } + } + + Future getGroundOverlayInfo(String groundOverlayId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as PlatformGroundOverlay?); + } + } + + Future getZoomRange() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformZoomRange?)!; + } + } + + Future> getClusters(String clusterManagerId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as List?)!.cast(); + } + } + + Future getCameraPosition() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformCameraPosition?)!; + } + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.rej b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.rej new file mode 100644 index 000000000000..e8ad1b59be66 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.rej @@ -0,0 +1,1574 @@ +--- packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart ++++ packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart +@@ -31,64 +35,43 @@ List wrapResponse({Object? result, PlatformException? error, bool empty + } + return [error.code, error.message, error.details]; + } ++ + bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && +- a.indexed +- .every(((int, dynamic) item) => _deepEquals(item., b[item.])); ++ a.indexed.every( ++ ((int, dynamic) item) => _deepEquals(item., b[item.]), ++ ); + } + if (a is Map && b is Map) { +- return a.length == b.length && a.entries.every((MapEntry entry) => +- (b as Map).containsKey(entry.key) && +- _deepEquals(entry.value, b[entry.key])); ++ return a.length == b.length && ++ a.entries.every( ++ (MapEntry entry) => ++ (b as Map).containsKey(entry.key) && ++ _deepEquals(entry.value, b[entry.key]), ++ ); + } + return a == b; + } + +- + /// Pigeon equivalent of MapType +-enum PlatformMapType { +- none, +- normal, +- satellite, +- terrain, +- hybrid, +-} ++enum PlatformMapType { none, normal, satellite, terrain, hybrid } + +-enum PlatformRendererType { +- legacy, +- latest, +-} ++enum PlatformRendererType { legacy, latest } + + /// Join types for polyline joints. +-enum PlatformJointType { +- mitered, +- bevel, +- round, +-} ++enum PlatformJointType { mitered, bevel, round } + + /// Enumeration of possible types of PlatformCap, corresponding to the + /// subclasses of Cap in the Google Maps Android SDK. + /// See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. +-enum PlatformCapType { +- buttCap, +- roundCap, +- squareCap, +- customCap, +-} ++enum PlatformCapType { buttCap, roundCap, squareCap, customCap } + + /// Enumeration of possible types for PatternItem. +-enum PlatformPatternItemType { +- dot, +- dash, +- gap, +-} ++enum PlatformPatternItemType { dot, dash, gap } + + /// Pigeon equivalent of [MapBitmapScaling]. +-enum PlatformMapBitmapScaling { +- auto, +- none, +-} ++enum PlatformMapBitmapScaling { auto, none } + + /// Pigeon representatation of a CameraPosition. + class PlatformCameraPosition { +@@ -2732,8 +2518,10 @@ class MapsApi { + /// available for dependency injection. If it is left null, the default + /// BinaryMessenger will be used which routes to the host platform. + MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) +- : pigeonVar_binaryMessenger = binaryMessenger, +- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ : pigeonVar_binaryMessenger = binaryMessenger, ++ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); +@@ -2742,7 +2530,8 @@ class MapsApi { + + /// Returns once the map instance is available. + Future waitForMap() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -2767,14 +2556,19 @@ class MapsApi { + /// + /// Only non-null configuration values will result in updates; options with + /// null values will remain unchanged. +- Future updateMapConfiguration(PlatformMapConfiguration configuration) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration'; ++ Future updateMapConfiguration( ++ PlatformMapConfiguration configuration, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [configuration], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2790,14 +2584,21 @@ class MapsApi { + } + + /// Updates the set of circles on the map. +- Future updateCircles(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles'; ++ Future updateCircles( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2813,14 +2614,21 @@ class MapsApi { + } + + /// Updates the set of heatmaps on the map. +- Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps'; ++ Future updateHeatmaps( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2836,14 +2644,20 @@ class MapsApi { + } + + /// Updates the set of custer managers for clusters on the map. +- Future updateClusterManagers(List toAdd, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers'; ++ Future updateClusterManagers( ++ List toAdd, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2859,14 +2673,21 @@ class MapsApi { + } + + /// Updates the set of markers on the map. +- Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers'; ++ Future updateMarkers( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2882,14 +2703,21 @@ class MapsApi { + } + + /// Updates the set of polygonss on the map. +- Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons'; ++ Future updatePolygons( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2905,14 +2733,21 @@ class MapsApi { + } + + /// Updates the set of polylines on the map. +- Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines'; ++ Future updatePolylines( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2928,14 +2763,21 @@ class MapsApi { + } + + /// Updates the set of tile overlays on the map. +- Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays'; ++ Future updateTileOverlays( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2951,14 +2793,21 @@ class MapsApi { + } + + /// Updates the set of ground overlays on the map. +- Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays'; ++ Future updateGroundOverlays( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2975,13 +2824,16 @@ class MapsApi { + + /// Gets the screen coordinate for the given map location. + Future getScreenCoordinate(PlatformLatLng latLng) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [latLng], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3003,13 +2855,16 @@ class MapsApi { + + /// Gets the map location for the given screen coordinate. + Future getLatLng(PlatformPoint screenCoordinate) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [screenCoordinate], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3031,7 +2886,8 @@ class MapsApi { + + /// Gets the map region currently displayed on the map. + Future getVisibleRegion() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3060,13 +2916,16 @@ class MapsApi { + /// Moves the camera according to [cameraUpdate] immediately, with no + /// animation. + Future moveCamera(PlatformCameraUpdate cameraUpdate) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [cameraUpdate], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3083,14 +2942,20 @@ class MapsApi { + + /// Moves the camera according to [cameraUpdate], animating the update using a + /// duration in milliseconds if provided. +- Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera'; ++ Future animateCamera( ++ PlatformCameraUpdate cameraUpdate, ++ int? durationMilliseconds, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [cameraUpdate, durationMilliseconds], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3107,7 +2972,8 @@ class MapsApi { + + /// Gets the current map zoom level. + Future getZoomLevel() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3135,13 +3001,16 @@ class MapsApi { + + /// Show the info window for the marker with the given ID. + Future showInfoWindow(String markerId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [markerId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3158,13 +3027,16 @@ class MapsApi { + + /// Hide the info window for the marker with the given ID. + Future hideInfoWindow(String markerId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [markerId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3182,13 +3054,16 @@ class MapsApi { + /// Returns true if the marker with the given ID is currently displaying its + /// info window. + Future isInfoWindowShown(String markerId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [markerId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3214,13 +3089,16 @@ class MapsApi { + /// Returns false if there was an error setting the style, such as an invalid + /// style string. + Future setStyle(String style) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [style], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3246,7 +3124,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 pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3274,13 +3153,16 @@ class MapsApi { + + /// Clears the cache of tiles previously requseted from the tile provider. + Future clearTileCache(String tileOverlayId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [tileOverlayId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3297,7 +3179,8 @@ class MapsApi { + + /// Takes a snapshot of the map and returns its image data. + Future takeSnapshot() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3376,14 +3259,26 @@ abstract class MapsCallbackApi { + void onGroundOverlayTap(String groundOverlayId); + + /// Called to get data for a map tile. +- Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); ++ Future getTileOverlayTile( ++ String tileOverlayId, ++ PlatformPoint location, ++ int zoom, ++ ); + +- static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { +- messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ static void setUp( ++ MapsCallbackApi? api, { ++ BinaryMessenger? binaryMessenger, ++ String messageChannelSuffix = '', ++ }) { ++ messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + { + final pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { +@@ -3393,41 +3288,54 @@ 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null.'); ++ assert( ++ message != 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?); +- assert(arg_cameraPosition != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null, expected non-null 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 { + api.onCameraMove(arg_cameraPosition!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { +@@ -3437,373 +3345,502 @@ 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onTap(arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onLongPress(arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null, expected non-null String.', ++ ); + try { + api.onMarkerTap(arg_markerId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.', ++ ); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); +- assert(arg_position != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onMarkerDragStart(arg_markerId!, arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null String.', ++ ); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); +- assert(arg_position != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onMarkerDrag(arg_markerId!, arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.', ++ ); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); +- assert(arg_position != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onMarkerDragEnd(arg_markerId!, arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.', ++ ); + try { + api.onInfoWindowTap(arg_markerId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null, expected non-null String.'); ++ assert( ++ arg_circleId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null, expected non-null String.', ++ ); + try { + api.onCircleTap(arg_circleId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); ++ assert( ++ arg_cluster != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.', ++ ); + try { + api.onClusterTap(arg_cluster!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.', ++ ); + final List args = (message as List?)!; +- final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); +- assert(arg_poi != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); ++ final PlatformPointOfInterest? arg_poi = ++ (args[0] as PlatformPointOfInterest?); ++ assert( ++ arg_poi != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.', ++ ); + try { + api.onPoiTap(arg_poi!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); ++ assert( ++ arg_polygonId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null, expected non-null String.', ++ ); + try { + api.onPolygonTap(arg_polygonId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); ++ assert( ++ arg_polylineId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null, expected non-null String.', ++ ); + try { + api.onPolylineTap(arg_polylineId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.', ++ ); + final List args = (message as List?)!; + final String? arg_groundOverlayId = (args[0] as String?); +- assert(arg_groundOverlayId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); ++ assert( ++ arg_groundOverlayId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.', ++ ); + try { + api.onGroundOverlayTap(arg_groundOverlayId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); ++ assert( ++ arg_tileOverlayId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.', ++ ); + final PlatformPoint? arg_location = (args[1] as PlatformPoint?); +- assert(arg_location != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); ++ assert( ++ arg_location != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.', ++ ); + final int? arg_zoom = (args[2] as int?); +- assert(arg_zoom != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); ++ 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()), ++ ); + } + }); + } +@@ -3816,9 +3853,13 @@ 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 = ''}) +- : pigeonVar_binaryMessenger = binaryMessenger, +- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ MapsInitializerApi({ ++ BinaryMessenger? binaryMessenger, ++ String messageChannelSuffix = '', ++ }) : pigeonVar_binaryMessenger = binaryMessenger, ++ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); +@@ -3831,14 +3872,19 @@ class MapsInitializerApi { + /// + /// Calling this more than once in the lifetime of an application will result + /// in an error. +- Future initializeWithPreferredRenderer(PlatformRendererType? type) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer'; ++ Future initializeWithPreferredRenderer( ++ PlatformRendererType? type, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [type], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3861,7 +3907,8 @@ class MapsInitializerApi { + /// Attempts to trigger any thread-blocking work + /// the Google Maps SDK normally does when a map is shown for the first time. + Future warmup() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3890,9 +3937,13 @@ 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 = ''}) +- : pigeonVar_binaryMessenger = binaryMessenger, +- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ MapsPlatformViewApi({ ++ BinaryMessenger? binaryMessenger, ++ String messageChannelSuffix = '', ++ }) : pigeonVar_binaryMessenger = binaryMessenger, ++ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); +@@ -3900,13 +3951,16 @@ class MapsPlatformViewApi { + final String pigeonVar_messageChannelSuffix; + + Future createView(PlatformMapViewCreationParams? type) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [type], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3927,9 +3981,13 @@ 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 = ''}) +- : pigeonVar_binaryMessenger = binaryMessenger, +- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ MapsInspectorApi({ ++ BinaryMessenger? binaryMessenger, ++ String messageChannelSuffix = '', ++ }) : pigeonVar_binaryMessenger = binaryMessenger, ++ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); +@@ -3937,7 +3995,8 @@ class MapsInspectorApi { + final String pigeonVar_messageChannelSuffix; + + Future areBuildingsEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3964,7 +4023,8 @@ class MapsInspectorApi { + } + + Future areRotateGesturesEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3991,7 +4051,8 @@ class MapsInspectorApi { + } + + Future areZoomControlsEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4018,7 +4079,8 @@ class MapsInspectorApi { + } + + Future areScrollGesturesEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4045,7 +4107,8 @@ class MapsInspectorApi { + } + + Future areTiltGesturesEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4072,7 +4135,8 @@ class MapsInspectorApi { + } + + Future areZoomGesturesEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4099,7 +4163,8 @@ class MapsInspectorApi { + } + + Future isCompassEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4126,7 +4191,8 @@ class MapsInspectorApi { + } + + Future isLiteModeEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4148,7 +4214,8 @@ class MapsInspectorApi { + } + + Future isMapToolbarEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4175,7 +4242,8 @@ class MapsInspectorApi { + } + + Future isMyLocationButtonEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4202,7 +4270,8 @@ class MapsInspectorApi { + } + + Future isTrafficEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4229,13 +4298,16 @@ class MapsInspectorApi { + } + + Future getTileOverlayInfo(String tileOverlayId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [tileOverlayId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -4250,14 +4322,19 @@ class MapsInspectorApi { + } + } + +- Future getGroundOverlayInfo(String groundOverlayId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo'; ++ Future getGroundOverlayInfo( ++ String groundOverlayId, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [groundOverlayId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -4273,7 +4350,8 @@ class MapsInspectorApi { + } + + Future getZoomRange() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4300,13 +4378,16 @@ class MapsInspectorApi { + } + + Future> getClusters(String clusterManagerId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [clusterManagerId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -4322,12 +4403,14 @@ class MapsInspectorApi { + message: 'Host platform returned null value for non-null return value.', + ); + } else { +- return (pigeonVar_replyList[0] as List?)!.cast(); ++ return (pigeonVar_replyList[0] as List?)! ++ .cast(); + } + } + + Future getCameraPosition() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, 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 3f01ed8e14c4..eade30e49f67 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 @@ -819,7 +819,7 @@ abstract class MapsCallbackApi { /// Called when a marker cluster is tapped. void onClusterTap(PlatformCluster cluster); - /// Called when a POI is tapped. + /// Called when a POI is tapped. void onPoiTap(PlatformPointOfInterest poi); /// Called when a polygon is tapped. 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 f1b680a753b2..882b3ff4d633 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 @@ -1508,9 +1508,7 @@ void main() { mapId, ); - final stream = StreamQueue( - maps.onPoiTap(mapId: mapId), - ); + final stream = StreamQueue(maps.onPoiTap(mapId: mapId)); callbackHandler.onPoiTap( PlatformPointOfInterest( @@ -1522,7 +1520,7 @@ void main() { final MapPoiTapEvent event = await stream.next; expect(event.mapId, mapId); - + final PointOfInterest poi = event.value; expect(poi.position.latitude, fakePosition.latitude); expect(poi.position.longitude, fakePosition.longitude); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m index 32628cef48ba..e2e0b666e8b4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m @@ -564,14 +564,14 @@ - (void)mapView:(GMSMapView *)mapView didTapPOIWithPlaceID:(NSString *)placeID name:(NSString *)name location:(CLLocationCoordinate2D)location { - FGMPlatformPointOfInterest *poi = [FGMPlatformPointOfInterest - makeWithPosition:FGMGetPigeonLatLngForCoordinate(location) - name:name - placeId:placeID]; - - [self.dartCallbackHandler didTapPointOfInterest:poi + FGMPlatformPointOfInterest *poi = + [FGMPlatformPointOfInterest makeWithPosition:FGMGetPigeonLatLngForCoordinate(location) + name:name + placeId:placeID]; + + [self.dartCallbackHandler didTapPointOfInterest:poi completion:^(FlutterError *_Nullable _){ - }]; + }]; } - (void)mapView:(GMSMapView *)mapView didLongPressAtCoordinate:(CLLocationCoordinate2D)coordinate { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m index 57fafffc3044..60d18f1a8c67 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m @@ -22,7 +22,12 @@ } static FlutterError *createConnectionError(NSString *channelName) { - return [FlutterError errorWithCode:@"channel-error" message:[NSString stringWithFormat:@"%@/%@/%@", @"Unable to establish connection on channel: '", channelName, @"'."] details:@""]; + return [FlutterError + errorWithCode:@"channel-error" + message:[NSString stringWithFormat:@"%@/%@/%@", + @"Unable to establish connection on channel: '", + channelName, @"'."] + details:@""]; } static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { @@ -333,11 +338,11 @@ + (nullable FGMPlatformBitmapBytesMap *)nullableFromList:(NSArray *)list; @end @implementation FGMPlatformCameraPosition -+ (instancetype)makeWithBearing:(double )bearing - target:(FGMPlatformLatLng *)target - tilt:(double )tilt - zoom:(double )zoom { - FGMPlatformCameraPosition* pigeonResult = [[FGMPlatformCameraPosition alloc] init]; ++ (instancetype)makeWithBearing:(double)bearing + target:(FGMPlatformLatLng *)target + tilt:(double)tilt + zoom:(double)zoom { + FGMPlatformCameraPosition *pigeonResult = [[FGMPlatformCameraPosition alloc] init]; pigeonResult.bearing = bearing; pigeonResult.target = target; pigeonResult.tilt = tilt; @@ -366,8 +371,8 @@ + (nullable FGMPlatformCameraPosition *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformCameraUpdate -+ (instancetype)makeWithCameraUpdate:(id )cameraUpdate { - FGMPlatformCameraUpdate* pigeonResult = [[FGMPlatformCameraUpdate alloc] init]; ++ (instancetype)makeWithCameraUpdate:(id)cameraUpdate { + FGMPlatformCameraUpdate *pigeonResult = [[FGMPlatformCameraUpdate alloc] init]; pigeonResult.cameraUpdate = cameraUpdate; return pigeonResult; } @@ -388,12 +393,14 @@ + (nullable FGMPlatformCameraUpdate *)nullableFromList:(NSArray *)list { @implementation FGMPlatformCameraUpdateNewCameraPosition + (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition { - FGMPlatformCameraUpdateNewCameraPosition* pigeonResult = [[FGMPlatformCameraUpdateNewCameraPosition alloc] init]; + FGMPlatformCameraUpdateNewCameraPosition *pigeonResult = + [[FGMPlatformCameraUpdateNewCameraPosition alloc] init]; pigeonResult.cameraPosition = cameraPosition; return pigeonResult; } + (FGMPlatformCameraUpdateNewCameraPosition *)fromList:(NSArray *)list { - FGMPlatformCameraUpdateNewCameraPosition *pigeonResult = [[FGMPlatformCameraUpdateNewCameraPosition alloc] init]; + FGMPlatformCameraUpdateNewCameraPosition *pigeonResult = + [[FGMPlatformCameraUpdateNewCameraPosition alloc] init]; pigeonResult.cameraPosition = GetNullableObjectAtIndex(list, 0); return pigeonResult; } @@ -409,7 +416,7 @@ + (nullable FGMPlatformCameraUpdateNewCameraPosition *)nullableFromList:(NSArray @implementation FGMPlatformCameraUpdateNewLatLng + (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng { - FGMPlatformCameraUpdateNewLatLng* pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init]; + FGMPlatformCameraUpdateNewLatLng *pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init]; pigeonResult.latLng = latLng; return pigeonResult; } @@ -429,15 +436,16 @@ + (nullable FGMPlatformCameraUpdateNewLatLng *)nullableFromList:(NSArray *)l @end @implementation FGMPlatformCameraUpdateNewLatLngBounds -+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds - padding:(double )padding { - FGMPlatformCameraUpdateNewLatLngBounds* pigeonResult = [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init]; ++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding { + FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult = + [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init]; pigeonResult.bounds = bounds; pigeonResult.padding = padding; return pigeonResult; } + (FGMPlatformCameraUpdateNewLatLngBounds *)fromList:(NSArray *)list { - FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult = [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init]; + FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult = + [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init]; pigeonResult.bounds = GetNullableObjectAtIndex(list, 0); pigeonResult.padding = [GetNullableObjectAtIndex(list, 1) doubleValue]; return pigeonResult; @@ -454,15 +462,16 @@ + (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray *)list { - FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult = [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init]; + FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult = + [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init]; pigeonResult.latLng = GetNullableObjectAtIndex(list, 0); pigeonResult.zoom = [GetNullableObjectAtIndex(list, 1) doubleValue]; return pigeonResult; @@ -479,9 +488,8 @@ + (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray @end @implementation FGMPlatformCameraUpdateScrollBy -+ (instancetype)makeWithDx:(double )dx - dy:(double )dy { - FGMPlatformCameraUpdateScrollBy* pigeonResult = [[FGMPlatformCameraUpdateScrollBy alloc] init]; ++ (instancetype)makeWithDx:(double)dx dy:(double)dy { + FGMPlatformCameraUpdateScrollBy *pigeonResult = [[FGMPlatformCameraUpdateScrollBy alloc] init]; pigeonResult.dx = dx; pigeonResult.dy = dy; return pigeonResult; @@ -504,9 +512,8 @@ + (nullable FGMPlatformCameraUpdateScrollBy *)nullableFromList:(NSArray *)li @end @implementation FGMPlatformCameraUpdateZoomBy -+ (instancetype)makeWithAmount:(double )amount - focus:(nullable FGMPlatformPoint *)focus { - FGMPlatformCameraUpdateZoomBy* pigeonResult = [[FGMPlatformCameraUpdateZoomBy alloc] init]; ++ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus { + FGMPlatformCameraUpdateZoomBy *pigeonResult = [[FGMPlatformCameraUpdateZoomBy alloc] init]; pigeonResult.amount = amount; pigeonResult.focus = focus; return pigeonResult; @@ -529,8 +536,8 @@ + (nullable FGMPlatformCameraUpdateZoomBy *)nullableFromList:(NSArray *)list @end @implementation FGMPlatformCameraUpdateZoom -+ (instancetype)makeWithOut:(BOOL )out { - FGMPlatformCameraUpdateZoom* pigeonResult = [[FGMPlatformCameraUpdateZoom alloc] init]; ++ (instancetype)makeWithOut:(BOOL)out { + FGMPlatformCameraUpdateZoom *pigeonResult = [[FGMPlatformCameraUpdateZoom alloc] init]; pigeonResult.out = out; return pigeonResult; } @@ -550,8 +557,8 @@ + (nullable FGMPlatformCameraUpdateZoom *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformCameraUpdateZoomTo -+ (instancetype)makeWithZoom:(double )zoom { - FGMPlatformCameraUpdateZoomTo* pigeonResult = [[FGMPlatformCameraUpdateZoomTo alloc] init]; ++ (instancetype)makeWithZoom:(double)zoom { + FGMPlatformCameraUpdateZoomTo *pigeonResult = [[FGMPlatformCameraUpdateZoomTo alloc] init]; pigeonResult.zoom = zoom; return pigeonResult; } @@ -571,16 +578,16 @@ + (nullable FGMPlatformCameraUpdateZoomTo *)nullableFromList:(NSArray *)list @end @implementation FGMPlatformCircle -+ (instancetype)makeWithConsumeTapEvents:(BOOL )consumeTapEvents - fillColor:(FGMPlatformColor *)fillColor - strokeColor:(FGMPlatformColor *)strokeColor - visible:(BOOL )visible - strokeWidth:(NSInteger )strokeWidth - zIndex:(double )zIndex - center:(FGMPlatformLatLng *)center - radius:(double )radius - circleId:(NSString *)circleId { - FGMPlatformCircle* pigeonResult = [[FGMPlatformCircle alloc] init]; ++ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents + fillColor:(FGMPlatformColor *)fillColor + strokeColor:(FGMPlatformColor *)strokeColor + visible:(BOOL)visible + strokeWidth:(NSInteger)strokeWidth + zIndex:(double)zIndex + center:(FGMPlatformLatLng *)center + radius:(double)radius + circleId:(NSString *)circleId { + FGMPlatformCircle *pigeonResult = [[FGMPlatformCircle alloc] init]; pigeonResult.consumeTapEvents = consumeTapEvents; pigeonResult.fillColor = fillColor; pigeonResult.strokeColor = strokeColor; @@ -625,13 +632,13 @@ + (nullable FGMPlatformCircle *)nullableFromList:(NSArray *)list { @implementation FGMPlatformHeatmap + (instancetype)makeWithHeatmapId:(NSString *)heatmapId - data:(NSArray *)data - gradient:(nullable FGMPlatformHeatmapGradient *)gradient - opacity:(double )opacity - radius:(NSInteger )radius - minimumZoomIntensity:(NSInteger )minimumZoomIntensity - maximumZoomIntensity:(NSInteger )maximumZoomIntensity { - FGMPlatformHeatmap* pigeonResult = [[FGMPlatformHeatmap alloc] init]; + data:(NSArray *)data + gradient:(nullable FGMPlatformHeatmapGradient *)gradient + opacity:(double)opacity + radius:(NSInteger)radius + minimumZoomIntensity:(NSInteger)minimumZoomIntensity + maximumZoomIntensity:(NSInteger)maximumZoomIntensity { + FGMPlatformHeatmap *pigeonResult = [[FGMPlatformHeatmap alloc] init]; pigeonResult.heatmapId = heatmapId; pigeonResult.data = data; pigeonResult.gradient = gradient; @@ -670,9 +677,9 @@ + (nullable FGMPlatformHeatmap *)nullableFromList:(NSArray *)list { @implementation FGMPlatformHeatmapGradient + (instancetype)makeWithColors:(NSArray *)colors - startPoints:(NSArray *)startPoints - colorMapSize:(NSInteger )colorMapSize { - FGMPlatformHeatmapGradient* pigeonResult = [[FGMPlatformHeatmapGradient alloc] init]; + startPoints:(NSArray *)startPoints + colorMapSize:(NSInteger)colorMapSize { + FGMPlatformHeatmapGradient *pigeonResult = [[FGMPlatformHeatmapGradient alloc] init]; pigeonResult.colors = colors; pigeonResult.startPoints = startPoints; pigeonResult.colorMapSize = colorMapSize; @@ -698,9 +705,8 @@ + (nullable FGMPlatformHeatmapGradient *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformWeightedLatLng -+ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point - weight:(double )weight { - FGMPlatformWeightedLatLng* pigeonResult = [[FGMPlatformWeightedLatLng alloc] init]; ++ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point weight:(double)weight { + FGMPlatformWeightedLatLng *pigeonResult = [[FGMPlatformWeightedLatLng alloc] init]; pigeonResult.point = point; pigeonResult.weight = weight; return pigeonResult; @@ -724,9 +730,9 @@ + (nullable FGMPlatformWeightedLatLng *)nullableFromList:(NSArray *)list { @implementation FGMPlatformInfoWindow + (instancetype)makeWithTitle:(nullable NSString *)title - snippet:(nullable NSString *)snippet - anchor:(FGMPlatformPoint *)anchor { - FGMPlatformInfoWindow* pigeonResult = [[FGMPlatformInfoWindow alloc] init]; + snippet:(nullable NSString *)snippet + anchor:(FGMPlatformPoint *)anchor { + FGMPlatformInfoWindow *pigeonResult = [[FGMPlatformInfoWindow alloc] init]; pigeonResult.title = title; pigeonResult.snippet = snippet; pigeonResult.anchor = anchor; @@ -753,10 +759,10 @@ + (nullable FGMPlatformInfoWindow *)nullableFromList:(NSArray *)list { @implementation FGMPlatformCluster + (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId - position:(FGMPlatformLatLng *)position - bounds:(FGMPlatformLatLngBounds *)bounds - markerIds:(NSArray *)markerIds { - FGMPlatformCluster* pigeonResult = [[FGMPlatformCluster alloc] init]; + position:(FGMPlatformLatLng *)position + bounds:(FGMPlatformLatLngBounds *)bounds + markerIds:(NSArray *)markerIds { + FGMPlatformCluster *pigeonResult = [[FGMPlatformCluster alloc] init]; pigeonResult.clusterManagerId = clusterManagerId; pigeonResult.position = position; pigeonResult.bounds = bounds; @@ -786,7 +792,7 @@ + (nullable FGMPlatformCluster *)nullableFromList:(NSArray *)list { @implementation FGMPlatformClusterManager + (instancetype)makeWithIdentifier:(NSString *)identifier { - FGMPlatformClusterManager* pigeonResult = [[FGMPlatformClusterManager alloc] init]; + FGMPlatformClusterManager *pigeonResult = [[FGMPlatformClusterManager alloc] init]; pigeonResult.identifier = identifier; return pigeonResult; } @@ -806,20 +812,20 @@ + (nullable FGMPlatformClusterManager *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformMarker -+ (instancetype)makeWithAlpha:(double )alpha - anchor:(FGMPlatformPoint *)anchor - consumeTapEvents:(BOOL )consumeTapEvents - draggable:(BOOL )draggable - flat:(BOOL )flat - icon:(FGMPlatformBitmap *)icon - infoWindow:(FGMPlatformInfoWindow *)infoWindow - position:(FGMPlatformLatLng *)position - rotation:(double )rotation - visible:(BOOL )visible - zIndex:(NSInteger )zIndex - markerId:(NSString *)markerId - clusterManagerId:(nullable NSString *)clusterManagerId { - FGMPlatformMarker* pigeonResult = [[FGMPlatformMarker alloc] init]; ++ (instancetype)makeWithAlpha:(double)alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL)consumeTapEvents + draggable:(BOOL)draggable + flat:(BOOL)flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double)rotation + visible:(BOOL)visible + zIndex:(NSInteger)zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId { + FGMPlatformMarker *pigeonResult = [[FGMPlatformMarker alloc] init]; pigeonResult.alpha = alpha; pigeonResult.anchor = anchor; pigeonResult.consumeTapEvents = consumeTapEvents; @@ -876,9 +882,9 @@ + (nullable FGMPlatformMarker *)nullableFromList:(NSArray *)list { @implementation FGMPlatformPointOfInterest + (instancetype)makeWithPosition:(FGMPlatformLatLng *)position - name:(NSString *)name - placeId:(NSString *)placeId { - FGMPlatformPointOfInterest* pigeonResult = [[FGMPlatformPointOfInterest alloc] init]; + name:(NSString *)name + placeId:(NSString *)placeId { + FGMPlatformPointOfInterest *pigeonResult = [[FGMPlatformPointOfInterest alloc] init]; pigeonResult.position = position; pigeonResult.name = name; pigeonResult.placeId = placeId; @@ -905,16 +911,16 @@ + (nullable FGMPlatformPointOfInterest *)nullableFromList:(NSArray *)list { @implementation FGMPlatformPolygon + (instancetype)makeWithPolygonId:(NSString *)polygonId - consumesTapEvents:(BOOL )consumesTapEvents - fillColor:(FGMPlatformColor *)fillColor - geodesic:(BOOL )geodesic - points:(NSArray *)points - holes:(NSArray *> *)holes - visible:(BOOL )visible - strokeColor:(FGMPlatformColor *)strokeColor - strokeWidth:(NSInteger )strokeWidth - zIndex:(NSInteger )zIndex { - FGMPlatformPolygon* pigeonResult = [[FGMPlatformPolygon alloc] init]; + consumesTapEvents:(BOOL)consumesTapEvents + fillColor:(FGMPlatformColor *)fillColor + geodesic:(BOOL)geodesic + points:(NSArray *)points + holes:(NSArray *> *)holes + visible:(BOOL)visible + strokeColor:(FGMPlatformColor *)strokeColor + strokeWidth:(NSInteger)strokeWidth + zIndex:(NSInteger)zIndex { + FGMPlatformPolygon *pigeonResult = [[FGMPlatformPolygon alloc] init]; pigeonResult.polygonId = polygonId; pigeonResult.consumesTapEvents = consumesTapEvents; pigeonResult.fillColor = fillColor; @@ -962,16 +968,16 @@ + (nullable FGMPlatformPolygon *)nullableFromList:(NSArray *)list { @implementation FGMPlatformPolyline + (instancetype)makeWithPolylineId:(NSString *)polylineId - consumesTapEvents:(BOOL )consumesTapEvents - color:(FGMPlatformColor *)color - geodesic:(BOOL )geodesic - jointType:(FGMPlatformJointType)jointType - patterns:(NSArray *)patterns - points:(NSArray *)points - visible:(BOOL )visible - width:(NSInteger )width - zIndex:(NSInteger )zIndex { - FGMPlatformPolyline* pigeonResult = [[FGMPlatformPolyline alloc] init]; + consumesTapEvents:(BOOL)consumesTapEvents + color:(FGMPlatformColor *)color + geodesic:(BOOL)geodesic + jointType:(FGMPlatformJointType)jointType + patterns:(NSArray *)patterns + points:(NSArray *)points + visible:(BOOL)visible + width:(NSInteger)width + zIndex:(NSInteger)zIndex { + FGMPlatformPolyline *pigeonResult = [[FGMPlatformPolyline alloc] init]; pigeonResult.polylineId = polylineId; pigeonResult.consumesTapEvents = consumesTapEvents; pigeonResult.color = color; @@ -1019,16 +1025,16 @@ + (nullable FGMPlatformPolyline *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformPatternItem -+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type - length:(nullable NSNumber *)length { - FGMPlatformPatternItem* pigeonResult = [[FGMPlatformPatternItem alloc] init]; ++ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length { + FGMPlatformPatternItem *pigeonResult = [[FGMPlatformPatternItem alloc] init]; pigeonResult.type = type; pigeonResult.length = length; return pigeonResult; } + (FGMPlatformPatternItem *)fromList:(NSArray *)list { FGMPlatformPatternItem *pigeonResult = [[FGMPlatformPatternItem alloc] init]; - FGMPlatformPatternItemTypeBox *boxedFGMPlatformPatternItemType = GetNullableObjectAtIndex(list, 0); + FGMPlatformPatternItemTypeBox *boxedFGMPlatformPatternItemType = + GetNullableObjectAtIndex(list, 0); pigeonResult.type = boxedFGMPlatformPatternItemType.value; pigeonResult.length = GetNullableObjectAtIndex(list, 1); return pigeonResult; @@ -1045,10 +1051,10 @@ + (nullable FGMPlatformPatternItem *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformTile -+ (instancetype)makeWithWidth:(NSInteger )width - height:(NSInteger )height - data:(nullable FlutterStandardTypedData *)data { - FGMPlatformTile* pigeonResult = [[FGMPlatformTile alloc] init]; ++ (instancetype)makeWithWidth:(NSInteger)width + height:(NSInteger)height + data:(nullable FlutterStandardTypedData *)data { + FGMPlatformTile *pigeonResult = [[FGMPlatformTile alloc] init]; pigeonResult.width = width; pigeonResult.height = height; pigeonResult.data = data; @@ -1075,12 +1081,12 @@ + (nullable FGMPlatformTile *)nullableFromList:(NSArray *)list { @implementation FGMPlatformTileOverlay + (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId - fadeIn:(BOOL )fadeIn - transparency:(double )transparency - zIndex:(NSInteger )zIndex - visible:(BOOL )visible - tileSize:(NSInteger )tileSize { - FGMPlatformTileOverlay* pigeonResult = [[FGMPlatformTileOverlay alloc] init]; + fadeIn:(BOOL)fadeIn + transparency:(double)transparency + zIndex:(NSInteger)zIndex + visible:(BOOL)visible + tileSize:(NSInteger)tileSize { + FGMPlatformTileOverlay *pigeonResult = [[FGMPlatformTileOverlay alloc] init]; pigeonResult.tileOverlayId = tileOverlayId; pigeonResult.fadeIn = fadeIn; pigeonResult.transparency = transparency; @@ -1115,11 +1121,11 @@ + (nullable FGMPlatformTileOverlay *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformEdgeInsets -+ (instancetype)makeWithTop:(double )top - bottom:(double )bottom - left:(double )left - right:(double )right { - FGMPlatformEdgeInsets* pigeonResult = [[FGMPlatformEdgeInsets alloc] init]; ++ (instancetype)makeWithTop:(double)top + bottom:(double)bottom + left:(double)left + right:(double)right { + FGMPlatformEdgeInsets *pigeonResult = [[FGMPlatformEdgeInsets alloc] init]; pigeonResult.top = top; pigeonResult.bottom = bottom; pigeonResult.left = left; @@ -1148,9 +1154,8 @@ + (nullable FGMPlatformEdgeInsets *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformLatLng -+ (instancetype)makeWithLatitude:(double )latitude - longitude:(double )longitude { - FGMPlatformLatLng* pigeonResult = [[FGMPlatformLatLng alloc] init]; ++ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude { + FGMPlatformLatLng *pigeonResult = [[FGMPlatformLatLng alloc] init]; pigeonResult.latitude = latitude; pigeonResult.longitude = longitude; return pigeonResult; @@ -1174,8 +1179,8 @@ + (nullable FGMPlatformLatLng *)nullableFromList:(NSArray *)list { @implementation FGMPlatformLatLngBounds + (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast - southwest:(FGMPlatformLatLng *)southwest { - FGMPlatformLatLngBounds* pigeonResult = [[FGMPlatformLatLngBounds alloc] init]; + southwest:(FGMPlatformLatLng *)southwest { + FGMPlatformLatLngBounds *pigeonResult = [[FGMPlatformLatLngBounds alloc] init]; pigeonResult.northeast = northeast; pigeonResult.southwest = southwest; return pigeonResult; @@ -1199,7 +1204,7 @@ + (nullable FGMPlatformLatLngBounds *)nullableFromList:(NSArray *)list { @implementation FGMPlatformCameraTargetBounds + (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds { - FGMPlatformCameraTargetBounds* pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init]; + FGMPlatformCameraTargetBounds *pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init]; pigeonResult.bounds = bounds; return pigeonResult; } @@ -1220,17 +1225,17 @@ + (nullable FGMPlatformCameraTargetBounds *)nullableFromList:(NSArray *)list @implementation FGMPlatformGroundOverlay + (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId - image:(FGMPlatformBitmap *)image - position:(nullable FGMPlatformLatLng *)position - bounds:(nullable FGMPlatformLatLngBounds *)bounds - anchor:(nullable FGMPlatformPoint *)anchor - transparency:(double )transparency - bearing:(double )bearing - zIndex:(NSInteger )zIndex - visible:(BOOL )visible - clickable:(BOOL )clickable - zoomLevel:(nullable NSNumber *)zoomLevel { - FGMPlatformGroundOverlay* pigeonResult = [[FGMPlatformGroundOverlay alloc] init]; + image:(FGMPlatformBitmap *)image + position:(nullable FGMPlatformLatLng *)position + bounds:(nullable FGMPlatformLatLngBounds *)bounds + anchor:(nullable FGMPlatformPoint *)anchor + transparency:(double)transparency + bearing:(double)bearing + zIndex:(NSInteger)zIndex + visible:(BOOL)visible + clickable:(BOOL)clickable + zoomLevel:(nullable NSNumber *)zoomLevel { + FGMPlatformGroundOverlay *pigeonResult = [[FGMPlatformGroundOverlay alloc] init]; pigeonResult.groundOverlayId = groundOverlayId; pigeonResult.image = image; pigeonResult.position = position; @@ -1280,17 +1285,18 @@ + (nullable FGMPlatformGroundOverlay *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformMapViewCreationParams -+ (instancetype)makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition - mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration - initialCircles:(NSArray *)initialCircles - initialMarkers:(NSArray *)initialMarkers - initialPolygons:(NSArray *)initialPolygons - initialPolylines:(NSArray *)initialPolylines - initialHeatmaps:(NSArray *)initialHeatmaps - initialTileOverlays:(NSArray *)initialTileOverlays - initialClusterManagers:(NSArray *)initialClusterManagers - initialGroundOverlays:(NSArray *)initialGroundOverlays { - FGMPlatformMapViewCreationParams* pigeonResult = [[FGMPlatformMapViewCreationParams alloc] init]; ++ (instancetype) + makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition + mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration + initialCircles:(NSArray *)initialCircles + initialMarkers:(NSArray *)initialMarkers + initialPolygons:(NSArray *)initialPolygons + initialPolylines:(NSArray *)initialPolylines + initialHeatmaps:(NSArray *)initialHeatmaps + initialTileOverlays:(NSArray *)initialTileOverlays + initialClusterManagers:(NSArray *)initialClusterManagers + initialGroundOverlays:(NSArray *)initialGroundOverlays { + FGMPlatformMapViewCreationParams *pigeonResult = [[FGMPlatformMapViewCreationParams alloc] init]; pigeonResult.initialCameraPosition = initialCameraPosition; pigeonResult.mapConfiguration = mapConfiguration; pigeonResult.initialCircles = initialCircles; @@ -1338,23 +1344,23 @@ + (nullable FGMPlatformMapViewCreationParams *)nullableFromList:(NSArray *)l @implementation FGMPlatformMapConfiguration + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style { - FGMPlatformMapConfiguration* pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style { + FGMPlatformMapConfiguration *pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; pigeonResult.compassEnabled = compassEnabled; pigeonResult.cameraTargetBounds = cameraTargetBounds; pigeonResult.mapType = mapType; @@ -1422,9 +1428,8 @@ + (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformPoint -+ (instancetype)makeWithX:(double )x - y:(double )y { - FGMPlatformPoint* pigeonResult = [[FGMPlatformPoint alloc] init]; ++ (instancetype)makeWithX:(double)x y:(double)y { + FGMPlatformPoint *pigeonResult = [[FGMPlatformPoint alloc] init]; pigeonResult.x = x; pigeonResult.y = y; return pigeonResult; @@ -1447,9 +1452,8 @@ + (nullable FGMPlatformPoint *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformSize -+ (instancetype)makeWithWidth:(double )width - height:(double )height { - FGMPlatformSize* pigeonResult = [[FGMPlatformSize alloc] init]; ++ (instancetype)makeWithWidth:(double)width height:(double)height { + FGMPlatformSize *pigeonResult = [[FGMPlatformSize alloc] init]; pigeonResult.width = width; pigeonResult.height = height; return pigeonResult; @@ -1472,11 +1476,8 @@ + (nullable FGMPlatformSize *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformColor -+ (instancetype)makeWithRed:(double )red - green:(double )green - blue:(double )blue - alpha:(double )alpha { - FGMPlatformColor* pigeonResult = [[FGMPlatformColor alloc] init]; ++ (instancetype)makeWithRed:(double)red green:(double)green blue:(double)blue alpha:(double)alpha { + FGMPlatformColor *pigeonResult = [[FGMPlatformColor alloc] init]; pigeonResult.red = red; pigeonResult.green = green; pigeonResult.blue = blue; @@ -1505,11 +1506,11 @@ + (nullable FGMPlatformColor *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformTileLayer -+ (instancetype)makeWithVisible:(BOOL )visible - fadeIn:(BOOL )fadeIn - opacity:(double )opacity - zIndex:(NSInteger )zIndex { - FGMPlatformTileLayer* pigeonResult = [[FGMPlatformTileLayer alloc] init]; ++ (instancetype)makeWithVisible:(BOOL)visible + fadeIn:(BOOL)fadeIn + opacity:(double)opacity + zIndex:(NSInteger)zIndex { + FGMPlatformTileLayer *pigeonResult = [[FGMPlatformTileLayer alloc] init]; pigeonResult.visible = visible; pigeonResult.fadeIn = fadeIn; pigeonResult.opacity = opacity; @@ -1538,9 +1539,8 @@ + (nullable FGMPlatformTileLayer *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformZoomRange -+ (instancetype)makeWithMin:(nullable NSNumber *)min - max:(nullable NSNumber *)max { - FGMPlatformZoomRange* pigeonResult = [[FGMPlatformZoomRange alloc] init]; ++ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max { + FGMPlatformZoomRange *pigeonResult = [[FGMPlatformZoomRange alloc] init]; pigeonResult.min = min; pigeonResult.max = max; return pigeonResult; @@ -1563,8 +1563,8 @@ + (nullable FGMPlatformZoomRange *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformBitmap -+ (instancetype)makeWithBitmap:(id )bitmap { - FGMPlatformBitmap* pigeonResult = [[FGMPlatformBitmap alloc] init]; ++ (instancetype)makeWithBitmap:(id)bitmap { + FGMPlatformBitmap *pigeonResult = [[FGMPlatformBitmap alloc] init]; pigeonResult.bitmap = bitmap; return pigeonResult; } @@ -1585,7 +1585,7 @@ + (nullable FGMPlatformBitmap *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapDefaultMarker + (instancetype)makeWithHue:(nullable NSNumber *)hue { - FGMPlatformBitmapDefaultMarker* pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init]; + FGMPlatformBitmapDefaultMarker *pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init]; pigeonResult.hue = hue; return pigeonResult; } @@ -1606,8 +1606,8 @@ + (nullable FGMPlatformBitmapDefaultMarker *)nullableFromList:(NSArray *)lis @implementation FGMPlatformBitmapBytes + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - size:(nullable FGMPlatformSize *)size { - FGMPlatformBitmapBytes* pigeonResult = [[FGMPlatformBitmapBytes alloc] init]; + size:(nullable FGMPlatformSize *)size { + FGMPlatformBitmapBytes *pigeonResult = [[FGMPlatformBitmapBytes alloc] init]; pigeonResult.byteData = byteData; pigeonResult.size = size; return pigeonResult; @@ -1630,9 +1630,8 @@ + (nullable FGMPlatformBitmapBytes *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformBitmapAsset -+ (instancetype)makeWithName:(NSString *)name - pkg:(nullable NSString *)pkg { - FGMPlatformBitmapAsset* pigeonResult = [[FGMPlatformBitmapAsset alloc] init]; ++ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg { + FGMPlatformBitmapAsset *pigeonResult = [[FGMPlatformBitmapAsset alloc] init]; pigeonResult.name = name; pigeonResult.pkg = pkg; return pigeonResult; @@ -1656,9 +1655,9 @@ + (nullable FGMPlatformBitmapAsset *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapAssetImage + (instancetype)makeWithName:(NSString *)name - scale:(double )scale - size:(nullable FGMPlatformSize *)size { - FGMPlatformBitmapAssetImage* pigeonResult = [[FGMPlatformBitmapAssetImage alloc] init]; + scale:(double)scale + size:(nullable FGMPlatformSize *)size { + FGMPlatformBitmapAssetImage *pigeonResult = [[FGMPlatformBitmapAssetImage alloc] init]; pigeonResult.name = name; pigeonResult.scale = scale; pigeonResult.size = size; @@ -1685,11 +1684,11 @@ + (nullable FGMPlatformBitmapAssetImage *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapAssetMap + (instancetype)makeWithAssetName:(NSString *)assetName - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double )imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height { - FGMPlatformBitmapAssetMap* pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init]; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double)imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height { + FGMPlatformBitmapAssetMap *pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init]; pigeonResult.assetName = assetName; pigeonResult.bitmapScaling = bitmapScaling; pigeonResult.imagePixelRatio = imagePixelRatio; @@ -1700,7 +1699,8 @@ + (instancetype)makeWithAssetName:(NSString *)assetName + (FGMPlatformBitmapAssetMap *)fromList:(NSArray *)list { FGMPlatformBitmapAssetMap *pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init]; pigeonResult.assetName = GetNullableObjectAtIndex(list, 0); - FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling = GetNullableObjectAtIndex(list, 1); + FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling = + GetNullableObjectAtIndex(list, 1); pigeonResult.bitmapScaling = boxedFGMPlatformMapBitmapScaling.value; pigeonResult.imagePixelRatio = [GetNullableObjectAtIndex(list, 2) doubleValue]; pigeonResult.width = GetNullableObjectAtIndex(list, 3); @@ -1723,11 +1723,11 @@ + (nullable FGMPlatformBitmapAssetMap *)nullableFromList:(NSArray *)list { @implementation FGMPlatformBitmapBytesMap + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double )imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height { - FGMPlatformBitmapBytesMap* pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init]; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double)imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height { + FGMPlatformBitmapBytesMap *pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init]; pigeonResult.byteData = byteData; pigeonResult.bitmapScaling = bitmapScaling; pigeonResult.imagePixelRatio = imagePixelRatio; @@ -1738,7 +1738,8 @@ + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData + (FGMPlatformBitmapBytesMap *)fromList:(NSArray *)list { FGMPlatformBitmapBytesMap *pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init]; pigeonResult.byteData = GetNullableObjectAtIndex(list, 0); - FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling = GetNullableObjectAtIndex(list, 1); + FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling = + GetNullableObjectAtIndex(list, 1); pigeonResult.bitmapScaling = boxedFGMPlatformMapBitmapScaling.value; pigeonResult.imagePixelRatio = [GetNullableObjectAtIndex(list, 2) doubleValue]; pigeonResult.width = GetNullableObjectAtIndex(list, 3); @@ -1766,105 +1767,113 @@ - (nullable id)readValueOfType:(UInt8)type { switch (type) { case 129: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil : [[FGMPlatformMapTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil + ? nil + : [[FGMPlatformMapTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 130: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil + ? nil + : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 131: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil : [[FGMPlatformPatternItemTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil + : [[FGMPlatformPatternItemTypeBox alloc] + initWithValue:[enumAsNumber integerValue]]; } case 132: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil : [[FGMPlatformMapBitmapScalingBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil + : [[FGMPlatformMapBitmapScalingBox alloc] + initWithValue:[enumAsNumber integerValue]]; } - case 133: + case 133: return [FGMPlatformCameraPosition fromList:[self readValue]]; - case 134: + case 134: return [FGMPlatformCameraUpdate fromList:[self readValue]]; - case 135: + case 135: return [FGMPlatformCameraUpdateNewCameraPosition fromList:[self readValue]]; - case 136: + case 136: return [FGMPlatformCameraUpdateNewLatLng fromList:[self readValue]]; - case 137: + case 137: return [FGMPlatformCameraUpdateNewLatLngBounds fromList:[self readValue]]; - case 138: + case 138: return [FGMPlatformCameraUpdateNewLatLngZoom fromList:[self readValue]]; - case 139: + case 139: return [FGMPlatformCameraUpdateScrollBy fromList:[self readValue]]; - case 140: + case 140: return [FGMPlatformCameraUpdateZoomBy fromList:[self readValue]]; - case 141: + case 141: return [FGMPlatformCameraUpdateZoom fromList:[self readValue]]; - case 142: + case 142: return [FGMPlatformCameraUpdateZoomTo fromList:[self readValue]]; - case 143: + case 143: return [FGMPlatformCircle fromList:[self readValue]]; - case 144: + case 144: return [FGMPlatformHeatmap fromList:[self readValue]]; - case 145: + case 145: return [FGMPlatformHeatmapGradient fromList:[self readValue]]; - case 146: + case 146: return [FGMPlatformWeightedLatLng fromList:[self readValue]]; - case 147: + case 147: return [FGMPlatformInfoWindow fromList:[self readValue]]; - case 148: + case 148: return [FGMPlatformCluster fromList:[self readValue]]; - case 149: + case 149: return [FGMPlatformClusterManager fromList:[self readValue]]; - case 150: + case 150: return [FGMPlatformMarker fromList:[self readValue]]; - case 151: + case 151: return [FGMPlatformPointOfInterest fromList:[self readValue]]; - case 152: + case 152: return [FGMPlatformPolygon fromList:[self readValue]]; - case 153: + case 153: return [FGMPlatformPolyline fromList:[self readValue]]; - case 154: + case 154: return [FGMPlatformPatternItem fromList:[self readValue]]; - case 155: + case 155: return [FGMPlatformTile fromList:[self readValue]]; - case 156: + case 156: return [FGMPlatformTileOverlay fromList:[self readValue]]; - case 157: + case 157: return [FGMPlatformEdgeInsets fromList:[self readValue]]; - case 158: + case 158: return [FGMPlatformLatLng fromList:[self readValue]]; - case 159: + case 159: return [FGMPlatformLatLngBounds fromList:[self readValue]]; - case 160: + case 160: return [FGMPlatformCameraTargetBounds fromList:[self readValue]]; - case 161: + case 161: return [FGMPlatformGroundOverlay fromList:[self readValue]]; - case 162: + case 162: return [FGMPlatformMapViewCreationParams fromList:[self readValue]]; - case 163: + case 163: return [FGMPlatformMapConfiguration fromList:[self readValue]]; - case 164: + case 164: return [FGMPlatformPoint fromList:[self readValue]]; - case 165: + case 165: return [FGMPlatformSize fromList:[self readValue]]; - case 166: + case 166: return [FGMPlatformColor fromList:[self readValue]]; - case 167: + case 167: return [FGMPlatformTileLayer fromList:[self readValue]]; - case 168: + case 168: return [FGMPlatformZoomRange fromList:[self readValue]]; - case 169: + case 169: return [FGMPlatformBitmap fromList:[self readValue]]; - case 170: + case 170: return [FGMPlatformBitmapDefaultMarker fromList:[self readValue]]; - case 171: + case 171: return [FGMPlatformBitmapBytes fromList:[self readValue]]; - case 172: + case 172: return [FGMPlatformBitmapAsset fromList:[self readValue]]; - case 173: + case 173: return [FGMPlatformBitmapAssetImage fromList:[self readValue]]; - case 174: + case 174: return [FGMPlatformBitmapAssetMap fromList:[self readValue]]; - case 175: + case 175: return [FGMPlatformBitmapBytesMap fromList:[self readValue]]; default: return [super readValueOfType:type]; @@ -2042,7 +2051,8 @@ - (FlutterStandardReader *)readerWithData:(NSData *)data { static FlutterStandardMessageCodec *sSharedObject = nil; static dispatch_once_t sPred = 0; dispatch_once(&sPred, ^{ - FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter *readerWriter = [[FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter alloc] init]; + FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter *readerWriter = + [[FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter alloc] init]; sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter]; }); return sSharedObject; @@ -2051,17 +2061,24 @@ void SetUpFGMMapsApi(id binaryMessenger, NSObject binaryMessenger, NSObject *api, NSString *messageChannelSuffix) { - messageChannelSuffix = messageChannelSuffix.length > 0 ? [NSString stringWithFormat: @".%@", messageChannelSuffix] : @""; +void SetUpFGMMapsApiWithSuffix(id binaryMessenger, + NSObject *api, NSString *messageChannelSuffix) { + messageChannelSuffix = messageChannelSuffix.length > 0 + ? [NSString stringWithFormat:@".%@", messageChannelSuffix] + : @""; /// Returns once the map instance is available. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString + stringWithFormat: + @"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(waitForMapWithError:)], @"FGMMapsApi api (%@) doesn't respond to @selector(waitForMapWithError:)", api); + NSCAssert([api respondsToSelector:@selector(waitForMapWithError:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(waitForMapWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; [api waitForMapWithError:&error]; @@ -2076,13 +2093,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj /// Only non-null configuration values will result in updates; options with /// null values will remain unchanged. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.updateMapConfiguration", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateWithMapConfiguration:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateWithMapConfiguration:error:)", api); + NSCAssert( + [api respondsToSelector:@selector(updateWithMapConfiguration:error:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(updateWithMapConfiguration:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformMapConfiguration *arg_configuration = GetNullableObjectAtIndex(args, 0); @@ -2096,20 +2118,29 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Updates the set of circles on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString + stringWithFormat: + @"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateCirclesByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateCirclesByAdding:changing:removing:error:)", api); + NSCAssert([api respondsToSelector:@selector(updateCirclesByAdding:changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateCirclesByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateCirclesByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; + [api updateCirclesByAdding:arg_toAdd + changing:arg_toChange + removing:arg_idsToRemove + error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2118,20 +2149,28 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Updates the set of heatmaps on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.updateHeatmaps", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateHeatmapsByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateHeatmapsByAdding:changing:removing:error:)", api); + NSCAssert([api respondsToSelector:@selector(updateHeatmapsByAdding:changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateHeatmapsByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateHeatmapsByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; + [api updateHeatmapsByAdding:arg_toAdd + changing:arg_toChange + removing:arg_idsToRemove + error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2140,13 +2179,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Updates the set of custer managers for clusters on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.updateClusterManagers", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateClusterManagersByAdding:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateClusterManagersByAdding:removing:error:)", api); + NSCAssert([api respondsToSelector:@selector(updateClusterManagersByAdding:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateClusterManagersByAdding:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); @@ -2161,20 +2205,29 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Updates the set of markers on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString + stringWithFormat: + @"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateMarkersByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateMarkersByAdding:changing:removing:error:)", api); + NSCAssert([api respondsToSelector:@selector(updateMarkersByAdding:changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateMarkersByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateMarkersByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; + [api updateMarkersByAdding:arg_toAdd + changing:arg_toChange + removing:arg_idsToRemove + error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2183,20 +2236,28 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Updates the set of polygonss on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.updatePolygons", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updatePolygonsByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updatePolygonsByAdding:changing:removing:error:)", api); + NSCAssert([api respondsToSelector:@selector(updatePolygonsByAdding:changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updatePolygonsByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updatePolygonsByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; + [api updatePolygonsByAdding:arg_toAdd + changing:arg_toChange + removing:arg_idsToRemove + error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2205,20 +2266,29 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Updates the set of polylines on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.updatePolylines", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updatePolylinesByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updatePolylinesByAdding:changing:removing:error:)", api); + NSCAssert([api respondsToSelector:@selector(updatePolylinesByAdding: + changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updatePolylinesByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updatePolylinesByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; + [api updatePolylinesByAdding:arg_toAdd + changing:arg_toChange + removing:arg_idsToRemove + error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2227,20 +2297,29 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Updates the set of tile overlays on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.updateTileOverlays", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateTileOverlaysByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateTileOverlaysByAdding:changing:removing:error:)", api); + NSCAssert([api respondsToSelector:@selector(updateTileOverlaysByAdding: + changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateTileOverlaysByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateTileOverlaysByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; + [api updateTileOverlaysByAdding:arg_toAdd + changing:arg_toChange + removing:arg_idsToRemove + error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2249,20 +2328,29 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Updates the set of ground overlays on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.updateGroundOverlays", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateGroundOverlaysByAdding:changing:removing:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(updateGroundOverlaysByAdding:changing:removing:error:)", api); + NSCAssert([api respondsToSelector:@selector(updateGroundOverlaysByAdding: + changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateGroundOverlaysByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); NSArray *arg_toChange = GetNullableObjectAtIndex(args, 1); NSArray *arg_idsToRemove = GetNullableObjectAtIndex(args, 2); FlutterError *error; - [api updateGroundOverlaysByAdding:arg_toAdd changing:arg_toChange removing:arg_idsToRemove error:&error]; + [api updateGroundOverlaysByAdding:arg_toAdd + changing:arg_toChange + removing:arg_idsToRemove + error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2271,13 +2359,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Gets the screen coordinate for the given map location. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.getScreenCoordinate", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(screenCoordinatesForLatLng:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(screenCoordinatesForLatLng:error:)", api); + NSCAssert( + [api respondsToSelector:@selector(screenCoordinatesForLatLng:error:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(screenCoordinatesForLatLng:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformLatLng *arg_latLng = GetNullableObjectAtIndex(args, 0); @@ -2291,18 +2384,25 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Gets the map location for the given screen coordinate. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName: + [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(latLngForScreenCoordinate:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(latLngForScreenCoordinate:error:)", api); + NSCAssert( + [api respondsToSelector:@selector(latLngForScreenCoordinate:error:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(latLngForScreenCoordinate:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformPoint *arg_screenCoordinate = GetNullableObjectAtIndex(args, 0); FlutterError *error; - FGMPlatformLatLng *output = [api latLngForScreenCoordinate:arg_screenCoordinate error:&error]; + FGMPlatformLatLng *output = [api latLngForScreenCoordinate:arg_screenCoordinate + error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -2311,13 +2411,16 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Gets the map region currently displayed on the map. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.getVisibleRegion", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(visibleMapRegion:)], @"FGMMapsApi api (%@) doesn't respond to @selector(visibleMapRegion:)", api); + NSCAssert([api respondsToSelector:@selector(visibleMapRegion:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(visibleMapRegion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; FGMPlatformLatLngBounds *output = [api visibleMapRegion:&error]; @@ -2330,13 +2433,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString + stringWithFormat: + @"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(moveCameraWithUpdate:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(moveCameraWithUpdate:error:)", api); + NSCAssert([api respondsToSelector:@selector(moveCameraWithUpdate:error:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(moveCameraWithUpdate:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformCameraUpdate *arg_cameraUpdate = GetNullableObjectAtIndex(args, 0); @@ -2351,19 +2459,27 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj /// Moves the camera according to [cameraUpdate], animating the update using a /// duration in milliseconds if provided. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString + stringWithFormat: + @"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(animateCameraWithUpdate:duration:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(animateCameraWithUpdate:duration:error:)", api); + NSCAssert([api respondsToSelector:@selector(animateCameraWithUpdate:duration:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(animateCameraWithUpdate:duration:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformCameraUpdate *arg_cameraUpdate = GetNullableObjectAtIndex(args, 0); NSNumber *arg_durationMilliseconds = GetNullableObjectAtIndex(args, 1); FlutterError *error; - [api animateCameraWithUpdate:arg_cameraUpdate duration:arg_durationMilliseconds error:&error]; + [api animateCameraWithUpdate:arg_cameraUpdate + duration:arg_durationMilliseconds + error:&error]; callback(wrapResult(nil, error)); }]; } else { @@ -2372,13 +2488,17 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Gets the current map zoom level. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString + stringWithFormat: + @"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(currentZoomLevel:)], @"FGMMapsApi api (%@) doesn't respond to @selector(currentZoomLevel:)", api); + NSCAssert([api respondsToSelector:@selector(currentZoomLevel:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(currentZoomLevel:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api currentZoomLevel:&error]; @@ -2390,13 +2510,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Show the info window for the marker with the given ID. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.showInfoWindow", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(showInfoWindowForMarkerWithIdentifier:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(showInfoWindowForMarkerWithIdentifier:error:)", api); + NSCAssert([api respondsToSelector:@selector(showInfoWindowForMarkerWithIdentifier:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(showInfoWindowForMarkerWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_markerId = GetNullableObjectAtIndex(args, 0); @@ -2410,13 +2535,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Hide the info window for the marker with the given ID. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.hideInfoWindow", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(hideInfoWindowForMarkerWithIdentifier:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(hideInfoWindowForMarkerWithIdentifier:error:)", api); + NSCAssert([api respondsToSelector:@selector(hideInfoWindowForMarkerWithIdentifier:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(hideInfoWindowForMarkerWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_markerId = GetNullableObjectAtIndex(args, 0); @@ -2431,18 +2561,25 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj /// Returns true if the marker with the given ID is currently displaying its /// info window. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.isInfoWindowShown", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(isShowingInfoWindowForMarkerWithIdentifier:error:)", api); + NSCAssert([api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier: + error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_markerId = GetNullableObjectAtIndex(args, 0); FlutterError *error; - NSNumber *output = [api isShowingInfoWindowForMarkerWithIdentifier:arg_markerId error:&error]; + NSNumber *output = [api isShowingInfoWindowForMarkerWithIdentifier:arg_markerId + error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -2455,13 +2592,17 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj /// If there was an error setting the style, such as an invalid style string, /// returns the error message. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName: + [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(setStyle:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(setStyle:error:)", api); + NSCAssert([api respondsToSelector:@selector(setStyle:error:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(setStyle:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_style = GetNullableObjectAtIndex(args, 0); @@ -2479,13 +2620,16 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj /// This allows checking asynchronously for initial style failures, as there /// is no way to return failures from map initialization. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.getLastStyleError", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(lastStyleError:)], @"FGMMapsApi api (%@) doesn't respond to @selector(lastStyleError:)", api); + NSCAssert([api respondsToSelector:@selector(lastStyleError:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(lastStyleError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSString *output = [api lastStyleError:&error]; @@ -2497,13 +2641,18 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Clears the cache of tiles previously requseted from the tile provider. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsApi.clearTileCache", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(clearTileCacheForOverlayWithIdentifier:error:)], @"FGMMapsApi api (%@) doesn't respond to @selector(clearTileCacheForOverlayWithIdentifier:error:)", api); + NSCAssert([api respondsToSelector:@selector(clearTileCacheForOverlayWithIdentifier:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(clearTileCacheForOverlayWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_tileOverlayId = GetNullableObjectAtIndex(args, 0); @@ -2517,13 +2666,17 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObj } /// Takes a snapshot of the map and returns its image data. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString + stringWithFormat: + @"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(takeSnapshotWithError:)], @"FGMMapsApi api (%@) doesn't respond to @selector(takeSnapshotWithError:)", api); + NSCAssert([api respondsToSelector:@selector(takeSnapshotWithError:)], + @"FGMMapsApi api (%@) doesn't respond to @selector(takeSnapshotWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; FlutterStandardTypedData *output = [api takeSnapshotWithError:&error]; @@ -2544,354 +2697,475 @@ @implementation FGMMapsCallbackApi - (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger { return [self initWithBinaryMessenger:binaryMessenger messageChannelSuffix:@""]; } -- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger messageChannelSuffix:(nullable NSString*)messageChannelSuffix{ +- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger + messageChannelSuffix:(nullable NSString *)messageChannelSuffix { self = [self init]; if (self) { _binaryMessenger = binaryMessenger; - _messageChannelSuffix = [messageChannelSuffix length] == 0 ? @"" : [NSString stringWithFormat: @".%@", messageChannelSuffix]; + _messageChannelSuffix = [messageChannelSuffix length] == 0 + ? @"" + : [NSString stringWithFormat:@".%@", messageChannelSuffix]; } return self; } - (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + NSString *channelName = [NSString + stringWithFormat: + @"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:nil reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)arg_cameraPosition completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:nil + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)arg_cameraPosition + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[arg_cameraPosition ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[ arg_cameraPosition ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; } - (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:nil reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapAtPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:nil + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapAtPosition:(FGMPlatformLatLng *)arg_position + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[arg_position ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didLongPressAtPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[ arg_position ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didLongPressAtPosition:(FGMPlatformLatLng *)arg_position + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[arg_position ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapMarkerWithIdentifier:(NSString *)arg_markerId completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[ arg_position ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapMarkerWithIdentifier:(NSString *)arg_markerId + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[arg_markerId ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didStartDragForMarkerWithIdentifier:(NSString *)arg_markerId atPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[ arg_markerId ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didStartDragForMarkerWithIdentifier:(NSString *)arg_markerId + atPosition:(FGMPlatformLatLng *)arg_position + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat: + @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[arg_markerId ?: [NSNull null], arg_position ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didDragMarkerWithIdentifier:(NSString *)arg_markerId atPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didDragMarkerWithIdentifier:(NSString *)arg_markerId + atPosition:(FGMPlatformLatLng *)arg_position + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[arg_markerId ?: [NSNull null], arg_position ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didEndDragForMarkerWithIdentifier:(NSString *)arg_markerId atPosition:(FGMPlatformLatLng *)arg_position completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didEndDragForMarkerWithIdentifier:(NSString *)arg_markerId + atPosition:(FGMPlatformLatLng *)arg_position + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat: + @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[arg_markerId ?: [NSNull null], arg_position ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)arg_markerId completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)arg_markerId + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat: + @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[arg_markerId ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapCircleWithIdentifier:(NSString *)arg_circleId completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[ arg_markerId ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapCircleWithIdentifier:(NSString *)arg_circleId + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[arg_circleId ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapCluster:(FGMPlatformCluster *)arg_cluster completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[ arg_circleId ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapCluster:(FGMPlatformCluster *)arg_cluster + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[arg_cluster ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapPolygonWithIdentifier:(NSString *)arg_polygonId completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[ arg_cluster ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapPolygonWithIdentifier:(NSString *)arg_polygonId + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[arg_polygonId ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapPolylineWithIdentifier:(NSString *)arg_polylineId completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[ arg_polygonId ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapPolylineWithIdentifier:(NSString *)arg_polylineId + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[arg_polylineId ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapGroundOverlayWithIdentifier:(NSString *)arg_groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[ arg_polylineId ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapGroundOverlayWithIdentifier:(NSString *)arg_groundOverlayId + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat: + @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[arg_groundOverlayId ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)didTapPointOfInterest:(FGMPlatformPointOfInterest *)arg_poi completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[ arg_groundOverlayId ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)didTapPointOfInterest:(FGMPlatformPointOfInterest *)arg_poi + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[arg_poi ?: [NSNull null]] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} -- (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId location:(FGMPlatformPoint *)arg_location zoom:(NSInteger)arg_zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion { - NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile", _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[ arg_poi ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId + location:(FGMPlatformPoint *)arg_location + zoom:(NSInteger)arg_zoom + completion:(void (^)(FGMPlatformTile *_Nullable, + FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat: + @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[arg_tileOverlayId ?: [NSNull null], arg_location ?: [NSNull null], @(arg_zoom)] reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion(nil, [FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); - } else { - FGMPlatformTile *output = reply[0] == [NSNull null] ? nil : reply[0]; - completion(output, nil); - } - } else { - completion(nil, createConnectionError(channelName)); - } - }]; -} -@end - -void SetUpFGMMapsPlatformViewApi(id binaryMessenger, NSObject *api) { + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[ + arg_tileOverlayId ?: [NSNull null], arg_location ?: [NSNull null], @(arg_zoom) + ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion(nil, [FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + FGMPlatformTile *output = reply[0] == [NSNull null] ? nil : reply[0]; + completion(output, nil); + } + } else { + completion(nil, createConnectionError(channelName)); + } + }]; +} +@end + +void SetUpFGMMapsPlatformViewApi(id binaryMessenger, + NSObject *api) { SetUpFGMMapsPlatformViewApiWithSuffix(binaryMessenger, api, @""); } -void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, NSObject *api, NSString *messageChannelSuffix) { - messageChannelSuffix = messageChannelSuffix.length > 0 ? [NSString stringWithFormat: @".%@", messageChannelSuffix] : @""; +void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, + NSObject *api, + NSString *messageChannelSuffix) { + messageChannelSuffix = messageChannelSuffix.length > 0 + ? [NSString stringWithFormat:@".%@", messageChannelSuffix] + : @""; { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsPlatformViewApi.createView", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(createViewType:error:)], @"FGMMapsPlatformViewApi api (%@) doesn't respond to @selector(createViewType:error:)", api); + NSCAssert( + [api respondsToSelector:@selector(createViewType:error:)], + @"FGMMapsPlatformViewApi api (%@) doesn't respond to @selector(createViewType:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FGMPlatformMapViewCreationParams *arg_type = GetNullableObjectAtIndex(args, 0); @@ -2904,20 +3178,30 @@ void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMess } } } -void SetUpFGMMapsInspectorApi(id binaryMessenger, NSObject *api) { +void SetUpFGMMapsInspectorApi(id binaryMessenger, + NSObject *api) { SetUpFGMMapsInspectorApiWithSuffix(binaryMessenger, api, @""); } -void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, NSObject *api, NSString *messageChannelSuffix) { - messageChannelSuffix = messageChannelSuffix.length > 0 ? [NSString stringWithFormat: @".%@", messageChannelSuffix] : @""; +void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, + NSObject *api, + NSString *messageChannelSuffix) { + messageChannelSuffix = messageChannelSuffix.length > 0 + ? [NSString stringWithFormat:@".%@", messageChannelSuffix] + : @""; { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.areBuildingsEnabled", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areBuildingsEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areBuildingsEnabledWithError:)", api); + NSCAssert([api respondsToSelector:@selector(areBuildingsEnabledWithError:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(areBuildingsEnabledWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areBuildingsEnabledWithError:&error]; @@ -2928,13 +3212,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.areRotateGesturesEnabled", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areRotateGesturesEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areRotateGesturesEnabledWithError:)", api); + NSCAssert([api respondsToSelector:@selector(areRotateGesturesEnabledWithError:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(areRotateGesturesEnabledWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areRotateGesturesEnabledWithError:&error]; @@ -2945,13 +3234,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.areScrollGesturesEnabled", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areScrollGesturesEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areScrollGesturesEnabledWithError:)", api); + NSCAssert([api respondsToSelector:@selector(areScrollGesturesEnabledWithError:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(areScrollGesturesEnabledWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areScrollGesturesEnabledWithError:&error]; @@ -2962,13 +3256,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.areTiltGesturesEnabled", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areTiltGesturesEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areTiltGesturesEnabledWithError:)", api); + NSCAssert([api respondsToSelector:@selector(areTiltGesturesEnabledWithError:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(areTiltGesturesEnabledWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areTiltGesturesEnabledWithError:&error]; @@ -2979,13 +3278,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.areZoomGesturesEnabled", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(areZoomGesturesEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(areZoomGesturesEnabledWithError:)", api); + NSCAssert([api respondsToSelector:@selector(areZoomGesturesEnabledWithError:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(areZoomGesturesEnabledWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api areZoomGesturesEnabledWithError:&error]; @@ -2996,13 +3300,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.isCompassEnabled", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isCompassEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isCompassEnabledWithError:)", api); + NSCAssert( + [api respondsToSelector:@selector(isCompassEnabledWithError:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isCompassEnabledWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isCompassEnabledWithError:&error]; @@ -3013,13 +3322,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.isMyLocationButtonEnabled", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isMyLocationButtonEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isMyLocationButtonEnabledWithError:)", api); + NSCAssert([api respondsToSelector:@selector(isMyLocationButtonEnabledWithError:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(isMyLocationButtonEnabledWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isMyLocationButtonEnabledWithError:&error]; @@ -3030,13 +3344,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.isTrafficEnabled", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isTrafficEnabledWithError:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isTrafficEnabledWithError:)", api); + NSCAssert( + [api respondsToSelector:@selector(isTrafficEnabledWithError:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isTrafficEnabledWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isTrafficEnabledWithError:&error]; @@ -3047,18 +3366,24 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.getTileOverlayInfo", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(tileOverlayWithIdentifier:error:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(tileOverlayWithIdentifier:error:)", api); + NSCAssert([api respondsToSelector:@selector(tileOverlayWithIdentifier:error:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(tileOverlayWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_tileOverlayId = GetNullableObjectAtIndex(args, 0); FlutterError *error; - FGMPlatformTileLayer *output = [api tileOverlayWithIdentifier:arg_tileOverlayId error:&error]; + FGMPlatformTileLayer *output = [api tileOverlayWithIdentifier:arg_tileOverlayId + error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -3066,18 +3391,24 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.getGroundOverlayInfo", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(groundOverlayWithIdentifier:error:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(groundOverlayWithIdentifier:error:)", api); + NSCAssert([api respondsToSelector:@selector(groundOverlayWithIdentifier:error:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(groundOverlayWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_groundOverlayId = GetNullableObjectAtIndex(args, 0); FlutterError *error; - FGMPlatformGroundOverlay *output = [api groundOverlayWithIdentifier:arg_groundOverlayId error:&error]; + FGMPlatformGroundOverlay *output = [api groundOverlayWithIdentifier:arg_groundOverlayId + error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -3085,13 +3416,18 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.getHeatmapInfo", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(heatmapWithIdentifier:error:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(heatmapWithIdentifier:error:)", api); + NSCAssert([api respondsToSelector:@selector(heatmapWithIdentifier:error:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(heatmapWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_heatmapId = GetNullableObjectAtIndex(args, 0); @@ -3104,13 +3440,16 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.getZoomRange", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(zoomRange:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(zoomRange:)", api); + NSCAssert([api respondsToSelector:@selector(zoomRange:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(zoomRange:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; FGMPlatformZoomRange *output = [api zoomRange:&error]; @@ -3121,18 +3460,24 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.getClusters", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(clustersWithIdentifier:error:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(clustersWithIdentifier:error:)", api); + NSCAssert([api respondsToSelector:@selector(clustersWithIdentifier:error:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to " + @"@selector(clustersWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_clusterManagerId = GetNullableObjectAtIndex(args, 0); FlutterError *error; - NSArray *output = [api clustersWithIdentifier:arg_clusterManagerId error:&error]; + NSArray *output = [api clustersWithIdentifier:arg_clusterManagerId + error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -3140,13 +3485,16 @@ void SetUpFGMMapsInspectorApiWithSuffix(id binaryMesseng } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition", messageChannelSuffix] + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios." + @"MapsInspectorApi.getCameraPosition", + messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(cameraPosition:)], @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(cameraPosition:)", api); + NSCAssert([api respondsToSelector:@selector(cameraPosition:)], + @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(cameraPosition:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; FGMPlatformCameraPosition *output = [api cameraPosition:&error]; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h index e52fe5cfa423..310bf163a356 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h @@ -141,7 +141,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition; -@property(nonatomic, strong) FGMPlatformCameraPosition * cameraPosition; +@property(nonatomic, strong) FGMPlatformCameraPosition *cameraPosition; @end /// Pigeon equivalent of NewLatLng @@ -237,19 +237,19 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithHeatmapId:(NSString *)heatmapId - data:(NSArray *)data - gradient:(nullable FGMPlatformHeatmapGradient *)gradient - opacity:(double )opacity - radius:(NSInteger )radius - minimumZoomIntensity:(NSInteger )minimumZoomIntensity - maximumZoomIntensity:(NSInteger )maximumZoomIntensity; -@property(nonatomic, copy) NSString * heatmapId; -@property(nonatomic, copy) NSArray * data; -@property(nonatomic, strong, nullable) FGMPlatformHeatmapGradient * gradient; -@property(nonatomic, assign) double opacity; -@property(nonatomic, assign) NSInteger radius; -@property(nonatomic, assign) NSInteger minimumZoomIntensity; -@property(nonatomic, assign) NSInteger maximumZoomIntensity; + data:(NSArray *)data + gradient:(nullable FGMPlatformHeatmapGradient *)gradient + opacity:(double)opacity + radius:(NSInteger)radius + minimumZoomIntensity:(NSInteger)minimumZoomIntensity + maximumZoomIntensity:(NSInteger)maximumZoomIntensity; +@property(nonatomic, copy) NSString *heatmapId; +@property(nonatomic, copy) NSArray *data; +@property(nonatomic, strong, nullable) FGMPlatformHeatmapGradient *gradient; +@property(nonatomic, assign) double opacity; +@property(nonatomic, assign) NSInteger radius; +@property(nonatomic, assign) NSInteger minimumZoomIntensity; +@property(nonatomic, assign) NSInteger maximumZoomIntensity; @end /// Pigeon equivalent of the HeatmapGradient class. @@ -283,11 +283,11 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithTitle:(nullable NSString *)title - snippet:(nullable NSString *)snippet - anchor:(FGMPlatformPoint *)anchor; -@property(nonatomic, copy, nullable) NSString * title; -@property(nonatomic, copy, nullable) NSString * snippet; -@property(nonatomic, strong) FGMPlatformPoint * anchor; + snippet:(nullable NSString *)snippet + anchor:(FGMPlatformPoint *)anchor; +@property(nonatomic, copy, nullable) NSString *title; +@property(nonatomic, copy, nullable) NSString *snippet; +@property(nonatomic, strong) FGMPlatformPoint *anchor; @end /// Pigeon equivalent of Cluster. @@ -295,13 +295,13 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId - position:(FGMPlatformLatLng *)position - bounds:(FGMPlatformLatLngBounds *)bounds - markerIds:(NSArray *)markerIds; -@property(nonatomic, copy) NSString * clusterManagerId; -@property(nonatomic, strong) FGMPlatformLatLng * position; -@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; -@property(nonatomic, copy) NSArray * markerIds; + position:(FGMPlatformLatLng *)position + bounds:(FGMPlatformLatLngBounds *)bounds + markerIds:(NSArray *)markerIds; +@property(nonatomic, copy) NSString *clusterManagerId; +@property(nonatomic, strong) FGMPlatformLatLng *position; +@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds; +@property(nonatomic, copy) NSArray *markerIds; @end /// Pigeon equivalent of the ClusterManager class. @@ -349,11 +349,11 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithPosition:(FGMPlatformLatLng *)position - name:(NSString *)name - placeId:(NSString *)placeId; -@property(nonatomic, strong) FGMPlatformLatLng * position; -@property(nonatomic, copy) NSString * name; -@property(nonatomic, copy) NSString * placeId; + name:(NSString *)name + placeId:(NSString *)placeId; +@property(nonatomic, strong) FGMPlatformLatLng *position; +@property(nonatomic, copy) NSString *name; +@property(nonatomic, copy) NSString *placeId; @end /// Pigeon equivalent of the Polygon class. @@ -361,25 +361,25 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithPolygonId:(NSString *)polygonId - consumesTapEvents:(BOOL )consumesTapEvents - fillColor:(FGMPlatformColor *)fillColor - geodesic:(BOOL )geodesic - points:(NSArray *)points - holes:(NSArray *> *)holes - visible:(BOOL )visible - strokeColor:(FGMPlatformColor *)strokeColor - strokeWidth:(NSInteger )strokeWidth - zIndex:(NSInteger )zIndex; -@property(nonatomic, copy) NSString * polygonId; -@property(nonatomic, assign) BOOL consumesTapEvents; -@property(nonatomic, strong) FGMPlatformColor * fillColor; -@property(nonatomic, assign) BOOL geodesic; -@property(nonatomic, copy) NSArray * points; -@property(nonatomic, copy) NSArray *> * holes; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, strong) FGMPlatformColor * strokeColor; -@property(nonatomic, assign) NSInteger strokeWidth; -@property(nonatomic, assign) NSInteger zIndex; + consumesTapEvents:(BOOL)consumesTapEvents + fillColor:(FGMPlatformColor *)fillColor + geodesic:(BOOL)geodesic + points:(NSArray *)points + holes:(NSArray *> *)holes + visible:(BOOL)visible + strokeColor:(FGMPlatformColor *)strokeColor + strokeWidth:(NSInteger)strokeWidth + zIndex:(NSInteger)zIndex; +@property(nonatomic, copy) NSString *polygonId; +@property(nonatomic, assign) BOOL consumesTapEvents; +@property(nonatomic, strong) FGMPlatformColor *fillColor; +@property(nonatomic, assign) BOOL geodesic; +@property(nonatomic, copy) NSArray *points; +@property(nonatomic, copy) NSArray *> *holes; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, strong) FGMPlatformColor *strokeColor; +@property(nonatomic, assign) NSInteger strokeWidth; +@property(nonatomic, assign) NSInteger zIndex; @end /// Pigeon equivalent of the Polyline class. @@ -479,9 +479,9 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast - southwest:(FGMPlatformLatLng *)southwest; -@property(nonatomic, strong) FGMPlatformLatLng * northeast; -@property(nonatomic, strong) FGMPlatformLatLng * southwest; + southwest:(FGMPlatformLatLng *)southwest; +@property(nonatomic, strong) FGMPlatformLatLng *northeast; +@property(nonatomic, strong) FGMPlatformLatLng *southwest; @end /// Pigeon equivalent of CameraTargetBounds. @@ -490,7 +490,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// a target, and having an explicitly unbounded target (null [bounds]). @interface FGMPlatformCameraTargetBounds : NSObject + (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds; -@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds; @end /// Pigeon equivalent of the GroundOverlay class. @@ -647,7 +647,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @interface FGMPlatformBitmap : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBitmap:(id )bitmap; ++ (instancetype)makeWithBitmap:(id)bitmap; /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. @@ -655,13 +655,13 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// approach allows for the different bitmap implementations to be valid /// argument and return types of the API methods. See /// https://github.com/flutter/flutter/issues/117819. -@property(nonatomic, strong) id bitmap; +@property(nonatomic, strong) id bitmap; @end /// Pigeon equivalent of [DefaultMarker]. @interface FGMPlatformBitmapDefaultMarker : NSObject + (instancetype)makeWithHue:(nullable NSNumber *)hue; -@property(nonatomic, strong, nullable) NSNumber * hue; +@property(nonatomic, strong, nullable) NSNumber *hue; @end /// Pigeon equivalent of [BytesBitmap]. @@ -689,11 +689,11 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithName:(NSString *)name - scale:(double )scale - size:(nullable FGMPlatformSize *)size; -@property(nonatomic, copy) NSString * name; -@property(nonatomic, assign) double scale; -@property(nonatomic, strong, nullable) FGMPlatformSize * size; + scale:(double)scale + size:(nullable FGMPlatformSize *)size; +@property(nonatomic, copy) NSString *name; +@property(nonatomic, assign) double scale; +@property(nonatomic, strong, nullable) FGMPlatformSize *size; @end /// Pigeon equivalent of [AssetMapBitmap]. @@ -701,15 +701,15 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithAssetName:(NSString *)assetName - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double )imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height; -@property(nonatomic, copy) NSString * assetName; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double)imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height; +@property(nonatomic, copy) NSString *assetName; @property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; -@property(nonatomic, assign) double imagePixelRatio; -@property(nonatomic, strong, nullable) NSNumber * width; -@property(nonatomic, strong, nullable) NSNumber * height; +@property(nonatomic, assign) double imagePixelRatio; +@property(nonatomic, strong, nullable) NSNumber *width; +@property(nonatomic, strong, nullable) NSNumber *height; @end /// Pigeon equivalent of [BytesMapBitmap]. @@ -717,15 +717,15 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double )imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height; -@property(nonatomic, strong) FlutterStandardTypedData * byteData; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double)imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height; +@property(nonatomic, strong) FlutterStandardTypedData *byteData; @property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; -@property(nonatomic, assign) double imagePixelRatio; -@property(nonatomic, strong, nullable) NSNumber * width; -@property(nonatomic, strong, nullable) NSNumber * height; +@property(nonatomic, assign) double imagePixelRatio; +@property(nonatomic, strong, nullable) NSNumber *width; +@property(nonatomic, strong, nullable) NSNumber *height; @end /// The codec used by all APIs. @@ -802,68 +802,96 @@ NSObject *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void); /// is no way to return failures from map initialization. - (nullable NSString *)lastStyleError:(FlutterError *_Nullable *_Nonnull)error; /// Clears the cache of tiles previously requseted from the tile provider. -- (void)clearTileCacheForOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; +- (void)clearTileCacheForOverlayWithIdentifier:(NSString *)tileOverlayId + error:(FlutterError *_Nullable *_Nonnull)error; /// Takes a snapshot of the map and returns its image data. -- (nullable FlutterStandardTypedData *)takeSnapshotWithError:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FlutterStandardTypedData *)takeSnapshotWithError: + (FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsApi(id binaryMessenger, NSObject *_Nullable api); - -extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); +extern void SetUpFGMMapsApi(id binaryMessenger, + NSObject *_Nullable api); +extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, + NSObject *_Nullable api, + NSString *messageChannelSuffix); /// Interface for calls from the native SDK to Dart. @interface FGMMapsCallbackApi : NSObject - (instancetype)initWithBinaryMessenger:(id)binaryMessenger; -- (instancetype)initWithBinaryMessenger:(id)binaryMessenger messageChannelSuffix:(nullable NSString *)messageChannelSuffix; +- (instancetype)initWithBinaryMessenger:(id)binaryMessenger + messageChannelSuffix:(nullable NSString *)messageChannelSuffix; /// Called when the map camera starts moving. - (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map camera moves. -- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map camera stops moving. - (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map, not a specifc map object, is tapped. -- (void)didTapAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapAtPosition:(FGMPlatformLatLng *)position + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map, not a specifc map object, is long pressed. -- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker is tapped. -- (void)didTapMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapMarkerWithIdentifier:(NSString *)markerId + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag starts. -- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId + atPosition:(FGMPlatformLatLng *)position + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag updates. -- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didDragMarkerWithIdentifier:(NSString *)markerId + atPosition:(FGMPlatformLatLng *)position + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag ends. -- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId + atPosition:(FGMPlatformLatLng *)position + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker's info window is tapped. -- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a circle is tapped. -- (void)didTapCircleWithIdentifier:(NSString *)circleId completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapCircleWithIdentifier:(NSString *)circleId + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker cluster is tapped. -- (void)didTapCluster:(FGMPlatformCluster *)cluster completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapCluster:(FGMPlatformCluster *)cluster + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a polygon is tapped. -- (void)didTapPolygonWithIdentifier:(NSString *)polygonId completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPolygonWithIdentifier:(NSString *)polygonId + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a polyline is tapped. -- (void)didTapPolylineWithIdentifier:(NSString *)polylineId completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPolylineWithIdentifier:(NSString *)polylineId + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a ground overlay is tapped. -- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId + completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a point of interest is tapped. -- (void)didTapPointOfInterest:(FGMPlatformPointOfInterest *)poi completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPointOfInterest:(FGMPlatformPointOfInterest *)poi + completion:(void (^)(FlutterError *_Nullable))completion; /// Called to get data for a map tile. -- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId location:(FGMPlatformPoint *)location zoom:(NSInteger)zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion; +- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId + location:(FGMPlatformPoint *)location + zoom:(NSInteger)zoom + completion:(void (^)(FGMPlatformTile *_Nullable, + FlutterError *_Nullable))completion; @end - /// Dummy interface to force generation of the platform view creation params, /// which are not used in any Pigeon calls, only the platform view creation /// call made internally by Flutter. @protocol FGMMapsPlatformViewApi -- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type error:(FlutterError *_Nullable *_Nonnull)error; +- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type + error:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, NSObject *_Nullable api); - -extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); +extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, + NSObject *_Nullable api); +extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, + NSObject *_Nullable api, + NSString *messageChannelSuffix); /// Inspector API only intended for use in integration tests. @protocol FGMMapsInspectorApi diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.orig b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.orig new file mode 100644 index 000000000000..e52fe5cfa423 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.orig @@ -0,0 +1,901 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +@import Foundation; + +@protocol FlutterBinaryMessenger; +@protocol FlutterMessageCodec; +@class FlutterError; +@class FlutterStandardTypedData; + +NS_ASSUME_NONNULL_BEGIN + +/// Pigeon equivalent of MapType +typedef NS_ENUM(NSUInteger, FGMPlatformMapType) { + FGMPlatformMapTypeNone = 0, + FGMPlatformMapTypeNormal = 1, + FGMPlatformMapTypeSatellite = 2, + FGMPlatformMapTypeTerrain = 3, + FGMPlatformMapTypeHybrid = 4, +}; + +/// Wrapper for FGMPlatformMapType to allow for nullability. +@interface FGMPlatformMapTypeBox : NSObject +@property(nonatomic, assign) FGMPlatformMapType value; +- (instancetype)initWithValue:(FGMPlatformMapType)value; +@end + +/// Join types for polyline joints. +typedef NS_ENUM(NSUInteger, FGMPlatformJointType) { + FGMPlatformJointTypeMitered = 0, + FGMPlatformJointTypeBevel = 1, + FGMPlatformJointTypeRound = 2, +}; + +/// Wrapper for FGMPlatformJointType to allow for nullability. +@interface FGMPlatformJointTypeBox : NSObject +@property(nonatomic, assign) FGMPlatformJointType value; +- (instancetype)initWithValue:(FGMPlatformJointType)value; +@end + +/// Enumeration of possible types for PatternItem. +typedef NS_ENUM(NSUInteger, FGMPlatformPatternItemType) { + FGMPlatformPatternItemTypeDot = 0, + FGMPlatformPatternItemTypeDash = 1, + FGMPlatformPatternItemTypeGap = 2, +}; + +/// Wrapper for FGMPlatformPatternItemType to allow for nullability. +@interface FGMPlatformPatternItemTypeBox : NSObject +@property(nonatomic, assign) FGMPlatformPatternItemType value; +- (instancetype)initWithValue:(FGMPlatformPatternItemType)value; +@end + +/// Pigeon equivalent of [MapBitmapScaling]. +typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + FGMPlatformMapBitmapScalingAuto = 0, + FGMPlatformMapBitmapScalingNone = 1, +}; + +/// Wrapper for FGMPlatformMapBitmapScaling to allow for nullability. +@interface FGMPlatformMapBitmapScalingBox : NSObject +@property(nonatomic, assign) FGMPlatformMapBitmapScaling value; +- (instancetype)initWithValue:(FGMPlatformMapBitmapScaling)value; +@end + +@class FGMPlatformCameraPosition; +@class FGMPlatformCameraUpdate; +@class FGMPlatformCameraUpdateNewCameraPosition; +@class FGMPlatformCameraUpdateNewLatLng; +@class FGMPlatformCameraUpdateNewLatLngBounds; +@class FGMPlatformCameraUpdateNewLatLngZoom; +@class FGMPlatformCameraUpdateScrollBy; +@class FGMPlatformCameraUpdateZoomBy; +@class FGMPlatformCameraUpdateZoom; +@class FGMPlatformCameraUpdateZoomTo; +@class FGMPlatformCircle; +@class FGMPlatformHeatmap; +@class FGMPlatformHeatmapGradient; +@class FGMPlatformWeightedLatLng; +@class FGMPlatformInfoWindow; +@class FGMPlatformCluster; +@class FGMPlatformClusterManager; +@class FGMPlatformMarker; +@class FGMPlatformPointOfInterest; +@class FGMPlatformPolygon; +@class FGMPlatformPolyline; +@class FGMPlatformPatternItem; +@class FGMPlatformTile; +@class FGMPlatformTileOverlay; +@class FGMPlatformEdgeInsets; +@class FGMPlatformLatLng; +@class FGMPlatformLatLngBounds; +@class FGMPlatformCameraTargetBounds; +@class FGMPlatformGroundOverlay; +@class FGMPlatformMapViewCreationParams; +@class FGMPlatformMapConfiguration; +@class FGMPlatformPoint; +@class FGMPlatformSize; +@class FGMPlatformColor; +@class FGMPlatformTileLayer; +@class FGMPlatformZoomRange; +@class FGMPlatformBitmap; +@class FGMPlatformBitmapDefaultMarker; +@class FGMPlatformBitmapBytes; +@class FGMPlatformBitmapAsset; +@class FGMPlatformBitmapAssetImage; +@class FGMPlatformBitmapAssetMap; +@class FGMPlatformBitmapBytesMap; + +/// Pigeon representatation of a CameraPosition. +@interface FGMPlatformCameraPosition : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithBearing:(double )bearing + target:(FGMPlatformLatLng *)target + tilt:(double )tilt + zoom:(double )zoom; +@property(nonatomic, assign) double bearing; +@property(nonatomic, strong) FGMPlatformLatLng * target; +@property(nonatomic, assign) double tilt; +@property(nonatomic, assign) double zoom; +@end + +/// Pigeon representation of a CameraUpdate. +@interface FGMPlatformCameraUpdate : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithCameraUpdate:(id )cameraUpdate; +/// This Object must be one of the classes below prefixed with +/// PlatformCameraUpdate. Each such class represents a different type of +/// camera update, and each holds a different set of data, preventing the +/// use of a single unified class. +@property(nonatomic, strong) id cameraUpdate; +@end + +/// Pigeon equivalent of NewCameraPosition +@interface FGMPlatformCameraUpdateNewCameraPosition : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition; +@property(nonatomic, strong) FGMPlatformCameraPosition * cameraPosition; +@end + +/// Pigeon equivalent of NewLatLng +@interface FGMPlatformCameraUpdateNewLatLng : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng; +@property(nonatomic, strong) FGMPlatformLatLng * latLng; +@end + +/// Pigeon equivalent of NewLatLngBounds +@interface FGMPlatformCameraUpdateNewLatLngBounds : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds + padding:(double )padding; +@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, assign) double padding; +@end + +/// Pigeon equivalent of NewLatLngZoom +@interface FGMPlatformCameraUpdateNewLatLngZoom : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng + zoom:(double )zoom; +@property(nonatomic, strong) FGMPlatformLatLng * latLng; +@property(nonatomic, assign) double zoom; +@end + +/// Pigeon equivalent of ScrollBy +@interface FGMPlatformCameraUpdateScrollBy : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithDx:(double )dx + dy:(double )dy; +@property(nonatomic, assign) double dx; +@property(nonatomic, assign) double dy; +@end + +/// Pigeon equivalent of ZoomBy +@interface FGMPlatformCameraUpdateZoomBy : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithAmount:(double )amount + focus:(nullable FGMPlatformPoint *)focus; +@property(nonatomic, assign) double amount; +@property(nonatomic, strong, nullable) FGMPlatformPoint * focus; +@end + +/// Pigeon equivalent of ZoomIn/ZoomOut +@interface FGMPlatformCameraUpdateZoom : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithOut:(BOOL )out; +@property(nonatomic, assign) BOOL out; +@end + +/// Pigeon equivalent of ZoomTo +@interface FGMPlatformCameraUpdateZoomTo : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithZoom:(double )zoom; +@property(nonatomic, assign) double zoom; +@end + +/// Pigeon equivalent of the Circle class. +@interface FGMPlatformCircle : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithConsumeTapEvents:(BOOL )consumeTapEvents + fillColor:(FGMPlatformColor *)fillColor + strokeColor:(FGMPlatformColor *)strokeColor + visible:(BOOL )visible + strokeWidth:(NSInteger )strokeWidth + zIndex:(double )zIndex + center:(FGMPlatformLatLng *)center + radius:(double )radius + circleId:(NSString *)circleId; +@property(nonatomic, assign) BOOL consumeTapEvents; +@property(nonatomic, strong) FGMPlatformColor * fillColor; +@property(nonatomic, strong) FGMPlatformColor * strokeColor; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger strokeWidth; +@property(nonatomic, assign) double zIndex; +@property(nonatomic, strong) FGMPlatformLatLng * center; +@property(nonatomic, assign) double radius; +@property(nonatomic, copy) NSString * circleId; +@end + +/// Pigeon equivalent of the Heatmap class. +@interface FGMPlatformHeatmap : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithHeatmapId:(NSString *)heatmapId + data:(NSArray *)data + gradient:(nullable FGMPlatformHeatmapGradient *)gradient + opacity:(double )opacity + radius:(NSInteger )radius + minimumZoomIntensity:(NSInteger )minimumZoomIntensity + maximumZoomIntensity:(NSInteger )maximumZoomIntensity; +@property(nonatomic, copy) NSString * heatmapId; +@property(nonatomic, copy) NSArray * data; +@property(nonatomic, strong, nullable) FGMPlatformHeatmapGradient * gradient; +@property(nonatomic, assign) double opacity; +@property(nonatomic, assign) NSInteger radius; +@property(nonatomic, assign) NSInteger minimumZoomIntensity; +@property(nonatomic, assign) NSInteger maximumZoomIntensity; +@end + +/// Pigeon equivalent of the HeatmapGradient class. +/// +/// The GMUGradient structure is slightly different from HeatmapGradient, so +/// this matches the iOS API so that conversion can be done on the Dart side +/// where the structures are easier to work with. +@interface FGMPlatformHeatmapGradient : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithColors:(NSArray *)colors + startPoints:(NSArray *)startPoints + colorMapSize:(NSInteger )colorMapSize; +@property(nonatomic, copy) NSArray * colors; +@property(nonatomic, copy) NSArray * startPoints; +@property(nonatomic, assign) NSInteger colorMapSize; +@end + +/// Pigeon equivalent of the WeightedLatLng class. +@interface FGMPlatformWeightedLatLng : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point + weight:(double )weight; +@property(nonatomic, strong) FGMPlatformLatLng * point; +@property(nonatomic, assign) double weight; +@end + +/// Pigeon equivalent of the InfoWindow class. +@interface FGMPlatformInfoWindow : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithTitle:(nullable NSString *)title + snippet:(nullable NSString *)snippet + anchor:(FGMPlatformPoint *)anchor; +@property(nonatomic, copy, nullable) NSString * title; +@property(nonatomic, copy, nullable) NSString * snippet; +@property(nonatomic, strong) FGMPlatformPoint * anchor; +@end + +/// Pigeon equivalent of Cluster. +@interface FGMPlatformCluster : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId + position:(FGMPlatformLatLng *)position + bounds:(FGMPlatformLatLngBounds *)bounds + markerIds:(NSArray *)markerIds; +@property(nonatomic, copy) NSString * clusterManagerId; +@property(nonatomic, strong) FGMPlatformLatLng * position; +@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, copy) NSArray * markerIds; +@end + +/// Pigeon equivalent of the ClusterManager class. +@interface FGMPlatformClusterManager : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithIdentifier:(NSString *)identifier; +@property(nonatomic, copy) NSString * identifier; +@end + +/// Pigeon equivalent of the Marker class. +@interface FGMPlatformMarker : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithAlpha:(double )alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL )consumeTapEvents + draggable:(BOOL )draggable + flat:(BOOL )flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double )rotation + visible:(BOOL )visible + zIndex:(NSInteger )zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId; +@property(nonatomic, assign) double alpha; +@property(nonatomic, strong) FGMPlatformPoint * anchor; +@property(nonatomic, assign) BOOL consumeTapEvents; +@property(nonatomic, assign) BOOL draggable; +@property(nonatomic, assign) BOOL flat; +@property(nonatomic, strong) FGMPlatformBitmap * icon; +@property(nonatomic, strong) FGMPlatformInfoWindow * infoWindow; +@property(nonatomic, strong) FGMPlatformLatLng * position; +@property(nonatomic, assign) double rotation; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, copy) NSString * markerId; +@property(nonatomic, copy, nullable) NSString * clusterManagerId; +@end + +/// Pigeon equivalent of the Point of Interest class. +@interface FGMPlatformPointOfInterest : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithPosition:(FGMPlatformLatLng *)position + name:(NSString *)name + placeId:(NSString *)placeId; +@property(nonatomic, strong) FGMPlatformLatLng * position; +@property(nonatomic, copy) NSString * name; +@property(nonatomic, copy) NSString * placeId; +@end + +/// Pigeon equivalent of the Polygon class. +@interface FGMPlatformPolygon : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithPolygonId:(NSString *)polygonId + consumesTapEvents:(BOOL )consumesTapEvents + fillColor:(FGMPlatformColor *)fillColor + geodesic:(BOOL )geodesic + points:(NSArray *)points + holes:(NSArray *> *)holes + visible:(BOOL )visible + strokeColor:(FGMPlatformColor *)strokeColor + strokeWidth:(NSInteger )strokeWidth + zIndex:(NSInteger )zIndex; +@property(nonatomic, copy) NSString * polygonId; +@property(nonatomic, assign) BOOL consumesTapEvents; +@property(nonatomic, strong) FGMPlatformColor * fillColor; +@property(nonatomic, assign) BOOL geodesic; +@property(nonatomic, copy) NSArray * points; +@property(nonatomic, copy) NSArray *> * holes; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, strong) FGMPlatformColor * strokeColor; +@property(nonatomic, assign) NSInteger strokeWidth; +@property(nonatomic, assign) NSInteger zIndex; +@end + +/// Pigeon equivalent of the Polyline class. +@interface FGMPlatformPolyline : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithPolylineId:(NSString *)polylineId + consumesTapEvents:(BOOL )consumesTapEvents + color:(FGMPlatformColor *)color + geodesic:(BOOL )geodesic + jointType:(FGMPlatformJointType)jointType + patterns:(NSArray *)patterns + points:(NSArray *)points + visible:(BOOL )visible + width:(NSInteger )width + zIndex:(NSInteger )zIndex; +@property(nonatomic, copy) NSString * polylineId; +@property(nonatomic, assign) BOOL consumesTapEvents; +@property(nonatomic, strong) FGMPlatformColor * color; +@property(nonatomic, assign) BOOL geodesic; +/// The joint type. +@property(nonatomic, assign) FGMPlatformJointType jointType; +/// The pattern data, as a list of pattern items. +@property(nonatomic, copy) NSArray * patterns; +@property(nonatomic, copy) NSArray * points; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger width; +@property(nonatomic, assign) NSInteger zIndex; +@end + +/// Pigeon equivalent of the PatternItem class. +@interface FGMPlatformPatternItem : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithType:(FGMPlatformPatternItemType)type + length:(nullable NSNumber *)length; +@property(nonatomic, assign) FGMPlatformPatternItemType type; +@property(nonatomic, strong, nullable) NSNumber * length; +@end + +/// Pigeon equivalent of the Tile class. +@interface FGMPlatformTile : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithWidth:(NSInteger )width + height:(NSInteger )height + data:(nullable FlutterStandardTypedData *)data; +@property(nonatomic, assign) NSInteger width; +@property(nonatomic, assign) NSInteger height; +@property(nonatomic, strong, nullable) FlutterStandardTypedData * data; +@end + +/// Pigeon equivalent of the TileOverlay class. +@interface FGMPlatformTileOverlay : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId + fadeIn:(BOOL )fadeIn + transparency:(double )transparency + zIndex:(NSInteger )zIndex + visible:(BOOL )visible + tileSize:(NSInteger )tileSize; +@property(nonatomic, copy) NSString * tileOverlayId; +@property(nonatomic, assign) BOOL fadeIn; +@property(nonatomic, assign) double transparency; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger tileSize; +@end + +/// Pigeon equivalent of Flutter's EdgeInsets. +@interface FGMPlatformEdgeInsets : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithTop:(double )top + bottom:(double )bottom + left:(double )left + right:(double )right; +@property(nonatomic, assign) double top; +@property(nonatomic, assign) double bottom; +@property(nonatomic, assign) double left; +@property(nonatomic, assign) double right; +@end + +/// Pigeon equivalent of LatLng. +@interface FGMPlatformLatLng : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithLatitude:(double )latitude + longitude:(double )longitude; +@property(nonatomic, assign) double latitude; +@property(nonatomic, assign) double longitude; +@end + +/// Pigeon equivalent of LatLngBounds. +@interface FGMPlatformLatLngBounds : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast + southwest:(FGMPlatformLatLng *)southwest; +@property(nonatomic, strong) FGMPlatformLatLng * northeast; +@property(nonatomic, strong) FGMPlatformLatLng * southwest; +@end + +/// 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]). +@interface FGMPlatformCameraTargetBounds : NSObject ++ (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds; +@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; +@end + +/// Pigeon equivalent of the GroundOverlay class. +@interface FGMPlatformGroundOverlay : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId + image:(FGMPlatformBitmap *)image + position:(nullable FGMPlatformLatLng *)position + bounds:(nullable FGMPlatformLatLngBounds *)bounds + anchor:(nullable FGMPlatformPoint *)anchor + transparency:(double )transparency + bearing:(double )bearing + zIndex:(NSInteger )zIndex + visible:(BOOL )visible + clickable:(BOOL )clickable + zoomLevel:(nullable NSNumber *)zoomLevel; +@property(nonatomic, copy) NSString * groundOverlayId; +@property(nonatomic, strong) FGMPlatformBitmap * image; +@property(nonatomic, strong, nullable) FGMPlatformLatLng * position; +@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, strong, nullable) FGMPlatformPoint * anchor; +@property(nonatomic, assign) double transparency; +@property(nonatomic, assign) double bearing; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) BOOL clickable; +@property(nonatomic, strong, nullable) NSNumber * zoomLevel; +@end + +/// Information passed to the platform view creation. +@interface FGMPlatformMapViewCreationParams : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition + mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration + initialCircles:(NSArray *)initialCircles + initialMarkers:(NSArray *)initialMarkers + initialPolygons:(NSArray *)initialPolygons + initialPolylines:(NSArray *)initialPolylines + initialHeatmaps:(NSArray *)initialHeatmaps + initialTileOverlays:(NSArray *)initialTileOverlays + initialClusterManagers:(NSArray *)initialClusterManagers + initialGroundOverlays:(NSArray *)initialGroundOverlays; +@property(nonatomic, strong) FGMPlatformCameraPosition * initialCameraPosition; +@property(nonatomic, strong) FGMPlatformMapConfiguration * mapConfiguration; +@property(nonatomic, copy) NSArray * initialCircles; +@property(nonatomic, copy) NSArray * initialMarkers; +@property(nonatomic, copy) NSArray * initialPolygons; +@property(nonatomic, copy) NSArray * initialPolylines; +@property(nonatomic, copy) NSArray * initialHeatmaps; +@property(nonatomic, copy) NSArray * initialTileOverlays; +@property(nonatomic, copy) NSArray * initialClusterManagers; +@property(nonatomic, copy) NSArray * initialGroundOverlays; +@end + +/// Pigeon equivalent of MapConfiguration. +@interface FGMPlatformMapConfiguration : NSObject ++ (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style; +@property(nonatomic, strong, nullable) NSNumber * compassEnabled; +@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds * cameraTargetBounds; +@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox * mapType; +@property(nonatomic, strong, nullable) FGMPlatformZoomRange * minMaxZoomPreference; +@property(nonatomic, strong, nullable) NSNumber * rotateGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * scrollGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * tiltGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * trackCameraPosition; +@property(nonatomic, strong, nullable) NSNumber * zoomGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * myLocationEnabled; +@property(nonatomic, strong, nullable) NSNumber * myLocationButtonEnabled; +@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets * padding; +@property(nonatomic, strong, nullable) NSNumber * indoorViewEnabled; +@property(nonatomic, strong, nullable) NSNumber * trafficEnabled; +@property(nonatomic, strong, nullable) NSNumber * buildingsEnabled; +@property(nonatomic, copy, nullable) NSString * mapId; +@property(nonatomic, copy, nullable) NSString * style; +@end + +/// Pigeon representation of an x,y coordinate. +@interface FGMPlatformPoint : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithX:(double )x + y:(double )y; +@property(nonatomic, assign) double x; +@property(nonatomic, assign) double y; +@end + +/// Pigeon representation of a size. +@interface FGMPlatformSize : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithWidth:(double )width + height:(double )height; +@property(nonatomic, assign) double width; +@property(nonatomic, assign) double height; +@end + +/// Pigeon representation of a color. +@interface FGMPlatformColor : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithRed:(double )red + green:(double )green + blue:(double )blue + alpha:(double )alpha; +@property(nonatomic, assign) double red; +@property(nonatomic, assign) double green; +@property(nonatomic, assign) double blue; +@property(nonatomic, assign) double alpha; +@end + +/// Pigeon equivalent of GMSTileLayer properties. +@interface FGMPlatformTileLayer : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithVisible:(BOOL )visible + fadeIn:(BOOL )fadeIn + opacity:(double )opacity + zIndex:(NSInteger )zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) BOOL fadeIn; +@property(nonatomic, assign) double opacity; +@property(nonatomic, assign) NSInteger zIndex; +@end + +/// Pigeon equivalent of MinMaxZoomPreference. +@interface FGMPlatformZoomRange : NSObject ++ (instancetype)makeWithMin:(nullable NSNumber *)min + max:(nullable NSNumber *)max; +@property(nonatomic, strong, nullable) NSNumber * min; +@property(nonatomic, strong, nullable) NSNumber * max; +@end + +/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint +/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which +/// may hold the pigeon equivalent type of any of them. +@interface FGMPlatformBitmap : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithBitmap:(id )bitmap; +/// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], +/// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], +/// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. +/// As Pigeon does not currently support data class inheritance, this +/// approach allows for the different bitmap implementations to be valid +/// argument and return types of the API methods. See +/// https://github.com/flutter/flutter/issues/117819. +@property(nonatomic, strong) id bitmap; +@end + +/// Pigeon equivalent of [DefaultMarker]. +@interface FGMPlatformBitmapDefaultMarker : NSObject ++ (instancetype)makeWithHue:(nullable NSNumber *)hue; +@property(nonatomic, strong, nullable) NSNumber * hue; +@end + +/// Pigeon equivalent of [BytesBitmap]. +@interface FGMPlatformBitmapBytes : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData + size:(nullable FGMPlatformSize *)size; +@property(nonatomic, strong) FlutterStandardTypedData * byteData; +@property(nonatomic, strong, nullable) FGMPlatformSize * size; +@end + +/// Pigeon equivalent of [AssetBitmap]. +@interface FGMPlatformBitmapAsset : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithName:(NSString *)name + pkg:(nullable NSString *)pkg; +@property(nonatomic, copy) NSString * name; +@property(nonatomic, copy, nullable) NSString * pkg; +@end + +/// Pigeon equivalent of [AssetImageBitmap]. +@interface FGMPlatformBitmapAssetImage : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithName:(NSString *)name + scale:(double )scale + size:(nullable FGMPlatformSize *)size; +@property(nonatomic, copy) NSString * name; +@property(nonatomic, assign) double scale; +@property(nonatomic, strong, nullable) FGMPlatformSize * size; +@end + +/// Pigeon equivalent of [AssetMapBitmap]. +@interface FGMPlatformBitmapAssetMap : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithAssetName:(NSString *)assetName + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double )imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height; +@property(nonatomic, copy) NSString * assetName; +@property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; +@property(nonatomic, assign) double imagePixelRatio; +@property(nonatomic, strong, nullable) NSNumber * width; +@property(nonatomic, strong, nullable) NSNumber * height; +@end + +/// Pigeon equivalent of [BytesMapBitmap]. +@interface FGMPlatformBitmapBytesMap : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double )imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height; +@property(nonatomic, strong) FlutterStandardTypedData * byteData; +@property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; +@property(nonatomic, assign) double imagePixelRatio; +@property(nonatomic, strong, nullable) NSNumber * width; +@property(nonatomic, strong, nullable) NSNumber * height; +@end + +/// The codec used by all APIs. +NSObject *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void); + +/// Interface for non-test interactions with the native SDK. +/// +/// For test-only state queries, see [MapsInspectorApi]. +@protocol FGMMapsApi +/// Returns once the map instance is available. +- (void)waitForMapWithError:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the map's configuration options. +/// +/// Only non-null configuration values will result in updates; options with +/// null values will remain unchanged. +- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration error:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the set of circles on the map. +- (void)updateCirclesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the set of heatmaps on the map. +- (void)updateHeatmapsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the set of custer managers for clusters on the map. +- (void)updateClusterManagersByAdding:(NSArray *)toAdd removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the set of markers on the map. +- (void)updateMarkersByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the set of polygonss on the map. +- (void)updatePolygonsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the set of polylines on the map. +- (void)updatePolylinesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the set of tile overlays on the map. +- (void)updateTileOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the set of ground overlays on the map. +- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +/// Gets the screen coordinate for the given map location. +/// +/// @return `nil` only when `error != nil`. +- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng error:(FlutterError *_Nullable *_Nonnull)error; +/// Gets the map location for the given screen coordinate. +/// +/// @return `nil` only when `error != nil`. +- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate error:(FlutterError *_Nullable *_Nonnull)error; +/// Gets the map region currently displayed on the map. +/// +/// @return `nil` only when `error != nil`. +- (nullable FGMPlatformLatLngBounds *)visibleMapRegion:(FlutterError *_Nullable *_Nonnull)error; +/// Moves the camera according to [cameraUpdate] immediately, with no +/// animation. +- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate error:(FlutterError *_Nullable *_Nonnull)error; +/// Moves the camera according to [cameraUpdate], animating the update using a +/// duration in milliseconds if provided. +- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate duration:(nullable NSNumber *)durationMilliseconds error:(FlutterError *_Nullable *_Nonnull)error; +/// Gets the current map zoom level. +/// +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)currentZoomLevel:(FlutterError *_Nullable *_Nonnull)error; +/// Show the info window for the marker with the given ID. +- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; +/// Hide the info window for the marker with the given ID. +- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; +/// Returns true if the marker with the given ID is currently displaying its +/// info window. +/// +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; +/// Sets the style to the given map style string, where an empty string +/// indicates that the style should be cleared. +/// +/// If there was an error setting the style, such as an invalid style string, +/// returns the error message. +- (nullable NSString *)setStyle:(NSString *)style error:(FlutterError *_Nullable *_Nonnull)error; +/// Returns the error string from the last attempt to set the map style, if +/// any. +/// +/// This allows checking asynchronously for initial style failures, as there +/// is no way to return failures from map initialization. +- (nullable NSString *)lastStyleError:(FlutterError *_Nullable *_Nonnull)error; +/// Clears the cache of tiles previously requseted from the tile provider. +- (void)clearTileCacheForOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; +/// Takes a snapshot of the map and returns its image data. +- (nullable FlutterStandardTypedData *)takeSnapshotWithError:(FlutterError *_Nullable *_Nonnull)error; +@end + +extern void SetUpFGMMapsApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); + + +/// Interface for calls from the native SDK to Dart. +@interface FGMMapsCallbackApi : NSObject +- (instancetype)initWithBinaryMessenger:(id)binaryMessenger; +- (instancetype)initWithBinaryMessenger:(id)binaryMessenger messageChannelSuffix:(nullable NSString *)messageChannelSuffix; +/// Called when the map camera starts moving. +- (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion; +/// Called when the map camera moves. +- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when the map camera stops moving. +- (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion; +/// Called when the map, not a specifc map object, is tapped. +- (void)didTapAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when the map, not a specifc map object, is long pressed. +- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a marker is tapped. +- (void)didTapMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a marker drag starts. +- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a marker drag updates. +- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a marker drag ends. +- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a marker's info window is tapped. +- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a circle is tapped. +- (void)didTapCircleWithIdentifier:(NSString *)circleId completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a marker cluster is tapped. +- (void)didTapCluster:(FGMPlatformCluster *)cluster completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a polygon is tapped. +- (void)didTapPolygonWithIdentifier:(NSString *)polygonId completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a polyline is tapped. +- (void)didTapPolylineWithIdentifier:(NSString *)polylineId completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a ground overlay is tapped. +- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a point of interest is tapped. +- (void)didTapPointOfInterest:(FGMPlatformPointOfInterest *)poi completion:(void (^)(FlutterError *_Nullable))completion; +/// Called to get data for a map tile. +- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId location:(FGMPlatformPoint *)location zoom:(NSInteger)zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion; +@end + + +/// Dummy interface to force generation of the platform view creation params, +/// which are not used in any Pigeon calls, only the platform view creation +/// call made internally by Flutter. +@protocol FGMMapsPlatformViewApi +- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type error:(FlutterError *_Nullable *_Nonnull)error; +@end + +extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); + + +/// Inspector API only intended for use in integration tests. +@protocol FGMMapsInspectorApi +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)areBuildingsEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)areRotateGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)areScrollGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)areTiltGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)areZoomGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)isCompassEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)isMyLocationButtonEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)isTrafficEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformGroundOverlay *)groundOverlayWithIdentifier:(NSString *)groundOverlayId error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId error:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable FGMPlatformZoomRange *)zoomRange:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSArray *)clustersWithIdentifier:(NSString *)clusterManagerId error:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable FGMPlatformCameraPosition *)cameraPosition:(FlutterError *_Nullable *_Nonnull)error; +@end + +extern void SetUpFGMMapsInspectorApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); + +NS_ASSUME_NONNULL_END diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.rej b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.rej new file mode 100644 index 000000000000..2abdb3ac441a --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.rej @@ -0,0 +1,807 @@ +--- packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h ++++ packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h +@@ -114,26 +114,26 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + @interface FGMPlatformCameraPosition : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithBearing:(double )bearing +- target:(FGMPlatformLatLng *)target +- tilt:(double )tilt +- zoom:(double )zoom; +-@property(nonatomic, assign) double bearing; +-@property(nonatomic, strong) FGMPlatformLatLng * target; +-@property(nonatomic, assign) double tilt; +-@property(nonatomic, assign) double zoom; +++ (instancetype)makeWithBearing:(double)bearing ++ target:(FGMPlatformLatLng *)target ++ tilt:(double)tilt ++ zoom:(double)zoom; ++@property(nonatomic, assign) double bearing; ++@property(nonatomic, strong) FGMPlatformLatLng *target; ++@property(nonatomic, assign) double tilt; ++@property(nonatomic, assign) double zoom; + @end + + /// Pigeon representation of a CameraUpdate. + @interface FGMPlatformCameraUpdate : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithCameraUpdate:(id )cameraUpdate; +++ (instancetype)makeWithCameraUpdate:(id)cameraUpdate; + /// This Object must be one of the classes below prefixed with + /// PlatformCameraUpdate. Each such class represents a different type of + /// camera update, and each holds a different set of data, preventing the + /// use of a single unified class. +-@property(nonatomic, strong) id cameraUpdate; ++@property(nonatomic, strong) id cameraUpdate; + @end + + /// Pigeon equivalent of NewCameraPosition +@@ -149,87 +149,83 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; + + (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng; +-@property(nonatomic, strong) FGMPlatformLatLng * latLng; ++@property(nonatomic, strong) FGMPlatformLatLng *latLng; + @end + + /// Pigeon equivalent of NewLatLngBounds + @interface FGMPlatformCameraUpdateNewLatLngBounds : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds +- padding:(double )padding; +-@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; +-@property(nonatomic, assign) double padding; +++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding; ++@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds; ++@property(nonatomic, assign) double padding; + @end + + /// Pigeon equivalent of NewLatLngZoom + @interface FGMPlatformCameraUpdateNewLatLngZoom : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng +- zoom:(double )zoom; +-@property(nonatomic, strong) FGMPlatformLatLng * latLng; +-@property(nonatomic, assign) double zoom; +++ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom; ++@property(nonatomic, strong) FGMPlatformLatLng *latLng; ++@property(nonatomic, assign) double zoom; + @end + + /// Pigeon equivalent of ScrollBy + @interface FGMPlatformCameraUpdateScrollBy : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithDx:(double )dx +- dy:(double )dy; +-@property(nonatomic, assign) double dx; +-@property(nonatomic, assign) double dy; +++ (instancetype)makeWithDx:(double)dx dy:(double)dy; ++@property(nonatomic, assign) double dx; ++@property(nonatomic, assign) double dy; + @end + + /// Pigeon equivalent of ZoomBy + @interface FGMPlatformCameraUpdateZoomBy : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithAmount:(double )amount +- focus:(nullable FGMPlatformPoint *)focus; +-@property(nonatomic, assign) double amount; +-@property(nonatomic, strong, nullable) FGMPlatformPoint * focus; +++ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus; ++@property(nonatomic, assign) double amount; ++@property(nonatomic, strong, nullable) FGMPlatformPoint *focus; + @end + + /// Pigeon equivalent of ZoomIn/ZoomOut + @interface FGMPlatformCameraUpdateZoom : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithOut:(BOOL )out; +-@property(nonatomic, assign) BOOL out; +++ (instancetype)makeWithOut:(BOOL)out; ++@property(nonatomic, assign) BOOL out; + @end + + /// Pigeon equivalent of ZoomTo + @interface FGMPlatformCameraUpdateZoomTo : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithZoom:(double )zoom; +-@property(nonatomic, assign) double zoom; +++ (instancetype)makeWithZoom:(double)zoom; ++@property(nonatomic, assign) double zoom; + @end + + /// Pigeon equivalent of the Circle class. + @interface FGMPlatformCircle : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithConsumeTapEvents:(BOOL )consumeTapEvents +- fillColor:(FGMPlatformColor *)fillColor +- strokeColor:(FGMPlatformColor *)strokeColor +- visible:(BOOL )visible +- strokeWidth:(NSInteger )strokeWidth +- zIndex:(double )zIndex +- center:(FGMPlatformLatLng *)center +- radius:(double )radius +- circleId:(NSString *)circleId; +-@property(nonatomic, assign) BOOL consumeTapEvents; +-@property(nonatomic, strong) FGMPlatformColor * fillColor; +-@property(nonatomic, strong) FGMPlatformColor * strokeColor; +-@property(nonatomic, assign) BOOL visible; +-@property(nonatomic, assign) NSInteger strokeWidth; +-@property(nonatomic, assign) double zIndex; +-@property(nonatomic, strong) FGMPlatformLatLng * center; +-@property(nonatomic, assign) double radius; +-@property(nonatomic, copy) NSString * circleId; +++ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents ++ fillColor:(FGMPlatformColor *)fillColor ++ strokeColor:(FGMPlatformColor *)strokeColor ++ visible:(BOOL)visible ++ strokeWidth:(NSInteger)strokeWidth ++ zIndex:(double)zIndex ++ center:(FGMPlatformLatLng *)center ++ radius:(double)radius ++ circleId:(NSString *)circleId; ++@property(nonatomic, assign) BOOL consumeTapEvents; ++@property(nonatomic, strong) FGMPlatformColor *fillColor; ++@property(nonatomic, strong) FGMPlatformColor *strokeColor; ++@property(nonatomic, assign) BOOL visible; ++@property(nonatomic, assign) NSInteger strokeWidth; ++@property(nonatomic, assign) double zIndex; ++@property(nonatomic, strong) FGMPlatformLatLng *center; ++@property(nonatomic, assign) double radius; ++@property(nonatomic, copy) NSString *circleId; + @end + + /// Pigeon equivalent of the Heatmap class. +@@ -261,21 +257,20 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; + + (instancetype)makeWithColors:(NSArray *)colors +- startPoints:(NSArray *)startPoints +- colorMapSize:(NSInteger )colorMapSize; +-@property(nonatomic, copy) NSArray * colors; +-@property(nonatomic, copy) NSArray * startPoints; +-@property(nonatomic, assign) NSInteger colorMapSize; ++ startPoints:(NSArray *)startPoints ++ colorMapSize:(NSInteger)colorMapSize; ++@property(nonatomic, copy) NSArray *colors; ++@property(nonatomic, copy) NSArray *startPoints; ++@property(nonatomic, assign) NSInteger colorMapSize; + @end + + /// Pigeon equivalent of the WeightedLatLng class. + @interface FGMPlatformWeightedLatLng : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point +- weight:(double )weight; +-@property(nonatomic, strong) FGMPlatformLatLng * point; +-@property(nonatomic, assign) double weight; +++ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point weight:(double)weight; ++@property(nonatomic, strong) FGMPlatformLatLng *point; ++@property(nonatomic, assign) double weight; + @end + + /// Pigeon equivalent of the InfoWindow class. +@@ -309,39 +304,39 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; + + (instancetype)makeWithIdentifier:(NSString *)identifier; +-@property(nonatomic, copy) NSString * identifier; ++@property(nonatomic, copy) NSString *identifier; + @end + + /// Pigeon equivalent of the Marker class. + @interface FGMPlatformMarker : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithAlpha:(double )alpha +- anchor:(FGMPlatformPoint *)anchor +- consumeTapEvents:(BOOL )consumeTapEvents +- draggable:(BOOL )draggable +- flat:(BOOL )flat +- icon:(FGMPlatformBitmap *)icon +- infoWindow:(FGMPlatformInfoWindow *)infoWindow +- position:(FGMPlatformLatLng *)position +- rotation:(double )rotation +- visible:(BOOL )visible +- zIndex:(NSInteger )zIndex +- markerId:(NSString *)markerId +- clusterManagerId:(nullable NSString *)clusterManagerId; +-@property(nonatomic, assign) double alpha; +-@property(nonatomic, strong) FGMPlatformPoint * anchor; +-@property(nonatomic, assign) BOOL consumeTapEvents; +-@property(nonatomic, assign) BOOL draggable; +-@property(nonatomic, assign) BOOL flat; +-@property(nonatomic, strong) FGMPlatformBitmap * icon; +-@property(nonatomic, strong) FGMPlatformInfoWindow * infoWindow; +-@property(nonatomic, strong) FGMPlatformLatLng * position; +-@property(nonatomic, assign) double rotation; +-@property(nonatomic, assign) BOOL visible; +-@property(nonatomic, assign) NSInteger zIndex; +-@property(nonatomic, copy) NSString * markerId; +-@property(nonatomic, copy, nullable) NSString * clusterManagerId; +++ (instancetype)makeWithAlpha:(double)alpha ++ anchor:(FGMPlatformPoint *)anchor ++ consumeTapEvents:(BOOL)consumeTapEvents ++ draggable:(BOOL)draggable ++ flat:(BOOL)flat ++ icon:(FGMPlatformBitmap *)icon ++ infoWindow:(FGMPlatformInfoWindow *)infoWindow ++ position:(FGMPlatformLatLng *)position ++ rotation:(double)rotation ++ visible:(BOOL)visible ++ zIndex:(NSInteger)zIndex ++ markerId:(NSString *)markerId ++ clusterManagerId:(nullable NSString *)clusterManagerId; ++@property(nonatomic, assign) double alpha; ++@property(nonatomic, strong) FGMPlatformPoint *anchor; ++@property(nonatomic, assign) BOOL consumeTapEvents; ++@property(nonatomic, assign) BOOL draggable; ++@property(nonatomic, assign) BOOL flat; ++@property(nonatomic, strong) FGMPlatformBitmap *icon; ++@property(nonatomic, strong) FGMPlatformInfoWindow *infoWindow; ++@property(nonatomic, strong) FGMPlatformLatLng *position; ++@property(nonatomic, assign) double rotation; ++@property(nonatomic, assign) BOOL visible; ++@property(nonatomic, assign) NSInteger zIndex; ++@property(nonatomic, copy) NSString *markerId; ++@property(nonatomic, copy, nullable) NSString *clusterManagerId; + @end + + /// Pigeon equivalent of the Point of Interest class. +@@ -387,49 +382,48 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; + + (instancetype)makeWithPolylineId:(NSString *)polylineId +- consumesTapEvents:(BOOL )consumesTapEvents +- color:(FGMPlatformColor *)color +- geodesic:(BOOL )geodesic +- jointType:(FGMPlatformJointType)jointType +- patterns:(NSArray *)patterns +- points:(NSArray *)points +- visible:(BOOL )visible +- width:(NSInteger )width +- zIndex:(NSInteger )zIndex; +-@property(nonatomic, copy) NSString * polylineId; +-@property(nonatomic, assign) BOOL consumesTapEvents; +-@property(nonatomic, strong) FGMPlatformColor * color; +-@property(nonatomic, assign) BOOL geodesic; ++ consumesTapEvents:(BOOL)consumesTapEvents ++ color:(FGMPlatformColor *)color ++ geodesic:(BOOL)geodesic ++ jointType:(FGMPlatformJointType)jointType ++ patterns:(NSArray *)patterns ++ points:(NSArray *)points ++ visible:(BOOL)visible ++ width:(NSInteger)width ++ zIndex:(NSInteger)zIndex; ++@property(nonatomic, copy) NSString *polylineId; ++@property(nonatomic, assign) BOOL consumesTapEvents; ++@property(nonatomic, strong) FGMPlatformColor *color; ++@property(nonatomic, assign) BOOL geodesic; + /// The joint type. + @property(nonatomic, assign) FGMPlatformJointType jointType; + /// The pattern data, as a list of pattern items. +-@property(nonatomic, copy) NSArray * patterns; +-@property(nonatomic, copy) NSArray * points; +-@property(nonatomic, assign) BOOL visible; +-@property(nonatomic, assign) NSInteger width; +-@property(nonatomic, assign) NSInteger zIndex; ++@property(nonatomic, copy) NSArray *patterns; ++@property(nonatomic, copy) NSArray *points; ++@property(nonatomic, assign) BOOL visible; ++@property(nonatomic, assign) NSInteger width; ++@property(nonatomic, assign) NSInteger zIndex; + @end + + /// Pigeon equivalent of the PatternItem class. + @interface FGMPlatformPatternItem : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type +- length:(nullable NSNumber *)length; +++ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length; + @property(nonatomic, assign) FGMPlatformPatternItemType type; +-@property(nonatomic, strong, nullable) NSNumber * length; ++@property(nonatomic, strong, nullable) NSNumber *length; + @end + + /// Pigeon equivalent of the Tile class. + @interface FGMPlatformTile : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithWidth:(NSInteger )width +- height:(NSInteger )height +- data:(nullable FlutterStandardTypedData *)data; +-@property(nonatomic, assign) NSInteger width; +-@property(nonatomic, assign) NSInteger height; +-@property(nonatomic, strong, nullable) FlutterStandardTypedData * data; +++ (instancetype)makeWithWidth:(NSInteger)width ++ height:(NSInteger)height ++ data:(nullable FlutterStandardTypedData *)data; ++@property(nonatomic, assign) NSInteger width; ++@property(nonatomic, assign) NSInteger height; ++@property(nonatomic, strong, nullable) FlutterStandardTypedData *data; + @end + + /// Pigeon equivalent of the TileOverlay class. +@@ -437,41 +431,37 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; + + (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId +- fadeIn:(BOOL )fadeIn +- transparency:(double )transparency +- zIndex:(NSInteger )zIndex +- visible:(BOOL )visible +- tileSize:(NSInteger )tileSize; +-@property(nonatomic, copy) NSString * tileOverlayId; +-@property(nonatomic, assign) BOOL fadeIn; +-@property(nonatomic, assign) double transparency; +-@property(nonatomic, assign) NSInteger zIndex; +-@property(nonatomic, assign) BOOL visible; +-@property(nonatomic, assign) NSInteger tileSize; ++ fadeIn:(BOOL)fadeIn ++ transparency:(double)transparency ++ zIndex:(NSInteger)zIndex ++ visible:(BOOL)visible ++ tileSize:(NSInteger)tileSize; ++@property(nonatomic, copy) NSString *tileOverlayId; ++@property(nonatomic, assign) BOOL fadeIn; ++@property(nonatomic, assign) double transparency; ++@property(nonatomic, assign) NSInteger zIndex; ++@property(nonatomic, assign) BOOL visible; ++@property(nonatomic, assign) NSInteger tileSize; + @end + + /// Pigeon equivalent of Flutter's EdgeInsets. + @interface FGMPlatformEdgeInsets : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithTop:(double )top +- bottom:(double )bottom +- left:(double )left +- right:(double )right; +-@property(nonatomic, assign) double top; +-@property(nonatomic, assign) double bottom; +-@property(nonatomic, assign) double left; +-@property(nonatomic, assign) double right; +++ (instancetype)makeWithTop:(double)top bottom:(double)bottom left:(double)left right:(double)right; ++@property(nonatomic, assign) double top; ++@property(nonatomic, assign) double bottom; ++@property(nonatomic, assign) double left; ++@property(nonatomic, assign) double right; + @end + + /// Pigeon equivalent of LatLng. + @interface FGMPlatformLatLng : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithLatitude:(double )latitude +- longitude:(double )longitude; +-@property(nonatomic, assign) double latitude; +-@property(nonatomic, assign) double longitude; +++ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude; ++@property(nonatomic, assign) double latitude; ++@property(nonatomic, assign) double longitude; + @end + + /// Pigeon equivalent of LatLngBounds. +@@ -498,147 +488,142 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; + + (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId +- image:(FGMPlatformBitmap *)image +- position:(nullable FGMPlatformLatLng *)position +- bounds:(nullable FGMPlatformLatLngBounds *)bounds +- anchor:(nullable FGMPlatformPoint *)anchor +- transparency:(double )transparency +- bearing:(double )bearing +- zIndex:(NSInteger )zIndex +- visible:(BOOL )visible +- clickable:(BOOL )clickable +- zoomLevel:(nullable NSNumber *)zoomLevel; +-@property(nonatomic, copy) NSString * groundOverlayId; +-@property(nonatomic, strong) FGMPlatformBitmap * image; +-@property(nonatomic, strong, nullable) FGMPlatformLatLng * position; +-@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; +-@property(nonatomic, strong, nullable) FGMPlatformPoint * anchor; +-@property(nonatomic, assign) double transparency; +-@property(nonatomic, assign) double bearing; +-@property(nonatomic, assign) NSInteger zIndex; +-@property(nonatomic, assign) BOOL visible; +-@property(nonatomic, assign) BOOL clickable; +-@property(nonatomic, strong, nullable) NSNumber * zoomLevel; ++ image:(FGMPlatformBitmap *)image ++ position:(nullable FGMPlatformLatLng *)position ++ bounds:(nullable FGMPlatformLatLngBounds *)bounds ++ anchor:(nullable FGMPlatformPoint *)anchor ++ transparency:(double)transparency ++ bearing:(double)bearing ++ zIndex:(NSInteger)zIndex ++ visible:(BOOL)visible ++ clickable:(BOOL)clickable ++ zoomLevel:(nullable NSNumber *)zoomLevel; ++@property(nonatomic, copy) NSString *groundOverlayId; ++@property(nonatomic, strong) FGMPlatformBitmap *image; ++@property(nonatomic, strong, nullable) FGMPlatformLatLng *position; ++@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds; ++@property(nonatomic, strong, nullable) FGMPlatformPoint *anchor; ++@property(nonatomic, assign) double transparency; ++@property(nonatomic, assign) double bearing; ++@property(nonatomic, assign) NSInteger zIndex; ++@property(nonatomic, assign) BOOL visible; ++@property(nonatomic, assign) BOOL clickable; ++@property(nonatomic, strong, nullable) NSNumber *zoomLevel; + @end + + /// Information passed to the platform view creation. + @interface FGMPlatformMapViewCreationParams : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition +- mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration +- initialCircles:(NSArray *)initialCircles +- initialMarkers:(NSArray *)initialMarkers +- initialPolygons:(NSArray *)initialPolygons +- initialPolylines:(NSArray *)initialPolylines +- initialHeatmaps:(NSArray *)initialHeatmaps +- initialTileOverlays:(NSArray *)initialTileOverlays +- initialClusterManagers:(NSArray *)initialClusterManagers +- initialGroundOverlays:(NSArray *)initialGroundOverlays; +-@property(nonatomic, strong) FGMPlatformCameraPosition * initialCameraPosition; +-@property(nonatomic, strong) FGMPlatformMapConfiguration * mapConfiguration; +-@property(nonatomic, copy) NSArray * initialCircles; +-@property(nonatomic, copy) NSArray * initialMarkers; +-@property(nonatomic, copy) NSArray * initialPolygons; +-@property(nonatomic, copy) NSArray * initialPolylines; +-@property(nonatomic, copy) NSArray * initialHeatmaps; +-@property(nonatomic, copy) NSArray * initialTileOverlays; +-@property(nonatomic, copy) NSArray * initialClusterManagers; +-@property(nonatomic, copy) NSArray * initialGroundOverlays; +++ (instancetype) ++ makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition ++ mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration ++ initialCircles:(NSArray *)initialCircles ++ initialMarkers:(NSArray *)initialMarkers ++ initialPolygons:(NSArray *)initialPolygons ++ initialPolylines:(NSArray *)initialPolylines ++ initialHeatmaps:(NSArray *)initialHeatmaps ++ initialTileOverlays:(NSArray *)initialTileOverlays ++ initialClusterManagers:(NSArray *)initialClusterManagers ++ initialGroundOverlays:(NSArray *)initialGroundOverlays; ++@property(nonatomic, strong) FGMPlatformCameraPosition *initialCameraPosition; ++@property(nonatomic, strong) FGMPlatformMapConfiguration *mapConfiguration; ++@property(nonatomic, copy) NSArray *initialCircles; ++@property(nonatomic, copy) NSArray *initialMarkers; ++@property(nonatomic, copy) NSArray *initialPolygons; ++@property(nonatomic, copy) NSArray *initialPolylines; ++@property(nonatomic, copy) NSArray *initialHeatmaps; ++@property(nonatomic, copy) NSArray *initialTileOverlays; ++@property(nonatomic, copy) NSArray *initialClusterManagers; ++@property(nonatomic, copy) NSArray *initialGroundOverlays; + @end + + /// Pigeon equivalent of MapConfiguration. + @interface FGMPlatformMapConfiguration : NSObject + + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled +- cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds +- mapType:(nullable FGMPlatformMapTypeBox *)mapType +- minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference +- rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled +- scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled +- tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled +- trackCameraPosition:(nullable NSNumber *)trackCameraPosition +- zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled +- myLocationEnabled:(nullable NSNumber *)myLocationEnabled +- myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled +- padding:(nullable FGMPlatformEdgeInsets *)padding +- indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled +- trafficEnabled:(nullable NSNumber *)trafficEnabled +- buildingsEnabled:(nullable NSNumber *)buildingsEnabled +- mapId:(nullable NSString *)mapId +- style:(nullable NSString *)style; +-@property(nonatomic, strong, nullable) NSNumber * compassEnabled; +-@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds * cameraTargetBounds; +-@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox * mapType; +-@property(nonatomic, strong, nullable) FGMPlatformZoomRange * minMaxZoomPreference; +-@property(nonatomic, strong, nullable) NSNumber * rotateGesturesEnabled; +-@property(nonatomic, strong, nullable) NSNumber * scrollGesturesEnabled; +-@property(nonatomic, strong, nullable) NSNumber * tiltGesturesEnabled; +-@property(nonatomic, strong, nullable) NSNumber * trackCameraPosition; +-@property(nonatomic, strong, nullable) NSNumber * zoomGesturesEnabled; +-@property(nonatomic, strong, nullable) NSNumber * myLocationEnabled; +-@property(nonatomic, strong, nullable) NSNumber * myLocationButtonEnabled; +-@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets * padding; +-@property(nonatomic, strong, nullable) NSNumber * indoorViewEnabled; +-@property(nonatomic, strong, nullable) NSNumber * trafficEnabled; +-@property(nonatomic, strong, nullable) NSNumber * buildingsEnabled; +-@property(nonatomic, copy, nullable) NSString * mapId; +-@property(nonatomic, copy, nullable) NSString * style; ++ cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds ++ mapType:(nullable FGMPlatformMapTypeBox *)mapType ++ minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference ++ rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled ++ scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled ++ tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled ++ trackCameraPosition:(nullable NSNumber *)trackCameraPosition ++ zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled ++ myLocationEnabled:(nullable NSNumber *)myLocationEnabled ++ myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled ++ padding:(nullable FGMPlatformEdgeInsets *)padding ++ indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled ++ trafficEnabled:(nullable NSNumber *)trafficEnabled ++ buildingsEnabled:(nullable NSNumber *)buildingsEnabled ++ mapId:(nullable NSString *)mapId ++ style:(nullable NSString *)style; ++@property(nonatomic, strong, nullable) NSNumber *compassEnabled; ++@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds *cameraTargetBounds; ++@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox *mapType; ++@property(nonatomic, strong, nullable) FGMPlatformZoomRange *minMaxZoomPreference; ++@property(nonatomic, strong, nullable) NSNumber *rotateGesturesEnabled; ++@property(nonatomic, strong, nullable) NSNumber *scrollGesturesEnabled; ++@property(nonatomic, strong, nullable) NSNumber *tiltGesturesEnabled; ++@property(nonatomic, strong, nullable) NSNumber *trackCameraPosition; ++@property(nonatomic, strong, nullable) NSNumber *zoomGesturesEnabled; ++@property(nonatomic, strong, nullable) NSNumber *myLocationEnabled; ++@property(nonatomic, strong, nullable) NSNumber *myLocationButtonEnabled; ++@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets *padding; ++@property(nonatomic, strong, nullable) NSNumber *indoorViewEnabled; ++@property(nonatomic, strong, nullable) NSNumber *trafficEnabled; ++@property(nonatomic, strong, nullable) NSNumber *buildingsEnabled; ++@property(nonatomic, copy, nullable) NSString *mapId; ++@property(nonatomic, copy, nullable) NSString *style; + @end + + /// Pigeon representation of an x,y coordinate. + @interface FGMPlatformPoint : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithX:(double )x +- y:(double )y; +-@property(nonatomic, assign) double x; +-@property(nonatomic, assign) double y; +++ (instancetype)makeWithX:(double)x y:(double)y; ++@property(nonatomic, assign) double x; ++@property(nonatomic, assign) double y; + @end + + /// Pigeon representation of a size. + @interface FGMPlatformSize : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithWidth:(double )width +- height:(double )height; +-@property(nonatomic, assign) double width; +-@property(nonatomic, assign) double height; +++ (instancetype)makeWithWidth:(double)width height:(double)height; ++@property(nonatomic, assign) double width; ++@property(nonatomic, assign) double height; + @end + + /// Pigeon representation of a color. + @interface FGMPlatformColor : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithRed:(double )red +- green:(double )green +- blue:(double )blue +- alpha:(double )alpha; +-@property(nonatomic, assign) double red; +-@property(nonatomic, assign) double green; +-@property(nonatomic, assign) double blue; +-@property(nonatomic, assign) double alpha; +++ (instancetype)makeWithRed:(double)red green:(double)green blue:(double)blue alpha:(double)alpha; ++@property(nonatomic, assign) double red; ++@property(nonatomic, assign) double green; ++@property(nonatomic, assign) double blue; ++@property(nonatomic, assign) double alpha; + @end + + /// Pigeon equivalent of GMSTileLayer properties. + @interface FGMPlatformTileLayer : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithVisible:(BOOL )visible +- fadeIn:(BOOL )fadeIn +- opacity:(double )opacity +- zIndex:(NSInteger )zIndex; +-@property(nonatomic, assign) BOOL visible; +-@property(nonatomic, assign) BOOL fadeIn; +-@property(nonatomic, assign) double opacity; +-@property(nonatomic, assign) NSInteger zIndex; +++ (instancetype)makeWithVisible:(BOOL)visible ++ fadeIn:(BOOL)fadeIn ++ opacity:(double)opacity ++ zIndex:(NSInteger)zIndex; ++@property(nonatomic, assign) BOOL visible; ++@property(nonatomic, assign) BOOL fadeIn; ++@property(nonatomic, assign) double opacity; ++@property(nonatomic, assign) NSInteger zIndex; + @end + + /// Pigeon equivalent of MinMaxZoomPreference. + @interface FGMPlatformZoomRange : NSObject +-+ (instancetype)makeWithMin:(nullable NSNumber *)min +- max:(nullable NSNumber *)max; +-@property(nonatomic, strong, nullable) NSNumber * min; +-@property(nonatomic, strong, nullable) NSNumber * max; +++ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max; ++@property(nonatomic, strong, nullable) NSNumber *min; ++@property(nonatomic, strong, nullable) NSNumber *max; + @end + + /// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint +@@ -669,19 +654,18 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; + + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData +- size:(nullable FGMPlatformSize *)size; +-@property(nonatomic, strong) FlutterStandardTypedData * byteData; +-@property(nonatomic, strong, nullable) FGMPlatformSize * size; ++ size:(nullable FGMPlatformSize *)size; ++@property(nonatomic, strong) FlutterStandardTypedData *byteData; ++@property(nonatomic, strong, nullable) FGMPlatformSize *size; + @end + + /// Pigeon equivalent of [AssetBitmap]. + @interface FGMPlatformBitmapAsset : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithName:(NSString *)name +- pkg:(nullable NSString *)pkg; +-@property(nonatomic, copy) NSString * name; +-@property(nonatomic, copy, nullable) NSString * pkg; +++ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg; ++@property(nonatomic, copy) NSString *name; ++@property(nonatomic, copy, nullable) NSString *pkg; + @end + + /// Pigeon equivalent of [AssetImageBitmap]. +@@ -741,54 +725,87 @@ NSObject *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void); + /// + /// Only non-null configuration values will result in updates; options with + /// null values will remain unchanged. +-- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Updates the set of circles on the map. +-- (void)updateCirclesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updateCirclesByAdding:(NSArray *)toAdd ++ changing:(NSArray *)toChange ++ removing:(NSArray *)idsToRemove ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Updates the set of heatmaps on the map. +-- (void)updateHeatmapsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updateHeatmapsByAdding:(NSArray *)toAdd ++ changing:(NSArray *)toChange ++ removing:(NSArray *)idsToRemove ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Updates the set of custer managers for clusters on the map. +-- (void)updateClusterManagersByAdding:(NSArray *)toAdd removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updateClusterManagersByAdding:(NSArray *)toAdd ++ removing:(NSArray *)idsToRemove ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Updates the set of markers on the map. +-- (void)updateMarkersByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updateMarkersByAdding:(NSArray *)toAdd ++ changing:(NSArray *)toChange ++ removing:(NSArray *)idsToRemove ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Updates the set of polygonss on the map. +-- (void)updatePolygonsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updatePolygonsByAdding:(NSArray *)toAdd ++ changing:(NSArray *)toChange ++ removing:(NSArray *)idsToRemove ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Updates the set of polylines on the map. +-- (void)updatePolylinesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updatePolylinesByAdding:(NSArray *)toAdd ++ changing:(NSArray *)toChange ++ removing:(NSArray *)idsToRemove ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Updates the set of tile overlays on the map. +-- (void)updateTileOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updateTileOverlaysByAdding:(NSArray *)toAdd ++ changing:(NSArray *)toChange ++ removing:(NSArray *)idsToRemove ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Updates the set of ground overlays on the map. +-- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd ++ changing:(NSArray *)toChange ++ removing:(NSArray *)idsToRemove ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Gets the screen coordinate for the given map location. + /// + /// @return only when . +-- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng error:(FlutterError *_Nullable *_Nonnull)error; ++- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Gets the map location for the given screen coordinate. + /// + /// @return only when . +-- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate error:(FlutterError *_Nullable *_Nonnull)error; ++- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Gets the map region currently displayed on the map. + /// + /// @return only when . + - (nullable FGMPlatformLatLngBounds *)visibleMapRegion:(FlutterError *_Nullable *_Nonnull)error; + /// Moves the camera according to [cameraUpdate] immediately, with no + /// animation. +-- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Moves the camera according to [cameraUpdate], animating the update using a + /// duration in milliseconds if provided. +-- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate duration:(nullable NSNumber *)durationMilliseconds error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate ++ duration:(nullable NSNumber *)durationMilliseconds ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Gets the current map zoom level. + /// + /// @return only when . + - (nullable NSNumber *)currentZoomLevel:(FlutterError *_Nullable *_Nonnull)error; + /// Show the info window for the marker with the given ID. +-- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Hide the info window for the marker with the given ID. +-- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Returns true if the marker with the given ID is currently displaying its + /// info window. + /// + /// @return only when . +-- (nullable NSNumber *)isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; ++- (nullable NSNumber *) ++ isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Sets the style to the given map style string, where an empty string + /// indicates that the style should be cleared. + /// +@@ -911,19 +956,29 @@ extern void SetUpFGMMapsPlatformViewApiWithSuffix(id bin + - (nullable NSNumber *)isMyLocationButtonEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; + /// @return only when . + - (nullable NSNumber *)isTrafficEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +-- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; +-- (nullable FGMPlatformGroundOverlay *)groundOverlayWithIdentifier:(NSString *)groundOverlayId error:(FlutterError *_Nullable *_Nonnull)error; +-- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId error:(FlutterError *_Nullable *_Nonnull)error; ++- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId ++ error: ++ (FlutterError *_Nullable *_Nonnull)error; ++- (nullable FGMPlatformGroundOverlay *) ++ groundOverlayWithIdentifier:(NSString *)groundOverlayId ++ error:(FlutterError *_Nullable *_Nonnull)error; ++- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// @return only when . + - (nullable FGMPlatformZoomRange *)zoomRange:(FlutterError *_Nullable *_Nonnull)error; + /// @return only when . +-- (nullable NSArray *)clustersWithIdentifier:(NSString *)clusterManagerId error:(FlutterError *_Nullable *_Nonnull)error; ++- (nullable NSArray *) ++ clustersWithIdentifier:(NSString *)clusterManagerId ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// @return only when . + - (nullable FGMPlatformCameraPosition *)cameraPosition:(FlutterError *_Nullable *_Nonnull)error; + @end + +-extern void SetUpFGMMapsInspectorApi(id binaryMessenger, NSObject *_Nullable api); ++extern void SetUpFGMMapsInspectorApi(id binaryMessenger, ++ NSObject *_Nullable api); + +-extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); ++extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, ++ NSObject *_Nullable api, ++ NSString *messageChannelSuffix); + + NS_ASSUME_NONNULL_END diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart index 20c055a57bdc..8862d5668a78 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart @@ -18,7 +18,11 @@ 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 []; } @@ -89,16 +93,12 @@ class PlatformCameraPosition { double zoom; List _toList() { - return [ - bearing, - target, - tilt, - zoom, - ]; + return [bearing, target, tilt, zoom]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraPosition decode(Object result) { result as List; @@ -124,15 +124,12 @@ class PlatformCameraPosition { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon representation of a CameraUpdate. class PlatformCameraUpdate { - PlatformCameraUpdate({ - required this.cameraUpdate, - }); + PlatformCameraUpdate({required this.cameraUpdate}); /// This Object must be one of the classes below prefixed with /// PlatformCameraUpdate. Each such class represents a different type of @@ -141,19 +138,16 @@ class PlatformCameraUpdate { Object cameraUpdate; List _toList() { - return [ - cameraUpdate, - ]; + return [cameraUpdate]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdate decode(Object result) { result as List; - return PlatformCameraUpdate( - cameraUpdate: result[0]!, - ); + return PlatformCameraUpdate(cameraUpdate: result[0]!); } @override @@ -170,26 +164,22 @@ class PlatformCameraUpdate { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of NewCameraPosition class PlatformCameraUpdateNewCameraPosition { - PlatformCameraUpdateNewCameraPosition({ - required this.cameraPosition, - }); + PlatformCameraUpdateNewCameraPosition({required this.cameraPosition}); PlatformCameraPosition cameraPosition; List _toList() { - return [ - cameraPosition, - ]; + return [cameraPosition]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdateNewCameraPosition decode(Object result) { result as List; @@ -201,7 +191,8 @@ class PlatformCameraUpdateNewCameraPosition { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewCameraPosition || other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateNewCameraPosition || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -212,38 +203,33 @@ class PlatformCameraUpdateNewCameraPosition { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of NewLatLng class PlatformCameraUpdateNewLatLng { - PlatformCameraUpdateNewLatLng({ - required this.latLng, - }); + PlatformCameraUpdateNewLatLng({required this.latLng}); PlatformLatLng latLng; List _toList() { - return [ - latLng, - ]; + return [latLng]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdateNewLatLng decode(Object result) { result as List; - return PlatformCameraUpdateNewLatLng( - latLng: result[0]! as PlatformLatLng, - ); + return PlatformCameraUpdateNewLatLng(latLng: result[0]! as PlatformLatLng); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLng || other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateNewLatLng || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -254,8 +240,7 @@ class PlatformCameraUpdateNewLatLng { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of NewLatLngBounds @@ -270,14 +255,12 @@ class PlatformCameraUpdateNewLatLngBounds { double padding; List _toList() { - return [ - bounds, - padding, - ]; + return [bounds, padding]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdateNewLatLngBounds decode(Object result) { result as List; @@ -290,7 +273,8 @@ class PlatformCameraUpdateNewLatLngBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLngBounds || other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateNewLatLngBounds || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -301,30 +285,24 @@ class PlatformCameraUpdateNewLatLngBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of NewLatLngZoom class PlatformCameraUpdateNewLatLngZoom { - PlatformCameraUpdateNewLatLngZoom({ - required this.latLng, - required this.zoom, - }); + PlatformCameraUpdateNewLatLngZoom({required this.latLng, required this.zoom}); PlatformLatLng latLng; double zoom; List _toList() { - return [ - latLng, - zoom, - ]; + return [latLng, zoom]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdateNewLatLngZoom decode(Object result) { result as List; @@ -337,7 +315,8 @@ class PlatformCameraUpdateNewLatLngZoom { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLngZoom || other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateNewLatLngZoom || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -348,30 +327,24 @@ class PlatformCameraUpdateNewLatLngZoom { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of ScrollBy class PlatformCameraUpdateScrollBy { - PlatformCameraUpdateScrollBy({ - required this.dx, - required this.dy, - }); + PlatformCameraUpdateScrollBy({required this.dx, required this.dy}); double dx; double dy; List _toList() { - return [ - dx, - dy, - ]; + return [dx, dy]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdateScrollBy decode(Object result) { result as List; @@ -384,7 +357,8 @@ class PlatformCameraUpdateScrollBy { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateScrollBy || other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateScrollBy || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -395,30 +369,24 @@ class PlatformCameraUpdateScrollBy { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of ZoomBy class PlatformCameraUpdateZoomBy { - PlatformCameraUpdateZoomBy({ - required this.amount, - this.focus, - }); + PlatformCameraUpdateZoomBy({required this.amount, this.focus}); double amount; PlatformPoint? focus; List _toList() { - return [ - amount, - focus, - ]; + return [amount, focus]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdateZoomBy decode(Object result) { result as List; @@ -431,7 +399,8 @@ class PlatformCameraUpdateZoomBy { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoomBy || other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateZoomBy || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -442,38 +411,33 @@ class PlatformCameraUpdateZoomBy { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of ZoomIn/ZoomOut class PlatformCameraUpdateZoom { - PlatformCameraUpdateZoom({ - required this.out, - }); + PlatformCameraUpdateZoom({required this.out}); bool out; List _toList() { - return [ - out, - ]; + return [out]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdateZoom decode(Object result) { result as List; - return PlatformCameraUpdateZoom( - out: result[0]! as bool, - ); + return PlatformCameraUpdateZoom(out: result[0]! as bool); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoom || other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateZoom || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -484,38 +448,33 @@ class PlatformCameraUpdateZoom { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of ZoomTo class PlatformCameraUpdateZoomTo { - PlatformCameraUpdateZoomTo({ - required this.zoom, - }); + PlatformCameraUpdateZoomTo({required this.zoom}); double zoom; List _toList() { - return [ - zoom, - ]; + return [zoom]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraUpdateZoomTo decode(Object result) { result as List; - return PlatformCameraUpdateZoomTo( - zoom: result[0]! as double, - ); + return PlatformCameraUpdateZoomTo(zoom: result[0]! as double); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoomTo || other.runtimeType != runtimeType) { + if (other is! PlatformCameraUpdateZoomTo || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -526,8 +485,7 @@ class PlatformCameraUpdateZoomTo { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Circle class. @@ -577,7 +535,8 @@ class PlatformCircle { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCircle decode(Object result) { result as List; @@ -608,8 +567,7 @@ class PlatformCircle { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Heatmap class. @@ -651,7 +609,8 @@ class PlatformHeatmap { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformHeatmap decode(Object result) { result as List; @@ -680,8 +639,7 @@ class PlatformHeatmap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the HeatmapGradient class. @@ -703,15 +661,12 @@ class PlatformHeatmapGradient { int colorMapSize; List _toList() { - return [ - colors, - startPoints, - colorMapSize, - ]; + return [colors, startPoints, colorMapSize]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformHeatmapGradient decode(Object result) { result as List; @@ -736,30 +691,24 @@ class PlatformHeatmapGradient { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the WeightedLatLng class. class PlatformWeightedLatLng { - PlatformWeightedLatLng({ - required this.point, - required this.weight, - }); + PlatformWeightedLatLng({required this.point, required this.weight}); PlatformLatLng point; double weight; List _toList() { - return [ - point, - weight, - ]; + return [point, weight]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformWeightedLatLng decode(Object result) { result as List; @@ -783,17 +732,12 @@ class PlatformWeightedLatLng { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the InfoWindow class. class PlatformInfoWindow { - PlatformInfoWindow({ - this.title, - this.snippet, - required this.anchor, - }); + PlatformInfoWindow({this.title, this.snippet, required this.anchor}); String? title; @@ -802,15 +746,12 @@ class PlatformInfoWindow { PlatformPoint anchor; List _toList() { - return [ - title, - snippet, - anchor, - ]; + return [title, snippet, anchor]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformInfoWindow decode(Object result) { result as List; @@ -835,8 +776,7 @@ class PlatformInfoWindow { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of Cluster. @@ -857,16 +797,12 @@ class PlatformCluster { List markerIds; List _toList() { - return [ - clusterManagerId, - position, - bounds, - markerIds, - ]; + return [clusterManagerId, position, bounds, markerIds]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCluster decode(Object result) { result as List; @@ -892,32 +828,26 @@ class PlatformCluster { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the ClusterManager class. class PlatformClusterManager { - PlatformClusterManager({ - required this.identifier, - }); + PlatformClusterManager({required this.identifier}); String identifier; List _toList() { - return [ - identifier, - ]; + return [identifier]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformClusterManager decode(Object result) { result as List; - return PlatformClusterManager( - identifier: result[0]! as String, - ); + return PlatformClusterManager(identifier: result[0]! as String); } @override @@ -934,8 +864,7 @@ class PlatformClusterManager { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Marker class. @@ -1001,7 +930,8 @@ class PlatformMarker { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformMarker decode(Object result) { result as List; @@ -1036,8 +966,7 @@ class PlatformMarker { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Point of Interest class. @@ -1055,15 +984,12 @@ class PlatformPointOfInterest { String placeId; List _toList() { - return [ - position, - name, - placeId, - ]; + return [position, name, placeId]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformPointOfInterest decode(Object result) { result as List; @@ -1088,8 +1014,7 @@ class PlatformPointOfInterest { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Polygon class. @@ -1143,7 +1068,8 @@ class PlatformPolygon { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformPolygon decode(Object result) { result as List; @@ -1175,8 +1101,7 @@ class PlatformPolygon { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Polyline class. @@ -1232,7 +1157,8 @@ class PlatformPolyline { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformPolyline decode(Object result) { result as List; @@ -1264,30 +1190,24 @@ class PlatformPolyline { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the PatternItem class. class PlatformPatternItem { - PlatformPatternItem({ - required this.type, - this.length, - }); + PlatformPatternItem({required this.type, this.length}); PlatformPatternItemType type; double? length; List _toList() { - return [ - type, - length, - ]; + return [type, length]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformPatternItem decode(Object result) { result as List; @@ -1311,17 +1231,12 @@ class PlatformPatternItem { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Tile class. class PlatformTile { - PlatformTile({ - required this.width, - required this.height, - this.data, - }); + PlatformTile({required this.width, required this.height, this.data}); int width; @@ -1330,15 +1245,12 @@ class PlatformTile { Uint8List? data; List _toList() { - return [ - width, - height, - data, - ]; + return [width, height, data]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformTile decode(Object result) { result as List; @@ -1363,8 +1275,7 @@ class PlatformTile { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the TileOverlay class. @@ -1402,7 +1313,8 @@ class PlatformTileOverlay { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformTileOverlay decode(Object result) { result as List; @@ -1430,8 +1342,7 @@ class PlatformTileOverlay { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of Flutter's EdgeInsets. @@ -1452,16 +1363,12 @@ class PlatformEdgeInsets { double right; List _toList() { - return [ - top, - bottom, - left, - right, - ]; + return [top, bottom, left, right]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformEdgeInsets decode(Object result) { result as List; @@ -1487,30 +1394,24 @@ class PlatformEdgeInsets { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of LatLng. class PlatformLatLng { - PlatformLatLng({ - required this.latitude, - required this.longitude, - }); + PlatformLatLng({required this.latitude, required this.longitude}); double latitude; double longitude; List _toList() { - return [ - latitude, - longitude, - ]; + return [latitude, longitude]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformLatLng decode(Object result) { result as List; @@ -1534,30 +1435,24 @@ class PlatformLatLng { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of LatLngBounds. class PlatformLatLngBounds { - PlatformLatLngBounds({ - required this.northeast, - required this.southwest, - }); + PlatformLatLngBounds({required this.northeast, required this.southwest}); PlatformLatLng northeast; PlatformLatLng southwest; List _toList() { - return [ - northeast, - southwest, - ]; + return [northeast, southwest]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformLatLngBounds decode(Object result) { result as List; @@ -1581,8 +1476,7 @@ class PlatformLatLngBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of CameraTargetBounds. @@ -1590,20 +1484,17 @@ class PlatformLatLngBounds { /// As with the Dart version, it exists to distinguish between not setting a /// a target, and having an explicitly unbounded target (null [bounds]). class PlatformCameraTargetBounds { - PlatformCameraTargetBounds({ - this.bounds, - }); + PlatformCameraTargetBounds({this.bounds}); PlatformLatLngBounds? bounds; List _toList() { - return [ - bounds, - ]; + return [bounds]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformCameraTargetBounds decode(Object result) { result as List; @@ -1615,7 +1506,8 @@ class PlatformCameraTargetBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformCameraTargetBounds || other.runtimeType != runtimeType) { + if (other is! PlatformCameraTargetBounds || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -1626,8 +1518,7 @@ class PlatformCameraTargetBounds { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the GroundOverlay class. @@ -1685,7 +1576,8 @@ class PlatformGroundOverlay { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformGroundOverlay decode(Object result) { result as List; @@ -1718,8 +1610,7 @@ class PlatformGroundOverlay { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Information passed to the platform view creation. @@ -1773,7 +1664,8 @@ class PlatformMapViewCreationParams { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformMapViewCreationParams decode(Object result) { result as List; @@ -1785,16 +1677,20 @@ class PlatformMapViewCreationParams { initialPolygons: (result[4] as List?)!.cast(), initialPolylines: (result[5] as List?)!.cast(), initialHeatmaps: (result[6] as List?)!.cast(), - initialTileOverlays: (result[7] as List?)!.cast(), - initialClusterManagers: (result[8] as List?)!.cast(), - initialGroundOverlays: (result[9] as List?)!.cast(), + initialTileOverlays: (result[7] as List?)! + .cast(), + initialClusterManagers: (result[8] as List?)! + .cast(), + initialGroundOverlays: (result[9] as List?)! + .cast(), ); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformMapViewCreationParams || other.runtimeType != runtimeType) { + if (other is! PlatformMapViewCreationParams || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -1805,8 +1701,7 @@ class PlatformMapViewCreationParams { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of MapConfiguration. @@ -1888,7 +1783,8 @@ class PlatformMapConfiguration { } Object encode() { - return _toList(); } + return _toList(); + } static PlatformMapConfiguration decode(Object result) { result as List; @@ -1916,7 +1812,8 @@ class PlatformMapConfiguration { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformMapConfiguration || other.runtimeType != runtimeType) { + if (other is! PlatformMapConfiguration || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -1927,37 +1824,28 @@ class PlatformMapConfiguration { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon representation of an x,y coordinate. class PlatformPoint { - PlatformPoint({ - required this.x, - required this.y, - }); + PlatformPoint({required this.x, required this.y}); double x; double y; List _toList() { - return [ - x, - y, - ]; + return [x, y]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformPoint decode(Object result) { result as List; - return PlatformPoint( - x: result[0]! as double, - y: result[1]! as double, - ); + return PlatformPoint(x: result[0]! as double, y: result[1]! as double); } @override @@ -1974,30 +1862,24 @@ class PlatformPoint { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon representation of a size. class PlatformSize { - PlatformSize({ - required this.width, - required this.height, - }); + PlatformSize({required this.width, required this.height}); double width; double height; List _toList() { - return [ - width, - height, - ]; + return [width, height]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformSize decode(Object result) { result as List; @@ -2021,8 +1903,7 @@ class PlatformSize { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon representation of a color. @@ -2043,16 +1924,12 @@ class PlatformColor { double alpha; List _toList() { - return [ - red, - green, - blue, - alpha, - ]; + return [red, green, blue, alpha]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformColor decode(Object result) { result as List; @@ -2078,8 +1955,7 @@ class PlatformColor { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of GMSTileLayer properties. @@ -2100,16 +1976,12 @@ class PlatformTileLayer { int zIndex; List _toList() { - return [ - visible, - fadeIn, - opacity, - zIndex, - ]; + return [visible, fadeIn, opacity, zIndex]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformTileLayer decode(Object result) { result as List; @@ -2135,30 +2007,24 @@ class PlatformTileLayer { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of MinMaxZoomPreference. class PlatformZoomRange { - PlatformZoomRange({ - this.min, - this.max, - }); + PlatformZoomRange({this.min, this.max}); double? min; double? max; List _toList() { - return [ - min, - max, - ]; + return [min, max]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformZoomRange decode(Object result) { result as List; @@ -2182,17 +2048,14 @@ class PlatformZoomRange { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint /// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which /// may hold the pigeon equivalent type of any of them. class PlatformBitmap { - PlatformBitmap({ - required this.bitmap, - }); + PlatformBitmap({required this.bitmap}); /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], @@ -2204,19 +2067,16 @@ class PlatformBitmap { Object bitmap; List _toList() { - return [ - bitmap, - ]; + return [bitmap]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformBitmap decode(Object result) { result as List; - return PlatformBitmap( - bitmap: result[0]!, - ); + return PlatformBitmap(bitmap: result[0]!); } @override @@ -2233,38 +2093,33 @@ class PlatformBitmap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [DefaultMarker]. class PlatformBitmapDefaultMarker { - PlatformBitmapDefaultMarker({ - this.hue, - }); + PlatformBitmapDefaultMarker({this.hue}); double? hue; List _toList() { - return [ - hue, - ]; + return [hue]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformBitmapDefaultMarker decode(Object result) { result as List; - return PlatformBitmapDefaultMarker( - hue: result[0] as double?, - ); + return PlatformBitmapDefaultMarker(hue: result[0] as double?); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformBitmapDefaultMarker || other.runtimeType != runtimeType) { + if (other is! PlatformBitmapDefaultMarker || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -2275,30 +2130,24 @@ class PlatformBitmapDefaultMarker { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [BytesBitmap]. class PlatformBitmapBytes { - PlatformBitmapBytes({ - required this.byteData, - this.size, - }); + PlatformBitmapBytes({required this.byteData, this.size}); Uint8List byteData; PlatformSize? size; List _toList() { - return [ - byteData, - size, - ]; + return [byteData, size]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformBitmapBytes decode(Object result) { result as List; @@ -2322,30 +2171,24 @@ class PlatformBitmapBytes { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [AssetBitmap]. class PlatformBitmapAsset { - PlatformBitmapAsset({ - required this.name, - this.pkg, - }); + PlatformBitmapAsset({required this.name, this.pkg}); String name; String? pkg; List _toList() { - return [ - name, - pkg, - ]; + return [name, pkg]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformBitmapAsset decode(Object result) { result as List; @@ -2369,8 +2212,7 @@ class PlatformBitmapAsset { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [AssetImageBitmap]. @@ -2388,15 +2230,12 @@ class PlatformBitmapAssetImage { PlatformSize? size; List _toList() { - return [ - name, - scale, - size, - ]; + return [name, scale, size]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformBitmapAssetImage decode(Object result) { result as List; @@ -2410,7 +2249,8 @@ class PlatformBitmapAssetImage { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { - if (other is! PlatformBitmapAssetImage || other.runtimeType != runtimeType) { + if (other is! PlatformBitmapAssetImage || + other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { @@ -2421,8 +2261,7 @@ class PlatformBitmapAssetImage { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [AssetMapBitmap]. @@ -2446,17 +2285,12 @@ class PlatformBitmapAssetMap { double? height; List _toList() { - return [ - assetName, - bitmapScaling, - imagePixelRatio, - width, - height, - ]; + return [assetName, bitmapScaling, imagePixelRatio, width, height]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformBitmapAssetMap decode(Object result) { result as List; @@ -2483,8 +2317,7 @@ class PlatformBitmapAssetMap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [BytesMapBitmap]. @@ -2508,17 +2341,12 @@ class PlatformBitmapBytesMap { double? height; List _toList() { - return [ - byteData, - bitmapScaling, - imagePixelRatio, - width, - height, - ]; + return [byteData, bitmapScaling, imagePixelRatio, width, height]; } Object encode() { - return _toList(); } + return _toList(); + } static PlatformBitmapBytesMap decode(Object result) { result as List; @@ -2545,11 +2373,9 @@ class PlatformBitmapBytesMap { @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; + int get hashCode => Object.hashAll(_toList()); } - class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -2557,145 +2383,145 @@ class _PigeonCodec extends StandardMessageCodec { if (value is int) { buffer.putUint8(4); buffer.putInt64(value); - } else if (value is PlatformMapType) { + } else if (value is PlatformMapType) { buffer.putUint8(129); writeValue(buffer, value.index); - } else if (value is PlatformJointType) { + } else if (value is PlatformJointType) { buffer.putUint8(130); writeValue(buffer, value.index); - } else if (value is PlatformPatternItemType) { + } else if (value is PlatformPatternItemType) { buffer.putUint8(131); writeValue(buffer, value.index); - } else if (value is PlatformMapBitmapScaling) { + } else if (value is PlatformMapBitmapScaling) { buffer.putUint8(132); writeValue(buffer, value.index); - } else if (value is PlatformCameraPosition) { + } else if (value is PlatformCameraPosition) { buffer.putUint8(133); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { + } else if (value is PlatformCameraUpdate) { buffer.putUint8(134); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewCameraPosition) { + } else if (value is PlatformCameraUpdateNewCameraPosition) { buffer.putUint8(135); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLng) { + } else if (value is PlatformCameraUpdateNewLatLng) { buffer.putUint8(136); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngBounds) { + } else if (value is PlatformCameraUpdateNewLatLngBounds) { buffer.putUint8(137); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngZoom) { + } else if (value is PlatformCameraUpdateNewLatLngZoom) { buffer.putUint8(138); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateScrollBy) { + } else if (value is PlatformCameraUpdateScrollBy) { buffer.putUint8(139); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomBy) { + } else if (value is PlatformCameraUpdateZoomBy) { buffer.putUint8(140); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoom) { + } else if (value is PlatformCameraUpdateZoom) { buffer.putUint8(141); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomTo) { + } else if (value is PlatformCameraUpdateZoomTo) { buffer.putUint8(142); writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { + } else if (value is PlatformCircle) { buffer.putUint8(143); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { + } else if (value is PlatformHeatmap) { buffer.putUint8(144); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmapGradient) { + } else if (value is PlatformHeatmapGradient) { buffer.putUint8(145); writeValue(buffer, value.encode()); - } else if (value is PlatformWeightedLatLng) { + } else if (value is PlatformWeightedLatLng) { buffer.putUint8(146); writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { + } else if (value is PlatformInfoWindow) { buffer.putUint8(147); writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { + } else if (value is PlatformCluster) { buffer.putUint8(148); writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { + } else if (value is PlatformClusterManager) { buffer.putUint8(149); writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { + } else if (value is PlatformMarker) { buffer.putUint8(150); writeValue(buffer, value.encode()); - } else if (value is PlatformPointOfInterest) { + } else if (value is PlatformPointOfInterest) { buffer.putUint8(151); writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { + } else if (value is PlatformPolygon) { buffer.putUint8(152); writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { + } else if (value is PlatformPolyline) { buffer.putUint8(153); writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { + } else if (value is PlatformPatternItem) { buffer.putUint8(154); writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { + } else if (value is PlatformTile) { buffer.putUint8(155); writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { + } else if (value is PlatformTileOverlay) { buffer.putUint8(156); writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { + } else if (value is PlatformEdgeInsets) { buffer.putUint8(157); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { + } else if (value is PlatformLatLng) { buffer.putUint8(158); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { + } else if (value is PlatformLatLngBounds) { buffer.putUint8(159); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { + } else if (value is PlatformCameraTargetBounds) { buffer.putUint8(160); writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { + } else if (value is PlatformGroundOverlay) { buffer.putUint8(161); writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { + } else if (value is PlatformMapViewCreationParams) { buffer.putUint8(162); writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { + } else if (value is PlatformMapConfiguration) { buffer.putUint8(163); writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { + } else if (value is PlatformPoint) { buffer.putUint8(164); writeValue(buffer, value.encode()); - } else if (value is PlatformSize) { + } else if (value is PlatformSize) { buffer.putUint8(165); writeValue(buffer, value.encode()); - } else if (value is PlatformColor) { + } else if (value is PlatformColor) { buffer.putUint8(166); writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { + } else if (value is PlatformTileLayer) { buffer.putUint8(167); writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { + } else if (value is PlatformZoomRange) { buffer.putUint8(168); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { + } else if (value is PlatformBitmap) { buffer.putUint8(169); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { + } else if (value is PlatformBitmapDefaultMarker) { buffer.putUint8(170); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { + } else if (value is PlatformBitmapBytes) { buffer.putUint8(171); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { + } else if (value is PlatformBitmapAsset) { buffer.putUint8(172); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { + } else if (value is PlatformBitmapAssetImage) { buffer.putUint8(173); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { + } else if (value is PlatformBitmapAssetMap) { buffer.putUint8(174); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { + } else if (value is PlatformBitmapBytesMap) { buffer.putUint8(175); writeValue(buffer, value.encode()); } else { @@ -2706,103 +2532,103 @@ class _PigeonCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 129: + case 129: final value = readValue(buffer) as int?; return value == null ? null : PlatformMapType.values[value]; - case 130: + case 130: final value = readValue(buffer) as int?; return value == null ? null : PlatformJointType.values[value]; - case 131: + case 131: final value = readValue(buffer) as int?; return value == null ? null : PlatformPatternItemType.values[value]; - case 132: + case 132: final value = readValue(buffer) as int?; return value == null ? null : PlatformMapBitmapScaling.values[value]; - case 133: + case 133: return PlatformCameraPosition.decode(readValue(buffer)!); - case 134: + case 134: return PlatformCameraUpdate.decode(readValue(buffer)!); - case 135: + case 135: return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!); - case 136: + case 136: return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!); - case 137: + case 137: return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); - case 138: + case 138: return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); - case 139: + case 139: return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); - case 140: + case 140: return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); - case 141: + case 141: return PlatformCameraUpdateZoom.decode(readValue(buffer)!); - case 142: + case 142: return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); - case 143: + case 143: return PlatformCircle.decode(readValue(buffer)!); - case 144: + case 144: return PlatformHeatmap.decode(readValue(buffer)!); - case 145: + case 145: return PlatformHeatmapGradient.decode(readValue(buffer)!); - case 146: + case 146: return PlatformWeightedLatLng.decode(readValue(buffer)!); - case 147: + case 147: return PlatformInfoWindow.decode(readValue(buffer)!); - case 148: + case 148: return PlatformCluster.decode(readValue(buffer)!); - case 149: + case 149: return PlatformClusterManager.decode(readValue(buffer)!); - case 150: + case 150: return PlatformMarker.decode(readValue(buffer)!); - case 151: + case 151: return PlatformPointOfInterest.decode(readValue(buffer)!); - case 152: + case 152: return PlatformPolygon.decode(readValue(buffer)!); - case 153: + case 153: return PlatformPolyline.decode(readValue(buffer)!); - case 154: + case 154: return PlatformPatternItem.decode(readValue(buffer)!); - case 155: + case 155: return PlatformTile.decode(readValue(buffer)!); - case 156: + case 156: return PlatformTileOverlay.decode(readValue(buffer)!); - case 157: + case 157: return PlatformEdgeInsets.decode(readValue(buffer)!); - case 158: + case 158: return PlatformLatLng.decode(readValue(buffer)!); - case 159: + case 159: return PlatformLatLngBounds.decode(readValue(buffer)!); - case 160: + case 160: return PlatformCameraTargetBounds.decode(readValue(buffer)!); - case 161: + case 161: return PlatformGroundOverlay.decode(readValue(buffer)!); - case 162: + case 162: return PlatformMapViewCreationParams.decode(readValue(buffer)!); - case 163: + case 163: return PlatformMapConfiguration.decode(readValue(buffer)!); - case 164: + case 164: return PlatformPoint.decode(readValue(buffer)!); - case 165: + case 165: return PlatformSize.decode(readValue(buffer)!); - case 166: + case 166: return PlatformColor.decode(readValue(buffer)!); - case 167: + case 167: return PlatformTileLayer.decode(readValue(buffer)!); - case 168: + case 168: return PlatformZoomRange.decode(readValue(buffer)!); - case 169: + case 169: return PlatformBitmap.decode(readValue(buffer)!); - case 170: + case 170: return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); - case 171: + case 171: return PlatformBitmapBytes.decode(readValue(buffer)!); - case 172: + case 172: return PlatformBitmapAsset.decode(readValue(buffer)!); - case 173: + case 173: return PlatformBitmapAssetImage.decode(readValue(buffer)!); - case 174: + case 174: return PlatformBitmapAssetMap.decode(readValue(buffer)!); - case 175: + case 175: return PlatformBitmapBytesMap.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.orig b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.orig new file mode 100644 index 000000000000..20c055a57bdc --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.orig @@ -0,0 +1,4301 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +PlatformException _createConnectionError(String channelName) { + return PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel: "$channelName".', + ); +} + +List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { + if (empty) { + return []; + } + if (error == null) { + return [result]; + } + return [error.code, error.message, error.details]; +} +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed + .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); + } + if (a is Map && b is Map) { + return a.length == b.length && a.entries.every((MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key])); + } + return a == b; +} + + +/// Pigeon equivalent of MapType +enum PlatformMapType { + none, + normal, + satellite, + terrain, + hybrid, +} + +/// Join types for polyline joints. +enum PlatformJointType { + mitered, + bevel, + round, +} + +/// Enumeration of possible types for PatternItem. +enum PlatformPatternItemType { + dot, + dash, + gap, +} + +/// Pigeon equivalent of [MapBitmapScaling]. +enum PlatformMapBitmapScaling { + auto, + none, +} + +/// Pigeon representatation of a CameraPosition. +class PlatformCameraPosition { + PlatformCameraPosition({ + required this.bearing, + required this.target, + required this.tilt, + required this.zoom, + }); + + double bearing; + + PlatformLatLng target; + + double tilt; + + double zoom; + + List _toList() { + return [ + bearing, + target, + tilt, + zoom, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraPosition decode(Object result) { + result as List; + return PlatformCameraPosition( + bearing: result[0]! as double, + target: result[1]! as PlatformLatLng, + tilt: result[2]! as double, + zoom: result[3]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraPosition || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon representation of a CameraUpdate. +class PlatformCameraUpdate { + PlatformCameraUpdate({ + required this.cameraUpdate, + }); + + /// This Object must be one of the classes below prefixed with + /// PlatformCameraUpdate. Each such class represents a different type of + /// camera update, and each holds a different set of data, preventing the + /// use of a single unified class. + Object cameraUpdate; + + List _toList() { + return [ + cameraUpdate, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdate decode(Object result) { + result as List; + return PlatformCameraUpdate( + cameraUpdate: result[0]!, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdate || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of NewCameraPosition +class PlatformCameraUpdateNewCameraPosition { + PlatformCameraUpdateNewCameraPosition({ + required this.cameraPosition, + }); + + PlatformCameraPosition cameraPosition; + + List _toList() { + return [ + cameraPosition, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewCameraPosition decode(Object result) { + result as List; + return PlatformCameraUpdateNewCameraPosition( + cameraPosition: result[0]! as PlatformCameraPosition, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewCameraPosition || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of NewLatLng +class PlatformCameraUpdateNewLatLng { + PlatformCameraUpdateNewLatLng({ + required this.latLng, + }); + + PlatformLatLng latLng; + + List _toList() { + return [ + latLng, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewLatLng decode(Object result) { + result as List; + return PlatformCameraUpdateNewLatLng( + latLng: result[0]! as PlatformLatLng, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLng || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of NewLatLngBounds +class PlatformCameraUpdateNewLatLngBounds { + PlatformCameraUpdateNewLatLngBounds({ + required this.bounds, + required this.padding, + }); + + PlatformLatLngBounds bounds; + + double padding; + + List _toList() { + return [ + bounds, + padding, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewLatLngBounds decode(Object result) { + result as List; + return PlatformCameraUpdateNewLatLngBounds( + bounds: result[0]! as PlatformLatLngBounds, + padding: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLngBounds || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of NewLatLngZoom +class PlatformCameraUpdateNewLatLngZoom { + PlatformCameraUpdateNewLatLngZoom({ + required this.latLng, + required this.zoom, + }); + + PlatformLatLng latLng; + + double zoom; + + List _toList() { + return [ + latLng, + zoom, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewLatLngZoom decode(Object result) { + result as List; + return PlatformCameraUpdateNewLatLngZoom( + latLng: result[0]! as PlatformLatLng, + zoom: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLngZoom || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of ScrollBy +class PlatformCameraUpdateScrollBy { + PlatformCameraUpdateScrollBy({ + required this.dx, + required this.dy, + }); + + double dx; + + double dy; + + List _toList() { + return [ + dx, + dy, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateScrollBy decode(Object result) { + result as List; + return PlatformCameraUpdateScrollBy( + dx: result[0]! as double, + dy: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateScrollBy || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of ZoomBy +class PlatformCameraUpdateZoomBy { + PlatformCameraUpdateZoomBy({ + required this.amount, + this.focus, + }); + + double amount; + + PlatformPoint? focus; + + List _toList() { + return [ + amount, + focus, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateZoomBy decode(Object result) { + result as List; + return PlatformCameraUpdateZoomBy( + amount: result[0]! as double, + focus: result[1] as PlatformPoint?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoomBy || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of ZoomIn/ZoomOut +class PlatformCameraUpdateZoom { + PlatformCameraUpdateZoom({ + required this.out, + }); + + bool out; + + List _toList() { + return [ + out, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateZoom decode(Object result) { + result as List; + return PlatformCameraUpdateZoom( + out: result[0]! as bool, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoom || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of ZoomTo +class PlatformCameraUpdateZoomTo { + PlatformCameraUpdateZoomTo({ + required this.zoom, + }); + + double zoom; + + List _toList() { + return [ + zoom, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateZoomTo decode(Object result) { + result as List; + return PlatformCameraUpdateZoomTo( + zoom: result[0]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoomTo || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Circle class. +class PlatformCircle { + PlatformCircle({ + this.consumeTapEvents = false, + required this.fillColor, + required this.strokeColor, + this.visible = true, + this.strokeWidth = 10, + this.zIndex = 0.0, + required this.center, + this.radius = 0, + required this.circleId, + }); + + bool consumeTapEvents; + + PlatformColor fillColor; + + PlatformColor strokeColor; + + bool visible; + + int strokeWidth; + + double zIndex; + + PlatformLatLng center; + + double radius; + + String circleId; + + List _toList() { + return [ + consumeTapEvents, + fillColor, + strokeColor, + visible, + strokeWidth, + zIndex, + center, + radius, + circleId, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCircle decode(Object result) { + result as List; + return PlatformCircle( + consumeTapEvents: result[0]! as bool, + fillColor: result[1]! as PlatformColor, + strokeColor: result[2]! as PlatformColor, + visible: result[3]! as bool, + strokeWidth: result[4]! as int, + zIndex: result[5]! as double, + center: result[6]! as PlatformLatLng, + radius: result[7]! as double, + circleId: result[8]! as String, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCircle || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Heatmap class. +class PlatformHeatmap { + PlatformHeatmap({ + required this.heatmapId, + required this.data, + this.gradient, + required this.opacity, + required this.radius, + required this.minimumZoomIntensity, + required this.maximumZoomIntensity, + }); + + String heatmapId; + + List data; + + PlatformHeatmapGradient? gradient; + + double opacity; + + int radius; + + int minimumZoomIntensity; + + int maximumZoomIntensity; + + List _toList() { + return [ + heatmapId, + data, + gradient, + opacity, + radius, + minimumZoomIntensity, + maximumZoomIntensity, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformHeatmap decode(Object result) { + result as List; + return PlatformHeatmap( + heatmapId: result[0]! as String, + data: (result[1] as List?)!.cast(), + gradient: result[2] as PlatformHeatmapGradient?, + opacity: result[3]! as double, + radius: result[4]! as int, + minimumZoomIntensity: result[5]! as int, + maximumZoomIntensity: result[6]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformHeatmap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the HeatmapGradient class. +/// +/// The GMUGradient structure is slightly different from HeatmapGradient, so +/// this matches the iOS API so that conversion can be done on the Dart side +/// where the structures are easier to work with. +class PlatformHeatmapGradient { + PlatformHeatmapGradient({ + required this.colors, + required this.startPoints, + required this.colorMapSize, + }); + + List colors; + + List startPoints; + + int colorMapSize; + + List _toList() { + return [ + colors, + startPoints, + colorMapSize, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformHeatmapGradient decode(Object result) { + result as List; + return PlatformHeatmapGradient( + colors: (result[0] as List?)!.cast(), + startPoints: (result[1] as List?)!.cast(), + colorMapSize: result[2]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformHeatmapGradient || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the WeightedLatLng class. +class PlatformWeightedLatLng { + PlatformWeightedLatLng({ + required this.point, + required this.weight, + }); + + PlatformLatLng point; + + double weight; + + List _toList() { + return [ + point, + weight, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformWeightedLatLng decode(Object result) { + result as List; + return PlatformWeightedLatLng( + point: result[0]! as PlatformLatLng, + weight: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformWeightedLatLng || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the InfoWindow class. +class PlatformInfoWindow { + PlatformInfoWindow({ + this.title, + this.snippet, + required this.anchor, + }); + + String? title; + + String? snippet; + + PlatformPoint anchor; + + List _toList() { + return [ + title, + snippet, + anchor, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformInfoWindow decode(Object result) { + result as List; + return PlatformInfoWindow( + title: result[0] as String?, + snippet: result[1] as String?, + anchor: result[2]! as PlatformPoint, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformInfoWindow || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of Cluster. +class PlatformCluster { + PlatformCluster({ + required this.clusterManagerId, + required this.position, + required this.bounds, + required this.markerIds, + }); + + String clusterManagerId; + + PlatformLatLng position; + + PlatformLatLngBounds bounds; + + List markerIds; + + List _toList() { + return [ + clusterManagerId, + position, + bounds, + markerIds, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCluster decode(Object result) { + result as List; + return PlatformCluster( + clusterManagerId: result[0]! as String, + position: result[1]! as PlatformLatLng, + bounds: result[2]! as PlatformLatLngBounds, + markerIds: (result[3] as List?)!.cast(), + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCluster || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the ClusterManager class. +class PlatformClusterManager { + PlatformClusterManager({ + required this.identifier, + }); + + String identifier; + + List _toList() { + return [ + identifier, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformClusterManager decode(Object result) { + result as List; + return PlatformClusterManager( + identifier: result[0]! as String, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformClusterManager || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Marker class. +class PlatformMarker { + PlatformMarker({ + this.alpha = 1.0, + required this.anchor, + this.consumeTapEvents = false, + this.draggable = false, + this.flat = false, + required this.icon, + required this.infoWindow, + required this.position, + this.rotation = 0.0, + this.visible = true, + this.zIndex = 0, + required this.markerId, + this.clusterManagerId, + }); + + double alpha; + + PlatformPoint anchor; + + bool consumeTapEvents; + + bool draggable; + + bool flat; + + PlatformBitmap icon; + + PlatformInfoWindow infoWindow; + + PlatformLatLng position; + + double rotation; + + bool visible; + + int zIndex; + + String markerId; + + String? clusterManagerId; + + List _toList() { + return [ + alpha, + anchor, + consumeTapEvents, + draggable, + flat, + icon, + infoWindow, + position, + rotation, + visible, + zIndex, + markerId, + clusterManagerId, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformMarker decode(Object result) { + result as List; + return PlatformMarker( + alpha: result[0]! as double, + anchor: result[1]! as PlatformPoint, + consumeTapEvents: result[2]! as bool, + draggable: result[3]! as bool, + flat: result[4]! as bool, + icon: result[5]! as PlatformBitmap, + infoWindow: result[6]! as PlatformInfoWindow, + position: result[7]! as PlatformLatLng, + rotation: result[8]! as double, + visible: result[9]! as bool, + zIndex: result[10]! as int, + markerId: result[11]! as String, + clusterManagerId: result[12] as String?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMarker || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Point of Interest class. +class PlatformPointOfInterest { + PlatformPointOfInterest({ + required this.position, + this.name, + required this.placeId, + }); + + PlatformLatLng position; + + String? name; + + String placeId; + + List _toList() { + return [ + position, + name, + placeId, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPointOfInterest decode(Object result) { + result as List; + return PlatformPointOfInterest( + position: result[0]! as PlatformLatLng, + name: result[1]! as String, + placeId: result[2]! as String, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPointOfInterest || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Polygon class. +class PlatformPolygon { + PlatformPolygon({ + required this.polygonId, + required this.consumesTapEvents, + required this.fillColor, + required this.geodesic, + required this.points, + required this.holes, + required this.visible, + required this.strokeColor, + required this.strokeWidth, + required this.zIndex, + }); + + String polygonId; + + bool consumesTapEvents; + + PlatformColor fillColor; + + bool geodesic; + + List points; + + List> holes; + + bool visible; + + PlatformColor strokeColor; + + int strokeWidth; + + int zIndex; + + List _toList() { + return [ + polygonId, + consumesTapEvents, + fillColor, + geodesic, + points, + holes, + visible, + strokeColor, + strokeWidth, + zIndex, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPolygon decode(Object result) { + result as List; + return PlatformPolygon( + polygonId: result[0]! as String, + consumesTapEvents: result[1]! as bool, + fillColor: result[2]! as PlatformColor, + geodesic: result[3]! as bool, + points: (result[4] as List?)!.cast(), + holes: (result[5] as List?)!.cast>(), + visible: result[6]! as bool, + strokeColor: result[7]! as PlatformColor, + strokeWidth: result[8]! as int, + zIndex: result[9]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPolygon || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Polyline class. +class PlatformPolyline { + PlatformPolyline({ + required this.polylineId, + required this.consumesTapEvents, + required this.color, + required this.geodesic, + required this.jointType, + required this.patterns, + required this.points, + required this.visible, + required this.width, + required this.zIndex, + }); + + String polylineId; + + bool consumesTapEvents; + + PlatformColor color; + + bool geodesic; + + /// The joint type. + PlatformJointType jointType; + + /// The pattern data, as a list of pattern items. + List patterns; + + List points; + + bool visible; + + int width; + + int zIndex; + + List _toList() { + return [ + polylineId, + consumesTapEvents, + color, + geodesic, + jointType, + patterns, + points, + visible, + width, + zIndex, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPolyline decode(Object result) { + result as List; + return PlatformPolyline( + polylineId: result[0]! as String, + consumesTapEvents: result[1]! as bool, + color: result[2]! as PlatformColor, + geodesic: result[3]! as bool, + jointType: result[4]! as PlatformJointType, + patterns: (result[5] as List?)!.cast(), + points: (result[6] as List?)!.cast(), + visible: result[7]! as bool, + width: result[8]! as int, + zIndex: result[9]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPolyline || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the PatternItem class. +class PlatformPatternItem { + PlatformPatternItem({ + required this.type, + this.length, + }); + + PlatformPatternItemType type; + + double? length; + + List _toList() { + return [ + type, + length, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPatternItem decode(Object result) { + result as List; + return PlatformPatternItem( + type: result[0]! as PlatformPatternItemType, + length: result[1] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPatternItem || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Tile class. +class PlatformTile { + PlatformTile({ + required this.width, + required this.height, + this.data, + }); + + int width; + + int height; + + Uint8List? data; + + List _toList() { + return [ + width, + height, + data, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformTile decode(Object result) { + result as List; + return PlatformTile( + width: result[0]! as int, + height: result[1]! as int, + data: result[2] as Uint8List?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTile || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the TileOverlay class. +class PlatformTileOverlay { + PlatformTileOverlay({ + required this.tileOverlayId, + required this.fadeIn, + required this.transparency, + required this.zIndex, + required this.visible, + required this.tileSize, + }); + + String tileOverlayId; + + bool fadeIn; + + double transparency; + + int zIndex; + + bool visible; + + int tileSize; + + List _toList() { + return [ + tileOverlayId, + fadeIn, + transparency, + zIndex, + visible, + tileSize, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformTileOverlay decode(Object result) { + result as List; + return PlatformTileOverlay( + 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, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTileOverlay || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of Flutter's EdgeInsets. +class PlatformEdgeInsets { + PlatformEdgeInsets({ + required this.top, + required this.bottom, + required this.left, + required this.right, + }); + + double top; + + double bottom; + + double left; + + double right; + + List _toList() { + return [ + top, + bottom, + left, + right, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformEdgeInsets decode(Object result) { + result as List; + return PlatformEdgeInsets( + top: result[0]! as double, + bottom: result[1]! as double, + left: result[2]! as double, + right: result[3]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformEdgeInsets || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of LatLng. +class PlatformLatLng { + PlatformLatLng({ + required this.latitude, + required this.longitude, + }); + + double latitude; + + double longitude; + + List _toList() { + return [ + latitude, + longitude, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformLatLng decode(Object result) { + result as List; + return PlatformLatLng( + latitude: result[0]! as double, + longitude: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformLatLng || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of LatLngBounds. +class PlatformLatLngBounds { + PlatformLatLngBounds({ + required this.northeast, + required this.southwest, + }); + + PlatformLatLng northeast; + + PlatformLatLng southwest; + + List _toList() { + return [ + northeast, + southwest, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformLatLngBounds decode(Object result) { + result as List; + return PlatformLatLngBounds( + northeast: result[0]! as PlatformLatLng, + southwest: result[1]! as PlatformLatLng, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformLatLngBounds || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_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]). +class PlatformCameraTargetBounds { + PlatformCameraTargetBounds({ + this.bounds, + }); + + PlatformLatLngBounds? bounds; + + List _toList() { + return [ + bounds, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraTargetBounds decode(Object result) { + result as List; + return PlatformCameraTargetBounds( + bounds: result[0] as PlatformLatLngBounds?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraTargetBounds || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the GroundOverlay class. +class PlatformGroundOverlay { + PlatformGroundOverlay({ + required this.groundOverlayId, + required this.image, + this.position, + this.bounds, + this.anchor, + required this.transparency, + required this.bearing, + required this.zIndex, + required this.visible, + required this.clickable, + this.zoomLevel, + }); + + String groundOverlayId; + + PlatformBitmap image; + + PlatformLatLng? position; + + PlatformLatLngBounds? bounds; + + PlatformPoint? anchor; + + double transparency; + + double bearing; + + int zIndex; + + bool visible; + + bool clickable; + + double? zoomLevel; + + List _toList() { + return [ + groundOverlayId, + image, + position, + bounds, + anchor, + transparency, + bearing, + zIndex, + visible, + clickable, + zoomLevel, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformGroundOverlay decode(Object result) { + result as List; + return PlatformGroundOverlay( + groundOverlayId: result[0]! as String, + image: result[1]! as PlatformBitmap, + position: result[2] as PlatformLatLng?, + bounds: result[3] as PlatformLatLngBounds?, + anchor: result[4] as PlatformPoint?, + transparency: result[5]! as double, + bearing: result[6]! as double, + zIndex: result[7]! as int, + visible: result[8]! as bool, + clickable: result[9]! as bool, + zoomLevel: result[10] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformGroundOverlay || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Information passed to the platform view creation. +class PlatformMapViewCreationParams { + PlatformMapViewCreationParams({ + required this.initialCameraPosition, + required this.mapConfiguration, + required this.initialCircles, + required this.initialMarkers, + required this.initialPolygons, + required this.initialPolylines, + required this.initialHeatmaps, + required this.initialTileOverlays, + required this.initialClusterManagers, + required this.initialGroundOverlays, + }); + + PlatformCameraPosition initialCameraPosition; + + PlatformMapConfiguration mapConfiguration; + + List initialCircles; + + List initialMarkers; + + List initialPolygons; + + List initialPolylines; + + List initialHeatmaps; + + List initialTileOverlays; + + List initialClusterManagers; + + List initialGroundOverlays; + + List _toList() { + return [ + initialCameraPosition, + mapConfiguration, + initialCircles, + initialMarkers, + initialPolygons, + initialPolylines, + initialHeatmaps, + initialTileOverlays, + initialClusterManagers, + initialGroundOverlays, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformMapViewCreationParams decode(Object result) { + result as List; + return PlatformMapViewCreationParams( + initialCameraPosition: result[0]! as PlatformCameraPosition, + mapConfiguration: result[1]! as PlatformMapConfiguration, + initialCircles: (result[2] as List?)!.cast(), + initialMarkers: (result[3] as List?)!.cast(), + initialPolygons: (result[4] as List?)!.cast(), + initialPolylines: (result[5] as List?)!.cast(), + initialHeatmaps: (result[6] as List?)!.cast(), + initialTileOverlays: (result[7] as List?)!.cast(), + initialClusterManagers: (result[8] as List?)!.cast(), + initialGroundOverlays: (result[9] as List?)!.cast(), + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMapViewCreationParams || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of MapConfiguration. +class PlatformMapConfiguration { + PlatformMapConfiguration({ + this.compassEnabled, + this.cameraTargetBounds, + this.mapType, + this.minMaxZoomPreference, + this.rotateGesturesEnabled, + this.scrollGesturesEnabled, + this.tiltGesturesEnabled, + this.trackCameraPosition, + this.zoomGesturesEnabled, + this.myLocationEnabled, + this.myLocationButtonEnabled, + this.padding, + this.indoorViewEnabled, + this.trafficEnabled, + this.buildingsEnabled, + this.mapId, + this.style, + }); + + bool? compassEnabled; + + PlatformCameraTargetBounds? cameraTargetBounds; + + PlatformMapType? mapType; + + PlatformZoomRange? minMaxZoomPreference; + + bool? rotateGesturesEnabled; + + bool? scrollGesturesEnabled; + + bool? tiltGesturesEnabled; + + bool? trackCameraPosition; + + bool? zoomGesturesEnabled; + + bool? myLocationEnabled; + + bool? myLocationButtonEnabled; + + PlatformEdgeInsets? padding; + + bool? indoorViewEnabled; + + bool? trafficEnabled; + + bool? buildingsEnabled; + + String? mapId; + + String? style; + + List _toList() { + return [ + compassEnabled, + cameraTargetBounds, + mapType, + minMaxZoomPreference, + rotateGesturesEnabled, + scrollGesturesEnabled, + tiltGesturesEnabled, + trackCameraPosition, + zoomGesturesEnabled, + myLocationEnabled, + myLocationButtonEnabled, + padding, + indoorViewEnabled, + trafficEnabled, + buildingsEnabled, + mapId, + style, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformMapConfiguration decode(Object result) { + result as List; + return PlatformMapConfiguration( + compassEnabled: result[0] as bool?, + cameraTargetBounds: result[1] as PlatformCameraTargetBounds?, + mapType: result[2] as PlatformMapType?, + minMaxZoomPreference: result[3] as PlatformZoomRange?, + rotateGesturesEnabled: result[4] as bool?, + scrollGesturesEnabled: result[5] as bool?, + tiltGesturesEnabled: result[6] as bool?, + trackCameraPosition: result[7] as bool?, + zoomGesturesEnabled: result[8] as bool?, + myLocationEnabled: result[9] as bool?, + myLocationButtonEnabled: result[10] as bool?, + padding: result[11] as PlatformEdgeInsets?, + indoorViewEnabled: result[12] as bool?, + trafficEnabled: result[13] as bool?, + buildingsEnabled: result[14] as bool?, + mapId: result[15] as String?, + style: result[16] as String?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMapConfiguration || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon representation of an x,y coordinate. +class PlatformPoint { + PlatformPoint({ + required this.x, + required this.y, + }); + + double x; + + double y; + + List _toList() { + return [ + x, + y, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPoint decode(Object result) { + result as List; + return PlatformPoint( + x: result[0]! as double, + y: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPoint || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon representation of a size. +class PlatformSize { + PlatformSize({ + required this.width, + required this.height, + }); + + double width; + + double height; + + List _toList() { + return [ + width, + height, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformSize decode(Object result) { + result as List; + return PlatformSize( + width: result[0]! as double, + height: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformSize || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon representation of a color. +class PlatformColor { + PlatformColor({ + required this.red, + required this.green, + required this.blue, + required this.alpha, + }); + + double red; + + double green; + + double blue; + + double alpha; + + List _toList() { + return [ + red, + green, + blue, + alpha, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformColor decode(Object result) { + result as List; + return PlatformColor( + red: result[0]! as double, + green: result[1]! as double, + blue: result[2]! as double, + alpha: result[3]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformColor || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of GMSTileLayer properties. +class PlatformTileLayer { + PlatformTileLayer({ + required this.visible, + required this.fadeIn, + required this.opacity, + required this.zIndex, + }); + + bool visible; + + bool fadeIn; + + double opacity; + + int zIndex; + + List _toList() { + return [ + visible, + fadeIn, + opacity, + zIndex, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformTileLayer decode(Object result) { + result as List; + return PlatformTileLayer( + visible: result[0]! as bool, + fadeIn: result[1]! as bool, + opacity: result[2]! as double, + zIndex: result[3]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTileLayer || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of MinMaxZoomPreference. +class PlatformZoomRange { + PlatformZoomRange({ + this.min, + this.max, + }); + + double? min; + + double? max; + + List _toList() { + return [ + min, + max, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformZoomRange decode(Object result) { + result as List; + return PlatformZoomRange( + min: result[0] as double?, + max: result[1] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformZoomRange || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint +/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which +/// may hold the pigeon equivalent type of any of them. +class PlatformBitmap { + PlatformBitmap({ + required this.bitmap, + }); + + /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], + /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], + /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. + /// As Pigeon does not currently support data class inheritance, this + /// approach allows for the different bitmap implementations to be valid + /// argument and return types of the API methods. See + /// https://github.com/flutter/flutter/issues/117819. + Object bitmap; + + List _toList() { + return [ + bitmap, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmap decode(Object result) { + result as List; + return PlatformBitmap( + bitmap: result[0]!, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [DefaultMarker]. +class PlatformBitmapDefaultMarker { + PlatformBitmapDefaultMarker({ + this.hue, + }); + + double? hue; + + List _toList() { + return [ + hue, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapDefaultMarker decode(Object result) { + result as List; + return PlatformBitmapDefaultMarker( + hue: result[0] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapDefaultMarker || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [BytesBitmap]. +class PlatformBitmapBytes { + PlatformBitmapBytes({ + required this.byteData, + this.size, + }); + + Uint8List byteData; + + PlatformSize? size; + + List _toList() { + return [ + byteData, + size, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapBytes decode(Object result) { + result as List; + return PlatformBitmapBytes( + byteData: result[0]! as Uint8List, + size: result[1] as PlatformSize?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapBytes || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [AssetBitmap]. +class PlatformBitmapAsset { + PlatformBitmapAsset({ + required this.name, + this.pkg, + }); + + String name; + + String? pkg; + + List _toList() { + return [ + name, + pkg, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapAsset decode(Object result) { + result as List; + return PlatformBitmapAsset( + name: result[0]! as String, + pkg: result[1] as String?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAsset || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [AssetImageBitmap]. +class PlatformBitmapAssetImage { + PlatformBitmapAssetImage({ + required this.name, + required this.scale, + this.size, + }); + + String name; + + double scale; + + PlatformSize? size; + + List _toList() { + return [ + name, + scale, + size, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapAssetImage decode(Object result) { + result as List; + return PlatformBitmapAssetImage( + name: result[0]! as String, + scale: result[1]! as double, + size: result[2] as PlatformSize?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAssetImage || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [AssetMapBitmap]. +class PlatformBitmapAssetMap { + PlatformBitmapAssetMap({ + required this.assetName, + required this.bitmapScaling, + required this.imagePixelRatio, + this.width, + this.height, + }); + + String assetName; + + PlatformMapBitmapScaling bitmapScaling; + + double imagePixelRatio; + + double? width; + + double? height; + + List _toList() { + return [ + assetName, + bitmapScaling, + imagePixelRatio, + width, + height, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapAssetMap decode(Object result) { + result as List; + return PlatformBitmapAssetMap( + assetName: result[0]! as String, + bitmapScaling: result[1]! as PlatformMapBitmapScaling, + imagePixelRatio: result[2]! as double, + width: result[3] as double?, + height: result[4] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAssetMap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [BytesMapBitmap]. +class PlatformBitmapBytesMap { + PlatformBitmapBytesMap({ + required this.byteData, + required this.bitmapScaling, + required this.imagePixelRatio, + this.width, + this.height, + }); + + Uint8List byteData; + + PlatformMapBitmapScaling bitmapScaling; + + double imagePixelRatio; + + double? width; + + double? height; + + List _toList() { + return [ + byteData, + bitmapScaling, + imagePixelRatio, + width, + height, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapBytesMap decode(Object result) { + result as List; + return PlatformBitmapBytesMap( + byteData: result[0]! as Uint8List, + bitmapScaling: result[1]! as PlatformMapBitmapScaling, + imagePixelRatio: result[2]! as double, + width: result[3] as double?, + height: result[4] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapBytesMap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + + +class _PigeonCodec extends StandardMessageCodec { + const _PigeonCodec(); + @override + void writeValue(WriteBuffer buffer, Object? value) { + if (value is int) { + buffer.putUint8(4); + buffer.putInt64(value); + } else if (value is PlatformMapType) { + buffer.putUint8(129); + writeValue(buffer, value.index); + } else if (value is PlatformJointType) { + buffer.putUint8(130); + writeValue(buffer, value.index); + } else if (value is PlatformPatternItemType) { + buffer.putUint8(131); + writeValue(buffer, value.index); + } else if (value is PlatformMapBitmapScaling) { + buffer.putUint8(132); + writeValue(buffer, value.index); + } else if (value is PlatformCameraPosition) { + buffer.putUint8(133); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdate) { + buffer.putUint8(134); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateNewCameraPosition) { + buffer.putUint8(135); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateNewLatLng) { + buffer.putUint8(136); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateNewLatLngBounds) { + buffer.putUint8(137); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateNewLatLngZoom) { + buffer.putUint8(138); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateScrollBy) { + buffer.putUint8(139); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateZoomBy) { + buffer.putUint8(140); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateZoom) { + buffer.putUint8(141); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateZoomTo) { + buffer.putUint8(142); + writeValue(buffer, value.encode()); + } else if (value is PlatformCircle) { + buffer.putUint8(143); + writeValue(buffer, value.encode()); + } else if (value is PlatformHeatmap) { + buffer.putUint8(144); + writeValue(buffer, value.encode()); + } else if (value is PlatformHeatmapGradient) { + buffer.putUint8(145); + writeValue(buffer, value.encode()); + } else if (value is PlatformWeightedLatLng) { + buffer.putUint8(146); + writeValue(buffer, value.encode()); + } else if (value is PlatformInfoWindow) { + buffer.putUint8(147); + writeValue(buffer, value.encode()); + } else if (value is PlatformCluster) { + buffer.putUint8(148); + writeValue(buffer, value.encode()); + } else if (value is PlatformClusterManager) { + buffer.putUint8(149); + writeValue(buffer, value.encode()); + } else if (value is PlatformMarker) { + buffer.putUint8(150); + writeValue(buffer, value.encode()); + } else if (value is PlatformPointOfInterest) { + buffer.putUint8(151); + writeValue(buffer, value.encode()); + } else if (value is PlatformPolygon) { + buffer.putUint8(152); + writeValue(buffer, value.encode()); + } else if (value is PlatformPolyline) { + buffer.putUint8(153); + writeValue(buffer, value.encode()); + } else if (value is PlatformPatternItem) { + buffer.putUint8(154); + writeValue(buffer, value.encode()); + } else if (value is PlatformTile) { + buffer.putUint8(155); + writeValue(buffer, value.encode()); + } else if (value is PlatformTileOverlay) { + buffer.putUint8(156); + writeValue(buffer, value.encode()); + } else if (value is PlatformEdgeInsets) { + buffer.putUint8(157); + writeValue(buffer, value.encode()); + } else if (value is PlatformLatLng) { + buffer.putUint8(158); + writeValue(buffer, value.encode()); + } else if (value is PlatformLatLngBounds) { + buffer.putUint8(159); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraTargetBounds) { + buffer.putUint8(160); + writeValue(buffer, value.encode()); + } else if (value is PlatformGroundOverlay) { + buffer.putUint8(161); + writeValue(buffer, value.encode()); + } else if (value is PlatformMapViewCreationParams) { + buffer.putUint8(162); + writeValue(buffer, value.encode()); + } else if (value is PlatformMapConfiguration) { + buffer.putUint8(163); + writeValue(buffer, value.encode()); + } else if (value is PlatformPoint) { + buffer.putUint8(164); + writeValue(buffer, value.encode()); + } else if (value is PlatformSize) { + buffer.putUint8(165); + writeValue(buffer, value.encode()); + } else if (value is PlatformColor) { + buffer.putUint8(166); + writeValue(buffer, value.encode()); + } else if (value is PlatformTileLayer) { + buffer.putUint8(167); + writeValue(buffer, value.encode()); + } else if (value is PlatformZoomRange) { + buffer.putUint8(168); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmap) { + buffer.putUint8(169); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapDefaultMarker) { + buffer.putUint8(170); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapBytes) { + buffer.putUint8(171); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapAsset) { + buffer.putUint8(172); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapAssetImage) { + buffer.putUint8(173); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapAssetMap) { + buffer.putUint8(174); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapBytesMap) { + buffer.putUint8(175); + writeValue(buffer, value.encode()); + } else { + super.writeValue(buffer, value); + } + } + + @override + Object? readValueOfType(int type, ReadBuffer buffer) { + switch (type) { + case 129: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformMapType.values[value]; + case 130: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformJointType.values[value]; + case 131: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformPatternItemType.values[value]; + case 132: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformMapBitmapScaling.values[value]; + case 133: + return PlatformCameraPosition.decode(readValue(buffer)!); + case 134: + return PlatformCameraUpdate.decode(readValue(buffer)!); + case 135: + return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!); + case 136: + return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!); + case 137: + return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); + case 138: + return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); + case 139: + return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); + case 140: + return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); + case 141: + return PlatformCameraUpdateZoom.decode(readValue(buffer)!); + case 142: + return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); + case 143: + return PlatformCircle.decode(readValue(buffer)!); + case 144: + return PlatformHeatmap.decode(readValue(buffer)!); + case 145: + return PlatformHeatmapGradient.decode(readValue(buffer)!); + case 146: + return PlatformWeightedLatLng.decode(readValue(buffer)!); + case 147: + return PlatformInfoWindow.decode(readValue(buffer)!); + case 148: + return PlatformCluster.decode(readValue(buffer)!); + case 149: + return PlatformClusterManager.decode(readValue(buffer)!); + case 150: + return PlatformMarker.decode(readValue(buffer)!); + case 151: + return PlatformPointOfInterest.decode(readValue(buffer)!); + case 152: + return PlatformPolygon.decode(readValue(buffer)!); + case 153: + return PlatformPolyline.decode(readValue(buffer)!); + case 154: + return PlatformPatternItem.decode(readValue(buffer)!); + case 155: + return PlatformTile.decode(readValue(buffer)!); + case 156: + return PlatformTileOverlay.decode(readValue(buffer)!); + case 157: + return PlatformEdgeInsets.decode(readValue(buffer)!); + case 158: + return PlatformLatLng.decode(readValue(buffer)!); + case 159: + return PlatformLatLngBounds.decode(readValue(buffer)!); + case 160: + return PlatformCameraTargetBounds.decode(readValue(buffer)!); + case 161: + return PlatformGroundOverlay.decode(readValue(buffer)!); + case 162: + return PlatformMapViewCreationParams.decode(readValue(buffer)!); + case 163: + return PlatformMapConfiguration.decode(readValue(buffer)!); + case 164: + return PlatformPoint.decode(readValue(buffer)!); + case 165: + return PlatformSize.decode(readValue(buffer)!); + case 166: + return PlatformColor.decode(readValue(buffer)!); + case 167: + return PlatformTileLayer.decode(readValue(buffer)!); + case 168: + return PlatformZoomRange.decode(readValue(buffer)!); + case 169: + return PlatformBitmap.decode(readValue(buffer)!); + case 170: + return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); + case 171: + return PlatformBitmapBytes.decode(readValue(buffer)!); + case 172: + return PlatformBitmapAsset.decode(readValue(buffer)!); + case 173: + return PlatformBitmapAssetImage.decode(readValue(buffer)!); + case 174: + return PlatformBitmapAssetMap.decode(readValue(buffer)!); + case 175: + return PlatformBitmapBytesMap.decode(readValue(buffer)!); + default: + return super.readValueOfType(type, buffer); + } + } +} + +/// Interface for non-test interactions with the native SDK. +/// +/// For test-only state queries, see [MapsInspectorApi]. +class MapsApi { + /// Constructor for [MapsApi]. 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. + MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + /// Returns once the map instance is available. + Future waitForMap() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the map's configuration options. + /// + /// Only non-null configuration values will result in updates; options with + /// null values will remain unchanged. + Future updateMapConfiguration(PlatformMapConfiguration configuration) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of circles on the map. + Future updateCircles(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of heatmaps on the map. + Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of custer managers for clusters on the map. + Future updateClusterManagers(List toAdd, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of markers on the map. + Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of polygonss on the map. + Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of polylines on the map. + Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of tile overlays on the map. + Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of ground overlays on the map. + Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Gets the screen coordinate for the given map location. + Future getScreenCoordinate(PlatformLatLng latLng) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformPoint?)!; + } + } + + /// Gets the map location for the given screen coordinate. + Future getLatLng(PlatformPoint screenCoordinate) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformLatLng?)!; + } + } + + /// Gets the map region currently displayed on the map. + Future getVisibleRegion() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformLatLngBounds?)!; + } + } + + /// Moves the camera according to [cameraUpdate] immediately, with no + /// animation. + Future moveCamera(PlatformCameraUpdate cameraUpdate) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Moves the camera according to [cameraUpdate], animating the update using a + /// duration in milliseconds if provided. + Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Gets the current map zoom level. + Future getZoomLevel() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as double?)!; + } + } + + /// Show the info window for the marker with the given ID. + Future showInfoWindow(String markerId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Hide the info window for the marker with the given ID. + Future hideInfoWindow(String markerId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Returns true if the marker with the given ID is currently displaying its + /// info window. + Future isInfoWindowShown(String markerId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + /// Sets the style to the given map style string, where an empty string + /// indicates that the style should be cleared. + /// + /// If there was an error setting the style, such as an invalid style string, + /// returns the error message. + Future setStyle(String style) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as String?); + } + } + + /// Returns the error string from the last attempt to set the map style, if + /// any. + /// + /// This allows checking asynchronously for initial style failures, as there + /// is no way to return failures from map initialization. + Future getLastStyleError() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as String?); + } + } + + /// Clears the cache of tiles previously requseted from the tile provider. + Future clearTileCache(String tileOverlayId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Takes a snapshot of the map and returns its image data. + Future takeSnapshot() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as Uint8List?); + } + } +} + +/// Interface for calls from the native SDK to Dart. +abstract class MapsCallbackApi { + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + /// Called when the map camera starts moving. + void onCameraMoveStarted(); + + /// Called when the map camera moves. + void onCameraMove(PlatformCameraPosition cameraPosition); + + /// Called when the map camera stops moving. + void onCameraIdle(); + + /// Called when the map, not a specifc map object, is tapped. + void onTap(PlatformLatLng position); + + /// Called when the map, not a specifc map object, is long pressed. + void onLongPress(PlatformLatLng position); + + /// Called when a marker is tapped. + void onMarkerTap(String markerId); + + /// Called when a marker drag starts. + void onMarkerDragStart(String markerId, PlatformLatLng position); + + /// Called when a marker drag updates. + void onMarkerDrag(String markerId, PlatformLatLng position); + + /// Called when a marker drag ends. + void onMarkerDragEnd(String markerId, PlatformLatLng position); + + /// Called when a marker's info window is tapped. + void onInfoWindowTap(String markerId); + + /// Called when a circle is tapped. + void onCircleTap(String circleId); + + /// Called when a marker cluster is tapped. + void onClusterTap(PlatformCluster cluster); + + /// Called when a polygon is tapped. + void onPolygonTap(String polygonId); + + /// Called when a polyline is tapped. + void onPolylineTap(String polylineId); + + /// Called when a ground overlay is tapped. + void onGroundOverlayTap(String groundOverlayId); + + /// Called when a point of interest is tapped. + void onPoiTap(PlatformPointOfInterest poi); + + /// 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' : ''; + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + try { + api.onCameraMoveStarted(); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.'); + final List args = (message as List?)!; + final PlatformCameraPosition? arg_cameraPosition = (args[0] as PlatformCameraPosition?); + assert(arg_cameraPosition != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.'); + try { + api.onCameraMove(arg_cameraPosition!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + try { + api.onCameraIdle(); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.'); + final List args = (message as List?)!; + final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); + try { + api.onTap(arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.'); + final List args = (message as List?)!; + final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); + try { + api.onLongPress(arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); + try { + api.onMarkerTap(arg_markerId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); + try { + api.onMarkerDragStart(arg_markerId!, arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); + try { + api.onMarkerDrag(arg_markerId!, arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); + try { + api.onMarkerDragEnd(arg_markerId!, arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); + try { + api.onInfoWindowTap(arg_markerId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.'); + final List args = (message as List?)!; + final String? arg_circleId = (args[0] as String?); + assert(arg_circleId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null, expected non-null String.'); + try { + api.onCircleTap(arg_circleId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.'); + final List args = (message as List?)!; + final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); + assert(arg_cluster != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); + try { + api.onClusterTap(arg_cluster!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.'); + final List args = (message as List?)!; + final String? arg_polygonId = (args[0] as String?); + assert(arg_polygonId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); + try { + api.onPolygonTap(arg_polygonId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.'); + final List args = (message as List?)!; + final String? arg_polylineId = (args[0] as String?); + assert(arg_polylineId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); + try { + api.onPolylineTap(arg_polylineId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.'); + final List args = (message as List?)!; + final String? arg_groundOverlayId = (args[0] as String?); + assert(arg_groundOverlayId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); + try { + api.onGroundOverlayTap(arg_groundOverlayId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.'); + final List args = (message as List?)!; + final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); + assert(arg_poi != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); + try { + api.onPoiTap(arg_poi!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.'); + final List args = (message as List?)!; + final String? arg_tileOverlayId = (args[0] as String?); + assert(arg_tileOverlayId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); + final PlatformPoint? arg_location = (args[1] as PlatformPoint?); + assert(arg_location != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); + final int? arg_zoom = (args[2] as int?); + assert(arg_zoom != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); + try { + final PlatformTile output = await api.getTileOverlayTile(arg_tileOverlayId!, arg_location!, arg_zoom!); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + } +} + +/// 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. +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 = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + Future createView(PlatformMapViewCreationParams? type) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } +} + +/// Inspector API only intended for use in integration tests. +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 = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + Future areBuildingsEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areRotateGesturesEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areScrollGesturesEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areTiltGesturesEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areZoomGesturesEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future isCompassEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future isMyLocationButtonEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future isTrafficEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future getTileOverlayInfo(String tileOverlayId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as PlatformTileLayer?); + } + } + + Future getGroundOverlayInfo(String groundOverlayId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as PlatformGroundOverlay?); + } + } + + Future getHeatmapInfo(String heatmapId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([heatmapId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as PlatformHeatmap?); + } + } + + Future getZoomRange() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformZoomRange?)!; + } + } + + Future> getClusters(String clusterManagerId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as List?)!.cast(); + } + } + + Future getCameraPosition() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformCameraPosition?)!; + } + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.rej b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.rej new file mode 100644 index 000000000000..6a762b8f1585 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.rej @@ -0,0 +1,1496 @@ +--- packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart ++++ packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +@@ -31,49 +35,36 @@ List wrapResponse({Object? result, PlatformException? error, bool empty + } + return [error.code, error.message, error.details]; + } ++ + bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && +- a.indexed +- .every(((int, dynamic) item) => _deepEquals(item., b[item.])); ++ a.indexed.every( ++ ((int, dynamic) item) => _deepEquals(item., b[item.]), ++ ); + } + if (a is Map && b is Map) { +- return a.length == b.length && a.entries.every((MapEntry entry) => +- (b as Map).containsKey(entry.key) && +- _deepEquals(entry.value, b[entry.key])); ++ return a.length == b.length && ++ a.entries.every( ++ (MapEntry entry) => ++ (b as Map).containsKey(entry.key) && ++ _deepEquals(entry.value, b[entry.key]), ++ ); + } + return a == b; + } + +- + /// Pigeon equivalent of MapType +-enum PlatformMapType { +- none, +- normal, +- satellite, +- terrain, +- hybrid, +-} ++enum PlatformMapType { none, normal, satellite, terrain, hybrid } + + /// Join types for polyline joints. +-enum PlatformJointType { +- mitered, +- bevel, +- round, +-} ++enum PlatformJointType { mitered, bevel, round } + + /// Enumeration of possible types for PatternItem. +-enum PlatformPatternItemType { +- dot, +- dash, +- gap, +-} ++enum PlatformPatternItemType { dot, dash, gap } + + /// Pigeon equivalent of [MapBitmapScaling]. +-enum PlatformMapBitmapScaling { +- auto, +- none, +-} ++enum PlatformMapBitmapScaling { auto, none } + + /// Pigeon representatation of a CameraPosition. + class PlatformCameraPosition { +@@ -2644,8 +2457,10 @@ class MapsApi { + /// available for dependency injection. If it is left null, the default + /// BinaryMessenger will be used which routes to the host platform. + MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) +- : pigeonVar_binaryMessenger = binaryMessenger, +- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ : pigeonVar_binaryMessenger = binaryMessenger, ++ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); +@@ -2654,7 +2469,8 @@ class MapsApi { + + /// Returns once the map instance is available. + Future waitForMap() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -2679,14 +2495,19 @@ class MapsApi { + /// + /// Only non-null configuration values will result in updates; options with + /// null values will remain unchanged. +- Future updateMapConfiguration(PlatformMapConfiguration configuration) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration'; ++ Future updateMapConfiguration( ++ PlatformMapConfiguration configuration, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [configuration], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2702,14 +2523,21 @@ class MapsApi { + } + + /// Updates the set of circles on the map. +- Future updateCircles(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles'; ++ Future updateCircles( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2725,14 +2553,21 @@ class MapsApi { + } + + /// Updates the set of heatmaps on the map. +- Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps'; ++ Future updateHeatmaps( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2748,14 +2583,20 @@ class MapsApi { + } + + /// Updates the set of custer managers for clusters on the map. +- Future updateClusterManagers(List toAdd, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers'; ++ Future updateClusterManagers( ++ List toAdd, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2771,14 +2612,21 @@ class MapsApi { + } + + /// Updates the set of markers on the map. +- Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers'; ++ Future updateMarkers( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2794,14 +2642,21 @@ class MapsApi { + } + + /// Updates the set of polygonss on the map. +- Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons'; ++ Future updatePolygons( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2817,14 +2672,21 @@ class MapsApi { + } + + /// Updates the set of polylines on the map. +- Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines'; ++ Future updatePolylines( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2840,14 +2702,21 @@ class MapsApi { + } + + /// Updates the set of tile overlays on the map. +- Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays'; ++ Future updateTileOverlays( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2863,14 +2732,21 @@ class MapsApi { + } + + /// Updates the set of ground overlays on the map. +- Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays'; ++ Future updateGroundOverlays( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2887,13 +2763,16 @@ class MapsApi { + + /// Gets the screen coordinate for the given map location. + Future getScreenCoordinate(PlatformLatLng latLng) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [latLng], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2915,13 +2794,16 @@ class MapsApi { + + /// Gets the map location for the given screen coordinate. + Future getLatLng(PlatformPoint screenCoordinate) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [screenCoordinate], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2943,7 +2825,8 @@ class MapsApi { + + /// Gets the map region currently displayed on the map. + Future getVisibleRegion() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -2972,13 +2855,16 @@ class MapsApi { + /// Moves the camera according to [cameraUpdate] immediately, with no + /// animation. + Future moveCamera(PlatformCameraUpdate cameraUpdate) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [cameraUpdate], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2995,14 +2881,20 @@ class MapsApi { + + /// Moves the camera according to [cameraUpdate], animating the update using a + /// duration in milliseconds if provided. +- Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera'; ++ Future animateCamera( ++ PlatformCameraUpdate cameraUpdate, ++ int? durationMilliseconds, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [cameraUpdate, durationMilliseconds], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3019,7 +2911,8 @@ class MapsApi { + + /// Gets the current map zoom level. + Future getZoomLevel() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3047,13 +2940,16 @@ class MapsApi { + + /// Show the info window for the marker with the given ID. + Future showInfoWindow(String markerId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [markerId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3070,13 +2966,16 @@ class MapsApi { + + /// Hide the info window for the marker with the given ID. + Future hideInfoWindow(String markerId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [markerId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3094,13 +2993,16 @@ class MapsApi { + /// Returns true if the marker with the given ID is currently displaying its + /// info window. + Future isInfoWindowShown(String markerId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [markerId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3126,13 +3028,16 @@ class MapsApi { + /// If there was an error setting the style, such as an invalid style string, + /// returns the error message. + Future setStyle(String style) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [style], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3153,7 +3058,8 @@ class MapsApi { + /// This allows checking asynchronously for initial style failures, as there + /// is no way to return failures from map initialization. + Future getLastStyleError() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3176,13 +3082,16 @@ class MapsApi { + + /// Clears the cache of tiles previously requseted from the tile provider. + Future clearTileCache(String tileOverlayId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [tileOverlayId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3199,7 +3108,8 @@ class MapsApi { + + /// Takes a snapshot of the map and returns its image data. + Future takeSnapshot() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3274,14 +3184,26 @@ abstract class MapsCallbackApi { + void onPoiTap(PlatformPointOfInterest poi); + + /// Called to get data for a map tile. +- Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); ++ Future getTileOverlayTile( ++ String tileOverlayId, ++ PlatformPoint location, ++ int zoom, ++ ); + +- static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { +- messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ static void setUp( ++ MapsCallbackApi? api, { ++ BinaryMessenger? binaryMessenger, ++ String messageChannelSuffix = '', ++ }) { ++ messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + { + final pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { +@@ -3291,41 +3213,54 @@ 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.', ++ ); + final List args = (message as List?)!; +- final PlatformCameraPosition? arg_cameraPosition = (args[0] as PlatformCameraPosition?); +- assert(arg_cameraPosition != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.'); ++ final PlatformCameraPosition? arg_cameraPosition = ++ (args[0] as PlatformCameraPosition?); ++ assert( ++ arg_cameraPosition != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.', ++ ); + try { + api.onCameraMove(arg_cameraPosition!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { +@@ -3335,373 +3270,502 @@ 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.', ++ ); + final List args = (message as List?)!; + final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); +- assert(arg_position != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onTap(arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.', ++ ); + final List args = (message as List?)!; + final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); +- assert(arg_position != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onLongPress(arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.', ++ ); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); +- assert(arg_markerId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null, expected non-null String.', ++ ); + try { + api.onMarkerTap(arg_markerId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.', ++ ); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); +- assert(arg_markerId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.', ++ ); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); +- assert(arg_position != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onMarkerDragStart(arg_markerId!, arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.', ++ ); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); +- assert(arg_markerId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null String.', ++ ); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); +- assert(arg_position != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onMarkerDrag(arg_markerId!, arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.', ++ ); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); +- assert(arg_markerId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.', ++ ); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); +- assert(arg_position != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onMarkerDragEnd(arg_markerId!, arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.', ++ ); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); +- assert(arg_markerId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.', ++ ); + try { + api.onInfoWindowTap(arg_markerId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.', ++ ); + final List args = (message as List?)!; + final String? arg_circleId = (args[0] as String?); +- assert(arg_circleId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null, expected non-null String.'); ++ assert( ++ arg_circleId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null, expected non-null String.', ++ ); + try { + api.onCircleTap(arg_circleId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.', ++ ); + final List args = (message as List?)!; + final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); +- assert(arg_cluster != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); ++ assert( ++ arg_cluster != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.', ++ ); + try { + api.onClusterTap(arg_cluster!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.', ++ ); + final List args = (message as List?)!; + final String? arg_polygonId = (args[0] as String?); +- assert(arg_polygonId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); ++ assert( ++ arg_polygonId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null, expected non-null String.', ++ ); + try { + api.onPolygonTap(arg_polygonId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.', ++ ); + final List args = (message as List?)!; + final String? arg_polylineId = (args[0] as String?); +- assert(arg_polylineId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); ++ assert( ++ arg_polylineId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null, expected non-null String.', ++ ); + try { + api.onPolylineTap(arg_polylineId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.', ++ ); + final List args = (message as List?)!; + final String? arg_groundOverlayId = (args[0] as String?); +- assert(arg_groundOverlayId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); ++ assert( ++ arg_groundOverlayId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.', ++ ); + try { + api.onGroundOverlayTap(arg_groundOverlayId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.', ++ ); + final List args = (message as List?)!; +- final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); +- assert(arg_poi != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); ++ final PlatformPointOfInterest? arg_poi = ++ (args[0] as PlatformPointOfInterest?); ++ assert( ++ arg_poi != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.', ++ ); + try { + api.onPoiTap(arg_poi!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.', ++ ); + final List args = (message as List?)!; + final String? arg_tileOverlayId = (args[0] as String?); +- assert(arg_tileOverlayId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); ++ assert( ++ arg_tileOverlayId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.', ++ ); + final PlatformPoint? arg_location = (args[1] as PlatformPoint?); +- assert(arg_location != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); ++ assert( ++ arg_location != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.', ++ ); + final int? arg_zoom = (args[2] as int?); +- assert(arg_zoom != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); ++ assert( ++ arg_zoom != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.', ++ ); + try { +- final PlatformTile output = await api.getTileOverlayTile(arg_tileOverlayId!, arg_location!, arg_zoom!); ++ final PlatformTile output = await api.getTileOverlayTile( ++ arg_tileOverlayId!, ++ arg_location!, ++ arg_zoom!, ++ ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); +- } catch (e) { +- return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); ++ } catch (e) { ++ return wrapResponse( ++ error: PlatformException(code: 'error', message: e.toString()), ++ ); + } + }); + } +@@ -3716,9 +3780,13 @@ 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 = ''}) +- : pigeonVar_binaryMessenger = binaryMessenger, +- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ MapsPlatformViewApi({ ++ BinaryMessenger? binaryMessenger, ++ String messageChannelSuffix = '', ++ }) : pigeonVar_binaryMessenger = binaryMessenger, ++ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); +@@ -3726,13 +3794,16 @@ class MapsPlatformViewApi { + final String pigeonVar_messageChannelSuffix; + + Future createView(PlatformMapViewCreationParams? type) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [type], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3753,9 +3824,13 @@ 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 = ''}) +- : pigeonVar_binaryMessenger = binaryMessenger, +- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ MapsInspectorApi({ ++ BinaryMessenger? binaryMessenger, ++ String messageChannelSuffix = '', ++ }) : pigeonVar_binaryMessenger = binaryMessenger, ++ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); +@@ -3763,7 +3838,8 @@ class MapsInspectorApi { + final String pigeonVar_messageChannelSuffix; + + Future areBuildingsEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3790,7 +3866,8 @@ class MapsInspectorApi { + } + + Future areRotateGesturesEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3817,7 +3894,8 @@ class MapsInspectorApi { + } + + Future areScrollGesturesEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3844,7 +3922,8 @@ class MapsInspectorApi { + } + + Future areTiltGesturesEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3871,7 +3950,8 @@ class MapsInspectorApi { + } + + Future areZoomGesturesEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3898,7 +3978,8 @@ class MapsInspectorApi { + } + + Future isCompassEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3925,7 +4006,8 @@ class MapsInspectorApi { + } + + Future isMyLocationButtonEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3952,7 +4034,8 @@ class MapsInspectorApi { + } + + Future isTrafficEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3979,13 +4062,16 @@ class MapsInspectorApi { + } + + Future getTileOverlayInfo(String tileOverlayId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [tileOverlayId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -4000,14 +4086,19 @@ class MapsInspectorApi { + } + } + +- Future getGroundOverlayInfo(String groundOverlayId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo'; ++ Future getGroundOverlayInfo( ++ String groundOverlayId, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [groundOverlayId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -4023,13 +4114,16 @@ class MapsInspectorApi { + } + + Future getHeatmapInfo(String heatmapId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([heatmapId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [heatmapId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -4045,7 +4139,8 @@ class MapsInspectorApi { + } + + Future getZoomRange() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4072,13 +4167,16 @@ class MapsInspectorApi { + } + + Future> getClusters(String clusterManagerId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [clusterManagerId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -4094,12 +4192,14 @@ class MapsInspectorApi { + message: 'Host platform returned null value for non-null return value.', + ); + } else { +- return (pigeonVar_replyList[0] as List?)!.cast(); ++ return (pigeonVar_replyList[0] as List?)! ++ .cast(); + } + } + + Future getCameraPosition() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index 3a6a56cccc53..fe2da120abf1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -237,7 +237,6 @@ class PlatformMarker { final String? clusterManagerId; } - /// Pigeon equivalent of the Point of Interest class. class PlatformPointOfInterest { PlatformPointOfInterest({ diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart index 9a75ba20f4f3..b98fc01ea27f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart @@ -1361,9 +1361,7 @@ void main() { mapId, ); - final stream = StreamQueue( - maps.onPoiTap(mapId: mapId), - ); + final stream = StreamQueue(maps.onPoiTap(mapId: mapId)); // Simulate a message from the native side via the Pigeon generated handler callbackHandler.onPoiTap( @@ -1377,7 +1375,7 @@ void main() { // Verify the event in the stream final MapPoiTapEvent event = await stream.next; expect(event.mapId, mapId); - + final PointOfInterest poi = event.value; expect(poi.position.latitude, fakePosition.latitude); expect(poi.position.longitude, fakePosition.longitude); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/method_channel/method_channel_google_maps_flutter_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/method_channel/method_channel_google_maps_flutter_test.dart index 5fb762454478..caa12fbb7d98 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/method_channel/method_channel_google_maps_flutter_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/method_channel/method_channel_google_maps_flutter_test.dart @@ -139,8 +139,7 @@ void main() { ); }); test('onPoiTap', () async { - final platform = - MethodChannelGoogleMapsFlutter(); + final platform = MethodChannelGoogleMapsFlutter(); const mapId = 0; platform.ensureChannelInitialized(mapId); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart index 97a31f6dd369..10be2cd4ecb1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart @@ -156,8 +156,7 @@ void main() { }); test('onPoiTap default implementation throws UnimplementedError', () { - final platform = - ExtendsGoogleMapsFlutterPlatform(); + final platform = ExtendsGoogleMapsFlutterPlatform(); // Most stream methods in the platform interface should provide a stream or throw. // Verify that your new onPoiTap is reachable. expect(() => platform.onPoiTap(mapId: 0), throwsUnimplementedError); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart index a922fc42b8b2..81fd56c0ca8b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart @@ -13,8 +13,6 @@ import 'package:google_maps_flutter_web/google_maps_flutter_web.dart'; import 'package:google_maps_flutter_web/src/utils.dart'; import 'package:integration_test/integration_test.dart'; - - @JS() @anonymous extension type FakeIconMouseEvent._(JSObject _) implements JSObject { @@ -54,7 +52,9 @@ void main() { controller.dispose(); }); - testWidgets('Emits MapPoiTapEvent when clicking a POI', (WidgetTester tester) async { + testWidgets('Emits MapPoiTapEvent when clicking a POI', ( + WidgetTester tester, + ) async { final latLng = gmaps.LatLng(10, 20); bool? stopCalled = false; @@ -80,10 +80,11 @@ void main() { expect(stopCalled, isTrue); }); - testWidgets('Emits MapTapEvent when clicking (no POI)', (WidgetTester tester) async { + testWidgets('Emits MapTapEvent when clicking (no POI)', ( + WidgetTester tester, + ) async { final latLng = gmaps.LatLng(30, 40); - final event = gmaps.MapMouseEvent() - ..latLng = latLng; + final event = gmaps.MapMouseEvent()..latLng = latLng; gmaps.event.trigger(map, 'click', event); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index 3df878f43389..b16639f9897d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -262,9 +262,9 @@ class GoogleMapController { if (!_streamController.isClosed) { if (event is gmaps.IconMouseEvent && event.placeId != null) { final String placeId = event.placeId!; - + // Stop the event to prevent the default Google Maps InfoWindow from popping up - event.stop(); + event.stop(); _streamController.add( MapPoiTapEvent( From 7c7c0db9dc86a0dd29f15a2013d72f0e7bc367c8 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 12:33:32 +0530 Subject: [PATCH 29/46] [google_maps_flutter] corrected formatting issues --- .../lib/src/messages.g.dart | 816 ++++++++++++------ .../google_maps_flutter_pigeon_messages.g.m | 40 +- .../google_maps_flutter_pigeon_messages.g.h | 559 ++++++------ .../lib/src/messages.g.dart | 778 +++++++++++------ 4 files changed, 1385 insertions(+), 808 deletions(-) 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 d03c64a1d86d..62c8297478fb 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 @@ -31,64 +31,43 @@ List wrapResponse({ } return [error.code, error.message, error.details]; } + bool _deepEquals(Object? a, Object? b) { if (a is List && b is List) { return a.length == b.length && - a.indexed - .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); } if (a is Map && b is Map) { - return a.length == b.length && a.entries.every((MapEntry entry) => - (b as Map).containsKey(entry.key) && - _deepEquals(entry.value, b[entry.key])); + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); } return a == b; } - /// Pigeon equivalent of MapType -enum PlatformMapType { - none, - normal, - satellite, - terrain, - hybrid, -} +enum PlatformMapType { none, normal, satellite, terrain, hybrid } -enum PlatformRendererType { - legacy, - latest, -} +enum PlatformRendererType { legacy, latest } /// Join types for polyline joints. -enum PlatformJointType { - mitered, - bevel, - round, -} +enum PlatformJointType { mitered, bevel, round } /// Enumeration of possible types of PlatformCap, corresponding to the /// subclasses of Cap in the Google Maps Android SDK. /// See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. -enum PlatformCapType { - buttCap, - roundCap, - squareCap, - customCap, -} +enum PlatformCapType { buttCap, roundCap, squareCap, customCap } /// Enumeration of possible types for PatternItem. -enum PlatformPatternItemType { - dot, - dash, - gap, -} +enum PlatformPatternItemType { dot, dash, gap } /// Pigeon equivalent of [MapBitmapScaling]. -enum PlatformMapBitmapScaling { - auto, - none, -} +enum PlatformMapBitmapScaling { auto, none } /// Pigeon representatation of a CameraPosition. class PlatformCameraPosition { @@ -2732,8 +2711,10 @@ class MapsApi { /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty + ? '.$messageChannelSuffix' + : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -2742,7 +2723,8 @@ class MapsApi { /// Returns once the map instance is available. Future waitForMap() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -2767,14 +2749,19 @@ class MapsApi { /// /// Only non-null configuration values will result in updates; options with /// null values will remain unchanged. - Future updateMapConfiguration(PlatformMapConfiguration configuration) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; + Future updateMapConfiguration( + PlatformMapConfiguration configuration, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [configuration], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2790,14 +2777,21 @@ class MapsApi { } /// Updates the set of circles on the map. - Future updateCircles(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; + Future updateCircles( + List toAdd, + List toChange, + List idsToRemove, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2813,14 +2807,21 @@ class MapsApi { } /// Updates the set of heatmaps on the map. - Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; + Future updateHeatmaps( + List toAdd, + List toChange, + List idsToRemove, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2836,14 +2837,20 @@ class MapsApi { } /// Updates the set of custer managers for clusters on the map. - Future updateClusterManagers(List toAdd, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; + Future updateClusterManagers( + List toAdd, + List idsToRemove, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, idsToRemove], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2859,14 +2866,21 @@ class MapsApi { } /// Updates the set of markers on the map. - Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; + Future updateMarkers( + List toAdd, + List toChange, + List idsToRemove, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2882,14 +2896,21 @@ class MapsApi { } /// Updates the set of polygonss on the map. - Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; + Future updatePolygons( + List toAdd, + List toChange, + List idsToRemove, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2905,14 +2926,21 @@ class MapsApi { } /// Updates the set of polylines on the map. - Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; + Future updatePolylines( + List toAdd, + List toChange, + List idsToRemove, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2928,14 +2956,21 @@ class MapsApi { } /// Updates the set of tile overlays on the map. - Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; + Future updateTileOverlays( + List toAdd, + List toChange, + List idsToRemove, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2951,14 +2986,21 @@ class MapsApi { } /// Updates the set of ground overlays on the map. - Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; + Future updateGroundOverlays( + List toAdd, + List toChange, + List idsToRemove, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2975,13 +3017,16 @@ class MapsApi { /// Gets the screen coordinate for the given map location. Future getScreenCoordinate(PlatformLatLng latLng) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [latLng], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3003,13 +3048,16 @@ class MapsApi { /// Gets the map location for the given screen coordinate. Future getLatLng(PlatformPoint screenCoordinate) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [screenCoordinate], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3031,7 +3079,8 @@ class MapsApi { /// Gets the map region currently displayed on the map. Future getVisibleRegion() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3060,13 +3109,16 @@ class MapsApi { /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. Future moveCamera(PlatformCameraUpdate cameraUpdate) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraUpdate], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3083,14 +3135,20 @@ class MapsApi { /// Moves the camera according to [cameraUpdate], animating the update using a /// duration in milliseconds if provided. - Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; + Future animateCamera( + PlatformCameraUpdate cameraUpdate, + int? durationMilliseconds, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraUpdate, durationMilliseconds], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3107,7 +3165,8 @@ class MapsApi { /// Gets the current map zoom level. Future getZoomLevel() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3135,13 +3194,16 @@ class MapsApi { /// Show the info window for the marker with the given ID. Future showInfoWindow(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [markerId], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3158,13 +3220,16 @@ class MapsApi { /// Hide the info window for the marker with the given ID. Future hideInfoWindow(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [markerId], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3182,13 +3247,16 @@ class MapsApi { /// Returns true if the marker with the given ID is currently displaying its /// info window. Future isInfoWindowShown(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [markerId], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3214,13 +3282,16 @@ class MapsApi { /// Returns false if there was an error setting the style, such as an invalid /// style string. Future setStyle(String style) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [style], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3246,7 +3317,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 pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3274,13 +3346,16 @@ class MapsApi { /// Clears the cache of tiles previously requseted from the tile provider. Future clearTileCache(String tileOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [tileOverlayId], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3297,7 +3372,8 @@ class MapsApi { /// Takes a snapshot of the map and returns its image data. Future takeSnapshot() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3376,14 +3452,26 @@ abstract class MapsCallbackApi { void onGroundOverlayTap(String groundOverlayId); /// Called to get data for a map tile. - Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); + Future getTileOverlayTile( + String tileOverlayId, + PlatformPoint location, + int zoom, + ); - static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { - messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + static void setUp( + MapsCallbackApi? api, { + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) { + messageChannelSuffix = messageChannelSuffix.isNotEmpty + ? '.$messageChannelSuffix' + : ''; { final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { @@ -3393,41 +3481,54 @@ 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null.'); + assert( + message != 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?); - assert(arg_cameraPosition != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null, expected non-null 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 { api.onCameraMove(arg_cameraPosition!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { @@ -3437,373 +3538,502 @@ 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null.'); + assert( + message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); + assert( + arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.', + ); try { api.onTap(arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null.'); + assert( + message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); + assert( + arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.', + ); try { api.onLongPress(arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null.'); + assert( + message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); + assert( + arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null, expected non-null String.', + ); try { api.onMarkerTap(arg_markerId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null.'); + assert( + message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); + assert( + arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.', + ); final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); + assert( + arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.', + ); try { api.onMarkerDragStart(arg_markerId!, arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null.'); + assert( + message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); + assert( + arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null String.', + ); final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); + assert( + arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.', + ); try { api.onMarkerDrag(arg_markerId!, arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null.'); + assert( + message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); + assert( + arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.', + ); final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); + assert( + arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.', + ); try { api.onMarkerDragEnd(arg_markerId!, arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null.'); + assert( + message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); + assert( + arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.', + ); try { api.onInfoWindowTap(arg_markerId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null.'); + assert( + message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null, expected non-null String.'); + assert( + arg_circleId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null, expected non-null String.', + ); try { api.onCircleTap(arg_circleId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null.'); + assert( + message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); + assert( + arg_cluster != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.', + ); try { api.onClusterTap(arg_cluster!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.', + ); final List args = (message as List?)!; - final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); - assert(arg_poi != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); + final PlatformPointOfInterest? arg_poi = + (args[0] as PlatformPointOfInterest?); + assert( + arg_poi != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.', + ); try { api.onPoiTap(arg_poi!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null.'); + assert( + message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); + assert( + arg_polygonId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null, expected non-null String.', + ); try { api.onPolygonTap(arg_polygonId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null.'); + assert( + message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); + assert( + arg_polylineId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null, expected non-null String.', + ); try { api.onPolylineTap(arg_polylineId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.', + ); final List args = (message as List?)!; final String? arg_groundOverlayId = (args[0] as String?); - assert(arg_groundOverlayId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); + assert( + arg_groundOverlayId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.', + ); try { api.onGroundOverlayTap(arg_groundOverlayId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null.'); + assert( + message != 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, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); + assert( + arg_tileOverlayId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.', + ); final PlatformPoint? arg_location = (args[1] as PlatformPoint?); - assert(arg_location != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); + assert( + arg_location != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.', + ); final int? arg_zoom = (args[2] as int?); - assert(arg_zoom != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); + 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()), + ); } }); } @@ -3816,9 +4046,13 @@ 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 = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + MapsInitializerApi({ + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty + ? '.$messageChannelSuffix' + : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -3831,14 +4065,19 @@ class MapsInitializerApi { /// /// Calling this more than once in the lifetime of an application will result /// in an error. - Future initializeWithPreferredRenderer(PlatformRendererType? type) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer$pigeonVar_messageChannelSuffix'; + Future initializeWithPreferredRenderer( + PlatformRendererType? type, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [type], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3861,7 +4100,8 @@ class MapsInitializerApi { /// Attempts to trigger any thread-blocking work /// the Google Maps SDK normally does when a map is shown for the first time. Future warmup() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3890,9 +4130,13 @@ 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 = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + MapsPlatformViewApi({ + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty + ? '.$messageChannelSuffix' + : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -3900,13 +4144,16 @@ class MapsPlatformViewApi { final String pigeonVar_messageChannelSuffix; Future createView(PlatformMapViewCreationParams? type) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [type], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3927,9 +4174,13 @@ 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 = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + MapsInspectorApi({ + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty + ? '.$messageChannelSuffix' + : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -3937,7 +4188,8 @@ class MapsInspectorApi { final String pigeonVar_messageChannelSuffix; Future areBuildingsEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3964,7 +4216,8 @@ class MapsInspectorApi { } Future areRotateGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3991,7 +4244,8 @@ class MapsInspectorApi { } Future areZoomControlsEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4018,7 +4272,8 @@ class MapsInspectorApi { } Future areScrollGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4045,7 +4300,8 @@ class MapsInspectorApi { } Future areTiltGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4072,7 +4328,8 @@ class MapsInspectorApi { } Future areZoomGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4099,7 +4356,8 @@ class MapsInspectorApi { } Future isCompassEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4126,7 +4384,8 @@ class MapsInspectorApi { } Future isLiteModeEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4148,7 +4407,8 @@ class MapsInspectorApi { } Future isMapToolbarEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4175,7 +4435,8 @@ class MapsInspectorApi { } Future isMyLocationButtonEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4202,7 +4463,8 @@ class MapsInspectorApi { } Future isTrafficEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4229,13 +4491,16 @@ class MapsInspectorApi { } Future getTileOverlayInfo(String tileOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [tileOverlayId], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -4250,14 +4515,19 @@ class MapsInspectorApi { } } - Future getGroundOverlayInfo(String groundOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; + Future getGroundOverlayInfo( + String groundOverlayId, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [groundOverlayId], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -4273,7 +4543,8 @@ class MapsInspectorApi { } Future getZoomRange() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4300,13 +4571,16 @@ class MapsInspectorApi { } Future> getClusters(String clusterManagerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [clusterManagerId], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -4322,12 +4596,14 @@ class MapsInspectorApi { message: 'Host platform returned null value for non-null return value.', ); } else { - return (pigeonVar_replyList[0] as List?)!.cast(); + return (pigeonVar_replyList[0] as List?)! + .cast(); } } Future getCameraPosition() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m index 60d18f1a8c67..c9619799c8e4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m @@ -2274,11 +2274,11 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, binaryMessenger:binaryMessenger codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updatePolylinesByAdding: - changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updatePolylinesByAdding:changing:removing:error:)", - api); + NSCAssert( + [api respondsToSelector:@selector(updatePolylinesByAdding:changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updatePolylinesByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); @@ -2305,11 +2305,11 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, binaryMessenger:binaryMessenger codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateTileOverlaysByAdding: - changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateTileOverlaysByAdding:changing:removing:error:)", - api); + NSCAssert( + [api respondsToSelector:@selector(updateTileOverlaysByAdding:changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateTileOverlaysByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); @@ -2336,11 +2336,11 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, binaryMessenger:binaryMessenger codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateGroundOverlaysByAdding: - changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateGroundOverlaysByAdding:changing:removing:error:)", - api); + NSCAssert( + [api respondsToSelector:@selector(updateGroundOverlaysByAdding:changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateGroundOverlaysByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); @@ -2569,11 +2569,11 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, binaryMessenger:binaryMessenger codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier: - error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)", - api); + NSCAssert( + [api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_markerId = GetNullableObjectAtIndex(args, 0); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h index 310bf163a356..b1d81e6cc9e2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h @@ -114,26 +114,26 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @interface FGMPlatformCameraPosition : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBearing:(double )bearing - target:(FGMPlatformLatLng *)target - tilt:(double )tilt - zoom:(double )zoom; -@property(nonatomic, assign) double bearing; -@property(nonatomic, strong) FGMPlatformLatLng * target; -@property(nonatomic, assign) double tilt; -@property(nonatomic, assign) double zoom; ++ (instancetype)makeWithBearing:(double)bearing + target:(FGMPlatformLatLng *)target + tilt:(double)tilt + zoom:(double)zoom; +@property(nonatomic, assign) double bearing; +@property(nonatomic, strong) FGMPlatformLatLng *target; +@property(nonatomic, assign) double tilt; +@property(nonatomic, assign) double zoom; @end /// Pigeon representation of a CameraUpdate. @interface FGMPlatformCameraUpdate : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithCameraUpdate:(id )cameraUpdate; ++ (instancetype)makeWithCameraUpdate:(id)cameraUpdate; /// This Object must be one of the classes below prefixed with /// PlatformCameraUpdate. Each such class represents a different type of /// camera update, and each holds a different set of data, preventing the /// use of a single unified class. -@property(nonatomic, strong) id cameraUpdate; +@property(nonatomic, strong) id cameraUpdate; @end /// Pigeon equivalent of NewCameraPosition @@ -149,87 +149,83 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng; -@property(nonatomic, strong) FGMPlatformLatLng * latLng; +@property(nonatomic, strong) FGMPlatformLatLng *latLng; @end /// Pigeon equivalent of NewLatLngBounds @interface FGMPlatformCameraUpdateNewLatLngBounds : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds - padding:(double )padding; -@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; -@property(nonatomic, assign) double padding; ++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding; +@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds; +@property(nonatomic, assign) double padding; @end /// Pigeon equivalent of NewLatLngZoom @interface FGMPlatformCameraUpdateNewLatLngZoom : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng - zoom:(double )zoom; -@property(nonatomic, strong) FGMPlatformLatLng * latLng; -@property(nonatomic, assign) double zoom; ++ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom; +@property(nonatomic, strong) FGMPlatformLatLng *latLng; +@property(nonatomic, assign) double zoom; @end /// Pigeon equivalent of ScrollBy @interface FGMPlatformCameraUpdateScrollBy : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithDx:(double )dx - dy:(double )dy; -@property(nonatomic, assign) double dx; -@property(nonatomic, assign) double dy; ++ (instancetype)makeWithDx:(double)dx dy:(double)dy; +@property(nonatomic, assign) double dx; +@property(nonatomic, assign) double dy; @end /// Pigeon equivalent of ZoomBy @interface FGMPlatformCameraUpdateZoomBy : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAmount:(double )amount - focus:(nullable FGMPlatformPoint *)focus; -@property(nonatomic, assign) double amount; -@property(nonatomic, strong, nullable) FGMPlatformPoint * focus; ++ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus; +@property(nonatomic, assign) double amount; +@property(nonatomic, strong, nullable) FGMPlatformPoint *focus; @end /// Pigeon equivalent of ZoomIn/ZoomOut @interface FGMPlatformCameraUpdateZoom : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithOut:(BOOL )out; -@property(nonatomic, assign) BOOL out; ++ (instancetype)makeWithOut:(BOOL)out; +@property(nonatomic, assign) BOOL out; @end /// Pigeon equivalent of ZoomTo @interface FGMPlatformCameraUpdateZoomTo : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithZoom:(double )zoom; -@property(nonatomic, assign) double zoom; ++ (instancetype)makeWithZoom:(double)zoom; +@property(nonatomic, assign) double zoom; @end /// Pigeon equivalent of the Circle class. @interface FGMPlatformCircle : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithConsumeTapEvents:(BOOL )consumeTapEvents - fillColor:(FGMPlatformColor *)fillColor - strokeColor:(FGMPlatformColor *)strokeColor - visible:(BOOL )visible - strokeWidth:(NSInteger )strokeWidth - zIndex:(double )zIndex - center:(FGMPlatformLatLng *)center - radius:(double )radius - circleId:(NSString *)circleId; -@property(nonatomic, assign) BOOL consumeTapEvents; -@property(nonatomic, strong) FGMPlatformColor * fillColor; -@property(nonatomic, strong) FGMPlatformColor * strokeColor; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger strokeWidth; -@property(nonatomic, assign) double zIndex; -@property(nonatomic, strong) FGMPlatformLatLng * center; -@property(nonatomic, assign) double radius; -@property(nonatomic, copy) NSString * circleId; ++ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents + fillColor:(FGMPlatformColor *)fillColor + strokeColor:(FGMPlatformColor *)strokeColor + visible:(BOOL)visible + strokeWidth:(NSInteger)strokeWidth + zIndex:(double)zIndex + center:(FGMPlatformLatLng *)center + radius:(double)radius + circleId:(NSString *)circleId; +@property(nonatomic, assign) BOOL consumeTapEvents; +@property(nonatomic, strong) FGMPlatformColor *fillColor; +@property(nonatomic, strong) FGMPlatformColor *strokeColor; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger strokeWidth; +@property(nonatomic, assign) double zIndex; +@property(nonatomic, strong) FGMPlatformLatLng *center; +@property(nonatomic, assign) double radius; +@property(nonatomic, copy) NSString *circleId; @end /// Pigeon equivalent of the Heatmap class. @@ -261,21 +257,20 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithColors:(NSArray *)colors - startPoints:(NSArray *)startPoints - colorMapSize:(NSInteger )colorMapSize; -@property(nonatomic, copy) NSArray * colors; -@property(nonatomic, copy) NSArray * startPoints; -@property(nonatomic, assign) NSInteger colorMapSize; + startPoints:(NSArray *)startPoints + colorMapSize:(NSInteger)colorMapSize; +@property(nonatomic, copy) NSArray *colors; +@property(nonatomic, copy) NSArray *startPoints; +@property(nonatomic, assign) NSInteger colorMapSize; @end /// Pigeon equivalent of the WeightedLatLng class. @interface FGMPlatformWeightedLatLng : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point - weight:(double )weight; -@property(nonatomic, strong) FGMPlatformLatLng * point; -@property(nonatomic, assign) double weight; ++ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point weight:(double)weight; +@property(nonatomic, strong) FGMPlatformLatLng *point; +@property(nonatomic, assign) double weight; @end /// Pigeon equivalent of the InfoWindow class. @@ -309,39 +304,39 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithIdentifier:(NSString *)identifier; -@property(nonatomic, copy) NSString * identifier; +@property(nonatomic, copy) NSString *identifier; @end /// Pigeon equivalent of the Marker class. @interface FGMPlatformMarker : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAlpha:(double )alpha - anchor:(FGMPlatformPoint *)anchor - consumeTapEvents:(BOOL )consumeTapEvents - draggable:(BOOL )draggable - flat:(BOOL )flat - icon:(FGMPlatformBitmap *)icon - infoWindow:(FGMPlatformInfoWindow *)infoWindow - position:(FGMPlatformLatLng *)position - rotation:(double )rotation - visible:(BOOL )visible - zIndex:(NSInteger )zIndex - markerId:(NSString *)markerId - clusterManagerId:(nullable NSString *)clusterManagerId; -@property(nonatomic, assign) double alpha; -@property(nonatomic, strong) FGMPlatformPoint * anchor; -@property(nonatomic, assign) BOOL consumeTapEvents; -@property(nonatomic, assign) BOOL draggable; -@property(nonatomic, assign) BOOL flat; -@property(nonatomic, strong) FGMPlatformBitmap * icon; -@property(nonatomic, strong) FGMPlatformInfoWindow * infoWindow; -@property(nonatomic, strong) FGMPlatformLatLng * position; -@property(nonatomic, assign) double rotation; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, copy) NSString * markerId; -@property(nonatomic, copy, nullable) NSString * clusterManagerId; ++ (instancetype)makeWithAlpha:(double)alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL)consumeTapEvents + draggable:(BOOL)draggable + flat:(BOOL)flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double)rotation + visible:(BOOL)visible + zIndex:(NSInteger)zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId; +@property(nonatomic, assign) double alpha; +@property(nonatomic, strong) FGMPlatformPoint *anchor; +@property(nonatomic, assign) BOOL consumeTapEvents; +@property(nonatomic, assign) BOOL draggable; +@property(nonatomic, assign) BOOL flat; +@property(nonatomic, strong) FGMPlatformBitmap *icon; +@property(nonatomic, strong) FGMPlatformInfoWindow *infoWindow; +@property(nonatomic, strong) FGMPlatformLatLng *position; +@property(nonatomic, assign) double rotation; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, copy) NSString *markerId; +@property(nonatomic, copy, nullable) NSString *clusterManagerId; @end /// Pigeon equivalent of the Point of Interest class. @@ -387,49 +382,48 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithPolylineId:(NSString *)polylineId - consumesTapEvents:(BOOL )consumesTapEvents - color:(FGMPlatformColor *)color - geodesic:(BOOL )geodesic - jointType:(FGMPlatformJointType)jointType - patterns:(NSArray *)patterns - points:(NSArray *)points - visible:(BOOL )visible - width:(NSInteger )width - zIndex:(NSInteger )zIndex; -@property(nonatomic, copy) NSString * polylineId; -@property(nonatomic, assign) BOOL consumesTapEvents; -@property(nonatomic, strong) FGMPlatformColor * color; -@property(nonatomic, assign) BOOL geodesic; + consumesTapEvents:(BOOL)consumesTapEvents + color:(FGMPlatformColor *)color + geodesic:(BOOL)geodesic + jointType:(FGMPlatformJointType)jointType + patterns:(NSArray *)patterns + points:(NSArray *)points + visible:(BOOL)visible + width:(NSInteger)width + zIndex:(NSInteger)zIndex; +@property(nonatomic, copy) NSString *polylineId; +@property(nonatomic, assign) BOOL consumesTapEvents; +@property(nonatomic, strong) FGMPlatformColor *color; +@property(nonatomic, assign) BOOL geodesic; /// The joint type. @property(nonatomic, assign) FGMPlatformJointType jointType; /// The pattern data, as a list of pattern items. -@property(nonatomic, copy) NSArray * patterns; -@property(nonatomic, copy) NSArray * points; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger width; -@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, copy) NSArray *patterns; +@property(nonatomic, copy) NSArray *points; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger width; +@property(nonatomic, assign) NSInteger zIndex; @end /// Pigeon equivalent of the PatternItem class. @interface FGMPlatformPatternItem : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type - length:(nullable NSNumber *)length; ++ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length; @property(nonatomic, assign) FGMPlatformPatternItemType type; -@property(nonatomic, strong, nullable) NSNumber * length; +@property(nonatomic, strong, nullable) NSNumber *length; @end /// Pigeon equivalent of the Tile class. @interface FGMPlatformTile : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithWidth:(NSInteger )width - height:(NSInteger )height - data:(nullable FlutterStandardTypedData *)data; -@property(nonatomic, assign) NSInteger width; -@property(nonatomic, assign) NSInteger height; -@property(nonatomic, strong, nullable) FlutterStandardTypedData * data; ++ (instancetype)makeWithWidth:(NSInteger)width + height:(NSInteger)height + data:(nullable FlutterStandardTypedData *)data; +@property(nonatomic, assign) NSInteger width; +@property(nonatomic, assign) NSInteger height; +@property(nonatomic, strong, nullable) FlutterStandardTypedData *data; @end /// Pigeon equivalent of the TileOverlay class. @@ -437,41 +431,37 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId - fadeIn:(BOOL )fadeIn - transparency:(double )transparency - zIndex:(NSInteger )zIndex - visible:(BOOL )visible - tileSize:(NSInteger )tileSize; -@property(nonatomic, copy) NSString * tileOverlayId; -@property(nonatomic, assign) BOOL fadeIn; -@property(nonatomic, assign) double transparency; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger tileSize; + fadeIn:(BOOL)fadeIn + transparency:(double)transparency + zIndex:(NSInteger)zIndex + visible:(BOOL)visible + tileSize:(NSInteger)tileSize; +@property(nonatomic, copy) NSString *tileOverlayId; +@property(nonatomic, assign) BOOL fadeIn; +@property(nonatomic, assign) double transparency; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger tileSize; @end /// Pigeon equivalent of Flutter's EdgeInsets. @interface FGMPlatformEdgeInsets : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithTop:(double )top - bottom:(double )bottom - left:(double )left - right:(double )right; -@property(nonatomic, assign) double top; -@property(nonatomic, assign) double bottom; -@property(nonatomic, assign) double left; -@property(nonatomic, assign) double right; ++ (instancetype)makeWithTop:(double)top bottom:(double)bottom left:(double)left right:(double)right; +@property(nonatomic, assign) double top; +@property(nonatomic, assign) double bottom; +@property(nonatomic, assign) double left; +@property(nonatomic, assign) double right; @end /// Pigeon equivalent of LatLng. @interface FGMPlatformLatLng : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithLatitude:(double )latitude - longitude:(double )longitude; -@property(nonatomic, assign) double latitude; -@property(nonatomic, assign) double longitude; ++ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude; +@property(nonatomic, assign) double latitude; +@property(nonatomic, assign) double longitude; @end /// Pigeon equivalent of LatLngBounds. @@ -498,147 +488,142 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId - image:(FGMPlatformBitmap *)image - position:(nullable FGMPlatformLatLng *)position - bounds:(nullable FGMPlatformLatLngBounds *)bounds - anchor:(nullable FGMPlatformPoint *)anchor - transparency:(double )transparency - bearing:(double )bearing - zIndex:(NSInteger )zIndex - visible:(BOOL )visible - clickable:(BOOL )clickable - zoomLevel:(nullable NSNumber *)zoomLevel; -@property(nonatomic, copy) NSString * groundOverlayId; -@property(nonatomic, strong) FGMPlatformBitmap * image; -@property(nonatomic, strong, nullable) FGMPlatformLatLng * position; -@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; -@property(nonatomic, strong, nullable) FGMPlatformPoint * anchor; -@property(nonatomic, assign) double transparency; -@property(nonatomic, assign) double bearing; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) BOOL clickable; -@property(nonatomic, strong, nullable) NSNumber * zoomLevel; + image:(FGMPlatformBitmap *)image + position:(nullable FGMPlatformLatLng *)position + bounds:(nullable FGMPlatformLatLngBounds *)bounds + anchor:(nullable FGMPlatformPoint *)anchor + transparency:(double)transparency + bearing:(double)bearing + zIndex:(NSInteger)zIndex + visible:(BOOL)visible + clickable:(BOOL)clickable + zoomLevel:(nullable NSNumber *)zoomLevel; +@property(nonatomic, copy) NSString *groundOverlayId; +@property(nonatomic, strong) FGMPlatformBitmap *image; +@property(nonatomic, strong, nullable) FGMPlatformLatLng *position; +@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds; +@property(nonatomic, strong, nullable) FGMPlatformPoint *anchor; +@property(nonatomic, assign) double transparency; +@property(nonatomic, assign) double bearing; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) BOOL clickable; +@property(nonatomic, strong, nullable) NSNumber *zoomLevel; @end /// Information passed to the platform view creation. @interface FGMPlatformMapViewCreationParams : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition - mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration - initialCircles:(NSArray *)initialCircles - initialMarkers:(NSArray *)initialMarkers - initialPolygons:(NSArray *)initialPolygons - initialPolylines:(NSArray *)initialPolylines - initialHeatmaps:(NSArray *)initialHeatmaps - initialTileOverlays:(NSArray *)initialTileOverlays - initialClusterManagers:(NSArray *)initialClusterManagers - initialGroundOverlays:(NSArray *)initialGroundOverlays; -@property(nonatomic, strong) FGMPlatformCameraPosition * initialCameraPosition; -@property(nonatomic, strong) FGMPlatformMapConfiguration * mapConfiguration; -@property(nonatomic, copy) NSArray * initialCircles; -@property(nonatomic, copy) NSArray * initialMarkers; -@property(nonatomic, copy) NSArray * initialPolygons; -@property(nonatomic, copy) NSArray * initialPolylines; -@property(nonatomic, copy) NSArray * initialHeatmaps; -@property(nonatomic, copy) NSArray * initialTileOverlays; -@property(nonatomic, copy) NSArray * initialClusterManagers; -@property(nonatomic, copy) NSArray * initialGroundOverlays; ++ (instancetype) + makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition + mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration + initialCircles:(NSArray *)initialCircles + initialMarkers:(NSArray *)initialMarkers + initialPolygons:(NSArray *)initialPolygons + initialPolylines:(NSArray *)initialPolylines + initialHeatmaps:(NSArray *)initialHeatmaps + initialTileOverlays:(NSArray *)initialTileOverlays + initialClusterManagers:(NSArray *)initialClusterManagers + initialGroundOverlays:(NSArray *)initialGroundOverlays; +@property(nonatomic, strong) FGMPlatformCameraPosition *initialCameraPosition; +@property(nonatomic, strong) FGMPlatformMapConfiguration *mapConfiguration; +@property(nonatomic, copy) NSArray *initialCircles; +@property(nonatomic, copy) NSArray *initialMarkers; +@property(nonatomic, copy) NSArray *initialPolygons; +@property(nonatomic, copy) NSArray *initialPolylines; +@property(nonatomic, copy) NSArray *initialHeatmaps; +@property(nonatomic, copy) NSArray *initialTileOverlays; +@property(nonatomic, copy) NSArray *initialClusterManagers; +@property(nonatomic, copy) NSArray *initialGroundOverlays; @end /// Pigeon equivalent of MapConfiguration. @interface FGMPlatformMapConfiguration : NSObject + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style; -@property(nonatomic, strong, nullable) NSNumber * compassEnabled; -@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds * cameraTargetBounds; -@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox * mapType; -@property(nonatomic, strong, nullable) FGMPlatformZoomRange * minMaxZoomPreference; -@property(nonatomic, strong, nullable) NSNumber * rotateGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber * scrollGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber * tiltGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber * trackCameraPosition; -@property(nonatomic, strong, nullable) NSNumber * zoomGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber * myLocationEnabled; -@property(nonatomic, strong, nullable) NSNumber * myLocationButtonEnabled; -@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets * padding; -@property(nonatomic, strong, nullable) NSNumber * indoorViewEnabled; -@property(nonatomic, strong, nullable) NSNumber * trafficEnabled; -@property(nonatomic, strong, nullable) NSNumber * buildingsEnabled; -@property(nonatomic, copy, nullable) NSString * mapId; -@property(nonatomic, copy, nullable) NSString * style; + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style; +@property(nonatomic, strong, nullable) NSNumber *compassEnabled; +@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds *cameraTargetBounds; +@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox *mapType; +@property(nonatomic, strong, nullable) FGMPlatformZoomRange *minMaxZoomPreference; +@property(nonatomic, strong, nullable) NSNumber *rotateGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber *scrollGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber *tiltGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber *trackCameraPosition; +@property(nonatomic, strong, nullable) NSNumber *zoomGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber *myLocationEnabled; +@property(nonatomic, strong, nullable) NSNumber *myLocationButtonEnabled; +@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets *padding; +@property(nonatomic, strong, nullable) NSNumber *indoorViewEnabled; +@property(nonatomic, strong, nullable) NSNumber *trafficEnabled; +@property(nonatomic, strong, nullable) NSNumber *buildingsEnabled; +@property(nonatomic, copy, nullable) NSString *mapId; +@property(nonatomic, copy, nullable) NSString *style; @end /// Pigeon representation of an x,y coordinate. @interface FGMPlatformPoint : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithX:(double )x - y:(double )y; -@property(nonatomic, assign) double x; -@property(nonatomic, assign) double y; ++ (instancetype)makeWithX:(double)x y:(double)y; +@property(nonatomic, assign) double x; +@property(nonatomic, assign) double y; @end /// Pigeon representation of a size. @interface FGMPlatformSize : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithWidth:(double )width - height:(double )height; -@property(nonatomic, assign) double width; -@property(nonatomic, assign) double height; ++ (instancetype)makeWithWidth:(double)width height:(double)height; +@property(nonatomic, assign) double width; +@property(nonatomic, assign) double height; @end /// Pigeon representation of a color. @interface FGMPlatformColor : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithRed:(double )red - green:(double )green - blue:(double )blue - alpha:(double )alpha; -@property(nonatomic, assign) double red; -@property(nonatomic, assign) double green; -@property(nonatomic, assign) double blue; -@property(nonatomic, assign) double alpha; ++ (instancetype)makeWithRed:(double)red green:(double)green blue:(double)blue alpha:(double)alpha; +@property(nonatomic, assign) double red; +@property(nonatomic, assign) double green; +@property(nonatomic, assign) double blue; +@property(nonatomic, assign) double alpha; @end /// Pigeon equivalent of GMSTileLayer properties. @interface FGMPlatformTileLayer : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithVisible:(BOOL )visible - fadeIn:(BOOL )fadeIn - opacity:(double )opacity - zIndex:(NSInteger )zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) BOOL fadeIn; -@property(nonatomic, assign) double opacity; -@property(nonatomic, assign) NSInteger zIndex; ++ (instancetype)makeWithVisible:(BOOL)visible + fadeIn:(BOOL)fadeIn + opacity:(double)opacity + zIndex:(NSInteger)zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) BOOL fadeIn; +@property(nonatomic, assign) double opacity; +@property(nonatomic, assign) NSInteger zIndex; @end /// Pigeon equivalent of MinMaxZoomPreference. @interface FGMPlatformZoomRange : NSObject -+ (instancetype)makeWithMin:(nullable NSNumber *)min - max:(nullable NSNumber *)max; -@property(nonatomic, strong, nullable) NSNumber * min; -@property(nonatomic, strong, nullable) NSNumber * max; ++ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max; +@property(nonatomic, strong, nullable) NSNumber *min; +@property(nonatomic, strong, nullable) NSNumber *max; @end /// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint @@ -669,19 +654,18 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - size:(nullable FGMPlatformSize *)size; -@property(nonatomic, strong) FlutterStandardTypedData * byteData; -@property(nonatomic, strong, nullable) FGMPlatformSize * size; + size:(nullable FGMPlatformSize *)size; +@property(nonatomic, strong) FlutterStandardTypedData *byteData; +@property(nonatomic, strong, nullable) FGMPlatformSize *size; @end /// Pigeon equivalent of [AssetBitmap]. @interface FGMPlatformBitmapAsset : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithName:(NSString *)name - pkg:(nullable NSString *)pkg; -@property(nonatomic, copy) NSString * name; -@property(nonatomic, copy, nullable) NSString * pkg; ++ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg; +@property(nonatomic, copy) NSString *name; +@property(nonatomic, copy, nullable) NSString *pkg; @end /// Pigeon equivalent of [AssetImageBitmap]. @@ -741,54 +725,87 @@ NSObject *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void); /// /// Only non-null configuration values will result in updates; options with /// null values will remain unchanged. -- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration + error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of circles on the map. -- (void)updateCirclesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateCirclesByAdding:(NSArray *)toAdd + changing:(NSArray *)toChange + removing:(NSArray *)idsToRemove + error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of heatmaps on the map. -- (void)updateHeatmapsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateHeatmapsByAdding:(NSArray *)toAdd + changing:(NSArray *)toChange + removing:(NSArray *)idsToRemove + error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of custer managers for clusters on the map. -- (void)updateClusterManagersByAdding:(NSArray *)toAdd removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateClusterManagersByAdding:(NSArray *)toAdd + removing:(NSArray *)idsToRemove + error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of markers on the map. -- (void)updateMarkersByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateMarkersByAdding:(NSArray *)toAdd + changing:(NSArray *)toChange + removing:(NSArray *)idsToRemove + error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of polygonss on the map. -- (void)updatePolygonsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updatePolygonsByAdding:(NSArray *)toAdd + changing:(NSArray *)toChange + removing:(NSArray *)idsToRemove + error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of polylines on the map. -- (void)updatePolylinesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updatePolylinesByAdding:(NSArray *)toAdd + changing:(NSArray *)toChange + removing:(NSArray *)idsToRemove + error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of tile overlays on the map. -- (void)updateTileOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateTileOverlaysByAdding:(NSArray *)toAdd + changing:(NSArray *)toChange + removing:(NSArray *)idsToRemove + error:(FlutterError *_Nullable *_Nonnull)error; /// Updates the set of ground overlays on the map. -- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd + changing:(NSArray *)toChange + removing:(NSArray *)idsToRemove + error:(FlutterError *_Nullable *_Nonnull)error; /// Gets the screen coordinate for the given map location. /// /// @return `nil` only when `error != nil`. -- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng + error:(FlutterError *_Nullable *_Nonnull)error; /// Gets the map location for the given screen coordinate. /// /// @return `nil` only when `error != nil`. -- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate + error:(FlutterError *_Nullable *_Nonnull)error; /// Gets the map region currently displayed on the map. /// /// @return `nil` only when `error != nil`. - (nullable FGMPlatformLatLngBounds *)visibleMapRegion:(FlutterError *_Nullable *_Nonnull)error; /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. -- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate error:(FlutterError *_Nullable *_Nonnull)error; +- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate + error:(FlutterError *_Nullable *_Nonnull)error; /// Moves the camera according to [cameraUpdate], animating the update using a /// duration in milliseconds if provided. -- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate duration:(nullable NSNumber *)durationMilliseconds error:(FlutterError *_Nullable *_Nonnull)error; +- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate + duration:(nullable NSNumber *)durationMilliseconds + error:(FlutterError *_Nullable *_Nonnull)error; /// Gets the current map zoom level. /// /// @return `nil` only when `error != nil`. - (nullable NSNumber *)currentZoomLevel:(FlutterError *_Nullable *_Nonnull)error; /// Show the info window for the marker with the given ID. -- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; +- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId + error:(FlutterError *_Nullable *_Nonnull)error; /// Hide the info window for the marker with the given ID. -- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; +- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns true if the marker with the given ID is currently displaying its /// info window. /// /// @return `nil` only when `error != nil`. -- (nullable NSNumber *)isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSNumber *) + isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId + error:(FlutterError *_Nullable *_Nonnull)error; /// Sets the style to the given map style string, where an empty string /// indicates that the style should be cleared. /// @@ -911,19 +928,29 @@ extern void SetUpFGMMapsPlatformViewApiWithSuffix(id bin - (nullable NSNumber *)isMyLocationButtonEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. - (nullable NSNumber *)isTrafficEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformGroundOverlay *)groundOverlayWithIdentifier:(NSString *)groundOverlayId error:(FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId + error: + (FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformGroundOverlay *) + groundOverlayWithIdentifier:(NSString *)groundOverlayId + error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId + error:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. - (nullable FGMPlatformZoomRange *)zoomRange:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. -- (nullable NSArray *)clustersWithIdentifier:(NSString *)clusterManagerId error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSArray *) + clustersWithIdentifier:(NSString *)clusterManagerId + error:(FlutterError *_Nullable *_Nonnull)error; /// @return `nil` only when `error != nil`. - (nullable FGMPlatformCameraPosition *)cameraPosition:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsInspectorApi(id binaryMessenger, NSObject *_Nullable api); +extern void SetUpFGMMapsInspectorApi(id binaryMessenger, + NSObject *_Nullable api); -extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); +extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, + NSObject *_Nullable api, + NSString *messageChannelSuffix); NS_ASSUME_NONNULL_END diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart index 8862d5668a78..0f2aec5ded52 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart @@ -31,49 +31,36 @@ List wrapResponse({ } return [error.code, error.message, error.details]; } + bool _deepEquals(Object? a, Object? b) { if (a is List && b is List) { return a.length == b.length && - a.indexed - .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); } if (a is Map && b is Map) { - return a.length == b.length && a.entries.every((MapEntry entry) => - (b as Map).containsKey(entry.key) && - _deepEquals(entry.value, b[entry.key])); + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); } return a == b; } - /// Pigeon equivalent of MapType -enum PlatformMapType { - none, - normal, - satellite, - terrain, - hybrid, -} +enum PlatformMapType { none, normal, satellite, terrain, hybrid } /// Join types for polyline joints. -enum PlatformJointType { - mitered, - bevel, - round, -} +enum PlatformJointType { mitered, bevel, round } /// Enumeration of possible types for PatternItem. -enum PlatformPatternItemType { - dot, - dash, - gap, -} +enum PlatformPatternItemType { dot, dash, gap } /// Pigeon equivalent of [MapBitmapScaling]. -enum PlatformMapBitmapScaling { - auto, - none, -} +enum PlatformMapBitmapScaling { auto, none } /// Pigeon representatation of a CameraPosition. class PlatformCameraPosition { @@ -2644,8 +2631,10 @@ class MapsApi { /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty + ? '.$messageChannelSuffix' + : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -2654,7 +2643,8 @@ class MapsApi { /// Returns once the map instance is available. Future waitForMap() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -2679,14 +2669,19 @@ class MapsApi { /// /// Only non-null configuration values will result in updates; options with /// null values will remain unchanged. - Future updateMapConfiguration(PlatformMapConfiguration configuration) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; + Future updateMapConfiguration( + PlatformMapConfiguration configuration, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [configuration], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2702,14 +2697,21 @@ class MapsApi { } /// Updates the set of circles on the map. - Future updateCircles(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; + Future updateCircles( + List toAdd, + List toChange, + List idsToRemove, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2725,14 +2727,21 @@ class MapsApi { } /// Updates the set of heatmaps on the map. - Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; + Future updateHeatmaps( + List toAdd, + List toChange, + List idsToRemove, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2748,14 +2757,20 @@ class MapsApi { } /// Updates the set of custer managers for clusters on the map. - Future updateClusterManagers(List toAdd, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; + Future updateClusterManagers( + List toAdd, + List idsToRemove, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, idsToRemove], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2771,14 +2786,21 @@ class MapsApi { } /// Updates the set of markers on the map. - Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; + Future updateMarkers( + List toAdd, + List toChange, + List idsToRemove, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2794,14 +2816,21 @@ class MapsApi { } /// Updates the set of polygonss on the map. - Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; + Future updatePolygons( + List toAdd, + List toChange, + List idsToRemove, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2817,14 +2846,21 @@ class MapsApi { } /// Updates the set of polylines on the map. - Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; + Future updatePolylines( + List toAdd, + List toChange, + List idsToRemove, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2840,14 +2876,21 @@ class MapsApi { } /// Updates the set of tile overlays on the map. - Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; + Future updateTileOverlays( + List toAdd, + List toChange, + List idsToRemove, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2863,14 +2906,21 @@ class MapsApi { } /// Updates the set of ground overlays on the map. - Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; + Future updateGroundOverlays( + List toAdd, + List toChange, + List idsToRemove, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2887,13 +2937,16 @@ class MapsApi { /// Gets the screen coordinate for the given map location. Future getScreenCoordinate(PlatformLatLng latLng) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [latLng], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2915,13 +2968,16 @@ class MapsApi { /// Gets the map location for the given screen coordinate. Future getLatLng(PlatformPoint screenCoordinate) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [screenCoordinate], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2943,7 +2999,8 @@ class MapsApi { /// Gets the map region currently displayed on the map. Future getVisibleRegion() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -2972,13 +3029,16 @@ class MapsApi { /// Moves the camera according to [cameraUpdate] immediately, with no /// animation. Future moveCamera(PlatformCameraUpdate cameraUpdate) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraUpdate], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -2995,14 +3055,20 @@ class MapsApi { /// Moves the camera according to [cameraUpdate], animating the update using a /// duration in milliseconds if provided. - Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; + Future animateCamera( + PlatformCameraUpdate cameraUpdate, + int? durationMilliseconds, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraUpdate, durationMilliseconds], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3019,7 +3085,8 @@ class MapsApi { /// Gets the current map zoom level. Future getZoomLevel() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3047,13 +3114,16 @@ class MapsApi { /// Show the info window for the marker with the given ID. Future showInfoWindow(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [markerId], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3070,13 +3140,16 @@ class MapsApi { /// Hide the info window for the marker with the given ID. Future hideInfoWindow(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [markerId], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3094,13 +3167,16 @@ class MapsApi { /// Returns true if the marker with the given ID is currently displaying its /// info window. Future isInfoWindowShown(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [markerId], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3126,13 +3202,16 @@ class MapsApi { /// If there was an error setting the style, such as an invalid style string, /// returns the error message. Future setStyle(String style) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [style], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3153,7 +3232,8 @@ class MapsApi { /// This allows checking asynchronously for initial style failures, as there /// is no way to return failures from map initialization. Future getLastStyleError() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3176,13 +3256,16 @@ class MapsApi { /// Clears the cache of tiles previously requseted from the tile provider. Future clearTileCache(String tileOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [tileOverlayId], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3199,7 +3282,8 @@ class MapsApi { /// Takes a snapshot of the map and returns its image data. Future takeSnapshot() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3274,14 +3358,26 @@ abstract class MapsCallbackApi { void onPoiTap(PlatformPointOfInterest poi); /// Called to get data for a map tile. - Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); + Future getTileOverlayTile( + String tileOverlayId, + PlatformPoint location, + int zoom, + ); - static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { - messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + static void setUp( + MapsCallbackApi? api, { + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) { + messageChannelSuffix = messageChannelSuffix.isNotEmpty + ? '.$messageChannelSuffix' + : ''; { final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { @@ -3291,41 +3387,54 @@ 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.', + ); final List args = (message as List?)!; - final PlatformCameraPosition? arg_cameraPosition = (args[0] as PlatformCameraPosition?); - assert(arg_cameraPosition != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.'); + final PlatformCameraPosition? arg_cameraPosition = + (args[0] as PlatformCameraPosition?); + assert( + arg_cameraPosition != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.', + ); try { api.onCameraMove(arg_cameraPosition!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { @@ -3335,373 +3444,502 @@ 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.', + ); final List args = (message as List?)!; final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); + assert( + arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.', + ); try { api.onTap(arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.', + ); final List args = (message as List?)!; final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); + assert( + arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.', + ); try { api.onLongPress(arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.', + ); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); + assert( + arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null, expected non-null String.', + ); try { api.onMarkerTap(arg_markerId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.', + ); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); + assert( + arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.', + ); final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); + assert( + arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.', + ); try { api.onMarkerDragStart(arg_markerId!, arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.', + ); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); + assert( + arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null String.', + ); final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); + assert( + arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.', + ); try { api.onMarkerDrag(arg_markerId!, arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.', + ); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); + assert( + arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.', + ); final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); + assert( + arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.', + ); try { api.onMarkerDragEnd(arg_markerId!, arg_position!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.', + ); final List args = (message as List?)!; final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); + assert( + arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.', + ); try { api.onInfoWindowTap(arg_markerId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.', + ); final List args = (message as List?)!; final String? arg_circleId = (args[0] as String?); - assert(arg_circleId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null, expected non-null String.'); + assert( + arg_circleId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null, expected non-null String.', + ); try { api.onCircleTap(arg_circleId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.', + ); final List args = (message as List?)!; final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); - assert(arg_cluster != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); + assert( + arg_cluster != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.', + ); try { api.onClusterTap(arg_cluster!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.', + ); final List args = (message as List?)!; final String? arg_polygonId = (args[0] as String?); - assert(arg_polygonId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); + assert( + arg_polygonId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null, expected non-null String.', + ); try { api.onPolygonTap(arg_polygonId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.', + ); final List args = (message as List?)!; final String? arg_polylineId = (args[0] as String?); - assert(arg_polylineId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); + assert( + arg_polylineId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null, expected non-null String.', + ); try { api.onPolylineTap(arg_polylineId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.', + ); final List args = (message as List?)!; final String? arg_groundOverlayId = (args[0] as String?); - assert(arg_groundOverlayId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); + assert( + arg_groundOverlayId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.', + ); try { api.onGroundOverlayTap(arg_groundOverlayId!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.', + ); final List args = (message as List?)!; - final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); - assert(arg_poi != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); + final PlatformPointOfInterest? arg_poi = + (args[0] as PlatformPointOfInterest?); + assert( + arg_poi != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.', + ); try { api.onPoiTap(arg_poi!); 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 pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); if (api == null) { pigeonVar_channel.setMessageHandler(null); } else { pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.'); + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.', + ); final List args = (message as List?)!; final String? arg_tileOverlayId = (args[0] as String?); - assert(arg_tileOverlayId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); + assert( + arg_tileOverlayId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.', + ); final PlatformPoint? arg_location = (args[1] as PlatformPoint?); - assert(arg_location != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); + assert( + arg_location != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.', + ); final int? arg_zoom = (args[2] as int?); - assert(arg_zoom != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); + assert( + arg_zoom != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.', + ); try { - final PlatformTile output = await api.getTileOverlayTile(arg_tileOverlayId!, arg_location!, arg_zoom!); + final PlatformTile output = await api.getTileOverlayTile( + arg_tileOverlayId!, + arg_location!, + arg_zoom!, + ); return wrapResponse(result: output); } on PlatformException catch (e) { return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); } }); } @@ -3716,9 +3954,13 @@ 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 = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + MapsPlatformViewApi({ + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty + ? '.$messageChannelSuffix' + : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -3726,13 +3968,16 @@ class MapsPlatformViewApi { final String pigeonVar_messageChannelSuffix; Future createView(PlatformMapViewCreationParams? type) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [type], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -3753,9 +3998,13 @@ 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 = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + MapsInspectorApi({ + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty + ? '.$messageChannelSuffix' + : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); @@ -3763,7 +4012,8 @@ class MapsInspectorApi { final String pigeonVar_messageChannelSuffix; Future areBuildingsEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3790,7 +4040,8 @@ class MapsInspectorApi { } Future areRotateGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3817,7 +4068,8 @@ class MapsInspectorApi { } Future areScrollGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3844,7 +4096,8 @@ class MapsInspectorApi { } Future areTiltGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3871,7 +4124,8 @@ class MapsInspectorApi { } Future areZoomGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3898,7 +4152,8 @@ class MapsInspectorApi { } Future isCompassEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3925,7 +4180,8 @@ class MapsInspectorApi { } Future isMyLocationButtonEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3952,7 +4208,8 @@ class MapsInspectorApi { } Future isTrafficEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3979,13 +4236,16 @@ class MapsInspectorApi { } Future getTileOverlayInfo(String tileOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [tileOverlayId], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -4000,14 +4260,19 @@ class MapsInspectorApi { } } - Future getGroundOverlayInfo(String groundOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; + Future getGroundOverlayInfo( + String groundOverlayId, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [groundOverlayId], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -4023,13 +4288,16 @@ class MapsInspectorApi { } Future getHeatmapInfo(String heatmapId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([heatmapId]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [heatmapId], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -4045,7 +4313,8 @@ class MapsInspectorApi { } Future getZoomRange() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -4072,13 +4341,16 @@ class MapsInspectorApi { } Future> getClusters(String clusterManagerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [clusterManagerId], + ); final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); @@ -4094,12 +4366,14 @@ class MapsInspectorApi { message: 'Host platform returned null value for non-null return value.', ); } else { - return (pigeonVar_replyList[0] as List?)!.cast(); + return (pigeonVar_replyList[0] as List?)! + .cast(); } } Future getCameraPosition() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, From cfd44c5233c204879e9609e2426c724fa6dd1886 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 13:06:24 +0530 Subject: [PATCH 30/46] [google_maps_flutter] updated code formatting --- .../google_maps_flutter_pigeon_messages.g.m | 40 +++++++++---------- .../test/types/point_of_interest_test.dart | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m index c9619799c8e4..60d18f1a8c67 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m @@ -2274,11 +2274,11 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, binaryMessenger:binaryMessenger codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(updatePolylinesByAdding:changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updatePolylinesByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updatePolylinesByAdding: + changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updatePolylinesByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); @@ -2305,11 +2305,11 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, binaryMessenger:binaryMessenger codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(updateTileOverlaysByAdding:changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateTileOverlaysByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateTileOverlaysByAdding: + changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateTileOverlaysByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); @@ -2336,11 +2336,11 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, binaryMessenger:binaryMessenger codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(updateGroundOverlaysByAdding:changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateGroundOverlaysByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateGroundOverlaysByAdding: + changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateGroundOverlaysByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); @@ -2569,11 +2569,11 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, binaryMessenger:binaryMessenger codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier: + error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_markerId = GetNullableObjectAtIndex(args, 0); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/point_of_interest_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/point_of_interest_test.dart index f92a748d6244..b25e43629d64 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/point_of_interest_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/point_of_interest_test.dart @@ -1,4 +1,4 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. +// Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. From 5fab78535169e6ea78b1584be305a2c1f7b8f998 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 13:27:27 +0530 Subject: [PATCH 31/46] [google_maps_flutter] Add onPoiTap to platform interface --- .../google_maps_flutter/force_overrides.ps1 | 66 ++ .../google_maps_flutter/CHANGELOG.md | 5 - .../google_maps_flutter/example/lib/main.dart | 2 - .../google_maps_flutter/example/pubspec.yaml | 15 +- .../lib/google_maps_flutter.dart | 1 - .../lib/src/controller.dart | 5 - .../lib/src/google_map.dart | 10 - .../google_maps_flutter/pubspec.yaml | 19 +- .../fake_google_maps_flutter_platform.dart | 5 - .../test/google_map_test.dart | 37 - .../google_maps_flutter_android/CHANGELOG.md | 4 - .../googlemaps/GoogleMapController.java | 15 - .../flutter/plugins/googlemaps/Messages.java | 245 ++---- .../googlemaps/GoogleMapControllerTest.java | 22 - .../example/lib/example_google_map.dart | 14 - .../example/lib/main.dart | 2 - .../example/pubspec.yaml | 5 +- .../fake_google_maps_flutter_platform.dart | 5 - .../lib/src/google_maps_flutter_android.dart | 19 - .../lib/src/messages.g.dart | 186 ++--- .../pigeons/messages.dart | 16 - .../google_maps_flutter_android/pubspec.yaml | 7 +- .../google_maps_flutter_android_test.dart | 31 - .../google_maps_flutter_ios/CHANGELOG.md | 4 - .../example/ios/Podfile | 2 + .../ios/Runner.xcodeproj/project.pbxproj | 14 - .../RunnerTests/ExtractIconFromDataTests.m | 98 ++- .../FGMClusterManagersControllerTests.m | 15 +- .../RunnerTests/FGMConversionsUtilsTests.m | 107 +-- .../FLTTileProviderControllerTests.m | 56 +- .../GoogleMapsGroundOverlayControllerTests.m | 12 +- .../GoogleMapsMarkerControllerTests.m | 36 +- .../GoogleMapsPolylineControllerTests.m | 1 + .../example/ios/RunnerTests/GoogleMapsTests.m | 96 +-- .../ios/RunnerTests/PartiallyMockedMapView.h | 11 +- .../ios/RunnerTests/PartiallyMockedMapView.m | 5 - .../example/lib/example_google_map.dart | 11 - .../example/pubspec.yaml | 5 +- .../example/test/example_google_map_test.dart | 32 - .../fake_google_maps_flutter_platform.dart | 5 - .../FGMClusterManagersController.m | 12 +- .../FGMGroundOverlayController.m | 34 +- .../google_maps_flutter_ios/FGMImageUtils.m | 14 +- .../FLTGoogleMapTileOverlayController.m | 17 +- .../GoogleMapCircleController.m | 11 +- .../GoogleMapController.m | 246 +----- .../GoogleMapMarkerController.m | 53 +- .../GoogleMapPolygonController.m | 13 +- .../GoogleMapPolylineController.m | 13 +- .../google_maps_flutter_pigeon_messages.g.m | 169 ++-- .../FGMClusterManagersController.h | 5 +- .../FGMConversionUtils.h | 1 + .../FGMGroundOverlayController.h | 9 +- .../FGMGroundOverlayController_Test.h | 4 +- .../google_maps_flutter_ios/FGMImageUtils.h | 5 +- .../FLTGoogleMapHeatmapController.h | 1 + .../FLTGoogleMapTileOverlayController.h | 16 +- .../GoogleMapCircleController.h | 5 +- .../GoogleMapController_Test.h | 7 +- .../GoogleMapMarkerController.h | 9 +- .../GoogleMapMarkerController_Test.h | 2 +- .../GoogleMapPolygonController.h | 5 +- .../GoogleMapPolylineController.h | 5 +- .../google_maps_flutter_pigeon_messages.g.h | 20 +- .../lib/src/google_maps_flutter_ios.dart | 19 - .../lib/src/messages.g.dart | 186 ++--- .../pigeons/messages.dart | 17 - .../google_maps_flutter_ios/pubspec.yaml | 7 +- .../test/google_maps_flutter_ios_test.dart | 34 - .../google_maps_flutter_web/CHANGELOG.md | 4 - .../example/pubspec.yaml | 14 +- .../lib/src/google_maps_controller.dart | 24 +- .../lib/src/google_maps_flutter_web.dart | 5 - .../google_maps_flutter_web/pubspec.yaml | 7 +- .../video_player_avfoundation/CHANGELOG.md | 4 - .../darwin/RunnerTests/VideoPlayerTests.m | 744 +++++++----------- .../AVAssetTrackUtils.m | 2 +- .../video_player_avfoundation/FVPAVFactory.m | 155 +--- .../FVPCADisplayLink.m | 10 +- .../FVPEventBridge.m | 6 +- .../FVPTextureBasedVideoPlayer.m | 9 +- .../FVPVideoPlayer.m | 22 +- .../FVPVideoPlayerPlugin.m | 122 +-- .../FVPViewProvider.m | 2 - .../AVAssetTrackUtils.h | 4 +- .../video_player_avfoundation/FVPAVFactory.h | 98 +-- .../FVPDisplayLink.h | 16 +- .../FVPEventBridge.h | 6 +- .../FVPFrameUpdater.h | 4 +- .../FVPNativeVideoView.h | 6 +- .../FVPNativeVideoViewFactory.h | 6 +- .../FVPTextureBasedVideoPlayer.h | 5 +- .../FVPTextureBasedVideoPlayer_Test.h | 4 +- .../FVPVideoEventListener.h | 2 +- .../FVPVideoPlayer.h | 8 +- .../FVPVideoPlayerPlugin.h | 4 +- .../FVPVideoPlayerPlugin_Test.h | 19 +- .../FVPVideoPlayer_Internal.h | 7 +- .../video_player_avfoundation/messages.g.h | 4 +- .../video_player_avfoundation/messages.g.m | 10 +- .../FVPCoreVideoDisplayLink.m | 12 +- .../ios/Runner.xcodeproj/project.pbxproj | 26 +- .../xcshareddata/swiftpm/Package.resolved | 13 + .../xcshareddata/swiftpm/Package.resolved | 13 + .../macos/Runner.xcodeproj/project.pbxproj | 30 +- .../xcshareddata/swiftpm/Package.resolved | 13 + .../xcshareddata/swiftpm/Package.resolved | 13 + .../lib/src/messages.g.dart | 244 +++--- .../video_player_avfoundation/pubspec.yaml | 4 +- 109 files changed, 1309 insertions(+), 2577 deletions(-) create mode 100644 packages/google_maps_flutter/force_overrides.ps1 create mode 100644 packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 packages/video_player/video_player_avfoundation/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/packages/google_maps_flutter/force_overrides.ps1 b/packages/google_maps_flutter/force_overrides.ps1 new file mode 100644 index 000000000000..8020e5535232 --- /dev/null +++ b/packages/google_maps_flutter/force_overrides.ps1 @@ -0,0 +1,66 @@ +# Run this from the root of your google_maps_flutter group directory +# Usage: .\force_overrides.ps1 + +$packages = @( + "google_maps_flutter", + "google_maps_flutter/example", + "google_maps_flutter_android", + "google_maps_flutter_android/example", + "google_maps_flutter_ios", + "google_maps_flutter_ios/example", + "google_maps_flutter_web", + "google_maps_flutter_web/example" +) + +# The override block to append. +# We use relative paths that work generally from the package root structure. +# Adjust ../ levels dynamically based on depth. +$overridesTemplate = @" + +dependency_overrides: + google_maps_flutter: + path: {0}google_maps_flutter + google_maps_flutter_android: + path: {0}google_maps_flutter_android + google_maps_flutter_ios: + path: {0}google_maps_flutter_ios + google_maps_flutter_platform_interface: + path: {0}google_maps_flutter_platform_interface + google_maps_flutter_web: + path: {0}google_maps_flutter_web +"@ + +foreach ($pkg in $packages) { + $pubspecPath = Join-Path (Get-Location) "$pkg\pubspec.yaml" + + if (Test-Path $pubspecPath) { + Write-Host "Processing $pkg..." -ForegroundColor Cyan + + # Calculate depth to determine how many "../" we need + # If we are in "google_maps_flutter", we need "../" (1 level up to group root) + # If we are in "google_maps_flutter/example", we need "../../" (2 levels up) + $depth = ($pkg.Split('/').Count) + $relativePath = "../" * $depth + + $overrides = $overridesTemplate -f $relativePath + + # Read file content + $content = Get-Content $pubspecPath -Raw + + # Remove existing dependency_overrides if they exist (simple cleanup) + if ($content -match "dependency_overrides:") { + Write-Host " - Removing old overrides..." -ForegroundColor Yellow + $content = $content -replace "(?ms)^dependency_overrides:.*?(\Z|^[a-z])", '$1' + } + + # Append new overrides + $newContent = $content.Trim() + $overrides + Set-Content -Path $pubspecPath -Value $newContent + + Write-Host " - Overrides added." -ForegroundColor Green + } else { + Write-Host " - Skipping $pkg (pubspec.yaml not found)" -ForegroundColor DarkGray + } +} + +Write-Host "`nAll done! Run 'flutter pub get' in each directory." -ForegroundColor White \ No newline at end of file diff --git a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md index 6579ae788e94..b2c1be73c130 100644 --- a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md @@ -1,8 +1,3 @@ -## 2.15.0 - -* Adds `onPoiTap` support to the `GoogleMap` widget to handle taps on base map landmarks and businesses. -* Adds a "Place POI" example to the example app. - ## 2.14.1 * Replaces internal use of deprecated methods. diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart index d47efa87a2bc..2cee263eeba3 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart @@ -23,7 +23,6 @@ import 'padding.dart'; import 'page.dart'; import 'place_circle.dart'; import 'place_marker.dart'; -import 'place_poi.dart'; import 'place_polygon.dart'; import 'place_polyline.dart'; import 'scrolling_map.dart'; @@ -42,7 +41,6 @@ final List _allPages = [ const PlacePolylinePage(), const PlacePolygonPage(), const PlaceCirclePage(), - const PlacePoiPage(), const PaddingPage(), const SnapshotPage(), const LiteModePage(), diff --git a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml index f0ad9085874d..0e002e4f535a 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml @@ -18,8 +18,8 @@ dependencies: # The example app is bundled with the plugin so we use a path dependency on # the parent directory to use the current plugin's version. path: ../ - google_maps_flutter_android: ^2.19.0 - google_maps_flutter_platform_interface: ^2.15.0 + google_maps_flutter_android: ^2.16.1 + google_maps_flutter_platform_interface: ^2.14.0 dev_dependencies: build_runner: ^2.1.10 @@ -33,14 +33,3 @@ flutter: uses-material-design: true assets: - assets/ -dependency_overrides: - google_maps_flutter: - path: ../ - google_maps_flutter_android: - path: ../../google_maps_flutter_android - google_maps_flutter_ios: - path: ../../google_maps_flutter_ios - google_maps_flutter_platform_interface: - path: ../../google_maps_flutter_platform_interface - google_maps_flutter_web: - path: ../../google_maps_flutter_web diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart index 470469d73a68..7ca650dceb75 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart @@ -47,7 +47,6 @@ export 'package:google_maps_flutter_platform_interface/google_maps_flutter_platf MarkerId, MinMaxZoomPreference, PatternItem, - PointOfInterest, Polygon, PolygonId, Polyline, diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/controller.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/controller.dart index 64aaec30660e..80f019d5a006 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/controller.dart @@ -99,11 +99,6 @@ class GoogleMapController { (InfoWindowTapEvent e) => _googleMapState.onInfoWindowTap(e.value), ), ); - _streamSubscriptions.add( - GoogleMapsFlutterPlatform.instance - .onPoiTap(mapId: mapId) - .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)), - ); _streamSubscriptions.add( GoogleMapsFlutterPlatform.instance .onPolylineTap(mapId: mapId) diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index 0ea1af487e7f..627efae290de 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -133,7 +133,6 @@ class GoogleMap extends StatefulWidget { this.onCameraIdle, this.onTap, this.onLongPress, - this.onPoiTap, this.cloudMapId, }); @@ -236,9 +235,6 @@ class GoogleMap extends StatefulWidget { /// See https://pub.dev/packages/google_maps_flutter_web. final Set clusterManagers; - /// Callback for Point of Interests tap - final ArgumentCallback? onPoiTap; - /// Ground overlays to be initialized for the map. /// /// Support table for Ground Overlay features: @@ -616,12 +612,6 @@ class _GoogleMapState extends State { } } - void onPoiTap(PointOfInterest poi) { - if (widget.onPoiTap != null) { - widget.onPoiTap!(poi); - } - } - void onPolygonTap(PolygonId polygonId) { final Polygon? polygon = _polygons[polygonId]; if (polygon == null) { diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index 150fb8baf1f1..d928fb3b21f5 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter description: A Flutter plugin for integrating Google Maps in iOS and Android applications. repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 2.15.0 +version: 2.14.1 environment: sdk: ^3.8.0 @@ -21,10 +21,10 @@ flutter: dependencies: flutter: sdk: flutter - google_maps_flutter_android: ^2.19.0 - google_maps_flutter_ios: ^2.18.0 - google_maps_flutter_platform_interface: ^2.15.0 - google_maps_flutter_web: ^0.6.0+4 + google_maps_flutter_android: ^2.16.1 + google_maps_flutter_ios: ^2.15.4 + google_maps_flutter_platform_interface: ^2.14.0 + google_maps_flutter_web: ^0.5.14 dev_dependencies: flutter_test: @@ -41,12 +41,3 @@ topics: # The example deliberately includes limited-use secrets. false_secrets: - /example/web/index.html -dependency_overrides: - google_maps_flutter_android: - path: ../google_maps_flutter_android - google_maps_flutter_ios: - path: ../google_maps_flutter_ios - google_maps_flutter_platform_interface: - path: ../google_maps_flutter_platform_interface - google_maps_flutter_web: - path: ../google_maps_flutter_web diff --git a/packages/google_maps_flutter/google_maps_flutter/test/fake_google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter/test/fake_google_maps_flutter_platform.dart index e1c8b29b46a6..fe0439d6c69d 100644 --- a/packages/google_maps_flutter/google_maps_flutter/test/fake_google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter/test/fake_google_maps_flutter_platform.dart @@ -280,11 +280,6 @@ class FakeGoogleMapsFlutterPlatform extends GoogleMapsFlutterPlatform { return mapEventStreamController.stream.whereType(); } - @override - Stream onPoiTap({required int mapId}) { - return mapEventStreamController.stream.whereType(); - } - @override Stream onLongPress({required int mapId}) { return mapEventStreamController.stream.whereType(); diff --git a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart index e7ddf1b73f36..4aedfdbb78f8 100644 --- a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart @@ -659,41 +659,4 @@ void main() { expect(map.tileOverlaySets.length, 1); }); - - testWidgets('onPoiTap callback is called', (WidgetTester tester) async { - PointOfInterest? tappedPoi; - final mapCreatedCompleter = Completer(); - - await tester.pumpWidget( - Directionality( - textDirection: TextDirection.ltr, - child: GoogleMap( - initialCameraPosition: const CameraPosition(target: LatLng(0, 0)), - onPoiTap: (PointOfInterest poi) => tappedPoi = poi, - onMapCreated: (_) => mapCreatedCompleter.complete(), - ), - ), - ); - - // Wait for the map to be fully initialized in the fake platform. - await mapCreatedCompleter.future; - - // Use the top-level 'platform' variable instead of redeclaring it. - const poi = PointOfInterest( - position: LatLng(10.0, 10.0), - name: 'Test POI', - placeId: 'test_id_123', - ); - - // Inject the event into the fake platform's stream. - // mapId 0 is used as it's the first map created in the test. - platform.mapEventStreamController.add(MapPoiTapEvent(0, poi)); - - // Allow the stream and callback to process. - await tester.pump(); - - expect(tappedPoi, poi); - expect(tappedPoi!.name, 'Test POI'); - expect(tappedPoi!.placeId, 'test_id_123'); - }); } 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 ad76f7545c97..21b41d813f9b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md @@ -1,7 +1,3 @@ -## 2.19.0 - -* Implements `onPoiTap` support for Android using `OnPoiClickListener`. - ## 2.18.12 * Bumps com.google.maps.android:android-maps-utils from 3.20.1 to 4.0.0. diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java index 30f0bd240cc9..bd87c923ccea 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java @@ -37,7 +37,6 @@ import com.google.android.gms.maps.model.LatLngBounds; import com.google.android.gms.maps.model.MapStyleOptions; import com.google.android.gms.maps.model.Marker; -import com.google.android.gms.maps.model.PointOfInterest; import com.google.android.gms.maps.model.Polygon; import com.google.android.gms.maps.model.Polyline; import com.google.android.gms.maps.model.TileOverlay; @@ -68,7 +67,6 @@ class GoogleMapController MapsApi, MapsInspectorApi, OnMapReadyCallback, - GoogleMap.OnPoiClickListener, PlatformView { private static final String TAG = "GoogleMapController"; @@ -202,7 +200,6 @@ public void onMapReady(@NonNull GoogleMap googleMap) { this.googleMap.setIndoorEnabled(this.indoorEnabled); this.googleMap.setTrafficEnabled(this.trafficEnabled); this.googleMap.setBuildingsEnabled(this.buildingsEnabled); - this.googleMap.setOnPoiClickListener(this); installInvalidator(); if (mapReadyResult != null) { mapReadyResult.success(); @@ -366,18 +363,6 @@ public void onMarkerDragEnd(Marker marker) { markersController.onMarkerDragEnd(marker.getId(), marker.getPosition()); } - @Override - public void onPoiClick(PointOfInterest poi) { - Messages.PlatformPointOfInterest platformPoi = - new Messages.PlatformPointOfInterest.Builder() - .setPosition(Convert.latLngToPigeon(poi.latLng)) - .setName(poi.name) - .setPlaceId(poi.placeId) - .build(); - - flutterApi.onPoiTap(platformPoi, new NoOpVoidResult()); - } - @Override public void onPolygonClick(Polygon polygon) { polygonsController.onPolygonTap(polygon.getId()); 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 dd44bc42a157..f8d44e8c4bf9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.7), do not edit directly. +// Autogenerated from Pigeon (v26.1.5), do not edit directly. // See also: https://pub.dev/packages/pigeon package io.flutter.plugins.googlemaps; @@ -2510,126 +2510,6 @@ ArrayList toList() { } } - /** - * Pigeon equivalent of the Point of Interest class. - * - *

Generated class from Pigeon that represents data sent in messages. - */ - public static final class PlatformPointOfInterest { - private @NonNull PlatformLatLng position; - - public @NonNull PlatformLatLng getPosition() { - return position; - } - - public void setPosition(@NonNull PlatformLatLng setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"position\" is null."); - } - this.position = setterArg; - } - - private @Nullable String name; - - public @Nullable String getName() { - return name; - } - - public void setName(@Nullable String setterArg) { - this.name = setterArg; - } - - private @NonNull String placeId; - - public @NonNull String getPlaceId() { - return placeId; - } - - public void setPlaceId(@NonNull String setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"placeId\" is null."); - } - this.placeId = setterArg; - } - - /** Constructor is non-public to enforce null safety; use Builder. */ - PlatformPointOfInterest() {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PlatformPointOfInterest that = (PlatformPointOfInterest) o; - return position.equals(that.position) - && Objects.equals(name, that.name) - && placeId.equals(that.placeId); - } - - @Override - public int hashCode() { - return Objects.hash(position, name, placeId); - } - - public static final class Builder { - - private @Nullable PlatformLatLng position; - - @CanIgnoreReturnValue - public @NonNull Builder setPosition(@NonNull PlatformLatLng setterArg) { - this.position = setterArg; - return this; - } - - private @Nullable String name; - - @CanIgnoreReturnValue - public @NonNull Builder setName(@Nullable String setterArg) { - this.name = setterArg; - return this; - } - - private @Nullable String placeId; - - @CanIgnoreReturnValue - public @NonNull Builder setPlaceId(@NonNull String setterArg) { - this.placeId = setterArg; - return this; - } - - public @NonNull PlatformPointOfInterest build() { - PlatformPointOfInterest pigeonReturn = new PlatformPointOfInterest(); - pigeonReturn.setPosition(position); - pigeonReturn.setName(name); - pigeonReturn.setPlaceId(placeId); - return pigeonReturn; - } - } - - @NonNull - ArrayList toList() { - ArrayList toListResult = new ArrayList<>(3); - toListResult.add(position); - toListResult.add(name); - toListResult.add(placeId); - return toListResult; - } - - static @NonNull PlatformPointOfInterest fromList(@NonNull ArrayList pigeonVar_list) { - PlatformPointOfInterest pigeonResult = new PlatformPointOfInterest(); - Object position = pigeonVar_list.get(0); - pigeonResult.setPosition((PlatformLatLng) position); - Object name = pigeonVar_list.get(1); - pigeonResult.setName((String) name); - Object placeId = pigeonVar_list.get(2); - pigeonResult.setPlaceId((String) placeId); - return pigeonResult; - } - } - /** * Pigeon equivalent of the Polygon class. * @@ -6820,54 +6700,52 @@ protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { case (byte) 153: return PlatformMarker.fromList((ArrayList) readValue(buffer)); case (byte) 154: - return PlatformPointOfInterest.fromList((ArrayList) readValue(buffer)); - case (byte) 155: return PlatformPolygon.fromList((ArrayList) readValue(buffer)); - case (byte) 156: + case (byte) 155: return PlatformPolyline.fromList((ArrayList) readValue(buffer)); - case (byte) 157: + case (byte) 156: return PlatformCap.fromList((ArrayList) readValue(buffer)); - case (byte) 158: + case (byte) 157: return PlatformPatternItem.fromList((ArrayList) readValue(buffer)); - case (byte) 159: + case (byte) 158: return PlatformTile.fromList((ArrayList) readValue(buffer)); - case (byte) 160: + case (byte) 159: return PlatformTileOverlay.fromList((ArrayList) readValue(buffer)); - case (byte) 161: + case (byte) 160: return PlatformEdgeInsets.fromList((ArrayList) readValue(buffer)); - case (byte) 162: + case (byte) 161: return PlatformLatLng.fromList((ArrayList) readValue(buffer)); - case (byte) 163: + case (byte) 162: return PlatformLatLngBounds.fromList((ArrayList) readValue(buffer)); - case (byte) 164: + case (byte) 163: return PlatformCluster.fromList((ArrayList) readValue(buffer)); - case (byte) 165: + case (byte) 164: return PlatformGroundOverlay.fromList((ArrayList) readValue(buffer)); - case (byte) 166: + case (byte) 165: return PlatformCameraTargetBounds.fromList((ArrayList) readValue(buffer)); - case (byte) 167: + case (byte) 166: return PlatformMapViewCreationParams.fromList((ArrayList) readValue(buffer)); - case (byte) 168: + case (byte) 167: return PlatformMapConfiguration.fromList((ArrayList) readValue(buffer)); - case (byte) 169: + case (byte) 168: return PlatformPoint.fromList((ArrayList) readValue(buffer)); - case (byte) 170: + case (byte) 169: return PlatformTileLayer.fromList((ArrayList) readValue(buffer)); - case (byte) 171: + case (byte) 170: return PlatformZoomRange.fromList((ArrayList) readValue(buffer)); - case (byte) 172: + case (byte) 171: return PlatformBitmap.fromList((ArrayList) readValue(buffer)); - case (byte) 173: + case (byte) 172: return PlatformBitmapDefaultMarker.fromList((ArrayList) readValue(buffer)); - case (byte) 174: + case (byte) 173: return PlatformBitmapBytes.fromList((ArrayList) readValue(buffer)); - case (byte) 175: + case (byte) 174: return PlatformBitmapAsset.fromList((ArrayList) readValue(buffer)); - case (byte) 176: + case (byte) 175: return PlatformBitmapAssetImage.fromList((ArrayList) readValue(buffer)); - case (byte) 177: + case (byte) 176: return PlatformBitmapAssetMap.fromList((ArrayList) readValue(buffer)); - case (byte) 178: + case (byte) 177: return PlatformBitmapBytesMap.fromList((ArrayList) readValue(buffer)); default: return super.readValueOfType(type, buffer); @@ -6951,80 +6829,77 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) { } else if (value instanceof PlatformMarker) { stream.write(153); writeValue(stream, ((PlatformMarker) value).toList()); - } else if (value instanceof PlatformPointOfInterest) { - stream.write(154); - writeValue(stream, ((PlatformPointOfInterest) value).toList()); } else if (value instanceof PlatformPolygon) { - stream.write(155); + stream.write(154); writeValue(stream, ((PlatformPolygon) value).toList()); } else if (value instanceof PlatformPolyline) { - stream.write(156); + stream.write(155); writeValue(stream, ((PlatformPolyline) value).toList()); } else if (value instanceof PlatformCap) { - stream.write(157); + stream.write(156); writeValue(stream, ((PlatformCap) value).toList()); } else if (value instanceof PlatformPatternItem) { - stream.write(158); + stream.write(157); writeValue(stream, ((PlatformPatternItem) value).toList()); } else if (value instanceof PlatformTile) { - stream.write(159); + stream.write(158); writeValue(stream, ((PlatformTile) value).toList()); } else if (value instanceof PlatformTileOverlay) { - stream.write(160); + stream.write(159); writeValue(stream, ((PlatformTileOverlay) value).toList()); } else if (value instanceof PlatformEdgeInsets) { - stream.write(161); + stream.write(160); writeValue(stream, ((PlatformEdgeInsets) value).toList()); } else if (value instanceof PlatformLatLng) { - stream.write(162); + stream.write(161); writeValue(stream, ((PlatformLatLng) value).toList()); } else if (value instanceof PlatformLatLngBounds) { - stream.write(163); + stream.write(162); writeValue(stream, ((PlatformLatLngBounds) value).toList()); } else if (value instanceof PlatformCluster) { - stream.write(164); + stream.write(163); writeValue(stream, ((PlatformCluster) value).toList()); } else if (value instanceof PlatformGroundOverlay) { - stream.write(165); + stream.write(164); writeValue(stream, ((PlatformGroundOverlay) value).toList()); } else if (value instanceof PlatformCameraTargetBounds) { - stream.write(166); + stream.write(165); writeValue(stream, ((PlatformCameraTargetBounds) value).toList()); } else if (value instanceof PlatformMapViewCreationParams) { - stream.write(167); + stream.write(166); writeValue(stream, ((PlatformMapViewCreationParams) value).toList()); } else if (value instanceof PlatformMapConfiguration) { - stream.write(168); + stream.write(167); writeValue(stream, ((PlatformMapConfiguration) value).toList()); } else if (value instanceof PlatformPoint) { - stream.write(169); + stream.write(168); writeValue(stream, ((PlatformPoint) value).toList()); } else if (value instanceof PlatformTileLayer) { - stream.write(170); + stream.write(169); writeValue(stream, ((PlatformTileLayer) value).toList()); } else if (value instanceof PlatformZoomRange) { - stream.write(171); + stream.write(170); writeValue(stream, ((PlatformZoomRange) value).toList()); } else if (value instanceof PlatformBitmap) { - stream.write(172); + stream.write(171); writeValue(stream, ((PlatformBitmap) value).toList()); } else if (value instanceof PlatformBitmapDefaultMarker) { - stream.write(173); + stream.write(172); writeValue(stream, ((PlatformBitmapDefaultMarker) value).toList()); } else if (value instanceof PlatformBitmapBytes) { - stream.write(174); + stream.write(173); writeValue(stream, ((PlatformBitmapBytes) value).toList()); } else if (value instanceof PlatformBitmapAsset) { - stream.write(175); + stream.write(174); writeValue(stream, ((PlatformBitmapAsset) value).toList()); } else if (value instanceof PlatformBitmapAssetImage) { - stream.write(176); + stream.write(175); writeValue(stream, ((PlatformBitmapAssetImage) value).toList()); } else if (value instanceof PlatformBitmapAssetMap) { - stream.write(177); + stream.write(176); writeValue(stream, ((PlatformBitmapAssetMap) value).toList()); } else if (value instanceof PlatformBitmapBytesMap) { - stream.write(178); + stream.write(177); writeValue(stream, ((PlatformBitmapBytesMap) value).toList()); } else { super.writeValue(stream, value); @@ -8088,30 +7963,6 @@ public void onClusterTap(@NonNull PlatformCluster clusterArg, @NonNull VoidResul } }); } - /** Called when a POI is tapped. */ - public void onPoiTap(@NonNull PlatformPointOfInterest poiArg, @NonNull VoidResult result) { - final String channelName = - "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap" - + messageChannelSuffix; - BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); - channel.send( - new ArrayList<>(Collections.singletonList(poiArg)), - channelReply -> { - if (channelReply instanceof List) { - List listReply = (List) channelReply; - if (listReply.size() > 1) { - result.error( - new FlutterError( - (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); - } else { - result.success(); - } - } else { - result.error(createConnectionError(channelName)); - } - }); - } /** Called when a polygon is tapped. */ public void onPolygonTap(@NonNull String polygonIdArg, @NonNull VoidResult result) { final String channelName = diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java index 8bb8d59da545..d2339531eba1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java @@ -4,7 +4,6 @@ package io.flutter.plugins.googlemaps; -import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.mockito.ArgumentMatchers.any; @@ -27,7 +26,6 @@ import com.google.android.gms.maps.model.CameraPosition; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.Marker; -import com.google.android.gms.maps.model.PointOfInterest; import com.google.maps.android.clustering.ClusterManager; import io.flutter.plugin.common.BinaryMessenger; import java.util.ArrayList; @@ -37,7 +35,6 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.MockitoAnnotations; @@ -320,23 +317,4 @@ public void getCameraPositionReturnsCorrectData() { Assert.assertEquals(cameraPosition.tilt, result.getTilt(), 1e-15); Assert.assertEquals(cameraPosition.bearing, result.getBearing(), 1e-15); } - - @Test - public void onPoiClick() { - GoogleMapController controller = getGoogleMapControllerWithMockedDependencies(); - PointOfInterest poi = new PointOfInterest(new LatLng(1.0, 2.0), "placeId", "name"); - - controller.onPoiClick(poi); - - ArgumentCaptor poiCaptor = - ArgumentCaptor.forClass(Messages.PlatformPointOfInterest.class); - - verify(flutterApi).onPoiTap(poiCaptor.capture(), any(Messages.VoidResult.class)); - - Messages.PlatformPointOfInterest capturedPoi = poiCaptor.getValue(); - assertEquals("name", capturedPoi.getName()); - assertEquals("placeId", capturedPoi.getPlaceId()); - assertEquals(1.0, capturedPoi.getPosition().getLatitude(), 1e-6); - assertEquals(2.0, capturedPoi.getPosition().getLongitude(), 1e-6); - } } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart index 1404a4b4049c..518304c93fd9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart @@ -83,9 +83,6 @@ class ExampleGoogleMapController { .listen( (InfoWindowTapEvent e) => _googleMapState.onInfoWindowTap(e.value), ); - GoogleMapsFlutterPlatform.instance - .onPoiTap(mapId: mapId) - .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)); GoogleMapsFlutterPlatform.instance .onPolylineTap(mapId: mapId) .listen((PolylineTapEvent e) => _googleMapState.onPolylineTap(e.value)); @@ -104,9 +101,6 @@ class ExampleGoogleMapController { GoogleMapsFlutterPlatform.instance .onTap(mapId: mapId) .listen((MapTapEvent e) => _googleMapState.onTap(e.position)); - GoogleMapsFlutterPlatform.instance - .onPoiTap(mapId: mapId) - .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)); GoogleMapsFlutterPlatform.instance .onLongPress(mapId: mapId) .listen( @@ -313,7 +307,6 @@ class ExampleGoogleMap extends StatefulWidget { this.markers = const {}, this.polygons = const {}, this.polylines = const {}, - this.onPoiTap, this.circles = const {}, this.clusterManagers = const {}, this.onCameraMoveStarted, @@ -386,9 +379,6 @@ class ExampleGoogleMap extends StatefulWidget { /// Polylines to be placed on the map. final Set polylines; - ///Point of Interest Callback - final ArgumentCallback? onPoiTap; - /// Circles to be placed on the map. final Set circles; @@ -658,10 +648,6 @@ class _ExampleGoogleMapState extends State { widget.onTap?.call(position); } - void onPoiTap(PointOfInterest pointOfInterest) { - widget.onPoiTap?.call(pointOfInterest); - } - void onLongPress(LatLng position) { widget.onLongPress?.call(position); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart index b074218a0529..f7b60568657c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart @@ -22,7 +22,6 @@ import 'padding.dart'; import 'page.dart'; import 'place_circle.dart'; import 'place_marker.dart'; -import 'place_poi.dart'; import 'place_polygon.dart'; import 'place_polyline.dart'; import 'scrolling_map.dart'; @@ -41,7 +40,6 @@ final List _allPages = [ const PlacePolylinePage(), const PlacePolygonPage(), const PlaceCirclePage(), - const PlacePoiPage(), const PaddingPage(), const SnapshotPage(), const LiteModePage(), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml index ba52ecaa2f46..58cec3dcf1a5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: # The example app is bundled with the plugin so we use a path dependency on # the parent directory to use the current plugin's version. path: ../ - google_maps_flutter_platform_interface: ^2.15.0 + google_maps_flutter_platform_interface: ^2.13.0 dev_dependencies: build_runner: ^2.1.10 @@ -33,6 +33,3 @@ flutter: uses-material-design: true assets: - assets/ -dependency_overrides: - google_maps_flutter_platform_interface: - path: ../../google_maps_flutter_platform_interface diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/test/fake_google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/test/fake_google_maps_flutter_platform.dart index 148e1406c481..a589658f5c6e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/test/fake_google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/test/fake_google_maps_flutter_platform.dart @@ -234,11 +234,6 @@ class FakeGoogleMapsFlutterPlatform extends GoogleMapsFlutterPlatform { return mapEventStreamController.stream.whereType(); } - @override - Stream onPoiTap({required int mapId}) { - return mapEventStreamController.stream.whereType(); - } - @override Stream onPolylineTap({required int mapId}) { return mapEventStreamController.stream.whereType(); 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 35b3440fbde1..b371e7a3a1f6 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 @@ -228,11 +228,6 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { return _events(mapId).whereType(); } - @override - Stream onPoiTap({required int mapId}) { - return _events(mapId).whereType(); - } - @override Future updateMapConfiguration( MapConfiguration configuration, { @@ -1262,20 +1257,6 @@ class HostMapMessageHandler implements MapsCallbackApi { streamController.add(MarkerTapEvent(mapId, MarkerId(markerId))); } - @override - void onPoiTap(PlatformPointOfInterest poi) { - streamController.add( - MapPoiTapEvent( - mapId, - PointOfInterest( - position: LatLng(poi.position.latitude, poi.position.longitude), - name: poi.name, - placeId: poi.placeId, - ), - ), - ); - } - @override void onPolygonTap(String polygonId) { streamController.add(PolygonTapEvent(mapId, PolygonId(polygonId))); 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 62c8297478fb..ba5674412009 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.7), do not edit directly. +// Autogenerated from Pigeon (v26.1.5), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -977,54 +977,6 @@ class PlatformMarker { int get hashCode => Object.hashAll(_toList()); } -/// Pigeon equivalent of the Point of Interest class. -class PlatformPointOfInterest { - PlatformPointOfInterest({ - required this.position, - this.name, - required this.placeId, - }); - - PlatformLatLng position; - - String? name; - - String placeId; - - List _toList() { - return [position, name, placeId]; - } - - Object encode() { - return _toList(); - } - - static PlatformPointOfInterest decode(Object result) { - result as List; - return PlatformPointOfInterest( - position: result[0]! as PlatformLatLng, - name: result[1] as String?, - placeId: result[2]! as String, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPointOfInterest || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); -} - /// Pigeon equivalent of the Polygon class. class PlatformPolygon { PlatformPolygon({ @@ -2508,80 +2460,77 @@ class _PigeonCodec extends StandardMessageCodec { } else if (value is PlatformMarker) { buffer.putUint8(153); writeValue(buffer, value.encode()); - } else if (value is PlatformPointOfInterest) { - buffer.putUint8(154); - writeValue(buffer, value.encode()); } else if (value is PlatformPolygon) { - buffer.putUint8(155); + buffer.putUint8(154); writeValue(buffer, value.encode()); } else if (value is PlatformPolyline) { - buffer.putUint8(156); + buffer.putUint8(155); writeValue(buffer, value.encode()); } else if (value is PlatformCap) { - buffer.putUint8(157); + buffer.putUint8(156); writeValue(buffer, value.encode()); } else if (value is PlatformPatternItem) { - buffer.putUint8(158); + buffer.putUint8(157); writeValue(buffer, value.encode()); } else if (value is PlatformTile) { - buffer.putUint8(159); + buffer.putUint8(158); writeValue(buffer, value.encode()); } else if (value is PlatformTileOverlay) { - buffer.putUint8(160); + buffer.putUint8(159); writeValue(buffer, value.encode()); } else if (value is PlatformEdgeInsets) { - buffer.putUint8(161); + buffer.putUint8(160); writeValue(buffer, value.encode()); } else if (value is PlatformLatLng) { - buffer.putUint8(162); + buffer.putUint8(161); writeValue(buffer, value.encode()); } else if (value is PlatformLatLngBounds) { - buffer.putUint8(163); + buffer.putUint8(162); writeValue(buffer, value.encode()); } else if (value is PlatformCluster) { - buffer.putUint8(164); + buffer.putUint8(163); writeValue(buffer, value.encode()); } else if (value is PlatformGroundOverlay) { - buffer.putUint8(165); + buffer.putUint8(164); writeValue(buffer, value.encode()); } else if (value is PlatformCameraTargetBounds) { - buffer.putUint8(166); + buffer.putUint8(165); writeValue(buffer, value.encode()); } else if (value is PlatformMapViewCreationParams) { - buffer.putUint8(167); + buffer.putUint8(166); writeValue(buffer, value.encode()); } else if (value is PlatformMapConfiguration) { - buffer.putUint8(168); + buffer.putUint8(167); writeValue(buffer, value.encode()); } else if (value is PlatformPoint) { - buffer.putUint8(169); + buffer.putUint8(168); writeValue(buffer, value.encode()); } else if (value is PlatformTileLayer) { - buffer.putUint8(170); + buffer.putUint8(169); writeValue(buffer, value.encode()); } else if (value is PlatformZoomRange) { - buffer.putUint8(171); + buffer.putUint8(170); writeValue(buffer, value.encode()); } else if (value is PlatformBitmap) { - buffer.putUint8(172); + buffer.putUint8(171); writeValue(buffer, value.encode()); } else if (value is PlatformBitmapDefaultMarker) { - buffer.putUint8(173); + buffer.putUint8(172); writeValue(buffer, value.encode()); } else if (value is PlatformBitmapBytes) { - buffer.putUint8(174); + buffer.putUint8(173); writeValue(buffer, value.encode()); } else if (value is PlatformBitmapAsset) { - buffer.putUint8(175); + buffer.putUint8(174); writeValue(buffer, value.encode()); } else if (value is PlatformBitmapAssetImage) { - buffer.putUint8(176); + buffer.putUint8(175); writeValue(buffer, value.encode()); } else if (value is PlatformBitmapAssetMap) { - buffer.putUint8(177); + buffer.putUint8(176); writeValue(buffer, value.encode()); } else if (value is PlatformBitmapBytesMap) { - buffer.putUint8(178); + buffer.putUint8(177); writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); @@ -2648,54 +2597,52 @@ class _PigeonCodec extends StandardMessageCodec { case 153: return PlatformMarker.decode(readValue(buffer)!); case 154: - return PlatformPointOfInterest.decode(readValue(buffer)!); - case 155: return PlatformPolygon.decode(readValue(buffer)!); - case 156: + case 155: return PlatformPolyline.decode(readValue(buffer)!); - case 157: + case 156: return PlatformCap.decode(readValue(buffer)!); - case 158: + case 157: return PlatformPatternItem.decode(readValue(buffer)!); - case 159: + case 158: return PlatformTile.decode(readValue(buffer)!); - case 160: + case 159: return PlatformTileOverlay.decode(readValue(buffer)!); - case 161: + case 160: return PlatformEdgeInsets.decode(readValue(buffer)!); - case 162: + case 161: return PlatformLatLng.decode(readValue(buffer)!); - case 163: + case 162: return PlatformLatLngBounds.decode(readValue(buffer)!); - case 164: + case 163: return PlatformCluster.decode(readValue(buffer)!); - case 165: + case 164: return PlatformGroundOverlay.decode(readValue(buffer)!); - case 166: + case 165: return PlatformCameraTargetBounds.decode(readValue(buffer)!); - case 167: + case 166: return PlatformMapViewCreationParams.decode(readValue(buffer)!); - case 168: + case 167: return PlatformMapConfiguration.decode(readValue(buffer)!); - case 169: + case 168: return PlatformPoint.decode(readValue(buffer)!); - case 170: + case 169: return PlatformTileLayer.decode(readValue(buffer)!); - case 171: + case 170: return PlatformZoomRange.decode(readValue(buffer)!); - case 172: + case 171: return PlatformBitmap.decode(readValue(buffer)!); - case 173: + case 172: return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); - case 174: + case 173: return PlatformBitmapBytes.decode(readValue(buffer)!); - case 175: + case 174: return PlatformBitmapAsset.decode(readValue(buffer)!); - case 176: + case 175: return PlatformBitmapAssetImage.decode(readValue(buffer)!); - case 177: + case 176: return PlatformBitmapAssetMap.decode(readValue(buffer)!); - case 178: + case 177: return PlatformBitmapBytesMap.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -3439,9 +3386,6 @@ abstract class MapsCallbackApi { /// Called when a marker cluster is tapped. void onClusterTap(PlatformCluster cluster); - /// Called when a POI is tapped. - void onPoiTap(PlatformPointOfInterest poi); - /// Called when a polygon is tapped. void onPolygonTap(String polygonId); @@ -3858,40 +3802,6 @@ abstract class MapsCallbackApi { }); } } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.', - ); - final List args = (message as List?)!; - final PlatformPointOfInterest? arg_poi = - (args[0] as PlatformPointOfInterest?); - assert( - arg_poi != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.', - ); - try { - api.onPoiTap(arg_poi!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString()), - ); - } - }); - } - } { final pigeonVar_channel = BasicMessageChannel( 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', 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 eade30e49f67..60096d9cf3af 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 @@ -235,19 +235,6 @@ class PlatformMarker { final String? clusterManagerId; } -/// Pigeon equivalent of the Point of Interest class. -class PlatformPointOfInterest { - PlatformPointOfInterest({ - required this.position, - this.name, - required this.placeId, - }); - - final PlatformLatLng position; - final String? name; - final String placeId; -} - /// Pigeon equivalent of the Polygon class. class PlatformPolygon { PlatformPolygon({ @@ -819,9 +806,6 @@ abstract class MapsCallbackApi { /// Called when a marker cluster is tapped. void onClusterTap(PlatformCluster cluster); - /// Called when a POI is tapped. - void onPoiTap(PlatformPointOfInterest poi); - /// Called when a polygon is tapped. void onPolygonTap(String polygonId); 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 bac69828a9a9..d721130dfee1 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.19.0 +version: 2.18.12 environment: sdk: ^3.9.0 @@ -21,7 +21,7 @@ dependencies: flutter: sdk: flutter flutter_plugin_android_lifecycle: ^2.0.1 - google_maps_flutter_platform_interface: ^2.15.0 + google_maps_flutter_platform_interface: ^2.13.0 stream_transform: ^2.0.0 dev_dependencies: @@ -37,6 +37,3 @@ topics: - google-maps - google-maps-flutter - map -dependency_overrides: - google_maps_flutter_platform_interface: - path: ../google_maps_flutter_platform_interface 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 882b3ff4d633..403adf3df6c6 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 @@ -1496,35 +1496,4 @@ void main() { reason: 'Should pass mapId in PlatformView creation message', ); }); - - test('onPoiTap sends events to correct stream', () async { - const mapId = 1; - final fakePosition = PlatformLatLng(latitude: 12.34, longitude: 56.78); - const fakeName = 'Googleplex'; - const fakePlaceId = 'iso_id_123'; - - final maps = GoogleMapsFlutterAndroid(); - final HostMapMessageHandler callbackHandler = maps.ensureHandlerInitialized( - mapId, - ); - - final stream = StreamQueue(maps.onPoiTap(mapId: mapId)); - - callbackHandler.onPoiTap( - PlatformPointOfInterest( - position: fakePosition, - name: fakeName, - placeId: fakePlaceId, - ), - ); - - final MapPoiTapEvent event = await stream.next; - expect(event.mapId, mapId); - - final PointOfInterest poi = event.value; - expect(poi.position.latitude, fakePosition.latitude); - expect(poi.position.longitude, fakePosition.longitude); - expect(poi.name, fakeName); - expect(poi.placeId, fakePlaceId); - }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md index 234dfa5e1170..5e577772cba2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md @@ -1,7 +1,3 @@ -## 2.18.0 - -* Implements `onPoiTap` support for iOS using `didTapPOIWithPlaceID`. - ## 2.17.0 * Restructures code to prepare for SwiftPM support. diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Podfile b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Podfile index c2c1dc5432d3..391330adc7d6 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Podfile +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Podfile @@ -33,6 +33,8 @@ target 'Runner' do flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do inherit! :search_paths + + pod 'OCMock', '~> 3.9.1' end end diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner.xcodeproj/project.pbxproj b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner.xcodeproj/project.pbxproj index 0caf990b9847..0ed22957bea8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner.xcodeproj/project.pbxproj @@ -12,12 +12,10 @@ 2A6906C72D263DF4001F8426 /* GoogleMapsGroundOverlayControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A6906C62D263DE7001F8426 /* GoogleMapsGroundOverlayControllerTests.m */; }; 2BDE99378062AE3E60B40021 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3ACE0AFE8D82CD5962486AFD /* Pods_RunnerTests.framework */; }; 330909FF2D99B7A60077A751 /* GoogleMapsMarkerControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 330909FE2D99B79B0077A751 /* GoogleMapsMarkerControllerTests.m */; }; - 3378E6352F23F9300045E7DA /* TestMapEventHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 3378E6342F23F92E0045E7DA /* TestMapEventHandler.m */; }; 339355BA2EB3E50300EBF864 /* GoogleMapsCircleControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 339355B92EB3E4F900EBF864 /* GoogleMapsCircleControllerTests.m */; }; 339355BD2EB3E56300EBF864 /* GoogleMapsTileOverlayControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 339355BC2EB3E55600EBF864 /* GoogleMapsTileOverlayControllerTests.m */; }; 339355BF2EB535A600EBF864 /* FLTGoogleMapHeatmapControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 339355BE2EB5359B00EBF864 /* FLTGoogleMapHeatmapControllerTests.m */; }; 339DF1F02F1FE49800748863 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 339DF1EF2F1FE49300748863 /* AppDelegate.swift */; }; - 33BF9C6E2F2182DF0005FA15 /* TestAssetProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 33BF9C6D2F2182DB0005FA15 /* TestAssetProvider.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 478116522BEF8F47002F593E /* GoogleMapsPolylineControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 478116512BEF8F47002F593E /* GoogleMapsPolylineControllerTests.m */; }; 528F16832C62941000148160 /* FGMClusterManagersControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 528F16822C62941000148160 /* FGMClusterManagersControllerTests.m */; }; @@ -70,16 +68,12 @@ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 2A6906C62D263DE7001F8426 /* GoogleMapsGroundOverlayControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsGroundOverlayControllerTests.m; sourceTree = ""; }; 330909FE2D99B79B0077A751 /* GoogleMapsMarkerControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsMarkerControllerTests.m; sourceTree = ""; }; - 3378E6332F23F9220045E7DA /* TestMapEventHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestMapEventHandler.h; sourceTree = ""; }; - 3378E6342F23F92E0045E7DA /* TestMapEventHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestMapEventHandler.m; sourceTree = ""; }; 339355B82EB3E4D500EBF864 /* GoogleMapsPolygonControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsPolygonControllerTests.m; sourceTree = ""; }; 339355B92EB3E4F900EBF864 /* GoogleMapsCircleControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsCircleControllerTests.m; sourceTree = ""; }; 339355BC2EB3E55600EBF864 /* GoogleMapsTileOverlayControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsTileOverlayControllerTests.m; sourceTree = ""; }; 339355BE2EB5359B00EBF864 /* FLTGoogleMapHeatmapControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FLTGoogleMapHeatmapControllerTests.m; sourceTree = ""; }; 339DF1EF2F1FE49300748863 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 339DF1F12F1FE4AD00748863 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 33BF9C6C2F2182CB0005FA15 /* TestAssetProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestAssetProvider.h; sourceTree = ""; }; - 33BF9C6D2F2182DB0005FA15 /* TestAssetProvider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestAssetProvider.m; sourceTree = ""; }; 3ACE0AFE8D82CD5962486AFD /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 478116512BEF8F47002F593E /* GoogleMapsPolylineControllerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsPolylineControllerTests.m; sourceTree = ""; }; @@ -88,7 +82,6 @@ 61A9A8623F5CA9BBC813DC6B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6851F3552835BC180032B7C8 /* FGMConversionsUtilsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FGMConversionsUtilsTests.m; sourceTree = ""; }; 733AFAB37683A9DA7512F09C /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; - 784666492D4C4C64000A1A5F /* FlutterFramework */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterFramework; path = Flutter/ephemeral/Packages/.packages/FlutterFramework; sourceTree = ""; }; 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; @@ -152,7 +145,6 @@ 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( - 784666492D4C4C64000A1A5F /* FlutterFramework */, 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, @@ -229,10 +221,6 @@ 339355BC2EB3E55600EBF864 /* GoogleMapsTileOverlayControllerTests.m */, 982F2A6A27BADE17003C81F4 /* PartiallyMockedMapView.h */, 982F2A6B27BADE17003C81F4 /* PartiallyMockedMapView.m */, - 33BF9C6C2F2182CB0005FA15 /* TestAssetProvider.h */, - 33BF9C6D2F2182DB0005FA15 /* TestAssetProvider.m */, - 3378E6332F23F9220045E7DA /* TestMapEventHandler.h */, - 3378E6342F23F92E0045E7DA /* TestMapEventHandler.m */, F7151F14265D7ED70028CB91 /* Info.plist */, ); path = RunnerTests; @@ -521,10 +509,8 @@ 339355BF2EB535A600EBF864 /* FLTGoogleMapHeatmapControllerTests.m in Sources */, 339355BD2EB3E56300EBF864 /* GoogleMapsTileOverlayControllerTests.m in Sources */, F7151F13265D7ED70028CB91 /* GoogleMapsTests.m in Sources */, - 33BF9C6E2F2182DF0005FA15 /* TestAssetProvider.m in Sources */, 6851F3562835BC180032B7C8 /* FGMConversionsUtilsTests.m in Sources */, 982F2A6C27BADE17003C81F4 /* PartiallyMockedMapView.m in Sources */, - 3378E6352F23F9300045E7DA /* TestMapEventHandler.m in Sources */, 330909FF2D99B7A60077A751 /* GoogleMapsMarkerControllerTests.m in Sources */, 478116522BEF8F47002F593E /* GoogleMapsPolylineControllerTests.m in Sources */, 2A6906C72D263DF4001F8426 /* GoogleMapsGroundOverlayControllerTests.m in Sources */, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/ExtractIconFromDataTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/ExtractIconFromDataTests.m index 4fc1e9eef7d5..4d7da98cac59 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/ExtractIconFromDataTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/ExtractIconFromDataTests.m @@ -5,7 +5,8 @@ @import google_maps_flutter_ios; @import XCTest; -#import "TestAssetProvider.h" +#import +#import @interface ExtractIconFromDataTests : XCTestCase - (UIImage *)createOnePixelImage; @@ -14,14 +15,15 @@ - (UIImage *)createOnePixelImage; @implementation ExtractIconFromDataTests - (void)testExtractIconFromDataAssetAuto { + NSObject *mockRegistrar = + OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); + id mockImageClass = OCMClassMock([UIImage class]); UIImage *testImage = [self createOnePixelImage]; - NSString *assetName = @"fakeImageName"; - TestAssetProvider *assetProvider = [[TestAssetProvider alloc] initWithImage:testImage - forAssetName:assetName - package:nil]; + OCMStub([mockRegistrar lookupKeyForAsset:@"fakeImageNameKey"]).andReturn(@"fakeAssetKey"); + OCMStub(ClassMethod([mockImageClass imageNamed:@"fakeAssetKey"])).andReturn(testImage); FGMPlatformBitmapAssetMap *bitmap = - [FGMPlatformBitmapAssetMap makeWithAssetName:assetName + [FGMPlatformBitmapAssetMap makeWithAssetName:@"fakeImageNameKey" bitmapScaling:FGMPlatformMapBitmapScalingAuto imagePixelRatio:1 width:nil @@ -30,7 +32,7 @@ - (void)testExtractIconFromDataAssetAuto { CGFloat screenScale = 3.0; UIImage *resultImage = - FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], assetProvider, screenScale); + FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(resultImage.scale, 1.0); @@ -39,15 +41,16 @@ - (void)testExtractIconFromDataAssetAuto { } - (void)testExtractIconFromDataAssetAutoWithScale { + NSObject *mockRegistrar = + OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); + id mockImageClass = OCMClassMock([UIImage class]); UIImage *testImage = [self createOnePixelImage]; - NSString *assetName = @"fakeImageName"; - TestAssetProvider *assetProvider = [[TestAssetProvider alloc] initWithImage:testImage - forAssetName:assetName - package:nil]; + OCMStub([mockRegistrar lookupKeyForAsset:@"fakeImageNameKey"]).andReturn(@"fakeAssetKey"); + OCMStub(ClassMethod([mockImageClass imageNamed:@"fakeAssetKey"])).andReturn(testImage); FGMPlatformBitmapAssetMap *bitmap = - [FGMPlatformBitmapAssetMap makeWithAssetName:assetName + [FGMPlatformBitmapAssetMap makeWithAssetName:@"fakeImageNameKey" bitmapScaling:FGMPlatformMapBitmapScalingAuto imagePixelRatio:10 width:nil @@ -56,7 +59,7 @@ - (void)testExtractIconFromDataAssetAutoWithScale { CGFloat screenScale = 3.0; UIImage *resultImage = - FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], assetProvider, screenScale); + FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(resultImage.scale, 10); @@ -65,17 +68,18 @@ - (void)testExtractIconFromDataAssetAutoWithScale { } - (void)testExtractIconFromDataAssetAutoAndSizeWithSameAspectRatio { + NSObject *mockRegistrar = + OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); + id mockImageClass = OCMClassMock([UIImage class]); UIImage *testImage = [self createOnePixelImage]; XCTAssertEqual(testImage.scale, 1.0); - NSString *assetName = @"fakeImageName"; - TestAssetProvider *assetProvider = [[TestAssetProvider alloc] initWithImage:testImage - forAssetName:assetName - package:nil]; + OCMStub([mockRegistrar lookupKeyForAsset:@"fakeImageNameKey"]).andReturn(@"fakeAssetKey"); + OCMStub(ClassMethod([mockImageClass imageNamed:@"fakeAssetKey"])).andReturn(testImage); const CGFloat width = 15.0; FGMPlatformBitmapAssetMap *bitmap = - [FGMPlatformBitmapAssetMap makeWithAssetName:assetName + [FGMPlatformBitmapAssetMap makeWithAssetName:@"fakeImageNameKey" bitmapScaling:FGMPlatformMapBitmapScalingAuto imagePixelRatio:1 width:@(width) @@ -84,7 +88,7 @@ - (void)testExtractIconFromDataAssetAutoAndSizeWithSameAspectRatio { CGFloat screenScale = 3.0; UIImage *resultImage = - FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], assetProvider, screenScale); + FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(testImage.scale, 1.0); @@ -98,17 +102,18 @@ - (void)testExtractIconFromDataAssetAutoAndSizeWithSameAspectRatio { } - (void)testExtractIconFromDataAssetAutoAndSizeWithDifferentAspectRatio { + NSObject *mockRegistrar = + OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); + id mockImageClass = OCMClassMock([UIImage class]); UIImage *testImage = [self createOnePixelImage]; - NSString *assetName = @"fakeImageName"; - TestAssetProvider *assetProvider = [[TestAssetProvider alloc] initWithImage:testImage - forAssetName:assetName - package:nil]; + OCMStub([mockRegistrar lookupKeyForAsset:@"fakeImageNameKey"]).andReturn(@"fakeAssetKey"); + OCMStub(ClassMethod([mockImageClass imageNamed:@"fakeAssetKey"])).andReturn(testImage); const CGFloat width = 15.0; const CGFloat height = 45.0; FGMPlatformBitmapAssetMap *bitmap = - [FGMPlatformBitmapAssetMap makeWithAssetName:assetName + [FGMPlatformBitmapAssetMap makeWithAssetName:@"fakeImageNameKey" bitmapScaling:FGMPlatformMapBitmapScalingAuto imagePixelRatio:1 width:@(width) @@ -117,7 +122,7 @@ - (void)testExtractIconFromDataAssetAutoAndSizeWithDifferentAspectRatio { CGFloat screenScale = 3.0; UIImage *resultImage = - FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], assetProvider, screenScale); + FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(resultImage.scale, screenScale); XCTAssertEqual(resultImage.size.width, width); @@ -125,15 +130,16 @@ - (void)testExtractIconFromDataAssetAutoAndSizeWithDifferentAspectRatio { } - (void)testExtractIconFromDataAssetNoScaling { + NSObject *mockRegistrar = + OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); + id mockImageClass = OCMClassMock([UIImage class]); UIImage *testImage = [self createOnePixelImage]; - NSString *assetName = @"fakeImageName"; - TestAssetProvider *assetProvider = [[TestAssetProvider alloc] initWithImage:testImage - forAssetName:assetName - package:nil]; + OCMStub([mockRegistrar lookupKeyForAsset:@"fakeImageNameKey"]).andReturn(@"fakeAssetKey"); + OCMStub(ClassMethod([mockImageClass imageNamed:@"fakeAssetKey"])).andReturn(testImage); FGMPlatformBitmapAssetMap *bitmap = - [FGMPlatformBitmapAssetMap makeWithAssetName:assetName + [FGMPlatformBitmapAssetMap makeWithAssetName:@"fakeImageNameKey" bitmapScaling:FGMPlatformMapBitmapScalingNone imagePixelRatio:1 width:nil @@ -142,7 +148,7 @@ - (void)testExtractIconFromDataAssetNoScaling { CGFloat screenScale = 3.0; UIImage *resultImage = - FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], assetProvider, screenScale); + FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(resultImage.scale, 1.0); @@ -151,6 +157,8 @@ - (void)testExtractIconFromDataAssetNoScaling { } - (void)testExtractIconFromDataBytesAuto { + NSObject *mockRegistrar = + OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); UIImage *testImage = [self createOnePixelImage]; NSData *pngData = UIImagePNGRepresentation(testImage); XCTAssertNotNil(pngData); @@ -165,8 +173,8 @@ - (void)testExtractIconFromDataBytesAuto { CGFloat screenScale = 3.0; - UIImage *resultImage = FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], - [[TestAssetProvider alloc] init], screenScale); + UIImage *resultImage = + FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(resultImage.scale, 1.0); @@ -175,6 +183,8 @@ - (void)testExtractIconFromDataBytesAuto { } - (void)testExtractIconFromDataBytesAutoWithScaling { + NSObject *mockRegistrar = + OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); UIImage *testImage = [self createOnePixelImage]; NSData *pngData = UIImagePNGRepresentation(testImage); XCTAssertNotNil(pngData); @@ -189,8 +199,8 @@ - (void)testExtractIconFromDataBytesAutoWithScaling { CGFloat screenScale = 3.0; - UIImage *resultImage = FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], - [[TestAssetProvider alloc] init], screenScale); + UIImage *resultImage = + FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(resultImage.scale, 10); XCTAssertEqual(resultImage.size.width, 0.1); @@ -198,6 +208,8 @@ - (void)testExtractIconFromDataBytesAutoWithScaling { } - (void)testExtractIconFromDataBytesAutoAndSizeWithSameAspectRatio { + NSObject *mockRegistrar = + OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); UIImage *testImage = [self createOnePixelImage]; NSData *pngData = UIImagePNGRepresentation(testImage); XCTAssertNotNil(pngData); @@ -214,8 +226,8 @@ - (void)testExtractIconFromDataBytesAutoAndSizeWithSameAspectRatio { CGFloat screenScale = 3.0; - UIImage *resultImage = FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], - [[TestAssetProvider alloc] init], screenScale); + UIImage *resultImage = + FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(testImage.scale, 1.0); @@ -230,6 +242,8 @@ - (void)testExtractIconFromDataBytesAutoAndSizeWithSameAspectRatio { } - (void)testExtractIconFromDataBytesAutoAndSizeWithDifferentAspectRatio { + NSObject *mockRegistrar = + OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); UIImage *testImage = [self createOnePixelImage]; NSData *pngData = UIImagePNGRepresentation(testImage); XCTAssertNotNil(pngData); @@ -246,8 +260,8 @@ - (void)testExtractIconFromDataBytesAutoAndSizeWithDifferentAspectRatio { CGFloat screenScale = 3.0; - UIImage *resultImage = FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], - [[TestAssetProvider alloc] init], screenScale); + UIImage *resultImage = + FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(resultImage.scale, screenScale); XCTAssertEqual(resultImage.size.width, width); @@ -255,6 +269,8 @@ - (void)testExtractIconFromDataBytesAutoAndSizeWithDifferentAspectRatio { } - (void)testExtractIconFromDataBytesNoScaling { + NSObject *mockRegistrar = + OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); UIImage *testImage = [self createOnePixelImage]; NSData *pngData = UIImagePNGRepresentation(testImage); XCTAssertNotNil(pngData); @@ -269,8 +285,8 @@ - (void)testExtractIconFromDataBytesNoScaling { CGFloat screenScale = 3.0; - UIImage *resultImage = FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], - [[TestAssetProvider alloc] init], screenScale); + UIImage *resultImage = + FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(resultImage.scale, 1.0); XCTAssertEqual(resultImage.size.width, 1.0); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FGMClusterManagersControllerTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FGMClusterManagersControllerTests.m index 049855b05e4d..f9baaa10184b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FGMClusterManagersControllerTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FGMClusterManagersControllerTests.m @@ -3,13 +3,12 @@ // found in the LICENSE file. @import google_maps_flutter_ios; -@import Flutter; @import XCTest; @import GoogleMaps; +#import +#import #import "PartiallyMockedMapView.h" -#import "TestAssetProvider.h" -#import "TestMapEventHandler.h" @interface FGMClusterManagersControllerTests : XCTestCase @end @@ -17,6 +16,7 @@ @interface FGMClusterManagersControllerTests : XCTestCase @implementation FGMClusterManagersControllerTests - (void)testClustering { + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); CGRect frame = CGRectMake(0, 0, 100, 100); GMSMapViewOptions *mapViewOptions = [[GMSMapViewOptions alloc] init]; @@ -24,16 +24,17 @@ - (void)testClustering { mapViewOptions.camera = [[GMSCameraPosition alloc] initWithLatitude:0 longitude:0 zoom:0]; PartiallyMockedMapView *mapView = [[PartiallyMockedMapView alloc] initWithOptions:mapViewOptions]; - TestMapEventHandler *eventHandler = [[TestMapEventHandler alloc] init]; + + id handler = OCMClassMock([FGMMapsCallbackApi class]); FGMClusterManagersController *clusterManagersController = - [[FGMClusterManagersController alloc] initWithMapView:mapView eventDelegate:eventHandler]; + [[FGMClusterManagersController alloc] initWithMapView:mapView callbackHandler:handler]; FLTMarkersController *markersController = [[FLTMarkersController alloc] initWithMapView:mapView - eventDelegate:eventHandler + callbackHandler:handler clusterManagersController:clusterManagersController - assetProvider:[[TestAssetProvider alloc] init]]; + registrar:registrar]; // Add cluster managers. NSString *clusterManagerId = @"cm"; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FGMConversionsUtilsTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FGMConversionsUtilsTests.m index 5277c81395f2..ea39943cf571 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FGMConversionsUtilsTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FGMConversionsUtilsTests.m @@ -6,6 +6,7 @@ @import XCTest; @import GoogleMaps; +#import #import "PartiallyMockedMapView.h" @interface FGMConversionUtilsTests : XCTestCase @@ -192,6 +193,7 @@ - (void)testMapViewTypeFromPigeonType { } - (void)testCameraUpdateFromNewCameraPosition { + id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]); FGMPlatformCameraUpdateNewCameraPosition *newPositionUpdate = [FGMPlatformCameraUpdateNewCameraPosition makeWithCameraPosition:[FGMPlatformCameraPosition @@ -202,24 +204,44 @@ - (void)testCameraUpdateFromNewCameraPosition { zoom:3]]; FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:newPositionUpdate]); - // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath - // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that - // injecting a wrapper would not meaningfully improve test coverage, since the non-test - // implementation would be about as complex as the conversion function itself. + [[classMockCameraUpdate expect] + setCamera:FGMGetCameraPositionForPigeonCameraPosition(newPositionUpdate.cameraPosition)]; + [classMockCameraUpdate stopMocking]; } -- (void)testCameraUpdateFromNewLatLong { +// TODO(cyanglaz): Fix the test for cameraUpdateFromArray with the "NewLatlng" key. +// 2 approaches have been tried and neither worked for the tests. +// +// 1. Use OCMock to vefiry that [GMSCameraUpdate setTarget:] is triggered with the correct value. +// This class method conflicts with certain category method in OCMock, causing OCMock not able to +// disambigious them. +// +// 2. Directly verify the GMSCameraUpdate object returned by the method. +// The GMSCameraUpdate object returned from the method doesn't have any accessors to the "target" +// property. It can be used to update the "camera" property in GMSMapView. However, [GMSMapView +// moveCamera:] doesn't update the camera immediately. Thus the GMSCameraUpdate object cannot be +// verified. +// +// The code in below test uses the 2nd approach. +- (void)skip_testCameraUpdateFromNewLatLong { const CGFloat lat = 1; const CGFloat lng = 2; FGMPlatformCameraUpdateNewLatLng *platformUpdate = [FGMPlatformCameraUpdateNewLatLng makeWithLatLng:[FGMPlatformLatLng makeWithLatitude:lat longitude:lng]]; - FGMGetCameraUpdateForPigeonCameraUpdate( + GMSCameraUpdate *update = FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdate]); - // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath - // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that - // injecting a wrapper would not meaningfully improve test coverage, since the non-test - // implementation would be about as complex as the conversion function itself. + + GMSMapViewOptions *options = [[GMSMapViewOptions alloc] init]; + options.frame = CGRectZero; + options.camera = [GMSCameraPosition cameraWithTarget:CLLocationCoordinate2DMake(5, 6) zoom:1]; + GMSMapView *mapView = [[GMSMapView alloc] initWithOptions:options]; + [mapView moveCamera:update]; + const CGFloat accuracy = 0.001; + XCTAssertEqualWithAccuracy(mapView.camera.target.latitude, lat, + accuracy); // mapView.camera.target.latitude is still 5. + XCTAssertEqualWithAccuracy(mapView.camera.target.longitude, lng, + accuracy); // mapView.camera.target.longitude is still 6. } - (void)testCameraUpdateFromNewLatLngBounds { @@ -232,12 +254,12 @@ - (void)testCameraUpdateFromNewLatLngBounds { FGMPlatformCameraUpdateNewLatLngBounds *platformUpdate = [FGMPlatformCameraUpdateNewLatLngBounds makeWithBounds:FGMGetPigeonLatLngBoundsForCoordinateBounds(bounds) padding:padding]; + id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]); FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdate]); - // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath - // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that - // injecting a wrapper would not meaningfully improve test coverage, since the non-test - // implementation would be about as complex as the conversion function itself. + + [[classMockCameraUpdate expect] fitBounds:bounds withPadding:padding]; + [classMockCameraUpdate stopMocking]; } - (void)testCameraUpdateFromNewLatLngZoom { @@ -248,12 +270,12 @@ - (void)testCameraUpdateFromNewLatLngZoom { makeWithLatLng:[FGMPlatformLatLng makeWithLatitude:lat longitude:lng] zoom:zoom]; + id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]); FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdate]); - // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath - // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that - // injecting a wrapper would not meaningfully improve test coverage, since the non-test - // implementation would be about as complex as the conversion function itself. + + [[classMockCameraUpdate expect] setTarget:CLLocationCoordinate2DMake(lat, lng) zoom:zoom]; + [classMockCameraUpdate stopMocking]; } - (void)testCameraUpdateFromScrollBy { @@ -262,12 +284,12 @@ - (void)testCameraUpdateFromScrollBy { FGMPlatformCameraUpdateScrollBy *platformUpdate = [FGMPlatformCameraUpdateScrollBy makeWithDx:x dy:y]; + id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]); FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdate]); - // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath - // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that - // injecting a wrapper would not meaningfully improve test coverage, since the non-test - // implementation would be about as complex as the conversion function itself. + + [[classMockCameraUpdate expect] scrollByX:x Y:y]; + [classMockCameraUpdate stopMocking]; } - (void)testCameraUpdateFromZoomBy { @@ -275,16 +297,12 @@ - (void)testCameraUpdateFromZoomBy { FGMPlatformCameraUpdateZoomBy *platformUpdateNoPoint = [FGMPlatformCameraUpdateZoomBy makeWithAmount:zoom focus:nil]; + id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]); FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdateNoPoint]); - // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath - // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that - // injecting a wrapper would not meaningfully improve test coverage, since the non-test - // implementation would be about as complex as the conversion function itself. -} -- (void)testCameraUpdateFromZoomByWithFocus { - const CGFloat zoom = 1; + [[classMockCameraUpdate expect] zoomBy:zoom]; + const CGFloat x = 2; const CGFloat y = 3; FGMPlatformCameraUpdateZoomBy *platformUpdate = @@ -292,44 +310,43 @@ - (void)testCameraUpdateFromZoomByWithFocus { FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdate]); - // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath - // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that - // injecting a wrapper would not meaningfully improve test coverage, since the non-test - // implementation would be about as complex as the conversion function itself. + + [[classMockCameraUpdate expect] zoomBy:zoom atPoint:CGPointMake(x, y)]; + [classMockCameraUpdate stopMocking]; } - (void)testCameraUpdateFromZoomIn { FGMPlatformCameraUpdateZoom *platformUpdate = [FGMPlatformCameraUpdateZoom makeWithOut:NO]; + id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]); FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdate]); - // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath - // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that - // injecting a wrapper would not meaningfully improve test coverage, since the non-test - // implementation would be about as complex as the conversion function itself. + + [[classMockCameraUpdate expect] zoomIn]; + [classMockCameraUpdate stopMocking]; } - (void)testCameraUpdateFromZoomOut { FGMPlatformCameraUpdateZoom *platformUpdate = [FGMPlatformCameraUpdateZoom makeWithOut:YES]; + id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]); FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdate]); - // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath - // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that - // injecting a wrapper would not meaningfully improve test coverage, since the non-test - // implementation would be about as complex as the conversion function itself. + + [[classMockCameraUpdate expect] zoomOut]; + [classMockCameraUpdate stopMocking]; } - (void)testCameraUpdateFromZoomTo { const CGFloat zoom = 1; FGMPlatformCameraUpdateZoomTo *platformUpdate = [FGMPlatformCameraUpdateZoomTo makeWithZoom:zoom]; + id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]); FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdate]); - // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath - // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that - // injecting a wrapper would not meaningfully improve test coverage, since the non-test - // implementation would be about as complex as the conversion function itself. + + [[classMockCameraUpdate expect] zoomTo:zoom]; + [classMockCameraUpdate stopMocking]; } - (void)testStrokeStylesFromPatterns { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FLTTileProviderControllerTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FLTTileProviderControllerTests.m index 0040fce6b44b..3c7f43b3c206 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FLTTileProviderControllerTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FLTTileProviderControllerTests.m @@ -6,44 +6,7 @@ @import GoogleMaps; @import google_maps_flutter_ios; -@interface StubTileReceiver : NSObject -@end - -@implementation StubTileReceiver -- (void)receiveTileWithX:(NSUInteger)x - y:(NSUInteger)y - zoom:(NSUInteger)zoom - image:(nullable UIImage *)image { - // No-op. -} -@end - -@interface TestTileProvider : NSObject -@property(nonatomic) XCTestExpectation *expectation; -@end - -// A tile provider that expects a single call to -// tileWithOverlayIdentifier:location:zoom:completion: on the main thread, -// and then fulfills the expectation. -@implementation TestTileProvider -- (instancetype)initWithExpectation:(XCTestExpectation *)expectation { - if (self = [super init]) { - _expectation = expectation; - } - return self; -} - -- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId - location:(FGMPlatformPoint *)location - zoom:(NSInteger)zoom - completion:(void (^)(FGMPlatformTile *_Nullable, - FlutterError *_Nullable))completion { - XCTAssertTrue([[NSThread currentThread] isMainThread]); - [self.expectation fulfill]; -} -@end - -#pragma mark - +#import @interface FLTTileProviderControllerTests : XCTestCase @end @@ -51,13 +14,22 @@ @interface FLTTileProviderControllerTests : XCTestCase @implementation FLTTileProviderControllerTests - (void)testCallChannelOnPlatformThread { - XCTestExpectation *expectation = [self expectationWithDescription:@"invokeMethod"]; - TestTileProvider *tileProvider = [[TestTileProvider alloc] initWithExpectation:expectation]; + id handler = OCMClassMock([FGMMapsCallbackApi class]); FLTTileProviderController *controller = [[FLTTileProviderController alloc] initWithTileOverlayIdentifier:@"foo" - tileProvider:tileProvider]; + callbackHandler:handler]; XCTAssertNotNil(controller); - [controller requestTileForX:0 y:0 zoom:0 receiver:[[StubTileReceiver alloc] init]]; + XCTestExpectation *expectation = [self expectationWithDescription:@"invokeMethod"]; + OCMStub([handler tileWithOverlayIdentifier:[OCMArg any] + location:[OCMArg any] + zoom:0 + completion:[OCMArg any]]) + .andDo(^(NSInvocation *invocation) { + XCTAssertTrue([[NSThread currentThread] isMainThread]); + [expectation fulfill]; + }); + id receiver = OCMProtocolMock(@protocol(GMSTileReceiver)); + [controller requestTileForX:0 y:0 zoom:0 receiver:receiver]; [self waitForExpectations:@[ expectation ] timeout:10.0]; } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsGroundOverlayControllerTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsGroundOverlayControllerTests.m index 14a607c8487f..9169d6064956 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsGroundOverlayControllerTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsGroundOverlayControllerTests.m @@ -6,8 +6,8 @@ @import XCTest; @import GoogleMaps; +#import #import "PartiallyMockedMapView.h" -#import "TestAssetProvider.h" /// A GMSGroundOverlay that ensures that property updates are made before the map is set. @interface PropertyOrderValidatingGroundOverlay : GMSGroundOverlay { @@ -73,6 +73,8 @@ - (void)testUpdatingGroundOverlayWithPosition { FGMPlatformBitmap *bitmap = [FGMPlatformBitmap makeWithBitmap:[FGMPlatformBitmapDefaultMarker makeWithHue:0]]; + NSObject *mockRegistrar = + OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); FGMPlatformGroundOverlay *platformGroundOverlay = [FGMPlatformGroundOverlay makeWithGroundOverlayId:@"id_1" @@ -88,7 +90,7 @@ - (void)testUpdatingGroundOverlayWithPosition { zoomLevel:@14.0]; [groundOverlayController updateFromPlatformGroundOverlay:platformGroundOverlay - assetProvider:[[TestAssetProvider alloc] init] + registrar:mockRegistrar screenScale:1.0]; XCTAssertNotNil(groundOverlayController.groundOverlay.icon); @@ -127,6 +129,8 @@ - (void)testUpdatingGroundOverlayWithBounds { FGMPlatformBitmap *bitmap = [FGMPlatformBitmap makeWithBitmap:[FGMPlatformBitmapDefaultMarker makeWithHue:0]]; + NSObject *mockRegistrar = + OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); FGMPlatformGroundOverlay *platformGroundOverlay = [FGMPlatformGroundOverlay makeWithGroundOverlayId:@"id_1" @@ -142,7 +146,7 @@ - (void)testUpdatingGroundOverlayWithBounds { zoomLevel:nil]; [groundOverlayController updateFromPlatformGroundOverlay:platformGroundOverlay - assetProvider:[[TestAssetProvider alloc] init] + registrar:mockRegistrar screenScale:1.0]; XCTAssertNotNil(groundOverlayController.groundOverlay.icon); @@ -205,7 +209,7 @@ - (void)testUpdateGroundOverlaySetsVisibilityLast { clickable:YES zoomLevel:nil] withMapView:[GoogleMapsGroundOverlayControllerTests mapView] - assetProvider:[[TestAssetProvider alloc] init] + registrar:nil screenScale:1.0 usingBounds:YES]; XCTAssertTrue(groundOverlay.hasSetMap); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsMarkerControllerTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsMarkerControllerTests.m index a34b11ae3cc0..bac3fb2cc84e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsMarkerControllerTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsMarkerControllerTests.m @@ -6,9 +6,9 @@ @import XCTest; @import GoogleMaps; +#import + #import "PartiallyMockedMapView.h" -#import "TestAssetProvider.h" -#import "TestMapEventHandler.h" /// A GMSMarker that ensures that property updates are made before the map is set. @interface PropertyOrderValidatingMarker : GMSMarker { @@ -32,13 +32,13 @@ + (GMSMapView *)mapView { /// Returns a FLTMarkersController instance instantiated with the given map view. /// /// The mapView should outlive the controller, as the controller keeps a weak reference to it. -- (FLTMarkersController *)markersControllerWithMapView:(GMSMapView *)mapView - eventDelegate: - (NSObject *)eventDelegate { +- (FLTMarkersController *)markersControllerWithMapView:(GMSMapView *)mapView { + NSObject *mockRegistrar = + OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); return [[FLTMarkersController alloc] initWithMapView:mapView - eventDelegate:eventDelegate + callbackHandler:[[FGMMapsCallbackApi alloc] init] clusterManagersController:nil - assetProvider:[[TestAssetProvider alloc] init]]; + registrar:mockRegistrar]; } - (FGMPlatformBitmap *)placeholderBitmap { @@ -47,9 +47,7 @@ - (FGMPlatformBitmap *)placeholderBitmap { - (void)testSetsMarkerNumericProperties { GMSMapView *mapView = [GoogleMapsMarkerControllerTests mapView]; - TestMapEventHandler *eventHandler = [[TestMapEventHandler alloc] init]; - FLTMarkersController *controller = [self markersControllerWithMapView:mapView - eventDelegate:eventHandler]; + FLTMarkersController *controller = [self markersControllerWithMapView:mapView]; NSString *markerIdentifier = @"marker"; double anchorX = 3.14; @@ -96,9 +94,7 @@ - (void)testSetsMarkerNumericProperties { // another property. - (void)testSetsDraggable { GMSMapView *mapView = [GoogleMapsMarkerControllerTests mapView]; - TestMapEventHandler *eventHandler = [[TestMapEventHandler alloc] init]; - FLTMarkersController *controller = [self markersControllerWithMapView:mapView - eventDelegate:eventHandler]; + FLTMarkersController *controller = [self markersControllerWithMapView:mapView]; NSString *markerIdentifier = @"marker"; [controller addMarkers:@[ [FGMPlatformMarker @@ -130,9 +126,7 @@ - (void)testSetsDraggable { // another property. - (void)testSetsFlat { GMSMapView *mapView = [GoogleMapsMarkerControllerTests mapView]; - TestMapEventHandler *eventHandler = [[TestMapEventHandler alloc] init]; - FLTMarkersController *controller = [self markersControllerWithMapView:mapView - eventDelegate:eventHandler]; + FLTMarkersController *controller = [self markersControllerWithMapView:mapView]; NSString *markerIdentifier = @"marker"; [controller addMarkers:@[ [FGMPlatformMarker @@ -164,9 +158,7 @@ - (void)testSetsFlat { // another property. - (void)testSetsVisible { GMSMapView *mapView = [GoogleMapsMarkerControllerTests mapView]; - TestMapEventHandler *eventHandler = [[TestMapEventHandler alloc] init]; - FLTMarkersController *controller = [self markersControllerWithMapView:mapView - eventDelegate:eventHandler]; + FLTMarkersController *controller = [self markersControllerWithMapView:mapView]; NSString *markerIdentifier = @"marker"; [controller addMarkers:@[ [FGMPlatformMarker @@ -197,9 +189,7 @@ - (void)testSetsVisible { - (void)testSetsMarkerInfoWindowProperties { GMSMapView *mapView = [GoogleMapsMarkerControllerTests mapView]; - TestMapEventHandler *eventHandler = [[TestMapEventHandler alloc] init]; - FLTMarkersController *controller = [self markersControllerWithMapView:mapView - eventDelegate:eventHandler]; + FLTMarkersController *controller = [self markersControllerWithMapView:mapView]; NSString *markerIdentifier = @"marker"; NSString *title = @"info title"; @@ -262,7 +252,7 @@ - (void)testUpdateMarkerSetsVisibilityLast { markerId:@"marker" clusterManagerId:nil] withMapView:[GoogleMapsMarkerControllerTests mapView] - assetProvider:[[TestAssetProvider alloc] init] + registrar:nil screenScale:1 usingOpacityForVisibility:NO]; XCTAssertTrue(marker.hasSetMap); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsPolylineControllerTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsPolylineControllerTests.m index a018579c3e18..19ca6e84a266 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsPolylineControllerTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsPolylineControllerTests.m @@ -6,6 +6,7 @@ @import XCTest; @import GoogleMaps; +#import #import "PartiallyMockedMapView.h" /// A GMSPolyline that ensures that property updates are made before the map is set. diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m index e51da47062f7..ecbef7b3924e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m @@ -6,49 +6,9 @@ @import XCTest; @import GoogleMaps; +#import +#import "FGMCATransactionWrapper.h" #import "PartiallyMockedMapView.h" -#import "TestAssetProvider.h" - -@interface MockCATransaction : NSObject -@property(nonatomic, assign) BOOL beginCalled; -@property(nonatomic, assign) BOOL commitCalled; -@property(nonatomic, assign) CFTimeInterval animationDuration; -@end - -@implementation MockCATransaction - -- (void)begin { - self.beginCalled = YES; -} - -- (void)commit { - self.commitCalled = YES; -} - -@end - -// No-op implementation of FlutterBinaryMessenger. -@interface StubBinaryMessenger : NSObject -@end - -@implementation StubBinaryMessenger -- (void)sendOnChannel:(NSString *)channel message:(NSData *)message { -} -- (void)sendOnChannel:(NSString *)channel - message:(NSData *)message - binaryReply:(FlutterBinaryReply)reply { -} -- (void)cleanUpConnection:(FlutterBinaryMessengerConnection)connection { -} -- (FlutterBinaryMessengerConnection)setMessageHandlerOnChannel:(nonnull NSString *)channel - binaryMessageHandler: - (FlutterBinaryMessageHandler _Nullable)handler { - return 0; -} - -@end - -#pragma mark - @interface FLTGoogleMapFactory (Test) @property(strong, nonatomic, readonly) id sharedMapServices; @@ -69,6 +29,7 @@ - (void)testPlugin { } - (void)testFrameObserver { + id registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); CGRect frame = CGRectMake(0, 0, 100, 100); GMSMapViewOptions *options = [[GMSMapViewOptions alloc] init]; options.frame = frame; @@ -78,8 +39,7 @@ - (void)testFrameObserver { [[FLTGoogleMapController alloc] initWithMapView:mapView viewIdentifier:0 creationParameters:[self emptyCreationParameters] - assetProvider:[[TestAssetProvider alloc] init] - binaryMessenger:[[StubBinaryMessenger alloc] init]]; + registrar:registrar]; for (NSInteger i = 0; i < 10; ++i) { [controller view]; @@ -91,9 +51,7 @@ - (void)testFrameObserver { } - (void)testMapsServiceSync { - // The API requires a registrar, but this test doesn't actually use it, so just pass in a - // dummy object rather than set up a full mock. - id registrar = [[NSObject alloc] init]; + id registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); FLTGoogleMapFactory *factory1 = [[FLTGoogleMapFactory alloc] initWithRegistrar:registrar]; XCTAssertNotNil(factory1.sharedMapServices); FLTGoogleMapFactory *factory2 = [[FLTGoogleMapFactory alloc] initWithRegistrar:registrar]; @@ -125,6 +83,8 @@ - (void)testHandleResultTileDownsamplesWideGamutImages { } - (void)testAnimateCameraWithUpdate { + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + CGRect frame = CGRectMake(0, 0, 100, 100); GMSMapViewOptions *mapViewOptions = [[GMSMapViewOptions alloc] init]; mapViewOptions.frame = frame; @@ -138,23 +98,27 @@ - (void)testAnimateCameraWithUpdate { [[FLTGoogleMapController alloc] initWithMapView:mapView viewIdentifier:0 creationParameters:[self emptyCreationParameters] - assetProvider:[[TestAssetProvider alloc] init] - binaryMessenger:[[StubBinaryMessenger alloc] init]]; + registrar:registrar]; - MockCATransaction *mockTransactionWrapper = [[MockCATransaction alloc] init]; + id mapViewMock = OCMPartialMock(mapView); + id mockTransactionWrapper = OCMProtocolMock(@protocol(FGMCATransactionProtocol)); controller.callHandler.transactionWrapper = mockTransactionWrapper; FGMPlatformCameraUpdateZoomTo *zoomTo = [FGMPlatformCameraUpdateZoomTo makeWithZoom:10.0]; FGMPlatformCameraUpdate *cameraUpdate = [FGMPlatformCameraUpdate makeWithCameraUpdate:zoomTo]; FlutterError *error = nil; + OCMReject([mockTransactionWrapper begin]); + OCMReject([mockTransactionWrapper commit]); + OCMExpect([mapViewMock animateWithCameraUpdate:[OCMArg any]]); [controller.callHandler animateCameraWithUpdate:cameraUpdate duration:nil error:&error]; - XCTAssertTrue(mapView.didAnimateCamera); - XCTAssertFalse(mockTransactionWrapper.beginCalled); - XCTAssertFalse(mockTransactionWrapper.commitCalled); + OCMVerifyAll(mapViewMock); + OCMVerifyAll(mockTransactionWrapper); } - (void)testAnimateCameraWithUpdateAndDuration { + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + CGRect frame = CGRectMake(0, 0, 100, 100); GMSMapViewOptions *mapViewOptions = [[GMSMapViewOptions alloc] init]; mapViewOptions.frame = frame; @@ -168,10 +132,10 @@ - (void)testAnimateCameraWithUpdateAndDuration { [[FLTGoogleMapController alloc] initWithMapView:mapView viewIdentifier:0 creationParameters:[self emptyCreationParameters] - assetProvider:[[TestAssetProvider alloc] init] - binaryMessenger:[[StubBinaryMessenger alloc] init]]; + registrar:registrar]; - MockCATransaction *mockTransactionWrapper = [[MockCATransaction alloc] init]; + id mapViewMock = OCMPartialMock(mapView); + id mockTransactionWrapper = OCMProtocolMock(@protocol(FGMCATransactionProtocol)); controller.callHandler.transactionWrapper = mockTransactionWrapper; FGMPlatformCameraUpdateZoomTo *zoomTo = [FGMPlatformCameraUpdateZoomTo makeWithZoom:10.0]; @@ -179,17 +143,21 @@ - (void)testAnimateCameraWithUpdateAndDuration { FlutterError *error = nil; NSNumber *durationMilliseconds = @100; + OCMExpect([mockTransactionWrapper begin]); + OCMExpect( + [mockTransactionWrapper setAnimationDuration:[durationMilliseconds doubleValue] / 1000]); + OCMExpect([mockTransactionWrapper commit]); + OCMExpect([mapViewMock animateWithCameraUpdate:[OCMArg any]]); [controller.callHandler animateCameraWithUpdate:cameraUpdate duration:durationMilliseconds error:&error]; - XCTAssertTrue(mapView.didAnimateCamera); - XCTAssertTrue(mockTransactionWrapper.beginCalled); - XCTAssertTrue(mockTransactionWrapper.commitCalled); - XCTAssertEqual(mockTransactionWrapper.animationDuration, - [durationMilliseconds doubleValue] / 1000); + OCMVerifyAll(mapViewMock); + OCMVerifyAll(mockTransactionWrapper); } - (void)testInspectorAPICameraPosition { + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + CGRect frame = CGRectMake(0, 0, 100, 100); GMSMapViewOptions *mapViewOptions = [[GMSMapViewOptions alloc] init]; mapViewOptions.frame = frame; @@ -202,16 +170,14 @@ - (void)testInspectorAPICameraPosition { PartiallyMockedMapView *mapView = [[PartiallyMockedMapView alloc] initWithOptions:mapViewOptions]; - NSObject *binaryMessenger = [[StubBinaryMessenger alloc] init]; FLTGoogleMapController *controller = [[FLTGoogleMapController alloc] initWithMapView:mapView viewIdentifier:0 creationParameters:[self emptyCreationParameters] - assetProvider:[[TestAssetProvider alloc] init] - binaryMessenger:binaryMessenger]; + registrar:registrar]; FGMMapInspector *inspector = [[FGMMapInspector alloc] initWithMapController:controller - messenger:binaryMessenger + messenger:registrar.messenger pigeonSuffix:@"0"]; FlutterError *error = nil; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/PartiallyMockedMapView.h b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/PartiallyMockedMapView.h index 7b4665cb6820..9a04ae84ab24 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/PartiallyMockedMapView.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/PartiallyMockedMapView.h @@ -4,13 +4,14 @@ @import GoogleMaps; -/// Defines a map view used for testing key-value observing. +/** + * Defines a map view used for testing key-value observing. + */ @interface PartiallyMockedMapView : GMSMapView -/// The number of times that the `frame` KVO has been added. +/** + * The number of times that the `frame` KVO has been added. + */ @property(nonatomic, assign, readonly) NSInteger frameObserverCount; -/// True if animateWithCameraUpdate: was called. -@property(nonatomic, assign) BOOL didAnimateCamera; - @end diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/PartiallyMockedMapView.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/PartiallyMockedMapView.m index 84b02710180b..47d48d2e07fc 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/PartiallyMockedMapView.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/PartiallyMockedMapView.m @@ -31,9 +31,4 @@ - (void)removeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath { } } -- (void)animateWithCameraUpdate:(GMSCameraUpdate *)cameraUpdate { - [super animateWithCameraUpdate:cameraUpdate]; - self.didAnimateCamera = YES; -} - @end diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/lib/example_google_map.dart index 5fc64a32f02c..152f83c16f38 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/lib/example_google_map.dart @@ -106,9 +106,6 @@ class ExampleGoogleMapController { .listen( (MapLongPressEvent e) => _googleMapState.onLongPress(e.position), ); - GoogleMapsFlutterPlatform.instance - .onPoiTap(mapId: mapId) - .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)); GoogleMapsFlutterPlatform.instance .onClusterTap(mapId: mapId) .listen((ClusterTapEvent e) => _googleMapState.onClusterTap(e.value)); @@ -306,7 +303,6 @@ class ExampleGoogleMap extends StatefulWidget { this.trafficEnabled = false, this.buildingsEnabled = true, this.markers = const {}, - this.onPoiTap, this.polygons = const {}, this.polylines = const {}, this.circles = const {}, @@ -369,9 +365,6 @@ class ExampleGoogleMap extends StatefulWidget { /// Markers to be placed on the map. final Set markers; - /// Point of Interest Callback - final void Function(PointOfInterest poi)? onPoiTap; - /// Polygons to be placed on the map. final Set polygons; @@ -647,10 +640,6 @@ class _ExampleGoogleMapState extends State { widget.onTap?.call(position); } - void onPoiTap(PointOfInterest poi) { - widget.onPoiTap?.call(poi); - } - void onLongPress(LatLng position) { widget.onLongPress?.call(position); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml index e2b9b6898439..72b3f21ed9ca 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: # The example app is bundled with the plugin so we use a path dependency on # the parent directory to use the current plugin's version. path: ../ - google_maps_flutter_platform_interface: ^2.15.0 + google_maps_flutter_platform_interface: ^2.13.0 dev_dependencies: flutter_test: @@ -31,6 +31,3 @@ flutter: uses-material-design: true assets: - assets/ -dependency_overrides: - google_maps_flutter_platform_interface: - path: ../../google_maps_flutter_platform_interface diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart index ea6030705316..261fc473e8bb 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:async'; import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:google_maps_flutter_example/example_google_map.dart'; @@ -174,35 +173,4 @@ void main() { await tester.pumpAndSettle(); }); - testWidgets('onPoiTap callback is called', (WidgetTester tester) async { - PointOfInterest? tappedPoi; - final mapCreatedCompleter = Completer(); - - await tester.pumpWidget( - Directionality( - textDirection: TextDirection.ltr, - child: ExampleGoogleMap( - initialCameraPosition: const CameraPosition(target: LatLng(0, 0)), - onPoiTap: (PointOfInterest poi) => tappedPoi = poi, - onMapCreated: (_) => mapCreatedCompleter.complete(), - ), - ), - ); - - await mapCreatedCompleter.future; - - const poi = PointOfInterest( - position: LatLng(10.0, 10.0), - name: 'Test POI', - placeId: 'test_id_123', - ); - - platform.mapEventStreamController.add(MapPoiTapEvent(0, poi)); - - await tester.pump(); - - expect(tappedPoi, poi); - expect(tappedPoi!.name, 'Test POI'); - expect(tappedPoi!.placeId, 'test_id_123'); - }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/test/fake_google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/test/fake_google_maps_flutter_platform.dart index ed0a7f354f6a..899a7709c548 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/test/fake_google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/test/fake_google_maps_flutter_platform.dart @@ -234,11 +234,6 @@ class FakeGoogleMapsFlutterPlatform extends GoogleMapsFlutterPlatform { return mapEventStreamController.stream.whereType(); } - @override - Stream onPoiTap({required int mapId}) { - return mapEventStreamController.stream.whereType(); - } - @override Stream onPolylineTap({required int mapId}) { return mapEventStreamController.stream.whereType(); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMClusterManagersController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMClusterManagersController.m index ee8ddc806f13..04c3f04c9285 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMClusterManagersController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMClusterManagersController.m @@ -13,8 +13,8 @@ @interface FGMClusterManagersController () @property(strong, nonatomic) NSMutableDictionary *clusterManagerIdentifierToManagers; -/// The delegate for handling interactions with clusters. -@property(weak, nonatomic) NSObject *eventDelegate; +/// The callback handler interface for calls to Flutter. +@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; /// The current map instance on which the cluster managers are operating. @property(strong, nonatomic) GMSMapView *mapView; @@ -23,10 +23,10 @@ @interface FGMClusterManagersController () @implementation FGMClusterManagersController - (instancetype)initWithMapView:(GMSMapView *)mapView - eventDelegate:(NSObject *)eventDelegate { + callbackHandler:(FGMMapsCallbackApi *)callbackHandler { self = [super init]; if (self) { - _eventDelegate = eventDelegate; + _callbackHandler = callbackHandler; _mapView = mapView; _clusterManagerIdentifierToManagers = [[NSMutableDictionary alloc] init]; } @@ -106,7 +106,9 @@ - (void)didTapCluster:(GMUStaticCluster *)cluster { return; } FGMPlatformCluster *platFormCluster = FGMGetPigeonCluster(cluster, clusterManagerId); - [self.eventDelegate didTapCluster:platFormCluster]; + [self.callbackHandler didTapCluster:platFormCluster + completion:^(FlutterError *_Nullable _){ + }]; } #pragma mark - Private methods diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMGroundOverlayController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMGroundOverlayController.m index f1fe7281dc09..624f43032c53 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMGroundOverlayController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMGroundOverlayController.m @@ -36,12 +36,12 @@ - (void)removeGroundOverlay { } - (void)updateFromPlatformGroundOverlay:(FGMPlatformGroundOverlay *)groundOverlay - assetProvider:(NSObject *)assetProvider + registrar:(NSObject *)registrar screenScale:(CGFloat)screenScale { [FGMGroundOverlayController updateGroundOverlay:self.groundOverlay fromPlatformGroundOverlay:groundOverlay withMapView:self.mapView - assetProvider:assetProvider + registrar:registrar screenScale:screenScale usingBounds:self.createdWithBounds]; } @@ -49,14 +49,14 @@ - (void)updateFromPlatformGroundOverlay:(FGMPlatformGroundOverlay *)groundOverla + (void)updateGroundOverlay:(GMSGroundOverlay *)groundOverlay fromPlatformGroundOverlay:(FGMPlatformGroundOverlay *)platformGroundOverlay withMapView:(GMSMapView *)mapView - assetProvider:(NSObject *)assetProvider + registrar:(NSObject *)registrar screenScale:(CGFloat)screenScale usingBounds:(BOOL)useBounds { groundOverlay.tappable = platformGroundOverlay.clickable; groundOverlay.zIndex = (int)platformGroundOverlay.zIndex; groundOverlay.anchor = CGPointMake(platformGroundOverlay.anchor.x, platformGroundOverlay.anchor.y); - UIImage *image = FGMIconFromBitmap(platformGroundOverlay.image, assetProvider, screenScale); + UIImage *image = FGMIconFromBitmap(platformGroundOverlay.image, registrar, screenScale); groundOverlay.icon = image; groundOverlay.bearing = platformGroundOverlay.bearing; groundOverlay.opacity = 1.0 - platformGroundOverlay.transparency; @@ -86,10 +86,10 @@ @interface FLTGroundOverlaysController () *groundOverlayControllerByIdentifier; /// A callback api for the map interactions. -@property(weak, nonatomic) NSObject *eventDelegate; +@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; -/// Asset provider used to load images. -@property(weak, nonatomic) NSObject *assetProvider; +/// Flutter Plugin Registrar used to load images. +@property(weak, nonatomic) NSObject *registrar; /// The map view used to generate the controllers. @property(weak, nonatomic) GMSMapView *mapView; @@ -99,14 +99,14 @@ @interface FLTGroundOverlaysController () @implementation FLTGroundOverlaysController - (instancetype)initWithMapView:(GMSMapView *)mapView - eventDelegate:(NSObject *)eventDelegate - assetProvider:(NSObject *)assetProvider { + callbackHandler:(FGMMapsCallbackApi *)callbackHandler + registrar:(NSObject *)registrar { self = [super init]; if (self) { - _eventDelegate = eventDelegate; + _callbackHandler = callbackHandler; _mapView = mapView; _groundOverlayControllerByIdentifier = [[NSMutableDictionary alloc] init]; - _assetProvider = assetProvider; + _registrar = registrar; } return self; } @@ -129,7 +129,7 @@ - (void)addGroundOverlays:(NSArray *)groundOverlaysT coordinate:CLLocationCoordinate2DMake( groundOverlay.bounds.southwest.latitude, groundOverlay.bounds.southwest.longitude)] - icon:FGMIconFromBitmap(groundOverlay.image, self.assetProvider, + icon:FGMIconFromBitmap(groundOverlay.image, self.registrar, [self getScreenScale])]; } else { NSAssert(groundOverlay.zoomLevel != nil, @@ -137,7 +137,7 @@ - (void)addGroundOverlays:(NSArray *)groundOverlaysT gmsOverlay = [GMSGroundOverlay groundOverlayWithPosition:CLLocationCoordinate2DMake(groundOverlay.position.latitude, groundOverlay.position.longitude) - icon:FGMIconFromBitmap(groundOverlay.image, self.assetProvider, + icon:FGMIconFromBitmap(groundOverlay.image, self.registrar, [self getScreenScale]) zoomLevel:[groundOverlay.zoomLevel doubleValue]]; } @@ -148,7 +148,7 @@ - (void)addGroundOverlays:(NSArray *)groundOverlaysT isCreatedWithBounds:isCreatedWithBounds]; controller.zoomLevel = groundOverlay.zoomLevel; [controller updateFromPlatformGroundOverlay:groundOverlay - assetProvider:self.assetProvider + registrar:self.registrar screenScale:[self getScreenScale]]; self.groundOverlayControllerByIdentifier[identifier] = controller; } @@ -159,7 +159,7 @@ - (void)changeGroundOverlays:(NSArray *)groundOverla NSString *identifier = groundOverlay.groundOverlayId; FGMGroundOverlayController *controller = self.groundOverlayControllerByIdentifier[identifier]; [controller updateFromPlatformGroundOverlay:groundOverlay - assetProvider:self.assetProvider + registrar:self.registrar screenScale:[self getScreenScale]]; } } @@ -180,7 +180,9 @@ - (void)didTapGroundOverlayWithIdentifier:(NSString *)identifier { if (!controller) { return; } - [self.eventDelegate didTapGroundOverlayWithIdentifier:identifier]; + [self.callbackHandler didTapGroundOverlayWithIdentifier:identifier + completion:^(FlutterError *_Nullable _){ + }]; } - (bool)hasGroundOverlaysWithIdentifier:(NSString *)identifier { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMImageUtils.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMImageUtils.m index 8136bfd6f6e9..7bd5192c2377 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMImageUtils.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMImageUtils.m @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import Flutter; - #import "FGMImageUtils.h" @import Foundation; @@ -46,7 +44,7 @@ CGFloat screenScale); UIImage *FGMIconFromBitmap(FGMPlatformBitmap *platformBitmap, - NSObject *assetProvider, CGFloat screenScale) { + NSObject *registrar, CGFloat screenScale) { assert(screenScale > 0 && "Screen scale must be greater than 0"); // See comment in messages.dart for why this is so loosely typed. See also // https://github.com/flutter/flutter/issues/117819. @@ -64,16 +62,16 @@ // Refer to the flutter google_maps_flutter_platform_interface package for details. FGMPlatformBitmapAsset *bitmapAsset = bitmap; if (bitmapAsset.pkg) { - image = [assetProvider imageNamed:[assetProvider lookupKeyForAsset:bitmapAsset.name - fromPackage:bitmapAsset.pkg]]; + image = [UIImage imageNamed:[registrar lookupKeyForAsset:bitmapAsset.name + fromPackage:bitmapAsset.pkg]]; } else { - image = [assetProvider imageNamed:[assetProvider lookupKeyForAsset:bitmapAsset.name]]; + image = [UIImage imageNamed:[registrar lookupKeyForAsset:bitmapAsset.name]]; } } else if ([bitmap isKindOfClass:[FGMPlatformBitmapAssetImage class]]) { // Deprecated: This message handling for 'fromAssetImage' has been replaced by 'asset'. // Refer to the flutter google_maps_flutter_platform_interface package for details. FGMPlatformBitmapAssetImage *bitmapAssetImage = bitmap; - image = [assetProvider imageNamed:[assetProvider lookupKeyForAsset:bitmapAssetImage.name]]; + image = [UIImage imageNamed:[registrar lookupKeyForAsset:bitmapAssetImage.name]]; image = scaledImage(image, bitmapAssetImage.scale); } else if ([bitmap isKindOfClass:[FGMPlatformBitmapBytes class]]) { // Deprecated: This message handling for 'fromBytes' has been replaced by 'bytes'. @@ -90,7 +88,7 @@ } else if ([bitmap isKindOfClass:[FGMPlatformBitmapAssetMap class]]) { FGMPlatformBitmapAssetMap *bitmapAssetMap = bitmap; - image = [assetProvider imageNamed:[assetProvider lookupKeyForAsset:bitmapAssetMap.assetName]]; + image = [UIImage imageNamed:[registrar lookupKeyForAsset:bitmapAssetMap.assetName]]; if (bitmapAssetMap.bitmapScaling == FGMPlatformMapBitmapScalingAuto) { NSNumber *width = bitmapAssetMap.width; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.m index 4116c82e4115..c4cce14ed247 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.m @@ -60,17 +60,17 @@ + (void)updateTileLayer:(GMSTileLayer *)tileLayer @interface FLTTileProviderController () -@property(weak, nonatomic) NSObject *tileProviderDelegate; +@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; @end @implementation FLTTileProviderController - (instancetype)initWithTileOverlayIdentifier:(NSString *)identifier - tileProvider:(NSObject *)tileProvider { + callbackHandler:(FGMMapsCallbackApi *)callbackHandler { self = [super init]; if (self) { - _tileProviderDelegate = tileProvider; + _callbackHandler = callbackHandler; _tileOverlayIdentifier = identifier; } return self; @@ -107,7 +107,7 @@ - (void)requestTileForX:(NSUInteger)x zoom:(NSUInteger)zoom receiver:(id)receiver { dispatch_async(dispatch_get_main_queue(), ^{ - [self.tileProviderDelegate + [self.callbackHandler tileWithOverlayIdentifier:self.tileOverlayIdentifier location:[FGMPlatformPoint makeWithX:x y:y] zoom:zoom @@ -133,7 +133,7 @@ @interface FLTTileOverlaysController () @property(strong, nonatomic) NSMutableDictionary *tileOverlayIdentifierToController; -@property(weak, nonatomic) NSObject *tileProviderDelegate; +@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; @property(weak, nonatomic) GMSMapView *mapView; @end @@ -141,11 +141,12 @@ @interface FLTTileOverlaysController () @implementation FLTTileOverlaysController - (instancetype)initWithMapView:(GMSMapView *)mapView - tileProvider:(NSObject *)tileProvider { + callbackHandler:(FGMMapsCallbackApi *)callbackHandler + registrar:(NSObject *)registrar { self = [super init]; if (self) { + _callbackHandler = callbackHandler; _mapView = mapView; - _tileProviderDelegate = tileProvider; _tileOverlayIdentifierToController = [[NSMutableDictionary alloc] init]; } return self; @@ -156,7 +157,7 @@ - (void)addTileOverlays:(NSArray *)tileOverlaysToAdd { NSString *identifier = tileOverlay.tileOverlayId; FLTTileProviderController *tileProvider = [[FLTTileProviderController alloc] initWithTileOverlayIdentifier:identifier - tileProvider:self.tileProviderDelegate]; + callbackHandler:self.callbackHandler]; FLTGoogleMapTileOverlayController *controller = [[FLTGoogleMapTileOverlayController alloc] initWithTileOverlay:tileOverlay tileLayer:tileProvider diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapCircleController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapCircleController.m index 1348601ce0ff..d2d0130dc64a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapCircleController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapCircleController.m @@ -60,7 +60,7 @@ + (void)updateCircle:(GMSCircle *)circle @interface FLTCirclesController () -@property(weak, nonatomic) NSObject *eventDelegate; +@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; @property(weak, nonatomic) GMSMapView *mapView; @property(strong, nonatomic) NSMutableDictionary *circleIdToController; @@ -69,10 +69,11 @@ @interface FLTCirclesController () @implementation FLTCirclesController - (instancetype)initWithMapView:(GMSMapView *)mapView - eventDelegate:(NSObject *)eventDelegate { + callbackHandler:(FGMMapsCallbackApi *)callbackHandler + registrar:(NSObject *)registrar { self = [super init]; if (self) { - _eventDelegate = eventDelegate; + _callbackHandler = callbackHandler; _mapView = mapView; _circleIdToController = [NSMutableDictionary dictionaryWithCapacity:1]; } @@ -121,7 +122,9 @@ - (void)didTapCircleWithIdentifier:(NSString *)identifier { if (!controller) { return; } - [self.eventDelegate didTapCircleWithIdentifier:identifier]; + [self.callbackHandler didTapCircleWithIdentifier:identifier + completion:^(FlutterError *_Nullable _){ + }]; } @end diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m index e2e0b666e8b4..0537d48ba9ce 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m @@ -7,7 +7,6 @@ #import "GoogleMapController.h" #import "GoogleMapController_Test.h" -#import "FGMAssetProvider.h" #import "FGMConversionUtils.h" #import "FGMGroundOverlayController.h" #import "FGMMarkerUserData.h" @@ -15,6 +14,8 @@ #import "FLTGoogleMapTileOverlayController.h" #import "google_maps_flutter_pigeon_messages.g.h" +#pragma mark - Conversion of JSON-like values sent via platform channels. Forward declarations. + @interface FLTGoogleMapFactory () @property(weak, nonatomic) NSObject *registrar; @@ -65,155 +66,6 @@ - (instancetype)initWithRegistrar:(NSObject *)registrar #pragma mark - -/// Non-test implementation of FGMAssetProvider, wrapping a Flutter plugin -/// registrar. -@interface FGMDefaultAssetProvider : NSObject -@property(weak, nonatomic) NSObject *registrar; - -- (instancetype)initWithRegistrar:(NSObject *)registrar; -@end - -@implementation FGMDefaultAssetProvider - -- (instancetype)initWithRegistrar:(NSObject *)registrar { - self = [super init]; - if (self) { - _registrar = registrar; - } - return self; -} - -- (NSString *)lookupKeyForAsset:(NSString *)asset { - return [self.registrar lookupKeyForAsset:asset]; -} - -- (NSString *)lookupKeyForAsset:(NSString *)asset fromPackage:(NSString *)package { - return [self.registrar lookupKeyForAsset:asset fromPackage:package]; -} - -- (UIImage *)imageNamed:(NSString *)name { - return [UIImage imageNamed:name]; -} - -@end - -#pragma mark - - -/// Non-test implementation of FGMAssetProvider, wrapping a FGMMapsCallbackApi -/// instance. -@interface FGMDefaultMapEventHandler : NSObject -@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; - -- (instancetype)initWithCallbackHandler:(FGMMapsCallbackApi *)callbackHandler; -@end - -@implementation FGMDefaultMapEventHandler - -- (instancetype)initWithCallbackHandler:(FGMMapsCallbackApi *)callbackHandler { - self = [super init]; - if (self) { - _callbackHandler = callbackHandler; - } - return self; -} - -- (void)didStartCameraMove { - [self.callbackHandler didStartCameraMoveWithCompletion:^(FlutterError *_){ - }]; -} - -- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition { - [self.callbackHandler didMoveCameraToPosition:cameraPosition - completion:^(FlutterError *_){ - }]; -} - -- (void)didIdleCamera { - [self.callbackHandler didIdleCameraWithCompletion:^(FlutterError *_){ - }]; -} - -- (void)didTapAtPosition:(FGMPlatformLatLng *)position { - [self.callbackHandler didTapAtPosition:position - completion:^(FlutterError *_){ - }]; -} - -- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position { - [self.callbackHandler didLongPressAtPosition:position - completion:^(FlutterError *_){ - }]; -} - -- (void)didTapMarkerWithIdentifier:(NSString *)markerId { - [self.callbackHandler didTapMarkerWithIdentifier:markerId - completion:^(FlutterError *_){ - }]; -} - -- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position { - [self.callbackHandler didStartDragForMarkerWithIdentifier:markerId - atPosition:position - completion:^(FlutterError *_){ - }]; -} - -- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position { - [self.callbackHandler didDragMarkerWithIdentifier:markerId - atPosition:position - completion:^(FlutterError *_){ - }]; -} - -- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position { - [self.callbackHandler didEndDragForMarkerWithIdentifier:markerId - atPosition:position - completion:^(FlutterError *_){ - }]; -} - -- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId { - [self.callbackHandler didTapInfoWindowOfMarkerWithIdentifier:markerId - completion:^(FlutterError *_){ - }]; -} - -- (void)didTapCircleWithIdentifier:(NSString *)circleId { - [self.callbackHandler didTapCircleWithIdentifier:circleId - completion:^(FlutterError *_){ - }]; -} - -- (void)didTapCluster:(FGMPlatformCluster *)cluster { - [self.callbackHandler didTapCluster:cluster - completion:^(FlutterError *_){ - }]; -} - -- (void)didTapPolygonWithIdentifier:(NSString *)polygonId { - [self.callbackHandler didTapPolygonWithIdentifier:polygonId - completion:^(FlutterError *_){ - }]; -} - -- (void)didTapPolylineWithIdentifier:(NSString *)polylineId { - [self.callbackHandler didTapPolylineWithIdentifier:polylineId - completion:^(FlutterError *_){ - }]; -} - -- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId { - [self.callbackHandler didTapGroundOverlayWithIdentifier:groundOverlayId - completion:^(FlutterError *_){ - }]; -} - -@end - -#pragma mark - - /// Private declarations of the FGMMapCallHandler. @interface FGMMapCallHandler () - (instancetype)initWithMapController:(nonnull FLTGoogleMapController *)controller @@ -243,12 +95,12 @@ @interface FGMMapInspector () #pragma mark - -@interface FLTGoogleMapController () +@interface FLTGoogleMapController () @property(nonatomic, strong) GMSMapView *mapView; @property(nonatomic, strong) FGMMapsCallbackApi *dartCallbackHandler; -@property(nonatomic, strong) FGMDefaultMapEventHandler *mapEventHandler; @property(nonatomic, assign) BOOL trackCameraPosition; +@property(nonatomic, weak) NSObject *registrar; @property(nonatomic, strong) FGMClusterManagersController *clusterManagersController; @property(nonatomic, strong) FLTMarkersController *markersController; @property(nonatomic, strong) FLTPolygonsController *polygonsController; @@ -293,15 +145,13 @@ - (instancetype)initWithFrame:(CGRect)frame return [self initWithMapView:mapView viewIdentifier:viewId creationParameters:creationParameters - assetProvider:[[FGMDefaultAssetProvider alloc] initWithRegistrar:registrar] - binaryMessenger:registrar.messenger]; + registrar:registrar]; } - (instancetype)initWithMapView:(GMSMapView *_Nonnull)mapView viewIdentifier:(int64_t)viewId creationParameters:(FGMPlatformMapViewCreationParams *)creationParameters - assetProvider:(NSObject *)assetProvider - binaryMessenger:(NSObject *)binaryMessenger { + registrar:(NSObject *_Nonnull)registrar { if (self = [super init]) { _mapView = mapView; @@ -310,32 +160,36 @@ - (instancetype)initWithMapView:(GMSMapView *_Nonnull)mapView // https://github.com/flutter/flutter/issues/104121 [self interpretMapConfiguration:creationParameters.mapConfiguration]; NSString *pigeonSuffix = [NSString stringWithFormat:@"%lld", viewId]; - _dartCallbackHandler = [[FGMMapsCallbackApi alloc] initWithBinaryMessenger:binaryMessenger + _dartCallbackHandler = [[FGMMapsCallbackApi alloc] initWithBinaryMessenger:registrar.messenger messageChannelSuffix:pigeonSuffix]; - _mapEventHandler = - [[FGMDefaultMapEventHandler alloc] initWithCallbackHandler:_dartCallbackHandler]; _mapView.delegate = self; _mapView.paddingAdjustmentBehavior = kGMSMapViewPaddingAdjustmentBehaviorNever; + _registrar = registrar; _clusterManagersController = [[FGMClusterManagersController alloc] initWithMapView:_mapView - eventDelegate:_mapEventHandler]; + callbackHandler:_dartCallbackHandler]; _markersController = [[FLTMarkersController alloc] initWithMapView:_mapView - eventDelegate:_mapEventHandler + callbackHandler:_dartCallbackHandler clusterManagersController:_clusterManagersController - assetProvider:assetProvider]; + registrar:registrar]; _polygonsController = [[FLTPolygonsController alloc] initWithMapView:_mapView - eventDelegate:_mapEventHandler]; + callbackHandler:_dartCallbackHandler + registrar:registrar]; _polylinesController = [[FLTPolylinesController alloc] initWithMapView:_mapView - eventDelegate:_mapEventHandler]; + callbackHandler:_dartCallbackHandler + registrar:registrar]; _circlesController = [[FLTCirclesController alloc] initWithMapView:_mapView - eventDelegate:_mapEventHandler]; + callbackHandler:_dartCallbackHandler + registrar:registrar]; _heatmapsController = [[FLTHeatmapsController alloc] initWithMapView:_mapView]; - _tileOverlaysController = [[FLTTileOverlaysController alloc] initWithMapView:_mapView - tileProvider:self]; + _tileOverlaysController = + [[FLTTileOverlaysController alloc] initWithMapView:_mapView + callbackHandler:_dartCallbackHandler + registrar:registrar]; _groundOverlaysController = [[FLTGroundOverlaysController alloc] initWithMapView:_mapView - eventDelegate:_mapEventHandler - assetProvider:assetProvider]; + callbackHandler:_dartCallbackHandler + registrar:registrar]; [_clusterManagersController addClusterManagers:creationParameters.initialClusterManagers]; [_markersController addMarkers:creationParameters.initialMarkers]; [_polygonsController addPolygons:creationParameters.initialPolygons]; @@ -351,13 +205,13 @@ - (instancetype)initWithMapView:(GMSMapView *_Nonnull)mapView [_mapView addObserver:self forKeyPath:@"frame" options:0 context:nil]; _callHandler = [[FGMMapCallHandler alloc] initWithMapController:self - messenger:binaryMessenger + messenger:registrar.messenger pigeonSuffix:pigeonSuffix]; - SetUpFGMMapsApiWithSuffix(binaryMessenger, _callHandler, pigeonSuffix); + SetUpFGMMapsApiWithSuffix(registrar.messenger, _callHandler, pigeonSuffix); _inspector = [[FGMMapInspector alloc] initWithMapController:self - messenger:binaryMessenger + messenger:registrar.messenger pigeonSuffix:pigeonSuffix]; - SetUpFGMMapsInspectorApiWithSuffix(binaryMessenger, _inspector, pigeonSuffix); + SetUpFGMMapsInspectorApiWithSuffix(registrar.messenger, _inspector, pigeonSuffix); } return self; } @@ -498,17 +352,22 @@ - (NSString *)setMapStyle:(NSString *)mapStyle { #pragma mark - GMSMapViewDelegate methods - (void)mapView:(GMSMapView *)mapView willMove:(BOOL)gesture { - [self.mapEventHandler didStartCameraMove]; + [self.dartCallbackHandler didStartCameraMoveWithCompletion:^(FlutterError *_Nullable _){ + }]; } - (void)mapView:(GMSMapView *)mapView didChangeCameraPosition:(GMSCameraPosition *)position { if (self.trackCameraPosition) { - [self.mapEventHandler didMoveCameraToPosition:FGMGetPigeonCameraPositionForPosition(position)]; + [self.dartCallbackHandler + didMoveCameraToPosition:FGMGetPigeonCameraPositionForPosition(position) + completion:^(FlutterError *_Nullable _){ + }]; } } - (void)mapView:(GMSMapView *)mapView idleAtCameraPosition:(GMSCameraPosition *)position { - [self.mapEventHandler didIdleCamera]; + [self.dartCallbackHandler didIdleCameraWithCompletion:^(FlutterError *_Nullable _){ + }]; } - (BOOL)mapView:(GMSMapView *)mapView didTapMarker:(GMSMarker *)marker { @@ -557,25 +416,15 @@ - (void)mapView:(GMSMapView *)mapView didTapOverlay:(GMSOverlay *)overlay { } - (void)mapView:(GMSMapView *)mapView didTapAtCoordinate:(CLLocationCoordinate2D)coordinate { - [self.mapEventHandler didTapAtPosition:FGMGetPigeonLatLngForCoordinate(coordinate)]; -} - -- (void)mapView:(GMSMapView *)mapView - didTapPOIWithPlaceID:(NSString *)placeID - name:(NSString *)name - location:(CLLocationCoordinate2D)location { - FGMPlatformPointOfInterest *poi = - [FGMPlatformPointOfInterest makeWithPosition:FGMGetPigeonLatLngForCoordinate(location) - name:name - placeId:placeID]; - - [self.dartCallbackHandler didTapPointOfInterest:poi - completion:^(FlutterError *_Nullable _){ - }]; + [self.dartCallbackHandler didTapAtPosition:FGMGetPigeonLatLngForCoordinate(coordinate) + completion:^(FlutterError *_Nullable _){ + }]; } - (void)mapView:(GMSMapView *)mapView didLongPressAtCoordinate:(CLLocationCoordinate2D)coordinate { - [self.mapEventHandler didLongPressAtPosition:FGMGetPigeonLatLngForCoordinate(coordinate)]; + [self.dartCallbackHandler didLongPressAtPosition:FGMGetPigeonLatLngForCoordinate(coordinate) + completion:^(FlutterError *_Nullable _){ + }]; } - (void)interpretMapConfiguration:(FGMPlatformMapConfiguration *)config { @@ -651,19 +500,6 @@ - (void)interpretMapConfiguration:(FGMPlatformMapConfiguration *)config { } } -#pragma mark - FGMTileProviderDelegate - -- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId - location:(FGMPlatformPoint *)location - zoom:(NSInteger)zoom - completion:(void (^)(FGMPlatformTile *_Nullable, - FlutterError *_Nullable))completion { - [self.dartCallbackHandler tileWithOverlayIdentifier:tileOverlayId - location:location - zoom:zoom - completion:completion]; -} - @end #pragma mark - diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapMarkerController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapMarkerController.m index 9d061eec8b09..ed3aabd7fc10 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapMarkerController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapMarkerController.m @@ -54,7 +54,7 @@ - (void)removeMarker { } - (void)updateFromPlatformMarker:(FGMPlatformMarker *)platformMarker - assetProvider:(NSObject *)assetProvider + registrar:(NSObject *)registrar screenScale:(CGFloat)screenScale { self.clusterManagerIdentifier = platformMarker.clusterManagerId; self.consumeTapEvents = platformMarker.consumeTapEvents; @@ -69,7 +69,7 @@ - (void)updateFromPlatformMarker:(FGMPlatformMarker *)platformMarker [FLTGoogleMapMarkerController updateMarker:self.marker fromPlatformMarker:platformMarker withMapView:self.mapView - assetProvider:assetProvider + registrar:registrar screenScale:screenScale usingOpacityForVisibility:useOpacityForVisibility]; } @@ -77,12 +77,12 @@ - (void)updateFromPlatformMarker:(FGMPlatformMarker *)platformMarker + (void)updateMarker:(GMSMarker *)marker fromPlatformMarker:(FGMPlatformMarker *)platformMarker withMapView:(GMSMapView *)mapView - assetProvider:(NSObject *)assetProvider + registrar:(NSObject *)registrar screenScale:(CGFloat)screenScale usingOpacityForVisibility:(BOOL)useOpacityForVisibility { marker.groundAnchor = FGMGetCGPointForPigeonPoint(platformMarker.anchor); marker.draggable = platformMarker.draggable; - UIImage *image = FGMIconFromBitmap(platformMarker.icon, assetProvider, screenScale); + UIImage *image = FGMIconFromBitmap(platformMarker.icon, registrar, screenScale); marker.icon = image; marker.flat = platformMarker.flat; marker.position = FGMGetCoordinateForPigeonLatLng(platformMarker.position); @@ -108,12 +108,11 @@ + (void)updateMarker:(GMSMarker *)marker @interface FLTMarkersController () -@property(strong, nonatomic, readwrite) - NSMutableDictionary *markerIdentifierToController; -@property(weak, nonatomic) NSObject *eventDelegate; +@property(strong, nonatomic, readwrite) NSMutableDictionary *markerIdentifierToController; +@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; /// Controller for adding/removing/fetching cluster managers @property(weak, nonatomic, nullable) FGMClusterManagersController *clusterManagersController; -@property(weak, nonatomic) NSObject *assetProvider; +@property(weak, nonatomic) NSObject *registrar; @property(weak, nonatomic) GMSMapView *mapView; @end @@ -121,16 +120,16 @@ @interface FLTMarkersController () @implementation FLTMarkersController - (instancetype)initWithMapView:(GMSMapView *)mapView - eventDelegate:(NSObject *)eventDelegate + callbackHandler:(FGMMapsCallbackApi *)callbackHandler clusterManagersController:(nullable FGMClusterManagersController *)clusterManagersController - assetProvider:(NSObject *)assetProvider { + registrar:(NSObject *)registrar { self = [super init]; if (self) { - _eventDelegate = eventDelegate; + _callbackHandler = callbackHandler; _mapView = mapView; _clusterManagersController = clusterManagersController; _markerIdentifierToController = [[NSMutableDictionary alloc] init]; - _assetProvider = assetProvider; + _registrar = registrar; } return self; } @@ -151,7 +150,7 @@ - (void)addMarker:(FGMPlatformMarker *)markerToAdd { markerIdentifier:markerIdentifier mapView:self.mapView]; [controller updateFromPlatformMarker:markerToAdd - assetProvider:self.assetProvider + registrar:self.registrar screenScale:[self getScreenScale]]; if (clusterManagerIdentifier) { GMUClusterManager *clusterManager = @@ -180,7 +179,7 @@ - (void)changeMarker:(FGMPlatformMarker *)markerToChange { NSString *clusterManagerIdentifier = markerToChange.clusterManagerId; NSString *previousClusterManagerIdentifier = [controller clusterManagerIdentifier]; [controller updateFromPlatformMarker:markerToChange - assetProvider:self.assetProvider + registrar:self.registrar screenScale:[self getScreenScale]]; if ([controller.marker conformsToProtocol:@protocol(GMUClusterItem)]) { @@ -233,7 +232,9 @@ - (BOOL)didTapMarkerWithIdentifier:(NSString *)identifier { if (!controller) { return NO; } - [self.eventDelegate didTapMarkerWithIdentifier:identifier]; + [self.callbackHandler didTapMarkerWithIdentifier:identifier + completion:^(FlutterError *_Nullable _){ + }]; return controller.consumeTapEvents; } @@ -246,9 +247,11 @@ - (void)didStartDraggingMarkerWithIdentifier:(NSString *)identifier if (!controller) { return; } - [self.eventDelegate + [self.callbackHandler didStartDragForMarkerWithIdentifier:identifier - atPosition:FGMGetPigeonLatLngForCoordinate(location)]; + atPosition:FGMGetPigeonLatLngForCoordinate(location) + completion:^(FlutterError *_Nullable _){ + }]; } - (void)didDragMarkerWithIdentifier:(NSString *)identifier @@ -260,8 +263,10 @@ - (void)didDragMarkerWithIdentifier:(NSString *)identifier if (!controller) { return; } - [self.eventDelegate didDragMarkerWithIdentifier:identifier - atPosition:FGMGetPigeonLatLngForCoordinate(location)]; + [self.callbackHandler didDragMarkerWithIdentifier:identifier + atPosition:FGMGetPigeonLatLngForCoordinate(location) + completion:^(FlutterError *_Nullable _){ + }]; } - (void)didEndDraggingMarkerWithIdentifier:(NSString *)identifier @@ -270,13 +275,17 @@ - (void)didEndDraggingMarkerWithIdentifier:(NSString *)identifier if (!controller) { return; } - [self.eventDelegate didEndDragForMarkerWithIdentifier:identifier - atPosition:FGMGetPigeonLatLngForCoordinate(location)]; + [self.callbackHandler didEndDragForMarkerWithIdentifier:identifier + atPosition:FGMGetPigeonLatLngForCoordinate(location) + completion:^(FlutterError *_Nullable _){ + }]; } - (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)identifier { if (identifier && self.markerIdentifierToController[identifier]) { - [self.eventDelegate didTapInfoWindowOfMarkerWithIdentifier:identifier]; + [self.callbackHandler didTapInfoWindowOfMarkerWithIdentifier:identifier + completion:^(FlutterError *_Nullable _){ + }]; } } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapPolygonController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapPolygonController.m index f5d077bd4ff1..12cbfeefecd7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapPolygonController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapPolygonController.m @@ -70,7 +70,8 @@ + (void)updatePolygon:(GMSPolygon *)polygon @interface FLTPolygonsController () @property(strong, nonatomic) NSMutableDictionary *polygonIdentifierToController; -@property(weak, nonatomic) NSObject *eventDelegate; +@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; +@property(weak, nonatomic) NSObject *registrar; @property(weak, nonatomic) GMSMapView *mapView; @end @@ -78,12 +79,14 @@ @interface FLTPolygonsController () @implementation FLTPolygonsController - (instancetype)initWithMapView:(GMSMapView *)mapView - eventDelegate:(NSObject *)eventDelegate { + callbackHandler:(FGMMapsCallbackApi *)callbackHandler + registrar:(NSObject *)registrar { self = [super init]; if (self) { - _eventDelegate = eventDelegate; + _callbackHandler = callbackHandler; _mapView = mapView; _polygonIdentifierToController = [NSMutableDictionary dictionaryWithCapacity:1]; + _registrar = registrar; } return self; } @@ -128,7 +131,9 @@ - (void)didTapPolygonWithIdentifier:(NSString *)identifier { if (!controller) { return; } - [self.eventDelegate didTapPolygonWithIdentifier:identifier]; + [self.callbackHandler didTapPolygonWithIdentifier:identifier + completion:^(FlutterError *_Nullable _){ + }]; } - (bool)hasPolygonWithIdentifier:(NSString *)identifier { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapPolylineController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapPolylineController.m index ea84a4e5be54..63a7f7b7b0fc 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapPolylineController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapPolylineController.m @@ -63,7 +63,8 @@ + (void)updatePolyline:(GMSPolyline *)polyline @interface FLTPolylinesController () @property(strong, nonatomic) NSMutableDictionary *polylineIdentifierToController; -@property(weak, nonatomic) NSObject *eventDelegate; +@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; +@property(weak, nonatomic) NSObject *registrar; @property(weak, nonatomic) GMSMapView *mapView; @end @@ -72,12 +73,14 @@ @interface FLTPolylinesController () @implementation FLTPolylinesController - (instancetype)initWithMapView:(GMSMapView *)mapView - eventDelegate:(NSObject *)eventDelegate { + callbackHandler:(FGMMapsCallbackApi *)callbackHandler + registrar:(NSObject *)registrar { self = [super init]; if (self) { - _eventDelegate = eventDelegate; + _callbackHandler = callbackHandler; _mapView = mapView; _polylineIdentifierToController = [NSMutableDictionary dictionaryWithCapacity:1]; + _registrar = registrar; } return self; } @@ -122,7 +125,9 @@ - (void)didTapPolylineWithIdentifier:(NSString *)identifier { if (!controller) { return; } - [self.eventDelegate didTapPolylineWithIdentifier:identifier]; + [self.callbackHandler didTapPolylineWithIdentifier:identifier + completion:^(FlutterError *_Nullable _){ + }]; } - (bool)hasPolylineWithIdentifier:(NSString *)identifier { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m index 60d18f1a8c67..e833e2f24f42 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m @@ -1,15 +1,19 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.7), do not edit directly. +// Autogenerated from Pigeon (v26.1.5), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "google_maps_flutter_pigeon_messages.g.h" #if TARGET_OS_OSX -@import FlutterMacOS; +#import #else -@import Flutter; +#import +#endif + +#if !__has_feature(objc_arc) +#error File requires ARC to be enabled. #endif static NSArray *wrapResult(id result, FlutterError *error) { @@ -187,12 +191,6 @@ + (nullable FGMPlatformMarker *)nullableFromList:(NSArray *)list; - (NSArray *)toList; @end -@interface FGMPlatformPointOfInterest () -+ (FGMPlatformPointOfInterest *)fromList:(NSArray *)list; -+ (nullable FGMPlatformPointOfInterest *)nullableFromList:(NSArray *)list; -- (NSArray *)toList; -@end - @interface FGMPlatformPolygon () + (FGMPlatformPolygon *)fromList:(NSArray *)list; + (nullable FGMPlatformPolygon *)nullableFromList:(NSArray *)list; @@ -880,35 +878,6 @@ + (nullable FGMPlatformMarker *)nullableFromList:(NSArray *)list { } @end -@implementation FGMPlatformPointOfInterest -+ (instancetype)makeWithPosition:(FGMPlatformLatLng *)position - name:(NSString *)name - placeId:(NSString *)placeId { - FGMPlatformPointOfInterest *pigeonResult = [[FGMPlatformPointOfInterest alloc] init]; - pigeonResult.position = position; - pigeonResult.name = name; - pigeonResult.placeId = placeId; - return pigeonResult; -} -+ (FGMPlatformPointOfInterest *)fromList:(NSArray *)list { - FGMPlatformPointOfInterest *pigeonResult = [[FGMPlatformPointOfInterest alloc] init]; - pigeonResult.position = GetNullableObjectAtIndex(list, 0); - pigeonResult.name = GetNullableObjectAtIndex(list, 1); - pigeonResult.placeId = GetNullableObjectAtIndex(list, 2); - return pigeonResult; -} -+ (nullable FGMPlatformPointOfInterest *)nullableFromList:(NSArray *)list { - return (list) ? [FGMPlatformPointOfInterest fromList:list] : nil; -} -- (NSArray *)toList { - return @[ - self.position ?: [NSNull null], - self.name ?: [NSNull null], - self.placeId ?: [NSNull null], - ]; -} -@end - @implementation FGMPlatformPolygon + (instancetype)makeWithPolygonId:(NSString *)polygonId consumesTapEvents:(BOOL)consumesTapEvents @@ -1826,54 +1795,52 @@ - (nullable id)readValueOfType:(UInt8)type { case 150: return [FGMPlatformMarker fromList:[self readValue]]; case 151: - return [FGMPlatformPointOfInterest fromList:[self readValue]]; - case 152: return [FGMPlatformPolygon fromList:[self readValue]]; - case 153: + case 152: return [FGMPlatformPolyline fromList:[self readValue]]; - case 154: + case 153: return [FGMPlatformPatternItem fromList:[self readValue]]; - case 155: + case 154: return [FGMPlatformTile fromList:[self readValue]]; - case 156: + case 155: return [FGMPlatformTileOverlay fromList:[self readValue]]; - case 157: + case 156: return [FGMPlatformEdgeInsets fromList:[self readValue]]; - case 158: + case 157: return [FGMPlatformLatLng fromList:[self readValue]]; - case 159: + case 158: return [FGMPlatformLatLngBounds fromList:[self readValue]]; - case 160: + case 159: return [FGMPlatformCameraTargetBounds fromList:[self readValue]]; - case 161: + case 160: return [FGMPlatformGroundOverlay fromList:[self readValue]]; - case 162: + case 161: return [FGMPlatformMapViewCreationParams fromList:[self readValue]]; - case 163: + case 162: return [FGMPlatformMapConfiguration fromList:[self readValue]]; - case 164: + case 163: return [FGMPlatformPoint fromList:[self readValue]]; - case 165: + case 164: return [FGMPlatformSize fromList:[self readValue]]; - case 166: + case 165: return [FGMPlatformColor fromList:[self readValue]]; - case 167: + case 166: return [FGMPlatformTileLayer fromList:[self readValue]]; - case 168: + case 167: return [FGMPlatformZoomRange fromList:[self readValue]]; - case 169: + case 168: return [FGMPlatformBitmap fromList:[self readValue]]; - case 170: + case 169: return [FGMPlatformBitmapDefaultMarker fromList:[self readValue]]; - case 171: + case 170: return [FGMPlatformBitmapBytes fromList:[self readValue]]; - case 172: + case 171: return [FGMPlatformBitmapAsset fromList:[self readValue]]; - case 173: + case 172: return [FGMPlatformBitmapAssetImage fromList:[self readValue]]; - case 174: + case 173: return [FGMPlatformBitmapAssetMap fromList:[self readValue]]; - case 175: + case 174: return [FGMPlatformBitmapBytesMap fromList:[self readValue]]; default: return [super readValueOfType:type]; @@ -1955,80 +1922,77 @@ - (void)writeValue:(id)value { } else if ([value isKindOfClass:[FGMPlatformMarker class]]) { [self writeByte:150]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPointOfInterest class]]) { - [self writeByte:151]; - [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) { - [self writeByte:152]; + [self writeByte:151]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) { - [self writeByte:153]; + [self writeByte:152]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) { - [self writeByte:154]; + [self writeByte:153]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformTile class]]) { - [self writeByte:155]; + [self writeByte:154]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) { - [self writeByte:156]; + [self writeByte:155]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) { - [self writeByte:157]; + [self writeByte:156]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) { - [self writeByte:158]; + [self writeByte:157]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) { - [self writeByte:159]; + [self writeByte:158]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) { - [self writeByte:160]; + [self writeByte:159]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) { - [self writeByte:161]; + [self writeByte:160]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) { - [self writeByte:162]; + [self writeByte:161]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) { - [self writeByte:163]; + [self writeByte:162]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformPoint class]]) { - [self writeByte:164]; + [self writeByte:163]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformSize class]]) { - [self writeByte:165]; + [self writeByte:164]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformColor class]]) { - [self writeByte:166]; + [self writeByte:165]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) { - [self writeByte:167]; + [self writeByte:166]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) { - [self writeByte:168]; + [self writeByte:167]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) { - [self writeByte:169]; + [self writeByte:168]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) { - [self writeByte:170]; + [self writeByte:169]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) { - [self writeByte:171]; + [self writeByte:170]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) { - [self writeByte:172]; + [self writeByte:171]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) { - [self writeByte:173]; + [self writeByte:172]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) { - [self writeByte:174]; + [self writeByte:173]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) { - [self writeByte:175]; + [self writeByte:174]; [self writeValue:[value toList]]; } else { [super writeValue:value]; @@ -3084,31 +3048,6 @@ - (void)didTapGroundOverlayWithIdentifier:(NSString *)arg_groundOverlayId } }]; } -- (void)didTapPointOfInterest:(FGMPlatformPointOfInterest *)arg_poi - completion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap", - _messageChannelSuffix]; - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel - messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; - [channel sendMessage:@[ arg_poi ?: [NSNull null] ] - reply:^(NSArray *reply) { - if (reply != nil) { - if (reply.count > 1) { - completion([FlutterError errorWithCode:reply[0] - message:reply[1] - details:reply[2]]); - } else { - completion(nil); - } - } else { - completion(createConnectionError(channelName)); - } - }]; -} - (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId location:(FGMPlatformPoint *)arg_location zoom:(NSInteger)arg_zoom diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMClusterManagersController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMClusterManagersController.h index b6134c6b9d28..98afbb34d1f0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMClusterManagersController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMClusterManagersController.h @@ -6,7 +6,6 @@ @import GoogleMaps; @import GoogleMapsUtils; -#import "FGMMapEventDelegate.h" #import "google_maps_flutter_pigeon_messages.g.h" NS_ASSUME_NONNULL_BEGIN @@ -16,10 +15,10 @@ NS_ASSUME_NONNULL_BEGIN /// Initializes cluster manager controller. /// -/// @param eventDelegate A delegate that will receive events from the cluster managers. +/// @param callbackHandler A callback handler. /// @param mapView A map view that will be used to display clustered markers. - (instancetype)initWithMapView:(GMSMapView *)mapView - eventDelegate:(NSObject *)eventDelegate; + callbackHandler:(FGMMapsCallbackApi *)callbackHandler; /// Creates cluster managers and initializes them. /// diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMConversionUtils.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMConversionUtils.h index 788c585c6f34..c7821882297c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMConversionUtils.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMConversionUtils.h @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +@import Flutter; @import Foundation; @import GoogleMaps; @import GoogleMapsUtils; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMGroundOverlayController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMGroundOverlayController.h index f4a07aa950e5..a5297f703b9e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMGroundOverlayController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMGroundOverlayController.h @@ -3,12 +3,11 @@ // found in the LICENSE file. @import CoreLocation; +@import Flutter; @import Foundation; @import GoogleMaps; @import UIKit; -#import "FGMAssetProvider.h" -#import "FGMMapEventDelegate.h" #import "google_maps_flutter_pigeon_messages.g.h" NS_ASSUME_NONNULL_BEGIN @@ -38,10 +37,10 @@ NS_ASSUME_NONNULL_BEGIN /// Controller of multiple ground overlays on the map. @interface FLTGroundOverlaysController : NSObject -/// Initializes the controller with a GMSMapView, event delegate, and asset provider. +/// Initializes the controller with a GMSMapView, callback handler and registrar. - (instancetype)initWithMapView:(GMSMapView *)mapView - eventDelegate:(NSObject *)eventDelegate - assetProvider:(NSObject *)assetProvider; + callbackHandler:(FGMMapsCallbackApi *)callbackHandler + registrar:(NSObject *)registrar; /// Adds ground overlays to the map. - (void)addGroundOverlays:(NSArray *)groundOverlaysToAdd; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMGroundOverlayController_Test.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMGroundOverlayController_Test.h index 1c4d062348a5..87123539947d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMGroundOverlayController_Test.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMGroundOverlayController_Test.h @@ -12,7 +12,7 @@ /// Function to update the gms ground overlay from platform ground overlay. - (void)updateFromPlatformGroundOverlay:(FGMPlatformGroundOverlay *)groundOverlay - assetProvider:(NSObject *)assetProvider + registrar:(NSObject *)registrar screenScale:(CGFloat)screenScale; /// Updates the underlying GMSGroundOverlay with the properties from the given @@ -22,7 +22,7 @@ + (void)updateGroundOverlay:(GMSGroundOverlay *)groundOverlay fromPlatformGroundOverlay:(FGMPlatformGroundOverlay *)groundOverlay withMapView:(GMSMapView *)mapView - assetProvider:(NSObject *)assetProvider + registrar:(NSObject *)registrar screenScale:(CGFloat)screenScale usingBounds:(BOOL)useBounds; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMImageUtils.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMImageUtils.h index a8fd0c82c688..37a833d79d1e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMImageUtils.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMImageUtils.h @@ -2,17 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +@import Flutter; @import GoogleMaps; -@import UIKit; -#import "FGMAssetProvider.h" #import "google_maps_flutter_pigeon_messages.g.h" NS_ASSUME_NONNULL_BEGIN /// Creates a UIImage from Pigeon bitmap. UIImage *_Nullable FGMIconFromBitmap(FGMPlatformBitmap *platformBitmap, - NSObject *assetProvider, + NSObject *registrar, CGFloat screenScale); /// Returns a BOOL indicating whether image is considered scalable with the given scale factor from /// size. diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapHeatmapController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapHeatmapController.h index 93c2aacf5e57..edba379ac0e3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapHeatmapController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapHeatmapController.h @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +@import Flutter; @import GoogleMaps; @import GoogleMapsUtils; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.h index b4c707e6d0b4..5c1b6e5418e8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.h @@ -9,17 +9,6 @@ NS_ASSUME_NONNULL_BEGIN -/// Protocol for requesting tiles from the Dart side. -@protocol FGMTileProviderDelegate -- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId - location:(FGMPlatformPoint *)location - zoom:(NSInteger)zoom - completion:(void (^)(FGMPlatformTile *_Nullable, - FlutterError *_Nullable))completion; -@end - -#pragma mark - - @interface FLTGoogleMapTileOverlayController : NSObject /// The layer managed by this controller instance. @property(readonly, nonatomic) GMSTileLayer *layer; @@ -34,12 +23,13 @@ NS_ASSUME_NONNULL_BEGIN @interface FLTTileProviderController : GMSTileLayer @property(copy, nonatomic, readonly) NSString *tileOverlayIdentifier; - (instancetype)initWithTileOverlayIdentifier:(NSString *)identifier - tileProvider:(NSObject *)tileProvider; + callbackHandler:(FGMMapsCallbackApi *)callbackHandler; @end @interface FLTTileOverlaysController : NSObject - (instancetype)initWithMapView:(GMSMapView *)mapView - tileProvider:(NSObject *)tileProvider; + callbackHandler:(FGMMapsCallbackApi *)callbackHandler + registrar:(NSObject *)registrar; - (void)addTileOverlays:(NSArray *)tileOverlaysToAdd; - (void)changeTileOverlays:(NSArray *)tileOverlaysToChange; - (void)removeTileOverlayWithIdentifiers:(NSArray *)identifiers; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapCircleController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapCircleController.h index ac4347551135..0cb21d926f6a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapCircleController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapCircleController.h @@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +@import Flutter; @import GoogleMaps; -#import "FGMMapEventDelegate.h" #import "google_maps_flutter_pigeon_messages.g.h" NS_ASSUME_NONNULL_BEGIN @@ -18,7 +18,8 @@ NS_ASSUME_NONNULL_BEGIN @interface FLTCirclesController : NSObject - (instancetype)initWithMapView:(GMSMapView *)mapView - eventDelegate:(NSObject *)eventDelegate; + callbackHandler:(FGMMapsCallbackApi *)callbackHandler + registrar:(NSObject *)registrar; - (void)addCircles:(NSArray *)circlesToAdd; - (void)changeCircles:(NSArray *)circlesToChange; - (void)removeCirclesWithIdentifiers:(NSArray *)identifiers; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapController_Test.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapController_Test.h index bbb61545cc0c..219a1ac246e9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapController_Test.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapController_Test.h @@ -5,7 +5,6 @@ @import Flutter; @import GoogleMaps; -#import "FGMAssetProvider.h" #import "FGMCATransactionWrapper.h" #import "GoogleMapController.h" @@ -46,13 +45,11 @@ NS_ASSUME_NONNULL_BEGIN /// @param mapView A map view that will be displayed by the controller /// @param viewId A unique identifier for the controller. /// @param creationParameters Parameters for initialising the map view. -/// @param assetProvider The asset provider to use for looking up assets. -/// @param binaryMessenger The binary messenger to use for sending messages to Dart. +/// @param registrar The plugin registrar passed from Flutter. - (instancetype)initWithMapView:(GMSMapView *)mapView viewIdentifier:(int64_t)viewId creationParameters:(FGMPlatformMapViewCreationParams *)creationParameters - assetProvider:(NSObject *)assetProvider - binaryMessenger:(NSObject *)binaryMessenger; + registrar:(NSObject *)registrar; // The main Pigeon API implementation. @property(nonatomic, strong, readonly) FGMMapCallHandler *callHandler; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapMarkerController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapMarkerController.h index 57797346639e..dcebcb1e2982 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapMarkerController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapMarkerController.h @@ -5,15 +5,12 @@ @import Flutter; @import GoogleMaps; -#import "FGMAssetProvider.h" #import "FGMClusterManagersController.h" -#import "FGMMapEventDelegate.h" +#import "GoogleMapController.h" #import "google_maps_flutter_pigeon_messages.g.h" NS_ASSUME_NONNULL_BEGIN -#pragma mark - - // Defines marker controllable by Flutter. @interface FLTGoogleMapMarkerController : NSObject @property(assign, nonatomic, readonly) BOOL consumeTapEvents; @@ -28,9 +25,9 @@ NS_ASSUME_NONNULL_BEGIN @interface FLTMarkersController : NSObject - (instancetype)initWithMapView:(GMSMapView *)mapView - eventDelegate:(NSObject *)eventDelegate + callbackHandler:(FGMMapsCallbackApi *)callbackHandler clusterManagersController:(nullable FGMClusterManagersController *)clusterManagersController - assetProvider:(NSObject *)assetProvider; + registrar:(NSObject *)registrar; - (void)addMarkers:(NSArray *)markersToAdd; - (void)changeMarkers:(NSArray *)markersToChange; - (void)removeMarkersWithIdentifiers:(NSArray *)identifiers; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapMarkerController_Test.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapMarkerController_Test.h index d7a9c1578432..f6ff32e791e1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapMarkerController_Test.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapMarkerController_Test.h @@ -16,7 +16,7 @@ + (void)updateMarker:(GMSMarker *)marker fromPlatformMarker:(FGMPlatformMarker *)platformMarker withMapView:(GMSMapView *)mapView - assetProvider:(NSObject *)assetProvider + registrar:(NSObject *)registrar screenScale:(CGFloat)screenScale usingOpacityForVisibility:(BOOL)useOpacityForVisibility; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapPolygonController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapPolygonController.h index a222ca6a4eb0..b26cf2416c5f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapPolygonController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapPolygonController.h @@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +@import Flutter; @import GoogleMaps; -#import "FGMMapEventDelegate.h" #import "google_maps_flutter_pigeon_messages.g.h" // Defines polygon controllable by Flutter. @@ -17,7 +17,8 @@ @interface FLTPolygonsController : NSObject - (instancetype)initWithMapView:(GMSMapView *)mapView - eventDelegate:(NSObject *)eventDelegate; + callbackHandler:(FGMMapsCallbackApi *)callbackHandler + registrar:(NSObject *)registrar; - (void)addPolygons:(NSArray *)polygonsToAdd; - (void)changePolygons:(NSArray *)polygonsToChange; - (void)removePolygonWithIdentifiers:(NSArray *)identifiers; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapPolylineController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapPolylineController.h index ccf37dae9a35..5505ec54019b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapPolylineController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapPolylineController.h @@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +@import Flutter; @import GoogleMaps; -#import "FGMMapEventDelegate.h" #import "google_maps_flutter_pigeon_messages.g.h" // Defines polyline controllable by Flutter. @@ -17,7 +17,8 @@ @interface FLTPolylinesController : NSObject - (instancetype)initWithMapView:(GMSMapView *)mapView - eventDelegate:(NSObject *)eventDelegate; + callbackHandler:(FGMMapsCallbackApi *)callbackHandler + registrar:(NSObject *)registrar; - (void)addPolylines:(NSArray *)polylinesToAdd; - (void)changePolylines:(NSArray *)polylinesToChange; - (void)removePolylineWithIdentifiers:(NSArray *)identifiers; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h index b1d81e6cc9e2..db11f425c37c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h @@ -1,10 +1,10 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.7), do not edit directly. +// Autogenerated from Pigeon (v26.1.5), do not edit directly. // See also: https://pub.dev/packages/pigeon -@import Foundation; +#import @protocol FlutterBinaryMessenger; @protocol FlutterMessageCodec; @@ -84,7 +84,6 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @class FGMPlatformCluster; @class FGMPlatformClusterManager; @class FGMPlatformMarker; -@class FGMPlatformPointOfInterest; @class FGMPlatformPolygon; @class FGMPlatformPolyline; @class FGMPlatformPatternItem; @@ -339,18 +338,6 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @property(nonatomic, copy, nullable) NSString *clusterManagerId; @end -/// Pigeon equivalent of the Point of Interest class. -@interface FGMPlatformPointOfInterest : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithPosition:(FGMPlatformLatLng *)position - name:(NSString *)name - placeId:(NSString *)placeId; -@property(nonatomic, strong) FGMPlatformLatLng *position; -@property(nonatomic, copy) NSString *name; -@property(nonatomic, copy) NSString *placeId; -@end - /// Pigeon equivalent of the Polygon class. @interface FGMPlatformPolygon : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. @@ -884,9 +871,6 @@ extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger /// Called when a ground overlay is tapped. - (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a point of interest is tapped. -- (void)didTapPointOfInterest:(FGMPlatformPointOfInterest *)poi - completion:(void (^)(FlutterError *_Nullable))completion; /// Called to get data for a map tile. - (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId location:(FGMPlatformPoint *)location diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index 2a9b1d1a76f3..c7e469ad1491 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -206,11 +206,6 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { return _events(mapId).whereType(); } - @override - Stream onPoiTap({required int mapId}) { - return _events(mapId).whereType(); - } - @override Future updateMapConfiguration( MapConfiguration configuration, { @@ -1166,20 +1161,6 @@ class HostMapMessageHandler implements MapsCallbackApi { MapTapEvent(mapId, _latLngFromPlatformLatLng(position)), ); } - - @override - void onPoiTap(PlatformPointOfInterest poi) { - streamController.add( - MapPoiTapEvent( - mapId, - PointOfInterest( - position: LatLng(poi.position.latitude, poi.position.longitude), - name: poi.name, - placeId: poi.placeId, - ), - ), - ); - } } LatLng _latLngFromPlatformLatLng(PlatformLatLng latLng) { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart index 0f2aec5ded52..bd54d5f62322 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.7), do not edit directly. +// Autogenerated from Pigeon (v26.1.5), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -956,54 +956,6 @@ class PlatformMarker { int get hashCode => Object.hashAll(_toList()); } -/// Pigeon equivalent of the Point of Interest class. -class PlatformPointOfInterest { - PlatformPointOfInterest({ - required this.position, - this.name, - required this.placeId, - }); - - PlatformLatLng position; - - String? name; - - String placeId; - - List _toList() { - return [position, name, placeId]; - } - - Object encode() { - return _toList(); - } - - static PlatformPointOfInterest decode(Object result) { - result as List; - return PlatformPointOfInterest( - position: result[0]! as PlatformLatLng, - name: result[1]! as String, - placeId: result[2]! as String, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPointOfInterest || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); -} - /// Pigeon equivalent of the Polygon class. class PlatformPolygon { PlatformPolygon({ @@ -2436,80 +2388,77 @@ class _PigeonCodec extends StandardMessageCodec { } else if (value is PlatformMarker) { buffer.putUint8(150); writeValue(buffer, value.encode()); - } else if (value is PlatformPointOfInterest) { - buffer.putUint8(151); - writeValue(buffer, value.encode()); } else if (value is PlatformPolygon) { - buffer.putUint8(152); + buffer.putUint8(151); writeValue(buffer, value.encode()); } else if (value is PlatformPolyline) { - buffer.putUint8(153); + buffer.putUint8(152); writeValue(buffer, value.encode()); } else if (value is PlatformPatternItem) { - buffer.putUint8(154); + buffer.putUint8(153); writeValue(buffer, value.encode()); } else if (value is PlatformTile) { - buffer.putUint8(155); + buffer.putUint8(154); writeValue(buffer, value.encode()); } else if (value is PlatformTileOverlay) { - buffer.putUint8(156); + buffer.putUint8(155); writeValue(buffer, value.encode()); } else if (value is PlatformEdgeInsets) { - buffer.putUint8(157); + buffer.putUint8(156); writeValue(buffer, value.encode()); } else if (value is PlatformLatLng) { - buffer.putUint8(158); + buffer.putUint8(157); writeValue(buffer, value.encode()); } else if (value is PlatformLatLngBounds) { - buffer.putUint8(159); + buffer.putUint8(158); writeValue(buffer, value.encode()); } else if (value is PlatformCameraTargetBounds) { - buffer.putUint8(160); + buffer.putUint8(159); writeValue(buffer, value.encode()); } else if (value is PlatformGroundOverlay) { - buffer.putUint8(161); + buffer.putUint8(160); writeValue(buffer, value.encode()); } else if (value is PlatformMapViewCreationParams) { - buffer.putUint8(162); + buffer.putUint8(161); writeValue(buffer, value.encode()); } else if (value is PlatformMapConfiguration) { - buffer.putUint8(163); + buffer.putUint8(162); writeValue(buffer, value.encode()); } else if (value is PlatformPoint) { - buffer.putUint8(164); + buffer.putUint8(163); writeValue(buffer, value.encode()); } else if (value is PlatformSize) { - buffer.putUint8(165); + buffer.putUint8(164); writeValue(buffer, value.encode()); } else if (value is PlatformColor) { - buffer.putUint8(166); + buffer.putUint8(165); writeValue(buffer, value.encode()); } else if (value is PlatformTileLayer) { - buffer.putUint8(167); + buffer.putUint8(166); writeValue(buffer, value.encode()); } else if (value is PlatformZoomRange) { - buffer.putUint8(168); + buffer.putUint8(167); writeValue(buffer, value.encode()); } else if (value is PlatformBitmap) { - buffer.putUint8(169); + buffer.putUint8(168); writeValue(buffer, value.encode()); } else if (value is PlatformBitmapDefaultMarker) { - buffer.putUint8(170); + buffer.putUint8(169); writeValue(buffer, value.encode()); } else if (value is PlatformBitmapBytes) { - buffer.putUint8(171); + buffer.putUint8(170); writeValue(buffer, value.encode()); } else if (value is PlatformBitmapAsset) { - buffer.putUint8(172); + buffer.putUint8(171); writeValue(buffer, value.encode()); } else if (value is PlatformBitmapAssetImage) { - buffer.putUint8(173); + buffer.putUint8(172); writeValue(buffer, value.encode()); } else if (value is PlatformBitmapAssetMap) { - buffer.putUint8(174); + buffer.putUint8(173); writeValue(buffer, value.encode()); } else if (value is PlatformBitmapBytesMap) { - buffer.putUint8(175); + buffer.putUint8(174); writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); @@ -2568,54 +2517,52 @@ class _PigeonCodec extends StandardMessageCodec { case 150: return PlatformMarker.decode(readValue(buffer)!); case 151: - return PlatformPointOfInterest.decode(readValue(buffer)!); - case 152: return PlatformPolygon.decode(readValue(buffer)!); - case 153: + case 152: return PlatformPolyline.decode(readValue(buffer)!); - case 154: + case 153: return PlatformPatternItem.decode(readValue(buffer)!); - case 155: + case 154: return PlatformTile.decode(readValue(buffer)!); - case 156: + case 155: return PlatformTileOverlay.decode(readValue(buffer)!); - case 157: + case 156: return PlatformEdgeInsets.decode(readValue(buffer)!); - case 158: + case 157: return PlatformLatLng.decode(readValue(buffer)!); - case 159: + case 158: return PlatformLatLngBounds.decode(readValue(buffer)!); - case 160: + case 159: return PlatformCameraTargetBounds.decode(readValue(buffer)!); - case 161: + case 160: return PlatformGroundOverlay.decode(readValue(buffer)!); - case 162: + case 161: return PlatformMapViewCreationParams.decode(readValue(buffer)!); - case 163: + case 162: return PlatformMapConfiguration.decode(readValue(buffer)!); - case 164: + case 163: return PlatformPoint.decode(readValue(buffer)!); - case 165: + case 164: return PlatformSize.decode(readValue(buffer)!); - case 166: + case 165: return PlatformColor.decode(readValue(buffer)!); - case 167: + case 166: return PlatformTileLayer.decode(readValue(buffer)!); - case 168: + case 167: return PlatformZoomRange.decode(readValue(buffer)!); - case 169: + case 168: return PlatformBitmap.decode(readValue(buffer)!); - case 170: + case 169: return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); - case 171: + case 170: return PlatformBitmapBytes.decode(readValue(buffer)!); - case 172: + case 171: return PlatformBitmapAsset.decode(readValue(buffer)!); - case 173: + case 172: return PlatformBitmapAssetImage.decode(readValue(buffer)!); - case 174: + case 173: return PlatformBitmapAssetMap.decode(readValue(buffer)!); - case 175: + case 174: return PlatformBitmapBytesMap.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -3354,9 +3301,6 @@ abstract class MapsCallbackApi { /// Called when a ground overlay is tapped. void onGroundOverlayTap(String groundOverlayId); - /// Called when a point of interest is tapped. - void onPoiTap(PlatformPointOfInterest poi); - /// Called to get data for a map tile. Future getTileOverlayTile( String tileOverlayId, @@ -3863,40 +3807,6 @@ abstract class MapsCallbackApi { }); } } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap$messageChannelSuffix', - pigeonChannelCodec, - binaryMessenger: binaryMessenger, - ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert( - message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.', - ); - final List args = (message as List?)!; - final PlatformPointOfInterest? arg_poi = - (args[0] as PlatformPointOfInterest?); - assert( - arg_poi != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.', - ); - try { - api.onPoiTap(arg_poi!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse( - error: PlatformException(code: 'error', message: e.toString()), - ); - } - }); - } - } { final pigeonVar_channel = BasicMessageChannel( 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index fe2da120abf1..233e91151b36 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -237,19 +237,6 @@ class PlatformMarker { final String? clusterManagerId; } -/// Pigeon equivalent of the Point of Interest class. -class PlatformPointOfInterest { - PlatformPointOfInterest({ - required this.position, - this.name, - required this.placeId, - }); - - final PlatformLatLng position; - final String? name; - final String placeId; -} - /// Pigeon equivalent of the Polygon class. class PlatformPolygon { PlatformPolygon({ @@ -836,10 +823,6 @@ abstract class MapsCallbackApi { @ObjCSelector('didTapGroundOverlayWithIdentifier:') void onGroundOverlayTap(String groundOverlayId); - /// Called when a point of interest is tapped. - @ObjCSelector('didTapPointOfInterest:') - void onPoiTap(PlatformPointOfInterest poi); - /// Called to get data for a map tile. @async @ObjCSelector('tileWithOverlayIdentifier:location:zoom:') diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml index eaf316617735..d2b6449e77e3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter_ios description: iOS implementation of the google_maps_flutter plugin. repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_ios issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 2.18.0 +version: 2.17.0 environment: sdk: ^3.9.0 @@ -19,7 +19,7 @@ flutter: dependencies: flutter: sdk: flutter - google_maps_flutter_platform_interface: ^2.15.0 + google_maps_flutter_platform_interface: ^2.13.0 stream_transform: ^2.0.0 dev_dependencies: @@ -35,6 +35,3 @@ topics: - google-maps - google-maps-flutter - map -dependency_overrides: - google_maps_flutter_platform_interface: - path: ../google_maps_flutter_platform_interface diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart index b98fc01ea27f..23c7fd0c9fac 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart @@ -1348,40 +1348,6 @@ void main() { reason: 'Should pass mapId on PlatformView creation message', ); }); - - test('onPoiTap sends events to correct stream', () async { - const mapId = 1; - final fakePosition = PlatformLatLng(latitude: 12.34, longitude: 56.78); - const fakeName = 'Googleplex'; - const fakePlaceId = 'iso_id_123'; - - final maps = GoogleMapsFlutterIOS(); - // Initialize the handler which receives messages from the native side - final HostMapMessageHandler callbackHandler = maps.ensureHandlerInitialized( - mapId, - ); - - final stream = StreamQueue(maps.onPoiTap(mapId: mapId)); - - // Simulate a message from the native side via the Pigeon generated handler - callbackHandler.onPoiTap( - PlatformPointOfInterest( - position: fakePosition, - name: fakeName, - placeId: fakePlaceId, - ), - ); - - // Verify the event in the stream - final MapPoiTapEvent event = await stream.next; - expect(event.mapId, mapId); - - final PointOfInterest poi = event.value; - expect(poi.position.latitude, fakePosition.latitude); - expect(poi.position.longitude, fakePosition.longitude); - expect(poi.name, fakeName); - expect(poi.placeId, fakePlaceId); - }); } void _expectColorsEqual(PlatformColor actual, Color expected) { diff --git a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md index c9b42640a4ea..149dba550204 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md @@ -2,10 +2,6 @@ * Updates minimum supported SDK version to Flutter 3.35/Dart 3.9. -## 0.6.0+4 - -* Added support for Tap detection on Point of Interest - ## 0.5.14+3 * Replaces uses of deprecated `Color` properties. diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml index f76e0d8e3e6b..a82a05b9be17 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml @@ -8,7 +8,7 @@ environment: dependencies: flutter: sdk: flutter - google_maps_flutter_platform_interface: ^2.15.0 + google_maps_flutter_platform_interface: ^2.14.0 google_maps_flutter_web: path: ../ web: ^1.0.0 @@ -27,14 +27,10 @@ dev_dependencies: flutter: assets: - assets/ + dependency_overrides: - google_maps_flutter: - path: ../../google_maps_flutter - google_maps_flutter_android: - path: ../../google_maps_flutter_android - google_maps_flutter_ios: - path: ../../google_maps_flutter_ios - google_maps_flutter_platform_interface: - path: ../../google_maps_flutter_platform_interface + # Override the google_maps_flutter dependency on google_maps_flutter_web. + # TODO(ditman): Unwind the circular dependency. This will create problems + # if we need to make a breaking change to google_maps_flutter_web. google_maps_flutter_web: path: ../ diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index b16639f9897d..8e862f6e3dd7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -260,27 +260,9 @@ class GoogleMapController { ) { assert(event.latLng != null); if (!_streamController.isClosed) { - if (event is gmaps.IconMouseEvent && event.placeId != null) { - final String placeId = event.placeId!; - - // Stop the event to prevent the default Google Maps InfoWindow from popping up - event.stop(); - - _streamController.add( - MapPoiTapEvent( - _mapId, - PointOfInterest( - position: gmLatLngToLatLng(event.latLng!), - placeId: placeId, - ), - ), - ); - } else { - // If no placeId, treat it as a standard map tap - _streamController.add( - MapTapEvent(_mapId, gmLatLngToLatLng(event.latLng!)), - ); - } + _streamController.add( + MapTapEvent(_mapId, gmLatLngToLatLng(event.latLng!)), + ); } }); _onRightClickSubscription = map.onRightclick.listen(( diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart index fd83749d4c21..e980252e7c89 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart @@ -289,11 +289,6 @@ class GoogleMapsPlugin extends GoogleMapsFlutterPlatform { return _events(mapId).whereType(); } - @override - Stream onPoiTap({required int mapId}) { - return _events(mapId).whereType(); - } - @override Stream onTap({required int mapId}) { return _events(mapId).whereType(); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml index 8f9cfd8ff577..f87b3ea66e81 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter_web description: Web platform implementation of google_maps_flutter repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_web issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 0.6.0+4 +version: 0.5.14+3 environment: sdk: ^3.9.0 @@ -23,7 +23,7 @@ dependencies: flutter_web_plugins: sdk: flutter google_maps: ^8.1.0 - google_maps_flutter_platform_interface: ^2.15.0 + google_maps_flutter_platform_interface: ^2.14.0 sanitize_html: ^2.0.0 stream_transform: ^2.0.0 web: ">=0.5.1 <2.0.0" @@ -40,6 +40,3 @@ topics: # The example deliberately includes limited-use secrets. false_secrets: - /example/web/index.html -dependency_overrides: - google_maps_flutter_platform_interface: - path: ../google_maps_flutter_platform_interface diff --git a/packages/video_player/video_player_avfoundation/CHANGELOG.md b/packages/video_player/video_player_avfoundation/CHANGELOG.md index 72fb28c16fdb..1e8ff4050e29 100644 --- a/packages/video_player/video_player_avfoundation/CHANGELOG.md +++ b/packages/video_player/video_player_avfoundation/CHANGELOG.md @@ -1,7 +1,3 @@ -## 2.9.1 - -* Refactors native code for improved testability. - ## 2.9.0 * Implements `getAudioTracks()` and `selectAudioTrack()` methods. diff --git a/packages/video_player/video_player_avfoundation/darwin/RunnerTests/VideoPlayerTests.m b/packages/video_player/video_player_avfoundation/darwin/RunnerTests/VideoPlayerTests.m index 19e3a70d27fc..5954c1f4e1aa 100644 --- a/packages/video_player/video_player_avfoundation/darwin/RunnerTests/VideoPlayerTests.m +++ b/packages/video_player/video_player_avfoundation/darwin/RunnerTests/VideoPlayerTests.m @@ -6,6 +6,13 @@ @import video_player_avfoundation; @import XCTest; +#import +#import +#import +#import +#import +#import + #if TARGET_OS_IOS @interface FakeAVAssetTrack : AVAssetTrack @property(readonly, nonatomic) CGAffineTransform preferredTransform; @@ -49,15 +56,13 @@ - (CGAffineTransform)preferredTransform { @interface VideoPlayerTests : XCTestCase @end -/// An AVPlayer subclass that records method call parameters for inspection. -// TODO(stuartmorgan): Replace with a protocol like the other classes. -@interface InspectableAVPlayer : AVPlayer +@interface StubAVPlayer : AVPlayer @property(readonly, nonatomic) NSNumber *beforeTolerance; @property(readonly, nonatomic) NSNumber *afterTolerance; @property(readonly, assign) CMTime lastSeekTime; @end -@implementation InspectableAVPlayer +@implementation StubAVPlayer - (void)seekToTime:(CMTime)time toleranceBefore:(CMTime)toleranceBefore @@ -74,117 +79,6 @@ - (void)seekToTime:(CMTime)time @end -@interface TestAsset : NSObject -@property(nonatomic, readonly) CMTime duration; -@property(nonatomic, nullable, readonly) NSArray *tracks; - -@property(nonatomic, assign) BOOL loadedTracksAsynchronously; -@end - -@implementation TestAsset -- (instancetype)init { - return [self initWithDuration:kCMTimeZero tracks:nil]; -} - -- (instancetype)initWithDuration:(CMTime)duration - tracks:(nullable NSArray *)tracks { - self = [super init]; - _duration = duration; - _tracks = tracks; - return self; -} - -- (AVKeyValueStatus)statusOfValueForKey:(NSString *)key - error:(NSError *_Nullable *_Nullable)outError { - return self.tracks == nil ? AVKeyValueStatusLoading : AVKeyValueStatusLoaded; -} - -- (void)loadValuesAsynchronouslyForKeys:(NSArray *)keys - completionHandler:(nullable void (^NS_SWIFT_SENDABLE)(void))handler { - if (handler) { - handler(); - } -} - -- (void)loadTracksWithMediaType:(AVMediaType)mediaType - completionHandler:(void (^NS_SWIFT_SENDABLE)(NSArray *_Nullable, - NSError *_Nullable))completionHandler - API_AVAILABLE(macos(12.0), ios(15.0)) { - self.loadedTracksAsynchronously = YES; - completionHandler(_tracks, nil); -} - -- (NSArray *)tracksWithMediaType:(AVMediaType)mediaType - API_DEPRECATED("Use loadTracksWithMediaType:completionHandler: instead", macos(10.7, 15.0), - ios(4.0, 18.0)) { - return _tracks ?: @[]; -} -@end - -@interface StubPlayerItem : NSObject -@property(nonatomic, readonly) NSObject *asset; -@property(nonatomic, copy, nullable) AVVideoComposition *videoComposition; -@end - -@implementation StubPlayerItem -- (instancetype)init { - return [self initWithAsset:[[TestAsset alloc] init]]; -} - -- (instancetype)initWithAsset:(NSObject *)asset { - self = [super init]; - _asset = asset; - return self; -} -@end - -@interface StubBinaryMessenger : NSObject -@end - -@implementation StubBinaryMessenger - -- (void)sendOnChannel:(NSString *)channel message:(NSData *_Nullable)message { -} -- (void)sendOnChannel:(NSString *)channel - message:(NSData *_Nullable)message - binaryReply:(FlutterBinaryReply _Nullable)callback { -} -- (FlutterBinaryMessengerConnection)setMessageHandlerOnChannel:(NSString *)channel - binaryMessageHandler: - (FlutterBinaryMessageHandler _Nullable)handler { - return 0; -} -- (void)cleanUpConnection:(FlutterBinaryMessengerConnection)connection { -} -@end - -@interface TestTextureRegistry : NSObject -@property(nonatomic, assign) BOOL registeredTexture; -@property(nonatomic, assign) BOOL unregisteredTexture; -@property(nonatomic, assign) int textureFrameAvailableCount; -@end - -@implementation TestTextureRegistry -- (int64_t)registerTexture:(NSObject *)texture { - self.registeredTexture = true; - return 1; -} - -- (void)unregisterTexture:(int64_t)textureId { - if (textureId != 1) { - XCTFail(@"Unregistering texture with wrong ID"); - } - self.unregisteredTexture = true; -} - -- (void)textureFrameAvailable:(int64_t)textureId { - if (textureId != 1) { - XCTFail(@"Texture frame available with wrong ID"); - } - self.textureFrameAvailableCount++; -} -@end - @interface StubViewProvider : NSObject #if TARGET_OS_IOS - (instancetype)initWithViewController:(UIViewController *)viewController; @@ -211,92 +105,13 @@ - (instancetype)initWithView:(NSView *)view { #endif @end -@interface StubAssetProvider : NSObject -@end - -@implementation StubAssetProvider -- (NSString *)lookupKeyForAsset:(NSString *)asset { - return asset; -} - -- (NSString *)lookupKeyForAsset:(NSString *)asset fromPackage:(NSString *)package { - return asset; -} -@end - -@interface TestPixelBufferSource : NSObject -@property(nonatomic) CVPixelBufferRef pixelBuffer; -@property(nonatomic, readonly) AVPlayerItemVideoOutput *videoOutput; -@end - -@implementation TestPixelBufferSource -- (instancetype)init { - self = [super init]; - // Create an arbitrary video output to for attaching to actual AVFoundation - // objects. The attributes don't matter since this isn't used to implement - // the methods called by the plugin. - _videoOutput = [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:@{ - (id)kCVPixelBufferPixelFormatTypeKey : @(kCVPixelFormatType_32BGRA), - (id)kCVPixelBufferIOSurfacePropertiesKey : @{} - }]; - return self; -} - -- (void)dealloc { - CVPixelBufferRelease(_pixelBuffer); -} - -- (void)setPixelBuffer:(CVPixelBufferRef)pixelBuffer { - CVPixelBufferRelease(_pixelBuffer); - _pixelBuffer = CVPixelBufferRetain(pixelBuffer); -} - -- (CMTime)itemTimeForHostTime:(CFTimeInterval)hostTimeInSeconds { - return CMTimeMakeWithSeconds(hostTimeInSeconds, 1000); -} - -- (BOOL)hasNewPixelBufferForItemTime:(CMTime)itemTime { - return _pixelBuffer != NULL; -} - -- (nullable CVPixelBufferRef)copyPixelBufferForItemTime:(CMTime)itemTime - itemTimeForDisplay:(nullable CMTime *)outItemTimeForDisplay { - CVPixelBufferRef pixelBuffer = _pixelBuffer; - // Ownership is transferred to the caller. - _pixelBuffer = NULL; - return pixelBuffer; -} -@end - -#if TARGET_OS_IOS -@interface TestAudioSession : NSObject -@property(nonatomic, readwrite) AVAudioSessionCategory category; -@property(nonatomic, assign) AVAudioSessionCategoryOptions categoryOptions; - -/// Tracks whether setCategory:withOptions:error: has been called. -@property(nonatomic, assign) BOOL setCategoryCalled; -@end - -@implementation TestAudioSession -- (BOOL)setCategory:(AVAudioSessionCategory)category - withOptions:(AVAudioSessionCategoryOptions)options - error:(NSError **)outError { - self.setCategoryCalled = YES; - self.category = category; - self.categoryOptions = options; - return YES; -} -@end -#endif - @interface StubFVPAVFactory : NSObject -@property(nonatomic, strong) AVPlayer *player; -@property(nonatomic, strong) NSObject *playerItem; -@property(nonatomic, strong) NSObject *pixelBufferSource; -#if TARGET_OS_IOS -@property(nonatomic, strong) NSObject *audioSession; -#endif +@property(nonatomic, strong) StubAVPlayer *stubAVPlayer; +@property(nonatomic, strong) AVPlayerItemVideoOutput *output; + +- (instancetype)initWithPlayer:(StubAVPlayer *)stubAVPlayer + output:(AVPlayerItemVideoOutput *)output; @end @@ -304,48 +119,23 @@ @implementation StubFVPAVFactory // Creates a factory that returns the given items. Any items that are nil will instead return // a real object just as the non-test implementation would. -- (instancetype)initWithPlayer:(nullable AVPlayer *)player - playerItem:(nullable NSObject *)playerItem - pixelBufferSource:(nullable NSObject *)pixelBufferSource { +- (instancetype)initWithPlayer:(StubAVPlayer *)stubAVPlayer + output:(AVPlayerItemVideoOutput *)output { self = [super init]; - // Create a player with a dummy item so that the player is valid, since most tests won't work - // without a valid player. - // TODO(stuartmorgan): Introduce a protocol for AVPlayer and use a stub here instead. - NSURL *dummyURL = [NSURL URLWithString:@""]; - _player = - player ?: [[AVPlayer alloc] initWithPlayerItem:[AVPlayerItem playerItemWithURL:dummyURL]]; - _playerItem = playerItem ?: [[StubPlayerItem alloc] init]; - _pixelBufferSource = pixelBufferSource; -#if TARGET_OS_IOS - _audioSession = [[TestAudioSession alloc] init]; -#endif + _stubAVPlayer = stubAVPlayer; + _output = output; return self; } -- (NSObject *)URLAssetWithURL:(NSURL *)URL - options:(nullable NSDictionary *)options { - return self.playerItem.asset; +- (AVPlayer *)playerWithPlayerItem:(AVPlayerItem *)playerItem { + return _stubAVPlayer ?: [AVPlayer playerWithPlayerItem:playerItem]; } -- (NSObject *)playerItemWithAsset:(NSObject *)asset { - return self.playerItem; -} - -- (AVPlayer *)playerWithPlayerItem:(NSObject *)playerItem { - return self.player; -} - -- (NSObject *)videoOutputWithPixelBufferAttributes: +- (AVPlayerItemVideoOutput *)videoOutputWithPixelBufferAttributes: (NSDictionary *)attributes { - return self.pixelBufferSource ?: [[TestPixelBufferSource alloc] init]; + return _output ?: [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:attributes]; } -#if TARGET_OS_IOS -- (NSObject *)sharedAudioSession { - return self.audioSession; -} -#endif - @end #pragma mark - @@ -373,8 +163,8 @@ - (instancetype)init { _displayLink = [[StubFVPDisplayLink alloc] init]; return self; } -- (NSObject *)displayLinkWithViewProvider:(NSObject *)viewProvider - callback:(void (^)(void))callback { +- (NSObject *)displayLinkWithRegistrar:(id)registrar + callback:(void (^)(void))callback { self.fireDisplayLink = callback; return self.displayLink; } @@ -451,15 +241,12 @@ - (void)testBlankVideoBugWithEncryptedVideoStreamAndInvertedAspectRatioBugForSom id viewProvider = [[StubViewProvider alloc] initWithViewController:viewController]; #endif - FVPVideoPlayerPlugin *videoPlayerPlugin = - [[FVPVideoPlayerPlugin alloc] initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil - playerItem:nil - pixelBufferSource:nil] - displayLinkFactory:nil - binaryMessenger:[[StubBinaryMessenger alloc] init] - textureRegistry:[[TestTextureRegistry alloc] init] - viewProvider:viewProvider - assetProvider:[[StubAssetProvider alloc] init]]; + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] + initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil output:nil] + displayLinkFactory:nil + viewProvider:viewProvider + registrar:registrar]; FlutterError *error; [videoPlayerPlugin initialize:&error]; @@ -482,17 +269,17 @@ - (void)testBlankVideoBugWithEncryptedVideoStreamAndInvertedAspectRatioBugForSom } - (void)testPlayerForPlatformViewDoesNotRegisterTexture { - TestTextureRegistry *textureRegistry = [[TestTextureRegistry alloc] init]; + NSObject *mockTextureRegistry = + OCMProtocolMock(@protocol(FlutterTextureRegistry)); + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + OCMStub([registrar textures]).andReturn(mockTextureRegistry); StubFVPDisplayLinkFactory *stubDisplayLinkFactory = [[StubFVPDisplayLinkFactory alloc] init]; - FVPVideoPlayerPlugin *videoPlayerPlugin = - [[FVPVideoPlayerPlugin alloc] initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil - playerItem:nil - pixelBufferSource:nil] - displayLinkFactory:stubDisplayLinkFactory - binaryMessenger:[[StubBinaryMessenger alloc] init] - textureRegistry:textureRegistry - viewProvider:[[StubViewProvider alloc] init] - assetProvider:[[StubAssetProvider alloc] init]]; + AVPlayerItemVideoOutput *mockVideoOutput = OCMPartialMock([[AVPlayerItemVideoOutput alloc] init]); + FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] + initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil output:mockVideoOutput] + displayLinkFactory:stubDisplayLinkFactory + viewProvider:[[StubViewProvider alloc] init] + registrar:registrar]; FlutterError *initializationError; [videoPlayerPlugin initialize:&initializationError]; @@ -503,23 +290,23 @@ - (void)testPlayerForPlatformViewDoesNotRegisterTexture { FlutterError *createError; [videoPlayerPlugin createPlatformViewPlayerWithOptions:create error:&createError]; - XCTAssertFalse(textureRegistry.registeredTexture); + OCMVerify(never(), [mockTextureRegistry registerTexture:[OCMArg any]]); } - (void)testSeekToWhilePausedStartsDisplayLinkTemporarily { + NSObject *mockTextureRegistry = + OCMProtocolMock(@protocol(FlutterTextureRegistry)); + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + OCMStub([registrar textures]).andReturn(mockTextureRegistry); StubFVPDisplayLinkFactory *stubDisplayLinkFactory = [[StubFVPDisplayLinkFactory alloc] init]; - TestPixelBufferSource *mockVideoOutput = [[TestPixelBufferSource alloc] init]; + AVPlayerItemVideoOutput *mockVideoOutput = OCMPartialMock([[AVPlayerItemVideoOutput alloc] init]); // Display link and frame updater wire-up is currently done in FVPVideoPlayerPlugin, so create // the player via the plugin instead of directly to include that logic in the test. FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] - initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil - playerItem:nil - pixelBufferSource:mockVideoOutput] + initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil output:mockVideoOutput] displayLinkFactory:stubDisplayLinkFactory - binaryMessenger:[[StubBinaryMessenger alloc] init] - textureRegistry:[[TestTextureRegistry alloc] init] viewProvider:[[StubViewProvider alloc] init] - assetProvider:[[StubAssetProvider alloc] init]]; + registrar:registrar]; FlutterError *initializationError; [videoPlayerPlugin initialize:&initializationError]; @@ -548,10 +335,14 @@ - (void)testSeekToWhilePausedStartsDisplayLinkTemporarily { XCTAssertTrue(stubDisplayLinkFactory.displayLink.running); // Simulate a buffer being available. + OCMStub([mockVideoOutput hasNewPixelBufferForItemTime:kCMTimeZero]) + .ignoringNonObjectArgs() + .andReturn(YES); CVPixelBufferRef bufferRef; CVPixelBufferCreate(NULL, 1, 1, kCVPixelFormatType_32BGRA, NULL, &bufferRef); - mockVideoOutput.pixelBuffer = bufferRef; - CVPixelBufferRelease(bufferRef); + OCMStub([mockVideoOutput copyPixelBufferForItemTime:kCMTimeZero itemTimeForDisplay:NULL]) + .ignoringNonObjectArgs() + .andReturn(bufferRef); // Simulate a callback from the engine to request a new frame. stubDisplayLinkFactory.fireDisplayLink(); CFRelease([player copyPixelBuffer]); @@ -560,17 +351,19 @@ - (void)testSeekToWhilePausedStartsDisplayLinkTemporarily { } - (void)testInitStartsDisplayLinkTemporarily { + NSObject *mockTextureRegistry = + OCMProtocolMock(@protocol(FlutterTextureRegistry)); + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + OCMStub([registrar textures]).andReturn(mockTextureRegistry); StubFVPDisplayLinkFactory *stubDisplayLinkFactory = [[StubFVPDisplayLinkFactory alloc] init]; - TestPixelBufferSource *mockVideoOutput = [[TestPixelBufferSource alloc] init]; + AVPlayerItemVideoOutput *mockVideoOutput = OCMPartialMock([[AVPlayerItemVideoOutput alloc] init]); + StubAVPlayer *stubAVPlayer = [[StubAVPlayer alloc] init]; FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] - initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil - playerItem:nil - pixelBufferSource:mockVideoOutput] + initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:stubAVPlayer + output:mockVideoOutput] displayLinkFactory:stubDisplayLinkFactory - binaryMessenger:[[StubBinaryMessenger alloc] init] - textureRegistry:[[TestTextureRegistry alloc] init] viewProvider:[[StubViewProvider alloc] init] - assetProvider:[[StubAssetProvider alloc] init]]; + registrar:registrar]; FlutterError *initializationError; [videoPlayerPlugin initialize:&initializationError]; @@ -586,10 +379,14 @@ - (void)testInitStartsDisplayLinkTemporarily { XCTAssertTrue(stubDisplayLinkFactory.displayLink.running); // Simulate a buffer being available. + OCMStub([mockVideoOutput hasNewPixelBufferForItemTime:kCMTimeZero]) + .ignoringNonObjectArgs() + .andReturn(YES); CVPixelBufferRef bufferRef; CVPixelBufferCreate(NULL, 1, 1, kCVPixelFormatType_32BGRA, NULL, &bufferRef); - mockVideoOutput.pixelBuffer = bufferRef; - CVPixelBufferRelease(bufferRef); + OCMStub([mockVideoOutput copyPixelBufferForItemTime:kCMTimeZero itemTimeForDisplay:NULL]) + .ignoringNonObjectArgs() + .andReturn(bufferRef); // Simulate a callback from the engine to request a new frame. FVPTextureBasedVideoPlayer *player = (FVPTextureBasedVideoPlayer *)videoPlayerPlugin.playersByIdentifier[@(identifiers.playerId)]; @@ -600,19 +397,19 @@ - (void)testInitStartsDisplayLinkTemporarily { } - (void)testSeekToWhilePlayingDoesNotStopDisplayLink { + NSObject *mockTextureRegistry = + OCMProtocolMock(@protocol(FlutterTextureRegistry)); + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + OCMStub([registrar textures]).andReturn(mockTextureRegistry); StubFVPDisplayLinkFactory *stubDisplayLinkFactory = [[StubFVPDisplayLinkFactory alloc] init]; - TestPixelBufferSource *mockVideoOutput = [[TestPixelBufferSource alloc] init]; + AVPlayerItemVideoOutput *mockVideoOutput = OCMPartialMock([[AVPlayerItemVideoOutput alloc] init]); // Display link and frame updater wire-up is currently done in FVPVideoPlayerPlugin, so create // the player via the plugin instead of directly to include that logic in the test. FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] - initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil - playerItem:nil - pixelBufferSource:mockVideoOutput] + initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil output:mockVideoOutput] displayLinkFactory:stubDisplayLinkFactory - binaryMessenger:[[StubBinaryMessenger alloc] init] - textureRegistry:[[TestTextureRegistry alloc] init] viewProvider:[[StubViewProvider alloc] init] - assetProvider:[[StubAssetProvider alloc] init]]; + registrar:registrar]; FlutterError *initializationError; [videoPlayerPlugin initialize:&initializationError]; @@ -639,10 +436,14 @@ - (void)testSeekToWhilePlayingDoesNotStopDisplayLink { XCTAssertTrue(stubDisplayLinkFactory.displayLink.running); // Simulate a buffer being available. + OCMStub([mockVideoOutput hasNewPixelBufferForItemTime:kCMTimeZero]) + .ignoringNonObjectArgs() + .andReturn(YES); CVPixelBufferRef bufferRef; CVPixelBufferCreate(NULL, 1, 1, kCVPixelFormatType_32BGRA, NULL, &bufferRef); - mockVideoOutput.pixelBuffer = bufferRef; - CVPixelBufferRelease(bufferRef); + OCMStub([mockVideoOutput copyPixelBufferForItemTime:kCMTimeZero itemTimeForDisplay:NULL]) + .ignoringNonObjectArgs() + .andReturn(bufferRef); // Simulate a callback from the engine to request a new frame. stubDisplayLinkFactory.fireDisplayLink(); CFRelease([player copyPixelBuffer]); @@ -651,18 +452,19 @@ - (void)testSeekToWhilePlayingDoesNotStopDisplayLink { } - (void)testPauseWhileWaitingForFrameDoesNotStopDisplayLink { + NSObject *mockTextureRegistry = + OCMProtocolMock(@protocol(FlutterTextureRegistry)); + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + OCMStub([registrar textures]).andReturn(mockTextureRegistry); StubFVPDisplayLinkFactory *stubDisplayLinkFactory = [[StubFVPDisplayLinkFactory alloc] init]; + AVPlayerItemVideoOutput *mockVideoOutput = OCMPartialMock([[AVPlayerItemVideoOutput alloc] init]); // Display link and frame updater wire-up is currently done in FVPVideoPlayerPlugin, so create // the player via the plugin instead of directly to include that logic in the test. - FVPVideoPlayerPlugin *videoPlayerPlugin = - [[FVPVideoPlayerPlugin alloc] initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil - playerItem:nil - pixelBufferSource:nil] - displayLinkFactory:stubDisplayLinkFactory - binaryMessenger:[[StubBinaryMessenger alloc] init] - textureRegistry:[[TestTextureRegistry alloc] init] - viewProvider:[[StubViewProvider alloc] init] - assetProvider:[[StubAssetProvider alloc] init]]; + FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] + initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil output:mockVideoOutput] + displayLinkFactory:stubDisplayLinkFactory + viewProvider:[[StubViewProvider alloc] init] + registrar:registrar]; FlutterError *initializationError; [videoPlayerPlugin initialize:&initializationError]; @@ -686,15 +488,9 @@ - (void)testPauseWhileWaitingForFrameDoesNotStopDisplayLink { } - (void)testDeregistersFromPlayer { + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); FVPVideoPlayerPlugin *videoPlayerPlugin = - [[FVPVideoPlayerPlugin alloc] initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil - playerItem:nil - pixelBufferSource:nil] - displayLinkFactory:nil - binaryMessenger:[[StubBinaryMessenger alloc] init] - textureRegistry:[[TestTextureRegistry alloc] init] - viewProvider:[[StubViewProvider alloc] init] - assetProvider:[[StubAssetProvider alloc] init]]; + (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; FlutterError *error; [videoPlayerPlugin initialize:&error]; @@ -709,21 +505,21 @@ - (void)testDeregistersFromPlayer { XCTAssertNotNil(identifiers); FVPVideoPlayer *player = videoPlayerPlugin.playersByIdentifier[@(identifiers.playerId)]; XCTAssertNotNil(player); + AVPlayer *avPlayer = player.player; + + [self keyValueObservingExpectationForObject:avPlayer keyPath:@"currentItem" expectedValue:nil]; [player disposeWithError:&error]; XCTAssertEqual(videoPlayerPlugin.playersByIdentifier.count, 0); XCTAssertNil(error); + + [self waitForExpectationsWithTimeout:30.0 handler:nil]; } - (void)testBufferingStateFromPlayer { - NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); FVPVideoPlayerPlugin *videoPlayerPlugin = - [[FVPVideoPlayerPlugin alloc] initWithAVFactory:realObjectFactory - displayLinkFactory:nil - binaryMessenger:[[StubBinaryMessenger alloc] init] - textureRegistry:[[TestTextureRegistry alloc] init] - viewProvider:[[StubViewProvider alloc] init] - assetProvider:[[StubAssetProvider alloc] init]]; + (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; FlutterError *error; [videoPlayerPlugin initialize:&error]; @@ -814,15 +610,14 @@ - (void)testTransformFix { #endif - (void)testSeekToleranceWhenNotSeekingToEnd { - InspectableAVPlayer *inspectableAVPlayer = [[InspectableAVPlayer alloc] init]; - StubFVPAVFactory *stubAVFactory = [[StubFVPAVFactory alloc] initWithPlayer:inspectableAVPlayer - playerItem:nil - pixelBufferSource:nil]; + StubAVPlayer *stubAVPlayer = [[StubAVPlayer alloc] init]; + StubFVPAVFactory *stubAVFactory = [[StubFVPAVFactory alloc] initWithPlayer:stubAVPlayer + output:nil]; FVPVideoPlayer *player = - [[FVPVideoPlayer alloc] initWithPlayerItem:[[StubPlayerItem alloc] init] + [[FVPVideoPlayer alloc] initWithPlayerItem:[self playerItemWithURL:self.mp4TestURL] avFactory:stubAVFactory viewProvider:[[StubViewProvider alloc] init]]; - NSObject *listener = [[StubEventListener alloc] init]; + NSObject *listener = OCMProtocolMock(@protocol(FVPVideoEventListener)); player.eventListener = listener; XCTestExpectation *seekExpectation = @@ -833,20 +628,19 @@ - (void)testSeekToleranceWhenNotSeekingToEnd { }]; [self waitForExpectationsWithTimeout:30.0 handler:nil]; - XCTAssertEqual([inspectableAVPlayer.beforeTolerance intValue], 0); - XCTAssertEqual([inspectableAVPlayer.afterTolerance intValue], 0); + XCTAssertEqual([stubAVPlayer.beforeTolerance intValue], 0); + XCTAssertEqual([stubAVPlayer.afterTolerance intValue], 0); } - (void)testSeekToleranceWhenSeekingToEnd { - InspectableAVPlayer *inspectableAVPlayer = [[InspectableAVPlayer alloc] init]; - StubFVPAVFactory *stubAVFactory = [[StubFVPAVFactory alloc] initWithPlayer:inspectableAVPlayer - playerItem:nil - pixelBufferSource:nil]; + StubAVPlayer *stubAVPlayer = [[StubAVPlayer alloc] init]; + StubFVPAVFactory *stubAVFactory = [[StubFVPAVFactory alloc] initWithPlayer:stubAVPlayer + output:nil]; FVPVideoPlayer *player = - [[FVPVideoPlayer alloc] initWithPlayerItem:[[StubPlayerItem alloc] init] + [[FVPVideoPlayer alloc] initWithPlayerItem:[self playerItemWithURL:self.mp4TestURL] avFactory:stubAVFactory viewProvider:[[StubViewProvider alloc] init]]; - NSObject *listener = [[StubEventListener alloc] init]; + NSObject *listener = OCMProtocolMock(@protocol(FVPVideoEventListener)); player.eventListener = listener; XCTestExpectation *seekExpectation = @@ -857,8 +651,8 @@ - (void)testSeekToleranceWhenSeekingToEnd { [seekExpectation fulfill]; }]; [self waitForExpectationsWithTimeout:30.0 handler:nil]; - XCTAssertGreaterThan([inspectableAVPlayer.beforeTolerance intValue], 0); - XCTAssertGreaterThan([inspectableAVPlayer.afterTolerance intValue], 0); + XCTAssertGreaterThan([stubAVPlayer.beforeTolerance intValue], 0); + XCTAssertGreaterThan([stubAVPlayer.afterTolerance intValue], 0); } /// Sanity checks a video player playing the given URL with the actual AVPlayer. This is essentially @@ -866,13 +660,12 @@ - (void)testSeekToleranceWhenSeekingToEnd { /// /// Returns the stub event listener to allow tests to inspect the call state. - (StubEventListener *)sanityTestURI:(NSString *)testURI { - NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; NSURL *testURL = [NSURL URLWithString:testURI]; XCTAssertNotNil(testURL); - FVPVideoPlayer *player = [[FVPVideoPlayer alloc] - initWithPlayerItem:[self playerItemWithURL:testURL factory:realObjectFactory] - avFactory:realObjectFactory - viewProvider:[[StubViewProvider alloc] init]]; + FVPVideoPlayer *player = + [[FVPVideoPlayer alloc] initWithPlayerItem:[self playerItemWithURL:testURL] + avFactory:[[FVPDefaultAVFactory alloc] init] + viewProvider:[[StubViewProvider alloc] init]]; XCTAssertNotNil(player); XCTestExpectation *initializedExpectation = [self expectationWithDescription:@"initialized"]; @@ -909,7 +702,7 @@ - (StubEventListener *)sanityTestURI:(NSString *)testURI { // // Failing to de-register results in a crash in [AVPlayer willChangeValueForKey:]. - (void)testDoesNotCrashOnRateObservationAfterDisposal { - NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); AVPlayer *avPlayer = nil; __weak FVPVideoPlayer *weakPlayer = nil; @@ -917,12 +710,7 @@ - (void)testDoesNotCrashOnRateObservationAfterDisposal { // Autoreleasepool is needed to simulate conditions of FVPVideoPlayer deallocation. @autoreleasepool { FVPVideoPlayerPlugin *videoPlayerPlugin = - [[FVPVideoPlayerPlugin alloc] initWithAVFactory:realObjectFactory - displayLinkFactory:nil - binaryMessenger:[[StubBinaryMessenger alloc] init] - textureRegistry:[[TestTextureRegistry alloc] init] - viewProvider:[[StubViewProvider alloc] init] - assetProvider:[[StubAssetProvider alloc] init]]; + (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; FlutterError *error; [videoPlayerPlugin initialize:&error]; @@ -966,19 +754,14 @@ - (void)testDoesNotCrashOnRateObservationAfterDisposal { // Both of these methods dispatch [FVPVideoPlayer dispose] on the main thread // leading to a possible crash when de-registering observers twice. - (void)testHotReloadDoesNotCrash { + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + __weak FVPVideoPlayer *weakPlayer = nil; // Autoreleasepool is needed to simulate conditions of FVPVideoPlayer deallocation. @autoreleasepool { - FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] - initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil - playerItem:nil - pixelBufferSource:nil] - displayLinkFactory:nil - binaryMessenger:[[StubBinaryMessenger alloc] init] - textureRegistry:[[TestTextureRegistry alloc] init] - viewProvider:[[StubViewProvider alloc] init] - assetProvider:[[StubAssetProvider alloc] init]]; + FVPVideoPlayerPlugin *videoPlayerPlugin = + (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; FlutterError *error; [videoPlayerPlugin initialize:&error]; @@ -1018,16 +801,34 @@ - (void)testHotReloadDoesNotCrash { handler:nil]; // No assertions needed. Lack of crash is a success. } +- (void)testNativeVideoViewFactoryRegistration { + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + + OCMExpect([registrar registerViewFactory:[OCMArg isKindOfClass:[FVPNativeVideoViewFactory class]] + withId:@"plugins.flutter.dev/video_player_ios"]); + [FVPVideoPlayerPlugin registerWithRegistrar:registrar]; + + OCMVerifyAll(registrar); +} + +- (void)testPublishesInRegistration { + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + __block NSObject *publishedValue; + OCMStub([registrar publish:[OCMArg checkWithBlock:^BOOL(id value) { + publishedValue = value; + return YES; + }]]); + + [FVPVideoPlayerPlugin registerWithRegistrar:registrar]; + + XCTAssertNotNil(publishedValue); + XCTAssertTrue([publishedValue isKindOfClass:[FVPVideoPlayerPlugin class]]); +} + - (void)testFailedToLoadVideoEventShouldBeAlwaysSent { - // Use real objects to test a real failure flow. - NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); FVPVideoPlayerPlugin *videoPlayerPlugin = - [[FVPVideoPlayerPlugin alloc] initWithAVFactory:realObjectFactory - displayLinkFactory:nil - binaryMessenger:[[StubBinaryMessenger alloc] init] - textureRegistry:[[TestTextureRegistry alloc] init] - viewProvider:[[StubViewProvider alloc] init] - assetProvider:[[StubAssetProvider alloc] init]]; + [[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; FlutterError *error; [videoPlayerPlugin initialize:&error]; @@ -1057,10 +858,9 @@ - (void)testFailedToLoadVideoEventShouldBeAlwaysSent { } - (void)testUpdatePlayingStateShouldNotResetRate { - NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; FVPVideoPlayer *player = [[FVPVideoPlayer alloc] - initWithPlayerItem:[self playerItemWithURL:self.mp4TestURL factory:realObjectFactory] - avFactory:realObjectFactory + initWithPlayerItem:[self playerItemWithURL:self.mp4TestURL] + avFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil output:nil] viewProvider:[[StubViewProvider alloc] init]]; XCTestExpectation *initializedExpectation = [self expectationWithDescription:@"initialized"]; @@ -1076,19 +876,18 @@ - (void)testUpdatePlayingStateShouldNotResetRate { } - (void)testPlayerShouldNotDropEverySecondFrame { - TestTextureRegistry *textureRegistry = [[TestTextureRegistry alloc] init]; + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + NSObject *mockTextureRegistry = + OCMProtocolMock(@protocol(FlutterTextureRegistry)); + OCMStub([registrar textures]).andReturn(mockTextureRegistry); StubFVPDisplayLinkFactory *stubDisplayLinkFactory = [[StubFVPDisplayLinkFactory alloc] init]; - TestPixelBufferSource *mockVideoOutput = [[TestPixelBufferSource alloc] init]; + AVPlayerItemVideoOutput *mockVideoOutput = OCMPartialMock([[AVPlayerItemVideoOutput alloc] init]); FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] - initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil - playerItem:nil - pixelBufferSource:mockVideoOutput] + initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil output:mockVideoOutput] displayLinkFactory:stubDisplayLinkFactory - binaryMessenger:[[StubBinaryMessenger alloc] init] - textureRegistry:textureRegistry viewProvider:[[StubViewProvider alloc] init] - assetProvider:[[StubAssetProvider alloc] init]]; + registrar:registrar]; FlutterError *error; [videoPlayerPlugin initialize:&error]; @@ -1099,36 +898,59 @@ - (void)testPlayerShouldNotDropEverySecondFrame { FVPTexturePlayerIds *identifiers = [videoPlayerPlugin createTexturePlayerWithOptions:create error:&error]; NSInteger playerIdentifier = identifiers.playerId; + NSInteger textureIdentifier = identifiers.textureId; FVPTextureBasedVideoPlayer *player = (FVPTextureBasedVideoPlayer *)videoPlayerPlugin.playersByIdentifier[@(playerIdentifier)]; - void (^addFrame)(void) = ^{ - CVPixelBufferRef bufferRef; - CVPixelBufferCreate(NULL, 1, 1, kCVPixelFormatType_32BGRA, NULL, &bufferRef); - mockVideoOutput.pixelBuffer = bufferRef; - CVPixelBufferRelease(bufferRef); + __block CMTime currentTime = kCMTimeZero; + OCMStub([mockVideoOutput itemTimeForHostTime:0]) + .ignoringNonObjectArgs() + .andDo(^(NSInvocation *invocation) { + [invocation setReturnValue:¤tTime]; + }); + __block NSMutableSet *pixelBuffers = NSMutableSet.new; + OCMStub([mockVideoOutput hasNewPixelBufferForItemTime:kCMTimeZero]) + .ignoringNonObjectArgs() + .andDo(^(NSInvocation *invocation) { + CMTime itemTime; + [invocation getArgument:&itemTime atIndex:2]; + BOOL has = [pixelBuffers containsObject:[NSValue valueWithCMTime:itemTime]]; + [invocation setReturnValue:&has]; + }); + OCMStub([mockVideoOutput copyPixelBufferForItemTime:kCMTimeZero + itemTimeForDisplay:[OCMArg anyPointer]]) + .ignoringNonObjectArgs() + .andDo(^(NSInvocation *invocation) { + CMTime itemTime; + [invocation getArgument:&itemTime atIndex:2]; + CVPixelBufferRef bufferRef = NULL; + if ([pixelBuffers containsObject:[NSValue valueWithCMTime:itemTime]]) { + CVPixelBufferCreate(NULL, 1, 1, kCVPixelFormatType_32BGRA, NULL, &bufferRef); + } + [pixelBuffers removeObject:[NSValue valueWithCMTime:itemTime]]; + [invocation setReturnValue:&bufferRef]; + }); + void (^advanceFrame)(void) = ^{ + currentTime.value++; + [pixelBuffers addObject:[NSValue valueWithCMTime:currentTime]]; }; - addFrame(); + advanceFrame(); + OCMExpect([mockTextureRegistry textureFrameAvailable:textureIdentifier]); stubDisplayLinkFactory.fireDisplayLink(); - CFRelease([player copyPixelBuffer]); - XCTAssertEqual(textureRegistry.textureFrameAvailableCount, 1); + OCMVerifyAllWithDelay(mockTextureRegistry, 10); - addFrame(); - stubDisplayLinkFactory.fireDisplayLink(); + advanceFrame(); + OCMExpect([mockTextureRegistry textureFrameAvailable:textureIdentifier]); CFRelease([player copyPixelBuffer]); - XCTAssertEqual(textureRegistry.textureFrameAvailableCount, 2); + stubDisplayLinkFactory.fireDisplayLink(); + OCMVerifyAllWithDelay(mockTextureRegistry, 10); } - (void)testVideoOutputIsAddedWhenAVPlayerItemBecomesReady { - NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); FVPVideoPlayerPlugin *videoPlayerPlugin = - [[FVPVideoPlayerPlugin alloc] initWithAVFactory:realObjectFactory - displayLinkFactory:nil - binaryMessenger:[[StubBinaryMessenger alloc] init] - textureRegistry:[[TestTextureRegistry alloc] init] - viewProvider:[[StubViewProvider alloc] init] - assetProvider:[[StubAssetProvider alloc] init]]; + [[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; FlutterError *error; [videoPlayerPlugin initialize:&error]; XCTAssertNil(error); @@ -1154,55 +976,36 @@ - (void)testVideoOutputIsAddedWhenAVPlayerItemBecomesReady { #if TARGET_OS_IOS - (void)testVideoPlayerShouldNotOverwritePlayAndRecordNorDefaultToSpeaker { - StubFVPAVFactory *stubFactory = [[StubFVPAVFactory alloc] initWithPlayer:nil - playerItem:nil - pixelBufferSource:nil]; - TestAudioSession *audioSession = [[TestAudioSession alloc] init]; - stubFactory.audioSession = audioSession; + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); FVPVideoPlayerPlugin *videoPlayerPlugin = - [[FVPVideoPlayerPlugin alloc] initWithAVFactory:stubFactory - displayLinkFactory:nil - binaryMessenger:[[StubBinaryMessenger alloc] init] - textureRegistry:[[TestTextureRegistry alloc] init] - viewProvider:[[StubViewProvider alloc] init] - assetProvider:[[StubAssetProvider alloc] init]]; + [[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; + FlutterError *error; - audioSession.category = AVAudioSessionCategoryPlayAndRecord; - audioSession.categoryOptions = AVAudioSessionCategoryOptionDefaultToSpeaker; + [AVAudioSession.sharedInstance setCategory:AVAudioSessionCategoryPlayAndRecord + withOptions:AVAudioSessionCategoryOptionDefaultToSpeaker + error:nil]; - FlutterError *error; [videoPlayerPlugin initialize:&error]; [videoPlayerPlugin setMixWithOthers:true error:&error]; - XCTAssert(audioSession.category == AVAudioSessionCategoryPlayAndRecord, + XCTAssert(AVAudioSession.sharedInstance.category == AVAudioSessionCategoryPlayAndRecord, @"Category should be PlayAndRecord."); - XCTAssert(audioSession.categoryOptions & AVAudioSessionCategoryOptionDefaultToSpeaker, - @"Flag DefaultToSpeaker was removed."); - XCTAssert(audioSession.categoryOptions & AVAudioSessionCategoryOptionMixWithOthers, - @"Flag MixWithOthers should be set."); -} - -- (void)testSetMixWithOthersShouldNoOpWhenNoChangesAreRequired { - StubFVPAVFactory *stubFactory = [[StubFVPAVFactory alloc] initWithPlayer:nil - playerItem:nil - pixelBufferSource:nil]; - TestAudioSession *audioSession = [[TestAudioSession alloc] init]; - stubFactory.audioSession = audioSession; - FVPVideoPlayerPlugin *videoPlayerPlugin = - [[FVPVideoPlayerPlugin alloc] initWithAVFactory:stubFactory - displayLinkFactory:nil - binaryMessenger:[[StubBinaryMessenger alloc] init] - textureRegistry:[[TestTextureRegistry alloc] init] - viewProvider:[[StubViewProvider alloc] init] - assetProvider:[[StubAssetProvider alloc] init]]; - - audioSession.category = AVAudioSessionCategoryPlayAndRecord; - audioSession.categoryOptions = - AVAudioSessionCategoryOptionMixWithOthers | AVAudioSessionCategoryOptionDefaultToSpeaker; + XCTAssert( + AVAudioSession.sharedInstance.categoryOptions & AVAudioSessionCategoryOptionDefaultToSpeaker, + @"Flag DefaultToSpeaker was removed."); + XCTAssert( + AVAudioSession.sharedInstance.categoryOptions & AVAudioSessionCategoryOptionMixWithOthers, + @"Flag MixWithOthers should be set."); + + id sessionMock = OCMClassMock([AVAudioSession class]); + OCMStub([sessionMock sharedInstance]).andReturn(sessionMock); + OCMStub([sessionMock category]).andReturn(AVAudioSessionCategoryPlayAndRecord); + OCMStub([sessionMock categoryOptions]) + .andReturn(AVAudioSessionCategoryOptionMixWithOthers | + AVAudioSessionCategoryOptionDefaultToSpeaker); + OCMReject([sessionMock setCategory:OCMOCK_ANY withOptions:0 error:[OCMArg setTo:nil]]) + .ignoringNonObjectArgs(); - FlutterError *error; [videoPlayerPlugin setMixWithOthers:true error:&error]; - - XCTAssertFalse(audioSession.setCategoryCalled); } - (void)validateTransformFixForOrientation:(UIImageOrientation)orientation { @@ -1255,9 +1058,8 @@ - (nonnull NSURL *)mp4TestURL { URLWithString:@"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4"]; } -- (nonnull NSObject *)playerItemWithURL:(NSURL *)url - factory:(NSObject *)factory { - return [factory playerItemWithAsset:[factory URLAssetWithURL:url options:nil]]; +- (nonnull AVPlayerItem *)playerItemWithURL:(NSURL *)url { + return [AVPlayerItem playerItemWithAsset:[AVURLAsset URLAssetWithURL:url options:nil]]; } #pragma mark - Audio Track Tests @@ -1265,11 +1067,10 @@ - (nonnull NSURL *)mp4TestURL { // Tests getAudioTracks with a regular MP4 video file using real AVFoundation. // Regular MP4 files do not have media selection groups, so getAudioTracks returns an empty array. - (void)testGetAudioTracksWithRealMP4Video { - NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; - FVPVideoPlayer *player = [[FVPVideoPlayer alloc] - initWithPlayerItem:[self playerItemWithURL:self.mp4TestURL factory:realObjectFactory] - avFactory:realObjectFactory - viewProvider:[[StubViewProvider alloc] init]]; + FVPVideoPlayer *player = + [[FVPVideoPlayer alloc] initWithPlayerItem:[self playerItemWithURL:self.mp4TestURL] + avFactory:[[FVPDefaultAVFactory alloc] init] + viewProvider:[[StubViewProvider alloc] init]]; XCTAssertNotNil(player); XCTestExpectation *initializedExpectation = [self expectationWithDescription:@"initialized"]; @@ -1295,15 +1096,14 @@ - (void)testGetAudioTracksWithRealMP4Video { // Tests getAudioTracks with an HLS stream using real AVFoundation. // HLS streams use media selection groups for audio track selection. - (void)testGetAudioTracksWithRealHLSStream { - NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; NSURL *hlsURL = [NSURL URLWithString:@"https://flutter.github.io/assets-for-api-docs/assets/videos/hls/bee.m3u8"]; XCTAssertNotNil(hlsURL); - FVPVideoPlayer *player = [[FVPVideoPlayer alloc] - initWithPlayerItem:[self playerItemWithURL:hlsURL factory:realObjectFactory] - avFactory:realObjectFactory - viewProvider:[[StubViewProvider alloc] init]]; + FVPVideoPlayer *player = + [[FVPVideoPlayer alloc] initWithPlayerItem:[self playerItemWithURL:hlsURL] + avFactory:[[FVPDefaultAVFactory alloc] init] + viewProvider:[[StubViewProvider alloc] init]]; XCTAssertNotNil(player); XCTestExpectation *initializedExpectation = [self expectationWithDescription:@"initialized"]; @@ -1333,17 +1133,14 @@ - (void)testGetAudioTracksWithRealHLSStream { // Tests that getAudioTracks returns valid data for audio-only files. // Regular audio files do not have media selection groups, so getAudioTracks returns an empty array. - (void)testGetAudioTracksWithRealAudioFile { - // TODO(stuartmorgan): Add more use of protocols in FVPVideoPlayer so that this test - // can use a fake item/asset instead of loading an actual remote asset. - NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; NSURL *audioURL = [NSURL URLWithString:@"https://flutter.github.io/assets-for-api-docs/assets/audio/rooster.mp3"]; XCTAssertNotNil(audioURL); - FVPVideoPlayer *player = [[FVPVideoPlayer alloc] - initWithPlayerItem:[self playerItemWithURL:audioURL factory:realObjectFactory] - avFactory:realObjectFactory - viewProvider:[[StubViewProvider alloc] init]]; + FVPVideoPlayer *player = + [[FVPVideoPlayer alloc] initWithPlayerItem:[self playerItemWithURL:audioURL] + avFactory:[[FVPDefaultAVFactory alloc] init] + viewProvider:[[StubViewProvider alloc] init]]; XCTAssertNotNil(player); XCTestExpectation *initializedExpectation = [self expectationWithDescription:@"initialized"]; @@ -1369,16 +1166,24 @@ - (void)testGetAudioTracksWithRealAudioFile { // Tests that getAudioTracks works correctly through the plugin API with a real video. // Regular MP4 files do not have media selection groups, so getAudioTracks returns an empty array. - (void)testGetAudioTracksViaPluginWithRealVideo { - // TODO(stuartmorgan): Add more use of protocols in FVPVideoPlayer so that this test - // can use a fake item/asset instead of loading an actual remote asset. - NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; - NSURL *testURL = - [NSURL URLWithString:@"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4"]; - XCTAssertNotNil(testURL); - FVPVideoPlayer *player = [[FVPVideoPlayer alloc] - initWithPlayerItem:[self playerItemWithURL:testURL factory:realObjectFactory] - avFactory:realObjectFactory - viewProvider:[[StubViewProvider alloc] init]]; + NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + FVPVideoPlayerPlugin *videoPlayerPlugin = + [[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; + + FlutterError *error; + [videoPlayerPlugin initialize:&error]; + XCTAssertNil(error); + + FVPCreationOptions *create = [FVPCreationOptions + makeWithUri:@"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4" + httpHeaders:@{}]; + FVPTexturePlayerIds *identifiers = [videoPlayerPlugin createTexturePlayerWithOptions:create + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(identifiers); + + FVPVideoPlayer *player = videoPlayerPlugin.playersByIdentifier[@(identifiers.playerId)]; + XCTAssertNotNil(player); // Wait for player item to become ready AVPlayerItem *item = player.player.currentItem; @@ -1388,7 +1193,6 @@ - (void)testGetAudioTracksViaPluginWithRealVideo { [self waitForExpectationsWithTimeout:30.0 handler:nil]; // Now test getAudioTracks - FlutterError *error; NSArray *result = [player getAudioTracks:&error]; XCTAssertNil(error); @@ -1403,23 +1207,43 @@ - (void)testGetAudioTracksViaPluginWithRealVideo { - (void)testLoadTracksWithMediaTypeIsCalledOnNewerOS { if (@available(iOS 15.0, macOS 12.0, *)) { - TestAsset *mockAsset = [[TestAsset alloc] initWithDuration:CMTimeMake(1, 1) tracks:@[]]; - NSObject *item = [[StubPlayerItem alloc] initWithAsset:mockAsset]; - - StubFVPAVFactory *stubAVFactory = [[StubFVPAVFactory alloc] initWithPlayer:nil - playerItem:item - pixelBufferSource:nil]; + AVAsset *mockAsset = OCMClassMock([AVAsset class]); + AVPlayerItem *mockItem = OCMClassMock([AVPlayerItem class]); + OCMStub([mockItem asset]).andReturn(mockAsset); + + // Stub loadValuesAsynchronouslyForKeys to immediately call completion + OCMStub([mockAsset loadValuesAsynchronouslyForKeys:[OCMArg any] + completionHandler:[OCMArg invokeBlock]]); + + // Stub statusOfValueForKey to return Loaded + OCMStub([mockAsset statusOfValueForKey:@"tracks" error:[OCMArg anyObjectRef]]) + .andReturn(AVKeyValueStatusLoaded); + + // Expect loadTracksWithMediaType:completionHandler: + XCTestExpectation *expectation = + [self expectationWithDescription:@"loadTracksWithMediaType called"]; + OCMExpect([mockAsset loadTracksWithMediaType:AVMediaTypeVideo completionHandler:[OCMArg any]]) + .andDo(^(NSInvocation *invocation) { + [expectation fulfill]; + // Invoke the completion handler to prevent leaks or hangs if the code waits for it + void (^completion)(NSArray *, NSError *); + [invocation getArgument:&completion atIndex:3]; + completion(@[], nil); + }); + + StubFVPAVFactory *stubAVFactory = [[StubFVPAVFactory alloc] initWithPlayer:nil output:nil]; StubViewProvider *stubViewProvider = #if TARGET_OS_OSX [[StubViewProvider alloc] initWithView:nil]; #else [[StubViewProvider alloc] initWithViewController:nil]; #endif - FVPVideoPlayer *player = [[FVPVideoPlayer alloc] initWithPlayerItem:item + FVPVideoPlayer *player = [[FVPVideoPlayer alloc] initWithPlayerItem:mockItem avFactory:stubAVFactory viewProvider:stubViewProvider]; - XCTAssertNotNil(player); - XCTAssertTrue(mockAsset.loadedTracksAsynchronously); + (void)player; // Keep reference + + [self waitForExpectationsWithTimeout:5.0 handler:nil]; } } diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/AVAssetTrackUtils.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/AVAssetTrackUtils.m index 11c1ff285376..f3ba81b6eb72 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/AVAssetTrackUtils.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/AVAssetTrackUtils.m @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import AVFoundation; +#import CGAffineTransform FVPGetStandardizedTransformForTrack(AVAssetTrack *track) { CGAffineTransform t = track.preferredTransform; diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPAVFactory.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPAVFactory.m index 167ae1feac5d..9024e5d24d6f 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPAVFactory.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPAVFactory.m @@ -4,160 +4,15 @@ #import "./include/video_player_avfoundation/FVPAVFactory.h" -@import AVFoundation; - -@interface FVPDefaultAVAsset : NSObject -@property(nonatomic, readwrite) AVAsset *asset; -@end - -@implementation FVPDefaultAVAsset -- (instancetype)initWithAsset:(AVAsset *)asset { - self = [super init]; - if (self) { - _asset = asset; - } - return self; -} - -- (CMTime)duration { - return self.asset.duration; -} - -- (AVKeyValueStatus)statusOfValueForKey:(NSString *)key - error:(NSError *_Nullable *_Nullable)outError { - return [self.asset statusOfValueForKey:key error:outError]; -} - -- (void)loadValuesAsynchronouslyForKeys:(NSArray *)keys - completionHandler:(nullable void (^NS_SWIFT_SENDABLE)(void))handler { - [self.asset loadValuesAsynchronouslyForKeys:keys completionHandler:handler]; -} - -- (NSArray *)tracksWithMediaType:(NSString *)mediaType { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - return [self.asset tracksWithMediaType:mediaType]; -#pragma clang diagnostic pop -} - -- (void)loadTracksWithMediaType:(AVMediaType)mediaType - completionHandler:(void (^NS_SWIFT_SENDABLE)(NSArray *_Nullable, - NSError *_Nullable))completionHandler - API_AVAILABLE(macos(12.0), ios(15.0)) { - [self.asset loadTracksWithMediaType:mediaType completionHandler:completionHandler]; -} - -@end - -#pragma mark - - -@interface FVPDefaultAVPlayerItem : NSObject -@property(nonatomic, readwrite) AVPlayerItem *playerItem; -@end - -@implementation FVPDefaultAVPlayerItem -- (instancetype)initWithPlayerItem:(AVPlayerItem *)playerItem { - self = [super init]; - if (self) { - _playerItem = playerItem; - } - return self; -} - -- (NSObject *)asset { - return [[FVPDefaultAVAsset alloc] initWithAsset:self.playerItem.asset]; -} - -- (AVVideoComposition *)videoComposition { - return self.playerItem.videoComposition; -} - -- (void)setVideoComposition:(AVVideoComposition *)videoComposition { - self.playerItem.videoComposition = videoComposition; -} -@end - -#pragma mark - - -@interface FVPDefaultAVPlayerItemVideoOutput : NSObject -@property(nonatomic, readwrite) AVPlayerItemVideoOutput *videoOutput; -@end - -@implementation FVPDefaultAVPlayerItemVideoOutput -- (instancetype)initWithPixelBufferAttributes:(NSDictionary *)attributes { - self = [super init]; - if (self) { - _videoOutput = [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:attributes]; - } - return self; -} - -- (CMTime)itemTimeForHostTime:(CFTimeInterval)hostTimeInSeconds { - return [self.videoOutput itemTimeForHostTime:hostTimeInSeconds]; -} - -- (BOOL)hasNewPixelBufferForItemTime:(CMTime)itemTime { - return [self.videoOutput hasNewPixelBufferForItemTime:itemTime]; -} - -- (nullable CVPixelBufferRef)copyPixelBufferForItemTime:(CMTime)itemTime - itemTimeForDisplay:(nullable CMTime *)outItemTimeForDisplay - CF_RETURNS_RETAINED { - return [self.videoOutput copyPixelBufferForItemTime:itemTime - itemTimeForDisplay:outItemTimeForDisplay]; -} -@end - -#pragma mark - - -#if TARGET_OS_IOS -@interface FVPDefaultAVAudioSession : NSObject -@end - -@implementation FVPDefaultAVAudioSession -- (AVAudioSessionCategory)category { - return AVAudioSession.sharedInstance.category; -} - -- (AVAudioSessionCategoryOptions)categoryOptions { - return AVAudioSession.sharedInstance.categoryOptions; -} - -- (BOOL)setCategory:(AVAudioSessionCategory)category - withOptions:(AVAudioSessionCategoryOptions)options - error:(NSError **)outError { - return [AVAudioSession.sharedInstance setCategory:category withOptions:options error:outError]; -} -@end -#endif - -#pragma mark - +#import @implementation FVPDefaultAVFactory -- (NSObject *)URLAssetWithURL:(NSURL *)URL - options:(nullable NSDictionary *)options { - return [[FVPDefaultAVAsset alloc] initWithAsset:[AVAsset assetWithURL:URL]]; -} - -- (NSObject *)playerItemWithAsset:(NSObject *)asset { - // The default factory always vends FVPDefault* implementations, so it is safe to cast back. - return [[FVPDefaultAVPlayerItem alloc] - initWithPlayerItem:[AVPlayerItem playerItemWithAsset:((FVPDefaultAVAsset *)asset).asset]]; +- (AVPlayer *)playerWithPlayerItem:(AVPlayerItem *)playerItem { + return [AVPlayer playerWithPlayerItem:playerItem]; } -- (AVPlayer *)playerWithPlayerItem:(NSObject *)playerItem { - // The default factory always vends FVPDefault* implementations, so it is safe to cast back. - return [AVPlayer playerWithPlayerItem:((FVPDefaultAVPlayerItem *)playerItem).playerItem]; -} - -- (NSObject *)videoOutputWithPixelBufferAttributes: +- (AVPlayerItemVideoOutput *)videoOutputWithPixelBufferAttributes: (NSDictionary *)attributes { - return [[FVPDefaultAVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:attributes]; -} - -#if TARGET_OS_IOS -- (NSObject *)sharedAudioSession { - return [[FVPDefaultAVAudioSession alloc] init]; + return [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:attributes]; } -#endif @end diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPCADisplayLink.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPCADisplayLink.m index 3bfa0d63c313..19a2688df082 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPCADisplayLink.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPCADisplayLink.m @@ -4,8 +4,8 @@ #import "../video_player_avfoundation/include/video_player_avfoundation/FVPDisplayLink.h" -@import Foundation; -@import QuartzCore; +#import +#import /// A proxy object to act as a CADisplayLink target, to avoid retain loops, since FVPCADisplayLink /// owns its CADisplayLink, but CADisplayLink retains its target. @@ -44,8 +44,8 @@ @interface FVPCADisplayLink () @implementation FVPCADisplayLink -- (instancetype)initWithViewProvider:(NSObject *)viewProvider - callback:(void (^)(void))callback { +- (instancetype)initWithRegistrar:(id)registrar + callback:(void (^)(void))callback { self = [super init]; if (self) { _target = [[FVPDisplayLinkTarget alloc] initWithCallback:callback]; @@ -54,7 +54,7 @@ - (instancetype)initWithViewProvider:(NSObject *)viewProvider #else // Use the view if one is wired up, otherwise fall back to the main screen. // TODO(stuartmorgan): Consider an API to inform plugins about attached view changes. - NSView *view = viewProvider.view; + NSView *view = registrar.view; _displayLink = view ? [view displayLinkWithTarget:_target selector:@selector(onDisplayLink:)] : [NSScreen.mainScreen displayLinkWithTarget:_target selector:@selector(onDisplayLink:)]; diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPEventBridge.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPEventBridge.m index 0df3569da9bd..ca51839a26b7 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPEventBridge.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPEventBridge.m @@ -4,12 +4,12 @@ #import "./include/video_player_avfoundation/FVPEventBridge.h" -@import Foundation; +#import #if TARGET_OS_OSX -@import FlutterMacOS; +#import #else -@import Flutter; +#import #endif @interface FVPEventBridge () diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPTextureBasedVideoPlayer.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPTextureBasedVideoPlayer.m index b474f8457e8d..9bad19db91cd 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPTextureBasedVideoPlayer.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPTextureBasedVideoPlayer.m @@ -35,7 +35,7 @@ - (void)expectFrame; @implementation FVPTextureBasedVideoPlayer -- (instancetype)initWithPlayerItem:(NSObject *)item +- (instancetype)initWithPlayerItem:(AVPlayerItem *)item frameUpdater:(FVPFrameUpdater *)frameUpdater displayLink:(NSObject *)displayLink avFactory:(id)avFactory @@ -141,10 +141,9 @@ - (CVPixelBufferRef)copyPixelBuffer { self.targetTime += duration; CVPixelBufferRef buffer = NULL; - CMTime outputItemTime = [self.pixelBufferSource itemTimeForHostTime:self.targetTime]; - if ([self.pixelBufferSource hasNewPixelBufferForItemTime:outputItemTime]) { - buffer = [self.pixelBufferSource copyPixelBufferForItemTime:outputItemTime - itemTimeForDisplay:NULL]; + CMTime outputItemTime = [self.videoOutput itemTimeForHostTime:self.targetTime]; + if ([self.videoOutput hasNewPixelBufferForItemTime:outputItemTime]) { + buffer = [self.videoOutput copyPixelBufferForItemTime:outputItemTime itemTimeForDisplay:NULL]; if (buffer) { // Balance the owned reference from copyPixelBufferForItemTime. CVBufferRelease(self.latestPixelBuffer); diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayer.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayer.m index f57489cfc2b5..5b79d4291c24 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayer.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayer.m @@ -71,7 +71,7 @@ @implementation FVPVideoPlayer { BOOL _listenersRegistered; } -- (instancetype)initWithPlayerItem:(NSObject *)item +- (instancetype)initWithPlayerItem:(AVPlayerItem *)item avFactory:(id)avFactory viewProvider:(NSObject *)viewProvider { self = [super init]; @@ -79,7 +79,7 @@ - (instancetype)initWithPlayerItem:(NSObject *)item _viewProvider = viewProvider; - NSObject *asset = item.asset; + AVAsset *asset = [item asset]; void (^assetCompletionHandler)(void) = ^{ if ([asset statusOfValueForKey:@"tracks" error:nil] == AVKeyValueStatusLoaded) { void (^processVideoTracks)(NSArray *) = ^(NSArray *tracks) { @@ -100,9 +100,9 @@ - (instancetype)initWithPlayerItem:(NSObject *)item // Video composition can only be used with file-based media and is not supported for // use with media served using HTTP Live Streaming. AVMutableVideoComposition *videoComposition = - [self videoCompositionWithTransform:self->_preferredTransform - asset:asset - videoTrack:videoTrack]; + [self getVideoCompositionWithTransform:self->_preferredTransform + withAsset:asset + withVideoTrack:videoTrack]; item.videoComposition = videoComposition; } }; @@ -142,7 +142,7 @@ - (instancetype)initWithPlayerItem:(NSObject *)item (id)kCVPixelBufferPixelFormatTypeKey : @(kCVPixelFormatType_32BGRA), (id)kCVPixelBufferIOSurfacePropertiesKey : @{} }; - _pixelBufferSource = [avFactory videoOutputWithPixelBufferAttributes:pixBuffAttributes]; + _videoOutput = [avFactory videoOutputWithPixelBufferAttributes:pixBuffAttributes]; [asset loadValuesAsynchronouslyForKeys:@[ @"tracks" ] completionHandler:assetCompletionHandler]; @@ -227,12 +227,12 @@ NS_INLINE CGFloat radiansToDegrees(CGFloat radians) { return degrees; }; -- (AVMutableVideoComposition *)videoCompositionWithTransform:(CGAffineTransform)transform - asset:(NSObject *)asset - videoTrack:(AVAssetTrack *)videoTrack { +- (AVMutableVideoComposition *)getVideoCompositionWithTransform:(CGAffineTransform)transform + withAsset:(AVAsset *)asset + withVideoTrack:(AVAssetTrack *)videoTrack { AVMutableVideoCompositionInstruction *instruction = [AVMutableVideoCompositionInstruction videoCompositionInstruction]; - instruction.timeRange = CMTimeRangeMake(kCMTimeZero, asset.duration); + instruction.timeRange = CMTimeRangeMake(kCMTimeZero, [asset duration]); AVMutableVideoCompositionLayerInstruction *layerInstruction = [AVMutableVideoCompositionLayerInstruction videoCompositionLayerInstructionWithAssetTrack:videoTrack]; @@ -308,7 +308,7 @@ - (void)reportStatusForPlayerItem:(AVPlayerItem *)item { break; case AVPlayerItemStatusReadyToPlay: if (!_isInitialized) { - [item addOutput:self.pixelBufferSource.videoOutput]; + [item addOutput:_videoOutput]; [self reportInitialized]; [self updatePlayingState]; } diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayerPlugin.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayerPlugin.m index a420e8397401..dbc130acc508 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayerPlugin.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayerPlugin.m @@ -5,10 +5,9 @@ #import "./include/video_player_avfoundation/FVPVideoPlayerPlugin.h" #import "./include/video_player_avfoundation/FVPVideoPlayerPlugin_Test.h" -@import AVFoundation; +#import #import "./include/video_player_avfoundation/FVPAVFactory.h" -#import "./include/video_player_avfoundation/FVPAssetProvider.h" #import "./include/video_player_avfoundation/FVPDisplayLink.h" #import "./include/video_player_avfoundation/FVPEventBridge.h" #import "./include/video_player_avfoundation/FVPFrameUpdater.h" @@ -24,15 +23,15 @@ @interface FVPDefaultDisplayLinkFactory : NSObject @end @implementation FVPDefaultDisplayLinkFactory -- (NSObject *)displayLinkWithViewProvider:(NSObject *)viewProvider - callback:(void (^)(void))callback { +- (NSObject *)displayLinkWithRegistrar:(id)registrar + callback:(void (^)(void))callback { #if TARGET_OS_IOS - return [[FVPCADisplayLink alloc] initWithViewProvider:viewProvider callback:callback]; + return [[FVPCADisplayLink alloc] initWithRegistrar:registrar callback:callback]; #else if (@available(macOS 14.0, *)) { - return [[FVPCADisplayLink alloc] initWithViewProvider:viewProvider callback:callback]; + return [[FVPCADisplayLink alloc] initWithRegistrar:registrar callback:callback]; } - return [[FVPCoreVideoDisplayLink alloc] initWithViewProvider:viewProvider callback:callback]; + return [[FVPCoreVideoDisplayLink alloc] initWithRegistrar:registrar callback:callback]; #endif } @@ -40,50 +39,17 @@ @implementation FVPDefaultDisplayLinkFactory #pragma mark - -/// Non-test implementation of FVPAssetProvider, wrapping a Flutter plugin -/// registrar. -@interface FVPDefaultAssetProvider : NSObject -@property(weak, nonatomic) NSObject *registrar; - -- (instancetype)initWithRegistrar:(NSObject *)registrar; -@end - -@implementation FVPDefaultAssetProvider - -- (instancetype)initWithRegistrar:(NSObject *)registrar { - self = [super init]; - if (self) { - _registrar = registrar; - } - return self; -} - -- (NSString *)lookupKeyForAsset:(NSString *)asset { - return [self.registrar lookupKeyForAsset:asset]; -} - -- (NSString *)lookupKeyForAsset:(NSString *)asset fromPackage:(NSString *)package { - return [self.registrar lookupKeyForAsset:asset fromPackage:package]; -} - -@end - -#pragma mark - - @interface FVPVideoPlayerPlugin () -@property(nonatomic, strong) NSObject *binaryMessenger; -@property(nonatomic, strong) NSObject *textureRegistry; +@property(readonly, strong, nonatomic) NSObject *registrar; @property(nonatomic, strong) id displayLinkFactory; @property(nonatomic, strong) id avFactory; @property(nonatomic, strong) NSObject *viewProvider; -@property(nonatomic, strong) NSObject *assetProvider; @property(nonatomic, assign) int64_t nextPlayerIdentifier; @end @implementation FVPVideoPlayerPlugin + (void)registerWithRegistrar:(NSObject *)registrar { FVPVideoPlayerPlugin *instance = [[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; - // Publish the instance so that it receives detachFromEngineForRegistrar:. [registrar publish:instance]; FVPNativeVideoViewFactory *factory = [[FVPNativeVideoViewFactory alloc] initWithMessenger:registrar.messenger @@ -97,26 +63,21 @@ + (void)registerWithRegistrar:(NSObject *)registrar { - (instancetype)initWithRegistrar:(NSObject *)registrar { return [self initWithAVFactory:[[FVPDefaultAVFactory alloc] init] displayLinkFactory:[[FVPDefaultDisplayLinkFactory alloc] init] - binaryMessenger:registrar.messenger - textureRegistry:registrar.textures viewProvider:[[FVPDefaultViewProvider alloc] initWithRegistrar:registrar] - assetProvider:[[FVPDefaultAssetProvider alloc] initWithRegistrar:registrar]]; + registrar:registrar]; } - (instancetype)initWithAVFactory:(id)avFactory displayLinkFactory:(id)displayLinkFactory - binaryMessenger:(NSObject *)binaryMessenger - textureRegistry:(NSObject *)textureRegistry viewProvider:(NSObject *)viewProvider - assetProvider:(NSObject *)assetProvider { + registrar:(NSObject *)registrar { self = [super init]; NSAssert(self, @"super init cannot be nil"); - _binaryMessenger = binaryMessenger; - _textureRegistry = textureRegistry; - _assetProvider = assetProvider; + _registrar = registrar; _viewProvider = viewProvider; _displayLinkFactory = displayLinkFactory ?: [[FVPDefaultDisplayLinkFactory alloc] init]; _avFactory = avFactory ?: [[FVPDefaultAVFactory alloc] init]; + _viewProvider = viewProvider ?: [[FVPDefaultViewProvider alloc] initWithRegistrar:registrar]; _playersByIdentifier = [NSMutableDictionary dictionaryWithCapacity:1]; _nextPlayerIdentifier = 1; return self; @@ -140,7 +101,7 @@ - (int64_t)configurePlayer:(FVPVideoPlayer *)player int64_t playerIdentifier = self.nextPlayerIdentifier++; self.playersByIdentifier[@(playerIdentifier)] = player; - NSObject *messenger = self.binaryMessenger; + NSObject *messenger = self.registrar.messenger; NSString *channelSuffix = [NSString stringWithFormat:@"%lld", playerIdentifier]; // Set up the player-specific API handler, and its onDispose unregistration. SetUpFVPVideoPlayerInstanceApiWithSuffix(messenger, player, channelSuffix); @@ -171,15 +132,15 @@ - (int64_t)configurePlayer:(FVPVideoPlayer *)player // that could affect other plugins which depend on this global state. Only change // category or options if there is change to prevent unnecessary lags and silence. #if TARGET_OS_IOS -static void upgradeAudioSessionCategory(NSObject *session, - AVAudioSessionCategory requestedCategory, +static void upgradeAudioSessionCategory(AVAudioSessionCategory requestedCategory, AVAudioSessionCategoryOptions options, AVAudioSessionCategoryOptions clearOptions) { NSSet *playCategories = [NSSet setWithObjects:AVAudioSessionCategoryPlayback, AVAudioSessionCategoryPlayAndRecord, nil]; NSSet *recordCategories = [NSSet setWithObjects:AVAudioSessionCategoryRecord, AVAudioSessionCategoryPlayAndRecord, nil]; - NSSet *requiredCategories = [NSSet setWithObjects:requestedCategory, session.category, nil]; + NSSet *requiredCategories = + [NSSet setWithObjects:requestedCategory, AVAudioSession.sharedInstance.category, nil]; BOOL requiresPlay = [requiredCategories intersectsSet:playCategories]; BOOL requiresRecord = [requiredCategories intersectsSet:recordCategories]; if (requiresPlay && requiresRecord) { @@ -189,20 +150,19 @@ static void upgradeAudioSessionCategory(NSObject *session, } else if (requiresRecord) { requestedCategory = AVAudioSessionCategoryRecord; } - options = (session.categoryOptions & ~clearOptions) | options; - if ([requestedCategory isEqualToString:session.category] && options == session.categoryOptions) { + options = (AVAudioSession.sharedInstance.categoryOptions & ~clearOptions) | options; + if ([requestedCategory isEqualToString:AVAudioSession.sharedInstance.category] && + options == AVAudioSession.sharedInstance.categoryOptions) { return; } - [session setCategory:requestedCategory withOptions:options error:nil]; + [AVAudioSession.sharedInstance setCategory:requestedCategory withOptions:options error:nil]; } #endif - (void)initialize:(FlutterError *__autoreleasing *)error { #if TARGET_OS_IOS // Allow audio playback when the Ring/Silent switch is set to silent - upgradeAudioSessionCategory(self.avFactory.sharedAudioSession, AVAudioSessionCategoryPlayback, - /* options */ 0, - /* clearOptions */ 0); + upgradeAudioSessionCategory(AVAudioSessionCategoryPlayback, 0, 0); #endif FlutterError *disposeError; @@ -217,7 +177,7 @@ - (void)initialize:(FlutterError *__autoreleasing *)error { - (nullable NSNumber *)createPlatformViewPlayerWithOptions:(nonnull FVPCreationOptions *)options error:(FlutterError **)error { @try { - NSObject *item = [self playerItemWithCreationOptions:options]; + AVPlayerItem *item = [self playerItemWithCreationOptions:options]; // FVPVideoPlayer contains all required logic for platform views. FVPVideoPlayer *player = [[FVPVideoPlayer alloc] initWithPlayerItem:item @@ -235,13 +195,14 @@ - (nullable FVPTexturePlayerIds *)createTexturePlayerWithOptions: (nonnull FVPCreationOptions *)options error:(FlutterError **)error { @try { - NSObject *item = [self playerItemWithCreationOptions:options]; - FVPFrameUpdater *frameUpdater = [[FVPFrameUpdater alloc] initWithRegistry:self.textureRegistry]; + AVPlayerItem *item = [self playerItemWithCreationOptions:options]; + FVPFrameUpdater *frameUpdater = + [[FVPFrameUpdater alloc] initWithRegistry:self.registrar.textures]; NSObject *displayLink = - [self.displayLinkFactory displayLinkWithViewProvider:self.viewProvider - callback:^() { - [frameUpdater displayLinkFired]; - }]; + [self.displayLinkFactory displayLinkWithRegistrar:_registrar + callback:^() { + [frameUpdater displayLinkFired]; + }]; FVPTextureBasedVideoPlayer *player = [[FVPTextureBasedVideoPlayer alloc] initWithPlayerItem:item @@ -250,12 +211,12 @@ - (nullable FVPTexturePlayerIds *)createTexturePlayerWithOptions: avFactory:self.avFactory viewProvider:self.viewProvider]; - int64_t textureIdentifier = [self.textureRegistry registerTexture:player]; + int64_t textureIdentifier = [self.registrar.textures registerTexture:player]; [player setTextureIdentifier:textureIdentifier]; __weak typeof(self) weakSelf = self; int64_t playerIdentifier = [self configurePlayer:player withExtraDisposeHandler:^() { - [weakSelf.textureRegistry unregisterTexture:textureIdentifier]; + [weakSelf.registrar.textures unregisterTexture:textureIdentifier]; }]; return [FVPTexturePlayerIds makeWithPlayerId:playerIdentifier textureId:textureIdentifier]; } @catch (NSException *exception) { @@ -269,14 +230,12 @@ - (void)setMixWithOthers:(BOOL)mixWithOthers #if TARGET_OS_OSX // AVAudioSession doesn't exist on macOS, and audio always mixes, so just no-op. #else - NSObject *session = self.avFactory.sharedAudioSession; if (mixWithOthers) { - upgradeAudioSessionCategory(session, session.category, - /* options */ AVAudioSessionCategoryOptionMixWithOthers, - /* clearOptions */ 0); + upgradeAudioSessionCategory(AVAudioSession.sharedInstance.category, + AVAudioSessionCategoryOptionMixWithOthers, 0); } else { - upgradeAudioSessionCategory(session, session.category, /* options */ 0, - /* clearOptions */ AVAudioSessionCategoryOptionMixWithOthers); + upgradeAudioSessionCategory(AVAudioSession.sharedInstance.category, 0, + AVAudioSessionCategoryOptionMixWithOthers); } #endif } @@ -285,8 +244,8 @@ - (nullable NSString *)fileURLForAssetWithName:(NSString *)asset package:(nullable NSString *)package error:(FlutterError *_Nullable *_Nonnull)error { NSString *resource = package == nil - ? [self.assetProvider lookupKeyForAsset:asset] - : [self.assetProvider lookupKeyForAsset:asset fromPackage:package]; + ? [self.registrar lookupKeyForAsset:asset] + : [self.registrar lookupKeyForAsset:asset fromPackage:package]; NSString *path = [[NSBundle mainBundle] pathForResource:resource ofType:nil]; #if TARGET_OS_OSX @@ -304,14 +263,13 @@ - (nullable NSString *)fileURLForAssetWithName:(NSString *)asset } /// Returns the AVPlayerItem corresponding to the given player creation options. -- (nonnull NSObject *)playerItemWithCreationOptions: - (nonnull FVPCreationOptions *)options { +- (nonnull AVPlayerItem *)playerItemWithCreationOptions:(nonnull FVPCreationOptions *)options { NSDictionary *headers = options.httpHeaders; NSDictionary *itemOptions = headers.count == 0 ? nil : @{@"AVURLAssetHTTPHeaderFieldsKey" : headers}; - NSObject *asset = [self.avFactory URLAssetWithURL:[NSURL URLWithString:options.uri] - options:itemOptions]; - return [self.avFactory playerItemWithAsset:asset]; + AVURLAsset *asset = [AVURLAsset URLAssetWithURL:[NSURL URLWithString:options.uri] + options:itemOptions]; + return [AVPlayerItem playerItemWithAsset:asset]; } @end diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPViewProvider.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPViewProvider.m index f72f86927cd8..d1f6ec96eac2 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPViewProvider.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPViewProvider.m @@ -5,10 +5,8 @@ #import "./include/video_player_avfoundation/FVPViewProvider.h" #if TARGET_OS_OSX -@import FlutterMacOS; @import Cocoa; #else -@import Flutter; @import UIKit; #endif diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/AVAssetTrackUtils.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/AVAssetTrackUtils.h index 19086b10e430..99de0dd65f1e 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/AVAssetTrackUtils.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/AVAssetTrackUtils.h @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import AVFoundation; +#import /// Returns a standardized transform /// according to the orientation of the track. /// /// Note: https://stackoverflow.com/questions/64161544 /// `AVAssetTrack.preferredTransform` can have wrong `tx` and `ty`. -CGAffineTransform FVPGetStandardizedTransformForTrack(AVAssetTrack *track); +CGAffineTransform FVPGetStandardizedTransformForTrack(AVAssetTrack* track); diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPAVFactory.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPAVFactory.h index 90d4fa3ed1b9..9dcd62ffbbbd 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPAVFactory.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPAVFactory.h @@ -2,110 +2,24 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import AVFoundation; +#import NS_ASSUME_NONNULL_BEGIN -/// Protocol for abstracting access to an AVPlayerItemVideoOutput, to enable unit testing. -@protocol FVPPixelBufferSource -@required -/// The underlying AVFoundation object. -/// -/// This can't be fully abstracted away because it's passed to other AVFoundation calls. Plugin -/// code should only use this to pass into AVFoundation; other calls should be made on the -/// protocol. -@property(nonatomic, readonly) AVPlayerItemVideoOutput *videoOutput; - -/// Wraps the underlying videoOutput's itemTimeForHostTime: method. -- (CMTime)itemTimeForHostTime:(CFTimeInterval)hostTimeInSeconds; - -/// Wraps the underlying videoOutput's hasNewPixelBufferForItemTime: method. -- (BOOL)hasNewPixelBufferForItemTime:(CMTime)itemTime; - -/// Wraps the underlying videoOutput's copyPixelBufferForItemTime:itemTimeForDisplay: method. -- (nullable CVPixelBufferRef)copyPixelBufferForItemTime:(CMTime)itemTime - itemTimeForDisplay:(nullable CMTime *)outItemTimeForDisplay - CF_RETURNS_RETAINED; - -@end - -@protocol FVPAVAsset -@required -/// Wraps the underlying asset's duration property. -@property(nonatomic, readonly) CMTime duration; - -/// Wraps the underlying asset's statusOfValueForKey:error: method. -- (AVKeyValueStatus)statusOfValueForKey:(NSString *)key - error:(NSError *_Nullable *_Nullable)outError; - -/// Wraps the underlying asset's loadValuesAsynchronouslyForKeys:completionHandler: method. -- (void)loadValuesAsynchronouslyForKeys:(NSArray *)keys - completionHandler:(nullable void (^NS_SWIFT_SENDABLE)(void))handler; - -/// Wraps the underlying asset's loadTracksWithMediaType:completionHandler: method. -- (void)loadTracksWithMediaType:(AVMediaType)mediaType - completionHandler:(void (^NS_SWIFT_SENDABLE)(NSArray *_Nullable, - NSError *_Nullable))completionHandler - API_AVAILABLE(macos(12.0), ios(15.0)); - -/// Wraps the underlying asset's tracksWithMediaType: method. -- (NSArray *)tracksWithMediaType:(AVMediaType)mediaType - API_DEPRECATED("Use loadTracksWithMediaType:completionHandler: instead", macos(10.7, 15.0), - ios(4.0, 18.0)); -@end - -/// Protocol for abstracting access to an AVPlayerItem, to enable unit testing. -@protocol FVPAVPlayerItem -@required -/// Wraps the underlying playerItem's asset property. -@property(nonatomic, readonly) NSObject *asset; - -/// Wraps the underlying playerItem's videoComposition property. -@property(nonatomic, copy, nullable) AVVideoComposition *videoComposition; -@end - -#if TARGET_OS_IOS -/// Protocol for abstracting access to an AVAudioSession, to enable unit testing. -@protocol FVPAVAudioSession -@required -/// Wraps the AVAudioSession property of the same name. -@property(nonatomic, readonly) AVAudioSessionCategory category; -/// Wraps the AVAudioSession property of the same name. -@property(nonatomic, readonly) AVAudioSessionCategoryOptions categoryOptions; -/// Wraps the AVAudioSession method of the same name. -- (BOOL)setCategory:(AVAudioSessionCategory)category - withOptions:(AVAudioSessionCategoryOptions)options - error:(NSError **)outError; -@end -#endif - /// Protocol for AVFoundation object instance factory. Used for injecting framework objects in /// tests. @protocol FVPAVFactory +/// Creates and returns an AVPlayer instance with the specified AVPlayerItem. @required +- (AVPlayer *)playerWithPlayerItem:(AVPlayerItem *)playerItem; -/// Creates and returns a wrapped AVAsset instance with the specified URL and options. -- (NSObject *)URLAssetWithURL:(NSURL *)URL - options:(nullable NSDictionary *)options; - -/// Creates and returns a wrapped AVPlayerItem instance with the specified asset. -- (NSObject *)playerItemWithAsset:(NSObject *)asset; - -/// Creates and returns an AVPlayer instance with the specified player item. -- (AVPlayer *)playerWithPlayerItem:(NSObject *)playerItem; - -/// Creates and returns a wrapped AVPlayerItemVideoOutput instance with the specified pixel buffer +/// Creates and returns an AVPlayerItemVideoOutput instance with the specified pixel buffer /// attributes. -- (NSObject *)videoOutputWithPixelBufferAttributes: +- (AVPlayerItemVideoOutput *)videoOutputWithPixelBufferAttributes: (NSDictionary *)attributes; - -#if TARGET_OS_IOS -/// Returns the AVAudioSession shared instance, wrapped in the protocol. -- (NSObject *)sharedAudioSession; -#endif @end -/// A default implementation of the FVPAVFactory protocol, using real AVFoundation objects. +/// A default implementation of the FVPAVFactory protocol. @interface FVPDefaultAVFactory : NSObject @end diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPDisplayLink.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPDisplayLink.h index 7646669069a4..54845527c83d 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPDisplayLink.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPDisplayLink.h @@ -2,9 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import Foundation; +#import -#import "FVPViewProvider.h" +#if TARGET_OS_OSX +#import +#else +#import +#endif // A cross-platform display link abstraction. @protocol FVPDisplayLink @@ -27,8 +31,8 @@ API_AVAILABLE(ios(4.0), macos(14.0)) /// /// The display link starts paused, so must be started, by setting 'running' to YES, before the /// callback will fire. -- (instancetype)initWithViewProvider:(NSObject *)viewProvider - callback:(void (^)(void))callback NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithRegistrar:(id)registrar + callback:(void (^)(void))callback NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; @@ -42,8 +46,8 @@ API_AVAILABLE(ios(4.0), macos(14.0)) /// /// The display link starts paused, so must be started, by setting 'running' to YES, before the /// callback will fire. -- (instancetype)initWithViewProvider:(NSObject *)viewProvider - callback:(void (^)(void))callback NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithRegistrar:(id)registrar + callback:(void (^)(void))callback NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPEventBridge.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPEventBridge.h index 873361e53d2e..0a0fef634db8 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPEventBridge.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPEventBridge.h @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import Foundation; +#import #import "FVPVideoEventListener.h" #if TARGET_OS_OSX -@import FlutterMacOS; +#import #else -@import Flutter; +#import #endif /// An implementation of FVPVideoEventListener that forwards messages to Dart via an event channel. diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPFrameUpdater.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPFrameUpdater.h index 684b6a5d3750..23063104b99c 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPFrameUpdater.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPFrameUpdater.h @@ -5,9 +5,9 @@ #import "FVPDisplayLink.h" #if TARGET_OS_OSX -@import FlutterMacOS; +#import #else -@import Flutter; +#import #endif NS_ASSUME_NONNULL_BEGIN diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPNativeVideoView.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPNativeVideoView.h index 627195470f6e..61dbcb02936a 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPNativeVideoView.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPNativeVideoView.h @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import AVFoundation; +#import #if TARGET_OS_OSX -@import FlutterMacOS; +#import #else -@import Flutter; +#import #endif /// A class used to create a native video view that can be embedded in a Flutter app. diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPNativeVideoViewFactory.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPNativeVideoViewFactory.h index d20d68e64993..923af75d12d0 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPNativeVideoViewFactory.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPNativeVideoViewFactory.h @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import Foundation; +#import #import "FVPVideoPlayer.h" #if TARGET_OS_OSX -@import FlutterMacOS; +#import #else -@import Flutter; +#import #endif /// A factory class responsible for creating native video views that can be embedded in a diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer.h index 66c74f444d6c..f8ca5008b959 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer.h @@ -2,13 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import AVFoundation; - #import "FVPDisplayLink.h" #import "FVPFrameUpdater.h" #import "FVPVideoPlayer.h" #import "FVPVideoPlayer_Internal.h" -#import "FVPViewProvider.h" NS_ASSUME_NONNULL_BEGIN @@ -19,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN @interface FVPTextureBasedVideoPlayer : FVPVideoPlayer /// Initializes a new instance of FVPTextureBasedVideoPlayer with the given player item, /// frame updater, display link, AV factory, and view provider. -- (instancetype)initWithPlayerItem:(NSObject *)item +- (instancetype)initWithPlayerItem:(AVPlayerItem *)item frameUpdater:(FVPFrameUpdater *)frameUpdater displayLink:(NSObject *)displayLink avFactory:(id)avFactory diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer_Test.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer_Test.h index 2a83455cef65..9374ef3d528e 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer_Test.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer_Test.h @@ -5,9 +5,9 @@ #import "FVPTextureBasedVideoPlayer.h" #if TARGET_OS_OSX -@import FlutterMacOS; +#import #else -@import Flutter; +#import #endif NS_ASSUME_NONNULL_BEGIN diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoEventListener.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoEventListener.h index a267adbb902b..8b992d52c0f5 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoEventListener.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoEventListener.h @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import Foundation; +#import /// Handles event/status callbacks from FVPVideoPlayer. /// diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer.h index 02954d7a3680..8fabbe22f8ef 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer.h @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import AVFoundation; +#import #import "./messages.g.h" #import "FVPAVFactory.h" @@ -10,9 +10,9 @@ #import "FVPViewProvider.h" #if TARGET_OS_OSX -@import FlutterMacOS; +#import #else -@import Flutter; +#import #endif NS_ASSUME_NONNULL_BEGIN @@ -38,7 +38,7 @@ NS_ASSUME_NONNULL_BEGIN /// Initializes a new instance of FVPVideoPlayer with the given AVPlayerItem, AV factory, and view /// provider. -- (instancetype)initWithPlayerItem:(NSObject *)item +- (instancetype)initWithPlayerItem:(AVPlayerItem *)item avFactory:(id)avFactory viewProvider:(NSObject *)viewProvider; diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin.h index 9f15d53b0821..82b3d71893f3 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin.h @@ -3,9 +3,9 @@ // found in the LICENSE file. #if TARGET_OS_OSX -@import FlutterMacOS; +#import #else -@import Flutter; +#import #endif @interface FVPVideoPlayerPlugin : NSObject diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin_Test.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin_Test.h index 4da66be36023..54dcc90f6330 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin_Test.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin_Test.h @@ -2,25 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import "FVPVideoPlayerPlugin.h" - -#if TARGET_OS_OSX -@import FlutterMacOS; -#else -@import Flutter; -#endif - #import "FVPAVFactory.h" -#import "FVPAssetProvider.h" #import "FVPDisplayLink.h" #import "FVPVideoPlayer.h" -#import "FVPViewProvider.h" +#import "FVPVideoPlayerPlugin.h" #import "messages.g.h" // Protocol for an AVPlayer instance factory. Used for injecting display links in tests. @protocol FVPDisplayLinkFactory -- (NSObject *)displayLinkWithViewProvider:(NSObject *)viewProvider - callback:(void (^)(void))callback; +- (NSObject *)displayLinkWithRegistrar:(id)registrar + callback:(void (^)(void))callback; @end #pragma mark - @@ -32,9 +23,7 @@ - (instancetype)initWithAVFactory:(id)avFactory displayLinkFactory:(id)displayLinkFactory - binaryMessenger:(NSObject *)binaryMessenger - textureRegistry:(NSObject *)textureRegistry viewProvider:(NSObject *)viewProvider - assetProvider:(NSObject *)assetProvider; + registrar:(NSObject *)registrar; @end diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer_Internal.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer_Internal.h index 6f86b7d0e3ef..d249391f73a6 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer_Internal.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer_Internal.h @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import AVFoundation; - +#import #import "FVPAVFactory.h" #import "FVPVideoEventListener.h" #import "FVPVideoPlayer.h" @@ -13,8 +12,8 @@ NS_ASSUME_NONNULL_BEGIN /// Interface intended for use by subclasses, but not other callers. @interface FVPVideoPlayer () -/// The pixel buffer source associated with this video player. -@property(nonatomic, readonly) NSObject *pixelBufferSource; +/// The AVPlayerItemVideoOutput associated with this video player. +@property(nonatomic, readonly) AVPlayerItemVideoOutput *videoOutput; /// The view provider, to obtain view information from. @property(nonatomic, readonly, nullable) NSObject *viewProvider; /// The preferred transform for the video. It can be used to handle the rotation of the video. diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/messages.g.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/messages.g.h index 3b2dd3952245..01f584187b11 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/messages.g.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/messages.g.h @@ -1,10 +1,10 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.7), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon -@import Foundation; +#import @protocol FlutterBinaryMessenger; @protocol FlutterMessageCodec; diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/messages.g.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/messages.g.m index abb8efbad50d..c421576564cf 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/messages.g.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/messages.g.m @@ -1,15 +1,19 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.7), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "./include/video_player_avfoundation/messages.g.h" #if TARGET_OS_OSX -@import FlutterMacOS; +#import #else -@import Flutter; +#import +#endif + +#if !__has_feature(objc_arc) +#error File requires ARC to be enabled. #endif static NSArray *wrapResult(id result, FlutterError *error) { diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/FVPCoreVideoDisplayLink.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/FVPCoreVideoDisplayLink.m index 55c3a11996a5..3e56b9ac79f4 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/FVPCoreVideoDisplayLink.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/FVPCoreVideoDisplayLink.m @@ -17,8 +17,8 @@ @interface FVPCoreVideoDisplayLink () @property(nonatomic, assign) CVDisplayLinkRef displayLink; // A dispatch source to move display link callbacks to the main thread. @property(nonatomic, strong) dispatch_source_t displayLinkSource; -// The view provider, to get screen information. -@property(nonatomic, weak) NSObject *viewProvider; +// The plugin registrar, to get screen information. +@property(nonatomic, weak) NSObject *registrar; @end static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp *now, @@ -32,11 +32,11 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt @implementation FVPCoreVideoDisplayLink -- (instancetype)initWithViewProvider:(NSObject *)viewProvider - callback:(void (^)(void))callback { +- (instancetype)initWithRegistrar:(id)registrar + callback:(void (^)(void))callback { self = [super init]; if (self) { - _viewProvider = viewProvider; + _registrar = registrar; // Create and start the main-thread dispatch queue to drive frameUpdater. _displayLinkSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_DATA_ADD, 0, 0, dispatch_get_main_queue()); @@ -74,7 +74,7 @@ - (void)setRunning:(BOOL)running { // TODO(stuartmorgan): Move this to init + a screen change listener; this won't correctly // handle windows being dragged to another screen until the next pause/play cycle. That will // likely require new plugin registrar APIs. - NSScreen *screen = self.viewProvider.view.window.screen; + NSScreen *screen = self.registrar.view.window.screen; if (screen) { CGDirectDisplayID viewDisplayID = (CGDirectDisplayID)[screen.deviceDescription[@"NSScreenNumber"] unsignedIntegerValue]; diff --git a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj index f4ad957fd95d..e3a2c5df80c9 100644 --- a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,13 +3,14 @@ archiveVersion = 1; classes = { }; - objectVersion = 60; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; + 78CF8D742BC5CEA80051231B /* OCMock in Frameworks */ = {isa = PBXBuildFile; productRef = 78CF8D732BC5CEA80051231B /* OCMock */; }; 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; @@ -101,6 +102,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 78CF8D742BC5CEA80051231B /* OCMock in Frameworks */, D182ECB59C06DBC7E2D5D913 /* libPods-RunnerTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -266,6 +268,7 @@ ); name = RunnerTests; packageProductDependencies = ( + 78CF8D732BC5CEA80051231B /* OCMock */, ); productName = RunnerTests; productReference = F7151F3A26603ECA0028CB91 /* RunnerTests.xctest */; @@ -305,7 +308,8 @@ ); mainGroup = 97C146E51CF9000F007C117D; packageReferences = ( - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */, + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, + 78CF8D722BC5CEA80051231B /* XCRemoteSwiftPackageReference "ocmock" */, ); productRefGroup = 97C146EF1CF9000F007C117D /* Products */; projectDirPath = ""; @@ -770,17 +774,33 @@ /* End XCConfigurationList section */ /* Begin XCLocalSwiftPackageReference section */ - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = { + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { isa = XCLocalSwiftPackageReference; relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; }; /* End XCLocalSwiftPackageReference section */ +/* Begin XCRemoteSwiftPackageReference section */ + 78CF8D722BC5CEA80051231B /* XCRemoteSwiftPackageReference "ocmock" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/erikdoe/ocmock"; + requirement = { + kind = revision; + revision = ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + /* Begin XCSwiftPackageProductDependency section */ 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { isa = XCSwiftPackageProductDependency; productName = FlutterGeneratedPluginSwiftPackage; }; + 78CF8D732BC5CEA80051231B /* OCMock */ = { + isa = XCSwiftPackageProductDependency; + package = 78CF8D722BC5CEA80051231B /* XCRemoteSwiftPackageReference "ocmock" */; + productName = OCMock; + }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 97C146E61CF9000F007C117D /* Project object */; diff --git a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000000..69f8d7acc40b --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,13 @@ +{ + "pins" : [ + { + "identity" : "ocmock", + "kind" : "remoteSourceControl", + "location" : "https://github.com/erikdoe/ocmock", + "state" : { + "revision" : "ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a" + } + } + ], + "version" : 2 +} diff --git a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000000..69f8d7acc40b --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,13 @@ +{ + "pins" : [ + { + "identity" : "ocmock", + "kind" : "remoteSourceControl", + "location" : "https://github.com/erikdoe/ocmock", + "state" : { + "revision" : "ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a" + } + } + ], + "version" : 2 +} diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.pbxproj b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.pbxproj index 281015c2059a..41178cae1891 100644 --- a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 60; + objectVersion = 54; objects = { /* Begin PBXAggregateTarget section */ @@ -29,6 +29,7 @@ 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; + 78CF8D772BC5D0140051231B /* OCMock in Frameworks */ = {isa = PBXBuildFile; productRef = 78CF8D762BC5D0140051231B /* OCMock */; }; C000184E56E3386C22EF683A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC60543320154AF9A465D416 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ @@ -96,6 +97,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 78CF8D772BC5D0140051231B /* OCMock in Frameworks */, 18AD5E2A5B24DAFCF3749529 /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -228,6 +230,7 @@ ); name = RunnerTests; packageProductDependencies = ( + 78CF8D762BC5D0140051231B /* OCMock */, ); productName = RunnerTests; productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; @@ -299,7 +302,8 @@ ); mainGroup = 33CC10E42044A3C60003C045; packageReferences = ( - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */, + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, + 78CF8D752BC5D0140051231B /* XCRemoteSwiftPackageReference "ocmock" */, ); productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; projectDirPath = ""; @@ -378,14 +382,10 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; @@ -806,17 +806,33 @@ /* End XCConfigurationList section */ /* Begin XCLocalSwiftPackageReference section */ - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = { + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { isa = XCLocalSwiftPackageReference; relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; }; /* End XCLocalSwiftPackageReference section */ +/* Begin XCRemoteSwiftPackageReference section */ + 78CF8D752BC5D0140051231B /* XCRemoteSwiftPackageReference "ocmock" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/erikdoe/ocmock"; + requirement = { + kind = revision; + revision = ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + /* Begin XCSwiftPackageProductDependency section */ 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { isa = XCSwiftPackageProductDependency; productName = FlutterGeneratedPluginSwiftPackage; }; + 78CF8D762BC5D0140051231B /* OCMock */ = { + isa = XCSwiftPackageProductDependency; + package = 78CF8D752BC5D0140051231B /* XCRemoteSwiftPackageReference "ocmock" */; + productName = OCMock; + }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 33CC10E52044A3C60003C045 /* Project object */; diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000000..69f8d7acc40b --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,13 @@ +{ + "pins" : [ + { + "identity" : "ocmock", + "kind" : "remoteSourceControl", + "location" : "https://github.com/erikdoe/ocmock", + "state" : { + "revision" : "ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a" + } + } + ], + "version" : 2 +} diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000000..69f8d7acc40b --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,13 @@ +{ + "pins" : [ + { + "identity" : "ocmock", + "kind" : "remoteSourceControl", + "location" : "https://github.com/erikdoe/ocmock", + "state" : { + "revision" : "ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a" + } + } + ], + "version" : 2 +} diff --git a/packages/video_player/video_player_avfoundation/lib/src/messages.g.dart b/packages/video_player/video_player_avfoundation/lib/src/messages.g.dart index 24644d8f42d0..76b66c3ca4bf 100644 --- a/packages/video_player/video_player_avfoundation/lib/src/messages.g.dart +++ b/packages/video_player/video_player_avfoundation/lib/src/messages.g.dart @@ -1,9 +1,9 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.7), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon -// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; @@ -276,15 +276,17 @@ class AVFoundationVideoPlayerApi { final String pigeonVar_messageChannelSuffix; Future initialize() async { - final pigeonVar_channelName = + final String pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.initialize$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -299,17 +301,19 @@ class AVFoundationVideoPlayerApi { } Future createForPlatformView(CreationOptions params) async { - final pigeonVar_channelName = + final String pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.createForPlatformView$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [params], ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -331,17 +335,19 @@ class AVFoundationVideoPlayerApi { Future createForTextureView( CreationOptions creationOptions, ) async { - final pigeonVar_channelName = + final String pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.createForTextureView$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [creationOptions], ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -361,17 +367,19 @@ class AVFoundationVideoPlayerApi { } Future setMixWithOthers(bool mixWithOthers) async { - final pigeonVar_channelName = + final String pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setMixWithOthers$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [mixWithOthers], ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -386,17 +394,19 @@ class AVFoundationVideoPlayerApi { } Future getAssetUrl(String asset, String? package) async { - final pigeonVar_channelName = + final String pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.getAssetUrl$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [asset, package], ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -429,17 +439,19 @@ class VideoPlayerInstanceApi { final String pigeonVar_messageChannelSuffix; Future setLooping(bool looping) async { - final pigeonVar_channelName = + final String pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.setLooping$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [looping], ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -454,17 +466,19 @@ class VideoPlayerInstanceApi { } Future setVolume(double volume) async { - final pigeonVar_channelName = + final String pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.setVolume$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [volume], ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -479,17 +493,19 @@ class VideoPlayerInstanceApi { } Future setPlaybackSpeed(double speed) async { - final pigeonVar_channelName = + final String pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.setPlaybackSpeed$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [speed], ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -504,15 +520,17 @@ class VideoPlayerInstanceApi { } Future play() async { - final pigeonVar_channelName = + final String pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.play$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -527,15 +545,17 @@ class VideoPlayerInstanceApi { } Future getPosition() async { - final pigeonVar_channelName = + final String pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.getPosition$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -555,17 +575,19 @@ class VideoPlayerInstanceApi { } Future seekTo(int position) async { - final pigeonVar_channelName = + final String pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.seekTo$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [position], ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -580,15 +602,17 @@ class VideoPlayerInstanceApi { } Future pause() async { - final pigeonVar_channelName = + final String pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.pause$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -603,15 +627,17 @@ class VideoPlayerInstanceApi { } Future dispose() async { - final pigeonVar_channelName = + final String pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.dispose$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -626,15 +652,17 @@ class VideoPlayerInstanceApi { } Future> getAudioTracks() async { - final pigeonVar_channelName = + final String pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.getAudioTracks$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -655,17 +683,19 @@ class VideoPlayerInstanceApi { } Future selectAudioTrack(int trackIndex) async { - final pigeonVar_channelName = + final String pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.selectAudioTrack$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [trackIndex], ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/video_player/video_player_avfoundation/pubspec.yaml b/packages/video_player/video_player_avfoundation/pubspec.yaml index f08f42f54282..c932317b1f3f 100644 --- a/packages/video_player/video_player_avfoundation/pubspec.yaml +++ b/packages/video_player/video_player_avfoundation/pubspec.yaml @@ -2,7 +2,7 @@ name: video_player_avfoundation description: iOS and macOS implementation of the video_player plugin. repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_avfoundation issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 -version: 2.9.1 +version: 2.9.0 environment: sdk: ^3.10.0 @@ -31,7 +31,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^26.1.7 + pigeon: ^26.1.0 topics: - video From 72f43f3f19c7f06620ae25549fef61852ca6d53d Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 14:22:20 +0530 Subject: [PATCH 32/46] [google_maps_flutter] added onPoiTap changes to platform interface package only --- .../example/lib/place_poi.dart | 96 --- .../example/lib/place_poi.dart | 96 --- .../google_maps_flutter_ios/CHANGELOG.md | 4 + .../example/ios/Podfile | 2 - .../ios/Runner.xcodeproj/project.pbxproj | 14 + .../RunnerTests/ExtractIconFromDataTests.m | 98 +-- .../FGMClusterManagersControllerTests.m | 15 +- .../RunnerTests/FGMConversionsUtilsTests.m | 107 ++- .../FLTTileProviderControllerTests.m | 56 +- .../GoogleMapsGroundOverlayControllerTests.m | 12 +- .../GoogleMapsMarkerControllerTests.m | 36 +- .../GoogleMapsPolylineControllerTests.m | 1 - .../example/ios/RunnerTests/GoogleMapsTests.m | 96 ++- .../ios/RunnerTests/PartiallyMockedMapView.h | 11 +- .../ios/RunnerTests/PartiallyMockedMapView.m | 5 + .../FGMClusterManagersController.m | 12 +- .../FGMGroundOverlayController.m | 34 +- .../google_maps_flutter_ios/FGMImageUtils.m | 14 +- .../FLTGoogleMapTileOverlayController.m | 17 +- .../GoogleMapCircleController.m | 11 +- .../GoogleMapController.m | 232 +++++- .../GoogleMapMarkerController.m | 53 +- .../GoogleMapPolygonController.m | 13 +- .../GoogleMapPolylineController.m | 13 +- .../FGMClusterManagersController.h | 5 +- .../FGMConversionUtils.h | 1 - .../FGMGroundOverlayController.h | 9 +- .../FGMGroundOverlayController_Test.h | 4 +- .../google_maps_flutter_ios/FGMImageUtils.h | 5 +- .../FLTGoogleMapHeatmapController.h | 1 - .../FLTGoogleMapTileOverlayController.h | 16 +- .../GoogleMapCircleController.h | 5 +- .../GoogleMapController_Test.h | 7 +- .../GoogleMapMarkerController.h | 9 +- .../GoogleMapMarkerController_Test.h | 2 +- .../GoogleMapPolygonController.h | 5 +- .../GoogleMapPolylineController.h | 5 +- .../google_maps_flutter_ios/pubspec.yaml | 2 +- .../CHANGELOG.md | 1 + .../example/integration_test/poi_test.dart | 103 --- .../video_player_avfoundation/CHANGELOG.md | 4 + .../darwin/RunnerTests/VideoPlayerTests.m | 744 +++++++++++------- .../AVAssetTrackUtils.m | 2 +- .../video_player_avfoundation/FVPAVFactory.m | 155 +++- .../FVPCADisplayLink.m | 10 +- .../FVPEventBridge.m | 6 +- .../FVPTextureBasedVideoPlayer.m | 9 +- .../FVPVideoPlayer.m | 22 +- .../FVPVideoPlayerPlugin.m | 122 ++- .../FVPViewProvider.m | 2 + .../AVAssetTrackUtils.h | 4 +- .../video_player_avfoundation/FVPAVFactory.h | 98 ++- .../FVPDisplayLink.h | 16 +- .../FVPEventBridge.h | 6 +- .../FVPFrameUpdater.h | 4 +- .../FVPNativeVideoView.h | 6 +- .../FVPNativeVideoViewFactory.h | 6 +- .../FVPTextureBasedVideoPlayer.h | 5 +- .../FVPTextureBasedVideoPlayer_Test.h | 4 +- .../FVPVideoEventListener.h | 2 +- .../FVPVideoPlayer.h | 8 +- .../FVPVideoPlayerPlugin.h | 4 +- .../FVPVideoPlayerPlugin_Test.h | 19 +- .../FVPVideoPlayer_Internal.h | 7 +- .../video_player_avfoundation/messages.g.h | 4 +- .../video_player_avfoundation/messages.g.m | 10 +- .../FVPCoreVideoDisplayLink.m | 12 +- .../ios/Runner.xcodeproj/project.pbxproj | 26 +- .../macos/Runner.xcodeproj/project.pbxproj | 30 +- .../lib/src/messages.g.dart | 244 +++--- .../video_player_avfoundation/pubspec.yaml | 4 +- 71 files changed, 1559 insertions(+), 1264 deletions(-) delete mode 100644 packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart delete mode 100644 packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart delete mode 100644 packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart deleted file mode 100644 index fda0bab244cc..000000000000 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2013 The Flutter Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:flutter/material.dart'; -import 'package:google_maps_flutter/google_maps_flutter.dart'; - -import 'page.dart'; - -/// Page for demonstrating Point of Interest (POI) tapping. -class PlacePoiPage extends GoogleMapExampleAppPage { - /// Default constructor. - const PlacePoiPage({super.key}) - : super(const Icon(Icons.business), 'Place POI'); - - @override - Widget build(BuildContext context) { - return const PlacePoiBody(); - } -} - -/// Body of the POI page. -class PlacePoiBody extends StatefulWidget { - /// Default constructor. - const PlacePoiBody({super.key}); - - @override - State createState() => PlacePoiBodyState(); -} - -/// State for [PlacePoiBody]. -class PlacePoiBodyState extends State { - /// The controller for the map. - /// - /// This is public to match the example pattern, but marked with a doc comment. - GoogleMapController? controller; - PointOfInterest? _lastPoi; - - final CameraPosition _kKolkata = const CameraPosition( - target: LatLng(22.54222641620606, 88.34560669761545), - zoom: 16.0, - ); - - // ignore: use_setters_to_change_properties - void _onMapCreated(GoogleMapController controller) { - this.controller = controller; - } - - void _onPoiTap(PointOfInterest poi) { - setState(() { - _lastPoi = poi; - }); - - controller?.animateCamera(CameraUpdate.newLatLng(poi.position)); - } - - @override - Widget build(BuildContext context) { - return Column( - children: [ - Expanded( - child: GoogleMap( - onMapCreated: _onMapCreated, - initialCameraPosition: _kKolkata, - onPoiTap: _onPoiTap, - myLocationButtonEnabled: false, - ), - ), - Container( - color: Colors.white, - width: double.infinity, - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - const Text( - 'Last Tapped POI:', - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16), - ), - const SizedBox(height: 8), - if (_lastPoi != null) ...[ - Text('Name: ${_lastPoi!.name ?? "Unknown"}'), - Text('Place ID: ${_lastPoi!.placeId}'), - Text( - 'Lat/Lng: ${_lastPoi!.position.latitude.toStringAsFixed(5)}, ${_lastPoi!.position.longitude.toStringAsFixed(5)}', - ), - ] else - const Text('Tap on a business or landmark icon...'), - ], - ), - ), - ], - ); - } -} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart deleted file mode 100644 index 4d1f8cf553cf..000000000000 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2013 The Flutter Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:flutter/material.dart'; -import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; - -// ignore: prefer_relative_imports -import 'example_google_map.dart'; -import 'page.dart'; - -/// Page for demonstrating Point of Interest (POI) tapping. -class PlacePoiPage extends GoogleMapExampleAppPage { - /// Default constructor. - const PlacePoiPage({super.key}) - : super(const Icon(Icons.business), 'Place POI'); - - @override - Widget build(BuildContext context) { - return const PlacePoiBody(); - } -} - -/// Body of the POI page. -class PlacePoiBody extends StatefulWidget { - /// Default constructor. - const PlacePoiBody({super.key}); - - @override - State createState() => PlacePoiBodyState(); -} - -/// State for [PlacePoiBody]. -class PlacePoiBodyState extends State { - /// The controller for the map. - ExampleGoogleMapController? controller; - PointOfInterest? _lastPoi; - - final CameraPosition _kKolkata = const CameraPosition( - target: LatLng(22.54222641620606, 88.34560669761545), - zoom: 16.0, - ); - - // ignore: use_setters_to_change_properties - void _onMapCreated(ExampleGoogleMapController controller) { - this.controller = controller; - } - - void _onPoiTap(PointOfInterest poi) { - setState(() { - _lastPoi = poi; - }); - - controller?.animateCamera(CameraUpdate.newLatLng(poi.position)); - } - - @override - Widget build(BuildContext context) { - return Column( - children: [ - Expanded( - child: ExampleGoogleMap( - onMapCreated: _onMapCreated, - initialCameraPosition: _kKolkata, - onPoiTap: _onPoiTap, - myLocationButtonEnabled: false, - ), - ), - Container( - color: Colors.white, - width: double.infinity, - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - const Text( - 'Last Tapped POI:', - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16), - ), - const SizedBox(height: 8), - if (_lastPoi != null) ...[ - Text('Name: ${_lastPoi!.name ?? "Unknown"}'), - Text('Place ID: ${_lastPoi!.placeId}'), - Text( - 'Lat/Lng: ${_lastPoi!.position.latitude.toStringAsFixed(5)}, ${_lastPoi!.position.longitude.toStringAsFixed(5)}', - ), - ] else - const Text('Tap on a business or landmark icon...'), - ], - ), - ), - ], - ); - } -} diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md index 5e577772cba2..3338803175ed 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.17.1 + +* Refactors code for improved testability. + ## 2.17.0 * Restructures code to prepare for SwiftPM support. diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Podfile b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Podfile index 391330adc7d6..c2c1dc5432d3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Podfile +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Podfile @@ -33,8 +33,6 @@ target 'Runner' do flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do inherit! :search_paths - - pod 'OCMock', '~> 3.9.1' end end diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner.xcodeproj/project.pbxproj b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner.xcodeproj/project.pbxproj index 0ed22957bea8..0caf990b9847 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner.xcodeproj/project.pbxproj @@ -12,10 +12,12 @@ 2A6906C72D263DF4001F8426 /* GoogleMapsGroundOverlayControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A6906C62D263DE7001F8426 /* GoogleMapsGroundOverlayControllerTests.m */; }; 2BDE99378062AE3E60B40021 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3ACE0AFE8D82CD5962486AFD /* Pods_RunnerTests.framework */; }; 330909FF2D99B7A60077A751 /* GoogleMapsMarkerControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 330909FE2D99B79B0077A751 /* GoogleMapsMarkerControllerTests.m */; }; + 3378E6352F23F9300045E7DA /* TestMapEventHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 3378E6342F23F92E0045E7DA /* TestMapEventHandler.m */; }; 339355BA2EB3E50300EBF864 /* GoogleMapsCircleControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 339355B92EB3E4F900EBF864 /* GoogleMapsCircleControllerTests.m */; }; 339355BD2EB3E56300EBF864 /* GoogleMapsTileOverlayControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 339355BC2EB3E55600EBF864 /* GoogleMapsTileOverlayControllerTests.m */; }; 339355BF2EB535A600EBF864 /* FLTGoogleMapHeatmapControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 339355BE2EB5359B00EBF864 /* FLTGoogleMapHeatmapControllerTests.m */; }; 339DF1F02F1FE49800748863 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 339DF1EF2F1FE49300748863 /* AppDelegate.swift */; }; + 33BF9C6E2F2182DF0005FA15 /* TestAssetProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 33BF9C6D2F2182DB0005FA15 /* TestAssetProvider.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 478116522BEF8F47002F593E /* GoogleMapsPolylineControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 478116512BEF8F47002F593E /* GoogleMapsPolylineControllerTests.m */; }; 528F16832C62941000148160 /* FGMClusterManagersControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 528F16822C62941000148160 /* FGMClusterManagersControllerTests.m */; }; @@ -68,12 +70,16 @@ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 2A6906C62D263DE7001F8426 /* GoogleMapsGroundOverlayControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsGroundOverlayControllerTests.m; sourceTree = ""; }; 330909FE2D99B79B0077A751 /* GoogleMapsMarkerControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsMarkerControllerTests.m; sourceTree = ""; }; + 3378E6332F23F9220045E7DA /* TestMapEventHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestMapEventHandler.h; sourceTree = ""; }; + 3378E6342F23F92E0045E7DA /* TestMapEventHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestMapEventHandler.m; sourceTree = ""; }; 339355B82EB3E4D500EBF864 /* GoogleMapsPolygonControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsPolygonControllerTests.m; sourceTree = ""; }; 339355B92EB3E4F900EBF864 /* GoogleMapsCircleControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsCircleControllerTests.m; sourceTree = ""; }; 339355BC2EB3E55600EBF864 /* GoogleMapsTileOverlayControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsTileOverlayControllerTests.m; sourceTree = ""; }; 339355BE2EB5359B00EBF864 /* FLTGoogleMapHeatmapControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FLTGoogleMapHeatmapControllerTests.m; sourceTree = ""; }; 339DF1EF2F1FE49300748863 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 339DF1F12F1FE4AD00748863 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 33BF9C6C2F2182CB0005FA15 /* TestAssetProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestAssetProvider.h; sourceTree = ""; }; + 33BF9C6D2F2182DB0005FA15 /* TestAssetProvider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestAssetProvider.m; sourceTree = ""; }; 3ACE0AFE8D82CD5962486AFD /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 478116512BEF8F47002F593E /* GoogleMapsPolylineControllerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsPolylineControllerTests.m; sourceTree = ""; }; @@ -82,6 +88,7 @@ 61A9A8623F5CA9BBC813DC6B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6851F3552835BC180032B7C8 /* FGMConversionsUtilsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FGMConversionsUtilsTests.m; sourceTree = ""; }; 733AFAB37683A9DA7512F09C /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 784666492D4C4C64000A1A5F /* FlutterFramework */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterFramework; path = Flutter/ephemeral/Packages/.packages/FlutterFramework; sourceTree = ""; }; 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; @@ -145,6 +152,7 @@ 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( + 784666492D4C4C64000A1A5F /* FlutterFramework */, 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, @@ -221,6 +229,10 @@ 339355BC2EB3E55600EBF864 /* GoogleMapsTileOverlayControllerTests.m */, 982F2A6A27BADE17003C81F4 /* PartiallyMockedMapView.h */, 982F2A6B27BADE17003C81F4 /* PartiallyMockedMapView.m */, + 33BF9C6C2F2182CB0005FA15 /* TestAssetProvider.h */, + 33BF9C6D2F2182DB0005FA15 /* TestAssetProvider.m */, + 3378E6332F23F9220045E7DA /* TestMapEventHandler.h */, + 3378E6342F23F92E0045E7DA /* TestMapEventHandler.m */, F7151F14265D7ED70028CB91 /* Info.plist */, ); path = RunnerTests; @@ -509,8 +521,10 @@ 339355BF2EB535A600EBF864 /* FLTGoogleMapHeatmapControllerTests.m in Sources */, 339355BD2EB3E56300EBF864 /* GoogleMapsTileOverlayControllerTests.m in Sources */, F7151F13265D7ED70028CB91 /* GoogleMapsTests.m in Sources */, + 33BF9C6E2F2182DF0005FA15 /* TestAssetProvider.m in Sources */, 6851F3562835BC180032B7C8 /* FGMConversionsUtilsTests.m in Sources */, 982F2A6C27BADE17003C81F4 /* PartiallyMockedMapView.m in Sources */, + 3378E6352F23F9300045E7DA /* TestMapEventHandler.m in Sources */, 330909FF2D99B7A60077A751 /* GoogleMapsMarkerControllerTests.m in Sources */, 478116522BEF8F47002F593E /* GoogleMapsPolylineControllerTests.m in Sources */, 2A6906C72D263DF4001F8426 /* GoogleMapsGroundOverlayControllerTests.m in Sources */, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/ExtractIconFromDataTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/ExtractIconFromDataTests.m index 4d7da98cac59..4fc1e9eef7d5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/ExtractIconFromDataTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/ExtractIconFromDataTests.m @@ -5,8 +5,7 @@ @import google_maps_flutter_ios; @import XCTest; -#import -#import +#import "TestAssetProvider.h" @interface ExtractIconFromDataTests : XCTestCase - (UIImage *)createOnePixelImage; @@ -15,15 +14,14 @@ - (UIImage *)createOnePixelImage; @implementation ExtractIconFromDataTests - (void)testExtractIconFromDataAssetAuto { - NSObject *mockRegistrar = - OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); - id mockImageClass = OCMClassMock([UIImage class]); UIImage *testImage = [self createOnePixelImage]; - OCMStub([mockRegistrar lookupKeyForAsset:@"fakeImageNameKey"]).andReturn(@"fakeAssetKey"); - OCMStub(ClassMethod([mockImageClass imageNamed:@"fakeAssetKey"])).andReturn(testImage); + NSString *assetName = @"fakeImageName"; + TestAssetProvider *assetProvider = [[TestAssetProvider alloc] initWithImage:testImage + forAssetName:assetName + package:nil]; FGMPlatformBitmapAssetMap *bitmap = - [FGMPlatformBitmapAssetMap makeWithAssetName:@"fakeImageNameKey" + [FGMPlatformBitmapAssetMap makeWithAssetName:assetName bitmapScaling:FGMPlatformMapBitmapScalingAuto imagePixelRatio:1 width:nil @@ -32,7 +30,7 @@ - (void)testExtractIconFromDataAssetAuto { CGFloat screenScale = 3.0; UIImage *resultImage = - FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); + FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], assetProvider, screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(resultImage.scale, 1.0); @@ -41,16 +39,15 @@ - (void)testExtractIconFromDataAssetAuto { } - (void)testExtractIconFromDataAssetAutoWithScale { - NSObject *mockRegistrar = - OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); - id mockImageClass = OCMClassMock([UIImage class]); UIImage *testImage = [self createOnePixelImage]; - OCMStub([mockRegistrar lookupKeyForAsset:@"fakeImageNameKey"]).andReturn(@"fakeAssetKey"); - OCMStub(ClassMethod([mockImageClass imageNamed:@"fakeAssetKey"])).andReturn(testImage); + NSString *assetName = @"fakeImageName"; + TestAssetProvider *assetProvider = [[TestAssetProvider alloc] initWithImage:testImage + forAssetName:assetName + package:nil]; FGMPlatformBitmapAssetMap *bitmap = - [FGMPlatformBitmapAssetMap makeWithAssetName:@"fakeImageNameKey" + [FGMPlatformBitmapAssetMap makeWithAssetName:assetName bitmapScaling:FGMPlatformMapBitmapScalingAuto imagePixelRatio:10 width:nil @@ -59,7 +56,7 @@ - (void)testExtractIconFromDataAssetAutoWithScale { CGFloat screenScale = 3.0; UIImage *resultImage = - FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); + FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], assetProvider, screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(resultImage.scale, 10); @@ -68,18 +65,17 @@ - (void)testExtractIconFromDataAssetAutoWithScale { } - (void)testExtractIconFromDataAssetAutoAndSizeWithSameAspectRatio { - NSObject *mockRegistrar = - OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); - id mockImageClass = OCMClassMock([UIImage class]); UIImage *testImage = [self createOnePixelImage]; XCTAssertEqual(testImage.scale, 1.0); - OCMStub([mockRegistrar lookupKeyForAsset:@"fakeImageNameKey"]).andReturn(@"fakeAssetKey"); - OCMStub(ClassMethod([mockImageClass imageNamed:@"fakeAssetKey"])).andReturn(testImage); + NSString *assetName = @"fakeImageName"; + TestAssetProvider *assetProvider = [[TestAssetProvider alloc] initWithImage:testImage + forAssetName:assetName + package:nil]; const CGFloat width = 15.0; FGMPlatformBitmapAssetMap *bitmap = - [FGMPlatformBitmapAssetMap makeWithAssetName:@"fakeImageNameKey" + [FGMPlatformBitmapAssetMap makeWithAssetName:assetName bitmapScaling:FGMPlatformMapBitmapScalingAuto imagePixelRatio:1 width:@(width) @@ -88,7 +84,7 @@ - (void)testExtractIconFromDataAssetAutoAndSizeWithSameAspectRatio { CGFloat screenScale = 3.0; UIImage *resultImage = - FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); + FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], assetProvider, screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(testImage.scale, 1.0); @@ -102,18 +98,17 @@ - (void)testExtractIconFromDataAssetAutoAndSizeWithSameAspectRatio { } - (void)testExtractIconFromDataAssetAutoAndSizeWithDifferentAspectRatio { - NSObject *mockRegistrar = - OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); - id mockImageClass = OCMClassMock([UIImage class]); UIImage *testImage = [self createOnePixelImage]; - OCMStub([mockRegistrar lookupKeyForAsset:@"fakeImageNameKey"]).andReturn(@"fakeAssetKey"); - OCMStub(ClassMethod([mockImageClass imageNamed:@"fakeAssetKey"])).andReturn(testImage); + NSString *assetName = @"fakeImageName"; + TestAssetProvider *assetProvider = [[TestAssetProvider alloc] initWithImage:testImage + forAssetName:assetName + package:nil]; const CGFloat width = 15.0; const CGFloat height = 45.0; FGMPlatformBitmapAssetMap *bitmap = - [FGMPlatformBitmapAssetMap makeWithAssetName:@"fakeImageNameKey" + [FGMPlatformBitmapAssetMap makeWithAssetName:assetName bitmapScaling:FGMPlatformMapBitmapScalingAuto imagePixelRatio:1 width:@(width) @@ -122,7 +117,7 @@ - (void)testExtractIconFromDataAssetAutoAndSizeWithDifferentAspectRatio { CGFloat screenScale = 3.0; UIImage *resultImage = - FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); + FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], assetProvider, screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(resultImage.scale, screenScale); XCTAssertEqual(resultImage.size.width, width); @@ -130,16 +125,15 @@ - (void)testExtractIconFromDataAssetAutoAndSizeWithDifferentAspectRatio { } - (void)testExtractIconFromDataAssetNoScaling { - NSObject *mockRegistrar = - OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); - id mockImageClass = OCMClassMock([UIImage class]); UIImage *testImage = [self createOnePixelImage]; - OCMStub([mockRegistrar lookupKeyForAsset:@"fakeImageNameKey"]).andReturn(@"fakeAssetKey"); - OCMStub(ClassMethod([mockImageClass imageNamed:@"fakeAssetKey"])).andReturn(testImage); + NSString *assetName = @"fakeImageName"; + TestAssetProvider *assetProvider = [[TestAssetProvider alloc] initWithImage:testImage + forAssetName:assetName + package:nil]; FGMPlatformBitmapAssetMap *bitmap = - [FGMPlatformBitmapAssetMap makeWithAssetName:@"fakeImageNameKey" + [FGMPlatformBitmapAssetMap makeWithAssetName:assetName bitmapScaling:FGMPlatformMapBitmapScalingNone imagePixelRatio:1 width:nil @@ -148,7 +142,7 @@ - (void)testExtractIconFromDataAssetNoScaling { CGFloat screenScale = 3.0; UIImage *resultImage = - FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); + FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], assetProvider, screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(resultImage.scale, 1.0); @@ -157,8 +151,6 @@ - (void)testExtractIconFromDataAssetNoScaling { } - (void)testExtractIconFromDataBytesAuto { - NSObject *mockRegistrar = - OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); UIImage *testImage = [self createOnePixelImage]; NSData *pngData = UIImagePNGRepresentation(testImage); XCTAssertNotNil(pngData); @@ -173,8 +165,8 @@ - (void)testExtractIconFromDataBytesAuto { CGFloat screenScale = 3.0; - UIImage *resultImage = - FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); + UIImage *resultImage = FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], + [[TestAssetProvider alloc] init], screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(resultImage.scale, 1.0); @@ -183,8 +175,6 @@ - (void)testExtractIconFromDataBytesAuto { } - (void)testExtractIconFromDataBytesAutoWithScaling { - NSObject *mockRegistrar = - OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); UIImage *testImage = [self createOnePixelImage]; NSData *pngData = UIImagePNGRepresentation(testImage); XCTAssertNotNil(pngData); @@ -199,8 +189,8 @@ - (void)testExtractIconFromDataBytesAutoWithScaling { CGFloat screenScale = 3.0; - UIImage *resultImage = - FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); + UIImage *resultImage = FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], + [[TestAssetProvider alloc] init], screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(resultImage.scale, 10); XCTAssertEqual(resultImage.size.width, 0.1); @@ -208,8 +198,6 @@ - (void)testExtractIconFromDataBytesAutoWithScaling { } - (void)testExtractIconFromDataBytesAutoAndSizeWithSameAspectRatio { - NSObject *mockRegistrar = - OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); UIImage *testImage = [self createOnePixelImage]; NSData *pngData = UIImagePNGRepresentation(testImage); XCTAssertNotNil(pngData); @@ -226,8 +214,8 @@ - (void)testExtractIconFromDataBytesAutoAndSizeWithSameAspectRatio { CGFloat screenScale = 3.0; - UIImage *resultImage = - FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); + UIImage *resultImage = FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], + [[TestAssetProvider alloc] init], screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(testImage.scale, 1.0); @@ -242,8 +230,6 @@ - (void)testExtractIconFromDataBytesAutoAndSizeWithSameAspectRatio { } - (void)testExtractIconFromDataBytesAutoAndSizeWithDifferentAspectRatio { - NSObject *mockRegistrar = - OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); UIImage *testImage = [self createOnePixelImage]; NSData *pngData = UIImagePNGRepresentation(testImage); XCTAssertNotNil(pngData); @@ -260,8 +246,8 @@ - (void)testExtractIconFromDataBytesAutoAndSizeWithDifferentAspectRatio { CGFloat screenScale = 3.0; - UIImage *resultImage = - FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); + UIImage *resultImage = FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], + [[TestAssetProvider alloc] init], screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(resultImage.scale, screenScale); XCTAssertEqual(resultImage.size.width, width); @@ -269,8 +255,6 @@ - (void)testExtractIconFromDataBytesAutoAndSizeWithDifferentAspectRatio { } - (void)testExtractIconFromDataBytesNoScaling { - NSObject *mockRegistrar = - OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); UIImage *testImage = [self createOnePixelImage]; NSData *pngData = UIImagePNGRepresentation(testImage); XCTAssertNotNil(pngData); @@ -285,8 +269,8 @@ - (void)testExtractIconFromDataBytesNoScaling { CGFloat screenScale = 3.0; - UIImage *resultImage = - FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], mockRegistrar, screenScale); + UIImage *resultImage = FGMIconFromBitmap([FGMPlatformBitmap makeWithBitmap:bitmap], + [[TestAssetProvider alloc] init], screenScale); XCTAssertNotNil(resultImage); XCTAssertEqual(resultImage.scale, 1.0); XCTAssertEqual(resultImage.size.width, 1.0); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FGMClusterManagersControllerTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FGMClusterManagersControllerTests.m index f9baaa10184b..049855b05e4d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FGMClusterManagersControllerTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FGMClusterManagersControllerTests.m @@ -3,12 +3,13 @@ // found in the LICENSE file. @import google_maps_flutter_ios; +@import Flutter; @import XCTest; @import GoogleMaps; -#import -#import #import "PartiallyMockedMapView.h" +#import "TestAssetProvider.h" +#import "TestMapEventHandler.h" @interface FGMClusterManagersControllerTests : XCTestCase @end @@ -16,7 +17,6 @@ @interface FGMClusterManagersControllerTests : XCTestCase @implementation FGMClusterManagersControllerTests - (void)testClustering { - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); CGRect frame = CGRectMake(0, 0, 100, 100); GMSMapViewOptions *mapViewOptions = [[GMSMapViewOptions alloc] init]; @@ -24,17 +24,16 @@ - (void)testClustering { mapViewOptions.camera = [[GMSCameraPosition alloc] initWithLatitude:0 longitude:0 zoom:0]; PartiallyMockedMapView *mapView = [[PartiallyMockedMapView alloc] initWithOptions:mapViewOptions]; - - id handler = OCMClassMock([FGMMapsCallbackApi class]); + TestMapEventHandler *eventHandler = [[TestMapEventHandler alloc] init]; FGMClusterManagersController *clusterManagersController = - [[FGMClusterManagersController alloc] initWithMapView:mapView callbackHandler:handler]; + [[FGMClusterManagersController alloc] initWithMapView:mapView eventDelegate:eventHandler]; FLTMarkersController *markersController = [[FLTMarkersController alloc] initWithMapView:mapView - callbackHandler:handler + eventDelegate:eventHandler clusterManagersController:clusterManagersController - registrar:registrar]; + assetProvider:[[TestAssetProvider alloc] init]]; // Add cluster managers. NSString *clusterManagerId = @"cm"; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FGMConversionsUtilsTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FGMConversionsUtilsTests.m index ea39943cf571..5277c81395f2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FGMConversionsUtilsTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FGMConversionsUtilsTests.m @@ -6,7 +6,6 @@ @import XCTest; @import GoogleMaps; -#import #import "PartiallyMockedMapView.h" @interface FGMConversionUtilsTests : XCTestCase @@ -193,7 +192,6 @@ - (void)testMapViewTypeFromPigeonType { } - (void)testCameraUpdateFromNewCameraPosition { - id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]); FGMPlatformCameraUpdateNewCameraPosition *newPositionUpdate = [FGMPlatformCameraUpdateNewCameraPosition makeWithCameraPosition:[FGMPlatformCameraPosition @@ -204,44 +202,24 @@ - (void)testCameraUpdateFromNewCameraPosition { zoom:3]]; FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:newPositionUpdate]); - [[classMockCameraUpdate expect] - setCamera:FGMGetCameraPositionForPigeonCameraPosition(newPositionUpdate.cameraPosition)]; - [classMockCameraUpdate stopMocking]; + // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath + // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that + // injecting a wrapper would not meaningfully improve test coverage, since the non-test + // implementation would be about as complex as the conversion function itself. } -// TODO(cyanglaz): Fix the test for cameraUpdateFromArray with the "NewLatlng" key. -// 2 approaches have been tried and neither worked for the tests. -// -// 1. Use OCMock to vefiry that [GMSCameraUpdate setTarget:] is triggered with the correct value. -// This class method conflicts with certain category method in OCMock, causing OCMock not able to -// disambigious them. -// -// 2. Directly verify the GMSCameraUpdate object returned by the method. -// The GMSCameraUpdate object returned from the method doesn't have any accessors to the "target" -// property. It can be used to update the "camera" property in GMSMapView. However, [GMSMapView -// moveCamera:] doesn't update the camera immediately. Thus the GMSCameraUpdate object cannot be -// verified. -// -// The code in below test uses the 2nd approach. -- (void)skip_testCameraUpdateFromNewLatLong { +- (void)testCameraUpdateFromNewLatLong { const CGFloat lat = 1; const CGFloat lng = 2; FGMPlatformCameraUpdateNewLatLng *platformUpdate = [FGMPlatformCameraUpdateNewLatLng makeWithLatLng:[FGMPlatformLatLng makeWithLatitude:lat longitude:lng]]; - GMSCameraUpdate *update = FGMGetCameraUpdateForPigeonCameraUpdate( + FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdate]); - - GMSMapViewOptions *options = [[GMSMapViewOptions alloc] init]; - options.frame = CGRectZero; - options.camera = [GMSCameraPosition cameraWithTarget:CLLocationCoordinate2DMake(5, 6) zoom:1]; - GMSMapView *mapView = [[GMSMapView alloc] initWithOptions:options]; - [mapView moveCamera:update]; - const CGFloat accuracy = 0.001; - XCTAssertEqualWithAccuracy(mapView.camera.target.latitude, lat, - accuracy); // mapView.camera.target.latitude is still 5. - XCTAssertEqualWithAccuracy(mapView.camera.target.longitude, lng, - accuracy); // mapView.camera.target.longitude is still 6. + // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath + // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that + // injecting a wrapper would not meaningfully improve test coverage, since the non-test + // implementation would be about as complex as the conversion function itself. } - (void)testCameraUpdateFromNewLatLngBounds { @@ -254,12 +232,12 @@ - (void)testCameraUpdateFromNewLatLngBounds { FGMPlatformCameraUpdateNewLatLngBounds *platformUpdate = [FGMPlatformCameraUpdateNewLatLngBounds makeWithBounds:FGMGetPigeonLatLngBoundsForCoordinateBounds(bounds) padding:padding]; - id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]); FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdate]); - - [[classMockCameraUpdate expect] fitBounds:bounds withPadding:padding]; - [classMockCameraUpdate stopMocking]; + // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath + // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that + // injecting a wrapper would not meaningfully improve test coverage, since the non-test + // implementation would be about as complex as the conversion function itself. } - (void)testCameraUpdateFromNewLatLngZoom { @@ -270,12 +248,12 @@ - (void)testCameraUpdateFromNewLatLngZoom { makeWithLatLng:[FGMPlatformLatLng makeWithLatitude:lat longitude:lng] zoom:zoom]; - id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]); FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdate]); - - [[classMockCameraUpdate expect] setTarget:CLLocationCoordinate2DMake(lat, lng) zoom:zoom]; - [classMockCameraUpdate stopMocking]; + // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath + // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that + // injecting a wrapper would not meaningfully improve test coverage, since the non-test + // implementation would be about as complex as the conversion function itself. } - (void)testCameraUpdateFromScrollBy { @@ -284,12 +262,12 @@ - (void)testCameraUpdateFromScrollBy { FGMPlatformCameraUpdateScrollBy *platformUpdate = [FGMPlatformCameraUpdateScrollBy makeWithDx:x dy:y]; - id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]); FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdate]); - - [[classMockCameraUpdate expect] scrollByX:x Y:y]; - [classMockCameraUpdate stopMocking]; + // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath + // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that + // injecting a wrapper would not meaningfully improve test coverage, since the non-test + // implementation would be about as complex as the conversion function itself. } - (void)testCameraUpdateFromZoomBy { @@ -297,12 +275,16 @@ - (void)testCameraUpdateFromZoomBy { FGMPlatformCameraUpdateZoomBy *platformUpdateNoPoint = [FGMPlatformCameraUpdateZoomBy makeWithAmount:zoom focus:nil]; - id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]); FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdateNoPoint]); + // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath + // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that + // injecting a wrapper would not meaningfully improve test coverage, since the non-test + // implementation would be about as complex as the conversion function itself. +} - [[classMockCameraUpdate expect] zoomBy:zoom]; - +- (void)testCameraUpdateFromZoomByWithFocus { + const CGFloat zoom = 1; const CGFloat x = 2; const CGFloat y = 3; FGMPlatformCameraUpdateZoomBy *platformUpdate = @@ -310,43 +292,44 @@ - (void)testCameraUpdateFromZoomBy { FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdate]); - - [[classMockCameraUpdate expect] zoomBy:zoom atPoint:CGPointMake(x, y)]; - [classMockCameraUpdate stopMocking]; + // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath + // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that + // injecting a wrapper would not meaningfully improve test coverage, since the non-test + // implementation would be about as complex as the conversion function itself. } - (void)testCameraUpdateFromZoomIn { FGMPlatformCameraUpdateZoom *platformUpdate = [FGMPlatformCameraUpdateZoom makeWithOut:NO]; - id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]); FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdate]); - - [[classMockCameraUpdate expect] zoomIn]; - [classMockCameraUpdate stopMocking]; + // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath + // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that + // injecting a wrapper would not meaningfully improve test coverage, since the non-test + // implementation would be about as complex as the conversion function itself. } - (void)testCameraUpdateFromZoomOut { FGMPlatformCameraUpdateZoom *platformUpdate = [FGMPlatformCameraUpdateZoom makeWithOut:YES]; - id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]); FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdate]); - - [[classMockCameraUpdate expect] zoomOut]; - [classMockCameraUpdate stopMocking]; + // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath + // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that + // injecting a wrapper would not meaningfully improve test coverage, since the non-test + // implementation would be about as complex as the conversion function itself. } - (void)testCameraUpdateFromZoomTo { const CGFloat zoom = 1; FGMPlatformCameraUpdateZoomTo *platformUpdate = [FGMPlatformCameraUpdateZoomTo makeWithZoom:zoom]; - id classMockCameraUpdate = OCMClassMock([GMSCameraUpdate class]); FGMGetCameraUpdateForPigeonCameraUpdate( [FGMPlatformCameraUpdate makeWithCameraUpdate:platformUpdate]); - - [[classMockCameraUpdate expect] zoomTo:zoom]; - [classMockCameraUpdate stopMocking]; + // GMSCameraUpdate is not inspectable, so this test just ensures that the codepath + // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that + // injecting a wrapper would not meaningfully improve test coverage, since the non-test + // implementation would be about as complex as the conversion function itself. } - (void)testStrokeStylesFromPatterns { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FLTTileProviderControllerTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FLTTileProviderControllerTests.m index 3c7f43b3c206..0040fce6b44b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FLTTileProviderControllerTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/FLTTileProviderControllerTests.m @@ -6,7 +6,44 @@ @import GoogleMaps; @import google_maps_flutter_ios; -#import +@interface StubTileReceiver : NSObject +@end + +@implementation StubTileReceiver +- (void)receiveTileWithX:(NSUInteger)x + y:(NSUInteger)y + zoom:(NSUInteger)zoom + image:(nullable UIImage *)image { + // No-op. +} +@end + +@interface TestTileProvider : NSObject +@property(nonatomic) XCTestExpectation *expectation; +@end + +// A tile provider that expects a single call to +// tileWithOverlayIdentifier:location:zoom:completion: on the main thread, +// and then fulfills the expectation. +@implementation TestTileProvider +- (instancetype)initWithExpectation:(XCTestExpectation *)expectation { + if (self = [super init]) { + _expectation = expectation; + } + return self; +} + +- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId + location:(FGMPlatformPoint *)location + zoom:(NSInteger)zoom + completion:(void (^)(FGMPlatformTile *_Nullable, + FlutterError *_Nullable))completion { + XCTAssertTrue([[NSThread currentThread] isMainThread]); + [self.expectation fulfill]; +} +@end + +#pragma mark - @interface FLTTileProviderControllerTests : XCTestCase @end @@ -14,22 +51,13 @@ @interface FLTTileProviderControllerTests : XCTestCase @implementation FLTTileProviderControllerTests - (void)testCallChannelOnPlatformThread { - id handler = OCMClassMock([FGMMapsCallbackApi class]); + XCTestExpectation *expectation = [self expectationWithDescription:@"invokeMethod"]; + TestTileProvider *tileProvider = [[TestTileProvider alloc] initWithExpectation:expectation]; FLTTileProviderController *controller = [[FLTTileProviderController alloc] initWithTileOverlayIdentifier:@"foo" - callbackHandler:handler]; + tileProvider:tileProvider]; XCTAssertNotNil(controller); - XCTestExpectation *expectation = [self expectationWithDescription:@"invokeMethod"]; - OCMStub([handler tileWithOverlayIdentifier:[OCMArg any] - location:[OCMArg any] - zoom:0 - completion:[OCMArg any]]) - .andDo(^(NSInvocation *invocation) { - XCTAssertTrue([[NSThread currentThread] isMainThread]); - [expectation fulfill]; - }); - id receiver = OCMProtocolMock(@protocol(GMSTileReceiver)); - [controller requestTileForX:0 y:0 zoom:0 receiver:receiver]; + [controller requestTileForX:0 y:0 zoom:0 receiver:[[StubTileReceiver alloc] init]]; [self waitForExpectations:@[ expectation ] timeout:10.0]; } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsGroundOverlayControllerTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsGroundOverlayControllerTests.m index 9169d6064956..14a607c8487f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsGroundOverlayControllerTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsGroundOverlayControllerTests.m @@ -6,8 +6,8 @@ @import XCTest; @import GoogleMaps; -#import #import "PartiallyMockedMapView.h" +#import "TestAssetProvider.h" /// A GMSGroundOverlay that ensures that property updates are made before the map is set. @interface PropertyOrderValidatingGroundOverlay : GMSGroundOverlay { @@ -73,8 +73,6 @@ - (void)testUpdatingGroundOverlayWithPosition { FGMPlatformBitmap *bitmap = [FGMPlatformBitmap makeWithBitmap:[FGMPlatformBitmapDefaultMarker makeWithHue:0]]; - NSObject *mockRegistrar = - OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); FGMPlatformGroundOverlay *platformGroundOverlay = [FGMPlatformGroundOverlay makeWithGroundOverlayId:@"id_1" @@ -90,7 +88,7 @@ - (void)testUpdatingGroundOverlayWithPosition { zoomLevel:@14.0]; [groundOverlayController updateFromPlatformGroundOverlay:platformGroundOverlay - registrar:mockRegistrar + assetProvider:[[TestAssetProvider alloc] init] screenScale:1.0]; XCTAssertNotNil(groundOverlayController.groundOverlay.icon); @@ -129,8 +127,6 @@ - (void)testUpdatingGroundOverlayWithBounds { FGMPlatformBitmap *bitmap = [FGMPlatformBitmap makeWithBitmap:[FGMPlatformBitmapDefaultMarker makeWithHue:0]]; - NSObject *mockRegistrar = - OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); FGMPlatformGroundOverlay *platformGroundOverlay = [FGMPlatformGroundOverlay makeWithGroundOverlayId:@"id_1" @@ -146,7 +142,7 @@ - (void)testUpdatingGroundOverlayWithBounds { zoomLevel:nil]; [groundOverlayController updateFromPlatformGroundOverlay:platformGroundOverlay - registrar:mockRegistrar + assetProvider:[[TestAssetProvider alloc] init] screenScale:1.0]; XCTAssertNotNil(groundOverlayController.groundOverlay.icon); @@ -209,7 +205,7 @@ - (void)testUpdateGroundOverlaySetsVisibilityLast { clickable:YES zoomLevel:nil] withMapView:[GoogleMapsGroundOverlayControllerTests mapView] - registrar:nil + assetProvider:[[TestAssetProvider alloc] init] screenScale:1.0 usingBounds:YES]; XCTAssertTrue(groundOverlay.hasSetMap); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsMarkerControllerTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsMarkerControllerTests.m index bac3fb2cc84e..a34b11ae3cc0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsMarkerControllerTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsMarkerControllerTests.m @@ -6,9 +6,9 @@ @import XCTest; @import GoogleMaps; -#import - #import "PartiallyMockedMapView.h" +#import "TestAssetProvider.h" +#import "TestMapEventHandler.h" /// A GMSMarker that ensures that property updates are made before the map is set. @interface PropertyOrderValidatingMarker : GMSMarker { @@ -32,13 +32,13 @@ + (GMSMapView *)mapView { /// Returns a FLTMarkersController instance instantiated with the given map view. /// /// The mapView should outlive the controller, as the controller keeps a weak reference to it. -- (FLTMarkersController *)markersControllerWithMapView:(GMSMapView *)mapView { - NSObject *mockRegistrar = - OCMStrictProtocolMock(@protocol(FlutterPluginRegistrar)); +- (FLTMarkersController *)markersControllerWithMapView:(GMSMapView *)mapView + eventDelegate: + (NSObject *)eventDelegate { return [[FLTMarkersController alloc] initWithMapView:mapView - callbackHandler:[[FGMMapsCallbackApi alloc] init] + eventDelegate:eventDelegate clusterManagersController:nil - registrar:mockRegistrar]; + assetProvider:[[TestAssetProvider alloc] init]]; } - (FGMPlatformBitmap *)placeholderBitmap { @@ -47,7 +47,9 @@ - (FGMPlatformBitmap *)placeholderBitmap { - (void)testSetsMarkerNumericProperties { GMSMapView *mapView = [GoogleMapsMarkerControllerTests mapView]; - FLTMarkersController *controller = [self markersControllerWithMapView:mapView]; + TestMapEventHandler *eventHandler = [[TestMapEventHandler alloc] init]; + FLTMarkersController *controller = [self markersControllerWithMapView:mapView + eventDelegate:eventHandler]; NSString *markerIdentifier = @"marker"; double anchorX = 3.14; @@ -94,7 +96,9 @@ - (void)testSetsMarkerNumericProperties { // another property. - (void)testSetsDraggable { GMSMapView *mapView = [GoogleMapsMarkerControllerTests mapView]; - FLTMarkersController *controller = [self markersControllerWithMapView:mapView]; + TestMapEventHandler *eventHandler = [[TestMapEventHandler alloc] init]; + FLTMarkersController *controller = [self markersControllerWithMapView:mapView + eventDelegate:eventHandler]; NSString *markerIdentifier = @"marker"; [controller addMarkers:@[ [FGMPlatformMarker @@ -126,7 +130,9 @@ - (void)testSetsDraggable { // another property. - (void)testSetsFlat { GMSMapView *mapView = [GoogleMapsMarkerControllerTests mapView]; - FLTMarkersController *controller = [self markersControllerWithMapView:mapView]; + TestMapEventHandler *eventHandler = [[TestMapEventHandler alloc] init]; + FLTMarkersController *controller = [self markersControllerWithMapView:mapView + eventDelegate:eventHandler]; NSString *markerIdentifier = @"marker"; [controller addMarkers:@[ [FGMPlatformMarker @@ -158,7 +164,9 @@ - (void)testSetsFlat { // another property. - (void)testSetsVisible { GMSMapView *mapView = [GoogleMapsMarkerControllerTests mapView]; - FLTMarkersController *controller = [self markersControllerWithMapView:mapView]; + TestMapEventHandler *eventHandler = [[TestMapEventHandler alloc] init]; + FLTMarkersController *controller = [self markersControllerWithMapView:mapView + eventDelegate:eventHandler]; NSString *markerIdentifier = @"marker"; [controller addMarkers:@[ [FGMPlatformMarker @@ -189,7 +197,9 @@ - (void)testSetsVisible { - (void)testSetsMarkerInfoWindowProperties { GMSMapView *mapView = [GoogleMapsMarkerControllerTests mapView]; - FLTMarkersController *controller = [self markersControllerWithMapView:mapView]; + TestMapEventHandler *eventHandler = [[TestMapEventHandler alloc] init]; + FLTMarkersController *controller = [self markersControllerWithMapView:mapView + eventDelegate:eventHandler]; NSString *markerIdentifier = @"marker"; NSString *title = @"info title"; @@ -252,7 +262,7 @@ - (void)testUpdateMarkerSetsVisibilityLast { markerId:@"marker" clusterManagerId:nil] withMapView:[GoogleMapsMarkerControllerTests mapView] - registrar:nil + assetProvider:[[TestAssetProvider alloc] init] screenScale:1 usingOpacityForVisibility:NO]; XCTAssertTrue(marker.hasSetMap); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsPolylineControllerTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsPolylineControllerTests.m index 19ca6e84a266..a018579c3e18 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsPolylineControllerTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsPolylineControllerTests.m @@ -6,7 +6,6 @@ @import XCTest; @import GoogleMaps; -#import #import "PartiallyMockedMapView.h" /// A GMSPolyline that ensures that property updates are made before the map is set. diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m index ecbef7b3924e..e51da47062f7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m @@ -6,9 +6,49 @@ @import XCTest; @import GoogleMaps; -#import -#import "FGMCATransactionWrapper.h" #import "PartiallyMockedMapView.h" +#import "TestAssetProvider.h" + +@interface MockCATransaction : NSObject +@property(nonatomic, assign) BOOL beginCalled; +@property(nonatomic, assign) BOOL commitCalled; +@property(nonatomic, assign) CFTimeInterval animationDuration; +@end + +@implementation MockCATransaction + +- (void)begin { + self.beginCalled = YES; +} + +- (void)commit { + self.commitCalled = YES; +} + +@end + +// No-op implementation of FlutterBinaryMessenger. +@interface StubBinaryMessenger : NSObject +@end + +@implementation StubBinaryMessenger +- (void)sendOnChannel:(NSString *)channel message:(NSData *)message { +} +- (void)sendOnChannel:(NSString *)channel + message:(NSData *)message + binaryReply:(FlutterBinaryReply)reply { +} +- (void)cleanUpConnection:(FlutterBinaryMessengerConnection)connection { +} +- (FlutterBinaryMessengerConnection)setMessageHandlerOnChannel:(nonnull NSString *)channel + binaryMessageHandler: + (FlutterBinaryMessageHandler _Nullable)handler { + return 0; +} + +@end + +#pragma mark - @interface FLTGoogleMapFactory (Test) @property(strong, nonatomic, readonly) id sharedMapServices; @@ -29,7 +69,6 @@ - (void)testPlugin { } - (void)testFrameObserver { - id registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); CGRect frame = CGRectMake(0, 0, 100, 100); GMSMapViewOptions *options = [[GMSMapViewOptions alloc] init]; options.frame = frame; @@ -39,7 +78,8 @@ - (void)testFrameObserver { [[FLTGoogleMapController alloc] initWithMapView:mapView viewIdentifier:0 creationParameters:[self emptyCreationParameters] - registrar:registrar]; + assetProvider:[[TestAssetProvider alloc] init] + binaryMessenger:[[StubBinaryMessenger alloc] init]]; for (NSInteger i = 0; i < 10; ++i) { [controller view]; @@ -51,7 +91,9 @@ - (void)testFrameObserver { } - (void)testMapsServiceSync { - id registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + // The API requires a registrar, but this test doesn't actually use it, so just pass in a + // dummy object rather than set up a full mock. + id registrar = [[NSObject alloc] init]; FLTGoogleMapFactory *factory1 = [[FLTGoogleMapFactory alloc] initWithRegistrar:registrar]; XCTAssertNotNil(factory1.sharedMapServices); FLTGoogleMapFactory *factory2 = [[FLTGoogleMapFactory alloc] initWithRegistrar:registrar]; @@ -83,8 +125,6 @@ - (void)testHandleResultTileDownsamplesWideGamutImages { } - (void)testAnimateCameraWithUpdate { - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); - CGRect frame = CGRectMake(0, 0, 100, 100); GMSMapViewOptions *mapViewOptions = [[GMSMapViewOptions alloc] init]; mapViewOptions.frame = frame; @@ -98,27 +138,23 @@ - (void)testAnimateCameraWithUpdate { [[FLTGoogleMapController alloc] initWithMapView:mapView viewIdentifier:0 creationParameters:[self emptyCreationParameters] - registrar:registrar]; + assetProvider:[[TestAssetProvider alloc] init] + binaryMessenger:[[StubBinaryMessenger alloc] init]]; - id mapViewMock = OCMPartialMock(mapView); - id mockTransactionWrapper = OCMProtocolMock(@protocol(FGMCATransactionProtocol)); + MockCATransaction *mockTransactionWrapper = [[MockCATransaction alloc] init]; controller.callHandler.transactionWrapper = mockTransactionWrapper; FGMPlatformCameraUpdateZoomTo *zoomTo = [FGMPlatformCameraUpdateZoomTo makeWithZoom:10.0]; FGMPlatformCameraUpdate *cameraUpdate = [FGMPlatformCameraUpdate makeWithCameraUpdate:zoomTo]; FlutterError *error = nil; - OCMReject([mockTransactionWrapper begin]); - OCMReject([mockTransactionWrapper commit]); - OCMExpect([mapViewMock animateWithCameraUpdate:[OCMArg any]]); [controller.callHandler animateCameraWithUpdate:cameraUpdate duration:nil error:&error]; - OCMVerifyAll(mapViewMock); - OCMVerifyAll(mockTransactionWrapper); + XCTAssertTrue(mapView.didAnimateCamera); + XCTAssertFalse(mockTransactionWrapper.beginCalled); + XCTAssertFalse(mockTransactionWrapper.commitCalled); } - (void)testAnimateCameraWithUpdateAndDuration { - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); - CGRect frame = CGRectMake(0, 0, 100, 100); GMSMapViewOptions *mapViewOptions = [[GMSMapViewOptions alloc] init]; mapViewOptions.frame = frame; @@ -132,10 +168,10 @@ - (void)testAnimateCameraWithUpdateAndDuration { [[FLTGoogleMapController alloc] initWithMapView:mapView viewIdentifier:0 creationParameters:[self emptyCreationParameters] - registrar:registrar]; + assetProvider:[[TestAssetProvider alloc] init] + binaryMessenger:[[StubBinaryMessenger alloc] init]]; - id mapViewMock = OCMPartialMock(mapView); - id mockTransactionWrapper = OCMProtocolMock(@protocol(FGMCATransactionProtocol)); + MockCATransaction *mockTransactionWrapper = [[MockCATransaction alloc] init]; controller.callHandler.transactionWrapper = mockTransactionWrapper; FGMPlatformCameraUpdateZoomTo *zoomTo = [FGMPlatformCameraUpdateZoomTo makeWithZoom:10.0]; @@ -143,21 +179,17 @@ - (void)testAnimateCameraWithUpdateAndDuration { FlutterError *error = nil; NSNumber *durationMilliseconds = @100; - OCMExpect([mockTransactionWrapper begin]); - OCMExpect( - [mockTransactionWrapper setAnimationDuration:[durationMilliseconds doubleValue] / 1000]); - OCMExpect([mockTransactionWrapper commit]); - OCMExpect([mapViewMock animateWithCameraUpdate:[OCMArg any]]); [controller.callHandler animateCameraWithUpdate:cameraUpdate duration:durationMilliseconds error:&error]; - OCMVerifyAll(mapViewMock); - OCMVerifyAll(mockTransactionWrapper); + XCTAssertTrue(mapView.didAnimateCamera); + XCTAssertTrue(mockTransactionWrapper.beginCalled); + XCTAssertTrue(mockTransactionWrapper.commitCalled); + XCTAssertEqual(mockTransactionWrapper.animationDuration, + [durationMilliseconds doubleValue] / 1000); } - (void)testInspectorAPICameraPosition { - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); - CGRect frame = CGRectMake(0, 0, 100, 100); GMSMapViewOptions *mapViewOptions = [[GMSMapViewOptions alloc] init]; mapViewOptions.frame = frame; @@ -170,14 +202,16 @@ - (void)testInspectorAPICameraPosition { PartiallyMockedMapView *mapView = [[PartiallyMockedMapView alloc] initWithOptions:mapViewOptions]; + NSObject *binaryMessenger = [[StubBinaryMessenger alloc] init]; FLTGoogleMapController *controller = [[FLTGoogleMapController alloc] initWithMapView:mapView viewIdentifier:0 creationParameters:[self emptyCreationParameters] - registrar:registrar]; + assetProvider:[[TestAssetProvider alloc] init] + binaryMessenger:binaryMessenger]; FGMMapInspector *inspector = [[FGMMapInspector alloc] initWithMapController:controller - messenger:registrar.messenger + messenger:binaryMessenger pigeonSuffix:@"0"]; FlutterError *error = nil; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/PartiallyMockedMapView.h b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/PartiallyMockedMapView.h index 9a04ae84ab24..7b4665cb6820 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/PartiallyMockedMapView.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/PartiallyMockedMapView.h @@ -4,14 +4,13 @@ @import GoogleMaps; -/** - * Defines a map view used for testing key-value observing. - */ +/// Defines a map view used for testing key-value observing. @interface PartiallyMockedMapView : GMSMapView -/** - * The number of times that the `frame` KVO has been added. - */ +/// The number of times that the `frame` KVO has been added. @property(nonatomic, assign, readonly) NSInteger frameObserverCount; +/// True if animateWithCameraUpdate: was called. +@property(nonatomic, assign) BOOL didAnimateCamera; + @end diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/PartiallyMockedMapView.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/PartiallyMockedMapView.m index 47d48d2e07fc..84b02710180b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/PartiallyMockedMapView.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/PartiallyMockedMapView.m @@ -31,4 +31,9 @@ - (void)removeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath { } } +- (void)animateWithCameraUpdate:(GMSCameraUpdate *)cameraUpdate { + [super animateWithCameraUpdate:cameraUpdate]; + self.didAnimateCamera = YES; +} + @end diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMClusterManagersController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMClusterManagersController.m index 04c3f04c9285..ee8ddc806f13 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMClusterManagersController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMClusterManagersController.m @@ -13,8 +13,8 @@ @interface FGMClusterManagersController () @property(strong, nonatomic) NSMutableDictionary *clusterManagerIdentifierToManagers; -/// The callback handler interface for calls to Flutter. -@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; +/// The delegate for handling interactions with clusters. +@property(weak, nonatomic) NSObject *eventDelegate; /// The current map instance on which the cluster managers are operating. @property(strong, nonatomic) GMSMapView *mapView; @@ -23,10 +23,10 @@ @interface FGMClusterManagersController () @implementation FGMClusterManagersController - (instancetype)initWithMapView:(GMSMapView *)mapView - callbackHandler:(FGMMapsCallbackApi *)callbackHandler { + eventDelegate:(NSObject *)eventDelegate { self = [super init]; if (self) { - _callbackHandler = callbackHandler; + _eventDelegate = eventDelegate; _mapView = mapView; _clusterManagerIdentifierToManagers = [[NSMutableDictionary alloc] init]; } @@ -106,9 +106,7 @@ - (void)didTapCluster:(GMUStaticCluster *)cluster { return; } FGMPlatformCluster *platFormCluster = FGMGetPigeonCluster(cluster, clusterManagerId); - [self.callbackHandler didTapCluster:platFormCluster - completion:^(FlutterError *_Nullable _){ - }]; + [self.eventDelegate didTapCluster:platFormCluster]; } #pragma mark - Private methods diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMGroundOverlayController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMGroundOverlayController.m index 624f43032c53..f1fe7281dc09 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMGroundOverlayController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMGroundOverlayController.m @@ -36,12 +36,12 @@ - (void)removeGroundOverlay { } - (void)updateFromPlatformGroundOverlay:(FGMPlatformGroundOverlay *)groundOverlay - registrar:(NSObject *)registrar + assetProvider:(NSObject *)assetProvider screenScale:(CGFloat)screenScale { [FGMGroundOverlayController updateGroundOverlay:self.groundOverlay fromPlatformGroundOverlay:groundOverlay withMapView:self.mapView - registrar:registrar + assetProvider:assetProvider screenScale:screenScale usingBounds:self.createdWithBounds]; } @@ -49,14 +49,14 @@ - (void)updateFromPlatformGroundOverlay:(FGMPlatformGroundOverlay *)groundOverla + (void)updateGroundOverlay:(GMSGroundOverlay *)groundOverlay fromPlatformGroundOverlay:(FGMPlatformGroundOverlay *)platformGroundOverlay withMapView:(GMSMapView *)mapView - registrar:(NSObject *)registrar + assetProvider:(NSObject *)assetProvider screenScale:(CGFloat)screenScale usingBounds:(BOOL)useBounds { groundOverlay.tappable = platformGroundOverlay.clickable; groundOverlay.zIndex = (int)platformGroundOverlay.zIndex; groundOverlay.anchor = CGPointMake(platformGroundOverlay.anchor.x, platformGroundOverlay.anchor.y); - UIImage *image = FGMIconFromBitmap(platformGroundOverlay.image, registrar, screenScale); + UIImage *image = FGMIconFromBitmap(platformGroundOverlay.image, assetProvider, screenScale); groundOverlay.icon = image; groundOverlay.bearing = platformGroundOverlay.bearing; groundOverlay.opacity = 1.0 - platformGroundOverlay.transparency; @@ -86,10 +86,10 @@ @interface FLTGroundOverlaysController () *groundOverlayControllerByIdentifier; /// A callback api for the map interactions. -@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; +@property(weak, nonatomic) NSObject *eventDelegate; -/// Flutter Plugin Registrar used to load images. -@property(weak, nonatomic) NSObject *registrar; +/// Asset provider used to load images. +@property(weak, nonatomic) NSObject *assetProvider; /// The map view used to generate the controllers. @property(weak, nonatomic) GMSMapView *mapView; @@ -99,14 +99,14 @@ @interface FLTGroundOverlaysController () @implementation FLTGroundOverlaysController - (instancetype)initWithMapView:(GMSMapView *)mapView - callbackHandler:(FGMMapsCallbackApi *)callbackHandler - registrar:(NSObject *)registrar { + eventDelegate:(NSObject *)eventDelegate + assetProvider:(NSObject *)assetProvider { self = [super init]; if (self) { - _callbackHandler = callbackHandler; + _eventDelegate = eventDelegate; _mapView = mapView; _groundOverlayControllerByIdentifier = [[NSMutableDictionary alloc] init]; - _registrar = registrar; + _assetProvider = assetProvider; } return self; } @@ -129,7 +129,7 @@ - (void)addGroundOverlays:(NSArray *)groundOverlaysT coordinate:CLLocationCoordinate2DMake( groundOverlay.bounds.southwest.latitude, groundOverlay.bounds.southwest.longitude)] - icon:FGMIconFromBitmap(groundOverlay.image, self.registrar, + icon:FGMIconFromBitmap(groundOverlay.image, self.assetProvider, [self getScreenScale])]; } else { NSAssert(groundOverlay.zoomLevel != nil, @@ -137,7 +137,7 @@ - (void)addGroundOverlays:(NSArray *)groundOverlaysT gmsOverlay = [GMSGroundOverlay groundOverlayWithPosition:CLLocationCoordinate2DMake(groundOverlay.position.latitude, groundOverlay.position.longitude) - icon:FGMIconFromBitmap(groundOverlay.image, self.registrar, + icon:FGMIconFromBitmap(groundOverlay.image, self.assetProvider, [self getScreenScale]) zoomLevel:[groundOverlay.zoomLevel doubleValue]]; } @@ -148,7 +148,7 @@ - (void)addGroundOverlays:(NSArray *)groundOverlaysT isCreatedWithBounds:isCreatedWithBounds]; controller.zoomLevel = groundOverlay.zoomLevel; [controller updateFromPlatformGroundOverlay:groundOverlay - registrar:self.registrar + assetProvider:self.assetProvider screenScale:[self getScreenScale]]; self.groundOverlayControllerByIdentifier[identifier] = controller; } @@ -159,7 +159,7 @@ - (void)changeGroundOverlays:(NSArray *)groundOverla NSString *identifier = groundOverlay.groundOverlayId; FGMGroundOverlayController *controller = self.groundOverlayControllerByIdentifier[identifier]; [controller updateFromPlatformGroundOverlay:groundOverlay - registrar:self.registrar + assetProvider:self.assetProvider screenScale:[self getScreenScale]]; } } @@ -180,9 +180,7 @@ - (void)didTapGroundOverlayWithIdentifier:(NSString *)identifier { if (!controller) { return; } - [self.callbackHandler didTapGroundOverlayWithIdentifier:identifier - completion:^(FlutterError *_Nullable _){ - }]; + [self.eventDelegate didTapGroundOverlayWithIdentifier:identifier]; } - (bool)hasGroundOverlaysWithIdentifier:(NSString *)identifier { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMImageUtils.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMImageUtils.m index 7bd5192c2377..8136bfd6f6e9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMImageUtils.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMImageUtils.m @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +@import Flutter; + #import "FGMImageUtils.h" @import Foundation; @@ -44,7 +46,7 @@ CGFloat screenScale); UIImage *FGMIconFromBitmap(FGMPlatformBitmap *platformBitmap, - NSObject *registrar, CGFloat screenScale) { + NSObject *assetProvider, CGFloat screenScale) { assert(screenScale > 0 && "Screen scale must be greater than 0"); // See comment in messages.dart for why this is so loosely typed. See also // https://github.com/flutter/flutter/issues/117819. @@ -62,16 +64,16 @@ // Refer to the flutter google_maps_flutter_platform_interface package for details. FGMPlatformBitmapAsset *bitmapAsset = bitmap; if (bitmapAsset.pkg) { - image = [UIImage imageNamed:[registrar lookupKeyForAsset:bitmapAsset.name - fromPackage:bitmapAsset.pkg]]; + image = [assetProvider imageNamed:[assetProvider lookupKeyForAsset:bitmapAsset.name + fromPackage:bitmapAsset.pkg]]; } else { - image = [UIImage imageNamed:[registrar lookupKeyForAsset:bitmapAsset.name]]; + image = [assetProvider imageNamed:[assetProvider lookupKeyForAsset:bitmapAsset.name]]; } } else if ([bitmap isKindOfClass:[FGMPlatformBitmapAssetImage class]]) { // Deprecated: This message handling for 'fromAssetImage' has been replaced by 'asset'. // Refer to the flutter google_maps_flutter_platform_interface package for details. FGMPlatformBitmapAssetImage *bitmapAssetImage = bitmap; - image = [UIImage imageNamed:[registrar lookupKeyForAsset:bitmapAssetImage.name]]; + image = [assetProvider imageNamed:[assetProvider lookupKeyForAsset:bitmapAssetImage.name]]; image = scaledImage(image, bitmapAssetImage.scale); } else if ([bitmap isKindOfClass:[FGMPlatformBitmapBytes class]]) { // Deprecated: This message handling for 'fromBytes' has been replaced by 'bytes'. @@ -88,7 +90,7 @@ } else if ([bitmap isKindOfClass:[FGMPlatformBitmapAssetMap class]]) { FGMPlatformBitmapAssetMap *bitmapAssetMap = bitmap; - image = [UIImage imageNamed:[registrar lookupKeyForAsset:bitmapAssetMap.assetName]]; + image = [assetProvider imageNamed:[assetProvider lookupKeyForAsset:bitmapAssetMap.assetName]]; if (bitmapAssetMap.bitmapScaling == FGMPlatformMapBitmapScalingAuto) { NSNumber *width = bitmapAssetMap.width; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.m index c4cce14ed247..4116c82e4115 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.m @@ -60,17 +60,17 @@ + (void)updateTileLayer:(GMSTileLayer *)tileLayer @interface FLTTileProviderController () -@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; +@property(weak, nonatomic) NSObject *tileProviderDelegate; @end @implementation FLTTileProviderController - (instancetype)initWithTileOverlayIdentifier:(NSString *)identifier - callbackHandler:(FGMMapsCallbackApi *)callbackHandler { + tileProvider:(NSObject *)tileProvider { self = [super init]; if (self) { - _callbackHandler = callbackHandler; + _tileProviderDelegate = tileProvider; _tileOverlayIdentifier = identifier; } return self; @@ -107,7 +107,7 @@ - (void)requestTileForX:(NSUInteger)x zoom:(NSUInteger)zoom receiver:(id)receiver { dispatch_async(dispatch_get_main_queue(), ^{ - [self.callbackHandler + [self.tileProviderDelegate tileWithOverlayIdentifier:self.tileOverlayIdentifier location:[FGMPlatformPoint makeWithX:x y:y] zoom:zoom @@ -133,7 +133,7 @@ @interface FLTTileOverlaysController () @property(strong, nonatomic) NSMutableDictionary *tileOverlayIdentifierToController; -@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; +@property(weak, nonatomic) NSObject *tileProviderDelegate; @property(weak, nonatomic) GMSMapView *mapView; @end @@ -141,12 +141,11 @@ @interface FLTTileOverlaysController () @implementation FLTTileOverlaysController - (instancetype)initWithMapView:(GMSMapView *)mapView - callbackHandler:(FGMMapsCallbackApi *)callbackHandler - registrar:(NSObject *)registrar { + tileProvider:(NSObject *)tileProvider { self = [super init]; if (self) { - _callbackHandler = callbackHandler; _mapView = mapView; + _tileProviderDelegate = tileProvider; _tileOverlayIdentifierToController = [[NSMutableDictionary alloc] init]; } return self; @@ -157,7 +156,7 @@ - (void)addTileOverlays:(NSArray *)tileOverlaysToAdd { NSString *identifier = tileOverlay.tileOverlayId; FLTTileProviderController *tileProvider = [[FLTTileProviderController alloc] initWithTileOverlayIdentifier:identifier - callbackHandler:self.callbackHandler]; + tileProvider:self.tileProviderDelegate]; FLTGoogleMapTileOverlayController *controller = [[FLTGoogleMapTileOverlayController alloc] initWithTileOverlay:tileOverlay tileLayer:tileProvider diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapCircleController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapCircleController.m index d2d0130dc64a..1348601ce0ff 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapCircleController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapCircleController.m @@ -60,7 +60,7 @@ + (void)updateCircle:(GMSCircle *)circle @interface FLTCirclesController () -@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; +@property(weak, nonatomic) NSObject *eventDelegate; @property(weak, nonatomic) GMSMapView *mapView; @property(strong, nonatomic) NSMutableDictionary *circleIdToController; @@ -69,11 +69,10 @@ @interface FLTCirclesController () @implementation FLTCirclesController - (instancetype)initWithMapView:(GMSMapView *)mapView - callbackHandler:(FGMMapsCallbackApi *)callbackHandler - registrar:(NSObject *)registrar { + eventDelegate:(NSObject *)eventDelegate { self = [super init]; if (self) { - _callbackHandler = callbackHandler; + _eventDelegate = eventDelegate; _mapView = mapView; _circleIdToController = [NSMutableDictionary dictionaryWithCapacity:1]; } @@ -122,9 +121,7 @@ - (void)didTapCircleWithIdentifier:(NSString *)identifier { if (!controller) { return; } - [self.callbackHandler didTapCircleWithIdentifier:identifier - completion:^(FlutterError *_Nullable _){ - }]; + [self.eventDelegate didTapCircleWithIdentifier:identifier]; } @end diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m index 0537d48ba9ce..c265785d624e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m @@ -7,6 +7,7 @@ #import "GoogleMapController.h" #import "GoogleMapController_Test.h" +#import "FGMAssetProvider.h" #import "FGMConversionUtils.h" #import "FGMGroundOverlayController.h" #import "FGMMarkerUserData.h" @@ -14,8 +15,6 @@ #import "FLTGoogleMapTileOverlayController.h" #import "google_maps_flutter_pigeon_messages.g.h" -#pragma mark - Conversion of JSON-like values sent via platform channels. Forward declarations. - @interface FLTGoogleMapFactory () @property(weak, nonatomic) NSObject *registrar; @@ -66,6 +65,155 @@ - (instancetype)initWithRegistrar:(NSObject *)registrar #pragma mark - +/// Non-test implementation of FGMAssetProvider, wrapping a Flutter plugin +/// registrar. +@interface FGMDefaultAssetProvider : NSObject +@property(weak, nonatomic) NSObject *registrar; + +- (instancetype)initWithRegistrar:(NSObject *)registrar; +@end + +@implementation FGMDefaultAssetProvider + +- (instancetype)initWithRegistrar:(NSObject *)registrar { + self = [super init]; + if (self) { + _registrar = registrar; + } + return self; +} + +- (NSString *)lookupKeyForAsset:(NSString *)asset { + return [self.registrar lookupKeyForAsset:asset]; +} + +- (NSString *)lookupKeyForAsset:(NSString *)asset fromPackage:(NSString *)package { + return [self.registrar lookupKeyForAsset:asset fromPackage:package]; +} + +- (UIImage *)imageNamed:(NSString *)name { + return [UIImage imageNamed:name]; +} + +@end + +#pragma mark - + +/// Non-test implementation of FGMAssetProvider, wrapping a FGMMapsCallbackApi +/// instance. +@interface FGMDefaultMapEventHandler : NSObject +@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; + +- (instancetype)initWithCallbackHandler:(FGMMapsCallbackApi *)callbackHandler; +@end + +@implementation FGMDefaultMapEventHandler + +- (instancetype)initWithCallbackHandler:(FGMMapsCallbackApi *)callbackHandler { + self = [super init]; + if (self) { + _callbackHandler = callbackHandler; + } + return self; +} + +- (void)didStartCameraMove { + [self.callbackHandler didStartCameraMoveWithCompletion:^(FlutterError *_){ + }]; +} + +- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition { + [self.callbackHandler didMoveCameraToPosition:cameraPosition + completion:^(FlutterError *_){ + }]; +} + +- (void)didIdleCamera { + [self.callbackHandler didIdleCameraWithCompletion:^(FlutterError *_){ + }]; +} + +- (void)didTapAtPosition:(FGMPlatformLatLng *)position { + [self.callbackHandler didTapAtPosition:position + completion:^(FlutterError *_){ + }]; +} + +- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position { + [self.callbackHandler didLongPressAtPosition:position + completion:^(FlutterError *_){ + }]; +} + +- (void)didTapMarkerWithIdentifier:(NSString *)markerId { + [self.callbackHandler didTapMarkerWithIdentifier:markerId + completion:^(FlutterError *_){ + }]; +} + +- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId + atPosition:(FGMPlatformLatLng *)position { + [self.callbackHandler didStartDragForMarkerWithIdentifier:markerId + atPosition:position + completion:^(FlutterError *_){ + }]; +} + +- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position { + [self.callbackHandler didDragMarkerWithIdentifier:markerId + atPosition:position + completion:^(FlutterError *_){ + }]; +} + +- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId + atPosition:(FGMPlatformLatLng *)position { + [self.callbackHandler didEndDragForMarkerWithIdentifier:markerId + atPosition:position + completion:^(FlutterError *_){ + }]; +} + +- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId { + [self.callbackHandler didTapInfoWindowOfMarkerWithIdentifier:markerId + completion:^(FlutterError *_){ + }]; +} + +- (void)didTapCircleWithIdentifier:(NSString *)circleId { + [self.callbackHandler didTapCircleWithIdentifier:circleId + completion:^(FlutterError *_){ + }]; +} + +- (void)didTapCluster:(FGMPlatformCluster *)cluster { + [self.callbackHandler didTapCluster:cluster + completion:^(FlutterError *_){ + }]; +} + +- (void)didTapPolygonWithIdentifier:(NSString *)polygonId { + [self.callbackHandler didTapPolygonWithIdentifier:polygonId + completion:^(FlutterError *_){ + }]; +} + +- (void)didTapPolylineWithIdentifier:(NSString *)polylineId { + [self.callbackHandler didTapPolylineWithIdentifier:polylineId + completion:^(FlutterError *_){ + }]; +} + +- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId { + [self.callbackHandler didTapGroundOverlayWithIdentifier:groundOverlayId + completion:^(FlutterError *_){ + }]; +} + +@end + +#pragma mark - + /// Private declarations of the FGMMapCallHandler. @interface FGMMapCallHandler () - (instancetype)initWithMapController:(nonnull FLTGoogleMapController *)controller @@ -95,12 +243,12 @@ @interface FGMMapInspector () #pragma mark - -@interface FLTGoogleMapController () +@interface FLTGoogleMapController () @property(nonatomic, strong) GMSMapView *mapView; @property(nonatomic, strong) FGMMapsCallbackApi *dartCallbackHandler; +@property(nonatomic, strong) FGMDefaultMapEventHandler *mapEventHandler; @property(nonatomic, assign) BOOL trackCameraPosition; -@property(nonatomic, weak) NSObject *registrar; @property(nonatomic, strong) FGMClusterManagersController *clusterManagersController; @property(nonatomic, strong) FLTMarkersController *markersController; @property(nonatomic, strong) FLTPolygonsController *polygonsController; @@ -145,13 +293,15 @@ - (instancetype)initWithFrame:(CGRect)frame return [self initWithMapView:mapView viewIdentifier:viewId creationParameters:creationParameters - registrar:registrar]; + assetProvider:[[FGMDefaultAssetProvider alloc] initWithRegistrar:registrar] + binaryMessenger:registrar.messenger]; } - (instancetype)initWithMapView:(GMSMapView *_Nonnull)mapView viewIdentifier:(int64_t)viewId creationParameters:(FGMPlatformMapViewCreationParams *)creationParameters - registrar:(NSObject *_Nonnull)registrar { + assetProvider:(NSObject *)assetProvider + binaryMessenger:(NSObject *)binaryMessenger { if (self = [super init]) { _mapView = mapView; @@ -160,36 +310,32 @@ - (instancetype)initWithMapView:(GMSMapView *_Nonnull)mapView // https://github.com/flutter/flutter/issues/104121 [self interpretMapConfiguration:creationParameters.mapConfiguration]; NSString *pigeonSuffix = [NSString stringWithFormat:@"%lld", viewId]; - _dartCallbackHandler = [[FGMMapsCallbackApi alloc] initWithBinaryMessenger:registrar.messenger + _dartCallbackHandler = [[FGMMapsCallbackApi alloc] initWithBinaryMessenger:binaryMessenger messageChannelSuffix:pigeonSuffix]; + _mapEventHandler = + [[FGMDefaultMapEventHandler alloc] initWithCallbackHandler:_dartCallbackHandler]; _mapView.delegate = self; _mapView.paddingAdjustmentBehavior = kGMSMapViewPaddingAdjustmentBehaviorNever; - _registrar = registrar; _clusterManagersController = [[FGMClusterManagersController alloc] initWithMapView:_mapView - callbackHandler:_dartCallbackHandler]; + eventDelegate:_mapEventHandler]; _markersController = [[FLTMarkersController alloc] initWithMapView:_mapView - callbackHandler:_dartCallbackHandler + eventDelegate:_mapEventHandler clusterManagersController:_clusterManagersController - registrar:registrar]; + assetProvider:assetProvider]; _polygonsController = [[FLTPolygonsController alloc] initWithMapView:_mapView - callbackHandler:_dartCallbackHandler - registrar:registrar]; + eventDelegate:_mapEventHandler]; _polylinesController = [[FLTPolylinesController alloc] initWithMapView:_mapView - callbackHandler:_dartCallbackHandler - registrar:registrar]; + eventDelegate:_mapEventHandler]; _circlesController = [[FLTCirclesController alloc] initWithMapView:_mapView - callbackHandler:_dartCallbackHandler - registrar:registrar]; + eventDelegate:_mapEventHandler]; _heatmapsController = [[FLTHeatmapsController alloc] initWithMapView:_mapView]; - _tileOverlaysController = - [[FLTTileOverlaysController alloc] initWithMapView:_mapView - callbackHandler:_dartCallbackHandler - registrar:registrar]; + _tileOverlaysController = [[FLTTileOverlaysController alloc] initWithMapView:_mapView + tileProvider:self]; _groundOverlaysController = [[FLTGroundOverlaysController alloc] initWithMapView:_mapView - callbackHandler:_dartCallbackHandler - registrar:registrar]; + eventDelegate:_mapEventHandler + assetProvider:assetProvider]; [_clusterManagersController addClusterManagers:creationParameters.initialClusterManagers]; [_markersController addMarkers:creationParameters.initialMarkers]; [_polygonsController addPolygons:creationParameters.initialPolygons]; @@ -205,13 +351,13 @@ - (instancetype)initWithMapView:(GMSMapView *_Nonnull)mapView [_mapView addObserver:self forKeyPath:@"frame" options:0 context:nil]; _callHandler = [[FGMMapCallHandler alloc] initWithMapController:self - messenger:registrar.messenger + messenger:binaryMessenger pigeonSuffix:pigeonSuffix]; - SetUpFGMMapsApiWithSuffix(registrar.messenger, _callHandler, pigeonSuffix); + SetUpFGMMapsApiWithSuffix(binaryMessenger, _callHandler, pigeonSuffix); _inspector = [[FGMMapInspector alloc] initWithMapController:self - messenger:registrar.messenger + messenger:binaryMessenger pigeonSuffix:pigeonSuffix]; - SetUpFGMMapsInspectorApiWithSuffix(registrar.messenger, _inspector, pigeonSuffix); + SetUpFGMMapsInspectorApiWithSuffix(binaryMessenger, _inspector, pigeonSuffix); } return self; } @@ -352,22 +498,17 @@ - (NSString *)setMapStyle:(NSString *)mapStyle { #pragma mark - GMSMapViewDelegate methods - (void)mapView:(GMSMapView *)mapView willMove:(BOOL)gesture { - [self.dartCallbackHandler didStartCameraMoveWithCompletion:^(FlutterError *_Nullable _){ - }]; + [self.mapEventHandler didStartCameraMove]; } - (void)mapView:(GMSMapView *)mapView didChangeCameraPosition:(GMSCameraPosition *)position { if (self.trackCameraPosition) { - [self.dartCallbackHandler - didMoveCameraToPosition:FGMGetPigeonCameraPositionForPosition(position) - completion:^(FlutterError *_Nullable _){ - }]; + [self.mapEventHandler didMoveCameraToPosition:FGMGetPigeonCameraPositionForPosition(position)]; } } - (void)mapView:(GMSMapView *)mapView idleAtCameraPosition:(GMSCameraPosition *)position { - [self.dartCallbackHandler didIdleCameraWithCompletion:^(FlutterError *_Nullable _){ - }]; + [self.mapEventHandler didIdleCamera]; } - (BOOL)mapView:(GMSMapView *)mapView didTapMarker:(GMSMarker *)marker { @@ -416,15 +557,11 @@ - (void)mapView:(GMSMapView *)mapView didTapOverlay:(GMSOverlay *)overlay { } - (void)mapView:(GMSMapView *)mapView didTapAtCoordinate:(CLLocationCoordinate2D)coordinate { - [self.dartCallbackHandler didTapAtPosition:FGMGetPigeonLatLngForCoordinate(coordinate) - completion:^(FlutterError *_Nullable _){ - }]; + [self.mapEventHandler didTapAtPosition:FGMGetPigeonLatLngForCoordinate(coordinate)]; } - (void)mapView:(GMSMapView *)mapView didLongPressAtCoordinate:(CLLocationCoordinate2D)coordinate { - [self.dartCallbackHandler didLongPressAtPosition:FGMGetPigeonLatLngForCoordinate(coordinate) - completion:^(FlutterError *_Nullable _){ - }]; + [self.mapEventHandler didLongPressAtPosition:FGMGetPigeonLatLngForCoordinate(coordinate)]; } - (void)interpretMapConfiguration:(FGMPlatformMapConfiguration *)config { @@ -500,6 +637,19 @@ - (void)interpretMapConfiguration:(FGMPlatformMapConfiguration *)config { } } +#pragma mark - FGMTileProviderDelegate + +- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId + location:(FGMPlatformPoint *)location + zoom:(NSInteger)zoom + completion:(void (^)(FGMPlatformTile *_Nullable, + FlutterError *_Nullable))completion { + [self.dartCallbackHandler tileWithOverlayIdentifier:tileOverlayId + location:location + zoom:zoom + completion:completion]; +} + @end #pragma mark - diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapMarkerController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapMarkerController.m index ed3aabd7fc10..9d061eec8b09 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapMarkerController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapMarkerController.m @@ -54,7 +54,7 @@ - (void)removeMarker { } - (void)updateFromPlatformMarker:(FGMPlatformMarker *)platformMarker - registrar:(NSObject *)registrar + assetProvider:(NSObject *)assetProvider screenScale:(CGFloat)screenScale { self.clusterManagerIdentifier = platformMarker.clusterManagerId; self.consumeTapEvents = platformMarker.consumeTapEvents; @@ -69,7 +69,7 @@ - (void)updateFromPlatformMarker:(FGMPlatformMarker *)platformMarker [FLTGoogleMapMarkerController updateMarker:self.marker fromPlatformMarker:platformMarker withMapView:self.mapView - registrar:registrar + assetProvider:assetProvider screenScale:screenScale usingOpacityForVisibility:useOpacityForVisibility]; } @@ -77,12 +77,12 @@ - (void)updateFromPlatformMarker:(FGMPlatformMarker *)platformMarker + (void)updateMarker:(GMSMarker *)marker fromPlatformMarker:(FGMPlatformMarker *)platformMarker withMapView:(GMSMapView *)mapView - registrar:(NSObject *)registrar + assetProvider:(NSObject *)assetProvider screenScale:(CGFloat)screenScale usingOpacityForVisibility:(BOOL)useOpacityForVisibility { marker.groundAnchor = FGMGetCGPointForPigeonPoint(platformMarker.anchor); marker.draggable = platformMarker.draggable; - UIImage *image = FGMIconFromBitmap(platformMarker.icon, registrar, screenScale); + UIImage *image = FGMIconFromBitmap(platformMarker.icon, assetProvider, screenScale); marker.icon = image; marker.flat = platformMarker.flat; marker.position = FGMGetCoordinateForPigeonLatLng(platformMarker.position); @@ -108,11 +108,12 @@ + (void)updateMarker:(GMSMarker *)marker @interface FLTMarkersController () -@property(strong, nonatomic, readwrite) NSMutableDictionary *markerIdentifierToController; -@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; +@property(strong, nonatomic, readwrite) + NSMutableDictionary *markerIdentifierToController; +@property(weak, nonatomic) NSObject *eventDelegate; /// Controller for adding/removing/fetching cluster managers @property(weak, nonatomic, nullable) FGMClusterManagersController *clusterManagersController; -@property(weak, nonatomic) NSObject *registrar; +@property(weak, nonatomic) NSObject *assetProvider; @property(weak, nonatomic) GMSMapView *mapView; @end @@ -120,16 +121,16 @@ @interface FLTMarkersController () @implementation FLTMarkersController - (instancetype)initWithMapView:(GMSMapView *)mapView - callbackHandler:(FGMMapsCallbackApi *)callbackHandler + eventDelegate:(NSObject *)eventDelegate clusterManagersController:(nullable FGMClusterManagersController *)clusterManagersController - registrar:(NSObject *)registrar { + assetProvider:(NSObject *)assetProvider { self = [super init]; if (self) { - _callbackHandler = callbackHandler; + _eventDelegate = eventDelegate; _mapView = mapView; _clusterManagersController = clusterManagersController; _markerIdentifierToController = [[NSMutableDictionary alloc] init]; - _registrar = registrar; + _assetProvider = assetProvider; } return self; } @@ -150,7 +151,7 @@ - (void)addMarker:(FGMPlatformMarker *)markerToAdd { markerIdentifier:markerIdentifier mapView:self.mapView]; [controller updateFromPlatformMarker:markerToAdd - registrar:self.registrar + assetProvider:self.assetProvider screenScale:[self getScreenScale]]; if (clusterManagerIdentifier) { GMUClusterManager *clusterManager = @@ -179,7 +180,7 @@ - (void)changeMarker:(FGMPlatformMarker *)markerToChange { NSString *clusterManagerIdentifier = markerToChange.clusterManagerId; NSString *previousClusterManagerIdentifier = [controller clusterManagerIdentifier]; [controller updateFromPlatformMarker:markerToChange - registrar:self.registrar + assetProvider:self.assetProvider screenScale:[self getScreenScale]]; if ([controller.marker conformsToProtocol:@protocol(GMUClusterItem)]) { @@ -232,9 +233,7 @@ - (BOOL)didTapMarkerWithIdentifier:(NSString *)identifier { if (!controller) { return NO; } - [self.callbackHandler didTapMarkerWithIdentifier:identifier - completion:^(FlutterError *_Nullable _){ - }]; + [self.eventDelegate didTapMarkerWithIdentifier:identifier]; return controller.consumeTapEvents; } @@ -247,11 +246,9 @@ - (void)didStartDraggingMarkerWithIdentifier:(NSString *)identifier if (!controller) { return; } - [self.callbackHandler + [self.eventDelegate didStartDragForMarkerWithIdentifier:identifier - atPosition:FGMGetPigeonLatLngForCoordinate(location) - completion:^(FlutterError *_Nullable _){ - }]; + atPosition:FGMGetPigeonLatLngForCoordinate(location)]; } - (void)didDragMarkerWithIdentifier:(NSString *)identifier @@ -263,10 +260,8 @@ - (void)didDragMarkerWithIdentifier:(NSString *)identifier if (!controller) { return; } - [self.callbackHandler didDragMarkerWithIdentifier:identifier - atPosition:FGMGetPigeonLatLngForCoordinate(location) - completion:^(FlutterError *_Nullable _){ - }]; + [self.eventDelegate didDragMarkerWithIdentifier:identifier + atPosition:FGMGetPigeonLatLngForCoordinate(location)]; } - (void)didEndDraggingMarkerWithIdentifier:(NSString *)identifier @@ -275,17 +270,13 @@ - (void)didEndDraggingMarkerWithIdentifier:(NSString *)identifier if (!controller) { return; } - [self.callbackHandler didEndDragForMarkerWithIdentifier:identifier - atPosition:FGMGetPigeonLatLngForCoordinate(location) - completion:^(FlutterError *_Nullable _){ - }]; + [self.eventDelegate didEndDragForMarkerWithIdentifier:identifier + atPosition:FGMGetPigeonLatLngForCoordinate(location)]; } - (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)identifier { if (identifier && self.markerIdentifierToController[identifier]) { - [self.callbackHandler didTapInfoWindowOfMarkerWithIdentifier:identifier - completion:^(FlutterError *_Nullable _){ - }]; + [self.eventDelegate didTapInfoWindowOfMarkerWithIdentifier:identifier]; } } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapPolygonController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapPolygonController.m index 12cbfeefecd7..f5d077bd4ff1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapPolygonController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapPolygonController.m @@ -70,8 +70,7 @@ + (void)updatePolygon:(GMSPolygon *)polygon @interface FLTPolygonsController () @property(strong, nonatomic) NSMutableDictionary *polygonIdentifierToController; -@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; -@property(weak, nonatomic) NSObject *registrar; +@property(weak, nonatomic) NSObject *eventDelegate; @property(weak, nonatomic) GMSMapView *mapView; @end @@ -79,14 +78,12 @@ @interface FLTPolygonsController () @implementation FLTPolygonsController - (instancetype)initWithMapView:(GMSMapView *)mapView - callbackHandler:(FGMMapsCallbackApi *)callbackHandler - registrar:(NSObject *)registrar { + eventDelegate:(NSObject *)eventDelegate { self = [super init]; if (self) { - _callbackHandler = callbackHandler; + _eventDelegate = eventDelegate; _mapView = mapView; _polygonIdentifierToController = [NSMutableDictionary dictionaryWithCapacity:1]; - _registrar = registrar; } return self; } @@ -131,9 +128,7 @@ - (void)didTapPolygonWithIdentifier:(NSString *)identifier { if (!controller) { return; } - [self.callbackHandler didTapPolygonWithIdentifier:identifier - completion:^(FlutterError *_Nullable _){ - }]; + [self.eventDelegate didTapPolygonWithIdentifier:identifier]; } - (bool)hasPolygonWithIdentifier:(NSString *)identifier { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapPolylineController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapPolylineController.m index 63a7f7b7b0fc..ea84a4e5be54 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapPolylineController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapPolylineController.m @@ -63,8 +63,7 @@ + (void)updatePolyline:(GMSPolyline *)polyline @interface FLTPolylinesController () @property(strong, nonatomic) NSMutableDictionary *polylineIdentifierToController; -@property(strong, nonatomic) FGMMapsCallbackApi *callbackHandler; -@property(weak, nonatomic) NSObject *registrar; +@property(weak, nonatomic) NSObject *eventDelegate; @property(weak, nonatomic) GMSMapView *mapView; @end @@ -73,14 +72,12 @@ @interface FLTPolylinesController () @implementation FLTPolylinesController - (instancetype)initWithMapView:(GMSMapView *)mapView - callbackHandler:(FGMMapsCallbackApi *)callbackHandler - registrar:(NSObject *)registrar { + eventDelegate:(NSObject *)eventDelegate { self = [super init]; if (self) { - _callbackHandler = callbackHandler; + _eventDelegate = eventDelegate; _mapView = mapView; _polylineIdentifierToController = [NSMutableDictionary dictionaryWithCapacity:1]; - _registrar = registrar; } return self; } @@ -125,9 +122,7 @@ - (void)didTapPolylineWithIdentifier:(NSString *)identifier { if (!controller) { return; } - [self.callbackHandler didTapPolylineWithIdentifier:identifier - completion:^(FlutterError *_Nullable _){ - }]; + [self.eventDelegate didTapPolylineWithIdentifier:identifier]; } - (bool)hasPolylineWithIdentifier:(NSString *)identifier { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMClusterManagersController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMClusterManagersController.h index 98afbb34d1f0..b6134c6b9d28 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMClusterManagersController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMClusterManagersController.h @@ -6,6 +6,7 @@ @import GoogleMaps; @import GoogleMapsUtils; +#import "FGMMapEventDelegate.h" #import "google_maps_flutter_pigeon_messages.g.h" NS_ASSUME_NONNULL_BEGIN @@ -15,10 +16,10 @@ NS_ASSUME_NONNULL_BEGIN /// Initializes cluster manager controller. /// -/// @param callbackHandler A callback handler. +/// @param eventDelegate A delegate that will receive events from the cluster managers. /// @param mapView A map view that will be used to display clustered markers. - (instancetype)initWithMapView:(GMSMapView *)mapView - callbackHandler:(FGMMapsCallbackApi *)callbackHandler; + eventDelegate:(NSObject *)eventDelegate; /// Creates cluster managers and initializes them. /// diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMConversionUtils.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMConversionUtils.h index c7821882297c..788c585c6f34 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMConversionUtils.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMConversionUtils.h @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import Flutter; @import Foundation; @import GoogleMaps; @import GoogleMapsUtils; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMGroundOverlayController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMGroundOverlayController.h index a5297f703b9e..f4a07aa950e5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMGroundOverlayController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMGroundOverlayController.h @@ -3,11 +3,12 @@ // found in the LICENSE file. @import CoreLocation; -@import Flutter; @import Foundation; @import GoogleMaps; @import UIKit; +#import "FGMAssetProvider.h" +#import "FGMMapEventDelegate.h" #import "google_maps_flutter_pigeon_messages.g.h" NS_ASSUME_NONNULL_BEGIN @@ -37,10 +38,10 @@ NS_ASSUME_NONNULL_BEGIN /// Controller of multiple ground overlays on the map. @interface FLTGroundOverlaysController : NSObject -/// Initializes the controller with a GMSMapView, callback handler and registrar. +/// Initializes the controller with a GMSMapView, event delegate, and asset provider. - (instancetype)initWithMapView:(GMSMapView *)mapView - callbackHandler:(FGMMapsCallbackApi *)callbackHandler - registrar:(NSObject *)registrar; + eventDelegate:(NSObject *)eventDelegate + assetProvider:(NSObject *)assetProvider; /// Adds ground overlays to the map. - (void)addGroundOverlays:(NSArray *)groundOverlaysToAdd; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMGroundOverlayController_Test.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMGroundOverlayController_Test.h index 87123539947d..1c4d062348a5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMGroundOverlayController_Test.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMGroundOverlayController_Test.h @@ -12,7 +12,7 @@ /// Function to update the gms ground overlay from platform ground overlay. - (void)updateFromPlatformGroundOverlay:(FGMPlatformGroundOverlay *)groundOverlay - registrar:(NSObject *)registrar + assetProvider:(NSObject *)assetProvider screenScale:(CGFloat)screenScale; /// Updates the underlying GMSGroundOverlay with the properties from the given @@ -22,7 +22,7 @@ + (void)updateGroundOverlay:(GMSGroundOverlay *)groundOverlay fromPlatformGroundOverlay:(FGMPlatformGroundOverlay *)groundOverlay withMapView:(GMSMapView *)mapView - registrar:(NSObject *)registrar + assetProvider:(NSObject *)assetProvider screenScale:(CGFloat)screenScale usingBounds:(BOOL)useBounds; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMImageUtils.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMImageUtils.h index 37a833d79d1e..a8fd0c82c688 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMImageUtils.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FGMImageUtils.h @@ -2,16 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import Flutter; @import GoogleMaps; +@import UIKit; +#import "FGMAssetProvider.h" #import "google_maps_flutter_pigeon_messages.g.h" NS_ASSUME_NONNULL_BEGIN /// Creates a UIImage from Pigeon bitmap. UIImage *_Nullable FGMIconFromBitmap(FGMPlatformBitmap *platformBitmap, - NSObject *registrar, + NSObject *assetProvider, CGFloat screenScale); /// Returns a BOOL indicating whether image is considered scalable with the given scale factor from /// size. diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapHeatmapController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapHeatmapController.h index edba379ac0e3..93c2aacf5e57 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapHeatmapController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapHeatmapController.h @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import Flutter; @import GoogleMaps; @import GoogleMapsUtils; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.h index 5c1b6e5418e8..b4c707e6d0b4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/FLTGoogleMapTileOverlayController.h @@ -9,6 +9,17 @@ NS_ASSUME_NONNULL_BEGIN +/// Protocol for requesting tiles from the Dart side. +@protocol FGMTileProviderDelegate +- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId + location:(FGMPlatformPoint *)location + zoom:(NSInteger)zoom + completion:(void (^)(FGMPlatformTile *_Nullable, + FlutterError *_Nullable))completion; +@end + +#pragma mark - + @interface FLTGoogleMapTileOverlayController : NSObject /// The layer managed by this controller instance. @property(readonly, nonatomic) GMSTileLayer *layer; @@ -23,13 +34,12 @@ NS_ASSUME_NONNULL_BEGIN @interface FLTTileProviderController : GMSTileLayer @property(copy, nonatomic, readonly) NSString *tileOverlayIdentifier; - (instancetype)initWithTileOverlayIdentifier:(NSString *)identifier - callbackHandler:(FGMMapsCallbackApi *)callbackHandler; + tileProvider:(NSObject *)tileProvider; @end @interface FLTTileOverlaysController : NSObject - (instancetype)initWithMapView:(GMSMapView *)mapView - callbackHandler:(FGMMapsCallbackApi *)callbackHandler - registrar:(NSObject *)registrar; + tileProvider:(NSObject *)tileProvider; - (void)addTileOverlays:(NSArray *)tileOverlaysToAdd; - (void)changeTileOverlays:(NSArray *)tileOverlaysToChange; - (void)removeTileOverlayWithIdentifiers:(NSArray *)identifiers; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapCircleController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapCircleController.h index 0cb21d926f6a..ac4347551135 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapCircleController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapCircleController.h @@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import Flutter; @import GoogleMaps; +#import "FGMMapEventDelegate.h" #import "google_maps_flutter_pigeon_messages.g.h" NS_ASSUME_NONNULL_BEGIN @@ -18,8 +18,7 @@ NS_ASSUME_NONNULL_BEGIN @interface FLTCirclesController : NSObject - (instancetype)initWithMapView:(GMSMapView *)mapView - callbackHandler:(FGMMapsCallbackApi *)callbackHandler - registrar:(NSObject *)registrar; + eventDelegate:(NSObject *)eventDelegate; - (void)addCircles:(NSArray *)circlesToAdd; - (void)changeCircles:(NSArray *)circlesToChange; - (void)removeCirclesWithIdentifiers:(NSArray *)identifiers; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapController_Test.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapController_Test.h index 219a1ac246e9..bbb61545cc0c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapController_Test.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapController_Test.h @@ -5,6 +5,7 @@ @import Flutter; @import GoogleMaps; +#import "FGMAssetProvider.h" #import "FGMCATransactionWrapper.h" #import "GoogleMapController.h" @@ -45,11 +46,13 @@ NS_ASSUME_NONNULL_BEGIN /// @param mapView A map view that will be displayed by the controller /// @param viewId A unique identifier for the controller. /// @param creationParameters Parameters for initialising the map view. -/// @param registrar The plugin registrar passed from Flutter. +/// @param assetProvider The asset provider to use for looking up assets. +/// @param binaryMessenger The binary messenger to use for sending messages to Dart. - (instancetype)initWithMapView:(GMSMapView *)mapView viewIdentifier:(int64_t)viewId creationParameters:(FGMPlatformMapViewCreationParams *)creationParameters - registrar:(NSObject *)registrar; + assetProvider:(NSObject *)assetProvider + binaryMessenger:(NSObject *)binaryMessenger; // The main Pigeon API implementation. @property(nonatomic, strong, readonly) FGMMapCallHandler *callHandler; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapMarkerController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapMarkerController.h index dcebcb1e2982..57797346639e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapMarkerController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapMarkerController.h @@ -5,12 +5,15 @@ @import Flutter; @import GoogleMaps; +#import "FGMAssetProvider.h" #import "FGMClusterManagersController.h" -#import "GoogleMapController.h" +#import "FGMMapEventDelegate.h" #import "google_maps_flutter_pigeon_messages.g.h" NS_ASSUME_NONNULL_BEGIN +#pragma mark - + // Defines marker controllable by Flutter. @interface FLTGoogleMapMarkerController : NSObject @property(assign, nonatomic, readonly) BOOL consumeTapEvents; @@ -25,9 +28,9 @@ NS_ASSUME_NONNULL_BEGIN @interface FLTMarkersController : NSObject - (instancetype)initWithMapView:(GMSMapView *)mapView - callbackHandler:(FGMMapsCallbackApi *)callbackHandler + eventDelegate:(NSObject *)eventDelegate clusterManagersController:(nullable FGMClusterManagersController *)clusterManagersController - registrar:(NSObject *)registrar; + assetProvider:(NSObject *)assetProvider; - (void)addMarkers:(NSArray *)markersToAdd; - (void)changeMarkers:(NSArray *)markersToChange; - (void)removeMarkersWithIdentifiers:(NSArray *)identifiers; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapMarkerController_Test.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapMarkerController_Test.h index f6ff32e791e1..d7a9c1578432 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapMarkerController_Test.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapMarkerController_Test.h @@ -16,7 +16,7 @@ + (void)updateMarker:(GMSMarker *)marker fromPlatformMarker:(FGMPlatformMarker *)platformMarker withMapView:(GMSMapView *)mapView - registrar:(NSObject *)registrar + assetProvider:(NSObject *)assetProvider screenScale:(CGFloat)screenScale usingOpacityForVisibility:(BOOL)useOpacityForVisibility; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapPolygonController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapPolygonController.h index b26cf2416c5f..a222ca6a4eb0 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapPolygonController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapPolygonController.h @@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import Flutter; @import GoogleMaps; +#import "FGMMapEventDelegate.h" #import "google_maps_flutter_pigeon_messages.g.h" // Defines polygon controllable by Flutter. @@ -17,8 +17,7 @@ @interface FLTPolygonsController : NSObject - (instancetype)initWithMapView:(GMSMapView *)mapView - callbackHandler:(FGMMapsCallbackApi *)callbackHandler - registrar:(NSObject *)registrar; + eventDelegate:(NSObject *)eventDelegate; - (void)addPolygons:(NSArray *)polygonsToAdd; - (void)changePolygons:(NSArray *)polygonsToChange; - (void)removePolygonWithIdentifiers:(NSArray *)identifiers; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapPolylineController.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapPolylineController.h index 5505ec54019b..ccf37dae9a35 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapPolylineController.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/GoogleMapPolylineController.h @@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@import Flutter; @import GoogleMaps; +#import "FGMMapEventDelegate.h" #import "google_maps_flutter_pigeon_messages.g.h" // Defines polyline controllable by Flutter. @@ -17,8 +17,7 @@ @interface FLTPolylinesController : NSObject - (instancetype)initWithMapView:(GMSMapView *)mapView - callbackHandler:(FGMMapsCallbackApi *)callbackHandler - registrar:(NSObject *)registrar; + eventDelegate:(NSObject *)eventDelegate; - (void)addPolylines:(NSArray *)polylinesToAdd; - (void)changePolylines:(NSArray *)polylinesToChange; - (void)removePolylineWithIdentifiers:(NSArray *)identifiers; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml index d2b6449e77e3..f971ae9b5678 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter_ios description: iOS implementation of the google_maps_flutter plugin. repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_ios issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 2.17.0 +version: 2.17.1 environment: sdk: ^3.9.0 diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md index be29338d9f15..3636e5674232 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md @@ -2,6 +2,7 @@ * Adds `PointOfInterest` type. * Adds `MapPoiTapEvent` to support point-of-interest tap events. +* Adds `onPoiTap` to `GoogleMapsFlutterPlatform` to support Point of Interest tapping. ## 2.14.1 diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart deleted file mode 100644 index 81fd56c0ca8b..000000000000 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2013 The Flutter Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'dart:async'; -import 'dart:js_interop'; - -import 'package:flutter/widgets.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:google_maps/google_maps.dart' as gmaps; -import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; -import 'package:google_maps_flutter_web/google_maps_flutter_web.dart'; -import 'package:google_maps_flutter_web/src/utils.dart'; -import 'package:integration_test/integration_test.dart'; - -@JS() -@anonymous -extension type FakeIconMouseEvent._(JSObject _) implements JSObject { - external factory FakeIconMouseEvent({ - gmaps.LatLng? latLng, - String? placeId, - JSFunction? stop, - }); -} - -void main() { - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - - group('POI Tap Events', () { - late GoogleMapController controller; - late StreamController> stream; - late gmaps.Map map; - - setUp(() { - stream = StreamController>.broadcast(); - map = gmaps.Map(createDivElement()); - - controller = GoogleMapController( - mapId: 1, - streamController: stream, - widgetConfiguration: const MapWidgetConfiguration( - initialCameraPosition: CameraPosition(target: LatLng(0, 0)), - textDirection: TextDirection.ltr, - ), - ); - - controller.debugSetOverrides(createMap: (_, __) => map); - controller.init(); - }); - - tearDown(() { - controller.dispose(); - }); - - testWidgets('Emits MapPoiTapEvent when clicking a POI', ( - WidgetTester tester, - ) async { - final latLng = gmaps.LatLng(10, 20); - bool? stopCalled = false; - - final event = FakeIconMouseEvent( - latLng: latLng, - placeId: 'test_place_id', - stop: (() { - stopCalled = true; - }).toJS, - ); - gmaps.event.trigger(map, 'click', event as JSAny); - - final MapEvent emittedEvent = await stream.stream.first; - - expect(emittedEvent, isA()); - final poiEvent = emittedEvent as MapPoiTapEvent; - - expect(poiEvent.mapId, 1); - expect(poiEvent.value.placeId, 'test_place_id'); - expect(poiEvent.value.position.latitude, 10); - expect(poiEvent.value.position.longitude, 20); - - expect(stopCalled, isTrue); - }); - - testWidgets('Emits MapTapEvent when clicking (no POI)', ( - WidgetTester tester, - ) async { - final latLng = gmaps.LatLng(30, 40); - final event = gmaps.MapMouseEvent()..latLng = latLng; - - gmaps.event.trigger(map, 'click', event); - - final MapEvent emittedEvent = await stream.stream.first; - - expect(emittedEvent, isA()); - final tapEvent = emittedEvent as MapTapEvent; - - expect(tapEvent.mapId, 1); - expect(tapEvent.position.latitude, 30); - expect(tapEvent.position.longitude, 40); - - expect(emittedEvent, isNot(isA())); - }); - }); -} diff --git a/packages/video_player/video_player_avfoundation/CHANGELOG.md b/packages/video_player/video_player_avfoundation/CHANGELOG.md index 1e8ff4050e29..72fb28c16fdb 100644 --- a/packages/video_player/video_player_avfoundation/CHANGELOG.md +++ b/packages/video_player/video_player_avfoundation/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.9.1 + +* Refactors native code for improved testability. + ## 2.9.0 * Implements `getAudioTracks()` and `selectAudioTrack()` methods. diff --git a/packages/video_player/video_player_avfoundation/darwin/RunnerTests/VideoPlayerTests.m b/packages/video_player/video_player_avfoundation/darwin/RunnerTests/VideoPlayerTests.m index 5954c1f4e1aa..19e3a70d27fc 100644 --- a/packages/video_player/video_player_avfoundation/darwin/RunnerTests/VideoPlayerTests.m +++ b/packages/video_player/video_player_avfoundation/darwin/RunnerTests/VideoPlayerTests.m @@ -6,13 +6,6 @@ @import video_player_avfoundation; @import XCTest; -#import -#import -#import -#import -#import -#import - #if TARGET_OS_IOS @interface FakeAVAssetTrack : AVAssetTrack @property(readonly, nonatomic) CGAffineTransform preferredTransform; @@ -56,13 +49,15 @@ - (CGAffineTransform)preferredTransform { @interface VideoPlayerTests : XCTestCase @end -@interface StubAVPlayer : AVPlayer +/// An AVPlayer subclass that records method call parameters for inspection. +// TODO(stuartmorgan): Replace with a protocol like the other classes. +@interface InspectableAVPlayer : AVPlayer @property(readonly, nonatomic) NSNumber *beforeTolerance; @property(readonly, nonatomic) NSNumber *afterTolerance; @property(readonly, assign) CMTime lastSeekTime; @end -@implementation StubAVPlayer +@implementation InspectableAVPlayer - (void)seekToTime:(CMTime)time toleranceBefore:(CMTime)toleranceBefore @@ -79,6 +74,117 @@ - (void)seekToTime:(CMTime)time @end +@interface TestAsset : NSObject +@property(nonatomic, readonly) CMTime duration; +@property(nonatomic, nullable, readonly) NSArray *tracks; + +@property(nonatomic, assign) BOOL loadedTracksAsynchronously; +@end + +@implementation TestAsset +- (instancetype)init { + return [self initWithDuration:kCMTimeZero tracks:nil]; +} + +- (instancetype)initWithDuration:(CMTime)duration + tracks:(nullable NSArray *)tracks { + self = [super init]; + _duration = duration; + _tracks = tracks; + return self; +} + +- (AVKeyValueStatus)statusOfValueForKey:(NSString *)key + error:(NSError *_Nullable *_Nullable)outError { + return self.tracks == nil ? AVKeyValueStatusLoading : AVKeyValueStatusLoaded; +} + +- (void)loadValuesAsynchronouslyForKeys:(NSArray *)keys + completionHandler:(nullable void (^NS_SWIFT_SENDABLE)(void))handler { + if (handler) { + handler(); + } +} + +- (void)loadTracksWithMediaType:(AVMediaType)mediaType + completionHandler:(void (^NS_SWIFT_SENDABLE)(NSArray *_Nullable, + NSError *_Nullable))completionHandler + API_AVAILABLE(macos(12.0), ios(15.0)) { + self.loadedTracksAsynchronously = YES; + completionHandler(_tracks, nil); +} + +- (NSArray *)tracksWithMediaType:(AVMediaType)mediaType + API_DEPRECATED("Use loadTracksWithMediaType:completionHandler: instead", macos(10.7, 15.0), + ios(4.0, 18.0)) { + return _tracks ?: @[]; +} +@end + +@interface StubPlayerItem : NSObject +@property(nonatomic, readonly) NSObject *asset; +@property(nonatomic, copy, nullable) AVVideoComposition *videoComposition; +@end + +@implementation StubPlayerItem +- (instancetype)init { + return [self initWithAsset:[[TestAsset alloc] init]]; +} + +- (instancetype)initWithAsset:(NSObject *)asset { + self = [super init]; + _asset = asset; + return self; +} +@end + +@interface StubBinaryMessenger : NSObject +@end + +@implementation StubBinaryMessenger + +- (void)sendOnChannel:(NSString *)channel message:(NSData *_Nullable)message { +} +- (void)sendOnChannel:(NSString *)channel + message:(NSData *_Nullable)message + binaryReply:(FlutterBinaryReply _Nullable)callback { +} +- (FlutterBinaryMessengerConnection)setMessageHandlerOnChannel:(NSString *)channel + binaryMessageHandler: + (FlutterBinaryMessageHandler _Nullable)handler { + return 0; +} +- (void)cleanUpConnection:(FlutterBinaryMessengerConnection)connection { +} +@end + +@interface TestTextureRegistry : NSObject +@property(nonatomic, assign) BOOL registeredTexture; +@property(nonatomic, assign) BOOL unregisteredTexture; +@property(nonatomic, assign) int textureFrameAvailableCount; +@end + +@implementation TestTextureRegistry +- (int64_t)registerTexture:(NSObject *)texture { + self.registeredTexture = true; + return 1; +} + +- (void)unregisterTexture:(int64_t)textureId { + if (textureId != 1) { + XCTFail(@"Unregistering texture with wrong ID"); + } + self.unregisteredTexture = true; +} + +- (void)textureFrameAvailable:(int64_t)textureId { + if (textureId != 1) { + XCTFail(@"Texture frame available with wrong ID"); + } + self.textureFrameAvailableCount++; +} +@end + @interface StubViewProvider : NSObject #if TARGET_OS_IOS - (instancetype)initWithViewController:(UIViewController *)viewController; @@ -105,13 +211,92 @@ - (instancetype)initWithView:(NSView *)view { #endif @end -@interface StubFVPAVFactory : NSObject +@interface StubAssetProvider : NSObject +@end -@property(nonatomic, strong) StubAVPlayer *stubAVPlayer; -@property(nonatomic, strong) AVPlayerItemVideoOutput *output; +@implementation StubAssetProvider +- (NSString *)lookupKeyForAsset:(NSString *)asset { + return asset; +} -- (instancetype)initWithPlayer:(StubAVPlayer *)stubAVPlayer - output:(AVPlayerItemVideoOutput *)output; +- (NSString *)lookupKeyForAsset:(NSString *)asset fromPackage:(NSString *)package { + return asset; +} +@end + +@interface TestPixelBufferSource : NSObject +@property(nonatomic) CVPixelBufferRef pixelBuffer; +@property(nonatomic, readonly) AVPlayerItemVideoOutput *videoOutput; +@end + +@implementation TestPixelBufferSource +- (instancetype)init { + self = [super init]; + // Create an arbitrary video output to for attaching to actual AVFoundation + // objects. The attributes don't matter since this isn't used to implement + // the methods called by the plugin. + _videoOutput = [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:@{ + (id)kCVPixelBufferPixelFormatTypeKey : @(kCVPixelFormatType_32BGRA), + (id)kCVPixelBufferIOSurfacePropertiesKey : @{} + }]; + return self; +} + +- (void)dealloc { + CVPixelBufferRelease(_pixelBuffer); +} + +- (void)setPixelBuffer:(CVPixelBufferRef)pixelBuffer { + CVPixelBufferRelease(_pixelBuffer); + _pixelBuffer = CVPixelBufferRetain(pixelBuffer); +} + +- (CMTime)itemTimeForHostTime:(CFTimeInterval)hostTimeInSeconds { + return CMTimeMakeWithSeconds(hostTimeInSeconds, 1000); +} + +- (BOOL)hasNewPixelBufferForItemTime:(CMTime)itemTime { + return _pixelBuffer != NULL; +} + +- (nullable CVPixelBufferRef)copyPixelBufferForItemTime:(CMTime)itemTime + itemTimeForDisplay:(nullable CMTime *)outItemTimeForDisplay { + CVPixelBufferRef pixelBuffer = _pixelBuffer; + // Ownership is transferred to the caller. + _pixelBuffer = NULL; + return pixelBuffer; +} +@end + +#if TARGET_OS_IOS +@interface TestAudioSession : NSObject +@property(nonatomic, readwrite) AVAudioSessionCategory category; +@property(nonatomic, assign) AVAudioSessionCategoryOptions categoryOptions; + +/// Tracks whether setCategory:withOptions:error: has been called. +@property(nonatomic, assign) BOOL setCategoryCalled; +@end + +@implementation TestAudioSession +- (BOOL)setCategory:(AVAudioSessionCategory)category + withOptions:(AVAudioSessionCategoryOptions)options + error:(NSError **)outError { + self.setCategoryCalled = YES; + self.category = category; + self.categoryOptions = options; + return YES; +} +@end +#endif + +@interface StubFVPAVFactory : NSObject + +@property(nonatomic, strong) AVPlayer *player; +@property(nonatomic, strong) NSObject *playerItem; +@property(nonatomic, strong) NSObject *pixelBufferSource; +#if TARGET_OS_IOS +@property(nonatomic, strong) NSObject *audioSession; +#endif @end @@ -119,23 +304,48 @@ @implementation StubFVPAVFactory // Creates a factory that returns the given items. Any items that are nil will instead return // a real object just as the non-test implementation would. -- (instancetype)initWithPlayer:(StubAVPlayer *)stubAVPlayer - output:(AVPlayerItemVideoOutput *)output { +- (instancetype)initWithPlayer:(nullable AVPlayer *)player + playerItem:(nullable NSObject *)playerItem + pixelBufferSource:(nullable NSObject *)pixelBufferSource { self = [super init]; - _stubAVPlayer = stubAVPlayer; - _output = output; + // Create a player with a dummy item so that the player is valid, since most tests won't work + // without a valid player. + // TODO(stuartmorgan): Introduce a protocol for AVPlayer and use a stub here instead. + NSURL *dummyURL = [NSURL URLWithString:@""]; + _player = + player ?: [[AVPlayer alloc] initWithPlayerItem:[AVPlayerItem playerItemWithURL:dummyURL]]; + _playerItem = playerItem ?: [[StubPlayerItem alloc] init]; + _pixelBufferSource = pixelBufferSource; +#if TARGET_OS_IOS + _audioSession = [[TestAudioSession alloc] init]; +#endif return self; } -- (AVPlayer *)playerWithPlayerItem:(AVPlayerItem *)playerItem { - return _stubAVPlayer ?: [AVPlayer playerWithPlayerItem:playerItem]; +- (NSObject *)URLAssetWithURL:(NSURL *)URL + options:(nullable NSDictionary *)options { + return self.playerItem.asset; } -- (AVPlayerItemVideoOutput *)videoOutputWithPixelBufferAttributes: +- (NSObject *)playerItemWithAsset:(NSObject *)asset { + return self.playerItem; +} + +- (AVPlayer *)playerWithPlayerItem:(NSObject *)playerItem { + return self.player; +} + +- (NSObject *)videoOutputWithPixelBufferAttributes: (NSDictionary *)attributes { - return _output ?: [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:attributes]; + return self.pixelBufferSource ?: [[TestPixelBufferSource alloc] init]; } +#if TARGET_OS_IOS +- (NSObject *)sharedAudioSession { + return self.audioSession; +} +#endif + @end #pragma mark - @@ -163,8 +373,8 @@ - (instancetype)init { _displayLink = [[StubFVPDisplayLink alloc] init]; return self; } -- (NSObject *)displayLinkWithRegistrar:(id)registrar - callback:(void (^)(void))callback { +- (NSObject *)displayLinkWithViewProvider:(NSObject *)viewProvider + callback:(void (^)(void))callback { self.fireDisplayLink = callback; return self.displayLink; } @@ -241,12 +451,15 @@ - (void)testBlankVideoBugWithEncryptedVideoStreamAndInvertedAspectRatioBugForSom id viewProvider = [[StubViewProvider alloc] initWithViewController:viewController]; #endif - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); - FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] - initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil output:nil] - displayLinkFactory:nil - viewProvider:viewProvider - registrar:registrar]; + FVPVideoPlayerPlugin *videoPlayerPlugin = + [[FVPVideoPlayerPlugin alloc] initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil + playerItem:nil + pixelBufferSource:nil] + displayLinkFactory:nil + binaryMessenger:[[StubBinaryMessenger alloc] init] + textureRegistry:[[TestTextureRegistry alloc] init] + viewProvider:viewProvider + assetProvider:[[StubAssetProvider alloc] init]]; FlutterError *error; [videoPlayerPlugin initialize:&error]; @@ -269,17 +482,17 @@ - (void)testBlankVideoBugWithEncryptedVideoStreamAndInvertedAspectRatioBugForSom } - (void)testPlayerForPlatformViewDoesNotRegisterTexture { - NSObject *mockTextureRegistry = - OCMProtocolMock(@protocol(FlutterTextureRegistry)); - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); - OCMStub([registrar textures]).andReturn(mockTextureRegistry); + TestTextureRegistry *textureRegistry = [[TestTextureRegistry alloc] init]; StubFVPDisplayLinkFactory *stubDisplayLinkFactory = [[StubFVPDisplayLinkFactory alloc] init]; - AVPlayerItemVideoOutput *mockVideoOutput = OCMPartialMock([[AVPlayerItemVideoOutput alloc] init]); - FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] - initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil output:mockVideoOutput] - displayLinkFactory:stubDisplayLinkFactory - viewProvider:[[StubViewProvider alloc] init] - registrar:registrar]; + FVPVideoPlayerPlugin *videoPlayerPlugin = + [[FVPVideoPlayerPlugin alloc] initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil + playerItem:nil + pixelBufferSource:nil] + displayLinkFactory:stubDisplayLinkFactory + binaryMessenger:[[StubBinaryMessenger alloc] init] + textureRegistry:textureRegistry + viewProvider:[[StubViewProvider alloc] init] + assetProvider:[[StubAssetProvider alloc] init]]; FlutterError *initializationError; [videoPlayerPlugin initialize:&initializationError]; @@ -290,23 +503,23 @@ - (void)testPlayerForPlatformViewDoesNotRegisterTexture { FlutterError *createError; [videoPlayerPlugin createPlatformViewPlayerWithOptions:create error:&createError]; - OCMVerify(never(), [mockTextureRegistry registerTexture:[OCMArg any]]); + XCTAssertFalse(textureRegistry.registeredTexture); } - (void)testSeekToWhilePausedStartsDisplayLinkTemporarily { - NSObject *mockTextureRegistry = - OCMProtocolMock(@protocol(FlutterTextureRegistry)); - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); - OCMStub([registrar textures]).andReturn(mockTextureRegistry); StubFVPDisplayLinkFactory *stubDisplayLinkFactory = [[StubFVPDisplayLinkFactory alloc] init]; - AVPlayerItemVideoOutput *mockVideoOutput = OCMPartialMock([[AVPlayerItemVideoOutput alloc] init]); + TestPixelBufferSource *mockVideoOutput = [[TestPixelBufferSource alloc] init]; // Display link and frame updater wire-up is currently done in FVPVideoPlayerPlugin, so create // the player via the plugin instead of directly to include that logic in the test. FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] - initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil output:mockVideoOutput] + initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil + playerItem:nil + pixelBufferSource:mockVideoOutput] displayLinkFactory:stubDisplayLinkFactory + binaryMessenger:[[StubBinaryMessenger alloc] init] + textureRegistry:[[TestTextureRegistry alloc] init] viewProvider:[[StubViewProvider alloc] init] - registrar:registrar]; + assetProvider:[[StubAssetProvider alloc] init]]; FlutterError *initializationError; [videoPlayerPlugin initialize:&initializationError]; @@ -335,14 +548,10 @@ - (void)testSeekToWhilePausedStartsDisplayLinkTemporarily { XCTAssertTrue(stubDisplayLinkFactory.displayLink.running); // Simulate a buffer being available. - OCMStub([mockVideoOutput hasNewPixelBufferForItemTime:kCMTimeZero]) - .ignoringNonObjectArgs() - .andReturn(YES); CVPixelBufferRef bufferRef; CVPixelBufferCreate(NULL, 1, 1, kCVPixelFormatType_32BGRA, NULL, &bufferRef); - OCMStub([mockVideoOutput copyPixelBufferForItemTime:kCMTimeZero itemTimeForDisplay:NULL]) - .ignoringNonObjectArgs() - .andReturn(bufferRef); + mockVideoOutput.pixelBuffer = bufferRef; + CVPixelBufferRelease(bufferRef); // Simulate a callback from the engine to request a new frame. stubDisplayLinkFactory.fireDisplayLink(); CFRelease([player copyPixelBuffer]); @@ -351,19 +560,17 @@ - (void)testSeekToWhilePausedStartsDisplayLinkTemporarily { } - (void)testInitStartsDisplayLinkTemporarily { - NSObject *mockTextureRegistry = - OCMProtocolMock(@protocol(FlutterTextureRegistry)); - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); - OCMStub([registrar textures]).andReturn(mockTextureRegistry); StubFVPDisplayLinkFactory *stubDisplayLinkFactory = [[StubFVPDisplayLinkFactory alloc] init]; - AVPlayerItemVideoOutput *mockVideoOutput = OCMPartialMock([[AVPlayerItemVideoOutput alloc] init]); - StubAVPlayer *stubAVPlayer = [[StubAVPlayer alloc] init]; + TestPixelBufferSource *mockVideoOutput = [[TestPixelBufferSource alloc] init]; FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] - initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:stubAVPlayer - output:mockVideoOutput] + initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil + playerItem:nil + pixelBufferSource:mockVideoOutput] displayLinkFactory:stubDisplayLinkFactory + binaryMessenger:[[StubBinaryMessenger alloc] init] + textureRegistry:[[TestTextureRegistry alloc] init] viewProvider:[[StubViewProvider alloc] init] - registrar:registrar]; + assetProvider:[[StubAssetProvider alloc] init]]; FlutterError *initializationError; [videoPlayerPlugin initialize:&initializationError]; @@ -379,14 +586,10 @@ - (void)testInitStartsDisplayLinkTemporarily { XCTAssertTrue(stubDisplayLinkFactory.displayLink.running); // Simulate a buffer being available. - OCMStub([mockVideoOutput hasNewPixelBufferForItemTime:kCMTimeZero]) - .ignoringNonObjectArgs() - .andReturn(YES); CVPixelBufferRef bufferRef; CVPixelBufferCreate(NULL, 1, 1, kCVPixelFormatType_32BGRA, NULL, &bufferRef); - OCMStub([mockVideoOutput copyPixelBufferForItemTime:kCMTimeZero itemTimeForDisplay:NULL]) - .ignoringNonObjectArgs() - .andReturn(bufferRef); + mockVideoOutput.pixelBuffer = bufferRef; + CVPixelBufferRelease(bufferRef); // Simulate a callback from the engine to request a new frame. FVPTextureBasedVideoPlayer *player = (FVPTextureBasedVideoPlayer *)videoPlayerPlugin.playersByIdentifier[@(identifiers.playerId)]; @@ -397,19 +600,19 @@ - (void)testInitStartsDisplayLinkTemporarily { } - (void)testSeekToWhilePlayingDoesNotStopDisplayLink { - NSObject *mockTextureRegistry = - OCMProtocolMock(@protocol(FlutterTextureRegistry)); - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); - OCMStub([registrar textures]).andReturn(mockTextureRegistry); StubFVPDisplayLinkFactory *stubDisplayLinkFactory = [[StubFVPDisplayLinkFactory alloc] init]; - AVPlayerItemVideoOutput *mockVideoOutput = OCMPartialMock([[AVPlayerItemVideoOutput alloc] init]); + TestPixelBufferSource *mockVideoOutput = [[TestPixelBufferSource alloc] init]; // Display link and frame updater wire-up is currently done in FVPVideoPlayerPlugin, so create // the player via the plugin instead of directly to include that logic in the test. FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] - initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil output:mockVideoOutput] + initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil + playerItem:nil + pixelBufferSource:mockVideoOutput] displayLinkFactory:stubDisplayLinkFactory + binaryMessenger:[[StubBinaryMessenger alloc] init] + textureRegistry:[[TestTextureRegistry alloc] init] viewProvider:[[StubViewProvider alloc] init] - registrar:registrar]; + assetProvider:[[StubAssetProvider alloc] init]]; FlutterError *initializationError; [videoPlayerPlugin initialize:&initializationError]; @@ -436,14 +639,10 @@ - (void)testSeekToWhilePlayingDoesNotStopDisplayLink { XCTAssertTrue(stubDisplayLinkFactory.displayLink.running); // Simulate a buffer being available. - OCMStub([mockVideoOutput hasNewPixelBufferForItemTime:kCMTimeZero]) - .ignoringNonObjectArgs() - .andReturn(YES); CVPixelBufferRef bufferRef; CVPixelBufferCreate(NULL, 1, 1, kCVPixelFormatType_32BGRA, NULL, &bufferRef); - OCMStub([mockVideoOutput copyPixelBufferForItemTime:kCMTimeZero itemTimeForDisplay:NULL]) - .ignoringNonObjectArgs() - .andReturn(bufferRef); + mockVideoOutput.pixelBuffer = bufferRef; + CVPixelBufferRelease(bufferRef); // Simulate a callback from the engine to request a new frame. stubDisplayLinkFactory.fireDisplayLink(); CFRelease([player copyPixelBuffer]); @@ -452,19 +651,18 @@ - (void)testSeekToWhilePlayingDoesNotStopDisplayLink { } - (void)testPauseWhileWaitingForFrameDoesNotStopDisplayLink { - NSObject *mockTextureRegistry = - OCMProtocolMock(@protocol(FlutterTextureRegistry)); - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); - OCMStub([registrar textures]).andReturn(mockTextureRegistry); StubFVPDisplayLinkFactory *stubDisplayLinkFactory = [[StubFVPDisplayLinkFactory alloc] init]; - AVPlayerItemVideoOutput *mockVideoOutput = OCMPartialMock([[AVPlayerItemVideoOutput alloc] init]); // Display link and frame updater wire-up is currently done in FVPVideoPlayerPlugin, so create // the player via the plugin instead of directly to include that logic in the test. - FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] - initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil output:mockVideoOutput] - displayLinkFactory:stubDisplayLinkFactory - viewProvider:[[StubViewProvider alloc] init] - registrar:registrar]; + FVPVideoPlayerPlugin *videoPlayerPlugin = + [[FVPVideoPlayerPlugin alloc] initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil + playerItem:nil + pixelBufferSource:nil] + displayLinkFactory:stubDisplayLinkFactory + binaryMessenger:[[StubBinaryMessenger alloc] init] + textureRegistry:[[TestTextureRegistry alloc] init] + viewProvider:[[StubViewProvider alloc] init] + assetProvider:[[StubAssetProvider alloc] init]]; FlutterError *initializationError; [videoPlayerPlugin initialize:&initializationError]; @@ -488,9 +686,15 @@ - (void)testPauseWhileWaitingForFrameDoesNotStopDisplayLink { } - (void)testDeregistersFromPlayer { - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); FVPVideoPlayerPlugin *videoPlayerPlugin = - (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; + [[FVPVideoPlayerPlugin alloc] initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil + playerItem:nil + pixelBufferSource:nil] + displayLinkFactory:nil + binaryMessenger:[[StubBinaryMessenger alloc] init] + textureRegistry:[[TestTextureRegistry alloc] init] + viewProvider:[[StubViewProvider alloc] init] + assetProvider:[[StubAssetProvider alloc] init]]; FlutterError *error; [videoPlayerPlugin initialize:&error]; @@ -505,21 +709,21 @@ - (void)testDeregistersFromPlayer { XCTAssertNotNil(identifiers); FVPVideoPlayer *player = videoPlayerPlugin.playersByIdentifier[@(identifiers.playerId)]; XCTAssertNotNil(player); - AVPlayer *avPlayer = player.player; - - [self keyValueObservingExpectationForObject:avPlayer keyPath:@"currentItem" expectedValue:nil]; [player disposeWithError:&error]; XCTAssertEqual(videoPlayerPlugin.playersByIdentifier.count, 0); XCTAssertNil(error); - - [self waitForExpectationsWithTimeout:30.0 handler:nil]; } - (void)testBufferingStateFromPlayer { - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; FVPVideoPlayerPlugin *videoPlayerPlugin = - (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; + [[FVPVideoPlayerPlugin alloc] initWithAVFactory:realObjectFactory + displayLinkFactory:nil + binaryMessenger:[[StubBinaryMessenger alloc] init] + textureRegistry:[[TestTextureRegistry alloc] init] + viewProvider:[[StubViewProvider alloc] init] + assetProvider:[[StubAssetProvider alloc] init]]; FlutterError *error; [videoPlayerPlugin initialize:&error]; @@ -610,14 +814,15 @@ - (void)testTransformFix { #endif - (void)testSeekToleranceWhenNotSeekingToEnd { - StubAVPlayer *stubAVPlayer = [[StubAVPlayer alloc] init]; - StubFVPAVFactory *stubAVFactory = [[StubFVPAVFactory alloc] initWithPlayer:stubAVPlayer - output:nil]; + InspectableAVPlayer *inspectableAVPlayer = [[InspectableAVPlayer alloc] init]; + StubFVPAVFactory *stubAVFactory = [[StubFVPAVFactory alloc] initWithPlayer:inspectableAVPlayer + playerItem:nil + pixelBufferSource:nil]; FVPVideoPlayer *player = - [[FVPVideoPlayer alloc] initWithPlayerItem:[self playerItemWithURL:self.mp4TestURL] + [[FVPVideoPlayer alloc] initWithPlayerItem:[[StubPlayerItem alloc] init] avFactory:stubAVFactory viewProvider:[[StubViewProvider alloc] init]]; - NSObject *listener = OCMProtocolMock(@protocol(FVPVideoEventListener)); + NSObject *listener = [[StubEventListener alloc] init]; player.eventListener = listener; XCTestExpectation *seekExpectation = @@ -628,19 +833,20 @@ - (void)testSeekToleranceWhenNotSeekingToEnd { }]; [self waitForExpectationsWithTimeout:30.0 handler:nil]; - XCTAssertEqual([stubAVPlayer.beforeTolerance intValue], 0); - XCTAssertEqual([stubAVPlayer.afterTolerance intValue], 0); + XCTAssertEqual([inspectableAVPlayer.beforeTolerance intValue], 0); + XCTAssertEqual([inspectableAVPlayer.afterTolerance intValue], 0); } - (void)testSeekToleranceWhenSeekingToEnd { - StubAVPlayer *stubAVPlayer = [[StubAVPlayer alloc] init]; - StubFVPAVFactory *stubAVFactory = [[StubFVPAVFactory alloc] initWithPlayer:stubAVPlayer - output:nil]; + InspectableAVPlayer *inspectableAVPlayer = [[InspectableAVPlayer alloc] init]; + StubFVPAVFactory *stubAVFactory = [[StubFVPAVFactory alloc] initWithPlayer:inspectableAVPlayer + playerItem:nil + pixelBufferSource:nil]; FVPVideoPlayer *player = - [[FVPVideoPlayer alloc] initWithPlayerItem:[self playerItemWithURL:self.mp4TestURL] + [[FVPVideoPlayer alloc] initWithPlayerItem:[[StubPlayerItem alloc] init] avFactory:stubAVFactory viewProvider:[[StubViewProvider alloc] init]]; - NSObject *listener = OCMProtocolMock(@protocol(FVPVideoEventListener)); + NSObject *listener = [[StubEventListener alloc] init]; player.eventListener = listener; XCTestExpectation *seekExpectation = @@ -651,8 +857,8 @@ - (void)testSeekToleranceWhenSeekingToEnd { [seekExpectation fulfill]; }]; [self waitForExpectationsWithTimeout:30.0 handler:nil]; - XCTAssertGreaterThan([stubAVPlayer.beforeTolerance intValue], 0); - XCTAssertGreaterThan([stubAVPlayer.afterTolerance intValue], 0); + XCTAssertGreaterThan([inspectableAVPlayer.beforeTolerance intValue], 0); + XCTAssertGreaterThan([inspectableAVPlayer.afterTolerance intValue], 0); } /// Sanity checks a video player playing the given URL with the actual AVPlayer. This is essentially @@ -660,12 +866,13 @@ - (void)testSeekToleranceWhenSeekingToEnd { /// /// Returns the stub event listener to allow tests to inspect the call state. - (StubEventListener *)sanityTestURI:(NSString *)testURI { + NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; NSURL *testURL = [NSURL URLWithString:testURI]; XCTAssertNotNil(testURL); - FVPVideoPlayer *player = - [[FVPVideoPlayer alloc] initWithPlayerItem:[self playerItemWithURL:testURL] - avFactory:[[FVPDefaultAVFactory alloc] init] - viewProvider:[[StubViewProvider alloc] init]]; + FVPVideoPlayer *player = [[FVPVideoPlayer alloc] + initWithPlayerItem:[self playerItemWithURL:testURL factory:realObjectFactory] + avFactory:realObjectFactory + viewProvider:[[StubViewProvider alloc] init]]; XCTAssertNotNil(player); XCTestExpectation *initializedExpectation = [self expectationWithDescription:@"initialized"]; @@ -702,7 +909,7 @@ - (StubEventListener *)sanityTestURI:(NSString *)testURI { // // Failing to de-register results in a crash in [AVPlayer willChangeValueForKey:]. - (void)testDoesNotCrashOnRateObservationAfterDisposal { - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; AVPlayer *avPlayer = nil; __weak FVPVideoPlayer *weakPlayer = nil; @@ -710,7 +917,12 @@ - (void)testDoesNotCrashOnRateObservationAfterDisposal { // Autoreleasepool is needed to simulate conditions of FVPVideoPlayer deallocation. @autoreleasepool { FVPVideoPlayerPlugin *videoPlayerPlugin = - (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; + [[FVPVideoPlayerPlugin alloc] initWithAVFactory:realObjectFactory + displayLinkFactory:nil + binaryMessenger:[[StubBinaryMessenger alloc] init] + textureRegistry:[[TestTextureRegistry alloc] init] + viewProvider:[[StubViewProvider alloc] init] + assetProvider:[[StubAssetProvider alloc] init]]; FlutterError *error; [videoPlayerPlugin initialize:&error]; @@ -754,14 +966,19 @@ - (void)testDoesNotCrashOnRateObservationAfterDisposal { // Both of these methods dispatch [FVPVideoPlayer dispose] on the main thread // leading to a possible crash when de-registering observers twice. - (void)testHotReloadDoesNotCrash { - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); - __weak FVPVideoPlayer *weakPlayer = nil; // Autoreleasepool is needed to simulate conditions of FVPVideoPlayer deallocation. @autoreleasepool { - FVPVideoPlayerPlugin *videoPlayerPlugin = - (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; + FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] + initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil + playerItem:nil + pixelBufferSource:nil] + displayLinkFactory:nil + binaryMessenger:[[StubBinaryMessenger alloc] init] + textureRegistry:[[TestTextureRegistry alloc] init] + viewProvider:[[StubViewProvider alloc] init] + assetProvider:[[StubAssetProvider alloc] init]]; FlutterError *error; [videoPlayerPlugin initialize:&error]; @@ -801,34 +1018,16 @@ - (void)testHotReloadDoesNotCrash { handler:nil]; // No assertions needed. Lack of crash is a success. } -- (void)testNativeVideoViewFactoryRegistration { - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); - - OCMExpect([registrar registerViewFactory:[OCMArg isKindOfClass:[FVPNativeVideoViewFactory class]] - withId:@"plugins.flutter.dev/video_player_ios"]); - [FVPVideoPlayerPlugin registerWithRegistrar:registrar]; - - OCMVerifyAll(registrar); -} - -- (void)testPublishesInRegistration { - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); - __block NSObject *publishedValue; - OCMStub([registrar publish:[OCMArg checkWithBlock:^BOOL(id value) { - publishedValue = value; - return YES; - }]]); - - [FVPVideoPlayerPlugin registerWithRegistrar:registrar]; - - XCTAssertNotNil(publishedValue); - XCTAssertTrue([publishedValue isKindOfClass:[FVPVideoPlayerPlugin class]]); -} - - (void)testFailedToLoadVideoEventShouldBeAlwaysSent { - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + // Use real objects to test a real failure flow. + NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; FVPVideoPlayerPlugin *videoPlayerPlugin = - [[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; + [[FVPVideoPlayerPlugin alloc] initWithAVFactory:realObjectFactory + displayLinkFactory:nil + binaryMessenger:[[StubBinaryMessenger alloc] init] + textureRegistry:[[TestTextureRegistry alloc] init] + viewProvider:[[StubViewProvider alloc] init] + assetProvider:[[StubAssetProvider alloc] init]]; FlutterError *error; [videoPlayerPlugin initialize:&error]; @@ -858,9 +1057,10 @@ - (void)testFailedToLoadVideoEventShouldBeAlwaysSent { } - (void)testUpdatePlayingStateShouldNotResetRate { + NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; FVPVideoPlayer *player = [[FVPVideoPlayer alloc] - initWithPlayerItem:[self playerItemWithURL:self.mp4TestURL] - avFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil output:nil] + initWithPlayerItem:[self playerItemWithURL:self.mp4TestURL factory:realObjectFactory] + avFactory:realObjectFactory viewProvider:[[StubViewProvider alloc] init]]; XCTestExpectation *initializedExpectation = [self expectationWithDescription:@"initialized"]; @@ -876,18 +1076,19 @@ - (void)testUpdatePlayingStateShouldNotResetRate { } - (void)testPlayerShouldNotDropEverySecondFrame { - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); - NSObject *mockTextureRegistry = - OCMProtocolMock(@protocol(FlutterTextureRegistry)); - OCMStub([registrar textures]).andReturn(mockTextureRegistry); + TestTextureRegistry *textureRegistry = [[TestTextureRegistry alloc] init]; StubFVPDisplayLinkFactory *stubDisplayLinkFactory = [[StubFVPDisplayLinkFactory alloc] init]; - AVPlayerItemVideoOutput *mockVideoOutput = OCMPartialMock([[AVPlayerItemVideoOutput alloc] init]); + TestPixelBufferSource *mockVideoOutput = [[TestPixelBufferSource alloc] init]; FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] - initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil output:mockVideoOutput] + initWithAVFactory:[[StubFVPAVFactory alloc] initWithPlayer:nil + playerItem:nil + pixelBufferSource:mockVideoOutput] displayLinkFactory:stubDisplayLinkFactory + binaryMessenger:[[StubBinaryMessenger alloc] init] + textureRegistry:textureRegistry viewProvider:[[StubViewProvider alloc] init] - registrar:registrar]; + assetProvider:[[StubAssetProvider alloc] init]]; FlutterError *error; [videoPlayerPlugin initialize:&error]; @@ -898,59 +1099,36 @@ - (void)testPlayerShouldNotDropEverySecondFrame { FVPTexturePlayerIds *identifiers = [videoPlayerPlugin createTexturePlayerWithOptions:create error:&error]; NSInteger playerIdentifier = identifiers.playerId; - NSInteger textureIdentifier = identifiers.textureId; FVPTextureBasedVideoPlayer *player = (FVPTextureBasedVideoPlayer *)videoPlayerPlugin.playersByIdentifier[@(playerIdentifier)]; - __block CMTime currentTime = kCMTimeZero; - OCMStub([mockVideoOutput itemTimeForHostTime:0]) - .ignoringNonObjectArgs() - .andDo(^(NSInvocation *invocation) { - [invocation setReturnValue:¤tTime]; - }); - __block NSMutableSet *pixelBuffers = NSMutableSet.new; - OCMStub([mockVideoOutput hasNewPixelBufferForItemTime:kCMTimeZero]) - .ignoringNonObjectArgs() - .andDo(^(NSInvocation *invocation) { - CMTime itemTime; - [invocation getArgument:&itemTime atIndex:2]; - BOOL has = [pixelBuffers containsObject:[NSValue valueWithCMTime:itemTime]]; - [invocation setReturnValue:&has]; - }); - OCMStub([mockVideoOutput copyPixelBufferForItemTime:kCMTimeZero - itemTimeForDisplay:[OCMArg anyPointer]]) - .ignoringNonObjectArgs() - .andDo(^(NSInvocation *invocation) { - CMTime itemTime; - [invocation getArgument:&itemTime atIndex:2]; - CVPixelBufferRef bufferRef = NULL; - if ([pixelBuffers containsObject:[NSValue valueWithCMTime:itemTime]]) { - CVPixelBufferCreate(NULL, 1, 1, kCVPixelFormatType_32BGRA, NULL, &bufferRef); - } - [pixelBuffers removeObject:[NSValue valueWithCMTime:itemTime]]; - [invocation setReturnValue:&bufferRef]; - }); - void (^advanceFrame)(void) = ^{ - currentTime.value++; - [pixelBuffers addObject:[NSValue valueWithCMTime:currentTime]]; + void (^addFrame)(void) = ^{ + CVPixelBufferRef bufferRef; + CVPixelBufferCreate(NULL, 1, 1, kCVPixelFormatType_32BGRA, NULL, &bufferRef); + mockVideoOutput.pixelBuffer = bufferRef; + CVPixelBufferRelease(bufferRef); }; - advanceFrame(); - OCMExpect([mockTextureRegistry textureFrameAvailable:textureIdentifier]); + addFrame(); stubDisplayLinkFactory.fireDisplayLink(); - OCMVerifyAllWithDelay(mockTextureRegistry, 10); - - advanceFrame(); - OCMExpect([mockTextureRegistry textureFrameAvailable:textureIdentifier]); CFRelease([player copyPixelBuffer]); + XCTAssertEqual(textureRegistry.textureFrameAvailableCount, 1); + + addFrame(); stubDisplayLinkFactory.fireDisplayLink(); - OCMVerifyAllWithDelay(mockTextureRegistry, 10); + CFRelease([player copyPixelBuffer]); + XCTAssertEqual(textureRegistry.textureFrameAvailableCount, 2); } - (void)testVideoOutputIsAddedWhenAVPlayerItemBecomesReady { - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; FVPVideoPlayerPlugin *videoPlayerPlugin = - [[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; + [[FVPVideoPlayerPlugin alloc] initWithAVFactory:realObjectFactory + displayLinkFactory:nil + binaryMessenger:[[StubBinaryMessenger alloc] init] + textureRegistry:[[TestTextureRegistry alloc] init] + viewProvider:[[StubViewProvider alloc] init] + assetProvider:[[StubAssetProvider alloc] init]]; FlutterError *error; [videoPlayerPlugin initialize:&error]; XCTAssertNil(error); @@ -976,36 +1154,55 @@ - (void)testVideoOutputIsAddedWhenAVPlayerItemBecomesReady { #if TARGET_OS_IOS - (void)testVideoPlayerShouldNotOverwritePlayAndRecordNorDefaultToSpeaker { - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); + StubFVPAVFactory *stubFactory = [[StubFVPAVFactory alloc] initWithPlayer:nil + playerItem:nil + pixelBufferSource:nil]; + TestAudioSession *audioSession = [[TestAudioSession alloc] init]; + stubFactory.audioSession = audioSession; FVPVideoPlayerPlugin *videoPlayerPlugin = - [[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; - FlutterError *error; + [[FVPVideoPlayerPlugin alloc] initWithAVFactory:stubFactory + displayLinkFactory:nil + binaryMessenger:[[StubBinaryMessenger alloc] init] + textureRegistry:[[TestTextureRegistry alloc] init] + viewProvider:[[StubViewProvider alloc] init] + assetProvider:[[StubAssetProvider alloc] init]]; - [AVAudioSession.sharedInstance setCategory:AVAudioSessionCategoryPlayAndRecord - withOptions:AVAudioSessionCategoryOptionDefaultToSpeaker - error:nil]; + audioSession.category = AVAudioSessionCategoryPlayAndRecord; + audioSession.categoryOptions = AVAudioSessionCategoryOptionDefaultToSpeaker; + FlutterError *error; [videoPlayerPlugin initialize:&error]; [videoPlayerPlugin setMixWithOthers:true error:&error]; - XCTAssert(AVAudioSession.sharedInstance.category == AVAudioSessionCategoryPlayAndRecord, + XCTAssert(audioSession.category == AVAudioSessionCategoryPlayAndRecord, @"Category should be PlayAndRecord."); - XCTAssert( - AVAudioSession.sharedInstance.categoryOptions & AVAudioSessionCategoryOptionDefaultToSpeaker, - @"Flag DefaultToSpeaker was removed."); - XCTAssert( - AVAudioSession.sharedInstance.categoryOptions & AVAudioSessionCategoryOptionMixWithOthers, - @"Flag MixWithOthers should be set."); - - id sessionMock = OCMClassMock([AVAudioSession class]); - OCMStub([sessionMock sharedInstance]).andReturn(sessionMock); - OCMStub([sessionMock category]).andReturn(AVAudioSessionCategoryPlayAndRecord); - OCMStub([sessionMock categoryOptions]) - .andReturn(AVAudioSessionCategoryOptionMixWithOthers | - AVAudioSessionCategoryOptionDefaultToSpeaker); - OCMReject([sessionMock setCategory:OCMOCK_ANY withOptions:0 error:[OCMArg setTo:nil]]) - .ignoringNonObjectArgs(); + XCTAssert(audioSession.categoryOptions & AVAudioSessionCategoryOptionDefaultToSpeaker, + @"Flag DefaultToSpeaker was removed."); + XCTAssert(audioSession.categoryOptions & AVAudioSessionCategoryOptionMixWithOthers, + @"Flag MixWithOthers should be set."); +} + +- (void)testSetMixWithOthersShouldNoOpWhenNoChangesAreRequired { + StubFVPAVFactory *stubFactory = [[StubFVPAVFactory alloc] initWithPlayer:nil + playerItem:nil + pixelBufferSource:nil]; + TestAudioSession *audioSession = [[TestAudioSession alloc] init]; + stubFactory.audioSession = audioSession; + FVPVideoPlayerPlugin *videoPlayerPlugin = + [[FVPVideoPlayerPlugin alloc] initWithAVFactory:stubFactory + displayLinkFactory:nil + binaryMessenger:[[StubBinaryMessenger alloc] init] + textureRegistry:[[TestTextureRegistry alloc] init] + viewProvider:[[StubViewProvider alloc] init] + assetProvider:[[StubAssetProvider alloc] init]]; + + audioSession.category = AVAudioSessionCategoryPlayAndRecord; + audioSession.categoryOptions = + AVAudioSessionCategoryOptionMixWithOthers | AVAudioSessionCategoryOptionDefaultToSpeaker; + FlutterError *error; [videoPlayerPlugin setMixWithOthers:true error:&error]; + + XCTAssertFalse(audioSession.setCategoryCalled); } - (void)validateTransformFixForOrientation:(UIImageOrientation)orientation { @@ -1058,8 +1255,9 @@ - (nonnull NSURL *)mp4TestURL { URLWithString:@"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4"]; } -- (nonnull AVPlayerItem *)playerItemWithURL:(NSURL *)url { - return [AVPlayerItem playerItemWithAsset:[AVURLAsset URLAssetWithURL:url options:nil]]; +- (nonnull NSObject *)playerItemWithURL:(NSURL *)url + factory:(NSObject *)factory { + return [factory playerItemWithAsset:[factory URLAssetWithURL:url options:nil]]; } #pragma mark - Audio Track Tests @@ -1067,10 +1265,11 @@ - (nonnull AVPlayerItem *)playerItemWithURL:(NSURL *)url { // Tests getAudioTracks with a regular MP4 video file using real AVFoundation. // Regular MP4 files do not have media selection groups, so getAudioTracks returns an empty array. - (void)testGetAudioTracksWithRealMP4Video { - FVPVideoPlayer *player = - [[FVPVideoPlayer alloc] initWithPlayerItem:[self playerItemWithURL:self.mp4TestURL] - avFactory:[[FVPDefaultAVFactory alloc] init] - viewProvider:[[StubViewProvider alloc] init]]; + NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; + FVPVideoPlayer *player = [[FVPVideoPlayer alloc] + initWithPlayerItem:[self playerItemWithURL:self.mp4TestURL factory:realObjectFactory] + avFactory:realObjectFactory + viewProvider:[[StubViewProvider alloc] init]]; XCTAssertNotNil(player); XCTestExpectation *initializedExpectation = [self expectationWithDescription:@"initialized"]; @@ -1096,14 +1295,15 @@ - (void)testGetAudioTracksWithRealMP4Video { // Tests getAudioTracks with an HLS stream using real AVFoundation. // HLS streams use media selection groups for audio track selection. - (void)testGetAudioTracksWithRealHLSStream { + NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; NSURL *hlsURL = [NSURL URLWithString:@"https://flutter.github.io/assets-for-api-docs/assets/videos/hls/bee.m3u8"]; XCTAssertNotNil(hlsURL); - FVPVideoPlayer *player = - [[FVPVideoPlayer alloc] initWithPlayerItem:[self playerItemWithURL:hlsURL] - avFactory:[[FVPDefaultAVFactory alloc] init] - viewProvider:[[StubViewProvider alloc] init]]; + FVPVideoPlayer *player = [[FVPVideoPlayer alloc] + initWithPlayerItem:[self playerItemWithURL:hlsURL factory:realObjectFactory] + avFactory:realObjectFactory + viewProvider:[[StubViewProvider alloc] init]]; XCTAssertNotNil(player); XCTestExpectation *initializedExpectation = [self expectationWithDescription:@"initialized"]; @@ -1133,14 +1333,17 @@ - (void)testGetAudioTracksWithRealHLSStream { // Tests that getAudioTracks returns valid data for audio-only files. // Regular audio files do not have media selection groups, so getAudioTracks returns an empty array. - (void)testGetAudioTracksWithRealAudioFile { + // TODO(stuartmorgan): Add more use of protocols in FVPVideoPlayer so that this test + // can use a fake item/asset instead of loading an actual remote asset. + NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; NSURL *audioURL = [NSURL URLWithString:@"https://flutter.github.io/assets-for-api-docs/assets/audio/rooster.mp3"]; XCTAssertNotNil(audioURL); - FVPVideoPlayer *player = - [[FVPVideoPlayer alloc] initWithPlayerItem:[self playerItemWithURL:audioURL] - avFactory:[[FVPDefaultAVFactory alloc] init] - viewProvider:[[StubViewProvider alloc] init]]; + FVPVideoPlayer *player = [[FVPVideoPlayer alloc] + initWithPlayerItem:[self playerItemWithURL:audioURL factory:realObjectFactory] + avFactory:realObjectFactory + viewProvider:[[StubViewProvider alloc] init]]; XCTAssertNotNil(player); XCTestExpectation *initializedExpectation = [self expectationWithDescription:@"initialized"]; @@ -1166,24 +1369,16 @@ - (void)testGetAudioTracksWithRealAudioFile { // Tests that getAudioTracks works correctly through the plugin API with a real video. // Regular MP4 files do not have media selection groups, so getAudioTracks returns an empty array. - (void)testGetAudioTracksViaPluginWithRealVideo { - NSObject *registrar = OCMProtocolMock(@protocol(FlutterPluginRegistrar)); - FVPVideoPlayerPlugin *videoPlayerPlugin = - [[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; - - FlutterError *error; - [videoPlayerPlugin initialize:&error]; - XCTAssertNil(error); - - FVPCreationOptions *create = [FVPCreationOptions - makeWithUri:@"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4" - httpHeaders:@{}]; - FVPTexturePlayerIds *identifiers = [videoPlayerPlugin createTexturePlayerWithOptions:create - error:&error]; - XCTAssertNil(error); - XCTAssertNotNil(identifiers); - - FVPVideoPlayer *player = videoPlayerPlugin.playersByIdentifier[@(identifiers.playerId)]; - XCTAssertNotNil(player); + // TODO(stuartmorgan): Add more use of protocols in FVPVideoPlayer so that this test + // can use a fake item/asset instead of loading an actual remote asset. + NSObject *realObjectFactory = [[FVPDefaultAVFactory alloc] init]; + NSURL *testURL = + [NSURL URLWithString:@"https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4"]; + XCTAssertNotNil(testURL); + FVPVideoPlayer *player = [[FVPVideoPlayer alloc] + initWithPlayerItem:[self playerItemWithURL:testURL factory:realObjectFactory] + avFactory:realObjectFactory + viewProvider:[[StubViewProvider alloc] init]]; // Wait for player item to become ready AVPlayerItem *item = player.player.currentItem; @@ -1193,6 +1388,7 @@ - (void)testGetAudioTracksViaPluginWithRealVideo { [self waitForExpectationsWithTimeout:30.0 handler:nil]; // Now test getAudioTracks + FlutterError *error; NSArray *result = [player getAudioTracks:&error]; XCTAssertNil(error); @@ -1207,43 +1403,23 @@ - (void)testGetAudioTracksViaPluginWithRealVideo { - (void)testLoadTracksWithMediaTypeIsCalledOnNewerOS { if (@available(iOS 15.0, macOS 12.0, *)) { - AVAsset *mockAsset = OCMClassMock([AVAsset class]); - AVPlayerItem *mockItem = OCMClassMock([AVPlayerItem class]); - OCMStub([mockItem asset]).andReturn(mockAsset); - - // Stub loadValuesAsynchronouslyForKeys to immediately call completion - OCMStub([mockAsset loadValuesAsynchronouslyForKeys:[OCMArg any] - completionHandler:[OCMArg invokeBlock]]); - - // Stub statusOfValueForKey to return Loaded - OCMStub([mockAsset statusOfValueForKey:@"tracks" error:[OCMArg anyObjectRef]]) - .andReturn(AVKeyValueStatusLoaded); - - // Expect loadTracksWithMediaType:completionHandler: - XCTestExpectation *expectation = - [self expectationWithDescription:@"loadTracksWithMediaType called"]; - OCMExpect([mockAsset loadTracksWithMediaType:AVMediaTypeVideo completionHandler:[OCMArg any]]) - .andDo(^(NSInvocation *invocation) { - [expectation fulfill]; - // Invoke the completion handler to prevent leaks or hangs if the code waits for it - void (^completion)(NSArray *, NSError *); - [invocation getArgument:&completion atIndex:3]; - completion(@[], nil); - }); - - StubFVPAVFactory *stubAVFactory = [[StubFVPAVFactory alloc] initWithPlayer:nil output:nil]; + TestAsset *mockAsset = [[TestAsset alloc] initWithDuration:CMTimeMake(1, 1) tracks:@[]]; + NSObject *item = [[StubPlayerItem alloc] initWithAsset:mockAsset]; + + StubFVPAVFactory *stubAVFactory = [[StubFVPAVFactory alloc] initWithPlayer:nil + playerItem:item + pixelBufferSource:nil]; StubViewProvider *stubViewProvider = #if TARGET_OS_OSX [[StubViewProvider alloc] initWithView:nil]; #else [[StubViewProvider alloc] initWithViewController:nil]; #endif - FVPVideoPlayer *player = [[FVPVideoPlayer alloc] initWithPlayerItem:mockItem + FVPVideoPlayer *player = [[FVPVideoPlayer alloc] initWithPlayerItem:item avFactory:stubAVFactory viewProvider:stubViewProvider]; - (void)player; // Keep reference - - [self waitForExpectationsWithTimeout:5.0 handler:nil]; + XCTAssertNotNil(player); + XCTAssertTrue(mockAsset.loadedTracksAsynchronously); } } diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/AVAssetTrackUtils.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/AVAssetTrackUtils.m index f3ba81b6eb72..11c1ff285376 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/AVAssetTrackUtils.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/AVAssetTrackUtils.m @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import +@import AVFoundation; CGAffineTransform FVPGetStandardizedTransformForTrack(AVAssetTrack *track) { CGAffineTransform t = track.preferredTransform; diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPAVFactory.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPAVFactory.m index 9024e5d24d6f..167ae1feac5d 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPAVFactory.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPAVFactory.m @@ -4,15 +4,160 @@ #import "./include/video_player_avfoundation/FVPAVFactory.h" -#import +@import AVFoundation; + +@interface FVPDefaultAVAsset : NSObject +@property(nonatomic, readwrite) AVAsset *asset; +@end + +@implementation FVPDefaultAVAsset +- (instancetype)initWithAsset:(AVAsset *)asset { + self = [super init]; + if (self) { + _asset = asset; + } + return self; +} + +- (CMTime)duration { + return self.asset.duration; +} + +- (AVKeyValueStatus)statusOfValueForKey:(NSString *)key + error:(NSError *_Nullable *_Nullable)outError { + return [self.asset statusOfValueForKey:key error:outError]; +} + +- (void)loadValuesAsynchronouslyForKeys:(NSArray *)keys + completionHandler:(nullable void (^NS_SWIFT_SENDABLE)(void))handler { + [self.asset loadValuesAsynchronouslyForKeys:keys completionHandler:handler]; +} + +- (NSArray *)tracksWithMediaType:(NSString *)mediaType { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + return [self.asset tracksWithMediaType:mediaType]; +#pragma clang diagnostic pop +} + +- (void)loadTracksWithMediaType:(AVMediaType)mediaType + completionHandler:(void (^NS_SWIFT_SENDABLE)(NSArray *_Nullable, + NSError *_Nullable))completionHandler + API_AVAILABLE(macos(12.0), ios(15.0)) { + [self.asset loadTracksWithMediaType:mediaType completionHandler:completionHandler]; +} + +@end + +#pragma mark - + +@interface FVPDefaultAVPlayerItem : NSObject +@property(nonatomic, readwrite) AVPlayerItem *playerItem; +@end + +@implementation FVPDefaultAVPlayerItem +- (instancetype)initWithPlayerItem:(AVPlayerItem *)playerItem { + self = [super init]; + if (self) { + _playerItem = playerItem; + } + return self; +} + +- (NSObject *)asset { + return [[FVPDefaultAVAsset alloc] initWithAsset:self.playerItem.asset]; +} + +- (AVVideoComposition *)videoComposition { + return self.playerItem.videoComposition; +} + +- (void)setVideoComposition:(AVVideoComposition *)videoComposition { + self.playerItem.videoComposition = videoComposition; +} +@end + +#pragma mark - + +@interface FVPDefaultAVPlayerItemVideoOutput : NSObject +@property(nonatomic, readwrite) AVPlayerItemVideoOutput *videoOutput; +@end + +@implementation FVPDefaultAVPlayerItemVideoOutput +- (instancetype)initWithPixelBufferAttributes:(NSDictionary *)attributes { + self = [super init]; + if (self) { + _videoOutput = [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:attributes]; + } + return self; +} + +- (CMTime)itemTimeForHostTime:(CFTimeInterval)hostTimeInSeconds { + return [self.videoOutput itemTimeForHostTime:hostTimeInSeconds]; +} + +- (BOOL)hasNewPixelBufferForItemTime:(CMTime)itemTime { + return [self.videoOutput hasNewPixelBufferForItemTime:itemTime]; +} + +- (nullable CVPixelBufferRef)copyPixelBufferForItemTime:(CMTime)itemTime + itemTimeForDisplay:(nullable CMTime *)outItemTimeForDisplay + CF_RETURNS_RETAINED { + return [self.videoOutput copyPixelBufferForItemTime:itemTime + itemTimeForDisplay:outItemTimeForDisplay]; +} +@end + +#pragma mark - + +#if TARGET_OS_IOS +@interface FVPDefaultAVAudioSession : NSObject +@end + +@implementation FVPDefaultAVAudioSession +- (AVAudioSessionCategory)category { + return AVAudioSession.sharedInstance.category; +} + +- (AVAudioSessionCategoryOptions)categoryOptions { + return AVAudioSession.sharedInstance.categoryOptions; +} + +- (BOOL)setCategory:(AVAudioSessionCategory)category + withOptions:(AVAudioSessionCategoryOptions)options + error:(NSError **)outError { + return [AVAudioSession.sharedInstance setCategory:category withOptions:options error:outError]; +} +@end +#endif + +#pragma mark - @implementation FVPDefaultAVFactory -- (AVPlayer *)playerWithPlayerItem:(AVPlayerItem *)playerItem { - return [AVPlayer playerWithPlayerItem:playerItem]; +- (NSObject *)URLAssetWithURL:(NSURL *)URL + options:(nullable NSDictionary *)options { + return [[FVPDefaultAVAsset alloc] initWithAsset:[AVAsset assetWithURL:URL]]; +} + +- (NSObject *)playerItemWithAsset:(NSObject *)asset { + // The default factory always vends FVPDefault* implementations, so it is safe to cast back. + return [[FVPDefaultAVPlayerItem alloc] + initWithPlayerItem:[AVPlayerItem playerItemWithAsset:((FVPDefaultAVAsset *)asset).asset]]; } -- (AVPlayerItemVideoOutput *)videoOutputWithPixelBufferAttributes: +- (AVPlayer *)playerWithPlayerItem:(NSObject *)playerItem { + // The default factory always vends FVPDefault* implementations, so it is safe to cast back. + return [AVPlayer playerWithPlayerItem:((FVPDefaultAVPlayerItem *)playerItem).playerItem]; +} + +- (NSObject *)videoOutputWithPixelBufferAttributes: (NSDictionary *)attributes { - return [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:attributes]; + return [[FVPDefaultAVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:attributes]; +} + +#if TARGET_OS_IOS +- (NSObject *)sharedAudioSession { + return [[FVPDefaultAVAudioSession alloc] init]; } +#endif @end diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPCADisplayLink.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPCADisplayLink.m index 19a2688df082..3bfa0d63c313 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPCADisplayLink.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPCADisplayLink.m @@ -4,8 +4,8 @@ #import "../video_player_avfoundation/include/video_player_avfoundation/FVPDisplayLink.h" -#import -#import +@import Foundation; +@import QuartzCore; /// A proxy object to act as a CADisplayLink target, to avoid retain loops, since FVPCADisplayLink /// owns its CADisplayLink, but CADisplayLink retains its target. @@ -44,8 +44,8 @@ @interface FVPCADisplayLink () @implementation FVPCADisplayLink -- (instancetype)initWithRegistrar:(id)registrar - callback:(void (^)(void))callback { +- (instancetype)initWithViewProvider:(NSObject *)viewProvider + callback:(void (^)(void))callback { self = [super init]; if (self) { _target = [[FVPDisplayLinkTarget alloc] initWithCallback:callback]; @@ -54,7 +54,7 @@ - (instancetype)initWithRegistrar:(id)registrar #else // Use the view if one is wired up, otherwise fall back to the main screen. // TODO(stuartmorgan): Consider an API to inform plugins about attached view changes. - NSView *view = registrar.view; + NSView *view = viewProvider.view; _displayLink = view ? [view displayLinkWithTarget:_target selector:@selector(onDisplayLink:)] : [NSScreen.mainScreen displayLinkWithTarget:_target selector:@selector(onDisplayLink:)]; diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPEventBridge.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPEventBridge.m index ca51839a26b7..0df3569da9bd 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPEventBridge.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPEventBridge.m @@ -4,12 +4,12 @@ #import "./include/video_player_avfoundation/FVPEventBridge.h" -#import +@import Foundation; #if TARGET_OS_OSX -#import +@import FlutterMacOS; #else -#import +@import Flutter; #endif @interface FVPEventBridge () diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPTextureBasedVideoPlayer.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPTextureBasedVideoPlayer.m index 9bad19db91cd..b474f8457e8d 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPTextureBasedVideoPlayer.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPTextureBasedVideoPlayer.m @@ -35,7 +35,7 @@ - (void)expectFrame; @implementation FVPTextureBasedVideoPlayer -- (instancetype)initWithPlayerItem:(AVPlayerItem *)item +- (instancetype)initWithPlayerItem:(NSObject *)item frameUpdater:(FVPFrameUpdater *)frameUpdater displayLink:(NSObject *)displayLink avFactory:(id)avFactory @@ -141,9 +141,10 @@ - (CVPixelBufferRef)copyPixelBuffer { self.targetTime += duration; CVPixelBufferRef buffer = NULL; - CMTime outputItemTime = [self.videoOutput itemTimeForHostTime:self.targetTime]; - if ([self.videoOutput hasNewPixelBufferForItemTime:outputItemTime]) { - buffer = [self.videoOutput copyPixelBufferForItemTime:outputItemTime itemTimeForDisplay:NULL]; + CMTime outputItemTime = [self.pixelBufferSource itemTimeForHostTime:self.targetTime]; + if ([self.pixelBufferSource hasNewPixelBufferForItemTime:outputItemTime]) { + buffer = [self.pixelBufferSource copyPixelBufferForItemTime:outputItemTime + itemTimeForDisplay:NULL]; if (buffer) { // Balance the owned reference from copyPixelBufferForItemTime. CVBufferRelease(self.latestPixelBuffer); diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayer.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayer.m index 5b79d4291c24..f57489cfc2b5 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayer.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayer.m @@ -71,7 +71,7 @@ @implementation FVPVideoPlayer { BOOL _listenersRegistered; } -- (instancetype)initWithPlayerItem:(AVPlayerItem *)item +- (instancetype)initWithPlayerItem:(NSObject *)item avFactory:(id)avFactory viewProvider:(NSObject *)viewProvider { self = [super init]; @@ -79,7 +79,7 @@ - (instancetype)initWithPlayerItem:(AVPlayerItem *)item _viewProvider = viewProvider; - AVAsset *asset = [item asset]; + NSObject *asset = item.asset; void (^assetCompletionHandler)(void) = ^{ if ([asset statusOfValueForKey:@"tracks" error:nil] == AVKeyValueStatusLoaded) { void (^processVideoTracks)(NSArray *) = ^(NSArray *tracks) { @@ -100,9 +100,9 @@ - (instancetype)initWithPlayerItem:(AVPlayerItem *)item // Video composition can only be used with file-based media and is not supported for // use with media served using HTTP Live Streaming. AVMutableVideoComposition *videoComposition = - [self getVideoCompositionWithTransform:self->_preferredTransform - withAsset:asset - withVideoTrack:videoTrack]; + [self videoCompositionWithTransform:self->_preferredTransform + asset:asset + videoTrack:videoTrack]; item.videoComposition = videoComposition; } }; @@ -142,7 +142,7 @@ - (instancetype)initWithPlayerItem:(AVPlayerItem *)item (id)kCVPixelBufferPixelFormatTypeKey : @(kCVPixelFormatType_32BGRA), (id)kCVPixelBufferIOSurfacePropertiesKey : @{} }; - _videoOutput = [avFactory videoOutputWithPixelBufferAttributes:pixBuffAttributes]; + _pixelBufferSource = [avFactory videoOutputWithPixelBufferAttributes:pixBuffAttributes]; [asset loadValuesAsynchronouslyForKeys:@[ @"tracks" ] completionHandler:assetCompletionHandler]; @@ -227,12 +227,12 @@ NS_INLINE CGFloat radiansToDegrees(CGFloat radians) { return degrees; }; -- (AVMutableVideoComposition *)getVideoCompositionWithTransform:(CGAffineTransform)transform - withAsset:(AVAsset *)asset - withVideoTrack:(AVAssetTrack *)videoTrack { +- (AVMutableVideoComposition *)videoCompositionWithTransform:(CGAffineTransform)transform + asset:(NSObject *)asset + videoTrack:(AVAssetTrack *)videoTrack { AVMutableVideoCompositionInstruction *instruction = [AVMutableVideoCompositionInstruction videoCompositionInstruction]; - instruction.timeRange = CMTimeRangeMake(kCMTimeZero, [asset duration]); + instruction.timeRange = CMTimeRangeMake(kCMTimeZero, asset.duration); AVMutableVideoCompositionLayerInstruction *layerInstruction = [AVMutableVideoCompositionLayerInstruction videoCompositionLayerInstructionWithAssetTrack:videoTrack]; @@ -308,7 +308,7 @@ - (void)reportStatusForPlayerItem:(AVPlayerItem *)item { break; case AVPlayerItemStatusReadyToPlay: if (!_isInitialized) { - [item addOutput:_videoOutput]; + [item addOutput:self.pixelBufferSource.videoOutput]; [self reportInitialized]; [self updatePlayingState]; } diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayerPlugin.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayerPlugin.m index dbc130acc508..a420e8397401 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayerPlugin.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayerPlugin.m @@ -5,9 +5,10 @@ #import "./include/video_player_avfoundation/FVPVideoPlayerPlugin.h" #import "./include/video_player_avfoundation/FVPVideoPlayerPlugin_Test.h" -#import +@import AVFoundation; #import "./include/video_player_avfoundation/FVPAVFactory.h" +#import "./include/video_player_avfoundation/FVPAssetProvider.h" #import "./include/video_player_avfoundation/FVPDisplayLink.h" #import "./include/video_player_avfoundation/FVPEventBridge.h" #import "./include/video_player_avfoundation/FVPFrameUpdater.h" @@ -23,15 +24,15 @@ @interface FVPDefaultDisplayLinkFactory : NSObject @end @implementation FVPDefaultDisplayLinkFactory -- (NSObject *)displayLinkWithRegistrar:(id)registrar - callback:(void (^)(void))callback { +- (NSObject *)displayLinkWithViewProvider:(NSObject *)viewProvider + callback:(void (^)(void))callback { #if TARGET_OS_IOS - return [[FVPCADisplayLink alloc] initWithRegistrar:registrar callback:callback]; + return [[FVPCADisplayLink alloc] initWithViewProvider:viewProvider callback:callback]; #else if (@available(macOS 14.0, *)) { - return [[FVPCADisplayLink alloc] initWithRegistrar:registrar callback:callback]; + return [[FVPCADisplayLink alloc] initWithViewProvider:viewProvider callback:callback]; } - return [[FVPCoreVideoDisplayLink alloc] initWithRegistrar:registrar callback:callback]; + return [[FVPCoreVideoDisplayLink alloc] initWithViewProvider:viewProvider callback:callback]; #endif } @@ -39,17 +40,50 @@ @implementation FVPDefaultDisplayLinkFactory #pragma mark - +/// Non-test implementation of FVPAssetProvider, wrapping a Flutter plugin +/// registrar. +@interface FVPDefaultAssetProvider : NSObject +@property(weak, nonatomic) NSObject *registrar; + +- (instancetype)initWithRegistrar:(NSObject *)registrar; +@end + +@implementation FVPDefaultAssetProvider + +- (instancetype)initWithRegistrar:(NSObject *)registrar { + self = [super init]; + if (self) { + _registrar = registrar; + } + return self; +} + +- (NSString *)lookupKeyForAsset:(NSString *)asset { + return [self.registrar lookupKeyForAsset:asset]; +} + +- (NSString *)lookupKeyForAsset:(NSString *)asset fromPackage:(NSString *)package { + return [self.registrar lookupKeyForAsset:asset fromPackage:package]; +} + +@end + +#pragma mark - + @interface FVPVideoPlayerPlugin () -@property(readonly, strong, nonatomic) NSObject *registrar; +@property(nonatomic, strong) NSObject *binaryMessenger; +@property(nonatomic, strong) NSObject *textureRegistry; @property(nonatomic, strong) id displayLinkFactory; @property(nonatomic, strong) id avFactory; @property(nonatomic, strong) NSObject *viewProvider; +@property(nonatomic, strong) NSObject *assetProvider; @property(nonatomic, assign) int64_t nextPlayerIdentifier; @end @implementation FVPVideoPlayerPlugin + (void)registerWithRegistrar:(NSObject *)registrar { FVPVideoPlayerPlugin *instance = [[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; + // Publish the instance so that it receives detachFromEngineForRegistrar:. [registrar publish:instance]; FVPNativeVideoViewFactory *factory = [[FVPNativeVideoViewFactory alloc] initWithMessenger:registrar.messenger @@ -63,21 +97,26 @@ + (void)registerWithRegistrar:(NSObject *)registrar { - (instancetype)initWithRegistrar:(NSObject *)registrar { return [self initWithAVFactory:[[FVPDefaultAVFactory alloc] init] displayLinkFactory:[[FVPDefaultDisplayLinkFactory alloc] init] + binaryMessenger:registrar.messenger + textureRegistry:registrar.textures viewProvider:[[FVPDefaultViewProvider alloc] initWithRegistrar:registrar] - registrar:registrar]; + assetProvider:[[FVPDefaultAssetProvider alloc] initWithRegistrar:registrar]]; } - (instancetype)initWithAVFactory:(id)avFactory displayLinkFactory:(id)displayLinkFactory + binaryMessenger:(NSObject *)binaryMessenger + textureRegistry:(NSObject *)textureRegistry viewProvider:(NSObject *)viewProvider - registrar:(NSObject *)registrar { + assetProvider:(NSObject *)assetProvider { self = [super init]; NSAssert(self, @"super init cannot be nil"); - _registrar = registrar; + _binaryMessenger = binaryMessenger; + _textureRegistry = textureRegistry; + _assetProvider = assetProvider; _viewProvider = viewProvider; _displayLinkFactory = displayLinkFactory ?: [[FVPDefaultDisplayLinkFactory alloc] init]; _avFactory = avFactory ?: [[FVPDefaultAVFactory alloc] init]; - _viewProvider = viewProvider ?: [[FVPDefaultViewProvider alloc] initWithRegistrar:registrar]; _playersByIdentifier = [NSMutableDictionary dictionaryWithCapacity:1]; _nextPlayerIdentifier = 1; return self; @@ -101,7 +140,7 @@ - (int64_t)configurePlayer:(FVPVideoPlayer *)player int64_t playerIdentifier = self.nextPlayerIdentifier++; self.playersByIdentifier[@(playerIdentifier)] = player; - NSObject *messenger = self.registrar.messenger; + NSObject *messenger = self.binaryMessenger; NSString *channelSuffix = [NSString stringWithFormat:@"%lld", playerIdentifier]; // Set up the player-specific API handler, and its onDispose unregistration. SetUpFVPVideoPlayerInstanceApiWithSuffix(messenger, player, channelSuffix); @@ -132,15 +171,15 @@ - (int64_t)configurePlayer:(FVPVideoPlayer *)player // that could affect other plugins which depend on this global state. Only change // category or options if there is change to prevent unnecessary lags and silence. #if TARGET_OS_IOS -static void upgradeAudioSessionCategory(AVAudioSessionCategory requestedCategory, +static void upgradeAudioSessionCategory(NSObject *session, + AVAudioSessionCategory requestedCategory, AVAudioSessionCategoryOptions options, AVAudioSessionCategoryOptions clearOptions) { NSSet *playCategories = [NSSet setWithObjects:AVAudioSessionCategoryPlayback, AVAudioSessionCategoryPlayAndRecord, nil]; NSSet *recordCategories = [NSSet setWithObjects:AVAudioSessionCategoryRecord, AVAudioSessionCategoryPlayAndRecord, nil]; - NSSet *requiredCategories = - [NSSet setWithObjects:requestedCategory, AVAudioSession.sharedInstance.category, nil]; + NSSet *requiredCategories = [NSSet setWithObjects:requestedCategory, session.category, nil]; BOOL requiresPlay = [requiredCategories intersectsSet:playCategories]; BOOL requiresRecord = [requiredCategories intersectsSet:recordCategories]; if (requiresPlay && requiresRecord) { @@ -150,19 +189,20 @@ static void upgradeAudioSessionCategory(AVAudioSessionCategory requestedCategory } else if (requiresRecord) { requestedCategory = AVAudioSessionCategoryRecord; } - options = (AVAudioSession.sharedInstance.categoryOptions & ~clearOptions) | options; - if ([requestedCategory isEqualToString:AVAudioSession.sharedInstance.category] && - options == AVAudioSession.sharedInstance.categoryOptions) { + options = (session.categoryOptions & ~clearOptions) | options; + if ([requestedCategory isEqualToString:session.category] && options == session.categoryOptions) { return; } - [AVAudioSession.sharedInstance setCategory:requestedCategory withOptions:options error:nil]; + [session setCategory:requestedCategory withOptions:options error:nil]; } #endif - (void)initialize:(FlutterError *__autoreleasing *)error { #if TARGET_OS_IOS // Allow audio playback when the Ring/Silent switch is set to silent - upgradeAudioSessionCategory(AVAudioSessionCategoryPlayback, 0, 0); + upgradeAudioSessionCategory(self.avFactory.sharedAudioSession, AVAudioSessionCategoryPlayback, + /* options */ 0, + /* clearOptions */ 0); #endif FlutterError *disposeError; @@ -177,7 +217,7 @@ - (void)initialize:(FlutterError *__autoreleasing *)error { - (nullable NSNumber *)createPlatformViewPlayerWithOptions:(nonnull FVPCreationOptions *)options error:(FlutterError **)error { @try { - AVPlayerItem *item = [self playerItemWithCreationOptions:options]; + NSObject *item = [self playerItemWithCreationOptions:options]; // FVPVideoPlayer contains all required logic for platform views. FVPVideoPlayer *player = [[FVPVideoPlayer alloc] initWithPlayerItem:item @@ -195,14 +235,13 @@ - (nullable FVPTexturePlayerIds *)createTexturePlayerWithOptions: (nonnull FVPCreationOptions *)options error:(FlutterError **)error { @try { - AVPlayerItem *item = [self playerItemWithCreationOptions:options]; - FVPFrameUpdater *frameUpdater = - [[FVPFrameUpdater alloc] initWithRegistry:self.registrar.textures]; + NSObject *item = [self playerItemWithCreationOptions:options]; + FVPFrameUpdater *frameUpdater = [[FVPFrameUpdater alloc] initWithRegistry:self.textureRegistry]; NSObject *displayLink = - [self.displayLinkFactory displayLinkWithRegistrar:_registrar - callback:^() { - [frameUpdater displayLinkFired]; - }]; + [self.displayLinkFactory displayLinkWithViewProvider:self.viewProvider + callback:^() { + [frameUpdater displayLinkFired]; + }]; FVPTextureBasedVideoPlayer *player = [[FVPTextureBasedVideoPlayer alloc] initWithPlayerItem:item @@ -211,12 +250,12 @@ - (nullable FVPTexturePlayerIds *)createTexturePlayerWithOptions: avFactory:self.avFactory viewProvider:self.viewProvider]; - int64_t textureIdentifier = [self.registrar.textures registerTexture:player]; + int64_t textureIdentifier = [self.textureRegistry registerTexture:player]; [player setTextureIdentifier:textureIdentifier]; __weak typeof(self) weakSelf = self; int64_t playerIdentifier = [self configurePlayer:player withExtraDisposeHandler:^() { - [weakSelf.registrar.textures unregisterTexture:textureIdentifier]; + [weakSelf.textureRegistry unregisterTexture:textureIdentifier]; }]; return [FVPTexturePlayerIds makeWithPlayerId:playerIdentifier textureId:textureIdentifier]; } @catch (NSException *exception) { @@ -230,12 +269,14 @@ - (void)setMixWithOthers:(BOOL)mixWithOthers #if TARGET_OS_OSX // AVAudioSession doesn't exist on macOS, and audio always mixes, so just no-op. #else + NSObject *session = self.avFactory.sharedAudioSession; if (mixWithOthers) { - upgradeAudioSessionCategory(AVAudioSession.sharedInstance.category, - AVAudioSessionCategoryOptionMixWithOthers, 0); + upgradeAudioSessionCategory(session, session.category, + /* options */ AVAudioSessionCategoryOptionMixWithOthers, + /* clearOptions */ 0); } else { - upgradeAudioSessionCategory(AVAudioSession.sharedInstance.category, 0, - AVAudioSessionCategoryOptionMixWithOthers); + upgradeAudioSessionCategory(session, session.category, /* options */ 0, + /* clearOptions */ AVAudioSessionCategoryOptionMixWithOthers); } #endif } @@ -244,8 +285,8 @@ - (nullable NSString *)fileURLForAssetWithName:(NSString *)asset package:(nullable NSString *)package error:(FlutterError *_Nullable *_Nonnull)error { NSString *resource = package == nil - ? [self.registrar lookupKeyForAsset:asset] - : [self.registrar lookupKeyForAsset:asset fromPackage:package]; + ? [self.assetProvider lookupKeyForAsset:asset] + : [self.assetProvider lookupKeyForAsset:asset fromPackage:package]; NSString *path = [[NSBundle mainBundle] pathForResource:resource ofType:nil]; #if TARGET_OS_OSX @@ -263,13 +304,14 @@ - (nullable NSString *)fileURLForAssetWithName:(NSString *)asset } /// Returns the AVPlayerItem corresponding to the given player creation options. -- (nonnull AVPlayerItem *)playerItemWithCreationOptions:(nonnull FVPCreationOptions *)options { +- (nonnull NSObject *)playerItemWithCreationOptions: + (nonnull FVPCreationOptions *)options { NSDictionary *headers = options.httpHeaders; NSDictionary *itemOptions = headers.count == 0 ? nil : @{@"AVURLAssetHTTPHeaderFieldsKey" : headers}; - AVURLAsset *asset = [AVURLAsset URLAssetWithURL:[NSURL URLWithString:options.uri] - options:itemOptions]; - return [AVPlayerItem playerItemWithAsset:asset]; + NSObject *asset = [self.avFactory URLAssetWithURL:[NSURL URLWithString:options.uri] + options:itemOptions]; + return [self.avFactory playerItemWithAsset:asset]; } @end diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPViewProvider.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPViewProvider.m index d1f6ec96eac2..f72f86927cd8 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPViewProvider.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPViewProvider.m @@ -5,8 +5,10 @@ #import "./include/video_player_avfoundation/FVPViewProvider.h" #if TARGET_OS_OSX +@import FlutterMacOS; @import Cocoa; #else +@import Flutter; @import UIKit; #endif diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/AVAssetTrackUtils.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/AVAssetTrackUtils.h index 99de0dd65f1e..19086b10e430 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/AVAssetTrackUtils.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/AVAssetTrackUtils.h @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import +@import AVFoundation; /// Returns a standardized transform /// according to the orientation of the track. /// /// Note: https://stackoverflow.com/questions/64161544 /// `AVAssetTrack.preferredTransform` can have wrong `tx` and `ty`. -CGAffineTransform FVPGetStandardizedTransformForTrack(AVAssetTrack* track); +CGAffineTransform FVPGetStandardizedTransformForTrack(AVAssetTrack *track); diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPAVFactory.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPAVFactory.h index 9dcd62ffbbbd..90d4fa3ed1b9 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPAVFactory.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPAVFactory.h @@ -2,24 +2,110 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import +@import AVFoundation; NS_ASSUME_NONNULL_BEGIN +/// Protocol for abstracting access to an AVPlayerItemVideoOutput, to enable unit testing. +@protocol FVPPixelBufferSource +@required +/// The underlying AVFoundation object. +/// +/// This can't be fully abstracted away because it's passed to other AVFoundation calls. Plugin +/// code should only use this to pass into AVFoundation; other calls should be made on the +/// protocol. +@property(nonatomic, readonly) AVPlayerItemVideoOutput *videoOutput; + +/// Wraps the underlying videoOutput's itemTimeForHostTime: method. +- (CMTime)itemTimeForHostTime:(CFTimeInterval)hostTimeInSeconds; + +/// Wraps the underlying videoOutput's hasNewPixelBufferForItemTime: method. +- (BOOL)hasNewPixelBufferForItemTime:(CMTime)itemTime; + +/// Wraps the underlying videoOutput's copyPixelBufferForItemTime:itemTimeForDisplay: method. +- (nullable CVPixelBufferRef)copyPixelBufferForItemTime:(CMTime)itemTime + itemTimeForDisplay:(nullable CMTime *)outItemTimeForDisplay + CF_RETURNS_RETAINED; + +@end + +@protocol FVPAVAsset +@required +/// Wraps the underlying asset's duration property. +@property(nonatomic, readonly) CMTime duration; + +/// Wraps the underlying asset's statusOfValueForKey:error: method. +- (AVKeyValueStatus)statusOfValueForKey:(NSString *)key + error:(NSError *_Nullable *_Nullable)outError; + +/// Wraps the underlying asset's loadValuesAsynchronouslyForKeys:completionHandler: method. +- (void)loadValuesAsynchronouslyForKeys:(NSArray *)keys + completionHandler:(nullable void (^NS_SWIFT_SENDABLE)(void))handler; + +/// Wraps the underlying asset's loadTracksWithMediaType:completionHandler: method. +- (void)loadTracksWithMediaType:(AVMediaType)mediaType + completionHandler:(void (^NS_SWIFT_SENDABLE)(NSArray *_Nullable, + NSError *_Nullable))completionHandler + API_AVAILABLE(macos(12.0), ios(15.0)); + +/// Wraps the underlying asset's tracksWithMediaType: method. +- (NSArray *)tracksWithMediaType:(AVMediaType)mediaType + API_DEPRECATED("Use loadTracksWithMediaType:completionHandler: instead", macos(10.7, 15.0), + ios(4.0, 18.0)); +@end + +/// Protocol for abstracting access to an AVPlayerItem, to enable unit testing. +@protocol FVPAVPlayerItem +@required +/// Wraps the underlying playerItem's asset property. +@property(nonatomic, readonly) NSObject *asset; + +/// Wraps the underlying playerItem's videoComposition property. +@property(nonatomic, copy, nullable) AVVideoComposition *videoComposition; +@end + +#if TARGET_OS_IOS +/// Protocol for abstracting access to an AVAudioSession, to enable unit testing. +@protocol FVPAVAudioSession +@required +/// Wraps the AVAudioSession property of the same name. +@property(nonatomic, readonly) AVAudioSessionCategory category; +/// Wraps the AVAudioSession property of the same name. +@property(nonatomic, readonly) AVAudioSessionCategoryOptions categoryOptions; +/// Wraps the AVAudioSession method of the same name. +- (BOOL)setCategory:(AVAudioSessionCategory)category + withOptions:(AVAudioSessionCategoryOptions)options + error:(NSError **)outError; +@end +#endif + /// Protocol for AVFoundation object instance factory. Used for injecting framework objects in /// tests. @protocol FVPAVFactory -/// Creates and returns an AVPlayer instance with the specified AVPlayerItem. @required -- (AVPlayer *)playerWithPlayerItem:(AVPlayerItem *)playerItem; -/// Creates and returns an AVPlayerItemVideoOutput instance with the specified pixel buffer +/// Creates and returns a wrapped AVAsset instance with the specified URL and options. +- (NSObject *)URLAssetWithURL:(NSURL *)URL + options:(nullable NSDictionary *)options; + +/// Creates and returns a wrapped AVPlayerItem instance with the specified asset. +- (NSObject *)playerItemWithAsset:(NSObject *)asset; + +/// Creates and returns an AVPlayer instance with the specified player item. +- (AVPlayer *)playerWithPlayerItem:(NSObject *)playerItem; + +/// Creates and returns a wrapped AVPlayerItemVideoOutput instance with the specified pixel buffer /// attributes. -- (AVPlayerItemVideoOutput *)videoOutputWithPixelBufferAttributes: +- (NSObject *)videoOutputWithPixelBufferAttributes: (NSDictionary *)attributes; + +#if TARGET_OS_IOS +/// Returns the AVAudioSession shared instance, wrapped in the protocol. +- (NSObject *)sharedAudioSession; +#endif @end -/// A default implementation of the FVPAVFactory protocol. +/// A default implementation of the FVPAVFactory protocol, using real AVFoundation objects. @interface FVPDefaultAVFactory : NSObject @end diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPDisplayLink.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPDisplayLink.h index 54845527c83d..7646669069a4 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPDisplayLink.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPDisplayLink.h @@ -2,13 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import +@import Foundation; -#if TARGET_OS_OSX -#import -#else -#import -#endif +#import "FVPViewProvider.h" // A cross-platform display link abstraction. @protocol FVPDisplayLink @@ -31,8 +27,8 @@ API_AVAILABLE(ios(4.0), macos(14.0)) /// /// The display link starts paused, so must be started, by setting 'running' to YES, before the /// callback will fire. -- (instancetype)initWithRegistrar:(id)registrar - callback:(void (^)(void))callback NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithViewProvider:(NSObject *)viewProvider + callback:(void (^)(void))callback NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; @@ -46,8 +42,8 @@ API_AVAILABLE(ios(4.0), macos(14.0)) /// /// The display link starts paused, so must be started, by setting 'running' to YES, before the /// callback will fire. -- (instancetype)initWithRegistrar:(id)registrar - callback:(void (^)(void))callback NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithViewProvider:(NSObject *)viewProvider + callback:(void (^)(void))callback NS_DESIGNATED_INITIALIZER; - (instancetype)init NS_UNAVAILABLE; diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPEventBridge.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPEventBridge.h index 0a0fef634db8..873361e53d2e 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPEventBridge.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPEventBridge.h @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import +@import Foundation; #import "FVPVideoEventListener.h" #if TARGET_OS_OSX -#import +@import FlutterMacOS; #else -#import +@import Flutter; #endif /// An implementation of FVPVideoEventListener that forwards messages to Dart via an event channel. diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPFrameUpdater.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPFrameUpdater.h index 23063104b99c..684b6a5d3750 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPFrameUpdater.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPFrameUpdater.h @@ -5,9 +5,9 @@ #import "FVPDisplayLink.h" #if TARGET_OS_OSX -#import +@import FlutterMacOS; #else -#import +@import Flutter; #endif NS_ASSUME_NONNULL_BEGIN diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPNativeVideoView.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPNativeVideoView.h index 61dbcb02936a..627195470f6e 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPNativeVideoView.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPNativeVideoView.h @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import +@import AVFoundation; #if TARGET_OS_OSX -#import +@import FlutterMacOS; #else -#import +@import Flutter; #endif /// A class used to create a native video view that can be embedded in a Flutter app. diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPNativeVideoViewFactory.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPNativeVideoViewFactory.h index 923af75d12d0..d20d68e64993 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPNativeVideoViewFactory.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPNativeVideoViewFactory.h @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import +@import Foundation; #import "FVPVideoPlayer.h" #if TARGET_OS_OSX -#import +@import FlutterMacOS; #else -#import +@import Flutter; #endif /// A factory class responsible for creating native video views that can be embedded in a diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer.h index f8ca5008b959..66c74f444d6c 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer.h @@ -2,10 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +@import AVFoundation; + #import "FVPDisplayLink.h" #import "FVPFrameUpdater.h" #import "FVPVideoPlayer.h" #import "FVPVideoPlayer_Internal.h" +#import "FVPViewProvider.h" NS_ASSUME_NONNULL_BEGIN @@ -16,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN @interface FVPTextureBasedVideoPlayer : FVPVideoPlayer /// Initializes a new instance of FVPTextureBasedVideoPlayer with the given player item, /// frame updater, display link, AV factory, and view provider. -- (instancetype)initWithPlayerItem:(AVPlayerItem *)item +- (instancetype)initWithPlayerItem:(NSObject *)item frameUpdater:(FVPFrameUpdater *)frameUpdater displayLink:(NSObject *)displayLink avFactory:(id)avFactory diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer_Test.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer_Test.h index 9374ef3d528e..2a83455cef65 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer_Test.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPTextureBasedVideoPlayer_Test.h @@ -5,9 +5,9 @@ #import "FVPTextureBasedVideoPlayer.h" #if TARGET_OS_OSX -#import +@import FlutterMacOS; #else -#import +@import Flutter; #endif NS_ASSUME_NONNULL_BEGIN diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoEventListener.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoEventListener.h index 8b992d52c0f5..a267adbb902b 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoEventListener.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoEventListener.h @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import +@import Foundation; /// Handles event/status callbacks from FVPVideoPlayer. /// diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer.h index 8fabbe22f8ef..02954d7a3680 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer.h @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import +@import AVFoundation; #import "./messages.g.h" #import "FVPAVFactory.h" @@ -10,9 +10,9 @@ #import "FVPViewProvider.h" #if TARGET_OS_OSX -#import +@import FlutterMacOS; #else -#import +@import Flutter; #endif NS_ASSUME_NONNULL_BEGIN @@ -38,7 +38,7 @@ NS_ASSUME_NONNULL_BEGIN /// Initializes a new instance of FVPVideoPlayer with the given AVPlayerItem, AV factory, and view /// provider. -- (instancetype)initWithPlayerItem:(AVPlayerItem *)item +- (instancetype)initWithPlayerItem:(NSObject *)item avFactory:(id)avFactory viewProvider:(NSObject *)viewProvider; diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin.h index 82b3d71893f3..9f15d53b0821 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin.h @@ -3,9 +3,9 @@ // found in the LICENSE file. #if TARGET_OS_OSX -#import +@import FlutterMacOS; #else -#import +@import Flutter; #endif @interface FVPVideoPlayerPlugin : NSObject diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin_Test.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin_Test.h index 54dcc90f6330..4da66be36023 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin_Test.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayerPlugin_Test.h @@ -2,16 +2,25 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#import "FVPVideoPlayerPlugin.h" + +#if TARGET_OS_OSX +@import FlutterMacOS; +#else +@import Flutter; +#endif + #import "FVPAVFactory.h" +#import "FVPAssetProvider.h" #import "FVPDisplayLink.h" #import "FVPVideoPlayer.h" -#import "FVPVideoPlayerPlugin.h" +#import "FVPViewProvider.h" #import "messages.g.h" // Protocol for an AVPlayer instance factory. Used for injecting display links in tests. @protocol FVPDisplayLinkFactory -- (NSObject *)displayLinkWithRegistrar:(id)registrar - callback:(void (^)(void))callback; +- (NSObject *)displayLinkWithViewProvider:(NSObject *)viewProvider + callback:(void (^)(void))callback; @end #pragma mark - @@ -23,7 +32,9 @@ - (instancetype)initWithAVFactory:(id)avFactory displayLinkFactory:(id)displayLinkFactory + binaryMessenger:(NSObject *)binaryMessenger + textureRegistry:(NSObject *)textureRegistry viewProvider:(NSObject *)viewProvider - registrar:(NSObject *)registrar; + assetProvider:(NSObject *)assetProvider; @end diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer_Internal.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer_Internal.h index d249391f73a6..6f86b7d0e3ef 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer_Internal.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/FVPVideoPlayer_Internal.h @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import +@import AVFoundation; + #import "FVPAVFactory.h" #import "FVPVideoEventListener.h" #import "FVPVideoPlayer.h" @@ -12,8 +13,8 @@ NS_ASSUME_NONNULL_BEGIN /// Interface intended for use by subclasses, but not other callers. @interface FVPVideoPlayer () -/// The AVPlayerItemVideoOutput associated with this video player. -@property(nonatomic, readonly) AVPlayerItemVideoOutput *videoOutput; +/// The pixel buffer source associated with this video player. +@property(nonatomic, readonly) NSObject *pixelBufferSource; /// The view provider, to obtain view information from. @property(nonatomic, readonly, nullable) NSObject *viewProvider; /// The preferred transform for the video. It can be used to handle the rotation of the video. diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/messages.g.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/messages.g.h index 01f584187b11..3b2dd3952245 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/messages.g.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/messages.g.h @@ -1,10 +1,10 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon -#import +@import Foundation; @protocol FlutterBinaryMessenger; @protocol FlutterMessageCodec; diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/messages.g.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/messages.g.m index c421576564cf..abb8efbad50d 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/messages.g.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/messages.g.m @@ -1,19 +1,15 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "./include/video_player_avfoundation/messages.g.h" #if TARGET_OS_OSX -#import +@import FlutterMacOS; #else -#import -#endif - -#if !__has_feature(objc_arc) -#error File requires ARC to be enabled. +@import Flutter; #endif static NSArray *wrapResult(id result, FlutterError *error) { diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/FVPCoreVideoDisplayLink.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/FVPCoreVideoDisplayLink.m index 3e56b9ac79f4..55c3a11996a5 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/FVPCoreVideoDisplayLink.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation_macos/FVPCoreVideoDisplayLink.m @@ -17,8 +17,8 @@ @interface FVPCoreVideoDisplayLink () @property(nonatomic, assign) CVDisplayLinkRef displayLink; // A dispatch source to move display link callbacks to the main thread. @property(nonatomic, strong) dispatch_source_t displayLinkSource; -// The plugin registrar, to get screen information. -@property(nonatomic, weak) NSObject *registrar; +// The view provider, to get screen information. +@property(nonatomic, weak) NSObject *viewProvider; @end static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp *now, @@ -32,11 +32,11 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt @implementation FVPCoreVideoDisplayLink -- (instancetype)initWithRegistrar:(id)registrar - callback:(void (^)(void))callback { +- (instancetype)initWithViewProvider:(NSObject *)viewProvider + callback:(void (^)(void))callback { self = [super init]; if (self) { - _registrar = registrar; + _viewProvider = viewProvider; // Create and start the main-thread dispatch queue to drive frameUpdater. _displayLinkSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_DATA_ADD, 0, 0, dispatch_get_main_queue()); @@ -74,7 +74,7 @@ - (void)setRunning:(BOOL)running { // TODO(stuartmorgan): Move this to init + a screen change listener; this won't correctly // handle windows being dragged to another screen until the next pause/play cycle. That will // likely require new plugin registrar APIs. - NSScreen *screen = self.registrar.view.window.screen; + NSScreen *screen = self.viewProvider.view.window.screen; if (screen) { CGDirectDisplayID viewDisplayID = (CGDirectDisplayID)[screen.deviceDescription[@"NSScreenNumber"] unsignedIntegerValue]; diff --git a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj index e3a2c5df80c9..f4ad957fd95d 100644 --- a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,14 +3,13 @@ archiveVersion = 1; classes = { }; - objectVersion = 54; + objectVersion = 60; objects = { /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; - 78CF8D742BC5CEA80051231B /* OCMock in Frameworks */ = {isa = PBXBuildFile; productRef = 78CF8D732BC5CEA80051231B /* OCMock */; }; 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; @@ -102,7 +101,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 78CF8D742BC5CEA80051231B /* OCMock in Frameworks */, D182ECB59C06DBC7E2D5D913 /* libPods-RunnerTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -268,7 +266,6 @@ ); name = RunnerTests; packageProductDependencies = ( - 78CF8D732BC5CEA80051231B /* OCMock */, ); productName = RunnerTests; productReference = F7151F3A26603ECA0028CB91 /* RunnerTests.xctest */; @@ -308,8 +305,7 @@ ); mainGroup = 97C146E51CF9000F007C117D; packageReferences = ( - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, - 78CF8D722BC5CEA80051231B /* XCRemoteSwiftPackageReference "ocmock" */, + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */, ); productRefGroup = 97C146EF1CF9000F007C117D /* Products */; projectDirPath = ""; @@ -774,33 +770,17 @@ /* End XCConfigurationList section */ /* Begin XCLocalSwiftPackageReference section */ - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = { isa = XCLocalSwiftPackageReference; relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; }; /* End XCLocalSwiftPackageReference section */ -/* Begin XCRemoteSwiftPackageReference section */ - 78CF8D722BC5CEA80051231B /* XCRemoteSwiftPackageReference "ocmock" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/erikdoe/ocmock"; - requirement = { - kind = revision; - revision = ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a; - }; - }; -/* End XCRemoteSwiftPackageReference section */ - /* Begin XCSwiftPackageProductDependency section */ 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { isa = XCSwiftPackageProductDependency; productName = FlutterGeneratedPluginSwiftPackage; }; - 78CF8D732BC5CEA80051231B /* OCMock */ = { - isa = XCSwiftPackageProductDependency; - package = 78CF8D722BC5CEA80051231B /* XCRemoteSwiftPackageReference "ocmock" */; - productName = OCMock; - }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 97C146E61CF9000F007C117D /* Project object */; diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.pbxproj b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.pbxproj index 41178cae1891..281015c2059a 100644 --- a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 54; + objectVersion = 60; objects = { /* Begin PBXAggregateTarget section */ @@ -29,7 +29,6 @@ 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; - 78CF8D772BC5D0140051231B /* OCMock in Frameworks */ = {isa = PBXBuildFile; productRef = 78CF8D762BC5D0140051231B /* OCMock */; }; C000184E56E3386C22EF683A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC60543320154AF9A465D416 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ @@ -97,7 +96,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 78CF8D772BC5D0140051231B /* OCMock in Frameworks */, 18AD5E2A5B24DAFCF3749529 /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -230,7 +228,6 @@ ); name = RunnerTests; packageProductDependencies = ( - 78CF8D762BC5D0140051231B /* OCMock */, ); productName = RunnerTests; productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; @@ -302,8 +299,7 @@ ); mainGroup = 33CC10E42044A3C60003C045; packageReferences = ( - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, - 78CF8D752BC5D0140051231B /* XCRemoteSwiftPackageReference "ocmock" */, + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */, ); productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; projectDirPath = ""; @@ -382,10 +378,14 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); + inputPaths = ( + ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); + outputPaths = ( + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; @@ -806,33 +806,17 @@ /* End XCConfigurationList section */ /* Begin XCLocalSwiftPackageReference section */ - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = { isa = XCLocalSwiftPackageReference; relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; }; /* End XCLocalSwiftPackageReference section */ -/* Begin XCRemoteSwiftPackageReference section */ - 78CF8D752BC5D0140051231B /* XCRemoteSwiftPackageReference "ocmock" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/erikdoe/ocmock"; - requirement = { - kind = revision; - revision = ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a; - }; - }; -/* End XCRemoteSwiftPackageReference section */ - /* Begin XCSwiftPackageProductDependency section */ 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { isa = XCSwiftPackageProductDependency; productName = FlutterGeneratedPluginSwiftPackage; }; - 78CF8D762BC5D0140051231B /* OCMock */ = { - isa = XCSwiftPackageProductDependency; - package = 78CF8D752BC5D0140051231B /* XCRemoteSwiftPackageReference "ocmock" */; - productName = OCMock; - }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 33CC10E52044A3C60003C045 /* Project object */; diff --git a/packages/video_player/video_player_avfoundation/lib/src/messages.g.dart b/packages/video_player/video_player_avfoundation/lib/src/messages.g.dart index 76b66c3ca4bf..24644d8f42d0 100644 --- a/packages/video_player/video_player_avfoundation/lib/src/messages.g.dart +++ b/packages/video_player/video_player_avfoundation/lib/src/messages.g.dart @@ -1,9 +1,9 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon -// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; @@ -276,17 +276,15 @@ class AVFoundationVideoPlayerApi { final String pigeonVar_messageChannelSuffix; Future initialize() async { - final String pigeonVar_channelName = + final pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.initialize$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -301,19 +299,17 @@ class AVFoundationVideoPlayerApi { } Future createForPlatformView(CreationOptions params) async { - final String pigeonVar_channelName = + final pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.createForPlatformView$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [params], ); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -335,19 +331,17 @@ class AVFoundationVideoPlayerApi { Future createForTextureView( CreationOptions creationOptions, ) async { - final String pigeonVar_channelName = + final pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.createForTextureView$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [creationOptions], ); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -367,19 +361,17 @@ class AVFoundationVideoPlayerApi { } Future setMixWithOthers(bool mixWithOthers) async { - final String pigeonVar_channelName = + final pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.setMixWithOthers$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [mixWithOthers], ); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -394,19 +386,17 @@ class AVFoundationVideoPlayerApi { } Future getAssetUrl(String asset, String? package) async { - final String pigeonVar_channelName = + final pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.AVFoundationVideoPlayerApi.getAssetUrl$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [asset, package], ); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -439,19 +429,17 @@ class VideoPlayerInstanceApi { final String pigeonVar_messageChannelSuffix; Future setLooping(bool looping) async { - final String pigeonVar_channelName = + final pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.setLooping$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [looping], ); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -466,19 +454,17 @@ class VideoPlayerInstanceApi { } Future setVolume(double volume) async { - final String pigeonVar_channelName = + final pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.setVolume$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [volume], ); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -493,19 +479,17 @@ class VideoPlayerInstanceApi { } Future setPlaybackSpeed(double speed) async { - final String pigeonVar_channelName = + final pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.setPlaybackSpeed$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [speed], ); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -520,17 +504,15 @@ class VideoPlayerInstanceApi { } Future play() async { - final String pigeonVar_channelName = + final pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.play$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -545,17 +527,15 @@ class VideoPlayerInstanceApi { } Future getPosition() async { - final String pigeonVar_channelName = + final pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.getPosition$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -575,19 +555,17 @@ class VideoPlayerInstanceApi { } Future seekTo(int position) async { - final String pigeonVar_channelName = + final pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.seekTo$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [position], ); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -602,17 +580,15 @@ class VideoPlayerInstanceApi { } Future pause() async { - final String pigeonVar_channelName = + final pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.pause$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -627,17 +603,15 @@ class VideoPlayerInstanceApi { } Future dispose() async { - final String pigeonVar_channelName = + final pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.dispose$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -652,17 +626,15 @@ class VideoPlayerInstanceApi { } Future> getAudioTracks() async { - final String pigeonVar_channelName = + final pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.getAudioTracks$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -683,19 +655,17 @@ class VideoPlayerInstanceApi { } Future selectAudioTrack(int trackIndex) async { - final String pigeonVar_channelName = + final pigeonVar_channelName = 'dev.flutter.pigeon.video_player_avfoundation.VideoPlayerInstanceApi.selectAudioTrack$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = - BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); final Future pigeonVar_sendFuture = pigeonVar_channel.send( [trackIndex], ); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/video_player/video_player_avfoundation/pubspec.yaml b/packages/video_player/video_player_avfoundation/pubspec.yaml index c932317b1f3f..f08f42f54282 100644 --- a/packages/video_player/video_player_avfoundation/pubspec.yaml +++ b/packages/video_player/video_player_avfoundation/pubspec.yaml @@ -2,7 +2,7 @@ name: video_player_avfoundation description: iOS and macOS implementation of the video_player plugin. repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_avfoundation issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 -version: 2.9.0 +version: 2.9.1 environment: sdk: ^3.10.0 @@ -31,7 +31,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^26.1.0 + pigeon: ^26.1.7 topics: - video From 3079afc10a5448ba9c09ee6104fd7d503c0ee0ad Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sat, 7 Feb 2026 14:46:49 +0530 Subject: [PATCH 33/46] [google_maps_flutter] removed unncessary files --- .../google_maps_flutter/force_overrides.ps1 | 66 - .../example/lib/example_google_map.dart.rej | 11 - .../lib/src/messages.g.dart.orig | 4548 ----------------- .../lib/src/messages.g.dart.rej | 1574 ------ ...ogle_maps_flutter_pigeon_messages.g.h.orig | 901 ---- ...oogle_maps_flutter_pigeon_messages.g.h.rej | 807 --- .../lib/src/messages.g.dart.orig | 4301 ---------------- .../lib/src/messages.g.dart.rej | 1496 ------ .../xcshareddata/swiftpm/Package.resolved | 13 - .../xcshareddata/swiftpm/Package.resolved | 13 - .../xcshareddata/swiftpm/Package.resolved | 13 - .../xcshareddata/swiftpm/Package.resolved | 13 - 12 files changed, 13756 deletions(-) delete mode 100644 packages/google_maps_flutter/force_overrides.ps1 delete mode 100644 packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart.rej delete mode 100644 packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.orig delete mode 100644 packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.rej delete mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.orig delete mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.rej delete mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.orig delete mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.rej delete mode 100644 packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved delete mode 100644 packages/video_player/video_player_avfoundation/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved delete mode 100644 packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved delete mode 100644 packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/packages/google_maps_flutter/force_overrides.ps1 b/packages/google_maps_flutter/force_overrides.ps1 deleted file mode 100644 index 8020e5535232..000000000000 --- a/packages/google_maps_flutter/force_overrides.ps1 +++ /dev/null @@ -1,66 +0,0 @@ -# Run this from the root of your google_maps_flutter group directory -# Usage: .\force_overrides.ps1 - -$packages = @( - "google_maps_flutter", - "google_maps_flutter/example", - "google_maps_flutter_android", - "google_maps_flutter_android/example", - "google_maps_flutter_ios", - "google_maps_flutter_ios/example", - "google_maps_flutter_web", - "google_maps_flutter_web/example" -) - -# The override block to append. -# We use relative paths that work generally from the package root structure. -# Adjust ../ levels dynamically based on depth. -$overridesTemplate = @" - -dependency_overrides: - google_maps_flutter: - path: {0}google_maps_flutter - google_maps_flutter_android: - path: {0}google_maps_flutter_android - google_maps_flutter_ios: - path: {0}google_maps_flutter_ios - google_maps_flutter_platform_interface: - path: {0}google_maps_flutter_platform_interface - google_maps_flutter_web: - path: {0}google_maps_flutter_web -"@ - -foreach ($pkg in $packages) { - $pubspecPath = Join-Path (Get-Location) "$pkg\pubspec.yaml" - - if (Test-Path $pubspecPath) { - Write-Host "Processing $pkg..." -ForegroundColor Cyan - - # Calculate depth to determine how many "../" we need - # If we are in "google_maps_flutter", we need "../" (1 level up to group root) - # If we are in "google_maps_flutter/example", we need "../../" (2 levels up) - $depth = ($pkg.Split('/').Count) - $relativePath = "../" * $depth - - $overrides = $overridesTemplate -f $relativePath - - # Read file content - $content = Get-Content $pubspecPath -Raw - - # Remove existing dependency_overrides if they exist (simple cleanup) - if ($content -match "dependency_overrides:") { - Write-Host " - Removing old overrides..." -ForegroundColor Yellow - $content = $content -replace "(?ms)^dependency_overrides:.*?(\Z|^[a-z])", '$1' - } - - # Append new overrides - $newContent = $content.Trim() + $overrides - Set-Content -Path $pubspecPath -Value $newContent - - Write-Host " - Overrides added." -ForegroundColor Green - } else { - Write-Host " - Skipping $pkg (pubspec.yaml not found)" -ForegroundColor DarkGray - } -} - -Write-Host "`nAll done! Run 'flutter pub get' in each directory." -ForegroundColor White \ No newline at end of file diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart.rej b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart.rej deleted file mode 100644 index b2d158e95efb..000000000000 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart.rej +++ /dev/null @@ -1,11 +0,0 @@ ---- packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart -+++ packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart -@@ -104,7 +104,7 @@ class ExampleGoogleMapController { - GoogleMapsFlutterPlatform.instance - .onTap(mapId: mapId) - .listen((MapTapEvent e) => _googleMapState.onTap(e.position)); -- GoogleMapsFlutterPlatform.instance -+ GoogleMapsFlutterPlatform.instance - .onPoiTap(mapId: mapId) - .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)); - GoogleMapsFlutterPlatform.instance diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.orig b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.orig deleted file mode 100644 index cf8c6a809a0c..000000000000 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.orig +++ /dev/null @@ -1,4548 +0,0 @@ -// Copyright 2013 The Flutter Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.7), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; - -import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; -import 'package:flutter/services.dart'; - -PlatformException _createConnectionError(String channelName) { - return PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); -} - -List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { - if (empty) { - return []; - } - if (error == null) { - return [result]; - } - return [error.code, error.message, error.details]; -} -bool _deepEquals(Object? a, Object? b) { - if (a is List && b is List) { - return a.length == b.length && - a.indexed - .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); - } - if (a is Map && b is Map) { - return a.length == b.length && a.entries.every((MapEntry entry) => - (b as Map).containsKey(entry.key) && - _deepEquals(entry.value, b[entry.key])); - } - return a == b; -} - - -/// Pigeon equivalent of MapType -enum PlatformMapType { - none, - normal, - satellite, - terrain, - hybrid, -} - -enum PlatformRendererType { - legacy, - latest, -} - -/// Join types for polyline joints. -enum PlatformJointType { - mitered, - bevel, - round, -} - -/// Enumeration of possible types of PlatformCap, corresponding to the -/// subclasses of Cap in the Google Maps Android SDK. -/// See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. -enum PlatformCapType { - buttCap, - roundCap, - squareCap, - customCap, -} - -/// Enumeration of possible types for PatternItem. -enum PlatformPatternItemType { - dot, - dash, - gap, -} - -/// Pigeon equivalent of [MapBitmapScaling]. -enum PlatformMapBitmapScaling { - auto, - none, -} - -/// Pigeon representatation of a CameraPosition. -class PlatformCameraPosition { - PlatformCameraPosition({ - required this.bearing, - required this.target, - required this.tilt, - required this.zoom, - }); - - double bearing; - - PlatformLatLng target; - - double tilt; - - double zoom; - - List _toList() { - return [ - bearing, - target, - tilt, - zoom, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraPosition decode(Object result) { - result as List; - return PlatformCameraPosition( - bearing: result[0]! as double, - target: result[1]! as PlatformLatLng, - tilt: result[2]! as double, - zoom: result[3]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraPosition || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon representation of a CameraUpdate. -class PlatformCameraUpdate { - PlatformCameraUpdate({ - required this.cameraUpdate, - }); - - /// This Object shall be any of the below classes prefixed with - /// PlatformCameraUpdate. Each such class represents a different type of - /// camera update, and each holds a different set of data, preventing the - /// use of a single unified class. Pigeon does not support inheritance, which - /// prevents a more strict type bound. - /// See https://github.com/flutter/flutter/issues/117819. - Object cameraUpdate; - - List _toList() { - return [ - cameraUpdate, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdate decode(Object result) { - result as List; - return PlatformCameraUpdate( - cameraUpdate: result[0]!, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdate || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of NewCameraPosition -class PlatformCameraUpdateNewCameraPosition { - PlatformCameraUpdateNewCameraPosition({ - required this.cameraPosition, - }); - - PlatformCameraPosition cameraPosition; - - List _toList() { - return [ - cameraPosition, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateNewCameraPosition decode(Object result) { - result as List; - return PlatformCameraUpdateNewCameraPosition( - cameraPosition: result[0]! as PlatformCameraPosition, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewCameraPosition || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of NewLatLng -class PlatformCameraUpdateNewLatLng { - PlatformCameraUpdateNewLatLng({ - required this.latLng, - }); - - PlatformLatLng latLng; - - List _toList() { - return [ - latLng, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateNewLatLng decode(Object result) { - result as List; - return PlatformCameraUpdateNewLatLng( - latLng: result[0]! as PlatformLatLng, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLng || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of NewLatLngBounds -class PlatformCameraUpdateNewLatLngBounds { - PlatformCameraUpdateNewLatLngBounds({ - required this.bounds, - required this.padding, - }); - - PlatformLatLngBounds bounds; - - double padding; - - List _toList() { - return [ - bounds, - padding, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateNewLatLngBounds decode(Object result) { - result as List; - return PlatformCameraUpdateNewLatLngBounds( - bounds: result[0]! as PlatformLatLngBounds, - padding: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLngBounds || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of NewLatLngZoom -class PlatformCameraUpdateNewLatLngZoom { - PlatformCameraUpdateNewLatLngZoom({ - required this.latLng, - required this.zoom, - }); - - PlatformLatLng latLng; - - double zoom; - - List _toList() { - return [ - latLng, - zoom, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateNewLatLngZoom decode(Object result) { - result as List; - return PlatformCameraUpdateNewLatLngZoom( - latLng: result[0]! as PlatformLatLng, - zoom: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLngZoom || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of ScrollBy -class PlatformCameraUpdateScrollBy { - PlatformCameraUpdateScrollBy({ - required this.dx, - required this.dy, - }); - - double dx; - - double dy; - - List _toList() { - return [ - dx, - dy, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateScrollBy decode(Object result) { - result as List; - return PlatformCameraUpdateScrollBy( - dx: result[0]! as double, - dy: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateScrollBy || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of ZoomBy -class PlatformCameraUpdateZoomBy { - PlatformCameraUpdateZoomBy({ - required this.amount, - this.focus, - }); - - double amount; - - PlatformDoublePair? focus; - - List _toList() { - return [ - amount, - focus, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateZoomBy decode(Object result) { - result as List; - return PlatformCameraUpdateZoomBy( - amount: result[0]! as double, - focus: result[1] as PlatformDoublePair?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoomBy || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of ZoomIn/ZoomOut -class PlatformCameraUpdateZoom { - PlatformCameraUpdateZoom({ - required this.out, - }); - - bool out; - - List _toList() { - return [ - out, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateZoom decode(Object result) { - result as List; - return PlatformCameraUpdateZoom( - out: result[0]! as bool, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoom || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of ZoomTo -class PlatformCameraUpdateZoomTo { - PlatformCameraUpdateZoomTo({ - required this.zoom, - }); - - double zoom; - - List _toList() { - return [ - zoom, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateZoomTo decode(Object result) { - result as List; - return PlatformCameraUpdateZoomTo( - zoom: result[0]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoomTo || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Circle class. -class PlatformCircle { - PlatformCircle({ - this.consumeTapEvents = false, - required this.fillColor, - required this.strokeColor, - this.visible = true, - this.strokeWidth = 10, - this.zIndex = 0.0, - required this.center, - this.radius = 0, - required this.circleId, - }); - - bool consumeTapEvents; - - PlatformColor fillColor; - - PlatformColor strokeColor; - - bool visible; - - int strokeWidth; - - double zIndex; - - PlatformLatLng center; - - double radius; - - String circleId; - - List _toList() { - return [ - consumeTapEvents, - fillColor, - strokeColor, - visible, - strokeWidth, - zIndex, - center, - radius, - circleId, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCircle decode(Object result) { - result as List; - return PlatformCircle( - consumeTapEvents: result[0]! as bool, - fillColor: result[1]! as PlatformColor, - strokeColor: result[2]! as PlatformColor, - visible: result[3]! as bool, - strokeWidth: result[4]! as int, - zIndex: result[5]! as double, - center: result[6]! as PlatformLatLng, - radius: result[7]! as double, - circleId: result[8]! as String, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCircle || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Heatmap class. -class PlatformHeatmap { - PlatformHeatmap({ - required this.heatmapId, - required this.data, - this.gradient, - required this.opacity, - required this.radius, - this.maxIntensity, - }); - - String heatmapId; - - List data; - - PlatformHeatmapGradient? gradient; - - double opacity; - - int radius; - - double? maxIntensity; - - List _toList() { - return [ - heatmapId, - data, - gradient, - opacity, - radius, - maxIntensity, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformHeatmap decode(Object result) { - result as List; - return PlatformHeatmap( - heatmapId: result[0]! as String, - data: (result[1] as List?)!.cast(), - gradient: result[2] as PlatformHeatmapGradient?, - opacity: result[3]! as double, - radius: result[4]! as int, - maxIntensity: result[5] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformHeatmap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the HeatmapGradient class. -/// -/// The Java Gradient structure is slightly different from HeatmapGradient, so -/// this matches the Android API so that conversion can be done on the Dart side -/// where the structures are easier to work with. -class PlatformHeatmapGradient { - PlatformHeatmapGradient({ - required this.colors, - required this.startPoints, - required this.colorMapSize, - }); - - List colors; - - List startPoints; - - int colorMapSize; - - List _toList() { - return [ - colors, - startPoints, - colorMapSize, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformHeatmapGradient decode(Object result) { - result as List; - return PlatformHeatmapGradient( - colors: (result[0] as List?)!.cast(), - startPoints: (result[1] as List?)!.cast(), - colorMapSize: result[2]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformHeatmapGradient || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the WeightedLatLng class. -class PlatformWeightedLatLng { - PlatformWeightedLatLng({ - required this.point, - required this.weight, - }); - - PlatformLatLng point; - - double weight; - - List _toList() { - return [ - point, - weight, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformWeightedLatLng decode(Object result) { - result as List; - return PlatformWeightedLatLng( - point: result[0]! as PlatformLatLng, - weight: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformWeightedLatLng || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the ClusterManager class. -class PlatformClusterManager { - PlatformClusterManager({ - required this.identifier, - }); - - String identifier; - - List _toList() { - return [ - identifier, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformClusterManager decode(Object result) { - result as List; - return PlatformClusterManager( - identifier: result[0]! as String, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformClusterManager || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pair of double values, such as for an offset or size. -class PlatformDoublePair { - PlatformDoublePair({ - required this.x, - required this.y, - }); - - double x; - - double y; - - List _toList() { - return [ - x, - y, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformDoublePair decode(Object result) { - result as List; - return PlatformDoublePair( - x: result[0]! as double, - y: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformDoublePair || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Color class. -/// -/// See https://developer.android.com/reference/android/graphics/Color.html. -class PlatformColor { - PlatformColor({ - required this.argbValue, - }); - - int argbValue; - - List _toList() { - return [ - argbValue, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformColor decode(Object result) { - result as List; - return PlatformColor( - argbValue: result[0]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformColor || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the InfoWindow class. -class PlatformInfoWindow { - PlatformInfoWindow({ - this.title, - this.snippet, - required this.anchor, - }); - - String? title; - - String? snippet; - - PlatformDoublePair anchor; - - List _toList() { - return [ - title, - snippet, - anchor, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformInfoWindow decode(Object result) { - result as List; - return PlatformInfoWindow( - title: result[0] as String?, - snippet: result[1] as String?, - anchor: result[2]! as PlatformDoublePair, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformInfoWindow || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Marker class. -class PlatformMarker { - PlatformMarker({ - this.alpha = 1.0, - required this.anchor, - this.consumeTapEvents = false, - this.draggable = false, - this.flat = false, - required this.icon, - required this.infoWindow, - required this.position, - this.rotation = 0.0, - this.visible = true, - this.zIndex = 0.0, - required this.markerId, - this.clusterManagerId, - }); - - double alpha; - - PlatformDoublePair anchor; - - bool consumeTapEvents; - - bool draggable; - - bool flat; - - PlatformBitmap icon; - - PlatformInfoWindow infoWindow; - - PlatformLatLng position; - - double rotation; - - bool visible; - - double zIndex; - - String markerId; - - String? clusterManagerId; - - List _toList() { - return [ - alpha, - anchor, - consumeTapEvents, - draggable, - flat, - icon, - infoWindow, - position, - rotation, - visible, - zIndex, - markerId, - clusterManagerId, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformMarker decode(Object result) { - result as List; - return PlatformMarker( - alpha: result[0]! as double, - anchor: result[1]! as PlatformDoublePair, - consumeTapEvents: result[2]! as bool, - draggable: result[3]! as bool, - flat: result[4]! as bool, - icon: result[5]! as PlatformBitmap, - infoWindow: result[6]! as PlatformInfoWindow, - position: result[7]! as PlatformLatLng, - rotation: result[8]! as double, - visible: result[9]! as bool, - zIndex: result[10]! as double, - markerId: result[11]! as String, - clusterManagerId: result[12] as String?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformMarker || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Point of Interest class. -class PlatformPointOfInterest { - PlatformPointOfInterest({ - required this.position, - this.name, - required this.placeId, - }); - - PlatformLatLng position; - - String? name; - - String placeId; - - List _toList() { - return [ - position, - name, - placeId, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPointOfInterest decode(Object result) { - result as List; - return PlatformPointOfInterest( - position: result[0]! as PlatformLatLng, - name: result[1] as String?, - placeId: result[2]! as String, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPointOfInterest || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Polygon class. -class PlatformPolygon { - PlatformPolygon({ - required this.polygonId, - required this.consumesTapEvents, - required this.fillColor, - required this.geodesic, - required this.points, - required this.holes, - required this.visible, - required this.strokeColor, - required this.strokeWidth, - required this.zIndex, - }); - - String polygonId; - - bool consumesTapEvents; - - PlatformColor fillColor; - - bool geodesic; - - List points; - - List> holes; - - bool visible; - - PlatformColor strokeColor; - - int strokeWidth; - - int zIndex; - - List _toList() { - return [ - polygonId, - consumesTapEvents, - fillColor, - geodesic, - points, - holes, - visible, - strokeColor, - strokeWidth, - zIndex, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPolygon decode(Object result) { - result as List; - return PlatformPolygon( - polygonId: result[0]! as String, - consumesTapEvents: result[1]! as bool, - fillColor: result[2]! as PlatformColor, - geodesic: result[3]! as bool, - points: (result[4] as List?)!.cast(), - holes: (result[5] as List?)!.cast>(), - visible: result[6]! as bool, - strokeColor: result[7]! as PlatformColor, - strokeWidth: result[8]! as int, - zIndex: result[9]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPolygon || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Polyline class. -class PlatformPolyline { - PlatformPolyline({ - required this.polylineId, - required this.consumesTapEvents, - required this.color, - required this.geodesic, - required this.jointType, - required this.patterns, - required this.points, - required this.startCap, - required this.endCap, - required this.visible, - required this.width, - required this.zIndex, - }); - - String polylineId; - - bool consumesTapEvents; - - PlatformColor color; - - bool geodesic; - - /// The joint type. - PlatformJointType jointType; - - /// The pattern data, as a list of pattern items. - List patterns; - - List points; - - /// The cap at the start and end vertex of a polyline. - /// See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. - PlatformCap startCap; - - PlatformCap endCap; - - bool visible; - - int width; - - int zIndex; - - List _toList() { - return [ - polylineId, - consumesTapEvents, - color, - geodesic, - jointType, - patterns, - points, - startCap, - endCap, - visible, - width, - zIndex, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPolyline decode(Object result) { - result as List; - return PlatformPolyline( - polylineId: result[0]! as String, - consumesTapEvents: result[1]! as bool, - color: result[2]! as PlatformColor, - geodesic: result[3]! as bool, - jointType: result[4]! as PlatformJointType, - patterns: (result[5] as List?)!.cast(), - points: (result[6] as List?)!.cast(), - startCap: result[7]! as PlatformCap, - endCap: result[8]! as PlatformCap, - visible: result[9]! as bool, - width: result[10]! as int, - zIndex: result[11]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPolyline || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of Cap from the platform interface. -/// https://github.com/flutter/packages/blob/main/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/cap.dart -class PlatformCap { - PlatformCap({ - required this.type, - this.bitmapDescriptor, - this.refWidth, - }); - - PlatformCapType type; - - PlatformBitmap? bitmapDescriptor; - - double? refWidth; - - List _toList() { - return [ - type, - bitmapDescriptor, - refWidth, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCap decode(Object result) { - result as List; - return PlatformCap( - type: result[0]! as PlatformCapType, - bitmapDescriptor: result[1] as PlatformBitmap?, - refWidth: result[2] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the PatternItem class. -class PlatformPatternItem { - PlatformPatternItem({ - required this.type, - this.length, - }); - - PlatformPatternItemType type; - - double? length; - - List _toList() { - return [ - type, - length, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPatternItem decode(Object result) { - result as List; - return PlatformPatternItem( - type: result[0]! as PlatformPatternItemType, - length: result[1] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPatternItem || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Tile class. -class PlatformTile { - PlatformTile({ - required this.width, - required this.height, - this.data, - }); - - int width; - - int height; - - Uint8List? data; - - List _toList() { - return [ - width, - height, - data, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformTile decode(Object result) { - result as List; - return PlatformTile( - width: result[0]! as int, - height: result[1]! as int, - data: result[2] as Uint8List?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformTile || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the TileOverlay class. -class PlatformTileOverlay { - PlatformTileOverlay({ - required this.tileOverlayId, - required this.fadeIn, - required this.transparency, - required this.zIndex, - required this.visible, - required this.tileSize, - }); - - String tileOverlayId; - - bool fadeIn; - - double transparency; - - int zIndex; - - bool visible; - - int tileSize; - - List _toList() { - return [ - tileOverlayId, - fadeIn, - transparency, - zIndex, - visible, - tileSize, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformTileOverlay decode(Object result) { - result as List; - return PlatformTileOverlay( - 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, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformTileOverlay || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of Flutter's EdgeInsets. -class PlatformEdgeInsets { - PlatformEdgeInsets({ - required this.top, - required this.bottom, - required this.left, - required this.right, - }); - - double top; - - double bottom; - - double left; - - double right; - - List _toList() { - return [ - top, - bottom, - left, - right, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformEdgeInsets decode(Object result) { - result as List; - return PlatformEdgeInsets( - top: result[0]! as double, - bottom: result[1]! as double, - left: result[2]! as double, - right: result[3]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformEdgeInsets || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of LatLng. -class PlatformLatLng { - PlatformLatLng({ - required this.latitude, - required this.longitude, - }); - - double latitude; - - double longitude; - - List _toList() { - return [ - latitude, - longitude, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformLatLng decode(Object result) { - result as List; - return PlatformLatLng( - latitude: result[0]! as double, - longitude: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformLatLng || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of LatLngBounds. -class PlatformLatLngBounds { - PlatformLatLngBounds({ - required this.northeast, - required this.southwest, - }); - - PlatformLatLng northeast; - - PlatformLatLng southwest; - - List _toList() { - return [ - northeast, - southwest, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformLatLngBounds decode(Object result) { - result as List; - return PlatformLatLngBounds( - northeast: result[0]! as PlatformLatLng, - southwest: result[1]! as PlatformLatLng, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformLatLngBounds || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of Cluster. -class PlatformCluster { - PlatformCluster({ - required this.clusterManagerId, - required this.position, - required this.bounds, - required this.markerIds, - }); - - String clusterManagerId; - - PlatformLatLng position; - - PlatformLatLngBounds bounds; - - List markerIds; - - List _toList() { - return [ - clusterManagerId, - position, - bounds, - markerIds, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCluster decode(Object result) { - result as List; - return PlatformCluster( - clusterManagerId: result[0]! as String, - position: result[1]! as PlatformLatLng, - bounds: result[2]! as PlatformLatLngBounds, - markerIds: (result[3] as List?)!.cast(), - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCluster || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the GroundOverlay class. -class PlatformGroundOverlay { - PlatformGroundOverlay({ - required this.groundOverlayId, - required this.image, - this.position, - this.bounds, - this.width, - this.height, - this.anchor, - required this.transparency, - required this.bearing, - required this.zIndex, - required this.visible, - required this.clickable, - }); - - String groundOverlayId; - - PlatformBitmap image; - - PlatformLatLng? position; - - PlatformLatLngBounds? bounds; - - double? width; - - double? height; - - PlatformDoublePair? anchor; - - double transparency; - - double bearing; - - int zIndex; - - bool visible; - - bool clickable; - - List _toList() { - return [ - groundOverlayId, - image, - position, - bounds, - width, - height, - anchor, - transparency, - bearing, - zIndex, - visible, - clickable, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformGroundOverlay decode(Object result) { - result as List; - return PlatformGroundOverlay( - groundOverlayId: result[0]! as String, - image: result[1]! as PlatformBitmap, - position: result[2] as PlatformLatLng?, - bounds: result[3] as PlatformLatLngBounds?, - width: result[4] as double?, - height: result[5] as double?, - anchor: result[6] as PlatformDoublePair?, - transparency: result[7]! as double, - bearing: result[8]! as double, - zIndex: result[9]! as int, - visible: result[10]! as bool, - clickable: result[11]! as bool, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformGroundOverlay || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_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]). -class PlatformCameraTargetBounds { - PlatformCameraTargetBounds({ - this.bounds, - }); - - PlatformLatLngBounds? bounds; - - List _toList() { - return [ - bounds, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraTargetBounds decode(Object result) { - result as List; - return PlatformCameraTargetBounds( - bounds: result[0] as PlatformLatLngBounds?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraTargetBounds || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Information passed to the platform view creation. -class PlatformMapViewCreationParams { - PlatformMapViewCreationParams({ - required this.initialCameraPosition, - required this.mapConfiguration, - required this.initialCircles, - required this.initialMarkers, - required this.initialPolygons, - required this.initialPolylines, - required this.initialHeatmaps, - required this.initialTileOverlays, - required this.initialClusterManagers, - required this.initialGroundOverlays, - }); - - PlatformCameraPosition initialCameraPosition; - - PlatformMapConfiguration mapConfiguration; - - List initialCircles; - - List initialMarkers; - - List initialPolygons; - - List initialPolylines; - - List initialHeatmaps; - - List initialTileOverlays; - - List initialClusterManagers; - - List initialGroundOverlays; - - List _toList() { - return [ - initialCameraPosition, - mapConfiguration, - initialCircles, - initialMarkers, - initialPolygons, - initialPolylines, - initialHeatmaps, - initialTileOverlays, - initialClusterManagers, - initialGroundOverlays, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformMapViewCreationParams decode(Object result) { - result as List; - return PlatformMapViewCreationParams( - initialCameraPosition: result[0]! as PlatformCameraPosition, - mapConfiguration: result[1]! as PlatformMapConfiguration, - initialCircles: (result[2] as List?)!.cast(), - initialMarkers: (result[3] as List?)!.cast(), - initialPolygons: (result[4] as List?)!.cast(), - initialPolylines: (result[5] as List?)!.cast(), - initialHeatmaps: (result[6] as List?)!.cast(), - initialTileOverlays: (result[7] as List?)!.cast(), - initialClusterManagers: (result[8] as List?)!.cast(), - initialGroundOverlays: (result[9] as List?)!.cast(), - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformMapViewCreationParams || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of MapConfiguration. -class PlatformMapConfiguration { - PlatformMapConfiguration({ - this.compassEnabled, - this.cameraTargetBounds, - this.mapType, - this.minMaxZoomPreference, - this.mapToolbarEnabled, - this.rotateGesturesEnabled, - this.scrollGesturesEnabled, - this.tiltGesturesEnabled, - this.trackCameraPosition, - this.zoomControlsEnabled, - this.zoomGesturesEnabled, - this.myLocationEnabled, - this.myLocationButtonEnabled, - this.padding, - this.indoorViewEnabled, - this.trafficEnabled, - this.buildingsEnabled, - this.liteModeEnabled, - this.mapId, - this.style, - }); - - bool? compassEnabled; - - PlatformCameraTargetBounds? cameraTargetBounds; - - PlatformMapType? mapType; - - PlatformZoomRange? minMaxZoomPreference; - - bool? mapToolbarEnabled; - - bool? rotateGesturesEnabled; - - bool? scrollGesturesEnabled; - - bool? tiltGesturesEnabled; - - bool? trackCameraPosition; - - bool? zoomControlsEnabled; - - bool? zoomGesturesEnabled; - - bool? myLocationEnabled; - - bool? myLocationButtonEnabled; - - PlatformEdgeInsets? padding; - - bool? indoorViewEnabled; - - bool? trafficEnabled; - - bool? buildingsEnabled; - - bool? liteModeEnabled; - - String? mapId; - - String? style; - - List _toList() { - return [ - compassEnabled, - cameraTargetBounds, - mapType, - minMaxZoomPreference, - mapToolbarEnabled, - rotateGesturesEnabled, - scrollGesturesEnabled, - tiltGesturesEnabled, - trackCameraPosition, - zoomControlsEnabled, - zoomGesturesEnabled, - myLocationEnabled, - myLocationButtonEnabled, - padding, - indoorViewEnabled, - trafficEnabled, - buildingsEnabled, - liteModeEnabled, - mapId, - style, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformMapConfiguration decode(Object result) { - result as List; - return PlatformMapConfiguration( - compassEnabled: result[0] as bool?, - cameraTargetBounds: result[1] as PlatformCameraTargetBounds?, - mapType: result[2] as PlatformMapType?, - minMaxZoomPreference: result[3] as PlatformZoomRange?, - mapToolbarEnabled: result[4] as bool?, - rotateGesturesEnabled: result[5] as bool?, - scrollGesturesEnabled: result[6] as bool?, - tiltGesturesEnabled: result[7] as bool?, - trackCameraPosition: result[8] as bool?, - zoomControlsEnabled: result[9] as bool?, - zoomGesturesEnabled: result[10] as bool?, - myLocationEnabled: result[11] as bool?, - myLocationButtonEnabled: result[12] as bool?, - padding: result[13] as PlatformEdgeInsets?, - indoorViewEnabled: result[14] as bool?, - trafficEnabled: result[15] as bool?, - buildingsEnabled: result[16] as bool?, - liteModeEnabled: result[17] as bool?, - mapId: result[18] as String?, - style: result[19] as String?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformMapConfiguration || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon representation of an x,y coordinate. -class PlatformPoint { - PlatformPoint({ - required this.x, - required this.y, - }); - - int x; - - int y; - - List _toList() { - return [ - x, - y, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPoint decode(Object result) { - result as List; - return PlatformPoint( - x: result[0]! as int, - y: result[1]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPoint || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of native TileOverlay properties. -class PlatformTileLayer { - PlatformTileLayer({ - required this.visible, - required this.fadeIn, - required this.transparency, - required this.zIndex, - }); - - bool visible; - - bool fadeIn; - - double transparency; - - double zIndex; - - List _toList() { - return [ - visible, - fadeIn, - transparency, - zIndex, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformTileLayer decode(Object result) { - result as List; - return PlatformTileLayer( - visible: result[0]! as bool, - fadeIn: result[1]! as bool, - transparency: result[2]! as double, - zIndex: result[3]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformTileLayer || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Possible outcomes of launching a URL. -class PlatformZoomRange { - PlatformZoomRange({ - this.min, - this.max, - }); - - double? min; - - double? max; - - List _toList() { - return [ - min, - max, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformZoomRange decode(Object result) { - result as List; - return PlatformZoomRange( - min: result[0] as double?, - max: result[1] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformZoomRange || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint -/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which -/// may hold the pigeon equivalent type of any of them. -class PlatformBitmap { - PlatformBitmap({ - required this.bitmap, - }); - - /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], - /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], - /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. - /// As Pigeon does not currently support data class inheritance, this - /// approach allows for the different bitmap implementations to be valid - /// argument and return types of the API methods. See - /// https://github.com/flutter/flutter/issues/117819. - Object bitmap; - - List _toList() { - return [ - bitmap, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmap decode(Object result) { - result as List; - return PlatformBitmap( - bitmap: result[0]!, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [DefaultMarker]. See -/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#defaultMarker(float) -class PlatformBitmapDefaultMarker { - PlatformBitmapDefaultMarker({ - this.hue, - }); - - double? hue; - - List _toList() { - return [ - hue, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapDefaultMarker decode(Object result) { - result as List; - return PlatformBitmapDefaultMarker( - hue: result[0] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapDefaultMarker || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [BytesBitmap]. See -/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#fromBitmap(android.graphics.Bitmap) -class PlatformBitmapBytes { - PlatformBitmapBytes({ - required this.byteData, - this.size, - }); - - Uint8List byteData; - - PlatformDoublePair? size; - - List _toList() { - return [ - byteData, - size, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapBytes decode(Object result) { - result as List; - return PlatformBitmapBytes( - byteData: result[0]! as Uint8List, - size: result[1] as PlatformDoublePair?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapBytes || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [AssetBitmap]. See -/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname -class PlatformBitmapAsset { - PlatformBitmapAsset({ - required this.name, - this.pkg, - }); - - String name; - - String? pkg; - - List _toList() { - return [ - name, - pkg, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapAsset decode(Object result) { - result as List; - return PlatformBitmapAsset( - name: result[0]! as String, - pkg: result[1] as String?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapAsset || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [AssetImageBitmap]. See -/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname -class PlatformBitmapAssetImage { - PlatformBitmapAssetImage({ - required this.name, - required this.scale, - this.size, - }); - - String name; - - double scale; - - PlatformDoublePair? size; - - List _toList() { - return [ - name, - scale, - size, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapAssetImage decode(Object result) { - result as List; - return PlatformBitmapAssetImage( - name: result[0]! as String, - scale: result[1]! as double, - size: result[2] as PlatformDoublePair?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapAssetImage || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [AssetMapBitmap]. See -/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname -class PlatformBitmapAssetMap { - PlatformBitmapAssetMap({ - required this.assetName, - required this.bitmapScaling, - required this.imagePixelRatio, - this.width, - this.height, - }); - - String assetName; - - PlatformMapBitmapScaling bitmapScaling; - - double imagePixelRatio; - - double? width; - - double? height; - - List _toList() { - return [ - assetName, - bitmapScaling, - imagePixelRatio, - width, - height, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapAssetMap decode(Object result) { - result as List; - return PlatformBitmapAssetMap( - assetName: result[0]! as String, - bitmapScaling: result[1]! as PlatformMapBitmapScaling, - imagePixelRatio: result[2]! as double, - width: result[3] as double?, - height: result[4] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapAssetMap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [BytesMapBitmap]. See -/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-frombitmap-bitmap-image -class PlatformBitmapBytesMap { - PlatformBitmapBytesMap({ - required this.byteData, - required this.bitmapScaling, - required this.imagePixelRatio, - this.width, - this.height, - }); - - Uint8List byteData; - - PlatformMapBitmapScaling bitmapScaling; - - double imagePixelRatio; - - double? width; - - double? height; - - List _toList() { - return [ - byteData, - bitmapScaling, - imagePixelRatio, - width, - height, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapBytesMap decode(Object result) { - result as List; - return PlatformBitmapBytesMap( - byteData: result[0]! as Uint8List, - bitmapScaling: result[1]! as PlatformMapBitmapScaling, - imagePixelRatio: result[2]! as double, - width: result[3] as double?, - height: result[4] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapBytesMap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else if (value is PlatformMapType) { - buffer.putUint8(129); - writeValue(buffer, value.index); - } else if (value is PlatformRendererType) { - buffer.putUint8(130); - writeValue(buffer, value.index); - } else if (value is PlatformJointType) { - buffer.putUint8(131); - writeValue(buffer, value.index); - } else if (value is PlatformCapType) { - buffer.putUint8(132); - writeValue(buffer, value.index); - } else if (value is PlatformPatternItemType) { - buffer.putUint8(133); - writeValue(buffer, value.index); - } else if (value is PlatformMapBitmapScaling) { - buffer.putUint8(134); - writeValue(buffer, value.index); - } else if (value is PlatformCameraPosition) { - buffer.putUint8(135); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { - buffer.putUint8(136); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewCameraPosition) { - buffer.putUint8(137); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLng) { - buffer.putUint8(138); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngBounds) { - buffer.putUint8(139); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngZoom) { - buffer.putUint8(140); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateScrollBy) { - buffer.putUint8(141); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomBy) { - buffer.putUint8(142); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoom) { - buffer.putUint8(143); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomTo) { - buffer.putUint8(144); - writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { - buffer.putUint8(145); - writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { - buffer.putUint8(146); - writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmapGradient) { - buffer.putUint8(147); - writeValue(buffer, value.encode()); - } else if (value is PlatformWeightedLatLng) { - buffer.putUint8(148); - writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { - buffer.putUint8(149); - writeValue(buffer, value.encode()); - } else if (value is PlatformDoublePair) { - buffer.putUint8(150); - writeValue(buffer, value.encode()); - } else if (value is PlatformColor) { - buffer.putUint8(151); - writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { - buffer.putUint8(152); - writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { - buffer.putUint8(153); - writeValue(buffer, value.encode()); - } else if (value is PlatformPointOfInterest) { - buffer.putUint8(154); - writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { - buffer.putUint8(155); - writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { - buffer.putUint8(156); - writeValue(buffer, value.encode()); - } else if (value is PlatformCap) { - buffer.putUint8(157); - writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { - buffer.putUint8(158); - writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { - buffer.putUint8(159); - writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { - buffer.putUint8(160); - writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { - buffer.putUint8(161); - writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { - buffer.putUint8(162); - writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { - buffer.putUint8(163); - writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { - buffer.putUint8(164); - writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { - buffer.putUint8(165); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { - buffer.putUint8(166); - writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { - buffer.putUint8(167); - writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { - buffer.putUint8(168); - writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { - buffer.putUint8(169); - writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { - buffer.putUint8(170); - writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { - buffer.putUint8(171); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { - buffer.putUint8(172); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { - buffer.putUint8(173); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { - buffer.putUint8(174); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { - buffer.putUint8(175); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { - buffer.putUint8(176); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { - buffer.putUint8(177); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { - buffer.putUint8(178); - writeValue(buffer, value.encode()); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 129: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformMapType.values[value]; - case 130: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformRendererType.values[value]; - case 131: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformJointType.values[value]; - case 132: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformCapType.values[value]; - case 133: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformPatternItemType.values[value]; - case 134: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformMapBitmapScaling.values[value]; - case 135: - return PlatformCameraPosition.decode(readValue(buffer)!); - case 136: - return PlatformCameraUpdate.decode(readValue(buffer)!); - case 137: - return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!); - case 138: - return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!); - case 139: - return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); - case 140: - return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); - case 141: - return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); - case 142: - return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); - case 143: - return PlatformCameraUpdateZoom.decode(readValue(buffer)!); - case 144: - return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); - case 145: - return PlatformCircle.decode(readValue(buffer)!); - case 146: - return PlatformHeatmap.decode(readValue(buffer)!); - case 147: - return PlatformHeatmapGradient.decode(readValue(buffer)!); - case 148: - return PlatformWeightedLatLng.decode(readValue(buffer)!); - case 149: - return PlatformClusterManager.decode(readValue(buffer)!); - case 150: - return PlatformDoublePair.decode(readValue(buffer)!); - case 151: - return PlatformColor.decode(readValue(buffer)!); - case 152: - return PlatformInfoWindow.decode(readValue(buffer)!); - case 153: - return PlatformMarker.decode(readValue(buffer)!); - case 154: - return PlatformPointOfInterest.decode(readValue(buffer)!); - case 155: - return PlatformPolygon.decode(readValue(buffer)!); - case 156: - return PlatformPolyline.decode(readValue(buffer)!); - case 157: - return PlatformCap.decode(readValue(buffer)!); - case 158: - return PlatformPatternItem.decode(readValue(buffer)!); - case 159: - return PlatformTile.decode(readValue(buffer)!); - case 160: - return PlatformTileOverlay.decode(readValue(buffer)!); - case 161: - return PlatformEdgeInsets.decode(readValue(buffer)!); - case 162: - return PlatformLatLng.decode(readValue(buffer)!); - case 163: - return PlatformLatLngBounds.decode(readValue(buffer)!); - case 164: - return PlatformCluster.decode(readValue(buffer)!); - case 165: - return PlatformGroundOverlay.decode(readValue(buffer)!); - case 166: - return PlatformCameraTargetBounds.decode(readValue(buffer)!); - case 167: - return PlatformMapViewCreationParams.decode(readValue(buffer)!); - case 168: - return PlatformMapConfiguration.decode(readValue(buffer)!); - case 169: - return PlatformPoint.decode(readValue(buffer)!); - case 170: - return PlatformTileLayer.decode(readValue(buffer)!); - case 171: - return PlatformZoomRange.decode(readValue(buffer)!); - case 172: - return PlatformBitmap.decode(readValue(buffer)!); - case 173: - return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); - case 174: - return PlatformBitmapBytes.decode(readValue(buffer)!); - case 175: - return PlatformBitmapAsset.decode(readValue(buffer)!); - case 176: - return PlatformBitmapAssetImage.decode(readValue(buffer)!); - case 177: - return PlatformBitmapAssetMap.decode(readValue(buffer)!); - case 178: - return PlatformBitmapBytesMap.decode(readValue(buffer)!); - default: - return super.readValueOfType(type, buffer); - } - } -} - -/// Interface for non-test interactions with the native SDK. -/// -/// For test-only state queries, see [MapsInspectorApi]. -class MapsApi { - /// Constructor for [MapsApi]. 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. - MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - /// Returns once the map instance is available. - Future waitForMap() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the map's configuration options. - /// - /// Only non-null configuration values will result in updates; options with - /// null values will remain unchanged. - Future updateMapConfiguration(PlatformMapConfiguration configuration) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of circles on the map. - Future updateCircles(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of heatmaps on the map. - Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of custer managers for clusters on the map. - Future updateClusterManagers(List toAdd, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of markers on the map. - Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of polygonss on the map. - Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of polylines on the map. - Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of tile overlays on the map. - Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of ground overlays on the map. - Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Gets the screen coordinate for the given map location. - Future getScreenCoordinate(PlatformLatLng latLng) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformPoint?)!; - } - } - - /// Gets the map location for the given screen coordinate. - Future getLatLng(PlatformPoint screenCoordinate) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformLatLng?)!; - } - } - - /// Gets the map region currently displayed on the map. - Future getVisibleRegion() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformLatLngBounds?)!; - } - } - - /// Moves the camera according to [cameraUpdate] immediately, with no - /// animation. - Future moveCamera(PlatformCameraUpdate cameraUpdate) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Moves the camera according to [cameraUpdate], animating the update using a - /// duration in milliseconds if provided. - Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Gets the current map zoom level. - Future getZoomLevel() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as double?)!; - } - } - - /// Show the info window for the marker with the given ID. - Future showInfoWindow(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Hide the info window for the marker with the given ID. - Future hideInfoWindow(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Returns true if the marker with the given ID is currently displaying its - /// info window. - Future isInfoWindowShown(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - /// 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. - Future setStyle(String style) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - /// Returns true if 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. - Future didLastStyleSucceed() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - /// Clears the cache of tiles previously requseted from the tile provider. - Future clearTileCache(String tileOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Takes a snapshot of the map and returns its image data. - Future takeSnapshot() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as Uint8List?)!; - } - } -} - -abstract class MapsCallbackApi { - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - /// Called when the map camera starts moving. - void onCameraMoveStarted(); - - /// Called when the map camera moves. - void onCameraMove(PlatformCameraPosition cameraPosition); - - /// Called when the map camera stops moving. - void onCameraIdle(); - - /// Called when the map, not a specifc map object, is tapped. - void onTap(PlatformLatLng position); - - /// Called when the map, not a specifc map object, is long pressed. - void onLongPress(PlatformLatLng position); - - /// Called when a marker is tapped. - void onMarkerTap(String markerId); - - /// Called when a marker drag starts. - void onMarkerDragStart(String markerId, PlatformLatLng position); - - /// Called when a marker drag updates. - void onMarkerDrag(String markerId, PlatformLatLng position); - - /// Called when a marker drag ends. - void onMarkerDragEnd(String markerId, PlatformLatLng position); - - /// Called when a marker's info window is tapped. - void onInfoWindowTap(String markerId); - - /// Called when a circle is tapped. - void onCircleTap(String circleId); - - /// Called when a marker cluster is tapped. - void onClusterTap(PlatformCluster cluster); - - /// Called when a POI is tapped. - void onPoiTap(PlatformPointOfInterest poi); - - /// Called when a polygon is tapped. - void onPolygonTap(String polygonId); - - /// Called when a polyline is tapped. - void onPolylineTap(String polylineId); - - /// Called when a ground overlay is tapped. - void onGroundOverlayTap(String groundOverlayId); - - /// Called to get data for a map tile. - Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); - - static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { - messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - try { - api.onCameraMoveStarted(); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null.'); - final List args = (message as List?)!; - 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 { - api.onCameraMove(arg_cameraPosition!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - try { - api.onCameraIdle(); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null.'); - final List args = (message as List?)!; - final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); - try { - api.onTap(arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null.'); - final List args = (message as List?)!; - final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); - try { - api.onLongPress(arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); - try { - api.onMarkerTap(arg_markerId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); - try { - api.onMarkerDragStart(arg_markerId!, arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); - try { - api.onMarkerDrag(arg_markerId!, arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); - try { - api.onMarkerDragEnd(arg_markerId!, arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); - try { - api.onInfoWindowTap(arg_markerId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null.'); - final List args = (message as List?)!; - final String? arg_circleId = (args[0] as String?); - assert(arg_circleId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null, expected non-null String.'); - try { - api.onCircleTap(arg_circleId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null.'); - final List args = (message as List?)!; - final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); - assert(arg_cluster != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); - try { - api.onClusterTap(arg_cluster!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.'); - final List args = (message as List?)!; - final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); - assert(arg_poi != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); - try { - api.onPoiTap(arg_poi!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null.'); - final List args = (message as List?)!; - final String? arg_polygonId = (args[0] as String?); - assert(arg_polygonId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); - try { - api.onPolygonTap(arg_polygonId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null.'); - final List args = (message as List?)!; - final String? arg_polylineId = (args[0] as String?); - assert(arg_polylineId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); - try { - api.onPolylineTap(arg_polylineId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.'); - final List args = (message as List?)!; - final String? arg_groundOverlayId = (args[0] as String?); - assert(arg_groundOverlayId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); - try { - api.onGroundOverlayTap(arg_groundOverlayId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null.'); - final List args = (message as List?)!; - final String? arg_tileOverlayId = (args[0] as String?); - assert(arg_tileOverlayId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); - final PlatformPoint? arg_location = (args[1] as PlatformPoint?); - assert(arg_location != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); - final int? arg_zoom = (args[2] as int?); - 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!); - return wrapResponse(result: output); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - } -} - -/// Interface for global SDK initialization. -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 = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - /// Initializes the Google Maps SDK with the given renderer preference. - /// - /// 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. - Future initializeWithPreferredRenderer(PlatformRendererType? type) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformRendererType?)!; - } - } - - /// Attempts to trigger any thread-blocking work - /// the Google Maps SDK normally does when a map is shown for the first time. - Future warmup() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } -} - -/// 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. -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 = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future createView(PlatformMapViewCreationParams? type) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } -} - -/// Inspector API only intended for use in integration tests. -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 = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future areBuildingsEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areRotateGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areZoomControlsEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areScrollGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areTiltGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areZoomGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future isCompassEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future isLiteModeEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as bool?); - } - } - - Future isMapToolbarEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future isMyLocationButtonEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future isTrafficEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future getTileOverlayInfo(String tileOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as PlatformTileLayer?); - } - } - - Future getGroundOverlayInfo(String groundOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as PlatformGroundOverlay?); - } - } - - Future getZoomRange() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformZoomRange?)!; - } - } - - Future> getClusters(String clusterManagerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as List?)!.cast(); - } - } - - Future getCameraPosition() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformCameraPosition?)!; - } - } -} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.rej b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.rej deleted file mode 100644 index e8ad1b59be66..000000000000 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.rej +++ /dev/null @@ -1,1574 +0,0 @@ ---- packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart -+++ packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart -@@ -31,64 +35,43 @@ List wrapResponse({Object? result, PlatformException? error, bool empty - } - return [error.code, error.message, error.details]; - } -+ - bool _deepEquals(Object? a, Object? b) { - if (a is List && b is List) { - return a.length == b.length && -- a.indexed -- .every(((int, dynamic) item) => _deepEquals(item., b[item.])); -+ a.indexed.every( -+ ((int, dynamic) item) => _deepEquals(item., b[item.]), -+ ); - } - if (a is Map && b is Map) { -- return a.length == b.length && a.entries.every((MapEntry entry) => -- (b as Map).containsKey(entry.key) && -- _deepEquals(entry.value, b[entry.key])); -+ return a.length == b.length && -+ a.entries.every( -+ (MapEntry entry) => -+ (b as Map).containsKey(entry.key) && -+ _deepEquals(entry.value, b[entry.key]), -+ ); - } - return a == b; - } - -- - /// Pigeon equivalent of MapType --enum PlatformMapType { -- none, -- normal, -- satellite, -- terrain, -- hybrid, --} -+enum PlatformMapType { none, normal, satellite, terrain, hybrid } - --enum PlatformRendererType { -- legacy, -- latest, --} -+enum PlatformRendererType { legacy, latest } - - /// Join types for polyline joints. --enum PlatformJointType { -- mitered, -- bevel, -- round, --} -+enum PlatformJointType { mitered, bevel, round } - - /// Enumeration of possible types of PlatformCap, corresponding to the - /// subclasses of Cap in the Google Maps Android SDK. - /// See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. --enum PlatformCapType { -- buttCap, -- roundCap, -- squareCap, -- customCap, --} -+enum PlatformCapType { buttCap, roundCap, squareCap, customCap } - - /// Enumeration of possible types for PatternItem. --enum PlatformPatternItemType { -- dot, -- dash, -- gap, --} -+enum PlatformPatternItemType { dot, dash, gap } - - /// Pigeon equivalent of [MapBitmapScaling]. --enum PlatformMapBitmapScaling { -- auto, -- none, --} -+enum PlatformMapBitmapScaling { auto, none } - - /// Pigeon representatation of a CameraPosition. - class PlatformCameraPosition { -@@ -2732,8 +2518,10 @@ class MapsApi { - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) -- : pigeonVar_binaryMessenger = binaryMessenger, -- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ : pigeonVar_binaryMessenger = binaryMessenger, -+ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); -@@ -2742,7 +2530,8 @@ class MapsApi { - - /// Returns once the map instance is available. - Future waitForMap() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -2767,14 +2556,19 @@ class MapsApi { - /// - /// Only non-null configuration values will result in updates; options with - /// null values will remain unchanged. -- Future updateMapConfiguration(PlatformMapConfiguration configuration) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration'; -+ Future updateMapConfiguration( -+ PlatformMapConfiguration configuration, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [configuration], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2790,14 +2584,21 @@ class MapsApi { - } - - /// Updates the set of circles on the map. -- Future updateCircles(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles'; -+ Future updateCircles( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2813,14 +2614,21 @@ class MapsApi { - } - - /// Updates the set of heatmaps on the map. -- Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps'; -+ Future updateHeatmaps( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2836,14 +2644,20 @@ class MapsApi { - } - - /// Updates the set of custer managers for clusters on the map. -- Future updateClusterManagers(List toAdd, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers'; -+ Future updateClusterManagers( -+ List toAdd, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2859,14 +2673,21 @@ class MapsApi { - } - - /// Updates the set of markers on the map. -- Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers'; -+ Future updateMarkers( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2882,14 +2703,21 @@ class MapsApi { - } - - /// Updates the set of polygonss on the map. -- Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons'; -+ Future updatePolygons( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2905,14 +2733,21 @@ class MapsApi { - } - - /// Updates the set of polylines on the map. -- Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines'; -+ Future updatePolylines( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2928,14 +2763,21 @@ class MapsApi { - } - - /// Updates the set of tile overlays on the map. -- Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays'; -+ Future updateTileOverlays( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2951,14 +2793,21 @@ class MapsApi { - } - - /// Updates the set of ground overlays on the map. -- Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays'; -+ Future updateGroundOverlays( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2975,13 +2824,16 @@ class MapsApi { - - /// Gets the screen coordinate for the given map location. - Future getScreenCoordinate(PlatformLatLng latLng) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [latLng], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3003,13 +2855,16 @@ class MapsApi { - - /// Gets the map location for the given screen coordinate. - Future getLatLng(PlatformPoint screenCoordinate) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [screenCoordinate], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3031,7 +2886,8 @@ class MapsApi { - - /// Gets the map region currently displayed on the map. - Future getVisibleRegion() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3060,13 +2916,16 @@ class MapsApi { - /// Moves the camera according to [cameraUpdate] immediately, with no - /// animation. - Future moveCamera(PlatformCameraUpdate cameraUpdate) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [cameraUpdate], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3083,14 +2942,20 @@ class MapsApi { - - /// Moves the camera according to [cameraUpdate], animating the update using a - /// duration in milliseconds if provided. -- Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera'; -+ Future animateCamera( -+ PlatformCameraUpdate cameraUpdate, -+ int? durationMilliseconds, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [cameraUpdate, durationMilliseconds], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3107,7 +2972,8 @@ class MapsApi { - - /// Gets the current map zoom level. - Future getZoomLevel() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3135,13 +3001,16 @@ class MapsApi { - - /// Show the info window for the marker with the given ID. - Future showInfoWindow(String markerId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [markerId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3158,13 +3027,16 @@ class MapsApi { - - /// Hide the info window for the marker with the given ID. - Future hideInfoWindow(String markerId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [markerId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3182,13 +3054,16 @@ class MapsApi { - /// Returns true if the marker with the given ID is currently displaying its - /// info window. - Future isInfoWindowShown(String markerId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [markerId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3214,13 +3089,16 @@ class MapsApi { - /// Returns false if there was an error setting the style, such as an invalid - /// style string. - Future setStyle(String style) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [style], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3246,7 +3124,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 pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3274,13 +3153,16 @@ class MapsApi { - - /// Clears the cache of tiles previously requseted from the tile provider. - Future clearTileCache(String tileOverlayId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [tileOverlayId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3297,7 +3179,8 @@ class MapsApi { - - /// Takes a snapshot of the map and returns its image data. - Future takeSnapshot() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3376,14 +3259,26 @@ abstract class MapsCallbackApi { - void onGroundOverlayTap(String groundOverlayId); - - /// Called to get data for a map tile. -- Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); -+ Future getTileOverlayTile( -+ String tileOverlayId, -+ PlatformPoint location, -+ int zoom, -+ ); - -- static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { -- messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ static void setUp( -+ MapsCallbackApi? api, { -+ BinaryMessenger? binaryMessenger, -+ String messageChannelSuffix = '', -+ }) { -+ messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - { - final pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { -@@ -3393,41 +3288,54 @@ 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null.'); -+ assert( -+ message != 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?); -- assert(arg_cameraPosition != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null, expected non-null 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 { - api.onCameraMove(arg_cameraPosition!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { -@@ -3437,373 +3345,502 @@ 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onTap(arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onLongPress(arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null, expected non-null String.', -+ ); - try { - api.onMarkerTap(arg_markerId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.', -+ ); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); -- assert(arg_position != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onMarkerDragStart(arg_markerId!, arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null String.', -+ ); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); -- assert(arg_position != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onMarkerDrag(arg_markerId!, arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.', -+ ); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); -- assert(arg_position != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onMarkerDragEnd(arg_markerId!, arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.', -+ ); - try { - api.onInfoWindowTap(arg_markerId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null, expected non-null String.'); -+ assert( -+ arg_circleId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null, expected non-null String.', -+ ); - try { - api.onCircleTap(arg_circleId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); -+ assert( -+ arg_cluster != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.', -+ ); - try { - api.onClusterTap(arg_cluster!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.', -+ ); - final List args = (message as List?)!; -- final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); -- assert(arg_poi != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); -+ final PlatformPointOfInterest? arg_poi = -+ (args[0] as PlatformPointOfInterest?); -+ assert( -+ arg_poi != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.', -+ ); - try { - api.onPoiTap(arg_poi!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); -+ assert( -+ arg_polygonId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null, expected non-null String.', -+ ); - try { - api.onPolygonTap(arg_polygonId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); -+ assert( -+ arg_polylineId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null, expected non-null String.', -+ ); - try { - api.onPolylineTap(arg_polylineId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.', -+ ); - final List args = (message as List?)!; - final String? arg_groundOverlayId = (args[0] as String?); -- assert(arg_groundOverlayId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); -+ assert( -+ arg_groundOverlayId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.', -+ ); - try { - api.onGroundOverlayTap(arg_groundOverlayId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); -+ assert( -+ arg_tileOverlayId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.', -+ ); - final PlatformPoint? arg_location = (args[1] as PlatformPoint?); -- assert(arg_location != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); -+ assert( -+ arg_location != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.', -+ ); - final int? arg_zoom = (args[2] as int?); -- assert(arg_zoom != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); -+ 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()), -+ ); - } - }); - } -@@ -3816,9 +3853,13 @@ 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 = ''}) -- : pigeonVar_binaryMessenger = binaryMessenger, -- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ MapsInitializerApi({ -+ BinaryMessenger? binaryMessenger, -+ String messageChannelSuffix = '', -+ }) : pigeonVar_binaryMessenger = binaryMessenger, -+ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); -@@ -3831,14 +3872,19 @@ class MapsInitializerApi { - /// - /// Calling this more than once in the lifetime of an application will result - /// in an error. -- Future initializeWithPreferredRenderer(PlatformRendererType? type) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer'; -+ Future initializeWithPreferredRenderer( -+ PlatformRendererType? type, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [type], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3861,7 +3907,8 @@ class MapsInitializerApi { - /// Attempts to trigger any thread-blocking work - /// the Google Maps SDK normally does when a map is shown for the first time. - Future warmup() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3890,9 +3937,13 @@ 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 = ''}) -- : pigeonVar_binaryMessenger = binaryMessenger, -- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ MapsPlatformViewApi({ -+ BinaryMessenger? binaryMessenger, -+ String messageChannelSuffix = '', -+ }) : pigeonVar_binaryMessenger = binaryMessenger, -+ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); -@@ -3900,13 +3951,16 @@ class MapsPlatformViewApi { - final String pigeonVar_messageChannelSuffix; - - Future createView(PlatformMapViewCreationParams? type) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [type], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3927,9 +3981,13 @@ 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 = ''}) -- : pigeonVar_binaryMessenger = binaryMessenger, -- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ MapsInspectorApi({ -+ BinaryMessenger? binaryMessenger, -+ String messageChannelSuffix = '', -+ }) : pigeonVar_binaryMessenger = binaryMessenger, -+ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); -@@ -3937,7 +3995,8 @@ class MapsInspectorApi { - final String pigeonVar_messageChannelSuffix; - - Future areBuildingsEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3964,7 +4023,8 @@ class MapsInspectorApi { - } - - Future areRotateGesturesEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3991,7 +4051,8 @@ class MapsInspectorApi { - } - - Future areZoomControlsEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4018,7 +4079,8 @@ class MapsInspectorApi { - } - - Future areScrollGesturesEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4045,7 +4107,8 @@ class MapsInspectorApi { - } - - Future areTiltGesturesEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4072,7 +4135,8 @@ class MapsInspectorApi { - } - - Future areZoomGesturesEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4099,7 +4163,8 @@ class MapsInspectorApi { - } - - Future isCompassEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4126,7 +4191,8 @@ class MapsInspectorApi { - } - - Future isLiteModeEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4148,7 +4214,8 @@ class MapsInspectorApi { - } - - Future isMapToolbarEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4175,7 +4242,8 @@ class MapsInspectorApi { - } - - Future isMyLocationButtonEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4202,7 +4270,8 @@ class MapsInspectorApi { - } - - Future isTrafficEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4229,13 +4298,16 @@ class MapsInspectorApi { - } - - Future getTileOverlayInfo(String tileOverlayId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [tileOverlayId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -4250,14 +4322,19 @@ class MapsInspectorApi { - } - } - -- Future getGroundOverlayInfo(String groundOverlayId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo'; -+ Future getGroundOverlayInfo( -+ String groundOverlayId, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [groundOverlayId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -4273,7 +4350,8 @@ class MapsInspectorApi { - } - - Future getZoomRange() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4300,13 +4378,16 @@ class MapsInspectorApi { - } - - Future> getClusters(String clusterManagerId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [clusterManagerId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -4322,12 +4403,14 @@ class MapsInspectorApi { - message: 'Host platform returned null value for non-null return value.', - ); - } else { -- return (pigeonVar_replyList[0] as List?)!.cast(); -+ return (pigeonVar_replyList[0] as List?)! -+ .cast(); - } - } - - Future getCameraPosition() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.orig b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.orig deleted file mode 100644 index e52fe5cfa423..000000000000 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.orig +++ /dev/null @@ -1,901 +0,0 @@ -// Copyright 2013 The Flutter Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.7), do not edit directly. -// See also: https://pub.dev/packages/pigeon - -@import Foundation; - -@protocol FlutterBinaryMessenger; -@protocol FlutterMessageCodec; -@class FlutterError; -@class FlutterStandardTypedData; - -NS_ASSUME_NONNULL_BEGIN - -/// Pigeon equivalent of MapType -typedef NS_ENUM(NSUInteger, FGMPlatformMapType) { - FGMPlatformMapTypeNone = 0, - FGMPlatformMapTypeNormal = 1, - FGMPlatformMapTypeSatellite = 2, - FGMPlatformMapTypeTerrain = 3, - FGMPlatformMapTypeHybrid = 4, -}; - -/// Wrapper for FGMPlatformMapType to allow for nullability. -@interface FGMPlatformMapTypeBox : NSObject -@property(nonatomic, assign) FGMPlatformMapType value; -- (instancetype)initWithValue:(FGMPlatformMapType)value; -@end - -/// Join types for polyline joints. -typedef NS_ENUM(NSUInteger, FGMPlatformJointType) { - FGMPlatformJointTypeMitered = 0, - FGMPlatformJointTypeBevel = 1, - FGMPlatformJointTypeRound = 2, -}; - -/// Wrapper for FGMPlatformJointType to allow for nullability. -@interface FGMPlatformJointTypeBox : NSObject -@property(nonatomic, assign) FGMPlatformJointType value; -- (instancetype)initWithValue:(FGMPlatformJointType)value; -@end - -/// Enumeration of possible types for PatternItem. -typedef NS_ENUM(NSUInteger, FGMPlatformPatternItemType) { - FGMPlatformPatternItemTypeDot = 0, - FGMPlatformPatternItemTypeDash = 1, - FGMPlatformPatternItemTypeGap = 2, -}; - -/// Wrapper for FGMPlatformPatternItemType to allow for nullability. -@interface FGMPlatformPatternItemTypeBox : NSObject -@property(nonatomic, assign) FGMPlatformPatternItemType value; -- (instancetype)initWithValue:(FGMPlatformPatternItemType)value; -@end - -/// Pigeon equivalent of [MapBitmapScaling]. -typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - FGMPlatformMapBitmapScalingAuto = 0, - FGMPlatformMapBitmapScalingNone = 1, -}; - -/// Wrapper for FGMPlatformMapBitmapScaling to allow for nullability. -@interface FGMPlatformMapBitmapScalingBox : NSObject -@property(nonatomic, assign) FGMPlatformMapBitmapScaling value; -- (instancetype)initWithValue:(FGMPlatformMapBitmapScaling)value; -@end - -@class FGMPlatformCameraPosition; -@class FGMPlatformCameraUpdate; -@class FGMPlatformCameraUpdateNewCameraPosition; -@class FGMPlatformCameraUpdateNewLatLng; -@class FGMPlatformCameraUpdateNewLatLngBounds; -@class FGMPlatformCameraUpdateNewLatLngZoom; -@class FGMPlatformCameraUpdateScrollBy; -@class FGMPlatformCameraUpdateZoomBy; -@class FGMPlatformCameraUpdateZoom; -@class FGMPlatformCameraUpdateZoomTo; -@class FGMPlatformCircle; -@class FGMPlatformHeatmap; -@class FGMPlatformHeatmapGradient; -@class FGMPlatformWeightedLatLng; -@class FGMPlatformInfoWindow; -@class FGMPlatformCluster; -@class FGMPlatformClusterManager; -@class FGMPlatformMarker; -@class FGMPlatformPointOfInterest; -@class FGMPlatformPolygon; -@class FGMPlatformPolyline; -@class FGMPlatformPatternItem; -@class FGMPlatformTile; -@class FGMPlatformTileOverlay; -@class FGMPlatformEdgeInsets; -@class FGMPlatformLatLng; -@class FGMPlatformLatLngBounds; -@class FGMPlatformCameraTargetBounds; -@class FGMPlatformGroundOverlay; -@class FGMPlatformMapViewCreationParams; -@class FGMPlatformMapConfiguration; -@class FGMPlatformPoint; -@class FGMPlatformSize; -@class FGMPlatformColor; -@class FGMPlatformTileLayer; -@class FGMPlatformZoomRange; -@class FGMPlatformBitmap; -@class FGMPlatformBitmapDefaultMarker; -@class FGMPlatformBitmapBytes; -@class FGMPlatformBitmapAsset; -@class FGMPlatformBitmapAssetImage; -@class FGMPlatformBitmapAssetMap; -@class FGMPlatformBitmapBytesMap; - -/// Pigeon representatation of a CameraPosition. -@interface FGMPlatformCameraPosition : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBearing:(double )bearing - target:(FGMPlatformLatLng *)target - tilt:(double )tilt - zoom:(double )zoom; -@property(nonatomic, assign) double bearing; -@property(nonatomic, strong) FGMPlatformLatLng * target; -@property(nonatomic, assign) double tilt; -@property(nonatomic, assign) double zoom; -@end - -/// Pigeon representation of a CameraUpdate. -@interface FGMPlatformCameraUpdate : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithCameraUpdate:(id )cameraUpdate; -/// This Object must be one of the classes below prefixed with -/// PlatformCameraUpdate. Each such class represents a different type of -/// camera update, and each holds a different set of data, preventing the -/// use of a single unified class. -@property(nonatomic, strong) id cameraUpdate; -@end - -/// Pigeon equivalent of NewCameraPosition -@interface FGMPlatformCameraUpdateNewCameraPosition : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition; -@property(nonatomic, strong) FGMPlatformCameraPosition * cameraPosition; -@end - -/// Pigeon equivalent of NewLatLng -@interface FGMPlatformCameraUpdateNewLatLng : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng; -@property(nonatomic, strong) FGMPlatformLatLng * latLng; -@end - -/// Pigeon equivalent of NewLatLngBounds -@interface FGMPlatformCameraUpdateNewLatLngBounds : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds - padding:(double )padding; -@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; -@property(nonatomic, assign) double padding; -@end - -/// Pigeon equivalent of NewLatLngZoom -@interface FGMPlatformCameraUpdateNewLatLngZoom : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng - zoom:(double )zoom; -@property(nonatomic, strong) FGMPlatformLatLng * latLng; -@property(nonatomic, assign) double zoom; -@end - -/// Pigeon equivalent of ScrollBy -@interface FGMPlatformCameraUpdateScrollBy : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithDx:(double )dx - dy:(double )dy; -@property(nonatomic, assign) double dx; -@property(nonatomic, assign) double dy; -@end - -/// Pigeon equivalent of ZoomBy -@interface FGMPlatformCameraUpdateZoomBy : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAmount:(double )amount - focus:(nullable FGMPlatformPoint *)focus; -@property(nonatomic, assign) double amount; -@property(nonatomic, strong, nullable) FGMPlatformPoint * focus; -@end - -/// Pigeon equivalent of ZoomIn/ZoomOut -@interface FGMPlatformCameraUpdateZoom : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithOut:(BOOL )out; -@property(nonatomic, assign) BOOL out; -@end - -/// Pigeon equivalent of ZoomTo -@interface FGMPlatformCameraUpdateZoomTo : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithZoom:(double )zoom; -@property(nonatomic, assign) double zoom; -@end - -/// Pigeon equivalent of the Circle class. -@interface FGMPlatformCircle : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithConsumeTapEvents:(BOOL )consumeTapEvents - fillColor:(FGMPlatformColor *)fillColor - strokeColor:(FGMPlatformColor *)strokeColor - visible:(BOOL )visible - strokeWidth:(NSInteger )strokeWidth - zIndex:(double )zIndex - center:(FGMPlatformLatLng *)center - radius:(double )radius - circleId:(NSString *)circleId; -@property(nonatomic, assign) BOOL consumeTapEvents; -@property(nonatomic, strong) FGMPlatformColor * fillColor; -@property(nonatomic, strong) FGMPlatformColor * strokeColor; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger strokeWidth; -@property(nonatomic, assign) double zIndex; -@property(nonatomic, strong) FGMPlatformLatLng * center; -@property(nonatomic, assign) double radius; -@property(nonatomic, copy) NSString * circleId; -@end - -/// Pigeon equivalent of the Heatmap class. -@interface FGMPlatformHeatmap : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithHeatmapId:(NSString *)heatmapId - data:(NSArray *)data - gradient:(nullable FGMPlatformHeatmapGradient *)gradient - opacity:(double )opacity - radius:(NSInteger )radius - minimumZoomIntensity:(NSInteger )minimumZoomIntensity - maximumZoomIntensity:(NSInteger )maximumZoomIntensity; -@property(nonatomic, copy) NSString * heatmapId; -@property(nonatomic, copy) NSArray * data; -@property(nonatomic, strong, nullable) FGMPlatformHeatmapGradient * gradient; -@property(nonatomic, assign) double opacity; -@property(nonatomic, assign) NSInteger radius; -@property(nonatomic, assign) NSInteger minimumZoomIntensity; -@property(nonatomic, assign) NSInteger maximumZoomIntensity; -@end - -/// Pigeon equivalent of the HeatmapGradient class. -/// -/// The GMUGradient structure is slightly different from HeatmapGradient, so -/// this matches the iOS API so that conversion can be done on the Dart side -/// where the structures are easier to work with. -@interface FGMPlatformHeatmapGradient : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithColors:(NSArray *)colors - startPoints:(NSArray *)startPoints - colorMapSize:(NSInteger )colorMapSize; -@property(nonatomic, copy) NSArray * colors; -@property(nonatomic, copy) NSArray * startPoints; -@property(nonatomic, assign) NSInteger colorMapSize; -@end - -/// Pigeon equivalent of the WeightedLatLng class. -@interface FGMPlatformWeightedLatLng : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point - weight:(double )weight; -@property(nonatomic, strong) FGMPlatformLatLng * point; -@property(nonatomic, assign) double weight; -@end - -/// Pigeon equivalent of the InfoWindow class. -@interface FGMPlatformInfoWindow : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithTitle:(nullable NSString *)title - snippet:(nullable NSString *)snippet - anchor:(FGMPlatformPoint *)anchor; -@property(nonatomic, copy, nullable) NSString * title; -@property(nonatomic, copy, nullable) NSString * snippet; -@property(nonatomic, strong) FGMPlatformPoint * anchor; -@end - -/// Pigeon equivalent of Cluster. -@interface FGMPlatformCluster : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId - position:(FGMPlatformLatLng *)position - bounds:(FGMPlatformLatLngBounds *)bounds - markerIds:(NSArray *)markerIds; -@property(nonatomic, copy) NSString * clusterManagerId; -@property(nonatomic, strong) FGMPlatformLatLng * position; -@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; -@property(nonatomic, copy) NSArray * markerIds; -@end - -/// Pigeon equivalent of the ClusterManager class. -@interface FGMPlatformClusterManager : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithIdentifier:(NSString *)identifier; -@property(nonatomic, copy) NSString * identifier; -@end - -/// Pigeon equivalent of the Marker class. -@interface FGMPlatformMarker : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAlpha:(double )alpha - anchor:(FGMPlatformPoint *)anchor - consumeTapEvents:(BOOL )consumeTapEvents - draggable:(BOOL )draggable - flat:(BOOL )flat - icon:(FGMPlatformBitmap *)icon - infoWindow:(FGMPlatformInfoWindow *)infoWindow - position:(FGMPlatformLatLng *)position - rotation:(double )rotation - visible:(BOOL )visible - zIndex:(NSInteger )zIndex - markerId:(NSString *)markerId - clusterManagerId:(nullable NSString *)clusterManagerId; -@property(nonatomic, assign) double alpha; -@property(nonatomic, strong) FGMPlatformPoint * anchor; -@property(nonatomic, assign) BOOL consumeTapEvents; -@property(nonatomic, assign) BOOL draggable; -@property(nonatomic, assign) BOOL flat; -@property(nonatomic, strong) FGMPlatformBitmap * icon; -@property(nonatomic, strong) FGMPlatformInfoWindow * infoWindow; -@property(nonatomic, strong) FGMPlatformLatLng * position; -@property(nonatomic, assign) double rotation; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, copy) NSString * markerId; -@property(nonatomic, copy, nullable) NSString * clusterManagerId; -@end - -/// Pigeon equivalent of the Point of Interest class. -@interface FGMPlatformPointOfInterest : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithPosition:(FGMPlatformLatLng *)position - name:(NSString *)name - placeId:(NSString *)placeId; -@property(nonatomic, strong) FGMPlatformLatLng * position; -@property(nonatomic, copy) NSString * name; -@property(nonatomic, copy) NSString * placeId; -@end - -/// Pigeon equivalent of the Polygon class. -@interface FGMPlatformPolygon : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithPolygonId:(NSString *)polygonId - consumesTapEvents:(BOOL )consumesTapEvents - fillColor:(FGMPlatformColor *)fillColor - geodesic:(BOOL )geodesic - points:(NSArray *)points - holes:(NSArray *> *)holes - visible:(BOOL )visible - strokeColor:(FGMPlatformColor *)strokeColor - strokeWidth:(NSInteger )strokeWidth - zIndex:(NSInteger )zIndex; -@property(nonatomic, copy) NSString * polygonId; -@property(nonatomic, assign) BOOL consumesTapEvents; -@property(nonatomic, strong) FGMPlatformColor * fillColor; -@property(nonatomic, assign) BOOL geodesic; -@property(nonatomic, copy) NSArray * points; -@property(nonatomic, copy) NSArray *> * holes; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, strong) FGMPlatformColor * strokeColor; -@property(nonatomic, assign) NSInteger strokeWidth; -@property(nonatomic, assign) NSInteger zIndex; -@end - -/// Pigeon equivalent of the Polyline class. -@interface FGMPlatformPolyline : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithPolylineId:(NSString *)polylineId - consumesTapEvents:(BOOL )consumesTapEvents - color:(FGMPlatformColor *)color - geodesic:(BOOL )geodesic - jointType:(FGMPlatformJointType)jointType - patterns:(NSArray *)patterns - points:(NSArray *)points - visible:(BOOL )visible - width:(NSInteger )width - zIndex:(NSInteger )zIndex; -@property(nonatomic, copy) NSString * polylineId; -@property(nonatomic, assign) BOOL consumesTapEvents; -@property(nonatomic, strong) FGMPlatformColor * color; -@property(nonatomic, assign) BOOL geodesic; -/// The joint type. -@property(nonatomic, assign) FGMPlatformJointType jointType; -/// The pattern data, as a list of pattern items. -@property(nonatomic, copy) NSArray * patterns; -@property(nonatomic, copy) NSArray * points; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger width; -@property(nonatomic, assign) NSInteger zIndex; -@end - -/// Pigeon equivalent of the PatternItem class. -@interface FGMPlatformPatternItem : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type - length:(nullable NSNumber *)length; -@property(nonatomic, assign) FGMPlatformPatternItemType type; -@property(nonatomic, strong, nullable) NSNumber * length; -@end - -/// Pigeon equivalent of the Tile class. -@interface FGMPlatformTile : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithWidth:(NSInteger )width - height:(NSInteger )height - data:(nullable FlutterStandardTypedData *)data; -@property(nonatomic, assign) NSInteger width; -@property(nonatomic, assign) NSInteger height; -@property(nonatomic, strong, nullable) FlutterStandardTypedData * data; -@end - -/// Pigeon equivalent of the TileOverlay class. -@interface FGMPlatformTileOverlay : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId - fadeIn:(BOOL )fadeIn - transparency:(double )transparency - zIndex:(NSInteger )zIndex - visible:(BOOL )visible - tileSize:(NSInteger )tileSize; -@property(nonatomic, copy) NSString * tileOverlayId; -@property(nonatomic, assign) BOOL fadeIn; -@property(nonatomic, assign) double transparency; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger tileSize; -@end - -/// Pigeon equivalent of Flutter's EdgeInsets. -@interface FGMPlatformEdgeInsets : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithTop:(double )top - bottom:(double )bottom - left:(double )left - right:(double )right; -@property(nonatomic, assign) double top; -@property(nonatomic, assign) double bottom; -@property(nonatomic, assign) double left; -@property(nonatomic, assign) double right; -@end - -/// Pigeon equivalent of LatLng. -@interface FGMPlatformLatLng : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithLatitude:(double )latitude - longitude:(double )longitude; -@property(nonatomic, assign) double latitude; -@property(nonatomic, assign) double longitude; -@end - -/// Pigeon equivalent of LatLngBounds. -@interface FGMPlatformLatLngBounds : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast - southwest:(FGMPlatformLatLng *)southwest; -@property(nonatomic, strong) FGMPlatformLatLng * northeast; -@property(nonatomic, strong) FGMPlatformLatLng * southwest; -@end - -/// 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]). -@interface FGMPlatformCameraTargetBounds : NSObject -+ (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds; -@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; -@end - -/// Pigeon equivalent of the GroundOverlay class. -@interface FGMPlatformGroundOverlay : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId - image:(FGMPlatformBitmap *)image - position:(nullable FGMPlatformLatLng *)position - bounds:(nullable FGMPlatformLatLngBounds *)bounds - anchor:(nullable FGMPlatformPoint *)anchor - transparency:(double )transparency - bearing:(double )bearing - zIndex:(NSInteger )zIndex - visible:(BOOL )visible - clickable:(BOOL )clickable - zoomLevel:(nullable NSNumber *)zoomLevel; -@property(nonatomic, copy) NSString * groundOverlayId; -@property(nonatomic, strong) FGMPlatformBitmap * image; -@property(nonatomic, strong, nullable) FGMPlatformLatLng * position; -@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; -@property(nonatomic, strong, nullable) FGMPlatformPoint * anchor; -@property(nonatomic, assign) double transparency; -@property(nonatomic, assign) double bearing; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) BOOL clickable; -@property(nonatomic, strong, nullable) NSNumber * zoomLevel; -@end - -/// Information passed to the platform view creation. -@interface FGMPlatformMapViewCreationParams : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition - mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration - initialCircles:(NSArray *)initialCircles - initialMarkers:(NSArray *)initialMarkers - initialPolygons:(NSArray *)initialPolygons - initialPolylines:(NSArray *)initialPolylines - initialHeatmaps:(NSArray *)initialHeatmaps - initialTileOverlays:(NSArray *)initialTileOverlays - initialClusterManagers:(NSArray *)initialClusterManagers - initialGroundOverlays:(NSArray *)initialGroundOverlays; -@property(nonatomic, strong) FGMPlatformCameraPosition * initialCameraPosition; -@property(nonatomic, strong) FGMPlatformMapConfiguration * mapConfiguration; -@property(nonatomic, copy) NSArray * initialCircles; -@property(nonatomic, copy) NSArray * initialMarkers; -@property(nonatomic, copy) NSArray * initialPolygons; -@property(nonatomic, copy) NSArray * initialPolylines; -@property(nonatomic, copy) NSArray * initialHeatmaps; -@property(nonatomic, copy) NSArray * initialTileOverlays; -@property(nonatomic, copy) NSArray * initialClusterManagers; -@property(nonatomic, copy) NSArray * initialGroundOverlays; -@end - -/// Pigeon equivalent of MapConfiguration. -@interface FGMPlatformMapConfiguration : NSObject -+ (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style; -@property(nonatomic, strong, nullable) NSNumber * compassEnabled; -@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds * cameraTargetBounds; -@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox * mapType; -@property(nonatomic, strong, nullable) FGMPlatformZoomRange * minMaxZoomPreference; -@property(nonatomic, strong, nullable) NSNumber * rotateGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber * scrollGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber * tiltGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber * trackCameraPosition; -@property(nonatomic, strong, nullable) NSNumber * zoomGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber * myLocationEnabled; -@property(nonatomic, strong, nullable) NSNumber * myLocationButtonEnabled; -@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets * padding; -@property(nonatomic, strong, nullable) NSNumber * indoorViewEnabled; -@property(nonatomic, strong, nullable) NSNumber * trafficEnabled; -@property(nonatomic, strong, nullable) NSNumber * buildingsEnabled; -@property(nonatomic, copy, nullable) NSString * mapId; -@property(nonatomic, copy, nullable) NSString * style; -@end - -/// Pigeon representation of an x,y coordinate. -@interface FGMPlatformPoint : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithX:(double )x - y:(double )y; -@property(nonatomic, assign) double x; -@property(nonatomic, assign) double y; -@end - -/// Pigeon representation of a size. -@interface FGMPlatformSize : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithWidth:(double )width - height:(double )height; -@property(nonatomic, assign) double width; -@property(nonatomic, assign) double height; -@end - -/// Pigeon representation of a color. -@interface FGMPlatformColor : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithRed:(double )red - green:(double )green - blue:(double )blue - alpha:(double )alpha; -@property(nonatomic, assign) double red; -@property(nonatomic, assign) double green; -@property(nonatomic, assign) double blue; -@property(nonatomic, assign) double alpha; -@end - -/// Pigeon equivalent of GMSTileLayer properties. -@interface FGMPlatformTileLayer : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithVisible:(BOOL )visible - fadeIn:(BOOL )fadeIn - opacity:(double )opacity - zIndex:(NSInteger )zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) BOOL fadeIn; -@property(nonatomic, assign) double opacity; -@property(nonatomic, assign) NSInteger zIndex; -@end - -/// Pigeon equivalent of MinMaxZoomPreference. -@interface FGMPlatformZoomRange : NSObject -+ (instancetype)makeWithMin:(nullable NSNumber *)min - max:(nullable NSNumber *)max; -@property(nonatomic, strong, nullable) NSNumber * min; -@property(nonatomic, strong, nullable) NSNumber * max; -@end - -/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint -/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which -/// may hold the pigeon equivalent type of any of them. -@interface FGMPlatformBitmap : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBitmap:(id )bitmap; -/// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], -/// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], -/// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. -/// As Pigeon does not currently support data class inheritance, this -/// approach allows for the different bitmap implementations to be valid -/// argument and return types of the API methods. See -/// https://github.com/flutter/flutter/issues/117819. -@property(nonatomic, strong) id bitmap; -@end - -/// Pigeon equivalent of [DefaultMarker]. -@interface FGMPlatformBitmapDefaultMarker : NSObject -+ (instancetype)makeWithHue:(nullable NSNumber *)hue; -@property(nonatomic, strong, nullable) NSNumber * hue; -@end - -/// Pigeon equivalent of [BytesBitmap]. -@interface FGMPlatformBitmapBytes : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - size:(nullable FGMPlatformSize *)size; -@property(nonatomic, strong) FlutterStandardTypedData * byteData; -@property(nonatomic, strong, nullable) FGMPlatformSize * size; -@end - -/// Pigeon equivalent of [AssetBitmap]. -@interface FGMPlatformBitmapAsset : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithName:(NSString *)name - pkg:(nullable NSString *)pkg; -@property(nonatomic, copy) NSString * name; -@property(nonatomic, copy, nullable) NSString * pkg; -@end - -/// Pigeon equivalent of [AssetImageBitmap]. -@interface FGMPlatformBitmapAssetImage : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithName:(NSString *)name - scale:(double )scale - size:(nullable FGMPlatformSize *)size; -@property(nonatomic, copy) NSString * name; -@property(nonatomic, assign) double scale; -@property(nonatomic, strong, nullable) FGMPlatformSize * size; -@end - -/// Pigeon equivalent of [AssetMapBitmap]. -@interface FGMPlatformBitmapAssetMap : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAssetName:(NSString *)assetName - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double )imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height; -@property(nonatomic, copy) NSString * assetName; -@property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; -@property(nonatomic, assign) double imagePixelRatio; -@property(nonatomic, strong, nullable) NSNumber * width; -@property(nonatomic, strong, nullable) NSNumber * height; -@end - -/// Pigeon equivalent of [BytesMapBitmap]. -@interface FGMPlatformBitmapBytesMap : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double )imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height; -@property(nonatomic, strong) FlutterStandardTypedData * byteData; -@property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; -@property(nonatomic, assign) double imagePixelRatio; -@property(nonatomic, strong, nullable) NSNumber * width; -@property(nonatomic, strong, nullable) NSNumber * height; -@end - -/// The codec used by all APIs. -NSObject *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void); - -/// Interface for non-test interactions with the native SDK. -/// -/// For test-only state queries, see [MapsInspectorApi]. -@protocol FGMMapsApi -/// Returns once the map instance is available. -- (void)waitForMapWithError:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the map's configuration options. -/// -/// Only non-null configuration values will result in updates; options with -/// null values will remain unchanged. -- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration error:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the set of circles on the map. -- (void)updateCirclesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the set of heatmaps on the map. -- (void)updateHeatmapsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the set of custer managers for clusters on the map. -- (void)updateClusterManagersByAdding:(NSArray *)toAdd removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the set of markers on the map. -- (void)updateMarkersByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the set of polygonss on the map. -- (void)updatePolygonsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the set of polylines on the map. -- (void)updatePolylinesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the set of tile overlays on the map. -- (void)updateTileOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the set of ground overlays on the map. -- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -/// Gets the screen coordinate for the given map location. -/// -/// @return `nil` only when `error != nil`. -- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng error:(FlutterError *_Nullable *_Nonnull)error; -/// Gets the map location for the given screen coordinate. -/// -/// @return `nil` only when `error != nil`. -- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate error:(FlutterError *_Nullable *_Nonnull)error; -/// Gets the map region currently displayed on the map. -/// -/// @return `nil` only when `error != nil`. -- (nullable FGMPlatformLatLngBounds *)visibleMapRegion:(FlutterError *_Nullable *_Nonnull)error; -/// Moves the camera according to [cameraUpdate] immediately, with no -/// animation. -- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate error:(FlutterError *_Nullable *_Nonnull)error; -/// Moves the camera according to [cameraUpdate], animating the update using a -/// duration in milliseconds if provided. -- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate duration:(nullable NSNumber *)durationMilliseconds error:(FlutterError *_Nullable *_Nonnull)error; -/// Gets the current map zoom level. -/// -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)currentZoomLevel:(FlutterError *_Nullable *_Nonnull)error; -/// Show the info window for the marker with the given ID. -- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; -/// Hide the info window for the marker with the given ID. -- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; -/// Returns true if the marker with the given ID is currently displaying its -/// info window. -/// -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; -/// Sets the style to the given map style string, where an empty string -/// indicates that the style should be cleared. -/// -/// If there was an error setting the style, such as an invalid style string, -/// returns the error message. -- (nullable NSString *)setStyle:(NSString *)style error:(FlutterError *_Nullable *_Nonnull)error; -/// Returns the error string from the last attempt to set the map style, if -/// any. -/// -/// This allows checking asynchronously for initial style failures, as there -/// is no way to return failures from map initialization. -- (nullable NSString *)lastStyleError:(FlutterError *_Nullable *_Nonnull)error; -/// Clears the cache of tiles previously requseted from the tile provider. -- (void)clearTileCacheForOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; -/// Takes a snapshot of the map and returns its image data. -- (nullable FlutterStandardTypedData *)takeSnapshotWithError:(FlutterError *_Nullable *_Nonnull)error; -@end - -extern void SetUpFGMMapsApi(id binaryMessenger, NSObject *_Nullable api); - -extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); - - -/// Interface for calls from the native SDK to Dart. -@interface FGMMapsCallbackApi : NSObject -- (instancetype)initWithBinaryMessenger:(id)binaryMessenger; -- (instancetype)initWithBinaryMessenger:(id)binaryMessenger messageChannelSuffix:(nullable NSString *)messageChannelSuffix; -/// Called when the map camera starts moving. -- (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion; -/// Called when the map camera moves. -- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when the map camera stops moving. -- (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion; -/// Called when the map, not a specifc map object, is tapped. -- (void)didTapAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when the map, not a specifc map object, is long pressed. -- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a marker is tapped. -- (void)didTapMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a marker drag starts. -- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a marker drag updates. -- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a marker drag ends. -- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a marker's info window is tapped. -- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a circle is tapped. -- (void)didTapCircleWithIdentifier:(NSString *)circleId completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a marker cluster is tapped. -- (void)didTapCluster:(FGMPlatformCluster *)cluster completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a polygon is tapped. -- (void)didTapPolygonWithIdentifier:(NSString *)polygonId completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a polyline is tapped. -- (void)didTapPolylineWithIdentifier:(NSString *)polylineId completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a ground overlay is tapped. -- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a point of interest is tapped. -- (void)didTapPointOfInterest:(FGMPlatformPointOfInterest *)poi completion:(void (^)(FlutterError *_Nullable))completion; -/// Called to get data for a map tile. -- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId location:(FGMPlatformPoint *)location zoom:(NSInteger)zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion; -@end - - -/// Dummy interface to force generation of the platform view creation params, -/// which are not used in any Pigeon calls, only the platform view creation -/// call made internally by Flutter. -@protocol FGMMapsPlatformViewApi -- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type error:(FlutterError *_Nullable *_Nonnull)error; -@end - -extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, NSObject *_Nullable api); - -extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); - - -/// Inspector API only intended for use in integration tests. -@protocol FGMMapsInspectorApi -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)areBuildingsEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)areRotateGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)areScrollGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)areTiltGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)areZoomGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)isCompassEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)isMyLocationButtonEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)isTrafficEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformGroundOverlay *)groundOverlayWithIdentifier:(NSString *)groundOverlayId error:(FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId error:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable FGMPlatformZoomRange *)zoomRange:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable NSArray *)clustersWithIdentifier:(NSString *)clusterManagerId error:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable FGMPlatformCameraPosition *)cameraPosition:(FlutterError *_Nullable *_Nonnull)error; -@end - -extern void SetUpFGMMapsInspectorApi(id binaryMessenger, NSObject *_Nullable api); - -extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); - -NS_ASSUME_NONNULL_END diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.rej b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.rej deleted file mode 100644 index 2abdb3ac441a..000000000000 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.rej +++ /dev/null @@ -1,807 +0,0 @@ ---- packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h -+++ packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h -@@ -114,26 +114,26 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - @interface FGMPlatformCameraPosition : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithBearing:(double )bearing -- target:(FGMPlatformLatLng *)target -- tilt:(double )tilt -- zoom:(double )zoom; --@property(nonatomic, assign) double bearing; --@property(nonatomic, strong) FGMPlatformLatLng * target; --@property(nonatomic, assign) double tilt; --@property(nonatomic, assign) double zoom; -++ (instancetype)makeWithBearing:(double)bearing -+ target:(FGMPlatformLatLng *)target -+ tilt:(double)tilt -+ zoom:(double)zoom; -+@property(nonatomic, assign) double bearing; -+@property(nonatomic, strong) FGMPlatformLatLng *target; -+@property(nonatomic, assign) double tilt; -+@property(nonatomic, assign) double zoom; - @end - - /// Pigeon representation of a CameraUpdate. - @interface FGMPlatformCameraUpdate : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithCameraUpdate:(id )cameraUpdate; -++ (instancetype)makeWithCameraUpdate:(id)cameraUpdate; - /// This Object must be one of the classes below prefixed with - /// PlatformCameraUpdate. Each such class represents a different type of - /// camera update, and each holds a different set of data, preventing the - /// use of a single unified class. --@property(nonatomic, strong) id cameraUpdate; -+@property(nonatomic, strong) id cameraUpdate; - @end - - /// Pigeon equivalent of NewCameraPosition -@@ -149,87 +149,83 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; - + (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng; --@property(nonatomic, strong) FGMPlatformLatLng * latLng; -+@property(nonatomic, strong) FGMPlatformLatLng *latLng; - @end - - /// Pigeon equivalent of NewLatLngBounds - @interface FGMPlatformCameraUpdateNewLatLngBounds : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds -- padding:(double )padding; --@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; --@property(nonatomic, assign) double padding; -++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding; -+@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds; -+@property(nonatomic, assign) double padding; - @end - - /// Pigeon equivalent of NewLatLngZoom - @interface FGMPlatformCameraUpdateNewLatLngZoom : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng -- zoom:(double )zoom; --@property(nonatomic, strong) FGMPlatformLatLng * latLng; --@property(nonatomic, assign) double zoom; -++ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom; -+@property(nonatomic, strong) FGMPlatformLatLng *latLng; -+@property(nonatomic, assign) double zoom; - @end - - /// Pigeon equivalent of ScrollBy - @interface FGMPlatformCameraUpdateScrollBy : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithDx:(double )dx -- dy:(double )dy; --@property(nonatomic, assign) double dx; --@property(nonatomic, assign) double dy; -++ (instancetype)makeWithDx:(double)dx dy:(double)dy; -+@property(nonatomic, assign) double dx; -+@property(nonatomic, assign) double dy; - @end - - /// Pigeon equivalent of ZoomBy - @interface FGMPlatformCameraUpdateZoomBy : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithAmount:(double )amount -- focus:(nullable FGMPlatformPoint *)focus; --@property(nonatomic, assign) double amount; --@property(nonatomic, strong, nullable) FGMPlatformPoint * focus; -++ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus; -+@property(nonatomic, assign) double amount; -+@property(nonatomic, strong, nullable) FGMPlatformPoint *focus; - @end - - /// Pigeon equivalent of ZoomIn/ZoomOut - @interface FGMPlatformCameraUpdateZoom : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithOut:(BOOL )out; --@property(nonatomic, assign) BOOL out; -++ (instancetype)makeWithOut:(BOOL)out; -+@property(nonatomic, assign) BOOL out; - @end - - /// Pigeon equivalent of ZoomTo - @interface FGMPlatformCameraUpdateZoomTo : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithZoom:(double )zoom; --@property(nonatomic, assign) double zoom; -++ (instancetype)makeWithZoom:(double)zoom; -+@property(nonatomic, assign) double zoom; - @end - - /// Pigeon equivalent of the Circle class. - @interface FGMPlatformCircle : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithConsumeTapEvents:(BOOL )consumeTapEvents -- fillColor:(FGMPlatformColor *)fillColor -- strokeColor:(FGMPlatformColor *)strokeColor -- visible:(BOOL )visible -- strokeWidth:(NSInteger )strokeWidth -- zIndex:(double )zIndex -- center:(FGMPlatformLatLng *)center -- radius:(double )radius -- circleId:(NSString *)circleId; --@property(nonatomic, assign) BOOL consumeTapEvents; --@property(nonatomic, strong) FGMPlatformColor * fillColor; --@property(nonatomic, strong) FGMPlatformColor * strokeColor; --@property(nonatomic, assign) BOOL visible; --@property(nonatomic, assign) NSInteger strokeWidth; --@property(nonatomic, assign) double zIndex; --@property(nonatomic, strong) FGMPlatformLatLng * center; --@property(nonatomic, assign) double radius; --@property(nonatomic, copy) NSString * circleId; -++ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents -+ fillColor:(FGMPlatformColor *)fillColor -+ strokeColor:(FGMPlatformColor *)strokeColor -+ visible:(BOOL)visible -+ strokeWidth:(NSInteger)strokeWidth -+ zIndex:(double)zIndex -+ center:(FGMPlatformLatLng *)center -+ radius:(double)radius -+ circleId:(NSString *)circleId; -+@property(nonatomic, assign) BOOL consumeTapEvents; -+@property(nonatomic, strong) FGMPlatformColor *fillColor; -+@property(nonatomic, strong) FGMPlatformColor *strokeColor; -+@property(nonatomic, assign) BOOL visible; -+@property(nonatomic, assign) NSInteger strokeWidth; -+@property(nonatomic, assign) double zIndex; -+@property(nonatomic, strong) FGMPlatformLatLng *center; -+@property(nonatomic, assign) double radius; -+@property(nonatomic, copy) NSString *circleId; - @end - - /// Pigeon equivalent of the Heatmap class. -@@ -261,21 +257,20 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; - + (instancetype)makeWithColors:(NSArray *)colors -- startPoints:(NSArray *)startPoints -- colorMapSize:(NSInteger )colorMapSize; --@property(nonatomic, copy) NSArray * colors; --@property(nonatomic, copy) NSArray * startPoints; --@property(nonatomic, assign) NSInteger colorMapSize; -+ startPoints:(NSArray *)startPoints -+ colorMapSize:(NSInteger)colorMapSize; -+@property(nonatomic, copy) NSArray *colors; -+@property(nonatomic, copy) NSArray *startPoints; -+@property(nonatomic, assign) NSInteger colorMapSize; - @end - - /// Pigeon equivalent of the WeightedLatLng class. - @interface FGMPlatformWeightedLatLng : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point -- weight:(double )weight; --@property(nonatomic, strong) FGMPlatformLatLng * point; --@property(nonatomic, assign) double weight; -++ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point weight:(double)weight; -+@property(nonatomic, strong) FGMPlatformLatLng *point; -+@property(nonatomic, assign) double weight; - @end - - /// Pigeon equivalent of the InfoWindow class. -@@ -309,39 +304,39 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; - + (instancetype)makeWithIdentifier:(NSString *)identifier; --@property(nonatomic, copy) NSString * identifier; -+@property(nonatomic, copy) NSString *identifier; - @end - - /// Pigeon equivalent of the Marker class. - @interface FGMPlatformMarker : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithAlpha:(double )alpha -- anchor:(FGMPlatformPoint *)anchor -- consumeTapEvents:(BOOL )consumeTapEvents -- draggable:(BOOL )draggable -- flat:(BOOL )flat -- icon:(FGMPlatformBitmap *)icon -- infoWindow:(FGMPlatformInfoWindow *)infoWindow -- position:(FGMPlatformLatLng *)position -- rotation:(double )rotation -- visible:(BOOL )visible -- zIndex:(NSInteger )zIndex -- markerId:(NSString *)markerId -- clusterManagerId:(nullable NSString *)clusterManagerId; --@property(nonatomic, assign) double alpha; --@property(nonatomic, strong) FGMPlatformPoint * anchor; --@property(nonatomic, assign) BOOL consumeTapEvents; --@property(nonatomic, assign) BOOL draggable; --@property(nonatomic, assign) BOOL flat; --@property(nonatomic, strong) FGMPlatformBitmap * icon; --@property(nonatomic, strong) FGMPlatformInfoWindow * infoWindow; --@property(nonatomic, strong) FGMPlatformLatLng * position; --@property(nonatomic, assign) double rotation; --@property(nonatomic, assign) BOOL visible; --@property(nonatomic, assign) NSInteger zIndex; --@property(nonatomic, copy) NSString * markerId; --@property(nonatomic, copy, nullable) NSString * clusterManagerId; -++ (instancetype)makeWithAlpha:(double)alpha -+ anchor:(FGMPlatformPoint *)anchor -+ consumeTapEvents:(BOOL)consumeTapEvents -+ draggable:(BOOL)draggable -+ flat:(BOOL)flat -+ icon:(FGMPlatformBitmap *)icon -+ infoWindow:(FGMPlatformInfoWindow *)infoWindow -+ position:(FGMPlatformLatLng *)position -+ rotation:(double)rotation -+ visible:(BOOL)visible -+ zIndex:(NSInteger)zIndex -+ markerId:(NSString *)markerId -+ clusterManagerId:(nullable NSString *)clusterManagerId; -+@property(nonatomic, assign) double alpha; -+@property(nonatomic, strong) FGMPlatformPoint *anchor; -+@property(nonatomic, assign) BOOL consumeTapEvents; -+@property(nonatomic, assign) BOOL draggable; -+@property(nonatomic, assign) BOOL flat; -+@property(nonatomic, strong) FGMPlatformBitmap *icon; -+@property(nonatomic, strong) FGMPlatformInfoWindow *infoWindow; -+@property(nonatomic, strong) FGMPlatformLatLng *position; -+@property(nonatomic, assign) double rotation; -+@property(nonatomic, assign) BOOL visible; -+@property(nonatomic, assign) NSInteger zIndex; -+@property(nonatomic, copy) NSString *markerId; -+@property(nonatomic, copy, nullable) NSString *clusterManagerId; - @end - - /// Pigeon equivalent of the Point of Interest class. -@@ -387,49 +382,48 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; - + (instancetype)makeWithPolylineId:(NSString *)polylineId -- consumesTapEvents:(BOOL )consumesTapEvents -- color:(FGMPlatformColor *)color -- geodesic:(BOOL )geodesic -- jointType:(FGMPlatformJointType)jointType -- patterns:(NSArray *)patterns -- points:(NSArray *)points -- visible:(BOOL )visible -- width:(NSInteger )width -- zIndex:(NSInteger )zIndex; --@property(nonatomic, copy) NSString * polylineId; --@property(nonatomic, assign) BOOL consumesTapEvents; --@property(nonatomic, strong) FGMPlatformColor * color; --@property(nonatomic, assign) BOOL geodesic; -+ consumesTapEvents:(BOOL)consumesTapEvents -+ color:(FGMPlatformColor *)color -+ geodesic:(BOOL)geodesic -+ jointType:(FGMPlatformJointType)jointType -+ patterns:(NSArray *)patterns -+ points:(NSArray *)points -+ visible:(BOOL)visible -+ width:(NSInteger)width -+ zIndex:(NSInteger)zIndex; -+@property(nonatomic, copy) NSString *polylineId; -+@property(nonatomic, assign) BOOL consumesTapEvents; -+@property(nonatomic, strong) FGMPlatformColor *color; -+@property(nonatomic, assign) BOOL geodesic; - /// The joint type. - @property(nonatomic, assign) FGMPlatformJointType jointType; - /// The pattern data, as a list of pattern items. --@property(nonatomic, copy) NSArray * patterns; --@property(nonatomic, copy) NSArray * points; --@property(nonatomic, assign) BOOL visible; --@property(nonatomic, assign) NSInteger width; --@property(nonatomic, assign) NSInteger zIndex; -+@property(nonatomic, copy) NSArray *patterns; -+@property(nonatomic, copy) NSArray *points; -+@property(nonatomic, assign) BOOL visible; -+@property(nonatomic, assign) NSInteger width; -+@property(nonatomic, assign) NSInteger zIndex; - @end - - /// Pigeon equivalent of the PatternItem class. - @interface FGMPlatformPatternItem : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type -- length:(nullable NSNumber *)length; -++ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length; - @property(nonatomic, assign) FGMPlatformPatternItemType type; --@property(nonatomic, strong, nullable) NSNumber * length; -+@property(nonatomic, strong, nullable) NSNumber *length; - @end - - /// Pigeon equivalent of the Tile class. - @interface FGMPlatformTile : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithWidth:(NSInteger )width -- height:(NSInteger )height -- data:(nullable FlutterStandardTypedData *)data; --@property(nonatomic, assign) NSInteger width; --@property(nonatomic, assign) NSInteger height; --@property(nonatomic, strong, nullable) FlutterStandardTypedData * data; -++ (instancetype)makeWithWidth:(NSInteger)width -+ height:(NSInteger)height -+ data:(nullable FlutterStandardTypedData *)data; -+@property(nonatomic, assign) NSInteger width; -+@property(nonatomic, assign) NSInteger height; -+@property(nonatomic, strong, nullable) FlutterStandardTypedData *data; - @end - - /// Pigeon equivalent of the TileOverlay class. -@@ -437,41 +431,37 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; - + (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId -- fadeIn:(BOOL )fadeIn -- transparency:(double )transparency -- zIndex:(NSInteger )zIndex -- visible:(BOOL )visible -- tileSize:(NSInteger )tileSize; --@property(nonatomic, copy) NSString * tileOverlayId; --@property(nonatomic, assign) BOOL fadeIn; --@property(nonatomic, assign) double transparency; --@property(nonatomic, assign) NSInteger zIndex; --@property(nonatomic, assign) BOOL visible; --@property(nonatomic, assign) NSInteger tileSize; -+ fadeIn:(BOOL)fadeIn -+ transparency:(double)transparency -+ zIndex:(NSInteger)zIndex -+ visible:(BOOL)visible -+ tileSize:(NSInteger)tileSize; -+@property(nonatomic, copy) NSString *tileOverlayId; -+@property(nonatomic, assign) BOOL fadeIn; -+@property(nonatomic, assign) double transparency; -+@property(nonatomic, assign) NSInteger zIndex; -+@property(nonatomic, assign) BOOL visible; -+@property(nonatomic, assign) NSInteger tileSize; - @end - - /// Pigeon equivalent of Flutter's EdgeInsets. - @interface FGMPlatformEdgeInsets : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithTop:(double )top -- bottom:(double )bottom -- left:(double )left -- right:(double )right; --@property(nonatomic, assign) double top; --@property(nonatomic, assign) double bottom; --@property(nonatomic, assign) double left; --@property(nonatomic, assign) double right; -++ (instancetype)makeWithTop:(double)top bottom:(double)bottom left:(double)left right:(double)right; -+@property(nonatomic, assign) double top; -+@property(nonatomic, assign) double bottom; -+@property(nonatomic, assign) double left; -+@property(nonatomic, assign) double right; - @end - - /// Pigeon equivalent of LatLng. - @interface FGMPlatformLatLng : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithLatitude:(double )latitude -- longitude:(double )longitude; --@property(nonatomic, assign) double latitude; --@property(nonatomic, assign) double longitude; -++ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude; -+@property(nonatomic, assign) double latitude; -+@property(nonatomic, assign) double longitude; - @end - - /// Pigeon equivalent of LatLngBounds. -@@ -498,147 +488,142 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; - + (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId -- image:(FGMPlatformBitmap *)image -- position:(nullable FGMPlatformLatLng *)position -- bounds:(nullable FGMPlatformLatLngBounds *)bounds -- anchor:(nullable FGMPlatformPoint *)anchor -- transparency:(double )transparency -- bearing:(double )bearing -- zIndex:(NSInteger )zIndex -- visible:(BOOL )visible -- clickable:(BOOL )clickable -- zoomLevel:(nullable NSNumber *)zoomLevel; --@property(nonatomic, copy) NSString * groundOverlayId; --@property(nonatomic, strong) FGMPlatformBitmap * image; --@property(nonatomic, strong, nullable) FGMPlatformLatLng * position; --@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; --@property(nonatomic, strong, nullable) FGMPlatformPoint * anchor; --@property(nonatomic, assign) double transparency; --@property(nonatomic, assign) double bearing; --@property(nonatomic, assign) NSInteger zIndex; --@property(nonatomic, assign) BOOL visible; --@property(nonatomic, assign) BOOL clickable; --@property(nonatomic, strong, nullable) NSNumber * zoomLevel; -+ image:(FGMPlatformBitmap *)image -+ position:(nullable FGMPlatformLatLng *)position -+ bounds:(nullable FGMPlatformLatLngBounds *)bounds -+ anchor:(nullable FGMPlatformPoint *)anchor -+ transparency:(double)transparency -+ bearing:(double)bearing -+ zIndex:(NSInteger)zIndex -+ visible:(BOOL)visible -+ clickable:(BOOL)clickable -+ zoomLevel:(nullable NSNumber *)zoomLevel; -+@property(nonatomic, copy) NSString *groundOverlayId; -+@property(nonatomic, strong) FGMPlatformBitmap *image; -+@property(nonatomic, strong, nullable) FGMPlatformLatLng *position; -+@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds; -+@property(nonatomic, strong, nullable) FGMPlatformPoint *anchor; -+@property(nonatomic, assign) double transparency; -+@property(nonatomic, assign) double bearing; -+@property(nonatomic, assign) NSInteger zIndex; -+@property(nonatomic, assign) BOOL visible; -+@property(nonatomic, assign) BOOL clickable; -+@property(nonatomic, strong, nullable) NSNumber *zoomLevel; - @end - - /// Information passed to the platform view creation. - @interface FGMPlatformMapViewCreationParams : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition -- mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration -- initialCircles:(NSArray *)initialCircles -- initialMarkers:(NSArray *)initialMarkers -- initialPolygons:(NSArray *)initialPolygons -- initialPolylines:(NSArray *)initialPolylines -- initialHeatmaps:(NSArray *)initialHeatmaps -- initialTileOverlays:(NSArray *)initialTileOverlays -- initialClusterManagers:(NSArray *)initialClusterManagers -- initialGroundOverlays:(NSArray *)initialGroundOverlays; --@property(nonatomic, strong) FGMPlatformCameraPosition * initialCameraPosition; --@property(nonatomic, strong) FGMPlatformMapConfiguration * mapConfiguration; --@property(nonatomic, copy) NSArray * initialCircles; --@property(nonatomic, copy) NSArray * initialMarkers; --@property(nonatomic, copy) NSArray * initialPolygons; --@property(nonatomic, copy) NSArray * initialPolylines; --@property(nonatomic, copy) NSArray * initialHeatmaps; --@property(nonatomic, copy) NSArray * initialTileOverlays; --@property(nonatomic, copy) NSArray * initialClusterManagers; --@property(nonatomic, copy) NSArray * initialGroundOverlays; -++ (instancetype) -+ makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition -+ mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration -+ initialCircles:(NSArray *)initialCircles -+ initialMarkers:(NSArray *)initialMarkers -+ initialPolygons:(NSArray *)initialPolygons -+ initialPolylines:(NSArray *)initialPolylines -+ initialHeatmaps:(NSArray *)initialHeatmaps -+ initialTileOverlays:(NSArray *)initialTileOverlays -+ initialClusterManagers:(NSArray *)initialClusterManagers -+ initialGroundOverlays:(NSArray *)initialGroundOverlays; -+@property(nonatomic, strong) FGMPlatformCameraPosition *initialCameraPosition; -+@property(nonatomic, strong) FGMPlatformMapConfiguration *mapConfiguration; -+@property(nonatomic, copy) NSArray *initialCircles; -+@property(nonatomic, copy) NSArray *initialMarkers; -+@property(nonatomic, copy) NSArray *initialPolygons; -+@property(nonatomic, copy) NSArray *initialPolylines; -+@property(nonatomic, copy) NSArray *initialHeatmaps; -+@property(nonatomic, copy) NSArray *initialTileOverlays; -+@property(nonatomic, copy) NSArray *initialClusterManagers; -+@property(nonatomic, copy) NSArray *initialGroundOverlays; - @end - - /// Pigeon equivalent of MapConfiguration. - @interface FGMPlatformMapConfiguration : NSObject - + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled -- cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds -- mapType:(nullable FGMPlatformMapTypeBox *)mapType -- minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference -- rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled -- scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled -- tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled -- trackCameraPosition:(nullable NSNumber *)trackCameraPosition -- zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled -- myLocationEnabled:(nullable NSNumber *)myLocationEnabled -- myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled -- padding:(nullable FGMPlatformEdgeInsets *)padding -- indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled -- trafficEnabled:(nullable NSNumber *)trafficEnabled -- buildingsEnabled:(nullable NSNumber *)buildingsEnabled -- mapId:(nullable NSString *)mapId -- style:(nullable NSString *)style; --@property(nonatomic, strong, nullable) NSNumber * compassEnabled; --@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds * cameraTargetBounds; --@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox * mapType; --@property(nonatomic, strong, nullable) FGMPlatformZoomRange * minMaxZoomPreference; --@property(nonatomic, strong, nullable) NSNumber * rotateGesturesEnabled; --@property(nonatomic, strong, nullable) NSNumber * scrollGesturesEnabled; --@property(nonatomic, strong, nullable) NSNumber * tiltGesturesEnabled; --@property(nonatomic, strong, nullable) NSNumber * trackCameraPosition; --@property(nonatomic, strong, nullable) NSNumber * zoomGesturesEnabled; --@property(nonatomic, strong, nullable) NSNumber * myLocationEnabled; --@property(nonatomic, strong, nullable) NSNumber * myLocationButtonEnabled; --@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets * padding; --@property(nonatomic, strong, nullable) NSNumber * indoorViewEnabled; --@property(nonatomic, strong, nullable) NSNumber * trafficEnabled; --@property(nonatomic, strong, nullable) NSNumber * buildingsEnabled; --@property(nonatomic, copy, nullable) NSString * mapId; --@property(nonatomic, copy, nullable) NSString * style; -+ cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds -+ mapType:(nullable FGMPlatformMapTypeBox *)mapType -+ minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference -+ rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled -+ scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled -+ tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled -+ trackCameraPosition:(nullable NSNumber *)trackCameraPosition -+ zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled -+ myLocationEnabled:(nullable NSNumber *)myLocationEnabled -+ myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled -+ padding:(nullable FGMPlatformEdgeInsets *)padding -+ indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled -+ trafficEnabled:(nullable NSNumber *)trafficEnabled -+ buildingsEnabled:(nullable NSNumber *)buildingsEnabled -+ mapId:(nullable NSString *)mapId -+ style:(nullable NSString *)style; -+@property(nonatomic, strong, nullable) NSNumber *compassEnabled; -+@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds *cameraTargetBounds; -+@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox *mapType; -+@property(nonatomic, strong, nullable) FGMPlatformZoomRange *minMaxZoomPreference; -+@property(nonatomic, strong, nullable) NSNumber *rotateGesturesEnabled; -+@property(nonatomic, strong, nullable) NSNumber *scrollGesturesEnabled; -+@property(nonatomic, strong, nullable) NSNumber *tiltGesturesEnabled; -+@property(nonatomic, strong, nullable) NSNumber *trackCameraPosition; -+@property(nonatomic, strong, nullable) NSNumber *zoomGesturesEnabled; -+@property(nonatomic, strong, nullable) NSNumber *myLocationEnabled; -+@property(nonatomic, strong, nullable) NSNumber *myLocationButtonEnabled; -+@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets *padding; -+@property(nonatomic, strong, nullable) NSNumber *indoorViewEnabled; -+@property(nonatomic, strong, nullable) NSNumber *trafficEnabled; -+@property(nonatomic, strong, nullable) NSNumber *buildingsEnabled; -+@property(nonatomic, copy, nullable) NSString *mapId; -+@property(nonatomic, copy, nullable) NSString *style; - @end - - /// Pigeon representation of an x,y coordinate. - @interface FGMPlatformPoint : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithX:(double )x -- y:(double )y; --@property(nonatomic, assign) double x; --@property(nonatomic, assign) double y; -++ (instancetype)makeWithX:(double)x y:(double)y; -+@property(nonatomic, assign) double x; -+@property(nonatomic, assign) double y; - @end - - /// Pigeon representation of a size. - @interface FGMPlatformSize : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithWidth:(double )width -- height:(double )height; --@property(nonatomic, assign) double width; --@property(nonatomic, assign) double height; -++ (instancetype)makeWithWidth:(double)width height:(double)height; -+@property(nonatomic, assign) double width; -+@property(nonatomic, assign) double height; - @end - - /// Pigeon representation of a color. - @interface FGMPlatformColor : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithRed:(double )red -- green:(double )green -- blue:(double )blue -- alpha:(double )alpha; --@property(nonatomic, assign) double red; --@property(nonatomic, assign) double green; --@property(nonatomic, assign) double blue; --@property(nonatomic, assign) double alpha; -++ (instancetype)makeWithRed:(double)red green:(double)green blue:(double)blue alpha:(double)alpha; -+@property(nonatomic, assign) double red; -+@property(nonatomic, assign) double green; -+@property(nonatomic, assign) double blue; -+@property(nonatomic, assign) double alpha; - @end - - /// Pigeon equivalent of GMSTileLayer properties. - @interface FGMPlatformTileLayer : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithVisible:(BOOL )visible -- fadeIn:(BOOL )fadeIn -- opacity:(double )opacity -- zIndex:(NSInteger )zIndex; --@property(nonatomic, assign) BOOL visible; --@property(nonatomic, assign) BOOL fadeIn; --@property(nonatomic, assign) double opacity; --@property(nonatomic, assign) NSInteger zIndex; -++ (instancetype)makeWithVisible:(BOOL)visible -+ fadeIn:(BOOL)fadeIn -+ opacity:(double)opacity -+ zIndex:(NSInteger)zIndex; -+@property(nonatomic, assign) BOOL visible; -+@property(nonatomic, assign) BOOL fadeIn; -+@property(nonatomic, assign) double opacity; -+@property(nonatomic, assign) NSInteger zIndex; - @end - - /// Pigeon equivalent of MinMaxZoomPreference. - @interface FGMPlatformZoomRange : NSObject --+ (instancetype)makeWithMin:(nullable NSNumber *)min -- max:(nullable NSNumber *)max; --@property(nonatomic, strong, nullable) NSNumber * min; --@property(nonatomic, strong, nullable) NSNumber * max; -++ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max; -+@property(nonatomic, strong, nullable) NSNumber *min; -+@property(nonatomic, strong, nullable) NSNumber *max; - @end - - /// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint -@@ -669,19 +654,18 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; - + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData -- size:(nullable FGMPlatformSize *)size; --@property(nonatomic, strong) FlutterStandardTypedData * byteData; --@property(nonatomic, strong, nullable) FGMPlatformSize * size; -+ size:(nullable FGMPlatformSize *)size; -+@property(nonatomic, strong) FlutterStandardTypedData *byteData; -+@property(nonatomic, strong, nullable) FGMPlatformSize *size; - @end - - /// Pigeon equivalent of [AssetBitmap]. - @interface FGMPlatformBitmapAsset : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithName:(NSString *)name -- pkg:(nullable NSString *)pkg; --@property(nonatomic, copy) NSString * name; --@property(nonatomic, copy, nullable) NSString * pkg; -++ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg; -+@property(nonatomic, copy) NSString *name; -+@property(nonatomic, copy, nullable) NSString *pkg; - @end - - /// Pigeon equivalent of [AssetImageBitmap]. -@@ -741,54 +725,87 @@ NSObject *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void); - /// - /// Only non-null configuration values will result in updates; options with - /// null values will remain unchanged. --- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Updates the set of circles on the map. --- (void)updateCirclesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updateCirclesByAdding:(NSArray *)toAdd -+ changing:(NSArray *)toChange -+ removing:(NSArray *)idsToRemove -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Updates the set of heatmaps on the map. --- (void)updateHeatmapsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updateHeatmapsByAdding:(NSArray *)toAdd -+ changing:(NSArray *)toChange -+ removing:(NSArray *)idsToRemove -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Updates the set of custer managers for clusters on the map. --- (void)updateClusterManagersByAdding:(NSArray *)toAdd removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updateClusterManagersByAdding:(NSArray *)toAdd -+ removing:(NSArray *)idsToRemove -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Updates the set of markers on the map. --- (void)updateMarkersByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updateMarkersByAdding:(NSArray *)toAdd -+ changing:(NSArray *)toChange -+ removing:(NSArray *)idsToRemove -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Updates the set of polygonss on the map. --- (void)updatePolygonsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updatePolygonsByAdding:(NSArray *)toAdd -+ changing:(NSArray *)toChange -+ removing:(NSArray *)idsToRemove -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Updates the set of polylines on the map. --- (void)updatePolylinesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updatePolylinesByAdding:(NSArray *)toAdd -+ changing:(NSArray *)toChange -+ removing:(NSArray *)idsToRemove -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Updates the set of tile overlays on the map. --- (void)updateTileOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updateTileOverlaysByAdding:(NSArray *)toAdd -+ changing:(NSArray *)toChange -+ removing:(NSArray *)idsToRemove -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Updates the set of ground overlays on the map. --- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd -+ changing:(NSArray *)toChange -+ removing:(NSArray *)idsToRemove -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Gets the screen coordinate for the given map location. - /// - /// @return only when . --- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng error:(FlutterError *_Nullable *_Nonnull)error; -+- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Gets the map location for the given screen coordinate. - /// - /// @return only when . --- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate error:(FlutterError *_Nullable *_Nonnull)error; -+- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Gets the map region currently displayed on the map. - /// - /// @return only when . - - (nullable FGMPlatformLatLngBounds *)visibleMapRegion:(FlutterError *_Nullable *_Nonnull)error; - /// Moves the camera according to [cameraUpdate] immediately, with no - /// animation. --- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Moves the camera according to [cameraUpdate], animating the update using a - /// duration in milliseconds if provided. --- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate duration:(nullable NSNumber *)durationMilliseconds error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate -+ duration:(nullable NSNumber *)durationMilliseconds -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Gets the current map zoom level. - /// - /// @return only when . - - (nullable NSNumber *)currentZoomLevel:(FlutterError *_Nullable *_Nonnull)error; - /// Show the info window for the marker with the given ID. --- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Hide the info window for the marker with the given ID. --- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Returns true if the marker with the given ID is currently displaying its - /// info window. - /// - /// @return only when . --- (nullable NSNumber *)isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; -+- (nullable NSNumber *) -+ isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Sets the style to the given map style string, where an empty string - /// indicates that the style should be cleared. - /// -@@ -911,19 +956,29 @@ extern void SetUpFGMMapsPlatformViewApiWithSuffix(id bin - - (nullable NSNumber *)isMyLocationButtonEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; - /// @return only when . - - (nullable NSNumber *)isTrafficEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; --- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; --- (nullable FGMPlatformGroundOverlay *)groundOverlayWithIdentifier:(NSString *)groundOverlayId error:(FlutterError *_Nullable *_Nonnull)error; --- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId error:(FlutterError *_Nullable *_Nonnull)error; -+- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId -+ error: -+ (FlutterError *_Nullable *_Nonnull)error; -+- (nullable FGMPlatformGroundOverlay *) -+ groundOverlayWithIdentifier:(NSString *)groundOverlayId -+ error:(FlutterError *_Nullable *_Nonnull)error; -+- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// @return only when . - - (nullable FGMPlatformZoomRange *)zoomRange:(FlutterError *_Nullable *_Nonnull)error; - /// @return only when . --- (nullable NSArray *)clustersWithIdentifier:(NSString *)clusterManagerId error:(FlutterError *_Nullable *_Nonnull)error; -+- (nullable NSArray *) -+ clustersWithIdentifier:(NSString *)clusterManagerId -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// @return only when . - - (nullable FGMPlatformCameraPosition *)cameraPosition:(FlutterError *_Nullable *_Nonnull)error; - @end - --extern void SetUpFGMMapsInspectorApi(id binaryMessenger, NSObject *_Nullable api); -+extern void SetUpFGMMapsInspectorApi(id binaryMessenger, -+ NSObject *_Nullable api); - --extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); -+extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, -+ NSObject *_Nullable api, -+ NSString *messageChannelSuffix); - - NS_ASSUME_NONNULL_END diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.orig b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.orig deleted file mode 100644 index 20c055a57bdc..000000000000 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.orig +++ /dev/null @@ -1,4301 +0,0 @@ -// Copyright 2013 The Flutter Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.7), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; - -import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; -import 'package:flutter/services.dart'; - -PlatformException _createConnectionError(String channelName) { - return PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); -} - -List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { - if (empty) { - return []; - } - if (error == null) { - return [result]; - } - return [error.code, error.message, error.details]; -} -bool _deepEquals(Object? a, Object? b) { - if (a is List && b is List) { - return a.length == b.length && - a.indexed - .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); - } - if (a is Map && b is Map) { - return a.length == b.length && a.entries.every((MapEntry entry) => - (b as Map).containsKey(entry.key) && - _deepEquals(entry.value, b[entry.key])); - } - return a == b; -} - - -/// Pigeon equivalent of MapType -enum PlatformMapType { - none, - normal, - satellite, - terrain, - hybrid, -} - -/// Join types for polyline joints. -enum PlatformJointType { - mitered, - bevel, - round, -} - -/// Enumeration of possible types for PatternItem. -enum PlatformPatternItemType { - dot, - dash, - gap, -} - -/// Pigeon equivalent of [MapBitmapScaling]. -enum PlatformMapBitmapScaling { - auto, - none, -} - -/// Pigeon representatation of a CameraPosition. -class PlatformCameraPosition { - PlatformCameraPosition({ - required this.bearing, - required this.target, - required this.tilt, - required this.zoom, - }); - - double bearing; - - PlatformLatLng target; - - double tilt; - - double zoom; - - List _toList() { - return [ - bearing, - target, - tilt, - zoom, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraPosition decode(Object result) { - result as List; - return PlatformCameraPosition( - bearing: result[0]! as double, - target: result[1]! as PlatformLatLng, - tilt: result[2]! as double, - zoom: result[3]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraPosition || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon representation of a CameraUpdate. -class PlatformCameraUpdate { - PlatformCameraUpdate({ - required this.cameraUpdate, - }); - - /// This Object must be one of the classes below prefixed with - /// PlatformCameraUpdate. Each such class represents a different type of - /// camera update, and each holds a different set of data, preventing the - /// use of a single unified class. - Object cameraUpdate; - - List _toList() { - return [ - cameraUpdate, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdate decode(Object result) { - result as List; - return PlatformCameraUpdate( - cameraUpdate: result[0]!, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdate || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of NewCameraPosition -class PlatformCameraUpdateNewCameraPosition { - PlatformCameraUpdateNewCameraPosition({ - required this.cameraPosition, - }); - - PlatformCameraPosition cameraPosition; - - List _toList() { - return [ - cameraPosition, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateNewCameraPosition decode(Object result) { - result as List; - return PlatformCameraUpdateNewCameraPosition( - cameraPosition: result[0]! as PlatformCameraPosition, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewCameraPosition || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of NewLatLng -class PlatformCameraUpdateNewLatLng { - PlatformCameraUpdateNewLatLng({ - required this.latLng, - }); - - PlatformLatLng latLng; - - List _toList() { - return [ - latLng, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateNewLatLng decode(Object result) { - result as List; - return PlatformCameraUpdateNewLatLng( - latLng: result[0]! as PlatformLatLng, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLng || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of NewLatLngBounds -class PlatformCameraUpdateNewLatLngBounds { - PlatformCameraUpdateNewLatLngBounds({ - required this.bounds, - required this.padding, - }); - - PlatformLatLngBounds bounds; - - double padding; - - List _toList() { - return [ - bounds, - padding, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateNewLatLngBounds decode(Object result) { - result as List; - return PlatformCameraUpdateNewLatLngBounds( - bounds: result[0]! as PlatformLatLngBounds, - padding: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLngBounds || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of NewLatLngZoom -class PlatformCameraUpdateNewLatLngZoom { - PlatformCameraUpdateNewLatLngZoom({ - required this.latLng, - required this.zoom, - }); - - PlatformLatLng latLng; - - double zoom; - - List _toList() { - return [ - latLng, - zoom, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateNewLatLngZoom decode(Object result) { - result as List; - return PlatformCameraUpdateNewLatLngZoom( - latLng: result[0]! as PlatformLatLng, - zoom: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLngZoom || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of ScrollBy -class PlatformCameraUpdateScrollBy { - PlatformCameraUpdateScrollBy({ - required this.dx, - required this.dy, - }); - - double dx; - - double dy; - - List _toList() { - return [ - dx, - dy, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateScrollBy decode(Object result) { - result as List; - return PlatformCameraUpdateScrollBy( - dx: result[0]! as double, - dy: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateScrollBy || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of ZoomBy -class PlatformCameraUpdateZoomBy { - PlatformCameraUpdateZoomBy({ - required this.amount, - this.focus, - }); - - double amount; - - PlatformPoint? focus; - - List _toList() { - return [ - amount, - focus, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateZoomBy decode(Object result) { - result as List; - return PlatformCameraUpdateZoomBy( - amount: result[0]! as double, - focus: result[1] as PlatformPoint?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoomBy || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of ZoomIn/ZoomOut -class PlatformCameraUpdateZoom { - PlatformCameraUpdateZoom({ - required this.out, - }); - - bool out; - - List _toList() { - return [ - out, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateZoom decode(Object result) { - result as List; - return PlatformCameraUpdateZoom( - out: result[0]! as bool, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoom || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of ZoomTo -class PlatformCameraUpdateZoomTo { - PlatformCameraUpdateZoomTo({ - required this.zoom, - }); - - double zoom; - - List _toList() { - return [ - zoom, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateZoomTo decode(Object result) { - result as List; - return PlatformCameraUpdateZoomTo( - zoom: result[0]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoomTo || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Circle class. -class PlatformCircle { - PlatformCircle({ - this.consumeTapEvents = false, - required this.fillColor, - required this.strokeColor, - this.visible = true, - this.strokeWidth = 10, - this.zIndex = 0.0, - required this.center, - this.radius = 0, - required this.circleId, - }); - - bool consumeTapEvents; - - PlatformColor fillColor; - - PlatformColor strokeColor; - - bool visible; - - int strokeWidth; - - double zIndex; - - PlatformLatLng center; - - double radius; - - String circleId; - - List _toList() { - return [ - consumeTapEvents, - fillColor, - strokeColor, - visible, - strokeWidth, - zIndex, - center, - radius, - circleId, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCircle decode(Object result) { - result as List; - return PlatformCircle( - consumeTapEvents: result[0]! as bool, - fillColor: result[1]! as PlatformColor, - strokeColor: result[2]! as PlatformColor, - visible: result[3]! as bool, - strokeWidth: result[4]! as int, - zIndex: result[5]! as double, - center: result[6]! as PlatformLatLng, - radius: result[7]! as double, - circleId: result[8]! as String, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCircle || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Heatmap class. -class PlatformHeatmap { - PlatformHeatmap({ - required this.heatmapId, - required this.data, - this.gradient, - required this.opacity, - required this.radius, - required this.minimumZoomIntensity, - required this.maximumZoomIntensity, - }); - - String heatmapId; - - List data; - - PlatformHeatmapGradient? gradient; - - double opacity; - - int radius; - - int minimumZoomIntensity; - - int maximumZoomIntensity; - - List _toList() { - return [ - heatmapId, - data, - gradient, - opacity, - radius, - minimumZoomIntensity, - maximumZoomIntensity, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformHeatmap decode(Object result) { - result as List; - return PlatformHeatmap( - heatmapId: result[0]! as String, - data: (result[1] as List?)!.cast(), - gradient: result[2] as PlatformHeatmapGradient?, - opacity: result[3]! as double, - radius: result[4]! as int, - minimumZoomIntensity: result[5]! as int, - maximumZoomIntensity: result[6]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformHeatmap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the HeatmapGradient class. -/// -/// The GMUGradient structure is slightly different from HeatmapGradient, so -/// this matches the iOS API so that conversion can be done on the Dart side -/// where the structures are easier to work with. -class PlatformHeatmapGradient { - PlatformHeatmapGradient({ - required this.colors, - required this.startPoints, - required this.colorMapSize, - }); - - List colors; - - List startPoints; - - int colorMapSize; - - List _toList() { - return [ - colors, - startPoints, - colorMapSize, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformHeatmapGradient decode(Object result) { - result as List; - return PlatformHeatmapGradient( - colors: (result[0] as List?)!.cast(), - startPoints: (result[1] as List?)!.cast(), - colorMapSize: result[2]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformHeatmapGradient || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the WeightedLatLng class. -class PlatformWeightedLatLng { - PlatformWeightedLatLng({ - required this.point, - required this.weight, - }); - - PlatformLatLng point; - - double weight; - - List _toList() { - return [ - point, - weight, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformWeightedLatLng decode(Object result) { - result as List; - return PlatformWeightedLatLng( - point: result[0]! as PlatformLatLng, - weight: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformWeightedLatLng || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the InfoWindow class. -class PlatformInfoWindow { - PlatformInfoWindow({ - this.title, - this.snippet, - required this.anchor, - }); - - String? title; - - String? snippet; - - PlatformPoint anchor; - - List _toList() { - return [ - title, - snippet, - anchor, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformInfoWindow decode(Object result) { - result as List; - return PlatformInfoWindow( - title: result[0] as String?, - snippet: result[1] as String?, - anchor: result[2]! as PlatformPoint, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformInfoWindow || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of Cluster. -class PlatformCluster { - PlatformCluster({ - required this.clusterManagerId, - required this.position, - required this.bounds, - required this.markerIds, - }); - - String clusterManagerId; - - PlatformLatLng position; - - PlatformLatLngBounds bounds; - - List markerIds; - - List _toList() { - return [ - clusterManagerId, - position, - bounds, - markerIds, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCluster decode(Object result) { - result as List; - return PlatformCluster( - clusterManagerId: result[0]! as String, - position: result[1]! as PlatformLatLng, - bounds: result[2]! as PlatformLatLngBounds, - markerIds: (result[3] as List?)!.cast(), - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCluster || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the ClusterManager class. -class PlatformClusterManager { - PlatformClusterManager({ - required this.identifier, - }); - - String identifier; - - List _toList() { - return [ - identifier, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformClusterManager decode(Object result) { - result as List; - return PlatformClusterManager( - identifier: result[0]! as String, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformClusterManager || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Marker class. -class PlatformMarker { - PlatformMarker({ - this.alpha = 1.0, - required this.anchor, - this.consumeTapEvents = false, - this.draggable = false, - this.flat = false, - required this.icon, - required this.infoWindow, - required this.position, - this.rotation = 0.0, - this.visible = true, - this.zIndex = 0, - required this.markerId, - this.clusterManagerId, - }); - - double alpha; - - PlatformPoint anchor; - - bool consumeTapEvents; - - bool draggable; - - bool flat; - - PlatformBitmap icon; - - PlatformInfoWindow infoWindow; - - PlatformLatLng position; - - double rotation; - - bool visible; - - int zIndex; - - String markerId; - - String? clusterManagerId; - - List _toList() { - return [ - alpha, - anchor, - consumeTapEvents, - draggable, - flat, - icon, - infoWindow, - position, - rotation, - visible, - zIndex, - markerId, - clusterManagerId, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformMarker decode(Object result) { - result as List; - return PlatformMarker( - alpha: result[0]! as double, - anchor: result[1]! as PlatformPoint, - consumeTapEvents: result[2]! as bool, - draggable: result[3]! as bool, - flat: result[4]! as bool, - icon: result[5]! as PlatformBitmap, - infoWindow: result[6]! as PlatformInfoWindow, - position: result[7]! as PlatformLatLng, - rotation: result[8]! as double, - visible: result[9]! as bool, - zIndex: result[10]! as int, - markerId: result[11]! as String, - clusterManagerId: result[12] as String?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformMarker || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Point of Interest class. -class PlatformPointOfInterest { - PlatformPointOfInterest({ - required this.position, - this.name, - required this.placeId, - }); - - PlatformLatLng position; - - String? name; - - String placeId; - - List _toList() { - return [ - position, - name, - placeId, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPointOfInterest decode(Object result) { - result as List; - return PlatformPointOfInterest( - position: result[0]! as PlatformLatLng, - name: result[1]! as String, - placeId: result[2]! as String, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPointOfInterest || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Polygon class. -class PlatformPolygon { - PlatformPolygon({ - required this.polygonId, - required this.consumesTapEvents, - required this.fillColor, - required this.geodesic, - required this.points, - required this.holes, - required this.visible, - required this.strokeColor, - required this.strokeWidth, - required this.zIndex, - }); - - String polygonId; - - bool consumesTapEvents; - - PlatformColor fillColor; - - bool geodesic; - - List points; - - List> holes; - - bool visible; - - PlatformColor strokeColor; - - int strokeWidth; - - int zIndex; - - List _toList() { - return [ - polygonId, - consumesTapEvents, - fillColor, - geodesic, - points, - holes, - visible, - strokeColor, - strokeWidth, - zIndex, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPolygon decode(Object result) { - result as List; - return PlatformPolygon( - polygonId: result[0]! as String, - consumesTapEvents: result[1]! as bool, - fillColor: result[2]! as PlatformColor, - geodesic: result[3]! as bool, - points: (result[4] as List?)!.cast(), - holes: (result[5] as List?)!.cast>(), - visible: result[6]! as bool, - strokeColor: result[7]! as PlatformColor, - strokeWidth: result[8]! as int, - zIndex: result[9]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPolygon || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Polyline class. -class PlatformPolyline { - PlatformPolyline({ - required this.polylineId, - required this.consumesTapEvents, - required this.color, - required this.geodesic, - required this.jointType, - required this.patterns, - required this.points, - required this.visible, - required this.width, - required this.zIndex, - }); - - String polylineId; - - bool consumesTapEvents; - - PlatformColor color; - - bool geodesic; - - /// The joint type. - PlatformJointType jointType; - - /// The pattern data, as a list of pattern items. - List patterns; - - List points; - - bool visible; - - int width; - - int zIndex; - - List _toList() { - return [ - polylineId, - consumesTapEvents, - color, - geodesic, - jointType, - patterns, - points, - visible, - width, - zIndex, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPolyline decode(Object result) { - result as List; - return PlatformPolyline( - polylineId: result[0]! as String, - consumesTapEvents: result[1]! as bool, - color: result[2]! as PlatformColor, - geodesic: result[3]! as bool, - jointType: result[4]! as PlatformJointType, - patterns: (result[5] as List?)!.cast(), - points: (result[6] as List?)!.cast(), - visible: result[7]! as bool, - width: result[8]! as int, - zIndex: result[9]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPolyline || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the PatternItem class. -class PlatformPatternItem { - PlatformPatternItem({ - required this.type, - this.length, - }); - - PlatformPatternItemType type; - - double? length; - - List _toList() { - return [ - type, - length, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPatternItem decode(Object result) { - result as List; - return PlatformPatternItem( - type: result[0]! as PlatformPatternItemType, - length: result[1] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPatternItem || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Tile class. -class PlatformTile { - PlatformTile({ - required this.width, - required this.height, - this.data, - }); - - int width; - - int height; - - Uint8List? data; - - List _toList() { - return [ - width, - height, - data, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformTile decode(Object result) { - result as List; - return PlatformTile( - width: result[0]! as int, - height: result[1]! as int, - data: result[2] as Uint8List?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformTile || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the TileOverlay class. -class PlatformTileOverlay { - PlatformTileOverlay({ - required this.tileOverlayId, - required this.fadeIn, - required this.transparency, - required this.zIndex, - required this.visible, - required this.tileSize, - }); - - String tileOverlayId; - - bool fadeIn; - - double transparency; - - int zIndex; - - bool visible; - - int tileSize; - - List _toList() { - return [ - tileOverlayId, - fadeIn, - transparency, - zIndex, - visible, - tileSize, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformTileOverlay decode(Object result) { - result as List; - return PlatformTileOverlay( - 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, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformTileOverlay || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of Flutter's EdgeInsets. -class PlatformEdgeInsets { - PlatformEdgeInsets({ - required this.top, - required this.bottom, - required this.left, - required this.right, - }); - - double top; - - double bottom; - - double left; - - double right; - - List _toList() { - return [ - top, - bottom, - left, - right, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformEdgeInsets decode(Object result) { - result as List; - return PlatformEdgeInsets( - top: result[0]! as double, - bottom: result[1]! as double, - left: result[2]! as double, - right: result[3]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformEdgeInsets || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of LatLng. -class PlatformLatLng { - PlatformLatLng({ - required this.latitude, - required this.longitude, - }); - - double latitude; - - double longitude; - - List _toList() { - return [ - latitude, - longitude, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformLatLng decode(Object result) { - result as List; - return PlatformLatLng( - latitude: result[0]! as double, - longitude: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformLatLng || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of LatLngBounds. -class PlatformLatLngBounds { - PlatformLatLngBounds({ - required this.northeast, - required this.southwest, - }); - - PlatformLatLng northeast; - - PlatformLatLng southwest; - - List _toList() { - return [ - northeast, - southwest, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformLatLngBounds decode(Object result) { - result as List; - return PlatformLatLngBounds( - northeast: result[0]! as PlatformLatLng, - southwest: result[1]! as PlatformLatLng, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformLatLngBounds || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_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]). -class PlatformCameraTargetBounds { - PlatformCameraTargetBounds({ - this.bounds, - }); - - PlatformLatLngBounds? bounds; - - List _toList() { - return [ - bounds, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraTargetBounds decode(Object result) { - result as List; - return PlatformCameraTargetBounds( - bounds: result[0] as PlatformLatLngBounds?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraTargetBounds || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the GroundOverlay class. -class PlatformGroundOverlay { - PlatformGroundOverlay({ - required this.groundOverlayId, - required this.image, - this.position, - this.bounds, - this.anchor, - required this.transparency, - required this.bearing, - required this.zIndex, - required this.visible, - required this.clickable, - this.zoomLevel, - }); - - String groundOverlayId; - - PlatformBitmap image; - - PlatformLatLng? position; - - PlatformLatLngBounds? bounds; - - PlatformPoint? anchor; - - double transparency; - - double bearing; - - int zIndex; - - bool visible; - - bool clickable; - - double? zoomLevel; - - List _toList() { - return [ - groundOverlayId, - image, - position, - bounds, - anchor, - transparency, - bearing, - zIndex, - visible, - clickable, - zoomLevel, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformGroundOverlay decode(Object result) { - result as List; - return PlatformGroundOverlay( - groundOverlayId: result[0]! as String, - image: result[1]! as PlatformBitmap, - position: result[2] as PlatformLatLng?, - bounds: result[3] as PlatformLatLngBounds?, - anchor: result[4] as PlatformPoint?, - transparency: result[5]! as double, - bearing: result[6]! as double, - zIndex: result[7]! as int, - visible: result[8]! as bool, - clickable: result[9]! as bool, - zoomLevel: result[10] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformGroundOverlay || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Information passed to the platform view creation. -class PlatformMapViewCreationParams { - PlatformMapViewCreationParams({ - required this.initialCameraPosition, - required this.mapConfiguration, - required this.initialCircles, - required this.initialMarkers, - required this.initialPolygons, - required this.initialPolylines, - required this.initialHeatmaps, - required this.initialTileOverlays, - required this.initialClusterManagers, - required this.initialGroundOverlays, - }); - - PlatformCameraPosition initialCameraPosition; - - PlatformMapConfiguration mapConfiguration; - - List initialCircles; - - List initialMarkers; - - List initialPolygons; - - List initialPolylines; - - List initialHeatmaps; - - List initialTileOverlays; - - List initialClusterManagers; - - List initialGroundOverlays; - - List _toList() { - return [ - initialCameraPosition, - mapConfiguration, - initialCircles, - initialMarkers, - initialPolygons, - initialPolylines, - initialHeatmaps, - initialTileOverlays, - initialClusterManagers, - initialGroundOverlays, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformMapViewCreationParams decode(Object result) { - result as List; - return PlatformMapViewCreationParams( - initialCameraPosition: result[0]! as PlatformCameraPosition, - mapConfiguration: result[1]! as PlatformMapConfiguration, - initialCircles: (result[2] as List?)!.cast(), - initialMarkers: (result[3] as List?)!.cast(), - initialPolygons: (result[4] as List?)!.cast(), - initialPolylines: (result[5] as List?)!.cast(), - initialHeatmaps: (result[6] as List?)!.cast(), - initialTileOverlays: (result[7] as List?)!.cast(), - initialClusterManagers: (result[8] as List?)!.cast(), - initialGroundOverlays: (result[9] as List?)!.cast(), - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformMapViewCreationParams || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of MapConfiguration. -class PlatformMapConfiguration { - PlatformMapConfiguration({ - this.compassEnabled, - this.cameraTargetBounds, - this.mapType, - this.minMaxZoomPreference, - this.rotateGesturesEnabled, - this.scrollGesturesEnabled, - this.tiltGesturesEnabled, - this.trackCameraPosition, - this.zoomGesturesEnabled, - this.myLocationEnabled, - this.myLocationButtonEnabled, - this.padding, - this.indoorViewEnabled, - this.trafficEnabled, - this.buildingsEnabled, - this.mapId, - this.style, - }); - - bool? compassEnabled; - - PlatformCameraTargetBounds? cameraTargetBounds; - - PlatformMapType? mapType; - - PlatformZoomRange? minMaxZoomPreference; - - bool? rotateGesturesEnabled; - - bool? scrollGesturesEnabled; - - bool? tiltGesturesEnabled; - - bool? trackCameraPosition; - - bool? zoomGesturesEnabled; - - bool? myLocationEnabled; - - bool? myLocationButtonEnabled; - - PlatformEdgeInsets? padding; - - bool? indoorViewEnabled; - - bool? trafficEnabled; - - bool? buildingsEnabled; - - String? mapId; - - String? style; - - List _toList() { - return [ - compassEnabled, - cameraTargetBounds, - mapType, - minMaxZoomPreference, - rotateGesturesEnabled, - scrollGesturesEnabled, - tiltGesturesEnabled, - trackCameraPosition, - zoomGesturesEnabled, - myLocationEnabled, - myLocationButtonEnabled, - padding, - indoorViewEnabled, - trafficEnabled, - buildingsEnabled, - mapId, - style, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformMapConfiguration decode(Object result) { - result as List; - return PlatformMapConfiguration( - compassEnabled: result[0] as bool?, - cameraTargetBounds: result[1] as PlatformCameraTargetBounds?, - mapType: result[2] as PlatformMapType?, - minMaxZoomPreference: result[3] as PlatformZoomRange?, - rotateGesturesEnabled: result[4] as bool?, - scrollGesturesEnabled: result[5] as bool?, - tiltGesturesEnabled: result[6] as bool?, - trackCameraPosition: result[7] as bool?, - zoomGesturesEnabled: result[8] as bool?, - myLocationEnabled: result[9] as bool?, - myLocationButtonEnabled: result[10] as bool?, - padding: result[11] as PlatformEdgeInsets?, - indoorViewEnabled: result[12] as bool?, - trafficEnabled: result[13] as bool?, - buildingsEnabled: result[14] as bool?, - mapId: result[15] as String?, - style: result[16] as String?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformMapConfiguration || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon representation of an x,y coordinate. -class PlatformPoint { - PlatformPoint({ - required this.x, - required this.y, - }); - - double x; - - double y; - - List _toList() { - return [ - x, - y, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPoint decode(Object result) { - result as List; - return PlatformPoint( - x: result[0]! as double, - y: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPoint || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon representation of a size. -class PlatformSize { - PlatformSize({ - required this.width, - required this.height, - }); - - double width; - - double height; - - List _toList() { - return [ - width, - height, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformSize decode(Object result) { - result as List; - return PlatformSize( - width: result[0]! as double, - height: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformSize || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon representation of a color. -class PlatformColor { - PlatformColor({ - required this.red, - required this.green, - required this.blue, - required this.alpha, - }); - - double red; - - double green; - - double blue; - - double alpha; - - List _toList() { - return [ - red, - green, - blue, - alpha, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformColor decode(Object result) { - result as List; - return PlatformColor( - red: result[0]! as double, - green: result[1]! as double, - blue: result[2]! as double, - alpha: result[3]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformColor || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of GMSTileLayer properties. -class PlatformTileLayer { - PlatformTileLayer({ - required this.visible, - required this.fadeIn, - required this.opacity, - required this.zIndex, - }); - - bool visible; - - bool fadeIn; - - double opacity; - - int zIndex; - - List _toList() { - return [ - visible, - fadeIn, - opacity, - zIndex, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformTileLayer decode(Object result) { - result as List; - return PlatformTileLayer( - visible: result[0]! as bool, - fadeIn: result[1]! as bool, - opacity: result[2]! as double, - zIndex: result[3]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformTileLayer || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of MinMaxZoomPreference. -class PlatformZoomRange { - PlatformZoomRange({ - this.min, - this.max, - }); - - double? min; - - double? max; - - List _toList() { - return [ - min, - max, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformZoomRange decode(Object result) { - result as List; - return PlatformZoomRange( - min: result[0] as double?, - max: result[1] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformZoomRange || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint -/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which -/// may hold the pigeon equivalent type of any of them. -class PlatformBitmap { - PlatformBitmap({ - required this.bitmap, - }); - - /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], - /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], - /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. - /// As Pigeon does not currently support data class inheritance, this - /// approach allows for the different bitmap implementations to be valid - /// argument and return types of the API methods. See - /// https://github.com/flutter/flutter/issues/117819. - Object bitmap; - - List _toList() { - return [ - bitmap, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmap decode(Object result) { - result as List; - return PlatformBitmap( - bitmap: result[0]!, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [DefaultMarker]. -class PlatformBitmapDefaultMarker { - PlatformBitmapDefaultMarker({ - this.hue, - }); - - double? hue; - - List _toList() { - return [ - hue, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapDefaultMarker decode(Object result) { - result as List; - return PlatformBitmapDefaultMarker( - hue: result[0] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapDefaultMarker || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [BytesBitmap]. -class PlatformBitmapBytes { - PlatformBitmapBytes({ - required this.byteData, - this.size, - }); - - Uint8List byteData; - - PlatformSize? size; - - List _toList() { - return [ - byteData, - size, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapBytes decode(Object result) { - result as List; - return PlatformBitmapBytes( - byteData: result[0]! as Uint8List, - size: result[1] as PlatformSize?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapBytes || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [AssetBitmap]. -class PlatformBitmapAsset { - PlatformBitmapAsset({ - required this.name, - this.pkg, - }); - - String name; - - String? pkg; - - List _toList() { - return [ - name, - pkg, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapAsset decode(Object result) { - result as List; - return PlatformBitmapAsset( - name: result[0]! as String, - pkg: result[1] as String?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapAsset || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [AssetImageBitmap]. -class PlatformBitmapAssetImage { - PlatformBitmapAssetImage({ - required this.name, - required this.scale, - this.size, - }); - - String name; - - double scale; - - PlatformSize? size; - - List _toList() { - return [ - name, - scale, - size, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapAssetImage decode(Object result) { - result as List; - return PlatformBitmapAssetImage( - name: result[0]! as String, - scale: result[1]! as double, - size: result[2] as PlatformSize?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapAssetImage || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [AssetMapBitmap]. -class PlatformBitmapAssetMap { - PlatformBitmapAssetMap({ - required this.assetName, - required this.bitmapScaling, - required this.imagePixelRatio, - this.width, - this.height, - }); - - String assetName; - - PlatformMapBitmapScaling bitmapScaling; - - double imagePixelRatio; - - double? width; - - double? height; - - List _toList() { - return [ - assetName, - bitmapScaling, - imagePixelRatio, - width, - height, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapAssetMap decode(Object result) { - result as List; - return PlatformBitmapAssetMap( - assetName: result[0]! as String, - bitmapScaling: result[1]! as PlatformMapBitmapScaling, - imagePixelRatio: result[2]! as double, - width: result[3] as double?, - height: result[4] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapAssetMap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [BytesMapBitmap]. -class PlatformBitmapBytesMap { - PlatformBitmapBytesMap({ - required this.byteData, - required this.bitmapScaling, - required this.imagePixelRatio, - this.width, - this.height, - }); - - Uint8List byteData; - - PlatformMapBitmapScaling bitmapScaling; - - double imagePixelRatio; - - double? width; - - double? height; - - List _toList() { - return [ - byteData, - bitmapScaling, - imagePixelRatio, - width, - height, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapBytesMap decode(Object result) { - result as List; - return PlatformBitmapBytesMap( - byteData: result[0]! as Uint8List, - bitmapScaling: result[1]! as PlatformMapBitmapScaling, - imagePixelRatio: result[2]! as double, - width: result[3] as double?, - height: result[4] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapBytesMap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else if (value is PlatformMapType) { - buffer.putUint8(129); - writeValue(buffer, value.index); - } else if (value is PlatformJointType) { - buffer.putUint8(130); - writeValue(buffer, value.index); - } else if (value is PlatformPatternItemType) { - buffer.putUint8(131); - writeValue(buffer, value.index); - } else if (value is PlatformMapBitmapScaling) { - buffer.putUint8(132); - writeValue(buffer, value.index); - } else if (value is PlatformCameraPosition) { - buffer.putUint8(133); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { - buffer.putUint8(134); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewCameraPosition) { - buffer.putUint8(135); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLng) { - buffer.putUint8(136); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngBounds) { - buffer.putUint8(137); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngZoom) { - buffer.putUint8(138); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateScrollBy) { - buffer.putUint8(139); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomBy) { - buffer.putUint8(140); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoom) { - buffer.putUint8(141); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomTo) { - buffer.putUint8(142); - writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { - buffer.putUint8(143); - writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { - buffer.putUint8(144); - writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmapGradient) { - buffer.putUint8(145); - writeValue(buffer, value.encode()); - } else if (value is PlatformWeightedLatLng) { - buffer.putUint8(146); - writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { - buffer.putUint8(147); - writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { - buffer.putUint8(148); - writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { - buffer.putUint8(149); - writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { - buffer.putUint8(150); - writeValue(buffer, value.encode()); - } else if (value is PlatformPointOfInterest) { - buffer.putUint8(151); - writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { - buffer.putUint8(152); - writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { - buffer.putUint8(153); - writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { - buffer.putUint8(154); - writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { - buffer.putUint8(155); - writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { - buffer.putUint8(156); - writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { - buffer.putUint8(157); - writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { - buffer.putUint8(158); - writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { - buffer.putUint8(159); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { - buffer.putUint8(160); - writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { - buffer.putUint8(161); - writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { - buffer.putUint8(162); - writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { - buffer.putUint8(163); - writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { - buffer.putUint8(164); - writeValue(buffer, value.encode()); - } else if (value is PlatformSize) { - buffer.putUint8(165); - writeValue(buffer, value.encode()); - } else if (value is PlatformColor) { - buffer.putUint8(166); - writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { - buffer.putUint8(167); - writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { - buffer.putUint8(168); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { - buffer.putUint8(169); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { - buffer.putUint8(170); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { - buffer.putUint8(171); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { - buffer.putUint8(172); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { - buffer.putUint8(173); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { - buffer.putUint8(174); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { - buffer.putUint8(175); - writeValue(buffer, value.encode()); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 129: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformMapType.values[value]; - case 130: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformJointType.values[value]; - case 131: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformPatternItemType.values[value]; - case 132: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformMapBitmapScaling.values[value]; - case 133: - return PlatformCameraPosition.decode(readValue(buffer)!); - case 134: - return PlatformCameraUpdate.decode(readValue(buffer)!); - case 135: - return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!); - case 136: - return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!); - case 137: - return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); - case 138: - return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); - case 139: - return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); - case 140: - return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); - case 141: - return PlatformCameraUpdateZoom.decode(readValue(buffer)!); - case 142: - return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); - case 143: - return PlatformCircle.decode(readValue(buffer)!); - case 144: - return PlatformHeatmap.decode(readValue(buffer)!); - case 145: - return PlatformHeatmapGradient.decode(readValue(buffer)!); - case 146: - return PlatformWeightedLatLng.decode(readValue(buffer)!); - case 147: - return PlatformInfoWindow.decode(readValue(buffer)!); - case 148: - return PlatformCluster.decode(readValue(buffer)!); - case 149: - return PlatformClusterManager.decode(readValue(buffer)!); - case 150: - return PlatformMarker.decode(readValue(buffer)!); - case 151: - return PlatformPointOfInterest.decode(readValue(buffer)!); - case 152: - return PlatformPolygon.decode(readValue(buffer)!); - case 153: - return PlatformPolyline.decode(readValue(buffer)!); - case 154: - return PlatformPatternItem.decode(readValue(buffer)!); - case 155: - return PlatformTile.decode(readValue(buffer)!); - case 156: - return PlatformTileOverlay.decode(readValue(buffer)!); - case 157: - return PlatformEdgeInsets.decode(readValue(buffer)!); - case 158: - return PlatformLatLng.decode(readValue(buffer)!); - case 159: - return PlatformLatLngBounds.decode(readValue(buffer)!); - case 160: - return PlatformCameraTargetBounds.decode(readValue(buffer)!); - case 161: - return PlatformGroundOverlay.decode(readValue(buffer)!); - case 162: - return PlatformMapViewCreationParams.decode(readValue(buffer)!); - case 163: - return PlatformMapConfiguration.decode(readValue(buffer)!); - case 164: - return PlatformPoint.decode(readValue(buffer)!); - case 165: - return PlatformSize.decode(readValue(buffer)!); - case 166: - return PlatformColor.decode(readValue(buffer)!); - case 167: - return PlatformTileLayer.decode(readValue(buffer)!); - case 168: - return PlatformZoomRange.decode(readValue(buffer)!); - case 169: - return PlatformBitmap.decode(readValue(buffer)!); - case 170: - return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); - case 171: - return PlatformBitmapBytes.decode(readValue(buffer)!); - case 172: - return PlatformBitmapAsset.decode(readValue(buffer)!); - case 173: - return PlatformBitmapAssetImage.decode(readValue(buffer)!); - case 174: - return PlatformBitmapAssetMap.decode(readValue(buffer)!); - case 175: - return PlatformBitmapBytesMap.decode(readValue(buffer)!); - default: - return super.readValueOfType(type, buffer); - } - } -} - -/// Interface for non-test interactions with the native SDK. -/// -/// For test-only state queries, see [MapsInspectorApi]. -class MapsApi { - /// Constructor for [MapsApi]. 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. - MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - /// Returns once the map instance is available. - Future waitForMap() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the map's configuration options. - /// - /// Only non-null configuration values will result in updates; options with - /// null values will remain unchanged. - Future updateMapConfiguration(PlatformMapConfiguration configuration) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of circles on the map. - Future updateCircles(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of heatmaps on the map. - Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of custer managers for clusters on the map. - Future updateClusterManagers(List toAdd, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of markers on the map. - Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of polygonss on the map. - Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of polylines on the map. - Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of tile overlays on the map. - Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of ground overlays on the map. - Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Gets the screen coordinate for the given map location. - Future getScreenCoordinate(PlatformLatLng latLng) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformPoint?)!; - } - } - - /// Gets the map location for the given screen coordinate. - Future getLatLng(PlatformPoint screenCoordinate) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformLatLng?)!; - } - } - - /// Gets the map region currently displayed on the map. - Future getVisibleRegion() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformLatLngBounds?)!; - } - } - - /// Moves the camera according to [cameraUpdate] immediately, with no - /// animation. - Future moveCamera(PlatformCameraUpdate cameraUpdate) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Moves the camera according to [cameraUpdate], animating the update using a - /// duration in milliseconds if provided. - Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Gets the current map zoom level. - Future getZoomLevel() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as double?)!; - } - } - - /// Show the info window for the marker with the given ID. - Future showInfoWindow(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Hide the info window for the marker with the given ID. - Future hideInfoWindow(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Returns true if the marker with the given ID is currently displaying its - /// info window. - Future isInfoWindowShown(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - /// Sets the style to the given map style string, where an empty string - /// indicates that the style should be cleared. - /// - /// If there was an error setting the style, such as an invalid style string, - /// returns the error message. - Future setStyle(String style) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as String?); - } - } - - /// Returns the error string from the last attempt to set the map style, if - /// any. - /// - /// This allows checking asynchronously for initial style failures, as there - /// is no way to return failures from map initialization. - Future getLastStyleError() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as String?); - } - } - - /// Clears the cache of tiles previously requseted from the tile provider. - Future clearTileCache(String tileOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Takes a snapshot of the map and returns its image data. - Future takeSnapshot() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as Uint8List?); - } - } -} - -/// Interface for calls from the native SDK to Dart. -abstract class MapsCallbackApi { - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - /// Called when the map camera starts moving. - void onCameraMoveStarted(); - - /// Called when the map camera moves. - void onCameraMove(PlatformCameraPosition cameraPosition); - - /// Called when the map camera stops moving. - void onCameraIdle(); - - /// Called when the map, not a specifc map object, is tapped. - void onTap(PlatformLatLng position); - - /// Called when the map, not a specifc map object, is long pressed. - void onLongPress(PlatformLatLng position); - - /// Called when a marker is tapped. - void onMarkerTap(String markerId); - - /// Called when a marker drag starts. - void onMarkerDragStart(String markerId, PlatformLatLng position); - - /// Called when a marker drag updates. - void onMarkerDrag(String markerId, PlatformLatLng position); - - /// Called when a marker drag ends. - void onMarkerDragEnd(String markerId, PlatformLatLng position); - - /// Called when a marker's info window is tapped. - void onInfoWindowTap(String markerId); - - /// Called when a circle is tapped. - void onCircleTap(String circleId); - - /// Called when a marker cluster is tapped. - void onClusterTap(PlatformCluster cluster); - - /// Called when a polygon is tapped. - void onPolygonTap(String polygonId); - - /// Called when a polyline is tapped. - void onPolylineTap(String polylineId); - - /// Called when a ground overlay is tapped. - void onGroundOverlayTap(String groundOverlayId); - - /// Called when a point of interest is tapped. - void onPoiTap(PlatformPointOfInterest poi); - - /// 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' : ''; - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - try { - api.onCameraMoveStarted(); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.'); - final List args = (message as List?)!; - final PlatformCameraPosition? arg_cameraPosition = (args[0] as PlatformCameraPosition?); - assert(arg_cameraPosition != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.'); - try { - api.onCameraMove(arg_cameraPosition!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - try { - api.onCameraIdle(); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.'); - final List args = (message as List?)!; - final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); - try { - api.onTap(arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.'); - final List args = (message as List?)!; - final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); - try { - api.onLongPress(arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); - try { - api.onMarkerTap(arg_markerId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); - try { - api.onMarkerDragStart(arg_markerId!, arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); - try { - api.onMarkerDrag(arg_markerId!, arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); - try { - api.onMarkerDragEnd(arg_markerId!, arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); - try { - api.onInfoWindowTap(arg_markerId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.'); - final List args = (message as List?)!; - final String? arg_circleId = (args[0] as String?); - assert(arg_circleId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null, expected non-null String.'); - try { - api.onCircleTap(arg_circleId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.'); - final List args = (message as List?)!; - final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); - assert(arg_cluster != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); - try { - api.onClusterTap(arg_cluster!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.'); - final List args = (message as List?)!; - final String? arg_polygonId = (args[0] as String?); - assert(arg_polygonId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); - try { - api.onPolygonTap(arg_polygonId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.'); - final List args = (message as List?)!; - final String? arg_polylineId = (args[0] as String?); - assert(arg_polylineId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); - try { - api.onPolylineTap(arg_polylineId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.'); - final List args = (message as List?)!; - final String? arg_groundOverlayId = (args[0] as String?); - assert(arg_groundOverlayId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); - try { - api.onGroundOverlayTap(arg_groundOverlayId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.'); - final List args = (message as List?)!; - final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); - assert(arg_poi != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); - try { - api.onPoiTap(arg_poi!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.'); - final List args = (message as List?)!; - final String? arg_tileOverlayId = (args[0] as String?); - assert(arg_tileOverlayId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); - final PlatformPoint? arg_location = (args[1] as PlatformPoint?); - assert(arg_location != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); - final int? arg_zoom = (args[2] as int?); - assert(arg_zoom != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); - try { - final PlatformTile output = await api.getTileOverlayTile(arg_tileOverlayId!, arg_location!, arg_zoom!); - return wrapResponse(result: output); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - } -} - -/// 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. -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 = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future createView(PlatformMapViewCreationParams? type) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } -} - -/// Inspector API only intended for use in integration tests. -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 = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future areBuildingsEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areRotateGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areScrollGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areTiltGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areZoomGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future isCompassEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future isMyLocationButtonEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future isTrafficEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future getTileOverlayInfo(String tileOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as PlatformTileLayer?); - } - } - - Future getGroundOverlayInfo(String groundOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as PlatformGroundOverlay?); - } - } - - Future getHeatmapInfo(String heatmapId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([heatmapId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as PlatformHeatmap?); - } - } - - Future getZoomRange() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformZoomRange?)!; - } - } - - Future> getClusters(String clusterManagerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as List?)!.cast(); - } - } - - Future getCameraPosition() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformCameraPosition?)!; - } - } -} diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.rej b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.rej deleted file mode 100644 index 6a762b8f1585..000000000000 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.rej +++ /dev/null @@ -1,1496 +0,0 @@ ---- packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart -+++ packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart -@@ -31,49 +35,36 @@ List wrapResponse({Object? result, PlatformException? error, bool empty - } - return [error.code, error.message, error.details]; - } -+ - bool _deepEquals(Object? a, Object? b) { - if (a is List && b is List) { - return a.length == b.length && -- a.indexed -- .every(((int, dynamic) item) => _deepEquals(item., b[item.])); -+ a.indexed.every( -+ ((int, dynamic) item) => _deepEquals(item., b[item.]), -+ ); - } - if (a is Map && b is Map) { -- return a.length == b.length && a.entries.every((MapEntry entry) => -- (b as Map).containsKey(entry.key) && -- _deepEquals(entry.value, b[entry.key])); -+ return a.length == b.length && -+ a.entries.every( -+ (MapEntry entry) => -+ (b as Map).containsKey(entry.key) && -+ _deepEquals(entry.value, b[entry.key]), -+ ); - } - return a == b; - } - -- - /// Pigeon equivalent of MapType --enum PlatformMapType { -- none, -- normal, -- satellite, -- terrain, -- hybrid, --} -+enum PlatformMapType { none, normal, satellite, terrain, hybrid } - - /// Join types for polyline joints. --enum PlatformJointType { -- mitered, -- bevel, -- round, --} -+enum PlatformJointType { mitered, bevel, round } - - /// Enumeration of possible types for PatternItem. --enum PlatformPatternItemType { -- dot, -- dash, -- gap, --} -+enum PlatformPatternItemType { dot, dash, gap } - - /// Pigeon equivalent of [MapBitmapScaling]. --enum PlatformMapBitmapScaling { -- auto, -- none, --} -+enum PlatformMapBitmapScaling { auto, none } - - /// Pigeon representatation of a CameraPosition. - class PlatformCameraPosition { -@@ -2644,8 +2457,10 @@ class MapsApi { - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) -- : pigeonVar_binaryMessenger = binaryMessenger, -- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ : pigeonVar_binaryMessenger = binaryMessenger, -+ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); -@@ -2654,7 +2469,8 @@ class MapsApi { - - /// Returns once the map instance is available. - Future waitForMap() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -2679,14 +2495,19 @@ class MapsApi { - /// - /// Only non-null configuration values will result in updates; options with - /// null values will remain unchanged. -- Future updateMapConfiguration(PlatformMapConfiguration configuration) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration'; -+ Future updateMapConfiguration( -+ PlatformMapConfiguration configuration, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [configuration], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2702,14 +2523,21 @@ class MapsApi { - } - - /// Updates the set of circles on the map. -- Future updateCircles(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles'; -+ Future updateCircles( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2725,14 +2553,21 @@ class MapsApi { - } - - /// Updates the set of heatmaps on the map. -- Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps'; -+ Future updateHeatmaps( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2748,14 +2583,20 @@ class MapsApi { - } - - /// Updates the set of custer managers for clusters on the map. -- Future updateClusterManagers(List toAdd, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers'; -+ Future updateClusterManagers( -+ List toAdd, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2771,14 +2612,21 @@ class MapsApi { - } - - /// Updates the set of markers on the map. -- Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers'; -+ Future updateMarkers( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2794,14 +2642,21 @@ class MapsApi { - } - - /// Updates the set of polygonss on the map. -- Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons'; -+ Future updatePolygons( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2817,14 +2672,21 @@ class MapsApi { - } - - /// Updates the set of polylines on the map. -- Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines'; -+ Future updatePolylines( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2840,14 +2702,21 @@ class MapsApi { - } - - /// Updates the set of tile overlays on the map. -- Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays'; -+ Future updateTileOverlays( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2863,14 +2732,21 @@ class MapsApi { - } - - /// Updates the set of ground overlays on the map. -- Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays'; -+ Future updateGroundOverlays( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2887,13 +2763,16 @@ class MapsApi { - - /// Gets the screen coordinate for the given map location. - Future getScreenCoordinate(PlatformLatLng latLng) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [latLng], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2915,13 +2794,16 @@ class MapsApi { - - /// Gets the map location for the given screen coordinate. - Future getLatLng(PlatformPoint screenCoordinate) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [screenCoordinate], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2943,7 +2825,8 @@ class MapsApi { - - /// Gets the map region currently displayed on the map. - Future getVisibleRegion() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -2972,13 +2855,16 @@ class MapsApi { - /// Moves the camera according to [cameraUpdate] immediately, with no - /// animation. - Future moveCamera(PlatformCameraUpdate cameraUpdate) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [cameraUpdate], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2995,14 +2881,20 @@ class MapsApi { - - /// Moves the camera according to [cameraUpdate], animating the update using a - /// duration in milliseconds if provided. -- Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera'; -+ Future animateCamera( -+ PlatformCameraUpdate cameraUpdate, -+ int? durationMilliseconds, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [cameraUpdate, durationMilliseconds], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3019,7 +2911,8 @@ class MapsApi { - - /// Gets the current map zoom level. - Future getZoomLevel() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3047,13 +2940,16 @@ class MapsApi { - - /// Show the info window for the marker with the given ID. - Future showInfoWindow(String markerId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [markerId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3070,13 +2966,16 @@ class MapsApi { - - /// Hide the info window for the marker with the given ID. - Future hideInfoWindow(String markerId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [markerId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3094,13 +2993,16 @@ class MapsApi { - /// Returns true if the marker with the given ID is currently displaying its - /// info window. - Future isInfoWindowShown(String markerId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [markerId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3126,13 +3028,16 @@ class MapsApi { - /// If there was an error setting the style, such as an invalid style string, - /// returns the error message. - Future setStyle(String style) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [style], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3153,7 +3058,8 @@ class MapsApi { - /// This allows checking asynchronously for initial style failures, as there - /// is no way to return failures from map initialization. - Future getLastStyleError() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3176,13 +3082,16 @@ class MapsApi { - - /// Clears the cache of tiles previously requseted from the tile provider. - Future clearTileCache(String tileOverlayId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [tileOverlayId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3199,7 +3108,8 @@ class MapsApi { - - /// Takes a snapshot of the map and returns its image data. - Future takeSnapshot() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3274,14 +3184,26 @@ abstract class MapsCallbackApi { - void onPoiTap(PlatformPointOfInterest poi); - - /// Called to get data for a map tile. -- Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); -+ Future getTileOverlayTile( -+ String tileOverlayId, -+ PlatformPoint location, -+ int zoom, -+ ); - -- static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { -- messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ static void setUp( -+ MapsCallbackApi? api, { -+ BinaryMessenger? binaryMessenger, -+ String messageChannelSuffix = '', -+ }) { -+ messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - { - final pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { -@@ -3291,41 +3213,54 @@ 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.', -+ ); - final List args = (message as List?)!; -- final PlatformCameraPosition? arg_cameraPosition = (args[0] as PlatformCameraPosition?); -- assert(arg_cameraPosition != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.'); -+ final PlatformCameraPosition? arg_cameraPosition = -+ (args[0] as PlatformCameraPosition?); -+ assert( -+ arg_cameraPosition != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.', -+ ); - try { - api.onCameraMove(arg_cameraPosition!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { -@@ -3335,373 +3270,502 @@ 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.', -+ ); - final List args = (message as List?)!; - final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); -- assert(arg_position != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onTap(arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.', -+ ); - final List args = (message as List?)!; - final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); -- assert(arg_position != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onLongPress(arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.', -+ ); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); -- assert(arg_markerId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null, expected non-null String.', -+ ); - try { - api.onMarkerTap(arg_markerId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.', -+ ); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); -- assert(arg_markerId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.', -+ ); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); -- assert(arg_position != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onMarkerDragStart(arg_markerId!, arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.', -+ ); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); -- assert(arg_markerId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null String.', -+ ); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); -- assert(arg_position != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onMarkerDrag(arg_markerId!, arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.', -+ ); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); -- assert(arg_markerId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.', -+ ); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); -- assert(arg_position != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onMarkerDragEnd(arg_markerId!, arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.', -+ ); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); -- assert(arg_markerId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.', -+ ); - try { - api.onInfoWindowTap(arg_markerId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.', -+ ); - final List args = (message as List?)!; - final String? arg_circleId = (args[0] as String?); -- assert(arg_circleId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null, expected non-null String.'); -+ assert( -+ arg_circleId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null, expected non-null String.', -+ ); - try { - api.onCircleTap(arg_circleId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.', -+ ); - final List args = (message as List?)!; - final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); -- assert(arg_cluster != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); -+ assert( -+ arg_cluster != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.', -+ ); - try { - api.onClusterTap(arg_cluster!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.', -+ ); - final List args = (message as List?)!; - final String? arg_polygonId = (args[0] as String?); -- assert(arg_polygonId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); -+ assert( -+ arg_polygonId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null, expected non-null String.', -+ ); - try { - api.onPolygonTap(arg_polygonId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.', -+ ); - final List args = (message as List?)!; - final String? arg_polylineId = (args[0] as String?); -- assert(arg_polylineId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); -+ assert( -+ arg_polylineId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null, expected non-null String.', -+ ); - try { - api.onPolylineTap(arg_polylineId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.', -+ ); - final List args = (message as List?)!; - final String? arg_groundOverlayId = (args[0] as String?); -- assert(arg_groundOverlayId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); -+ assert( -+ arg_groundOverlayId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.', -+ ); - try { - api.onGroundOverlayTap(arg_groundOverlayId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.', -+ ); - final List args = (message as List?)!; -- final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); -- assert(arg_poi != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); -+ final PlatformPointOfInterest? arg_poi = -+ (args[0] as PlatformPointOfInterest?); -+ assert( -+ arg_poi != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.', -+ ); - try { - api.onPoiTap(arg_poi!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.', -+ ); - final List args = (message as List?)!; - final String? arg_tileOverlayId = (args[0] as String?); -- assert(arg_tileOverlayId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); -+ assert( -+ arg_tileOverlayId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.', -+ ); - final PlatformPoint? arg_location = (args[1] as PlatformPoint?); -- assert(arg_location != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); -+ assert( -+ arg_location != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.', -+ ); - final int? arg_zoom = (args[2] as int?); -- assert(arg_zoom != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); -+ assert( -+ arg_zoom != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.', -+ ); - try { -- final PlatformTile output = await api.getTileOverlayTile(arg_tileOverlayId!, arg_location!, arg_zoom!); -+ final PlatformTile output = await api.getTileOverlayTile( -+ arg_tileOverlayId!, -+ arg_location!, -+ arg_zoom!, -+ ); - return wrapResponse(result: output); - } on PlatformException catch (e) { - return wrapResponse(error: e); -- } catch (e) { -- return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); -+ } catch (e) { -+ return wrapResponse( -+ error: PlatformException(code: 'error', message: e.toString()), -+ ); - } - }); - } -@@ -3716,9 +3780,13 @@ 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 = ''}) -- : pigeonVar_binaryMessenger = binaryMessenger, -- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ MapsPlatformViewApi({ -+ BinaryMessenger? binaryMessenger, -+ String messageChannelSuffix = '', -+ }) : pigeonVar_binaryMessenger = binaryMessenger, -+ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); -@@ -3726,13 +3794,16 @@ class MapsPlatformViewApi { - final String pigeonVar_messageChannelSuffix; - - Future createView(PlatformMapViewCreationParams? type) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [type], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3753,9 +3824,13 @@ 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 = ''}) -- : pigeonVar_binaryMessenger = binaryMessenger, -- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ MapsInspectorApi({ -+ BinaryMessenger? binaryMessenger, -+ String messageChannelSuffix = '', -+ }) : pigeonVar_binaryMessenger = binaryMessenger, -+ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); -@@ -3763,7 +3838,8 @@ class MapsInspectorApi { - final String pigeonVar_messageChannelSuffix; - - Future areBuildingsEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3790,7 +3866,8 @@ class MapsInspectorApi { - } - - Future areRotateGesturesEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3817,7 +3894,8 @@ class MapsInspectorApi { - } - - Future areScrollGesturesEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3844,7 +3922,8 @@ class MapsInspectorApi { - } - - Future areTiltGesturesEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3871,7 +3950,8 @@ class MapsInspectorApi { - } - - Future areZoomGesturesEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3898,7 +3978,8 @@ class MapsInspectorApi { - } - - Future isCompassEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3925,7 +4006,8 @@ class MapsInspectorApi { - } - - Future isMyLocationButtonEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3952,7 +4034,8 @@ class MapsInspectorApi { - } - - Future isTrafficEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3979,13 +4062,16 @@ class MapsInspectorApi { - } - - Future getTileOverlayInfo(String tileOverlayId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [tileOverlayId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -4000,14 +4086,19 @@ class MapsInspectorApi { - } - } - -- Future getGroundOverlayInfo(String groundOverlayId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo'; -+ Future getGroundOverlayInfo( -+ String groundOverlayId, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [groundOverlayId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -4023,13 +4114,16 @@ class MapsInspectorApi { - } - - Future getHeatmapInfo(String heatmapId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([heatmapId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [heatmapId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -4045,7 +4139,8 @@ class MapsInspectorApi { - } - - Future getZoomRange() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4072,13 +4167,16 @@ class MapsInspectorApi { - } - - Future> getClusters(String clusterManagerId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [clusterManagerId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -4094,12 +4192,14 @@ class MapsInspectorApi { - message: 'Host platform returned null value for non-null return value.', - ); - } else { -- return (pigeonVar_replyList[0] as List?)!.cast(); -+ return (pigeonVar_replyList[0] as List?)! -+ .cast(); - } - } - - Future getCameraPosition() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, diff --git a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 69f8d7acc40b..000000000000 --- a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,13 +0,0 @@ -{ - "pins" : [ - { - "identity" : "ocmock", - "kind" : "remoteSourceControl", - "location" : "https://github.com/erikdoe/ocmock", - "state" : { - "revision" : "ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a" - } - } - ], - "version" : 2 -} diff --git a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 69f8d7acc40b..000000000000 --- a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,13 +0,0 @@ -{ - "pins" : [ - { - "identity" : "ocmock", - "kind" : "remoteSourceControl", - "location" : "https://github.com/erikdoe/ocmock", - "state" : { - "revision" : "ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a" - } - } - ], - "version" : 2 -} diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 69f8d7acc40b..000000000000 --- a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,13 +0,0 @@ -{ - "pins" : [ - { - "identity" : "ocmock", - "kind" : "remoteSourceControl", - "location" : "https://github.com/erikdoe/ocmock", - "state" : { - "revision" : "ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a" - } - } - ], - "version" : 2 -} diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 69f8d7acc40b..000000000000 --- a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,13 +0,0 @@ -{ - "pins" : [ - { - "identity" : "ocmock", - "kind" : "remoteSourceControl", - "location" : "https://github.com/erikdoe/ocmock", - "state" : { - "revision" : "ef21a2ece3ee092f8ed175417718bdd9b8eb7c9a" - } - } - ], - "version" : 2 -} From 9b17699c4621b88fb244dd60d7a25139d60129a3 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sun, 8 Feb 2026 21:05:29 +0530 Subject: [PATCH 34/46] [google_maps_flutter] implemented onPoiTap callback for all packages --- .../google_maps_flutter/CHANGELOG.md | 5 + .../google_maps_flutter/example/lib/main.dart | 2 + .../example/lib/place_poi.dart | 96 + .../google_maps_flutter/example/pubspec.yaml | 15 +- .../lib/google_maps_flutter.dart | 1 + .../lib/src/controller.dart | 5 + .../lib/src/google_map.dart | 10 + .../google_maps_flutter/pubspec.yaml | 19 +- .../fake_google_maps_flutter_platform.dart | 5 + .../test/google_map_test.dart | 37 + .../google_maps_flutter_android/CHANGELOG.md | 4 + .../googlemaps/GoogleMapController.java | 15 + .../flutter/plugins/googlemaps/Messages.java | 245 +- .../googlemaps/GoogleMapControllerTest.java | 22 + .../example/lib/example_google_map.dart | 14 + .../example/lib/example_google_map.dart.rej | 11 + .../example/lib/main.dart | 2 + .../example/lib/place_poi.dart | 96 + .../example/pubspec.yaml | 5 +- .../fake_google_maps_flutter_platform.dart | 5 + .../lib/src/google_maps_flutter_android.dart | 19 + .../lib/src/messages.g.dart | 186 +- .../lib/src/messages.g.dart.orig | 4548 +++++++++++++++++ .../lib/src/messages.g.dart.rej | 1574 ++++++ .../pigeons/messages.dart | 16 + .../google_maps_flutter_android/pubspec.yaml | 7 +- .../google_maps_flutter_android_test.dart | 31 + .../google_maps_flutter_ios/CHANGELOG.md | 4 +- .../example/lib/example_google_map.dart | 11 + .../example/pubspec.yaml | 5 +- .../example/test/example_google_map_test.dart | 32 + .../fake_google_maps_flutter_platform.dart | 5 + .../GoogleMapController.m | 14 + .../google_maps_flutter_pigeon_messages.g.m | 169 +- .../google_maps_flutter_pigeon_messages.g.h | 20 +- ...ogle_maps_flutter_pigeon_messages.g.h.orig | 901 ++++ ...oogle_maps_flutter_pigeon_messages.g.h.rej | 807 +++ .../lib/src/google_maps_flutter_ios.dart | 19 + .../lib/src/messages.g.dart | 186 +- .../lib/src/messages.g.dart.orig | 4301 ++++++++++++++++ .../lib/src/messages.g.dart.rej | 1496 ++++++ .../pigeons/messages.dart | 17 + .../google_maps_flutter_ios/pubspec.yaml | 7 +- .../test/google_maps_flutter_ios_test.dart | 34 + .../CHANGELOG.md | 1 - .../google_maps_flutter_web/CHANGELOG.md | 4 + .../example/integration_test/poi_test.dart | 103 + .../example/pubspec.yaml | 14 +- .../lib/src/google_maps_controller.dart | 24 +- .../lib/src/google_maps_flutter_web.dart | 5 + .../google_maps_flutter_web/pubspec.yaml | 7 +- 51 files changed, 14955 insertions(+), 226 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart.rej create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.orig create mode 100644 packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.rej create mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.orig create mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.rej create mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.orig create mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.rej create mode 100644 packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart diff --git a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md index b2c1be73c130..6579ae788e94 100644 --- a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.15.0 + +* Adds `onPoiTap` support to the `GoogleMap` widget to handle taps on base map landmarks and businesses. +* Adds a "Place POI" example to the example app. + ## 2.14.1 * Replaces internal use of deprecated methods. diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart index 2cee263eeba3..d47efa87a2bc 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/main.dart @@ -23,6 +23,7 @@ import 'padding.dart'; import 'page.dart'; import 'place_circle.dart'; import 'place_marker.dart'; +import 'place_poi.dart'; import 'place_polygon.dart'; import 'place_polyline.dart'; import 'scrolling_map.dart'; @@ -41,6 +42,7 @@ final List _allPages = [ const PlacePolylinePage(), const PlacePolygonPage(), const PlaceCirclePage(), + const PlacePoiPage(), const PaddingPage(), const SnapshotPage(), const LiteModePage(), diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart new file mode 100644 index 000000000000..fda0bab244cc --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart @@ -0,0 +1,96 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; + +import 'page.dart'; + +/// Page for demonstrating Point of Interest (POI) tapping. +class PlacePoiPage extends GoogleMapExampleAppPage { + /// Default constructor. + const PlacePoiPage({super.key}) + : super(const Icon(Icons.business), 'Place POI'); + + @override + Widget build(BuildContext context) { + return const PlacePoiBody(); + } +} + +/// Body of the POI page. +class PlacePoiBody extends StatefulWidget { + /// Default constructor. + const PlacePoiBody({super.key}); + + @override + State createState() => PlacePoiBodyState(); +} + +/// State for [PlacePoiBody]. +class PlacePoiBodyState extends State { + /// The controller for the map. + /// + /// This is public to match the example pattern, but marked with a doc comment. + GoogleMapController? controller; + PointOfInterest? _lastPoi; + + final CameraPosition _kKolkata = const CameraPosition( + target: LatLng(22.54222641620606, 88.34560669761545), + zoom: 16.0, + ); + + // ignore: use_setters_to_change_properties + void _onMapCreated(GoogleMapController controller) { + this.controller = controller; + } + + void _onPoiTap(PointOfInterest poi) { + setState(() { + _lastPoi = poi; + }); + + controller?.animateCamera(CameraUpdate.newLatLng(poi.position)); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Expanded( + child: GoogleMap( + onMapCreated: _onMapCreated, + initialCameraPosition: _kKolkata, + onPoiTap: _onPoiTap, + myLocationButtonEnabled: false, + ), + ), + Container( + color: Colors.white, + width: double.infinity, + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + const Text( + 'Last Tapped POI:', + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16), + ), + const SizedBox(height: 8), + if (_lastPoi != null) ...[ + Text('Name: ${_lastPoi!.name ?? "Unknown"}'), + Text('Place ID: ${_lastPoi!.placeId}'), + Text( + 'Lat/Lng: ${_lastPoi!.position.latitude.toStringAsFixed(5)}, ${_lastPoi!.position.longitude.toStringAsFixed(5)}', + ), + ] else + const Text('Tap on a business or landmark icon...'), + ], + ), + ), + ], + ); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml index 0e002e4f535a..f0ad9085874d 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml @@ -18,8 +18,8 @@ dependencies: # The example app is bundled with the plugin so we use a path dependency on # the parent directory to use the current plugin's version. path: ../ - google_maps_flutter_android: ^2.16.1 - google_maps_flutter_platform_interface: ^2.14.0 + google_maps_flutter_android: ^2.19.0 + google_maps_flutter_platform_interface: ^2.15.0 dev_dependencies: build_runner: ^2.1.10 @@ -33,3 +33,14 @@ flutter: uses-material-design: true assets: - assets/ +dependency_overrides: + google_maps_flutter: + path: ../ + google_maps_flutter_android: + path: ../../google_maps_flutter_android + google_maps_flutter_ios: + path: ../../google_maps_flutter_ios + google_maps_flutter_platform_interface: + path: ../../google_maps_flutter_platform_interface + google_maps_flutter_web: + path: ../../google_maps_flutter_web diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart index 7ca650dceb75..470469d73a68 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart @@ -47,6 +47,7 @@ export 'package:google_maps_flutter_platform_interface/google_maps_flutter_platf MarkerId, MinMaxZoomPreference, PatternItem, + PointOfInterest, Polygon, PolygonId, Polyline, diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/controller.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/controller.dart index 80f019d5a006..64aaec30660e 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/controller.dart @@ -99,6 +99,11 @@ class GoogleMapController { (InfoWindowTapEvent e) => _googleMapState.onInfoWindowTap(e.value), ), ); + _streamSubscriptions.add( + GoogleMapsFlutterPlatform.instance + .onPoiTap(mapId: mapId) + .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)), + ); _streamSubscriptions.add( GoogleMapsFlutterPlatform.instance .onPolylineTap(mapId: mapId) diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index 627efae290de..0ea1af487e7f 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -133,6 +133,7 @@ class GoogleMap extends StatefulWidget { this.onCameraIdle, this.onTap, this.onLongPress, + this.onPoiTap, this.cloudMapId, }); @@ -235,6 +236,9 @@ class GoogleMap extends StatefulWidget { /// See https://pub.dev/packages/google_maps_flutter_web. final Set clusterManagers; + /// Callback for Point of Interests tap + final ArgumentCallback? onPoiTap; + /// Ground overlays to be initialized for the map. /// /// Support table for Ground Overlay features: @@ -612,6 +616,12 @@ class _GoogleMapState extends State { } } + void onPoiTap(PointOfInterest poi) { + if (widget.onPoiTap != null) { + widget.onPoiTap!(poi); + } + } + void onPolygonTap(PolygonId polygonId) { final Polygon? polygon = _polygons[polygonId]; if (polygon == null) { diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index d928fb3b21f5..6611d559a096 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter description: A Flutter plugin for integrating Google Maps in iOS and Android applications. repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 2.14.1 +version: 2.15.0 environment: sdk: ^3.8.0 @@ -21,10 +21,10 @@ flutter: dependencies: flutter: sdk: flutter - google_maps_flutter_android: ^2.16.1 - google_maps_flutter_ios: ^2.15.4 - google_maps_flutter_platform_interface: ^2.14.0 - google_maps_flutter_web: ^0.5.14 + google_maps_flutter_android: ^2.19.0 + google_maps_flutter_ios: ^2.18.0 + google_maps_flutter_platform_interface: ^2.15.0 + google_maps_flutter_web: ^0.6.0 dev_dependencies: flutter_test: @@ -41,3 +41,12 @@ topics: # The example deliberately includes limited-use secrets. false_secrets: - /example/web/index.html +dependency_overrides: + google_maps_flutter_android: + path: ../google_maps_flutter_android + google_maps_flutter_ios: + path: ../google_maps_flutter_ios + google_maps_flutter_platform_interface: + path: ../google_maps_flutter_platform_interface + google_maps_flutter_web: + path: ../google_maps_flutter_web diff --git a/packages/google_maps_flutter/google_maps_flutter/test/fake_google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter/test/fake_google_maps_flutter_platform.dart index fe0439d6c69d..e1c8b29b46a6 100644 --- a/packages/google_maps_flutter/google_maps_flutter/test/fake_google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter/test/fake_google_maps_flutter_platform.dart @@ -280,6 +280,11 @@ class FakeGoogleMapsFlutterPlatform extends GoogleMapsFlutterPlatform { return mapEventStreamController.stream.whereType(); } + @override + Stream onPoiTap({required int mapId}) { + return mapEventStreamController.stream.whereType(); + } + @override Stream onLongPress({required int mapId}) { return mapEventStreamController.stream.whereType(); diff --git a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart index 4aedfdbb78f8..e7ddf1b73f36 100644 --- a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart @@ -659,4 +659,41 @@ void main() { expect(map.tileOverlaySets.length, 1); }); + + testWidgets('onPoiTap callback is called', (WidgetTester tester) async { + PointOfInterest? tappedPoi; + final mapCreatedCompleter = Completer(); + + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: GoogleMap( + initialCameraPosition: const CameraPosition(target: LatLng(0, 0)), + onPoiTap: (PointOfInterest poi) => tappedPoi = poi, + onMapCreated: (_) => mapCreatedCompleter.complete(), + ), + ), + ); + + // Wait for the map to be fully initialized in the fake platform. + await mapCreatedCompleter.future; + + // Use the top-level 'platform' variable instead of redeclaring it. + const poi = PointOfInterest( + position: LatLng(10.0, 10.0), + name: 'Test POI', + placeId: 'test_id_123', + ); + + // Inject the event into the fake platform's stream. + // mapId 0 is used as it's the first map created in the test. + platform.mapEventStreamController.add(MapPoiTapEvent(0, poi)); + + // Allow the stream and callback to process. + await tester.pump(); + + expect(tappedPoi, poi); + expect(tappedPoi!.name, 'Test POI'); + expect(tappedPoi!.placeId, 'test_id_123'); + }); } 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 21b41d813f9b..ad76f7545c97 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.19.0 + +* Implements `onPoiTap` support for Android using `OnPoiClickListener`. + ## 2.18.12 * Bumps com.google.maps.android:android-maps-utils from 3.20.1 to 4.0.0. diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java index bd87c923ccea..30f0bd240cc9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java @@ -37,6 +37,7 @@ import com.google.android.gms.maps.model.LatLngBounds; import com.google.android.gms.maps.model.MapStyleOptions; import com.google.android.gms.maps.model.Marker; +import com.google.android.gms.maps.model.PointOfInterest; import com.google.android.gms.maps.model.Polygon; import com.google.android.gms.maps.model.Polyline; import com.google.android.gms.maps.model.TileOverlay; @@ -67,6 +68,7 @@ class GoogleMapController MapsApi, MapsInspectorApi, OnMapReadyCallback, + GoogleMap.OnPoiClickListener, PlatformView { private static final String TAG = "GoogleMapController"; @@ -200,6 +202,7 @@ public void onMapReady(@NonNull GoogleMap googleMap) { this.googleMap.setIndoorEnabled(this.indoorEnabled); this.googleMap.setTrafficEnabled(this.trafficEnabled); this.googleMap.setBuildingsEnabled(this.buildingsEnabled); + this.googleMap.setOnPoiClickListener(this); installInvalidator(); if (mapReadyResult != null) { mapReadyResult.success(); @@ -363,6 +366,18 @@ public void onMarkerDragEnd(Marker marker) { markersController.onMarkerDragEnd(marker.getId(), marker.getPosition()); } + @Override + public void onPoiClick(PointOfInterest poi) { + Messages.PlatformPointOfInterest platformPoi = + new Messages.PlatformPointOfInterest.Builder() + .setPosition(Convert.latLngToPigeon(poi.latLng)) + .setName(poi.name) + .setPlaceId(poi.placeId) + .build(); + + flutterApi.onPoiTap(platformPoi, new NoOpVoidResult()); + } + @Override public void onPolygonClick(Polygon polygon) { polygonsController.onPolygonTap(polygon.getId()); 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 f8d44e8c4bf9..dd44bc42a157 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.5), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon package io.flutter.plugins.googlemaps; @@ -2510,6 +2510,126 @@ ArrayList toList() { } } + /** + * Pigeon equivalent of the Point of Interest class. + * + *

Generated class from Pigeon that represents data sent in messages. + */ + public static final class PlatformPointOfInterest { + private @NonNull PlatformLatLng position; + + public @NonNull PlatformLatLng getPosition() { + return position; + } + + public void setPosition(@NonNull PlatformLatLng setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"position\" is null."); + } + this.position = setterArg; + } + + private @Nullable String name; + + public @Nullable String getName() { + return name; + } + + public void setName(@Nullable String setterArg) { + this.name = setterArg; + } + + private @NonNull String placeId; + + public @NonNull String getPlaceId() { + return placeId; + } + + public void setPlaceId(@NonNull String setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"placeId\" is null."); + } + this.placeId = setterArg; + } + + /** Constructor is non-public to enforce null safety; use Builder. */ + PlatformPointOfInterest() {} + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformPointOfInterest that = (PlatformPointOfInterest) o; + return position.equals(that.position) + && Objects.equals(name, that.name) + && placeId.equals(that.placeId); + } + + @Override + public int hashCode() { + return Objects.hash(position, name, placeId); + } + + public static final class Builder { + + private @Nullable PlatformLatLng position; + + @CanIgnoreReturnValue + public @NonNull Builder setPosition(@NonNull PlatformLatLng setterArg) { + this.position = setterArg; + return this; + } + + private @Nullable String name; + + @CanIgnoreReturnValue + public @NonNull Builder setName(@Nullable String setterArg) { + this.name = setterArg; + return this; + } + + private @Nullable String placeId; + + @CanIgnoreReturnValue + public @NonNull Builder setPlaceId(@NonNull String setterArg) { + this.placeId = setterArg; + return this; + } + + public @NonNull PlatformPointOfInterest build() { + PlatformPointOfInterest pigeonReturn = new PlatformPointOfInterest(); + pigeonReturn.setPosition(position); + pigeonReturn.setName(name); + pigeonReturn.setPlaceId(placeId); + return pigeonReturn; + } + } + + @NonNull + ArrayList toList() { + ArrayList toListResult = new ArrayList<>(3); + toListResult.add(position); + toListResult.add(name); + toListResult.add(placeId); + return toListResult; + } + + static @NonNull PlatformPointOfInterest fromList(@NonNull ArrayList pigeonVar_list) { + PlatformPointOfInterest pigeonResult = new PlatformPointOfInterest(); + Object position = pigeonVar_list.get(0); + pigeonResult.setPosition((PlatformLatLng) position); + Object name = pigeonVar_list.get(1); + pigeonResult.setName((String) name); + Object placeId = pigeonVar_list.get(2); + pigeonResult.setPlaceId((String) placeId); + return pigeonResult; + } + } + /** * Pigeon equivalent of the Polygon class. * @@ -6700,52 +6820,54 @@ protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { case (byte) 153: return PlatformMarker.fromList((ArrayList) readValue(buffer)); case (byte) 154: - return PlatformPolygon.fromList((ArrayList) readValue(buffer)); + return PlatformPointOfInterest.fromList((ArrayList) readValue(buffer)); case (byte) 155: - return PlatformPolyline.fromList((ArrayList) readValue(buffer)); + return PlatformPolygon.fromList((ArrayList) readValue(buffer)); case (byte) 156: - return PlatformCap.fromList((ArrayList) readValue(buffer)); + return PlatformPolyline.fromList((ArrayList) readValue(buffer)); case (byte) 157: - return PlatformPatternItem.fromList((ArrayList) readValue(buffer)); + return PlatformCap.fromList((ArrayList) readValue(buffer)); case (byte) 158: - return PlatformTile.fromList((ArrayList) readValue(buffer)); + return PlatformPatternItem.fromList((ArrayList) readValue(buffer)); case (byte) 159: - return PlatformTileOverlay.fromList((ArrayList) readValue(buffer)); + return PlatformTile.fromList((ArrayList) readValue(buffer)); case (byte) 160: - return PlatformEdgeInsets.fromList((ArrayList) readValue(buffer)); + return PlatformTileOverlay.fromList((ArrayList) readValue(buffer)); case (byte) 161: - return PlatformLatLng.fromList((ArrayList) readValue(buffer)); + return PlatformEdgeInsets.fromList((ArrayList) readValue(buffer)); case (byte) 162: - return PlatformLatLngBounds.fromList((ArrayList) readValue(buffer)); + return PlatformLatLng.fromList((ArrayList) readValue(buffer)); case (byte) 163: - return PlatformCluster.fromList((ArrayList) readValue(buffer)); + return PlatformLatLngBounds.fromList((ArrayList) readValue(buffer)); case (byte) 164: - return PlatformGroundOverlay.fromList((ArrayList) readValue(buffer)); + return PlatformCluster.fromList((ArrayList) readValue(buffer)); case (byte) 165: - return PlatformCameraTargetBounds.fromList((ArrayList) readValue(buffer)); + return PlatformGroundOverlay.fromList((ArrayList) readValue(buffer)); case (byte) 166: - return PlatformMapViewCreationParams.fromList((ArrayList) readValue(buffer)); + return PlatformCameraTargetBounds.fromList((ArrayList) readValue(buffer)); case (byte) 167: - return PlatformMapConfiguration.fromList((ArrayList) readValue(buffer)); + return PlatformMapViewCreationParams.fromList((ArrayList) readValue(buffer)); case (byte) 168: - return PlatformPoint.fromList((ArrayList) readValue(buffer)); + return PlatformMapConfiguration.fromList((ArrayList) readValue(buffer)); case (byte) 169: - return PlatformTileLayer.fromList((ArrayList) readValue(buffer)); + return PlatformPoint.fromList((ArrayList) readValue(buffer)); case (byte) 170: - return PlatformZoomRange.fromList((ArrayList) readValue(buffer)); + return PlatformTileLayer.fromList((ArrayList) readValue(buffer)); case (byte) 171: - return PlatformBitmap.fromList((ArrayList) readValue(buffer)); + return PlatformZoomRange.fromList((ArrayList) readValue(buffer)); case (byte) 172: - return PlatformBitmapDefaultMarker.fromList((ArrayList) readValue(buffer)); + return PlatformBitmap.fromList((ArrayList) readValue(buffer)); case (byte) 173: - return PlatformBitmapBytes.fromList((ArrayList) readValue(buffer)); + return PlatformBitmapDefaultMarker.fromList((ArrayList) readValue(buffer)); case (byte) 174: - return PlatformBitmapAsset.fromList((ArrayList) readValue(buffer)); + return PlatformBitmapBytes.fromList((ArrayList) readValue(buffer)); case (byte) 175: - return PlatformBitmapAssetImage.fromList((ArrayList) readValue(buffer)); + return PlatformBitmapAsset.fromList((ArrayList) readValue(buffer)); case (byte) 176: - return PlatformBitmapAssetMap.fromList((ArrayList) readValue(buffer)); + return PlatformBitmapAssetImage.fromList((ArrayList) readValue(buffer)); case (byte) 177: + return PlatformBitmapAssetMap.fromList((ArrayList) readValue(buffer)); + case (byte) 178: return PlatformBitmapBytesMap.fromList((ArrayList) readValue(buffer)); default: return super.readValueOfType(type, buffer); @@ -6829,77 +6951,80 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) { } else if (value instanceof PlatformMarker) { stream.write(153); writeValue(stream, ((PlatformMarker) value).toList()); - } else if (value instanceof PlatformPolygon) { + } else if (value instanceof PlatformPointOfInterest) { stream.write(154); + writeValue(stream, ((PlatformPointOfInterest) value).toList()); + } else if (value instanceof PlatformPolygon) { + stream.write(155); writeValue(stream, ((PlatformPolygon) value).toList()); } else if (value instanceof PlatformPolyline) { - stream.write(155); + stream.write(156); writeValue(stream, ((PlatformPolyline) value).toList()); } else if (value instanceof PlatformCap) { - stream.write(156); + stream.write(157); writeValue(stream, ((PlatformCap) value).toList()); } else if (value instanceof PlatformPatternItem) { - stream.write(157); + stream.write(158); writeValue(stream, ((PlatformPatternItem) value).toList()); } else if (value instanceof PlatformTile) { - stream.write(158); + stream.write(159); writeValue(stream, ((PlatformTile) value).toList()); } else if (value instanceof PlatformTileOverlay) { - stream.write(159); + stream.write(160); writeValue(stream, ((PlatformTileOverlay) value).toList()); } else if (value instanceof PlatformEdgeInsets) { - stream.write(160); + stream.write(161); writeValue(stream, ((PlatformEdgeInsets) value).toList()); } else if (value instanceof PlatformLatLng) { - stream.write(161); + stream.write(162); writeValue(stream, ((PlatformLatLng) value).toList()); } else if (value instanceof PlatformLatLngBounds) { - stream.write(162); + stream.write(163); writeValue(stream, ((PlatformLatLngBounds) value).toList()); } else if (value instanceof PlatformCluster) { - stream.write(163); + stream.write(164); writeValue(stream, ((PlatformCluster) value).toList()); } else if (value instanceof PlatformGroundOverlay) { - stream.write(164); + stream.write(165); writeValue(stream, ((PlatformGroundOverlay) value).toList()); } else if (value instanceof PlatformCameraTargetBounds) { - stream.write(165); + stream.write(166); writeValue(stream, ((PlatformCameraTargetBounds) value).toList()); } else if (value instanceof PlatformMapViewCreationParams) { - stream.write(166); + stream.write(167); writeValue(stream, ((PlatformMapViewCreationParams) value).toList()); } else if (value instanceof PlatformMapConfiguration) { - stream.write(167); + stream.write(168); writeValue(stream, ((PlatformMapConfiguration) value).toList()); } else if (value instanceof PlatformPoint) { - stream.write(168); + stream.write(169); writeValue(stream, ((PlatformPoint) value).toList()); } else if (value instanceof PlatformTileLayer) { - stream.write(169); + stream.write(170); writeValue(stream, ((PlatformTileLayer) value).toList()); } else if (value instanceof PlatformZoomRange) { - stream.write(170); + stream.write(171); writeValue(stream, ((PlatformZoomRange) value).toList()); } else if (value instanceof PlatformBitmap) { - stream.write(171); + stream.write(172); writeValue(stream, ((PlatformBitmap) value).toList()); } else if (value instanceof PlatformBitmapDefaultMarker) { - stream.write(172); + stream.write(173); writeValue(stream, ((PlatformBitmapDefaultMarker) value).toList()); } else if (value instanceof PlatformBitmapBytes) { - stream.write(173); + stream.write(174); writeValue(stream, ((PlatformBitmapBytes) value).toList()); } else if (value instanceof PlatformBitmapAsset) { - stream.write(174); + stream.write(175); writeValue(stream, ((PlatformBitmapAsset) value).toList()); } else if (value instanceof PlatformBitmapAssetImage) { - stream.write(175); + stream.write(176); writeValue(stream, ((PlatformBitmapAssetImage) value).toList()); } else if (value instanceof PlatformBitmapAssetMap) { - stream.write(176); + stream.write(177); writeValue(stream, ((PlatformBitmapAssetMap) value).toList()); } else if (value instanceof PlatformBitmapBytesMap) { - stream.write(177); + stream.write(178); writeValue(stream, ((PlatformBitmapBytesMap) value).toList()); } else { super.writeValue(stream, value); @@ -7963,6 +8088,30 @@ public void onClusterTap(@NonNull PlatformCluster clusterArg, @NonNull VoidResul } }); } + /** Called when a POI is tapped. */ + public void onPoiTap(@NonNull PlatformPointOfInterest poiArg, @NonNull VoidResult result) { + final String channelName = + "dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap" + + messageChannelSuffix; + BasicMessageChannel channel = + new BasicMessageChannel<>(binaryMessenger, channelName, getCodec()); + channel.send( + new ArrayList<>(Collections.singletonList(poiArg)), + channelReply -> { + if (channelReply instanceof List) { + List listReply = (List) channelReply; + if (listReply.size() > 1) { + result.error( + new FlutterError( + (String) listReply.get(0), (String) listReply.get(1), listReply.get(2))); + } else { + result.success(); + } + } else { + result.error(createConnectionError(channelName)); + } + }); + } /** Called when a polygon is tapped. */ public void onPolygonTap(@NonNull String polygonIdArg, @NonNull VoidResult result) { final String channelName = diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java index d2339531eba1..8bb8d59da545 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java @@ -4,6 +4,7 @@ package io.flutter.plugins.googlemaps; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.mockito.ArgumentMatchers.any; @@ -26,6 +27,7 @@ import com.google.android.gms.maps.model.CameraPosition; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.Marker; +import com.google.android.gms.maps.model.PointOfInterest; import com.google.maps.android.clustering.ClusterManager; import io.flutter.plugin.common.BinaryMessenger; import java.util.ArrayList; @@ -35,6 +37,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockedStatic; import org.mockito.MockitoAnnotations; @@ -317,4 +320,23 @@ public void getCameraPositionReturnsCorrectData() { Assert.assertEquals(cameraPosition.tilt, result.getTilt(), 1e-15); Assert.assertEquals(cameraPosition.bearing, result.getBearing(), 1e-15); } + + @Test + public void onPoiClick() { + GoogleMapController controller = getGoogleMapControllerWithMockedDependencies(); + PointOfInterest poi = new PointOfInterest(new LatLng(1.0, 2.0), "placeId", "name"); + + controller.onPoiClick(poi); + + ArgumentCaptor poiCaptor = + ArgumentCaptor.forClass(Messages.PlatformPointOfInterest.class); + + verify(flutterApi).onPoiTap(poiCaptor.capture(), any(Messages.VoidResult.class)); + + Messages.PlatformPointOfInterest capturedPoi = poiCaptor.getValue(); + assertEquals("name", capturedPoi.getName()); + assertEquals("placeId", capturedPoi.getPlaceId()); + assertEquals(1.0, capturedPoi.getPosition().getLatitude(), 1e-6); + assertEquals(2.0, capturedPoi.getPosition().getLongitude(), 1e-6); + } } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart index 518304c93fd9..1404a4b4049c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart @@ -83,6 +83,9 @@ class ExampleGoogleMapController { .listen( (InfoWindowTapEvent e) => _googleMapState.onInfoWindowTap(e.value), ); + GoogleMapsFlutterPlatform.instance + .onPoiTap(mapId: mapId) + .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)); GoogleMapsFlutterPlatform.instance .onPolylineTap(mapId: mapId) .listen((PolylineTapEvent e) => _googleMapState.onPolylineTap(e.value)); @@ -101,6 +104,9 @@ class ExampleGoogleMapController { GoogleMapsFlutterPlatform.instance .onTap(mapId: mapId) .listen((MapTapEvent e) => _googleMapState.onTap(e.position)); + GoogleMapsFlutterPlatform.instance + .onPoiTap(mapId: mapId) + .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)); GoogleMapsFlutterPlatform.instance .onLongPress(mapId: mapId) .listen( @@ -307,6 +313,7 @@ class ExampleGoogleMap extends StatefulWidget { this.markers = const {}, this.polygons = const {}, this.polylines = const {}, + this.onPoiTap, this.circles = const {}, this.clusterManagers = const {}, this.onCameraMoveStarted, @@ -379,6 +386,9 @@ class ExampleGoogleMap extends StatefulWidget { /// Polylines to be placed on the map. final Set polylines; + ///Point of Interest Callback + final ArgumentCallback? onPoiTap; + /// Circles to be placed on the map. final Set circles; @@ -648,6 +658,10 @@ class _ExampleGoogleMapState extends State { widget.onTap?.call(position); } + void onPoiTap(PointOfInterest pointOfInterest) { + widget.onPoiTap?.call(pointOfInterest); + } + void onLongPress(LatLng position) { widget.onLongPress?.call(position); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart.rej b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart.rej new file mode 100644 index 000000000000..b2d158e95efb --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart.rej @@ -0,0 +1,11 @@ +--- packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart ++++ packages/google_maps_flutter/google_maps_flutter_android/example/lib/example_google_map.dart +@@ -104,7 +104,7 @@ class ExampleGoogleMapController { + GoogleMapsFlutterPlatform.instance + .onTap(mapId: mapId) + .listen((MapTapEvent e) => _googleMapState.onTap(e.position)); +- GoogleMapsFlutterPlatform.instance ++ GoogleMapsFlutterPlatform.instance + .onPoiTap(mapId: mapId) + .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)); + GoogleMapsFlutterPlatform.instance diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart index f7b60568657c..b074218a0529 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/main.dart @@ -22,6 +22,7 @@ import 'padding.dart'; import 'page.dart'; import 'place_circle.dart'; import 'place_marker.dart'; +import 'place_poi.dart'; import 'place_polygon.dart'; import 'place_polyline.dart'; import 'scrolling_map.dart'; @@ -40,6 +41,7 @@ final List _allPages = [ const PlacePolylinePage(), const PlacePolygonPage(), const PlaceCirclePage(), + const PlacePoiPage(), const PaddingPage(), const SnapshotPage(), const LiteModePage(), diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart new file mode 100644 index 000000000000..4d1f8cf553cf --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart @@ -0,0 +1,96 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; + +// ignore: prefer_relative_imports +import 'example_google_map.dart'; +import 'page.dart'; + +/// Page for demonstrating Point of Interest (POI) tapping. +class PlacePoiPage extends GoogleMapExampleAppPage { + /// Default constructor. + const PlacePoiPage({super.key}) + : super(const Icon(Icons.business), 'Place POI'); + + @override + Widget build(BuildContext context) { + return const PlacePoiBody(); + } +} + +/// Body of the POI page. +class PlacePoiBody extends StatefulWidget { + /// Default constructor. + const PlacePoiBody({super.key}); + + @override + State createState() => PlacePoiBodyState(); +} + +/// State for [PlacePoiBody]. +class PlacePoiBodyState extends State { + /// The controller for the map. + ExampleGoogleMapController? controller; + PointOfInterest? _lastPoi; + + final CameraPosition _kKolkata = const CameraPosition( + target: LatLng(22.54222641620606, 88.34560669761545), + zoom: 16.0, + ); + + // ignore: use_setters_to_change_properties + void _onMapCreated(ExampleGoogleMapController controller) { + this.controller = controller; + } + + void _onPoiTap(PointOfInterest poi) { + setState(() { + _lastPoi = poi; + }); + + controller?.animateCamera(CameraUpdate.newLatLng(poi.position)); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Expanded( + child: ExampleGoogleMap( + onMapCreated: _onMapCreated, + initialCameraPosition: _kKolkata, + onPoiTap: _onPoiTap, + myLocationButtonEnabled: false, + ), + ), + Container( + color: Colors.white, + width: double.infinity, + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + const Text( + 'Last Tapped POI:', + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16), + ), + const SizedBox(height: 8), + if (_lastPoi != null) ...[ + Text('Name: ${_lastPoi!.name ?? "Unknown"}'), + Text('Place ID: ${_lastPoi!.placeId}'), + Text( + 'Lat/Lng: ${_lastPoi!.position.latitude.toStringAsFixed(5)}, ${_lastPoi!.position.longitude.toStringAsFixed(5)}', + ), + ] else + const Text('Tap on a business or landmark icon...'), + ], + ), + ), + ], + ); + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml index 58cec3dcf1a5..ba52ecaa2f46 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: # The example app is bundled with the plugin so we use a path dependency on # the parent directory to use the current plugin's version. path: ../ - google_maps_flutter_platform_interface: ^2.13.0 + google_maps_flutter_platform_interface: ^2.15.0 dev_dependencies: build_runner: ^2.1.10 @@ -33,3 +33,6 @@ flutter: uses-material-design: true assets: - assets/ +dependency_overrides: + google_maps_flutter_platform_interface: + path: ../../google_maps_flutter_platform_interface diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/test/fake_google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/test/fake_google_maps_flutter_platform.dart index a589658f5c6e..148e1406c481 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/test/fake_google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/test/fake_google_maps_flutter_platform.dart @@ -234,6 +234,11 @@ class FakeGoogleMapsFlutterPlatform extends GoogleMapsFlutterPlatform { return mapEventStreamController.stream.whereType(); } + @override + Stream onPoiTap({required int mapId}) { + return mapEventStreamController.stream.whereType(); + } + @override Stream onPolylineTap({required int mapId}) { return mapEventStreamController.stream.whereType(); 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 b371e7a3a1f6..35b3440fbde1 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 @@ -228,6 +228,11 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { return _events(mapId).whereType(); } + @override + Stream onPoiTap({required int mapId}) { + return _events(mapId).whereType(); + } + @override Future updateMapConfiguration( MapConfiguration configuration, { @@ -1257,6 +1262,20 @@ class HostMapMessageHandler implements MapsCallbackApi { streamController.add(MarkerTapEvent(mapId, MarkerId(markerId))); } + @override + void onPoiTap(PlatformPointOfInterest poi) { + streamController.add( + MapPoiTapEvent( + mapId, + PointOfInterest( + position: LatLng(poi.position.latitude, poi.position.longitude), + name: poi.name, + placeId: poi.placeId, + ), + ), + ); + } + @override void onPolygonTap(String polygonId) { streamController.add(PolygonTapEvent(mapId, PolygonId(polygonId))); 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 ba5674412009..62c8297478fb 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.5), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -977,6 +977,54 @@ class PlatformMarker { int get hashCode => Object.hashAll(_toList()); } +/// Pigeon equivalent of the Point of Interest class. +class PlatformPointOfInterest { + PlatformPointOfInterest({ + required this.position, + this.name, + required this.placeId, + }); + + PlatformLatLng position; + + String? name; + + String placeId; + + List _toList() { + return [position, name, placeId]; + } + + Object encode() { + return _toList(); + } + + static PlatformPointOfInterest decode(Object result) { + result as List; + return PlatformPointOfInterest( + position: result[0]! as PlatformLatLng, + name: result[1] as String?, + placeId: result[2]! as String, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPointOfInterest || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); +} + /// Pigeon equivalent of the Polygon class. class PlatformPolygon { PlatformPolygon({ @@ -2460,78 +2508,81 @@ class _PigeonCodec extends StandardMessageCodec { } else if (value is PlatformMarker) { buffer.putUint8(153); writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { + } else if (value is PlatformPointOfInterest) { buffer.putUint8(154); writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { + } else if (value is PlatformPolygon) { buffer.putUint8(155); writeValue(buffer, value.encode()); - } else if (value is PlatformCap) { + } else if (value is PlatformPolyline) { buffer.putUint8(156); writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { + } else if (value is PlatformCap) { buffer.putUint8(157); writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { + } else if (value is PlatformPatternItem) { buffer.putUint8(158); writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { + } else if (value is PlatformTile) { buffer.putUint8(159); writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { + } else if (value is PlatformTileOverlay) { buffer.putUint8(160); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { + } else if (value is PlatformEdgeInsets) { buffer.putUint8(161); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { + } else if (value is PlatformLatLng) { buffer.putUint8(162); writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { + } else if (value is PlatformLatLngBounds) { buffer.putUint8(163); writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { + } else if (value is PlatformCluster) { buffer.putUint8(164); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { + } else if (value is PlatformGroundOverlay) { buffer.putUint8(165); writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { + } else if (value is PlatformCameraTargetBounds) { buffer.putUint8(166); writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { + } else if (value is PlatformMapViewCreationParams) { buffer.putUint8(167); writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { + } else if (value is PlatformMapConfiguration) { buffer.putUint8(168); writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { + } else if (value is PlatformPoint) { buffer.putUint8(169); writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { + } else if (value is PlatformTileLayer) { buffer.putUint8(170); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { + } else if (value is PlatformZoomRange) { buffer.putUint8(171); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { + } else if (value is PlatformBitmap) { buffer.putUint8(172); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { + } else if (value is PlatformBitmapDefaultMarker) { buffer.putUint8(173); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { + } else if (value is PlatformBitmapBytes) { buffer.putUint8(174); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { + } else if (value is PlatformBitmapAsset) { buffer.putUint8(175); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { + } else if (value is PlatformBitmapAssetImage) { buffer.putUint8(176); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { + } else if (value is PlatformBitmapAssetMap) { buffer.putUint8(177); writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapBytesMap) { + buffer.putUint8(178); + writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); } @@ -2597,52 +2648,54 @@ class _PigeonCodec extends StandardMessageCodec { case 153: return PlatformMarker.decode(readValue(buffer)!); case 154: - return PlatformPolygon.decode(readValue(buffer)!); + return PlatformPointOfInterest.decode(readValue(buffer)!); case 155: - return PlatformPolyline.decode(readValue(buffer)!); + return PlatformPolygon.decode(readValue(buffer)!); case 156: - return PlatformCap.decode(readValue(buffer)!); + return PlatformPolyline.decode(readValue(buffer)!); case 157: - return PlatformPatternItem.decode(readValue(buffer)!); + return PlatformCap.decode(readValue(buffer)!); case 158: - return PlatformTile.decode(readValue(buffer)!); + return PlatformPatternItem.decode(readValue(buffer)!); case 159: - return PlatformTileOverlay.decode(readValue(buffer)!); + return PlatformTile.decode(readValue(buffer)!); case 160: - return PlatformEdgeInsets.decode(readValue(buffer)!); + return PlatformTileOverlay.decode(readValue(buffer)!); case 161: - return PlatformLatLng.decode(readValue(buffer)!); + return PlatformEdgeInsets.decode(readValue(buffer)!); case 162: - return PlatformLatLngBounds.decode(readValue(buffer)!); + return PlatformLatLng.decode(readValue(buffer)!); case 163: - return PlatformCluster.decode(readValue(buffer)!); + return PlatformLatLngBounds.decode(readValue(buffer)!); case 164: - return PlatformGroundOverlay.decode(readValue(buffer)!); + return PlatformCluster.decode(readValue(buffer)!); case 165: - return PlatformCameraTargetBounds.decode(readValue(buffer)!); + return PlatformGroundOverlay.decode(readValue(buffer)!); case 166: - return PlatformMapViewCreationParams.decode(readValue(buffer)!); + return PlatformCameraTargetBounds.decode(readValue(buffer)!); case 167: - return PlatformMapConfiguration.decode(readValue(buffer)!); + return PlatformMapViewCreationParams.decode(readValue(buffer)!); case 168: - return PlatformPoint.decode(readValue(buffer)!); + return PlatformMapConfiguration.decode(readValue(buffer)!); case 169: - return PlatformTileLayer.decode(readValue(buffer)!); + return PlatformPoint.decode(readValue(buffer)!); case 170: - return PlatformZoomRange.decode(readValue(buffer)!); + return PlatformTileLayer.decode(readValue(buffer)!); case 171: - return PlatformBitmap.decode(readValue(buffer)!); + return PlatformZoomRange.decode(readValue(buffer)!); case 172: - return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); + return PlatformBitmap.decode(readValue(buffer)!); case 173: - return PlatformBitmapBytes.decode(readValue(buffer)!); + return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); case 174: - return PlatformBitmapAsset.decode(readValue(buffer)!); + return PlatformBitmapBytes.decode(readValue(buffer)!); case 175: - return PlatformBitmapAssetImage.decode(readValue(buffer)!); + return PlatformBitmapAsset.decode(readValue(buffer)!); case 176: - return PlatformBitmapAssetMap.decode(readValue(buffer)!); + return PlatformBitmapAssetImage.decode(readValue(buffer)!); case 177: + return PlatformBitmapAssetMap.decode(readValue(buffer)!); + case 178: return PlatformBitmapBytesMap.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -3386,6 +3439,9 @@ abstract class MapsCallbackApi { /// Called when a marker cluster is tapped. void onClusterTap(PlatformCluster cluster); + /// Called when a POI is tapped. + void onPoiTap(PlatformPointOfInterest poi); + /// Called when a polygon is tapped. void onPolygonTap(String polygonId); @@ -3802,6 +3858,40 @@ abstract class MapsCallbackApi { }); } } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.', + ); + final List args = (message as List?)!; + final PlatformPointOfInterest? arg_poi = + (args[0] as PlatformPointOfInterest?); + assert( + arg_poi != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.', + ); + try { + api.onPoiTap(arg_poi!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } { final pigeonVar_channel = BasicMessageChannel( 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.orig b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.orig new file mode 100644 index 000000000000..cf8c6a809a0c --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.orig @@ -0,0 +1,4548 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +PlatformException _createConnectionError(String channelName) { + return PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel: "$channelName".', + ); +} + +List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { + if (empty) { + return []; + } + if (error == null) { + return [result]; + } + return [error.code, error.message, error.details]; +} +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed + .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); + } + if (a is Map && b is Map) { + return a.length == b.length && a.entries.every((MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key])); + } + return a == b; +} + + +/// Pigeon equivalent of MapType +enum PlatformMapType { + none, + normal, + satellite, + terrain, + hybrid, +} + +enum PlatformRendererType { + legacy, + latest, +} + +/// Join types for polyline joints. +enum PlatformJointType { + mitered, + bevel, + round, +} + +/// Enumeration of possible types of PlatformCap, corresponding to the +/// subclasses of Cap in the Google Maps Android SDK. +/// See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. +enum PlatformCapType { + buttCap, + roundCap, + squareCap, + customCap, +} + +/// Enumeration of possible types for PatternItem. +enum PlatformPatternItemType { + dot, + dash, + gap, +} + +/// Pigeon equivalent of [MapBitmapScaling]. +enum PlatformMapBitmapScaling { + auto, + none, +} + +/// Pigeon representatation of a CameraPosition. +class PlatformCameraPosition { + PlatformCameraPosition({ + required this.bearing, + required this.target, + required this.tilt, + required this.zoom, + }); + + double bearing; + + PlatformLatLng target; + + double tilt; + + double zoom; + + List _toList() { + return [ + bearing, + target, + tilt, + zoom, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraPosition decode(Object result) { + result as List; + return PlatformCameraPosition( + bearing: result[0]! as double, + target: result[1]! as PlatformLatLng, + tilt: result[2]! as double, + zoom: result[3]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraPosition || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon representation of a CameraUpdate. +class PlatformCameraUpdate { + PlatformCameraUpdate({ + required this.cameraUpdate, + }); + + /// This Object shall be any of the below classes prefixed with + /// PlatformCameraUpdate. Each such class represents a different type of + /// camera update, and each holds a different set of data, preventing the + /// use of a single unified class. Pigeon does not support inheritance, which + /// prevents a more strict type bound. + /// See https://github.com/flutter/flutter/issues/117819. + Object cameraUpdate; + + List _toList() { + return [ + cameraUpdate, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdate decode(Object result) { + result as List; + return PlatformCameraUpdate( + cameraUpdate: result[0]!, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdate || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of NewCameraPosition +class PlatformCameraUpdateNewCameraPosition { + PlatformCameraUpdateNewCameraPosition({ + required this.cameraPosition, + }); + + PlatformCameraPosition cameraPosition; + + List _toList() { + return [ + cameraPosition, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewCameraPosition decode(Object result) { + result as List; + return PlatformCameraUpdateNewCameraPosition( + cameraPosition: result[0]! as PlatformCameraPosition, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewCameraPosition || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of NewLatLng +class PlatformCameraUpdateNewLatLng { + PlatformCameraUpdateNewLatLng({ + required this.latLng, + }); + + PlatformLatLng latLng; + + List _toList() { + return [ + latLng, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewLatLng decode(Object result) { + result as List; + return PlatformCameraUpdateNewLatLng( + latLng: result[0]! as PlatformLatLng, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLng || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of NewLatLngBounds +class PlatformCameraUpdateNewLatLngBounds { + PlatformCameraUpdateNewLatLngBounds({ + required this.bounds, + required this.padding, + }); + + PlatformLatLngBounds bounds; + + double padding; + + List _toList() { + return [ + bounds, + padding, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewLatLngBounds decode(Object result) { + result as List; + return PlatformCameraUpdateNewLatLngBounds( + bounds: result[0]! as PlatformLatLngBounds, + padding: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLngBounds || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of NewLatLngZoom +class PlatformCameraUpdateNewLatLngZoom { + PlatformCameraUpdateNewLatLngZoom({ + required this.latLng, + required this.zoom, + }); + + PlatformLatLng latLng; + + double zoom; + + List _toList() { + return [ + latLng, + zoom, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewLatLngZoom decode(Object result) { + result as List; + return PlatformCameraUpdateNewLatLngZoom( + latLng: result[0]! as PlatformLatLng, + zoom: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLngZoom || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of ScrollBy +class PlatformCameraUpdateScrollBy { + PlatformCameraUpdateScrollBy({ + required this.dx, + required this.dy, + }); + + double dx; + + double dy; + + List _toList() { + return [ + dx, + dy, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateScrollBy decode(Object result) { + result as List; + return PlatformCameraUpdateScrollBy( + dx: result[0]! as double, + dy: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateScrollBy || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of ZoomBy +class PlatformCameraUpdateZoomBy { + PlatformCameraUpdateZoomBy({ + required this.amount, + this.focus, + }); + + double amount; + + PlatformDoublePair? focus; + + List _toList() { + return [ + amount, + focus, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateZoomBy decode(Object result) { + result as List; + return PlatformCameraUpdateZoomBy( + amount: result[0]! as double, + focus: result[1] as PlatformDoublePair?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoomBy || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of ZoomIn/ZoomOut +class PlatformCameraUpdateZoom { + PlatformCameraUpdateZoom({ + required this.out, + }); + + bool out; + + List _toList() { + return [ + out, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateZoom decode(Object result) { + result as List; + return PlatformCameraUpdateZoom( + out: result[0]! as bool, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoom || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of ZoomTo +class PlatformCameraUpdateZoomTo { + PlatformCameraUpdateZoomTo({ + required this.zoom, + }); + + double zoom; + + List _toList() { + return [ + zoom, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateZoomTo decode(Object result) { + result as List; + return PlatformCameraUpdateZoomTo( + zoom: result[0]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoomTo || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Circle class. +class PlatformCircle { + PlatformCircle({ + this.consumeTapEvents = false, + required this.fillColor, + required this.strokeColor, + this.visible = true, + this.strokeWidth = 10, + this.zIndex = 0.0, + required this.center, + this.radius = 0, + required this.circleId, + }); + + bool consumeTapEvents; + + PlatformColor fillColor; + + PlatformColor strokeColor; + + bool visible; + + int strokeWidth; + + double zIndex; + + PlatformLatLng center; + + double radius; + + String circleId; + + List _toList() { + return [ + consumeTapEvents, + fillColor, + strokeColor, + visible, + strokeWidth, + zIndex, + center, + radius, + circleId, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCircle decode(Object result) { + result as List; + return PlatformCircle( + consumeTapEvents: result[0]! as bool, + fillColor: result[1]! as PlatformColor, + strokeColor: result[2]! as PlatformColor, + visible: result[3]! as bool, + strokeWidth: result[4]! as int, + zIndex: result[5]! as double, + center: result[6]! as PlatformLatLng, + radius: result[7]! as double, + circleId: result[8]! as String, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCircle || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Heatmap class. +class PlatformHeatmap { + PlatformHeatmap({ + required this.heatmapId, + required this.data, + this.gradient, + required this.opacity, + required this.radius, + this.maxIntensity, + }); + + String heatmapId; + + List data; + + PlatformHeatmapGradient? gradient; + + double opacity; + + int radius; + + double? maxIntensity; + + List _toList() { + return [ + heatmapId, + data, + gradient, + opacity, + radius, + maxIntensity, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformHeatmap decode(Object result) { + result as List; + return PlatformHeatmap( + heatmapId: result[0]! as String, + data: (result[1] as List?)!.cast(), + gradient: result[2] as PlatformHeatmapGradient?, + opacity: result[3]! as double, + radius: result[4]! as int, + maxIntensity: result[5] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformHeatmap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the HeatmapGradient class. +/// +/// The Java Gradient structure is slightly different from HeatmapGradient, so +/// this matches the Android API so that conversion can be done on the Dart side +/// where the structures are easier to work with. +class PlatformHeatmapGradient { + PlatformHeatmapGradient({ + required this.colors, + required this.startPoints, + required this.colorMapSize, + }); + + List colors; + + List startPoints; + + int colorMapSize; + + List _toList() { + return [ + colors, + startPoints, + colorMapSize, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformHeatmapGradient decode(Object result) { + result as List; + return PlatformHeatmapGradient( + colors: (result[0] as List?)!.cast(), + startPoints: (result[1] as List?)!.cast(), + colorMapSize: result[2]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformHeatmapGradient || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the WeightedLatLng class. +class PlatformWeightedLatLng { + PlatformWeightedLatLng({ + required this.point, + required this.weight, + }); + + PlatformLatLng point; + + double weight; + + List _toList() { + return [ + point, + weight, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformWeightedLatLng decode(Object result) { + result as List; + return PlatformWeightedLatLng( + point: result[0]! as PlatformLatLng, + weight: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformWeightedLatLng || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the ClusterManager class. +class PlatformClusterManager { + PlatformClusterManager({ + required this.identifier, + }); + + String identifier; + + List _toList() { + return [ + identifier, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformClusterManager decode(Object result) { + result as List; + return PlatformClusterManager( + identifier: result[0]! as String, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformClusterManager || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pair of double values, such as for an offset or size. +class PlatformDoublePair { + PlatformDoublePair({ + required this.x, + required this.y, + }); + + double x; + + double y; + + List _toList() { + return [ + x, + y, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformDoublePair decode(Object result) { + result as List; + return PlatformDoublePair( + x: result[0]! as double, + y: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformDoublePair || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Color class. +/// +/// See https://developer.android.com/reference/android/graphics/Color.html. +class PlatformColor { + PlatformColor({ + required this.argbValue, + }); + + int argbValue; + + List _toList() { + return [ + argbValue, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformColor decode(Object result) { + result as List; + return PlatformColor( + argbValue: result[0]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformColor || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the InfoWindow class. +class PlatformInfoWindow { + PlatformInfoWindow({ + this.title, + this.snippet, + required this.anchor, + }); + + String? title; + + String? snippet; + + PlatformDoublePair anchor; + + List _toList() { + return [ + title, + snippet, + anchor, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformInfoWindow decode(Object result) { + result as List; + return PlatformInfoWindow( + title: result[0] as String?, + snippet: result[1] as String?, + anchor: result[2]! as PlatformDoublePair, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformInfoWindow || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Marker class. +class PlatformMarker { + PlatformMarker({ + this.alpha = 1.0, + required this.anchor, + this.consumeTapEvents = false, + this.draggable = false, + this.flat = false, + required this.icon, + required this.infoWindow, + required this.position, + this.rotation = 0.0, + this.visible = true, + this.zIndex = 0.0, + required this.markerId, + this.clusterManagerId, + }); + + double alpha; + + PlatformDoublePair anchor; + + bool consumeTapEvents; + + bool draggable; + + bool flat; + + PlatformBitmap icon; + + PlatformInfoWindow infoWindow; + + PlatformLatLng position; + + double rotation; + + bool visible; + + double zIndex; + + String markerId; + + String? clusterManagerId; + + List _toList() { + return [ + alpha, + anchor, + consumeTapEvents, + draggable, + flat, + icon, + infoWindow, + position, + rotation, + visible, + zIndex, + markerId, + clusterManagerId, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformMarker decode(Object result) { + result as List; + return PlatformMarker( + alpha: result[0]! as double, + anchor: result[1]! as PlatformDoublePair, + consumeTapEvents: result[2]! as bool, + draggable: result[3]! as bool, + flat: result[4]! as bool, + icon: result[5]! as PlatformBitmap, + infoWindow: result[6]! as PlatformInfoWindow, + position: result[7]! as PlatformLatLng, + rotation: result[8]! as double, + visible: result[9]! as bool, + zIndex: result[10]! as double, + markerId: result[11]! as String, + clusterManagerId: result[12] as String?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMarker || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Point of Interest class. +class PlatformPointOfInterest { + PlatformPointOfInterest({ + required this.position, + this.name, + required this.placeId, + }); + + PlatformLatLng position; + + String? name; + + String placeId; + + List _toList() { + return [ + position, + name, + placeId, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPointOfInterest decode(Object result) { + result as List; + return PlatformPointOfInterest( + position: result[0]! as PlatformLatLng, + name: result[1] as String?, + placeId: result[2]! as String, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPointOfInterest || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Polygon class. +class PlatformPolygon { + PlatformPolygon({ + required this.polygonId, + required this.consumesTapEvents, + required this.fillColor, + required this.geodesic, + required this.points, + required this.holes, + required this.visible, + required this.strokeColor, + required this.strokeWidth, + required this.zIndex, + }); + + String polygonId; + + bool consumesTapEvents; + + PlatformColor fillColor; + + bool geodesic; + + List points; + + List> holes; + + bool visible; + + PlatformColor strokeColor; + + int strokeWidth; + + int zIndex; + + List _toList() { + return [ + polygonId, + consumesTapEvents, + fillColor, + geodesic, + points, + holes, + visible, + strokeColor, + strokeWidth, + zIndex, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPolygon decode(Object result) { + result as List; + return PlatformPolygon( + polygonId: result[0]! as String, + consumesTapEvents: result[1]! as bool, + fillColor: result[2]! as PlatformColor, + geodesic: result[3]! as bool, + points: (result[4] as List?)!.cast(), + holes: (result[5] as List?)!.cast>(), + visible: result[6]! as bool, + strokeColor: result[7]! as PlatformColor, + strokeWidth: result[8]! as int, + zIndex: result[9]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPolygon || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Polyline class. +class PlatformPolyline { + PlatformPolyline({ + required this.polylineId, + required this.consumesTapEvents, + required this.color, + required this.geodesic, + required this.jointType, + required this.patterns, + required this.points, + required this.startCap, + required this.endCap, + required this.visible, + required this.width, + required this.zIndex, + }); + + String polylineId; + + bool consumesTapEvents; + + PlatformColor color; + + bool geodesic; + + /// The joint type. + PlatformJointType jointType; + + /// The pattern data, as a list of pattern items. + List patterns; + + List points; + + /// The cap at the start and end vertex of a polyline. + /// See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. + PlatformCap startCap; + + PlatformCap endCap; + + bool visible; + + int width; + + int zIndex; + + List _toList() { + return [ + polylineId, + consumesTapEvents, + color, + geodesic, + jointType, + patterns, + points, + startCap, + endCap, + visible, + width, + zIndex, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPolyline decode(Object result) { + result as List; + return PlatformPolyline( + polylineId: result[0]! as String, + consumesTapEvents: result[1]! as bool, + color: result[2]! as PlatformColor, + geodesic: result[3]! as bool, + jointType: result[4]! as PlatformJointType, + patterns: (result[5] as List?)!.cast(), + points: (result[6] as List?)!.cast(), + startCap: result[7]! as PlatformCap, + endCap: result[8]! as PlatformCap, + visible: result[9]! as bool, + width: result[10]! as int, + zIndex: result[11]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPolyline || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of Cap from the platform interface. +/// https://github.com/flutter/packages/blob/main/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/cap.dart +class PlatformCap { + PlatformCap({ + required this.type, + this.bitmapDescriptor, + this.refWidth, + }); + + PlatformCapType type; + + PlatformBitmap? bitmapDescriptor; + + double? refWidth; + + List _toList() { + return [ + type, + bitmapDescriptor, + refWidth, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCap decode(Object result) { + result as List; + return PlatformCap( + type: result[0]! as PlatformCapType, + bitmapDescriptor: result[1] as PlatformBitmap?, + refWidth: result[2] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the PatternItem class. +class PlatformPatternItem { + PlatformPatternItem({ + required this.type, + this.length, + }); + + PlatformPatternItemType type; + + double? length; + + List _toList() { + return [ + type, + length, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPatternItem decode(Object result) { + result as List; + return PlatformPatternItem( + type: result[0]! as PlatformPatternItemType, + length: result[1] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPatternItem || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Tile class. +class PlatformTile { + PlatformTile({ + required this.width, + required this.height, + this.data, + }); + + int width; + + int height; + + Uint8List? data; + + List _toList() { + return [ + width, + height, + data, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformTile decode(Object result) { + result as List; + return PlatformTile( + width: result[0]! as int, + height: result[1]! as int, + data: result[2] as Uint8List?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTile || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the TileOverlay class. +class PlatformTileOverlay { + PlatformTileOverlay({ + required this.tileOverlayId, + required this.fadeIn, + required this.transparency, + required this.zIndex, + required this.visible, + required this.tileSize, + }); + + String tileOverlayId; + + bool fadeIn; + + double transparency; + + int zIndex; + + bool visible; + + int tileSize; + + List _toList() { + return [ + tileOverlayId, + fadeIn, + transparency, + zIndex, + visible, + tileSize, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformTileOverlay decode(Object result) { + result as List; + return PlatformTileOverlay( + 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, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTileOverlay || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of Flutter's EdgeInsets. +class PlatformEdgeInsets { + PlatformEdgeInsets({ + required this.top, + required this.bottom, + required this.left, + required this.right, + }); + + double top; + + double bottom; + + double left; + + double right; + + List _toList() { + return [ + top, + bottom, + left, + right, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformEdgeInsets decode(Object result) { + result as List; + return PlatformEdgeInsets( + top: result[0]! as double, + bottom: result[1]! as double, + left: result[2]! as double, + right: result[3]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformEdgeInsets || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of LatLng. +class PlatformLatLng { + PlatformLatLng({ + required this.latitude, + required this.longitude, + }); + + double latitude; + + double longitude; + + List _toList() { + return [ + latitude, + longitude, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformLatLng decode(Object result) { + result as List; + return PlatformLatLng( + latitude: result[0]! as double, + longitude: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformLatLng || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of LatLngBounds. +class PlatformLatLngBounds { + PlatformLatLngBounds({ + required this.northeast, + required this.southwest, + }); + + PlatformLatLng northeast; + + PlatformLatLng southwest; + + List _toList() { + return [ + northeast, + southwest, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformLatLngBounds decode(Object result) { + result as List; + return PlatformLatLngBounds( + northeast: result[0]! as PlatformLatLng, + southwest: result[1]! as PlatformLatLng, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformLatLngBounds || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of Cluster. +class PlatformCluster { + PlatformCluster({ + required this.clusterManagerId, + required this.position, + required this.bounds, + required this.markerIds, + }); + + String clusterManagerId; + + PlatformLatLng position; + + PlatformLatLngBounds bounds; + + List markerIds; + + List _toList() { + return [ + clusterManagerId, + position, + bounds, + markerIds, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCluster decode(Object result) { + result as List; + return PlatformCluster( + clusterManagerId: result[0]! as String, + position: result[1]! as PlatformLatLng, + bounds: result[2]! as PlatformLatLngBounds, + markerIds: (result[3] as List?)!.cast(), + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCluster || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the GroundOverlay class. +class PlatformGroundOverlay { + PlatformGroundOverlay({ + required this.groundOverlayId, + required this.image, + this.position, + this.bounds, + this.width, + this.height, + this.anchor, + required this.transparency, + required this.bearing, + required this.zIndex, + required this.visible, + required this.clickable, + }); + + String groundOverlayId; + + PlatformBitmap image; + + PlatformLatLng? position; + + PlatformLatLngBounds? bounds; + + double? width; + + double? height; + + PlatformDoublePair? anchor; + + double transparency; + + double bearing; + + int zIndex; + + bool visible; + + bool clickable; + + List _toList() { + return [ + groundOverlayId, + image, + position, + bounds, + width, + height, + anchor, + transparency, + bearing, + zIndex, + visible, + clickable, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformGroundOverlay decode(Object result) { + result as List; + return PlatformGroundOverlay( + groundOverlayId: result[0]! as String, + image: result[1]! as PlatformBitmap, + position: result[2] as PlatformLatLng?, + bounds: result[3] as PlatformLatLngBounds?, + width: result[4] as double?, + height: result[5] as double?, + anchor: result[6] as PlatformDoublePair?, + transparency: result[7]! as double, + bearing: result[8]! as double, + zIndex: result[9]! as int, + visible: result[10]! as bool, + clickable: result[11]! as bool, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformGroundOverlay || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_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]). +class PlatformCameraTargetBounds { + PlatformCameraTargetBounds({ + this.bounds, + }); + + PlatformLatLngBounds? bounds; + + List _toList() { + return [ + bounds, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraTargetBounds decode(Object result) { + result as List; + return PlatformCameraTargetBounds( + bounds: result[0] as PlatformLatLngBounds?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraTargetBounds || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Information passed to the platform view creation. +class PlatformMapViewCreationParams { + PlatformMapViewCreationParams({ + required this.initialCameraPosition, + required this.mapConfiguration, + required this.initialCircles, + required this.initialMarkers, + required this.initialPolygons, + required this.initialPolylines, + required this.initialHeatmaps, + required this.initialTileOverlays, + required this.initialClusterManagers, + required this.initialGroundOverlays, + }); + + PlatformCameraPosition initialCameraPosition; + + PlatformMapConfiguration mapConfiguration; + + List initialCircles; + + List initialMarkers; + + List initialPolygons; + + List initialPolylines; + + List initialHeatmaps; + + List initialTileOverlays; + + List initialClusterManagers; + + List initialGroundOverlays; + + List _toList() { + return [ + initialCameraPosition, + mapConfiguration, + initialCircles, + initialMarkers, + initialPolygons, + initialPolylines, + initialHeatmaps, + initialTileOverlays, + initialClusterManagers, + initialGroundOverlays, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformMapViewCreationParams decode(Object result) { + result as List; + return PlatformMapViewCreationParams( + initialCameraPosition: result[0]! as PlatformCameraPosition, + mapConfiguration: result[1]! as PlatformMapConfiguration, + initialCircles: (result[2] as List?)!.cast(), + initialMarkers: (result[3] as List?)!.cast(), + initialPolygons: (result[4] as List?)!.cast(), + initialPolylines: (result[5] as List?)!.cast(), + initialHeatmaps: (result[6] as List?)!.cast(), + initialTileOverlays: (result[7] as List?)!.cast(), + initialClusterManagers: (result[8] as List?)!.cast(), + initialGroundOverlays: (result[9] as List?)!.cast(), + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMapViewCreationParams || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of MapConfiguration. +class PlatformMapConfiguration { + PlatformMapConfiguration({ + this.compassEnabled, + this.cameraTargetBounds, + this.mapType, + this.minMaxZoomPreference, + this.mapToolbarEnabled, + this.rotateGesturesEnabled, + this.scrollGesturesEnabled, + this.tiltGesturesEnabled, + this.trackCameraPosition, + this.zoomControlsEnabled, + this.zoomGesturesEnabled, + this.myLocationEnabled, + this.myLocationButtonEnabled, + this.padding, + this.indoorViewEnabled, + this.trafficEnabled, + this.buildingsEnabled, + this.liteModeEnabled, + this.mapId, + this.style, + }); + + bool? compassEnabled; + + PlatformCameraTargetBounds? cameraTargetBounds; + + PlatformMapType? mapType; + + PlatformZoomRange? minMaxZoomPreference; + + bool? mapToolbarEnabled; + + bool? rotateGesturesEnabled; + + bool? scrollGesturesEnabled; + + bool? tiltGesturesEnabled; + + bool? trackCameraPosition; + + bool? zoomControlsEnabled; + + bool? zoomGesturesEnabled; + + bool? myLocationEnabled; + + bool? myLocationButtonEnabled; + + PlatformEdgeInsets? padding; + + bool? indoorViewEnabled; + + bool? trafficEnabled; + + bool? buildingsEnabled; + + bool? liteModeEnabled; + + String? mapId; + + String? style; + + List _toList() { + return [ + compassEnabled, + cameraTargetBounds, + mapType, + minMaxZoomPreference, + mapToolbarEnabled, + rotateGesturesEnabled, + scrollGesturesEnabled, + tiltGesturesEnabled, + trackCameraPosition, + zoomControlsEnabled, + zoomGesturesEnabled, + myLocationEnabled, + myLocationButtonEnabled, + padding, + indoorViewEnabled, + trafficEnabled, + buildingsEnabled, + liteModeEnabled, + mapId, + style, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformMapConfiguration decode(Object result) { + result as List; + return PlatformMapConfiguration( + compassEnabled: result[0] as bool?, + cameraTargetBounds: result[1] as PlatformCameraTargetBounds?, + mapType: result[2] as PlatformMapType?, + minMaxZoomPreference: result[3] as PlatformZoomRange?, + mapToolbarEnabled: result[4] as bool?, + rotateGesturesEnabled: result[5] as bool?, + scrollGesturesEnabled: result[6] as bool?, + tiltGesturesEnabled: result[7] as bool?, + trackCameraPosition: result[8] as bool?, + zoomControlsEnabled: result[9] as bool?, + zoomGesturesEnabled: result[10] as bool?, + myLocationEnabled: result[11] as bool?, + myLocationButtonEnabled: result[12] as bool?, + padding: result[13] as PlatformEdgeInsets?, + indoorViewEnabled: result[14] as bool?, + trafficEnabled: result[15] as bool?, + buildingsEnabled: result[16] as bool?, + liteModeEnabled: result[17] as bool?, + mapId: result[18] as String?, + style: result[19] as String?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMapConfiguration || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon representation of an x,y coordinate. +class PlatformPoint { + PlatformPoint({ + required this.x, + required this.y, + }); + + int x; + + int y; + + List _toList() { + return [ + x, + y, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPoint decode(Object result) { + result as List; + return PlatformPoint( + x: result[0]! as int, + y: result[1]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPoint || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of native TileOverlay properties. +class PlatformTileLayer { + PlatformTileLayer({ + required this.visible, + required this.fadeIn, + required this.transparency, + required this.zIndex, + }); + + bool visible; + + bool fadeIn; + + double transparency; + + double zIndex; + + List _toList() { + return [ + visible, + fadeIn, + transparency, + zIndex, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformTileLayer decode(Object result) { + result as List; + return PlatformTileLayer( + visible: result[0]! as bool, + fadeIn: result[1]! as bool, + transparency: result[2]! as double, + zIndex: result[3]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTileLayer || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Possible outcomes of launching a URL. +class PlatformZoomRange { + PlatformZoomRange({ + this.min, + this.max, + }); + + double? min; + + double? max; + + List _toList() { + return [ + min, + max, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformZoomRange decode(Object result) { + result as List; + return PlatformZoomRange( + min: result[0] as double?, + max: result[1] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformZoomRange || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint +/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which +/// may hold the pigeon equivalent type of any of them. +class PlatformBitmap { + PlatformBitmap({ + required this.bitmap, + }); + + /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], + /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], + /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. + /// As Pigeon does not currently support data class inheritance, this + /// approach allows for the different bitmap implementations to be valid + /// argument and return types of the API methods. See + /// https://github.com/flutter/flutter/issues/117819. + Object bitmap; + + List _toList() { + return [ + bitmap, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmap decode(Object result) { + result as List; + return PlatformBitmap( + bitmap: result[0]!, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [DefaultMarker]. See +/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#defaultMarker(float) +class PlatformBitmapDefaultMarker { + PlatformBitmapDefaultMarker({ + this.hue, + }); + + double? hue; + + List _toList() { + return [ + hue, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapDefaultMarker decode(Object result) { + result as List; + return PlatformBitmapDefaultMarker( + hue: result[0] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapDefaultMarker || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [BytesBitmap]. See +/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#fromBitmap(android.graphics.Bitmap) +class PlatformBitmapBytes { + PlatformBitmapBytes({ + required this.byteData, + this.size, + }); + + Uint8List byteData; + + PlatformDoublePair? size; + + List _toList() { + return [ + byteData, + size, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapBytes decode(Object result) { + result as List; + return PlatformBitmapBytes( + byteData: result[0]! as Uint8List, + size: result[1] as PlatformDoublePair?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapBytes || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [AssetBitmap]. See +/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname +class PlatformBitmapAsset { + PlatformBitmapAsset({ + required this.name, + this.pkg, + }); + + String name; + + String? pkg; + + List _toList() { + return [ + name, + pkg, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapAsset decode(Object result) { + result as List; + return PlatformBitmapAsset( + name: result[0]! as String, + pkg: result[1] as String?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAsset || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [AssetImageBitmap]. See +/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname +class PlatformBitmapAssetImage { + PlatformBitmapAssetImage({ + required this.name, + required this.scale, + this.size, + }); + + String name; + + double scale; + + PlatformDoublePair? size; + + List _toList() { + return [ + name, + scale, + size, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapAssetImage decode(Object result) { + result as List; + return PlatformBitmapAssetImage( + name: result[0]! as String, + scale: result[1]! as double, + size: result[2] as PlatformDoublePair?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAssetImage || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [AssetMapBitmap]. See +/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname +class PlatformBitmapAssetMap { + PlatformBitmapAssetMap({ + required this.assetName, + required this.bitmapScaling, + required this.imagePixelRatio, + this.width, + this.height, + }); + + String assetName; + + PlatformMapBitmapScaling bitmapScaling; + + double imagePixelRatio; + + double? width; + + double? height; + + List _toList() { + return [ + assetName, + bitmapScaling, + imagePixelRatio, + width, + height, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapAssetMap decode(Object result) { + result as List; + return PlatformBitmapAssetMap( + assetName: result[0]! as String, + bitmapScaling: result[1]! as PlatformMapBitmapScaling, + imagePixelRatio: result[2]! as double, + width: result[3] as double?, + height: result[4] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAssetMap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [BytesMapBitmap]. See +/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-frombitmap-bitmap-image +class PlatformBitmapBytesMap { + PlatformBitmapBytesMap({ + required this.byteData, + required this.bitmapScaling, + required this.imagePixelRatio, + this.width, + this.height, + }); + + Uint8List byteData; + + PlatformMapBitmapScaling bitmapScaling; + + double imagePixelRatio; + + double? width; + + double? height; + + List _toList() { + return [ + byteData, + bitmapScaling, + imagePixelRatio, + width, + height, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapBytesMap decode(Object result) { + result as List; + return PlatformBitmapBytesMap( + byteData: result[0]! as Uint8List, + bitmapScaling: result[1]! as PlatformMapBitmapScaling, + imagePixelRatio: result[2]! as double, + width: result[3] as double?, + height: result[4] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapBytesMap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + + +class _PigeonCodec extends StandardMessageCodec { + const _PigeonCodec(); + @override + void writeValue(WriteBuffer buffer, Object? value) { + if (value is int) { + buffer.putUint8(4); + buffer.putInt64(value); + } else if (value is PlatformMapType) { + buffer.putUint8(129); + writeValue(buffer, value.index); + } else if (value is PlatformRendererType) { + buffer.putUint8(130); + writeValue(buffer, value.index); + } else if (value is PlatformJointType) { + buffer.putUint8(131); + writeValue(buffer, value.index); + } else if (value is PlatformCapType) { + buffer.putUint8(132); + writeValue(buffer, value.index); + } else if (value is PlatformPatternItemType) { + buffer.putUint8(133); + writeValue(buffer, value.index); + } else if (value is PlatformMapBitmapScaling) { + buffer.putUint8(134); + writeValue(buffer, value.index); + } else if (value is PlatformCameraPosition) { + buffer.putUint8(135); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdate) { + buffer.putUint8(136); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateNewCameraPosition) { + buffer.putUint8(137); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateNewLatLng) { + buffer.putUint8(138); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateNewLatLngBounds) { + buffer.putUint8(139); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateNewLatLngZoom) { + buffer.putUint8(140); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateScrollBy) { + buffer.putUint8(141); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateZoomBy) { + buffer.putUint8(142); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateZoom) { + buffer.putUint8(143); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateZoomTo) { + buffer.putUint8(144); + writeValue(buffer, value.encode()); + } else if (value is PlatformCircle) { + buffer.putUint8(145); + writeValue(buffer, value.encode()); + } else if (value is PlatformHeatmap) { + buffer.putUint8(146); + writeValue(buffer, value.encode()); + } else if (value is PlatformHeatmapGradient) { + buffer.putUint8(147); + writeValue(buffer, value.encode()); + } else if (value is PlatformWeightedLatLng) { + buffer.putUint8(148); + writeValue(buffer, value.encode()); + } else if (value is PlatformClusterManager) { + buffer.putUint8(149); + writeValue(buffer, value.encode()); + } else if (value is PlatformDoublePair) { + buffer.putUint8(150); + writeValue(buffer, value.encode()); + } else if (value is PlatformColor) { + buffer.putUint8(151); + writeValue(buffer, value.encode()); + } else if (value is PlatformInfoWindow) { + buffer.putUint8(152); + writeValue(buffer, value.encode()); + } else if (value is PlatformMarker) { + buffer.putUint8(153); + writeValue(buffer, value.encode()); + } else if (value is PlatformPointOfInterest) { + buffer.putUint8(154); + writeValue(buffer, value.encode()); + } else if (value is PlatformPolygon) { + buffer.putUint8(155); + writeValue(buffer, value.encode()); + } else if (value is PlatformPolyline) { + buffer.putUint8(156); + writeValue(buffer, value.encode()); + } else if (value is PlatformCap) { + buffer.putUint8(157); + writeValue(buffer, value.encode()); + } else if (value is PlatformPatternItem) { + buffer.putUint8(158); + writeValue(buffer, value.encode()); + } else if (value is PlatformTile) { + buffer.putUint8(159); + writeValue(buffer, value.encode()); + } else if (value is PlatformTileOverlay) { + buffer.putUint8(160); + writeValue(buffer, value.encode()); + } else if (value is PlatformEdgeInsets) { + buffer.putUint8(161); + writeValue(buffer, value.encode()); + } else if (value is PlatformLatLng) { + buffer.putUint8(162); + writeValue(buffer, value.encode()); + } else if (value is PlatformLatLngBounds) { + buffer.putUint8(163); + writeValue(buffer, value.encode()); + } else if (value is PlatformCluster) { + buffer.putUint8(164); + writeValue(buffer, value.encode()); + } else if (value is PlatformGroundOverlay) { + buffer.putUint8(165); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraTargetBounds) { + buffer.putUint8(166); + writeValue(buffer, value.encode()); + } else if (value is PlatformMapViewCreationParams) { + buffer.putUint8(167); + writeValue(buffer, value.encode()); + } else if (value is PlatformMapConfiguration) { + buffer.putUint8(168); + writeValue(buffer, value.encode()); + } else if (value is PlatformPoint) { + buffer.putUint8(169); + writeValue(buffer, value.encode()); + } else if (value is PlatformTileLayer) { + buffer.putUint8(170); + writeValue(buffer, value.encode()); + } else if (value is PlatformZoomRange) { + buffer.putUint8(171); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmap) { + buffer.putUint8(172); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapDefaultMarker) { + buffer.putUint8(173); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapBytes) { + buffer.putUint8(174); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapAsset) { + buffer.putUint8(175); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapAssetImage) { + buffer.putUint8(176); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapAssetMap) { + buffer.putUint8(177); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapBytesMap) { + buffer.putUint8(178); + writeValue(buffer, value.encode()); + } else { + super.writeValue(buffer, value); + } + } + + @override + Object? readValueOfType(int type, ReadBuffer buffer) { + switch (type) { + case 129: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformMapType.values[value]; + case 130: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformRendererType.values[value]; + case 131: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformJointType.values[value]; + case 132: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformCapType.values[value]; + case 133: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformPatternItemType.values[value]; + case 134: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformMapBitmapScaling.values[value]; + case 135: + return PlatformCameraPosition.decode(readValue(buffer)!); + case 136: + return PlatformCameraUpdate.decode(readValue(buffer)!); + case 137: + return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!); + case 138: + return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!); + case 139: + return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); + case 140: + return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); + case 141: + return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); + case 142: + return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); + case 143: + return PlatformCameraUpdateZoom.decode(readValue(buffer)!); + case 144: + return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); + case 145: + return PlatformCircle.decode(readValue(buffer)!); + case 146: + return PlatformHeatmap.decode(readValue(buffer)!); + case 147: + return PlatformHeatmapGradient.decode(readValue(buffer)!); + case 148: + return PlatformWeightedLatLng.decode(readValue(buffer)!); + case 149: + return PlatformClusterManager.decode(readValue(buffer)!); + case 150: + return PlatformDoublePair.decode(readValue(buffer)!); + case 151: + return PlatformColor.decode(readValue(buffer)!); + case 152: + return PlatformInfoWindow.decode(readValue(buffer)!); + case 153: + return PlatformMarker.decode(readValue(buffer)!); + case 154: + return PlatformPointOfInterest.decode(readValue(buffer)!); + case 155: + return PlatformPolygon.decode(readValue(buffer)!); + case 156: + return PlatformPolyline.decode(readValue(buffer)!); + case 157: + return PlatformCap.decode(readValue(buffer)!); + case 158: + return PlatformPatternItem.decode(readValue(buffer)!); + case 159: + return PlatformTile.decode(readValue(buffer)!); + case 160: + return PlatformTileOverlay.decode(readValue(buffer)!); + case 161: + return PlatformEdgeInsets.decode(readValue(buffer)!); + case 162: + return PlatformLatLng.decode(readValue(buffer)!); + case 163: + return PlatformLatLngBounds.decode(readValue(buffer)!); + case 164: + return PlatformCluster.decode(readValue(buffer)!); + case 165: + return PlatformGroundOverlay.decode(readValue(buffer)!); + case 166: + return PlatformCameraTargetBounds.decode(readValue(buffer)!); + case 167: + return PlatformMapViewCreationParams.decode(readValue(buffer)!); + case 168: + return PlatformMapConfiguration.decode(readValue(buffer)!); + case 169: + return PlatformPoint.decode(readValue(buffer)!); + case 170: + return PlatformTileLayer.decode(readValue(buffer)!); + case 171: + return PlatformZoomRange.decode(readValue(buffer)!); + case 172: + return PlatformBitmap.decode(readValue(buffer)!); + case 173: + return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); + case 174: + return PlatformBitmapBytes.decode(readValue(buffer)!); + case 175: + return PlatformBitmapAsset.decode(readValue(buffer)!); + case 176: + return PlatformBitmapAssetImage.decode(readValue(buffer)!); + case 177: + return PlatformBitmapAssetMap.decode(readValue(buffer)!); + case 178: + return PlatformBitmapBytesMap.decode(readValue(buffer)!); + default: + return super.readValueOfType(type, buffer); + } + } +} + +/// Interface for non-test interactions with the native SDK. +/// +/// For test-only state queries, see [MapsInspectorApi]. +class MapsApi { + /// Constructor for [MapsApi]. 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. + MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + /// Returns once the map instance is available. + Future waitForMap() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the map's configuration options. + /// + /// Only non-null configuration values will result in updates; options with + /// null values will remain unchanged. + Future updateMapConfiguration(PlatformMapConfiguration configuration) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of circles on the map. + Future updateCircles(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of heatmaps on the map. + Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of custer managers for clusters on the map. + Future updateClusterManagers(List toAdd, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of markers on the map. + Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of polygonss on the map. + Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of polylines on the map. + Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of tile overlays on the map. + Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of ground overlays on the map. + Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Gets the screen coordinate for the given map location. + Future getScreenCoordinate(PlatformLatLng latLng) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformPoint?)!; + } + } + + /// Gets the map location for the given screen coordinate. + Future getLatLng(PlatformPoint screenCoordinate) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformLatLng?)!; + } + } + + /// Gets the map region currently displayed on the map. + Future getVisibleRegion() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformLatLngBounds?)!; + } + } + + /// Moves the camera according to [cameraUpdate] immediately, with no + /// animation. + Future moveCamera(PlatformCameraUpdate cameraUpdate) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Moves the camera according to [cameraUpdate], animating the update using a + /// duration in milliseconds if provided. + Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Gets the current map zoom level. + Future getZoomLevel() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as double?)!; + } + } + + /// Show the info window for the marker with the given ID. + Future showInfoWindow(String markerId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Hide the info window for the marker with the given ID. + Future hideInfoWindow(String markerId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Returns true if the marker with the given ID is currently displaying its + /// info window. + Future isInfoWindowShown(String markerId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + /// 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. + Future setStyle(String style) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + /// Returns true if 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. + Future didLastStyleSucceed() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + /// Clears the cache of tiles previously requseted from the tile provider. + Future clearTileCache(String tileOverlayId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Takes a snapshot of the map and returns its image data. + Future takeSnapshot() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as Uint8List?)!; + } + } +} + +abstract class MapsCallbackApi { + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + /// Called when the map camera starts moving. + void onCameraMoveStarted(); + + /// Called when the map camera moves. + void onCameraMove(PlatformCameraPosition cameraPosition); + + /// Called when the map camera stops moving. + void onCameraIdle(); + + /// Called when the map, not a specifc map object, is tapped. + void onTap(PlatformLatLng position); + + /// Called when the map, not a specifc map object, is long pressed. + void onLongPress(PlatformLatLng position); + + /// Called when a marker is tapped. + void onMarkerTap(String markerId); + + /// Called when a marker drag starts. + void onMarkerDragStart(String markerId, PlatformLatLng position); + + /// Called when a marker drag updates. + void onMarkerDrag(String markerId, PlatformLatLng position); + + /// Called when a marker drag ends. + void onMarkerDragEnd(String markerId, PlatformLatLng position); + + /// Called when a marker's info window is tapped. + void onInfoWindowTap(String markerId); + + /// Called when a circle is tapped. + void onCircleTap(String circleId); + + /// Called when a marker cluster is tapped. + void onClusterTap(PlatformCluster cluster); + + /// Called when a POI is tapped. + void onPoiTap(PlatformPointOfInterest poi); + + /// Called when a polygon is tapped. + void onPolygonTap(String polygonId); + + /// Called when a polyline is tapped. + void onPolylineTap(String polylineId); + + /// Called when a ground overlay is tapped. + void onGroundOverlayTap(String groundOverlayId); + + /// Called to get data for a map tile. + Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); + + static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { + messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + try { + api.onCameraMoveStarted(); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null.'); + final List args = (message as List?)!; + 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 { + api.onCameraMove(arg_cameraPosition!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + try { + api.onCameraIdle(); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null.'); + final List args = (message as List?)!; + final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); + try { + api.onTap(arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null.'); + final List args = (message as List?)!; + final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); + try { + api.onLongPress(arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); + try { + api.onMarkerTap(arg_markerId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); + try { + api.onMarkerDragStart(arg_markerId!, arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); + try { + api.onMarkerDrag(arg_markerId!, arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); + try { + api.onMarkerDragEnd(arg_markerId!, arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); + try { + api.onInfoWindowTap(arg_markerId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null.'); + final List args = (message as List?)!; + final String? arg_circleId = (args[0] as String?); + assert(arg_circleId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null, expected non-null String.'); + try { + api.onCircleTap(arg_circleId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null.'); + final List args = (message as List?)!; + final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); + assert(arg_cluster != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); + try { + api.onClusterTap(arg_cluster!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.'); + final List args = (message as List?)!; + final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); + assert(arg_poi != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); + try { + api.onPoiTap(arg_poi!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null.'); + final List args = (message as List?)!; + final String? arg_polygonId = (args[0] as String?); + assert(arg_polygonId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); + try { + api.onPolygonTap(arg_polygonId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null.'); + final List args = (message as List?)!; + final String? arg_polylineId = (args[0] as String?); + assert(arg_polylineId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); + try { + api.onPolylineTap(arg_polylineId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.'); + final List args = (message as List?)!; + final String? arg_groundOverlayId = (args[0] as String?); + assert(arg_groundOverlayId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); + try { + api.onGroundOverlayTap(arg_groundOverlayId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null.'); + final List args = (message as List?)!; + final String? arg_tileOverlayId = (args[0] as String?); + assert(arg_tileOverlayId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); + final PlatformPoint? arg_location = (args[1] as PlatformPoint?); + assert(arg_location != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); + final int? arg_zoom = (args[2] as int?); + 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!); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + } +} + +/// Interface for global SDK initialization. +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 = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + /// Initializes the Google Maps SDK with the given renderer preference. + /// + /// 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. + Future initializeWithPreferredRenderer(PlatformRendererType? type) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformRendererType?)!; + } + } + + /// Attempts to trigger any thread-blocking work + /// the Google Maps SDK normally does when a map is shown for the first time. + Future warmup() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } +} + +/// 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. +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 = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + Future createView(PlatformMapViewCreationParams? type) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } +} + +/// Inspector API only intended for use in integration tests. +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 = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + Future areBuildingsEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areRotateGesturesEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areZoomControlsEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areScrollGesturesEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areTiltGesturesEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areZoomGesturesEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future isCompassEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future isLiteModeEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as bool?); + } + } + + Future isMapToolbarEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future isMyLocationButtonEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future isTrafficEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future getTileOverlayInfo(String tileOverlayId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as PlatformTileLayer?); + } + } + + Future getGroundOverlayInfo(String groundOverlayId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as PlatformGroundOverlay?); + } + } + + Future getZoomRange() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformZoomRange?)!; + } + } + + Future> getClusters(String clusterManagerId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as List?)!.cast(); + } + } + + Future getCameraPosition() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformCameraPosition?)!; + } + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.rej b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.rej new file mode 100644 index 000000000000..e8ad1b59be66 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.rej @@ -0,0 +1,1574 @@ +--- packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart ++++ packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart +@@ -31,64 +35,43 @@ List wrapResponse({Object? result, PlatformException? error, bool empty + } + return [error.code, error.message, error.details]; + } ++ + bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && +- a.indexed +- .every(((int, dynamic) item) => _deepEquals(item., b[item.])); ++ a.indexed.every( ++ ((int, dynamic) item) => _deepEquals(item., b[item.]), ++ ); + } + if (a is Map && b is Map) { +- return a.length == b.length && a.entries.every((MapEntry entry) => +- (b as Map).containsKey(entry.key) && +- _deepEquals(entry.value, b[entry.key])); ++ return a.length == b.length && ++ a.entries.every( ++ (MapEntry entry) => ++ (b as Map).containsKey(entry.key) && ++ _deepEquals(entry.value, b[entry.key]), ++ ); + } + return a == b; + } + +- + /// Pigeon equivalent of MapType +-enum PlatformMapType { +- none, +- normal, +- satellite, +- terrain, +- hybrid, +-} ++enum PlatformMapType { none, normal, satellite, terrain, hybrid } + +-enum PlatformRendererType { +- legacy, +- latest, +-} ++enum PlatformRendererType { legacy, latest } + + /// Join types for polyline joints. +-enum PlatformJointType { +- mitered, +- bevel, +- round, +-} ++enum PlatformJointType { mitered, bevel, round } + + /// Enumeration of possible types of PlatformCap, corresponding to the + /// subclasses of Cap in the Google Maps Android SDK. + /// See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. +-enum PlatformCapType { +- buttCap, +- roundCap, +- squareCap, +- customCap, +-} ++enum PlatformCapType { buttCap, roundCap, squareCap, customCap } + + /// Enumeration of possible types for PatternItem. +-enum PlatformPatternItemType { +- dot, +- dash, +- gap, +-} ++enum PlatformPatternItemType { dot, dash, gap } + + /// Pigeon equivalent of [MapBitmapScaling]. +-enum PlatformMapBitmapScaling { +- auto, +- none, +-} ++enum PlatformMapBitmapScaling { auto, none } + + /// Pigeon representatation of a CameraPosition. + class PlatformCameraPosition { +@@ -2732,8 +2518,10 @@ class MapsApi { + /// available for dependency injection. If it is left null, the default + /// BinaryMessenger will be used which routes to the host platform. + MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) +- : pigeonVar_binaryMessenger = binaryMessenger, +- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ : pigeonVar_binaryMessenger = binaryMessenger, ++ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); +@@ -2742,7 +2530,8 @@ class MapsApi { + + /// Returns once the map instance is available. + Future waitForMap() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -2767,14 +2556,19 @@ class MapsApi { + /// + /// Only non-null configuration values will result in updates; options with + /// null values will remain unchanged. +- Future updateMapConfiguration(PlatformMapConfiguration configuration) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration'; ++ Future updateMapConfiguration( ++ PlatformMapConfiguration configuration, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [configuration], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2790,14 +2584,21 @@ class MapsApi { + } + + /// Updates the set of circles on the map. +- Future updateCircles(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles'; ++ Future updateCircles( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2813,14 +2614,21 @@ class MapsApi { + } + + /// Updates the set of heatmaps on the map. +- Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps'; ++ Future updateHeatmaps( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2836,14 +2644,20 @@ class MapsApi { + } + + /// Updates the set of custer managers for clusters on the map. +- Future updateClusterManagers(List toAdd, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers'; ++ Future updateClusterManagers( ++ List toAdd, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2859,14 +2673,21 @@ class MapsApi { + } + + /// Updates the set of markers on the map. +- Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers'; ++ Future updateMarkers( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2882,14 +2703,21 @@ class MapsApi { + } + + /// Updates the set of polygonss on the map. +- Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons'; ++ Future updatePolygons( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2905,14 +2733,21 @@ class MapsApi { + } + + /// Updates the set of polylines on the map. +- Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines'; ++ Future updatePolylines( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2928,14 +2763,21 @@ class MapsApi { + } + + /// Updates the set of tile overlays on the map. +- Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays'; ++ Future updateTileOverlays( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2951,14 +2793,21 @@ class MapsApi { + } + + /// Updates the set of ground overlays on the map. +- Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays'; ++ Future updateGroundOverlays( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2975,13 +2824,16 @@ class MapsApi { + + /// Gets the screen coordinate for the given map location. + Future getScreenCoordinate(PlatformLatLng latLng) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [latLng], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3003,13 +2855,16 @@ class MapsApi { + + /// Gets the map location for the given screen coordinate. + Future getLatLng(PlatformPoint screenCoordinate) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [screenCoordinate], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3031,7 +2886,8 @@ class MapsApi { + + /// Gets the map region currently displayed on the map. + Future getVisibleRegion() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3060,13 +2916,16 @@ class MapsApi { + /// Moves the camera according to [cameraUpdate] immediately, with no + /// animation. + Future moveCamera(PlatformCameraUpdate cameraUpdate) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [cameraUpdate], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3083,14 +2942,20 @@ class MapsApi { + + /// Moves the camera according to [cameraUpdate], animating the update using a + /// duration in milliseconds if provided. +- Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera'; ++ Future animateCamera( ++ PlatformCameraUpdate cameraUpdate, ++ int? durationMilliseconds, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [cameraUpdate, durationMilliseconds], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3107,7 +2972,8 @@ class MapsApi { + + /// Gets the current map zoom level. + Future getZoomLevel() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3135,13 +3001,16 @@ class MapsApi { + + /// Show the info window for the marker with the given ID. + Future showInfoWindow(String markerId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [markerId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3158,13 +3027,16 @@ class MapsApi { + + /// Hide the info window for the marker with the given ID. + Future hideInfoWindow(String markerId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [markerId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3182,13 +3054,16 @@ class MapsApi { + /// Returns true if the marker with the given ID is currently displaying its + /// info window. + Future isInfoWindowShown(String markerId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [markerId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3214,13 +3089,16 @@ class MapsApi { + /// Returns false if there was an error setting the style, such as an invalid + /// style string. + Future setStyle(String style) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [style], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3246,7 +3124,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 pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3274,13 +3153,16 @@ class MapsApi { + + /// Clears the cache of tiles previously requseted from the tile provider. + Future clearTileCache(String tileOverlayId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [tileOverlayId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3297,7 +3179,8 @@ class MapsApi { + + /// Takes a snapshot of the map and returns its image data. + Future takeSnapshot() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3376,14 +3259,26 @@ abstract class MapsCallbackApi { + void onGroundOverlayTap(String groundOverlayId); + + /// Called to get data for a map tile. +- Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); ++ Future getTileOverlayTile( ++ String tileOverlayId, ++ PlatformPoint location, ++ int zoom, ++ ); + +- static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { +- messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ static void setUp( ++ MapsCallbackApi? api, { ++ BinaryMessenger? binaryMessenger, ++ String messageChannelSuffix = '', ++ }) { ++ messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + { + final pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { +@@ -3393,41 +3288,54 @@ 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null.'); ++ assert( ++ message != 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?); +- assert(arg_cameraPosition != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null, expected non-null 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 { + api.onCameraMove(arg_cameraPosition!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { +@@ -3437,373 +3345,502 @@ 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onTap(arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onLongPress(arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null, expected non-null String.', ++ ); + try { + api.onMarkerTap(arg_markerId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.', ++ ); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); +- assert(arg_position != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onMarkerDragStart(arg_markerId!, arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null String.', ++ ); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); +- assert(arg_position != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onMarkerDrag(arg_markerId!, arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.', ++ ); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); +- assert(arg_position != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onMarkerDragEnd(arg_markerId!, arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.', ++ ); + try { + api.onInfoWindowTap(arg_markerId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null, expected non-null String.'); ++ assert( ++ arg_circleId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null, expected non-null String.', ++ ); + try { + api.onCircleTap(arg_circleId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); ++ assert( ++ arg_cluster != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.', ++ ); + try { + api.onClusterTap(arg_cluster!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.', ++ ); + final List args = (message as List?)!; +- final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); +- assert(arg_poi != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); ++ final PlatformPointOfInterest? arg_poi = ++ (args[0] as PlatformPointOfInterest?); ++ assert( ++ arg_poi != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.', ++ ); + try { + api.onPoiTap(arg_poi!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); ++ assert( ++ arg_polygonId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null, expected non-null String.', ++ ); + try { + api.onPolygonTap(arg_polygonId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); ++ assert( ++ arg_polylineId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null, expected non-null String.', ++ ); + try { + api.onPolylineTap(arg_polylineId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.', ++ ); + final List args = (message as List?)!; + final String? arg_groundOverlayId = (args[0] as String?); +- assert(arg_groundOverlayId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); ++ assert( ++ arg_groundOverlayId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.', ++ ); + try { + api.onGroundOverlayTap(arg_groundOverlayId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null.'); ++ assert( ++ message != 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, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); ++ assert( ++ arg_tileOverlayId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.', ++ ); + final PlatformPoint? arg_location = (args[1] as PlatformPoint?); +- assert(arg_location != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); ++ assert( ++ arg_location != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.', ++ ); + final int? arg_zoom = (args[2] as int?); +- assert(arg_zoom != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); ++ 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()), ++ ); + } + }); + } +@@ -3816,9 +3853,13 @@ 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 = ''}) +- : pigeonVar_binaryMessenger = binaryMessenger, +- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ MapsInitializerApi({ ++ BinaryMessenger? binaryMessenger, ++ String messageChannelSuffix = '', ++ }) : pigeonVar_binaryMessenger = binaryMessenger, ++ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); +@@ -3831,14 +3872,19 @@ class MapsInitializerApi { + /// + /// Calling this more than once in the lifetime of an application will result + /// in an error. +- Future initializeWithPreferredRenderer(PlatformRendererType? type) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer'; ++ Future initializeWithPreferredRenderer( ++ PlatformRendererType? type, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [type], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3861,7 +3907,8 @@ class MapsInitializerApi { + /// Attempts to trigger any thread-blocking work + /// the Google Maps SDK normally does when a map is shown for the first time. + Future warmup() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3890,9 +3937,13 @@ 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 = ''}) +- : pigeonVar_binaryMessenger = binaryMessenger, +- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ MapsPlatformViewApi({ ++ BinaryMessenger? binaryMessenger, ++ String messageChannelSuffix = '', ++ }) : pigeonVar_binaryMessenger = binaryMessenger, ++ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); +@@ -3900,13 +3951,16 @@ class MapsPlatformViewApi { + final String pigeonVar_messageChannelSuffix; + + Future createView(PlatformMapViewCreationParams? type) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [type], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3927,9 +3981,13 @@ 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 = ''}) +- : pigeonVar_binaryMessenger = binaryMessenger, +- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ MapsInspectorApi({ ++ BinaryMessenger? binaryMessenger, ++ String messageChannelSuffix = '', ++ }) : pigeonVar_binaryMessenger = binaryMessenger, ++ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); +@@ -3937,7 +3995,8 @@ class MapsInspectorApi { + final String pigeonVar_messageChannelSuffix; + + Future areBuildingsEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3964,7 +4023,8 @@ class MapsInspectorApi { + } + + Future areRotateGesturesEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3991,7 +4051,8 @@ class MapsInspectorApi { + } + + Future areZoomControlsEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4018,7 +4079,8 @@ class MapsInspectorApi { + } + + Future areScrollGesturesEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4045,7 +4107,8 @@ class MapsInspectorApi { + } + + Future areTiltGesturesEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4072,7 +4135,8 @@ class MapsInspectorApi { + } + + Future areZoomGesturesEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4099,7 +4163,8 @@ class MapsInspectorApi { + } + + Future isCompassEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4126,7 +4191,8 @@ class MapsInspectorApi { + } + + Future isLiteModeEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4148,7 +4214,8 @@ class MapsInspectorApi { + } + + Future isMapToolbarEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4175,7 +4242,8 @@ class MapsInspectorApi { + } + + Future isMyLocationButtonEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4202,7 +4270,8 @@ class MapsInspectorApi { + } + + Future isTrafficEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4229,13 +4298,16 @@ class MapsInspectorApi { + } + + Future getTileOverlayInfo(String tileOverlayId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [tileOverlayId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -4250,14 +4322,19 @@ class MapsInspectorApi { + } + } + +- Future getGroundOverlayInfo(String groundOverlayId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo'; ++ Future getGroundOverlayInfo( ++ String groundOverlayId, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [groundOverlayId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -4273,7 +4350,8 @@ class MapsInspectorApi { + } + + Future getZoomRange() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4300,13 +4378,16 @@ class MapsInspectorApi { + } + + Future> getClusters(String clusterManagerId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [clusterManagerId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -4322,12 +4403,14 @@ class MapsInspectorApi { + message: 'Host platform returned null value for non-null return value.', + ); + } else { +- return (pigeonVar_replyList[0] as List?)!.cast(); ++ return (pigeonVar_replyList[0] as List?)! ++ .cast(); + } + } + + Future getCameraPosition() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, 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 60096d9cf3af..eade30e49f67 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 @@ -235,6 +235,19 @@ class PlatformMarker { final String? clusterManagerId; } +/// Pigeon equivalent of the Point of Interest class. +class PlatformPointOfInterest { + PlatformPointOfInterest({ + required this.position, + this.name, + required this.placeId, + }); + + final PlatformLatLng position; + final String? name; + final String placeId; +} + /// Pigeon equivalent of the Polygon class. class PlatformPolygon { PlatformPolygon({ @@ -806,6 +819,9 @@ abstract class MapsCallbackApi { /// Called when a marker cluster is tapped. void onClusterTap(PlatformCluster cluster); + /// Called when a POI is tapped. + void onPoiTap(PlatformPointOfInterest poi); + /// Called when a polygon is tapped. void onPolygonTap(String polygonId); 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 d721130dfee1..bac69828a9a9 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.18.12 +version: 2.19.0 environment: sdk: ^3.9.0 @@ -21,7 +21,7 @@ dependencies: flutter: sdk: flutter flutter_plugin_android_lifecycle: ^2.0.1 - google_maps_flutter_platform_interface: ^2.13.0 + google_maps_flutter_platform_interface: ^2.15.0 stream_transform: ^2.0.0 dev_dependencies: @@ -37,3 +37,6 @@ topics: - google-maps - google-maps-flutter - map +dependency_overrides: + google_maps_flutter_platform_interface: + path: ../google_maps_flutter_platform_interface 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 403adf3df6c6..882b3ff4d633 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 @@ -1496,4 +1496,35 @@ void main() { reason: 'Should pass mapId in PlatformView creation message', ); }); + + test('onPoiTap sends events to correct stream', () async { + const mapId = 1; + final fakePosition = PlatformLatLng(latitude: 12.34, longitude: 56.78); + const fakeName = 'Googleplex'; + const fakePlaceId = 'iso_id_123'; + + final maps = GoogleMapsFlutterAndroid(); + final HostMapMessageHandler callbackHandler = maps.ensureHandlerInitialized( + mapId, + ); + + final stream = StreamQueue(maps.onPoiTap(mapId: mapId)); + + callbackHandler.onPoiTap( + PlatformPointOfInterest( + position: fakePosition, + name: fakeName, + placeId: fakePlaceId, + ), + ); + + final MapPoiTapEvent event = await stream.next; + expect(event.mapId, mapId); + + final PointOfInterest poi = event.value; + expect(poi.position.latitude, fakePosition.latitude); + expect(poi.position.longitude, fakePosition.longitude); + expect(poi.name, fakeName); + expect(poi.placeId, fakePlaceId); + }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md index 3338803175ed..234dfa5e1170 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md @@ -1,6 +1,6 @@ -## 2.17.1 +## 2.18.0 -* Refactors code for improved testability. +* Implements `onPoiTap` support for iOS using `didTapPOIWithPlaceID`. ## 2.17.0 diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/lib/example_google_map.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/lib/example_google_map.dart index 152f83c16f38..5fc64a32f02c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/lib/example_google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/lib/example_google_map.dart @@ -106,6 +106,9 @@ class ExampleGoogleMapController { .listen( (MapLongPressEvent e) => _googleMapState.onLongPress(e.position), ); + GoogleMapsFlutterPlatform.instance + .onPoiTap(mapId: mapId) + .listen((MapPoiTapEvent e) => _googleMapState.onPoiTap(e.value)); GoogleMapsFlutterPlatform.instance .onClusterTap(mapId: mapId) .listen((ClusterTapEvent e) => _googleMapState.onClusterTap(e.value)); @@ -303,6 +306,7 @@ class ExampleGoogleMap extends StatefulWidget { this.trafficEnabled = false, this.buildingsEnabled = true, this.markers = const {}, + this.onPoiTap, this.polygons = const {}, this.polylines = const {}, this.circles = const {}, @@ -365,6 +369,9 @@ class ExampleGoogleMap extends StatefulWidget { /// Markers to be placed on the map. final Set markers; + /// Point of Interest Callback + final void Function(PointOfInterest poi)? onPoiTap; + /// Polygons to be placed on the map. final Set polygons; @@ -640,6 +647,10 @@ class _ExampleGoogleMapState extends State { widget.onTap?.call(position); } + void onPoiTap(PointOfInterest poi) { + widget.onPoiTap?.call(poi); + } + void onLongPress(LatLng position) { widget.onLongPress?.call(position); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml index 72b3f21ed9ca..e2b9b6898439 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: # The example app is bundled with the plugin so we use a path dependency on # the parent directory to use the current plugin's version. path: ../ - google_maps_flutter_platform_interface: ^2.13.0 + google_maps_flutter_platform_interface: ^2.15.0 dev_dependencies: flutter_test: @@ -31,3 +31,6 @@ flutter: uses-material-design: true assets: - assets/ +dependency_overrides: + google_maps_flutter_platform_interface: + path: ../../google_maps_flutter_platform_interface diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart index 261fc473e8bb..ea6030705316 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:async'; import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:google_maps_flutter_example/example_google_map.dart'; @@ -173,4 +174,35 @@ void main() { await tester.pumpAndSettle(); }); + testWidgets('onPoiTap callback is called', (WidgetTester tester) async { + PointOfInterest? tappedPoi; + final mapCreatedCompleter = Completer(); + + await tester.pumpWidget( + Directionality( + textDirection: TextDirection.ltr, + child: ExampleGoogleMap( + initialCameraPosition: const CameraPosition(target: LatLng(0, 0)), + onPoiTap: (PointOfInterest poi) => tappedPoi = poi, + onMapCreated: (_) => mapCreatedCompleter.complete(), + ), + ), + ); + + await mapCreatedCompleter.future; + + const poi = PointOfInterest( + position: LatLng(10.0, 10.0), + name: 'Test POI', + placeId: 'test_id_123', + ); + + platform.mapEventStreamController.add(MapPoiTapEvent(0, poi)); + + await tester.pump(); + + expect(tappedPoi, poi); + expect(tappedPoi!.name, 'Test POI'); + expect(tappedPoi!.placeId, 'test_id_123'); + }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/test/fake_google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/test/fake_google_maps_flutter_platform.dart index 899a7709c548..ed0a7f354f6a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/test/fake_google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/test/fake_google_maps_flutter_platform.dart @@ -234,6 +234,11 @@ class FakeGoogleMapsFlutterPlatform extends GoogleMapsFlutterPlatform { return mapEventStreamController.stream.whereType(); } + @override + Stream onPoiTap({required int mapId}) { + return mapEventStreamController.stream.whereType(); + } + @override Stream onPolylineTap({required int mapId}) { return mapEventStreamController.stream.whereType(); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m index c265785d624e..e2e0b666e8b4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m @@ -560,6 +560,20 @@ - (void)mapView:(GMSMapView *)mapView didTapAtCoordinate:(CLLocationCoordinate2D [self.mapEventHandler didTapAtPosition:FGMGetPigeonLatLngForCoordinate(coordinate)]; } +- (void)mapView:(GMSMapView *)mapView + didTapPOIWithPlaceID:(NSString *)placeID + name:(NSString *)name + location:(CLLocationCoordinate2D)location { + FGMPlatformPointOfInterest *poi = + [FGMPlatformPointOfInterest makeWithPosition:FGMGetPigeonLatLngForCoordinate(location) + name:name + placeId:placeID]; + + [self.dartCallbackHandler didTapPointOfInterest:poi + completion:^(FlutterError *_Nullable _){ + }]; +} + - (void)mapView:(GMSMapView *)mapView didLongPressAtCoordinate:(CLLocationCoordinate2D)coordinate { [self.mapEventHandler didLongPressAtPosition:FGMGetPigeonLatLngForCoordinate(coordinate)]; } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m index e833e2f24f42..60d18f1a8c67 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m @@ -1,19 +1,15 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.5), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "google_maps_flutter_pigeon_messages.g.h" #if TARGET_OS_OSX -#import +@import FlutterMacOS; #else -#import -#endif - -#if !__has_feature(objc_arc) -#error File requires ARC to be enabled. +@import Flutter; #endif static NSArray *wrapResult(id result, FlutterError *error) { @@ -191,6 +187,12 @@ + (nullable FGMPlatformMarker *)nullableFromList:(NSArray *)list; - (NSArray *)toList; @end +@interface FGMPlatformPointOfInterest () ++ (FGMPlatformPointOfInterest *)fromList:(NSArray *)list; ++ (nullable FGMPlatformPointOfInterest *)nullableFromList:(NSArray *)list; +- (NSArray *)toList; +@end + @interface FGMPlatformPolygon () + (FGMPlatformPolygon *)fromList:(NSArray *)list; + (nullable FGMPlatformPolygon *)nullableFromList:(NSArray *)list; @@ -878,6 +880,35 @@ + (nullable FGMPlatformMarker *)nullableFromList:(NSArray *)list { } @end +@implementation FGMPlatformPointOfInterest ++ (instancetype)makeWithPosition:(FGMPlatformLatLng *)position + name:(NSString *)name + placeId:(NSString *)placeId { + FGMPlatformPointOfInterest *pigeonResult = [[FGMPlatformPointOfInterest alloc] init]; + pigeonResult.position = position; + pigeonResult.name = name; + pigeonResult.placeId = placeId; + return pigeonResult; +} ++ (FGMPlatformPointOfInterest *)fromList:(NSArray *)list { + FGMPlatformPointOfInterest *pigeonResult = [[FGMPlatformPointOfInterest alloc] init]; + pigeonResult.position = GetNullableObjectAtIndex(list, 0); + pigeonResult.name = GetNullableObjectAtIndex(list, 1); + pigeonResult.placeId = GetNullableObjectAtIndex(list, 2); + return pigeonResult; +} ++ (nullable FGMPlatformPointOfInterest *)nullableFromList:(NSArray *)list { + return (list) ? [FGMPlatformPointOfInterest fromList:list] : nil; +} +- (NSArray *)toList { + return @[ + self.position ?: [NSNull null], + self.name ?: [NSNull null], + self.placeId ?: [NSNull null], + ]; +} +@end + @implementation FGMPlatformPolygon + (instancetype)makeWithPolygonId:(NSString *)polygonId consumesTapEvents:(BOOL)consumesTapEvents @@ -1795,52 +1826,54 @@ - (nullable id)readValueOfType:(UInt8)type { case 150: return [FGMPlatformMarker fromList:[self readValue]]; case 151: - return [FGMPlatformPolygon fromList:[self readValue]]; + return [FGMPlatformPointOfInterest fromList:[self readValue]]; case 152: - return [FGMPlatformPolyline fromList:[self readValue]]; + return [FGMPlatformPolygon fromList:[self readValue]]; case 153: - return [FGMPlatformPatternItem fromList:[self readValue]]; + return [FGMPlatformPolyline fromList:[self readValue]]; case 154: - return [FGMPlatformTile fromList:[self readValue]]; + return [FGMPlatformPatternItem fromList:[self readValue]]; case 155: - return [FGMPlatformTileOverlay fromList:[self readValue]]; + return [FGMPlatformTile fromList:[self readValue]]; case 156: - return [FGMPlatformEdgeInsets fromList:[self readValue]]; + return [FGMPlatformTileOverlay fromList:[self readValue]]; case 157: - return [FGMPlatformLatLng fromList:[self readValue]]; + return [FGMPlatformEdgeInsets fromList:[self readValue]]; case 158: - return [FGMPlatformLatLngBounds fromList:[self readValue]]; + return [FGMPlatformLatLng fromList:[self readValue]]; case 159: - return [FGMPlatformCameraTargetBounds fromList:[self readValue]]; + return [FGMPlatformLatLngBounds fromList:[self readValue]]; case 160: - return [FGMPlatformGroundOverlay fromList:[self readValue]]; + return [FGMPlatformCameraTargetBounds fromList:[self readValue]]; case 161: - return [FGMPlatformMapViewCreationParams fromList:[self readValue]]; + return [FGMPlatformGroundOverlay fromList:[self readValue]]; case 162: - return [FGMPlatformMapConfiguration fromList:[self readValue]]; + return [FGMPlatformMapViewCreationParams fromList:[self readValue]]; case 163: - return [FGMPlatformPoint fromList:[self readValue]]; + return [FGMPlatformMapConfiguration fromList:[self readValue]]; case 164: - return [FGMPlatformSize fromList:[self readValue]]; + return [FGMPlatformPoint fromList:[self readValue]]; case 165: - return [FGMPlatformColor fromList:[self readValue]]; + return [FGMPlatformSize fromList:[self readValue]]; case 166: - return [FGMPlatformTileLayer fromList:[self readValue]]; + return [FGMPlatformColor fromList:[self readValue]]; case 167: - return [FGMPlatformZoomRange fromList:[self readValue]]; + return [FGMPlatformTileLayer fromList:[self readValue]]; case 168: - return [FGMPlatformBitmap fromList:[self readValue]]; + return [FGMPlatformZoomRange fromList:[self readValue]]; case 169: - return [FGMPlatformBitmapDefaultMarker fromList:[self readValue]]; + return [FGMPlatformBitmap fromList:[self readValue]]; case 170: - return [FGMPlatformBitmapBytes fromList:[self readValue]]; + return [FGMPlatformBitmapDefaultMarker fromList:[self readValue]]; case 171: - return [FGMPlatformBitmapAsset fromList:[self readValue]]; + return [FGMPlatformBitmapBytes fromList:[self readValue]]; case 172: - return [FGMPlatformBitmapAssetImage fromList:[self readValue]]; + return [FGMPlatformBitmapAsset fromList:[self readValue]]; case 173: - return [FGMPlatformBitmapAssetMap fromList:[self readValue]]; + return [FGMPlatformBitmapAssetImage fromList:[self readValue]]; case 174: + return [FGMPlatformBitmapAssetMap fromList:[self readValue]]; + case 175: return [FGMPlatformBitmapBytesMap fromList:[self readValue]]; default: return [super readValueOfType:type]; @@ -1922,78 +1955,81 @@ - (void)writeValue:(id)value { } else if ([value isKindOfClass:[FGMPlatformMarker class]]) { [self writeByte:150]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) { + } else if ([value isKindOfClass:[FGMPlatformPointOfInterest class]]) { [self writeByte:151]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) { + } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) { [self writeByte:152]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) { + } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) { [self writeByte:153]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTile class]]) { + } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) { [self writeByte:154]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) { + } else if ([value isKindOfClass:[FGMPlatformTile class]]) { [self writeByte:155]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) { + } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) { [self writeByte:156]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) { + } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) { [self writeByte:157]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) { + } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) { [self writeByte:158]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) { + } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) { [self writeByte:159]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) { [self writeByte:160]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) { + } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) { [self writeByte:161]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) { + } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) { [self writeByte:162]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPoint class]]) { + } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) { [self writeByte:163]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformSize class]]) { + } else if ([value isKindOfClass:[FGMPlatformPoint class]]) { [self writeByte:164]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformColor class]]) { + } else if ([value isKindOfClass:[FGMPlatformSize class]]) { [self writeByte:165]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) { + } else if ([value isKindOfClass:[FGMPlatformColor class]]) { [self writeByte:166]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) { + } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) { [self writeByte:167]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) { + } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) { [self writeByte:168]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) { [self writeByte:169]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) { [self writeByte:170]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) { [self writeByte:171]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) { [self writeByte:172]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) { [self writeByte:173]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) { [self writeByte:174]; [self writeValue:[value toList]]; + } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) { + [self writeByte:175]; + [self writeValue:[value toList]]; } else { [super writeValue:value]; } @@ -3048,6 +3084,31 @@ - (void)didTapGroundOverlayWithIdentifier:(NSString *)arg_groundOverlayId } }]; } +- (void)didTapPointOfInterest:(FGMPlatformPointOfInterest *)arg_poi + completion:(void (^)(FlutterError *_Nullable))completion { + NSString *channelName = [NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap", + _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + messageChannelWithName:channelName + binaryMessenger:self.binaryMessenger + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + [channel sendMessage:@[ arg_poi ?: [NSNull null] ] + reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] + message:reply[1] + details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} - (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId location:(FGMPlatformPoint *)arg_location zoom:(NSInteger)arg_zoom diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h index db11f425c37c..b1d81e6cc9e2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h @@ -1,10 +1,10 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.5), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon -#import +@import Foundation; @protocol FlutterBinaryMessenger; @protocol FlutterMessageCodec; @@ -84,6 +84,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @class FGMPlatformCluster; @class FGMPlatformClusterManager; @class FGMPlatformMarker; +@class FGMPlatformPointOfInterest; @class FGMPlatformPolygon; @class FGMPlatformPolyline; @class FGMPlatformPatternItem; @@ -338,6 +339,18 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @property(nonatomic, copy, nullable) NSString *clusterManagerId; @end +/// Pigeon equivalent of the Point of Interest class. +@interface FGMPlatformPointOfInterest : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithPosition:(FGMPlatformLatLng *)position + name:(NSString *)name + placeId:(NSString *)placeId; +@property(nonatomic, strong) FGMPlatformLatLng *position; +@property(nonatomic, copy) NSString *name; +@property(nonatomic, copy) NSString *placeId; +@end + /// Pigeon equivalent of the Polygon class. @interface FGMPlatformPolygon : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. @@ -871,6 +884,9 @@ extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger /// Called when a ground overlay is tapped. - (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a point of interest is tapped. +- (void)didTapPointOfInterest:(FGMPlatformPointOfInterest *)poi + completion:(void (^)(FlutterError *_Nullable))completion; /// Called to get data for a map tile. - (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId location:(FGMPlatformPoint *)location diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.orig b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.orig new file mode 100644 index 000000000000..e52fe5cfa423 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.orig @@ -0,0 +1,901 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +@import Foundation; + +@protocol FlutterBinaryMessenger; +@protocol FlutterMessageCodec; +@class FlutterError; +@class FlutterStandardTypedData; + +NS_ASSUME_NONNULL_BEGIN + +/// Pigeon equivalent of MapType +typedef NS_ENUM(NSUInteger, FGMPlatformMapType) { + FGMPlatformMapTypeNone = 0, + FGMPlatformMapTypeNormal = 1, + FGMPlatformMapTypeSatellite = 2, + FGMPlatformMapTypeTerrain = 3, + FGMPlatformMapTypeHybrid = 4, +}; + +/// Wrapper for FGMPlatformMapType to allow for nullability. +@interface FGMPlatformMapTypeBox : NSObject +@property(nonatomic, assign) FGMPlatformMapType value; +- (instancetype)initWithValue:(FGMPlatformMapType)value; +@end + +/// Join types for polyline joints. +typedef NS_ENUM(NSUInteger, FGMPlatformJointType) { + FGMPlatformJointTypeMitered = 0, + FGMPlatformJointTypeBevel = 1, + FGMPlatformJointTypeRound = 2, +}; + +/// Wrapper for FGMPlatformJointType to allow for nullability. +@interface FGMPlatformJointTypeBox : NSObject +@property(nonatomic, assign) FGMPlatformJointType value; +- (instancetype)initWithValue:(FGMPlatformJointType)value; +@end + +/// Enumeration of possible types for PatternItem. +typedef NS_ENUM(NSUInteger, FGMPlatformPatternItemType) { + FGMPlatformPatternItemTypeDot = 0, + FGMPlatformPatternItemTypeDash = 1, + FGMPlatformPatternItemTypeGap = 2, +}; + +/// Wrapper for FGMPlatformPatternItemType to allow for nullability. +@interface FGMPlatformPatternItemTypeBox : NSObject +@property(nonatomic, assign) FGMPlatformPatternItemType value; +- (instancetype)initWithValue:(FGMPlatformPatternItemType)value; +@end + +/// Pigeon equivalent of [MapBitmapScaling]. +typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + FGMPlatformMapBitmapScalingAuto = 0, + FGMPlatformMapBitmapScalingNone = 1, +}; + +/// Wrapper for FGMPlatformMapBitmapScaling to allow for nullability. +@interface FGMPlatformMapBitmapScalingBox : NSObject +@property(nonatomic, assign) FGMPlatformMapBitmapScaling value; +- (instancetype)initWithValue:(FGMPlatformMapBitmapScaling)value; +@end + +@class FGMPlatformCameraPosition; +@class FGMPlatformCameraUpdate; +@class FGMPlatformCameraUpdateNewCameraPosition; +@class FGMPlatformCameraUpdateNewLatLng; +@class FGMPlatformCameraUpdateNewLatLngBounds; +@class FGMPlatformCameraUpdateNewLatLngZoom; +@class FGMPlatformCameraUpdateScrollBy; +@class FGMPlatformCameraUpdateZoomBy; +@class FGMPlatformCameraUpdateZoom; +@class FGMPlatformCameraUpdateZoomTo; +@class FGMPlatformCircle; +@class FGMPlatformHeatmap; +@class FGMPlatformHeatmapGradient; +@class FGMPlatformWeightedLatLng; +@class FGMPlatformInfoWindow; +@class FGMPlatformCluster; +@class FGMPlatformClusterManager; +@class FGMPlatformMarker; +@class FGMPlatformPointOfInterest; +@class FGMPlatformPolygon; +@class FGMPlatformPolyline; +@class FGMPlatformPatternItem; +@class FGMPlatformTile; +@class FGMPlatformTileOverlay; +@class FGMPlatformEdgeInsets; +@class FGMPlatformLatLng; +@class FGMPlatformLatLngBounds; +@class FGMPlatformCameraTargetBounds; +@class FGMPlatformGroundOverlay; +@class FGMPlatformMapViewCreationParams; +@class FGMPlatformMapConfiguration; +@class FGMPlatformPoint; +@class FGMPlatformSize; +@class FGMPlatformColor; +@class FGMPlatformTileLayer; +@class FGMPlatformZoomRange; +@class FGMPlatformBitmap; +@class FGMPlatformBitmapDefaultMarker; +@class FGMPlatformBitmapBytes; +@class FGMPlatformBitmapAsset; +@class FGMPlatformBitmapAssetImage; +@class FGMPlatformBitmapAssetMap; +@class FGMPlatformBitmapBytesMap; + +/// Pigeon representatation of a CameraPosition. +@interface FGMPlatformCameraPosition : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithBearing:(double )bearing + target:(FGMPlatformLatLng *)target + tilt:(double )tilt + zoom:(double )zoom; +@property(nonatomic, assign) double bearing; +@property(nonatomic, strong) FGMPlatformLatLng * target; +@property(nonatomic, assign) double tilt; +@property(nonatomic, assign) double zoom; +@end + +/// Pigeon representation of a CameraUpdate. +@interface FGMPlatformCameraUpdate : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithCameraUpdate:(id )cameraUpdate; +/// This Object must be one of the classes below prefixed with +/// PlatformCameraUpdate. Each such class represents a different type of +/// camera update, and each holds a different set of data, preventing the +/// use of a single unified class. +@property(nonatomic, strong) id cameraUpdate; +@end + +/// Pigeon equivalent of NewCameraPosition +@interface FGMPlatformCameraUpdateNewCameraPosition : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition; +@property(nonatomic, strong) FGMPlatformCameraPosition * cameraPosition; +@end + +/// Pigeon equivalent of NewLatLng +@interface FGMPlatformCameraUpdateNewLatLng : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng; +@property(nonatomic, strong) FGMPlatformLatLng * latLng; +@end + +/// Pigeon equivalent of NewLatLngBounds +@interface FGMPlatformCameraUpdateNewLatLngBounds : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds + padding:(double )padding; +@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, assign) double padding; +@end + +/// Pigeon equivalent of NewLatLngZoom +@interface FGMPlatformCameraUpdateNewLatLngZoom : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng + zoom:(double )zoom; +@property(nonatomic, strong) FGMPlatformLatLng * latLng; +@property(nonatomic, assign) double zoom; +@end + +/// Pigeon equivalent of ScrollBy +@interface FGMPlatformCameraUpdateScrollBy : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithDx:(double )dx + dy:(double )dy; +@property(nonatomic, assign) double dx; +@property(nonatomic, assign) double dy; +@end + +/// Pigeon equivalent of ZoomBy +@interface FGMPlatformCameraUpdateZoomBy : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithAmount:(double )amount + focus:(nullable FGMPlatformPoint *)focus; +@property(nonatomic, assign) double amount; +@property(nonatomic, strong, nullable) FGMPlatformPoint * focus; +@end + +/// Pigeon equivalent of ZoomIn/ZoomOut +@interface FGMPlatformCameraUpdateZoom : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithOut:(BOOL )out; +@property(nonatomic, assign) BOOL out; +@end + +/// Pigeon equivalent of ZoomTo +@interface FGMPlatformCameraUpdateZoomTo : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithZoom:(double )zoom; +@property(nonatomic, assign) double zoom; +@end + +/// Pigeon equivalent of the Circle class. +@interface FGMPlatformCircle : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithConsumeTapEvents:(BOOL )consumeTapEvents + fillColor:(FGMPlatformColor *)fillColor + strokeColor:(FGMPlatformColor *)strokeColor + visible:(BOOL )visible + strokeWidth:(NSInteger )strokeWidth + zIndex:(double )zIndex + center:(FGMPlatformLatLng *)center + radius:(double )radius + circleId:(NSString *)circleId; +@property(nonatomic, assign) BOOL consumeTapEvents; +@property(nonatomic, strong) FGMPlatformColor * fillColor; +@property(nonatomic, strong) FGMPlatformColor * strokeColor; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger strokeWidth; +@property(nonatomic, assign) double zIndex; +@property(nonatomic, strong) FGMPlatformLatLng * center; +@property(nonatomic, assign) double radius; +@property(nonatomic, copy) NSString * circleId; +@end + +/// Pigeon equivalent of the Heatmap class. +@interface FGMPlatformHeatmap : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithHeatmapId:(NSString *)heatmapId + data:(NSArray *)data + gradient:(nullable FGMPlatformHeatmapGradient *)gradient + opacity:(double )opacity + radius:(NSInteger )radius + minimumZoomIntensity:(NSInteger )minimumZoomIntensity + maximumZoomIntensity:(NSInteger )maximumZoomIntensity; +@property(nonatomic, copy) NSString * heatmapId; +@property(nonatomic, copy) NSArray * data; +@property(nonatomic, strong, nullable) FGMPlatformHeatmapGradient * gradient; +@property(nonatomic, assign) double opacity; +@property(nonatomic, assign) NSInteger radius; +@property(nonatomic, assign) NSInteger minimumZoomIntensity; +@property(nonatomic, assign) NSInteger maximumZoomIntensity; +@end + +/// Pigeon equivalent of the HeatmapGradient class. +/// +/// The GMUGradient structure is slightly different from HeatmapGradient, so +/// this matches the iOS API so that conversion can be done on the Dart side +/// where the structures are easier to work with. +@interface FGMPlatformHeatmapGradient : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithColors:(NSArray *)colors + startPoints:(NSArray *)startPoints + colorMapSize:(NSInteger )colorMapSize; +@property(nonatomic, copy) NSArray * colors; +@property(nonatomic, copy) NSArray * startPoints; +@property(nonatomic, assign) NSInteger colorMapSize; +@end + +/// Pigeon equivalent of the WeightedLatLng class. +@interface FGMPlatformWeightedLatLng : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point + weight:(double )weight; +@property(nonatomic, strong) FGMPlatformLatLng * point; +@property(nonatomic, assign) double weight; +@end + +/// Pigeon equivalent of the InfoWindow class. +@interface FGMPlatformInfoWindow : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithTitle:(nullable NSString *)title + snippet:(nullable NSString *)snippet + anchor:(FGMPlatformPoint *)anchor; +@property(nonatomic, copy, nullable) NSString * title; +@property(nonatomic, copy, nullable) NSString * snippet; +@property(nonatomic, strong) FGMPlatformPoint * anchor; +@end + +/// Pigeon equivalent of Cluster. +@interface FGMPlatformCluster : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId + position:(FGMPlatformLatLng *)position + bounds:(FGMPlatformLatLngBounds *)bounds + markerIds:(NSArray *)markerIds; +@property(nonatomic, copy) NSString * clusterManagerId; +@property(nonatomic, strong) FGMPlatformLatLng * position; +@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, copy) NSArray * markerIds; +@end + +/// Pigeon equivalent of the ClusterManager class. +@interface FGMPlatformClusterManager : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithIdentifier:(NSString *)identifier; +@property(nonatomic, copy) NSString * identifier; +@end + +/// Pigeon equivalent of the Marker class. +@interface FGMPlatformMarker : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithAlpha:(double )alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL )consumeTapEvents + draggable:(BOOL )draggable + flat:(BOOL )flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double )rotation + visible:(BOOL )visible + zIndex:(NSInteger )zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId; +@property(nonatomic, assign) double alpha; +@property(nonatomic, strong) FGMPlatformPoint * anchor; +@property(nonatomic, assign) BOOL consumeTapEvents; +@property(nonatomic, assign) BOOL draggable; +@property(nonatomic, assign) BOOL flat; +@property(nonatomic, strong) FGMPlatformBitmap * icon; +@property(nonatomic, strong) FGMPlatformInfoWindow * infoWindow; +@property(nonatomic, strong) FGMPlatformLatLng * position; +@property(nonatomic, assign) double rotation; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, copy) NSString * markerId; +@property(nonatomic, copy, nullable) NSString * clusterManagerId; +@end + +/// Pigeon equivalent of the Point of Interest class. +@interface FGMPlatformPointOfInterest : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithPosition:(FGMPlatformLatLng *)position + name:(NSString *)name + placeId:(NSString *)placeId; +@property(nonatomic, strong) FGMPlatformLatLng * position; +@property(nonatomic, copy) NSString * name; +@property(nonatomic, copy) NSString * placeId; +@end + +/// Pigeon equivalent of the Polygon class. +@interface FGMPlatformPolygon : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithPolygonId:(NSString *)polygonId + consumesTapEvents:(BOOL )consumesTapEvents + fillColor:(FGMPlatformColor *)fillColor + geodesic:(BOOL )geodesic + points:(NSArray *)points + holes:(NSArray *> *)holes + visible:(BOOL )visible + strokeColor:(FGMPlatformColor *)strokeColor + strokeWidth:(NSInteger )strokeWidth + zIndex:(NSInteger )zIndex; +@property(nonatomic, copy) NSString * polygonId; +@property(nonatomic, assign) BOOL consumesTapEvents; +@property(nonatomic, strong) FGMPlatformColor * fillColor; +@property(nonatomic, assign) BOOL geodesic; +@property(nonatomic, copy) NSArray * points; +@property(nonatomic, copy) NSArray *> * holes; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, strong) FGMPlatformColor * strokeColor; +@property(nonatomic, assign) NSInteger strokeWidth; +@property(nonatomic, assign) NSInteger zIndex; +@end + +/// Pigeon equivalent of the Polyline class. +@interface FGMPlatformPolyline : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithPolylineId:(NSString *)polylineId + consumesTapEvents:(BOOL )consumesTapEvents + color:(FGMPlatformColor *)color + geodesic:(BOOL )geodesic + jointType:(FGMPlatformJointType)jointType + patterns:(NSArray *)patterns + points:(NSArray *)points + visible:(BOOL )visible + width:(NSInteger )width + zIndex:(NSInteger )zIndex; +@property(nonatomic, copy) NSString * polylineId; +@property(nonatomic, assign) BOOL consumesTapEvents; +@property(nonatomic, strong) FGMPlatformColor * color; +@property(nonatomic, assign) BOOL geodesic; +/// The joint type. +@property(nonatomic, assign) FGMPlatformJointType jointType; +/// The pattern data, as a list of pattern items. +@property(nonatomic, copy) NSArray * patterns; +@property(nonatomic, copy) NSArray * points; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger width; +@property(nonatomic, assign) NSInteger zIndex; +@end + +/// Pigeon equivalent of the PatternItem class. +@interface FGMPlatformPatternItem : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithType:(FGMPlatformPatternItemType)type + length:(nullable NSNumber *)length; +@property(nonatomic, assign) FGMPlatformPatternItemType type; +@property(nonatomic, strong, nullable) NSNumber * length; +@end + +/// Pigeon equivalent of the Tile class. +@interface FGMPlatformTile : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithWidth:(NSInteger )width + height:(NSInteger )height + data:(nullable FlutterStandardTypedData *)data; +@property(nonatomic, assign) NSInteger width; +@property(nonatomic, assign) NSInteger height; +@property(nonatomic, strong, nullable) FlutterStandardTypedData * data; +@end + +/// Pigeon equivalent of the TileOverlay class. +@interface FGMPlatformTileOverlay : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId + fadeIn:(BOOL )fadeIn + transparency:(double )transparency + zIndex:(NSInteger )zIndex + visible:(BOOL )visible + tileSize:(NSInteger )tileSize; +@property(nonatomic, copy) NSString * tileOverlayId; +@property(nonatomic, assign) BOOL fadeIn; +@property(nonatomic, assign) double transparency; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger tileSize; +@end + +/// Pigeon equivalent of Flutter's EdgeInsets. +@interface FGMPlatformEdgeInsets : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithTop:(double )top + bottom:(double )bottom + left:(double )left + right:(double )right; +@property(nonatomic, assign) double top; +@property(nonatomic, assign) double bottom; +@property(nonatomic, assign) double left; +@property(nonatomic, assign) double right; +@end + +/// Pigeon equivalent of LatLng. +@interface FGMPlatformLatLng : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithLatitude:(double )latitude + longitude:(double )longitude; +@property(nonatomic, assign) double latitude; +@property(nonatomic, assign) double longitude; +@end + +/// Pigeon equivalent of LatLngBounds. +@interface FGMPlatformLatLngBounds : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast + southwest:(FGMPlatformLatLng *)southwest; +@property(nonatomic, strong) FGMPlatformLatLng * northeast; +@property(nonatomic, strong) FGMPlatformLatLng * southwest; +@end + +/// 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]). +@interface FGMPlatformCameraTargetBounds : NSObject ++ (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds; +@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; +@end + +/// Pigeon equivalent of the GroundOverlay class. +@interface FGMPlatformGroundOverlay : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId + image:(FGMPlatformBitmap *)image + position:(nullable FGMPlatformLatLng *)position + bounds:(nullable FGMPlatformLatLngBounds *)bounds + anchor:(nullable FGMPlatformPoint *)anchor + transparency:(double )transparency + bearing:(double )bearing + zIndex:(NSInteger )zIndex + visible:(BOOL )visible + clickable:(BOOL )clickable + zoomLevel:(nullable NSNumber *)zoomLevel; +@property(nonatomic, copy) NSString * groundOverlayId; +@property(nonatomic, strong) FGMPlatformBitmap * image; +@property(nonatomic, strong, nullable) FGMPlatformLatLng * position; +@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, strong, nullable) FGMPlatformPoint * anchor; +@property(nonatomic, assign) double transparency; +@property(nonatomic, assign) double bearing; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) BOOL clickable; +@property(nonatomic, strong, nullable) NSNumber * zoomLevel; +@end + +/// Information passed to the platform view creation. +@interface FGMPlatformMapViewCreationParams : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition + mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration + initialCircles:(NSArray *)initialCircles + initialMarkers:(NSArray *)initialMarkers + initialPolygons:(NSArray *)initialPolygons + initialPolylines:(NSArray *)initialPolylines + initialHeatmaps:(NSArray *)initialHeatmaps + initialTileOverlays:(NSArray *)initialTileOverlays + initialClusterManagers:(NSArray *)initialClusterManagers + initialGroundOverlays:(NSArray *)initialGroundOverlays; +@property(nonatomic, strong) FGMPlatformCameraPosition * initialCameraPosition; +@property(nonatomic, strong) FGMPlatformMapConfiguration * mapConfiguration; +@property(nonatomic, copy) NSArray * initialCircles; +@property(nonatomic, copy) NSArray * initialMarkers; +@property(nonatomic, copy) NSArray * initialPolygons; +@property(nonatomic, copy) NSArray * initialPolylines; +@property(nonatomic, copy) NSArray * initialHeatmaps; +@property(nonatomic, copy) NSArray * initialTileOverlays; +@property(nonatomic, copy) NSArray * initialClusterManagers; +@property(nonatomic, copy) NSArray * initialGroundOverlays; +@end + +/// Pigeon equivalent of MapConfiguration. +@interface FGMPlatformMapConfiguration : NSObject ++ (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style; +@property(nonatomic, strong, nullable) NSNumber * compassEnabled; +@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds * cameraTargetBounds; +@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox * mapType; +@property(nonatomic, strong, nullable) FGMPlatformZoomRange * minMaxZoomPreference; +@property(nonatomic, strong, nullable) NSNumber * rotateGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * scrollGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * tiltGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * trackCameraPosition; +@property(nonatomic, strong, nullable) NSNumber * zoomGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * myLocationEnabled; +@property(nonatomic, strong, nullable) NSNumber * myLocationButtonEnabled; +@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets * padding; +@property(nonatomic, strong, nullable) NSNumber * indoorViewEnabled; +@property(nonatomic, strong, nullable) NSNumber * trafficEnabled; +@property(nonatomic, strong, nullable) NSNumber * buildingsEnabled; +@property(nonatomic, copy, nullable) NSString * mapId; +@property(nonatomic, copy, nullable) NSString * style; +@end + +/// Pigeon representation of an x,y coordinate. +@interface FGMPlatformPoint : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithX:(double )x + y:(double )y; +@property(nonatomic, assign) double x; +@property(nonatomic, assign) double y; +@end + +/// Pigeon representation of a size. +@interface FGMPlatformSize : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithWidth:(double )width + height:(double )height; +@property(nonatomic, assign) double width; +@property(nonatomic, assign) double height; +@end + +/// Pigeon representation of a color. +@interface FGMPlatformColor : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithRed:(double )red + green:(double )green + blue:(double )blue + alpha:(double )alpha; +@property(nonatomic, assign) double red; +@property(nonatomic, assign) double green; +@property(nonatomic, assign) double blue; +@property(nonatomic, assign) double alpha; +@end + +/// Pigeon equivalent of GMSTileLayer properties. +@interface FGMPlatformTileLayer : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithVisible:(BOOL )visible + fadeIn:(BOOL )fadeIn + opacity:(double )opacity + zIndex:(NSInteger )zIndex; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) BOOL fadeIn; +@property(nonatomic, assign) double opacity; +@property(nonatomic, assign) NSInteger zIndex; +@end + +/// Pigeon equivalent of MinMaxZoomPreference. +@interface FGMPlatformZoomRange : NSObject ++ (instancetype)makeWithMin:(nullable NSNumber *)min + max:(nullable NSNumber *)max; +@property(nonatomic, strong, nullable) NSNumber * min; +@property(nonatomic, strong, nullable) NSNumber * max; +@end + +/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint +/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which +/// may hold the pigeon equivalent type of any of them. +@interface FGMPlatformBitmap : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithBitmap:(id )bitmap; +/// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], +/// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], +/// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. +/// As Pigeon does not currently support data class inheritance, this +/// approach allows for the different bitmap implementations to be valid +/// argument and return types of the API methods. See +/// https://github.com/flutter/flutter/issues/117819. +@property(nonatomic, strong) id bitmap; +@end + +/// Pigeon equivalent of [DefaultMarker]. +@interface FGMPlatformBitmapDefaultMarker : NSObject ++ (instancetype)makeWithHue:(nullable NSNumber *)hue; +@property(nonatomic, strong, nullable) NSNumber * hue; +@end + +/// Pigeon equivalent of [BytesBitmap]. +@interface FGMPlatformBitmapBytes : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData + size:(nullable FGMPlatformSize *)size; +@property(nonatomic, strong) FlutterStandardTypedData * byteData; +@property(nonatomic, strong, nullable) FGMPlatformSize * size; +@end + +/// Pigeon equivalent of [AssetBitmap]. +@interface FGMPlatformBitmapAsset : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithName:(NSString *)name + pkg:(nullable NSString *)pkg; +@property(nonatomic, copy) NSString * name; +@property(nonatomic, copy, nullable) NSString * pkg; +@end + +/// Pigeon equivalent of [AssetImageBitmap]. +@interface FGMPlatformBitmapAssetImage : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithName:(NSString *)name + scale:(double )scale + size:(nullable FGMPlatformSize *)size; +@property(nonatomic, copy) NSString * name; +@property(nonatomic, assign) double scale; +@property(nonatomic, strong, nullable) FGMPlatformSize * size; +@end + +/// Pigeon equivalent of [AssetMapBitmap]. +@interface FGMPlatformBitmapAssetMap : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithAssetName:(NSString *)assetName + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double )imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height; +@property(nonatomic, copy) NSString * assetName; +@property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; +@property(nonatomic, assign) double imagePixelRatio; +@property(nonatomic, strong, nullable) NSNumber * width; +@property(nonatomic, strong, nullable) NSNumber * height; +@end + +/// Pigeon equivalent of [BytesMapBitmap]. +@interface FGMPlatformBitmapBytesMap : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double )imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height; +@property(nonatomic, strong) FlutterStandardTypedData * byteData; +@property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; +@property(nonatomic, assign) double imagePixelRatio; +@property(nonatomic, strong, nullable) NSNumber * width; +@property(nonatomic, strong, nullable) NSNumber * height; +@end + +/// The codec used by all APIs. +NSObject *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void); + +/// Interface for non-test interactions with the native SDK. +/// +/// For test-only state queries, see [MapsInspectorApi]. +@protocol FGMMapsApi +/// Returns once the map instance is available. +- (void)waitForMapWithError:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the map's configuration options. +/// +/// Only non-null configuration values will result in updates; options with +/// null values will remain unchanged. +- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration error:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the set of circles on the map. +- (void)updateCirclesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the set of heatmaps on the map. +- (void)updateHeatmapsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the set of custer managers for clusters on the map. +- (void)updateClusterManagersByAdding:(NSArray *)toAdd removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the set of markers on the map. +- (void)updateMarkersByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the set of polygonss on the map. +- (void)updatePolygonsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the set of polylines on the map. +- (void)updatePolylinesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the set of tile overlays on the map. +- (void)updateTileOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +/// Updates the set of ground overlays on the map. +- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; +/// Gets the screen coordinate for the given map location. +/// +/// @return `nil` only when `error != nil`. +- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng error:(FlutterError *_Nullable *_Nonnull)error; +/// Gets the map location for the given screen coordinate. +/// +/// @return `nil` only when `error != nil`. +- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate error:(FlutterError *_Nullable *_Nonnull)error; +/// Gets the map region currently displayed on the map. +/// +/// @return `nil` only when `error != nil`. +- (nullable FGMPlatformLatLngBounds *)visibleMapRegion:(FlutterError *_Nullable *_Nonnull)error; +/// Moves the camera according to [cameraUpdate] immediately, with no +/// animation. +- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate error:(FlutterError *_Nullable *_Nonnull)error; +/// Moves the camera according to [cameraUpdate], animating the update using a +/// duration in milliseconds if provided. +- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate duration:(nullable NSNumber *)durationMilliseconds error:(FlutterError *_Nullable *_Nonnull)error; +/// Gets the current map zoom level. +/// +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)currentZoomLevel:(FlutterError *_Nullable *_Nonnull)error; +/// Show the info window for the marker with the given ID. +- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; +/// Hide the info window for the marker with the given ID. +- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; +/// Returns true if the marker with the given ID is currently displaying its +/// info window. +/// +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; +/// Sets the style to the given map style string, where an empty string +/// indicates that the style should be cleared. +/// +/// If there was an error setting the style, such as an invalid style string, +/// returns the error message. +- (nullable NSString *)setStyle:(NSString *)style error:(FlutterError *_Nullable *_Nonnull)error; +/// Returns the error string from the last attempt to set the map style, if +/// any. +/// +/// This allows checking asynchronously for initial style failures, as there +/// is no way to return failures from map initialization. +- (nullable NSString *)lastStyleError:(FlutterError *_Nullable *_Nonnull)error; +/// Clears the cache of tiles previously requseted from the tile provider. +- (void)clearTileCacheForOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; +/// Takes a snapshot of the map and returns its image data. +- (nullable FlutterStandardTypedData *)takeSnapshotWithError:(FlutterError *_Nullable *_Nonnull)error; +@end + +extern void SetUpFGMMapsApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); + + +/// Interface for calls from the native SDK to Dart. +@interface FGMMapsCallbackApi : NSObject +- (instancetype)initWithBinaryMessenger:(id)binaryMessenger; +- (instancetype)initWithBinaryMessenger:(id)binaryMessenger messageChannelSuffix:(nullable NSString *)messageChannelSuffix; +/// Called when the map camera starts moving. +- (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion; +/// Called when the map camera moves. +- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when the map camera stops moving. +- (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion; +/// Called when the map, not a specifc map object, is tapped. +- (void)didTapAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when the map, not a specifc map object, is long pressed. +- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a marker is tapped. +- (void)didTapMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a marker drag starts. +- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a marker drag updates. +- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a marker drag ends. +- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a marker's info window is tapped. +- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a circle is tapped. +- (void)didTapCircleWithIdentifier:(NSString *)circleId completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a marker cluster is tapped. +- (void)didTapCluster:(FGMPlatformCluster *)cluster completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a polygon is tapped. +- (void)didTapPolygonWithIdentifier:(NSString *)polygonId completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a polyline is tapped. +- (void)didTapPolylineWithIdentifier:(NSString *)polylineId completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a ground overlay is tapped. +- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion; +/// Called when a point of interest is tapped. +- (void)didTapPointOfInterest:(FGMPlatformPointOfInterest *)poi completion:(void (^)(FlutterError *_Nullable))completion; +/// Called to get data for a map tile. +- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId location:(FGMPlatformPoint *)location zoom:(NSInteger)zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion; +@end + + +/// Dummy interface to force generation of the platform view creation params, +/// which are not used in any Pigeon calls, only the platform view creation +/// call made internally by Flutter. +@protocol FGMMapsPlatformViewApi +- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type error:(FlutterError *_Nullable *_Nonnull)error; +@end + +extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); + + +/// Inspector API only intended for use in integration tests. +@protocol FGMMapsInspectorApi +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)areBuildingsEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)areRotateGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)areScrollGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)areTiltGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)areZoomGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)isCompassEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)isMyLocationButtonEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)isTrafficEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformGroundOverlay *)groundOverlayWithIdentifier:(NSString *)groundOverlayId error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId error:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable FGMPlatformZoomRange *)zoomRange:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSArray *)clustersWithIdentifier:(NSString *)clusterManagerId error:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable FGMPlatformCameraPosition *)cameraPosition:(FlutterError *_Nullable *_Nonnull)error; +@end + +extern void SetUpFGMMapsInspectorApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); + +NS_ASSUME_NONNULL_END diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.rej b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.rej new file mode 100644 index 000000000000..2abdb3ac441a --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.rej @@ -0,0 +1,807 @@ +--- packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h ++++ packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h +@@ -114,26 +114,26 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + @interface FGMPlatformCameraPosition : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithBearing:(double )bearing +- target:(FGMPlatformLatLng *)target +- tilt:(double )tilt +- zoom:(double )zoom; +-@property(nonatomic, assign) double bearing; +-@property(nonatomic, strong) FGMPlatformLatLng * target; +-@property(nonatomic, assign) double tilt; +-@property(nonatomic, assign) double zoom; +++ (instancetype)makeWithBearing:(double)bearing ++ target:(FGMPlatformLatLng *)target ++ tilt:(double)tilt ++ zoom:(double)zoom; ++@property(nonatomic, assign) double bearing; ++@property(nonatomic, strong) FGMPlatformLatLng *target; ++@property(nonatomic, assign) double tilt; ++@property(nonatomic, assign) double zoom; + @end + + /// Pigeon representation of a CameraUpdate. + @interface FGMPlatformCameraUpdate : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithCameraUpdate:(id )cameraUpdate; +++ (instancetype)makeWithCameraUpdate:(id)cameraUpdate; + /// This Object must be one of the classes below prefixed with + /// PlatformCameraUpdate. Each such class represents a different type of + /// camera update, and each holds a different set of data, preventing the + /// use of a single unified class. +-@property(nonatomic, strong) id cameraUpdate; ++@property(nonatomic, strong) id cameraUpdate; + @end + + /// Pigeon equivalent of NewCameraPosition +@@ -149,87 +149,83 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; + + (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng; +-@property(nonatomic, strong) FGMPlatformLatLng * latLng; ++@property(nonatomic, strong) FGMPlatformLatLng *latLng; + @end + + /// Pigeon equivalent of NewLatLngBounds + @interface FGMPlatformCameraUpdateNewLatLngBounds : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds +- padding:(double )padding; +-@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; +-@property(nonatomic, assign) double padding; +++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding; ++@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds; ++@property(nonatomic, assign) double padding; + @end + + /// Pigeon equivalent of NewLatLngZoom + @interface FGMPlatformCameraUpdateNewLatLngZoom : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng +- zoom:(double )zoom; +-@property(nonatomic, strong) FGMPlatformLatLng * latLng; +-@property(nonatomic, assign) double zoom; +++ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom; ++@property(nonatomic, strong) FGMPlatformLatLng *latLng; ++@property(nonatomic, assign) double zoom; + @end + + /// Pigeon equivalent of ScrollBy + @interface FGMPlatformCameraUpdateScrollBy : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithDx:(double )dx +- dy:(double )dy; +-@property(nonatomic, assign) double dx; +-@property(nonatomic, assign) double dy; +++ (instancetype)makeWithDx:(double)dx dy:(double)dy; ++@property(nonatomic, assign) double dx; ++@property(nonatomic, assign) double dy; + @end + + /// Pigeon equivalent of ZoomBy + @interface FGMPlatformCameraUpdateZoomBy : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithAmount:(double )amount +- focus:(nullable FGMPlatformPoint *)focus; +-@property(nonatomic, assign) double amount; +-@property(nonatomic, strong, nullable) FGMPlatformPoint * focus; +++ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus; ++@property(nonatomic, assign) double amount; ++@property(nonatomic, strong, nullable) FGMPlatformPoint *focus; + @end + + /// Pigeon equivalent of ZoomIn/ZoomOut + @interface FGMPlatformCameraUpdateZoom : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithOut:(BOOL )out; +-@property(nonatomic, assign) BOOL out; +++ (instancetype)makeWithOut:(BOOL)out; ++@property(nonatomic, assign) BOOL out; + @end + + /// Pigeon equivalent of ZoomTo + @interface FGMPlatformCameraUpdateZoomTo : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithZoom:(double )zoom; +-@property(nonatomic, assign) double zoom; +++ (instancetype)makeWithZoom:(double)zoom; ++@property(nonatomic, assign) double zoom; + @end + + /// Pigeon equivalent of the Circle class. + @interface FGMPlatformCircle : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithConsumeTapEvents:(BOOL )consumeTapEvents +- fillColor:(FGMPlatformColor *)fillColor +- strokeColor:(FGMPlatformColor *)strokeColor +- visible:(BOOL )visible +- strokeWidth:(NSInteger )strokeWidth +- zIndex:(double )zIndex +- center:(FGMPlatformLatLng *)center +- radius:(double )radius +- circleId:(NSString *)circleId; +-@property(nonatomic, assign) BOOL consumeTapEvents; +-@property(nonatomic, strong) FGMPlatformColor * fillColor; +-@property(nonatomic, strong) FGMPlatformColor * strokeColor; +-@property(nonatomic, assign) BOOL visible; +-@property(nonatomic, assign) NSInteger strokeWidth; +-@property(nonatomic, assign) double zIndex; +-@property(nonatomic, strong) FGMPlatformLatLng * center; +-@property(nonatomic, assign) double radius; +-@property(nonatomic, copy) NSString * circleId; +++ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents ++ fillColor:(FGMPlatformColor *)fillColor ++ strokeColor:(FGMPlatformColor *)strokeColor ++ visible:(BOOL)visible ++ strokeWidth:(NSInteger)strokeWidth ++ zIndex:(double)zIndex ++ center:(FGMPlatformLatLng *)center ++ radius:(double)radius ++ circleId:(NSString *)circleId; ++@property(nonatomic, assign) BOOL consumeTapEvents; ++@property(nonatomic, strong) FGMPlatformColor *fillColor; ++@property(nonatomic, strong) FGMPlatformColor *strokeColor; ++@property(nonatomic, assign) BOOL visible; ++@property(nonatomic, assign) NSInteger strokeWidth; ++@property(nonatomic, assign) double zIndex; ++@property(nonatomic, strong) FGMPlatformLatLng *center; ++@property(nonatomic, assign) double radius; ++@property(nonatomic, copy) NSString *circleId; + @end + + /// Pigeon equivalent of the Heatmap class. +@@ -261,21 +257,20 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; + + (instancetype)makeWithColors:(NSArray *)colors +- startPoints:(NSArray *)startPoints +- colorMapSize:(NSInteger )colorMapSize; +-@property(nonatomic, copy) NSArray * colors; +-@property(nonatomic, copy) NSArray * startPoints; +-@property(nonatomic, assign) NSInteger colorMapSize; ++ startPoints:(NSArray *)startPoints ++ colorMapSize:(NSInteger)colorMapSize; ++@property(nonatomic, copy) NSArray *colors; ++@property(nonatomic, copy) NSArray *startPoints; ++@property(nonatomic, assign) NSInteger colorMapSize; + @end + + /// Pigeon equivalent of the WeightedLatLng class. + @interface FGMPlatformWeightedLatLng : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point +- weight:(double )weight; +-@property(nonatomic, strong) FGMPlatformLatLng * point; +-@property(nonatomic, assign) double weight; +++ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point weight:(double)weight; ++@property(nonatomic, strong) FGMPlatformLatLng *point; ++@property(nonatomic, assign) double weight; + @end + + /// Pigeon equivalent of the InfoWindow class. +@@ -309,39 +304,39 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; + + (instancetype)makeWithIdentifier:(NSString *)identifier; +-@property(nonatomic, copy) NSString * identifier; ++@property(nonatomic, copy) NSString *identifier; + @end + + /// Pigeon equivalent of the Marker class. + @interface FGMPlatformMarker : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithAlpha:(double )alpha +- anchor:(FGMPlatformPoint *)anchor +- consumeTapEvents:(BOOL )consumeTapEvents +- draggable:(BOOL )draggable +- flat:(BOOL )flat +- icon:(FGMPlatformBitmap *)icon +- infoWindow:(FGMPlatformInfoWindow *)infoWindow +- position:(FGMPlatformLatLng *)position +- rotation:(double )rotation +- visible:(BOOL )visible +- zIndex:(NSInteger )zIndex +- markerId:(NSString *)markerId +- clusterManagerId:(nullable NSString *)clusterManagerId; +-@property(nonatomic, assign) double alpha; +-@property(nonatomic, strong) FGMPlatformPoint * anchor; +-@property(nonatomic, assign) BOOL consumeTapEvents; +-@property(nonatomic, assign) BOOL draggable; +-@property(nonatomic, assign) BOOL flat; +-@property(nonatomic, strong) FGMPlatformBitmap * icon; +-@property(nonatomic, strong) FGMPlatformInfoWindow * infoWindow; +-@property(nonatomic, strong) FGMPlatformLatLng * position; +-@property(nonatomic, assign) double rotation; +-@property(nonatomic, assign) BOOL visible; +-@property(nonatomic, assign) NSInteger zIndex; +-@property(nonatomic, copy) NSString * markerId; +-@property(nonatomic, copy, nullable) NSString * clusterManagerId; +++ (instancetype)makeWithAlpha:(double)alpha ++ anchor:(FGMPlatformPoint *)anchor ++ consumeTapEvents:(BOOL)consumeTapEvents ++ draggable:(BOOL)draggable ++ flat:(BOOL)flat ++ icon:(FGMPlatformBitmap *)icon ++ infoWindow:(FGMPlatformInfoWindow *)infoWindow ++ position:(FGMPlatformLatLng *)position ++ rotation:(double)rotation ++ visible:(BOOL)visible ++ zIndex:(NSInteger)zIndex ++ markerId:(NSString *)markerId ++ clusterManagerId:(nullable NSString *)clusterManagerId; ++@property(nonatomic, assign) double alpha; ++@property(nonatomic, strong) FGMPlatformPoint *anchor; ++@property(nonatomic, assign) BOOL consumeTapEvents; ++@property(nonatomic, assign) BOOL draggable; ++@property(nonatomic, assign) BOOL flat; ++@property(nonatomic, strong) FGMPlatformBitmap *icon; ++@property(nonatomic, strong) FGMPlatformInfoWindow *infoWindow; ++@property(nonatomic, strong) FGMPlatformLatLng *position; ++@property(nonatomic, assign) double rotation; ++@property(nonatomic, assign) BOOL visible; ++@property(nonatomic, assign) NSInteger zIndex; ++@property(nonatomic, copy) NSString *markerId; ++@property(nonatomic, copy, nullable) NSString *clusterManagerId; + @end + + /// Pigeon equivalent of the Point of Interest class. +@@ -387,49 +382,48 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; + + (instancetype)makeWithPolylineId:(NSString *)polylineId +- consumesTapEvents:(BOOL )consumesTapEvents +- color:(FGMPlatformColor *)color +- geodesic:(BOOL )geodesic +- jointType:(FGMPlatformJointType)jointType +- patterns:(NSArray *)patterns +- points:(NSArray *)points +- visible:(BOOL )visible +- width:(NSInteger )width +- zIndex:(NSInteger )zIndex; +-@property(nonatomic, copy) NSString * polylineId; +-@property(nonatomic, assign) BOOL consumesTapEvents; +-@property(nonatomic, strong) FGMPlatformColor * color; +-@property(nonatomic, assign) BOOL geodesic; ++ consumesTapEvents:(BOOL)consumesTapEvents ++ color:(FGMPlatformColor *)color ++ geodesic:(BOOL)geodesic ++ jointType:(FGMPlatformJointType)jointType ++ patterns:(NSArray *)patterns ++ points:(NSArray *)points ++ visible:(BOOL)visible ++ width:(NSInteger)width ++ zIndex:(NSInteger)zIndex; ++@property(nonatomic, copy) NSString *polylineId; ++@property(nonatomic, assign) BOOL consumesTapEvents; ++@property(nonatomic, strong) FGMPlatformColor *color; ++@property(nonatomic, assign) BOOL geodesic; + /// The joint type. + @property(nonatomic, assign) FGMPlatformJointType jointType; + /// The pattern data, as a list of pattern items. +-@property(nonatomic, copy) NSArray * patterns; +-@property(nonatomic, copy) NSArray * points; +-@property(nonatomic, assign) BOOL visible; +-@property(nonatomic, assign) NSInteger width; +-@property(nonatomic, assign) NSInteger zIndex; ++@property(nonatomic, copy) NSArray *patterns; ++@property(nonatomic, copy) NSArray *points; ++@property(nonatomic, assign) BOOL visible; ++@property(nonatomic, assign) NSInteger width; ++@property(nonatomic, assign) NSInteger zIndex; + @end + + /// Pigeon equivalent of the PatternItem class. + @interface FGMPlatformPatternItem : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type +- length:(nullable NSNumber *)length; +++ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length; + @property(nonatomic, assign) FGMPlatformPatternItemType type; +-@property(nonatomic, strong, nullable) NSNumber * length; ++@property(nonatomic, strong, nullable) NSNumber *length; + @end + + /// Pigeon equivalent of the Tile class. + @interface FGMPlatformTile : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithWidth:(NSInteger )width +- height:(NSInteger )height +- data:(nullable FlutterStandardTypedData *)data; +-@property(nonatomic, assign) NSInteger width; +-@property(nonatomic, assign) NSInteger height; +-@property(nonatomic, strong, nullable) FlutterStandardTypedData * data; +++ (instancetype)makeWithWidth:(NSInteger)width ++ height:(NSInteger)height ++ data:(nullable FlutterStandardTypedData *)data; ++@property(nonatomic, assign) NSInteger width; ++@property(nonatomic, assign) NSInteger height; ++@property(nonatomic, strong, nullable) FlutterStandardTypedData *data; + @end + + /// Pigeon equivalent of the TileOverlay class. +@@ -437,41 +431,37 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; + + (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId +- fadeIn:(BOOL )fadeIn +- transparency:(double )transparency +- zIndex:(NSInteger )zIndex +- visible:(BOOL )visible +- tileSize:(NSInteger )tileSize; +-@property(nonatomic, copy) NSString * tileOverlayId; +-@property(nonatomic, assign) BOOL fadeIn; +-@property(nonatomic, assign) double transparency; +-@property(nonatomic, assign) NSInteger zIndex; +-@property(nonatomic, assign) BOOL visible; +-@property(nonatomic, assign) NSInteger tileSize; ++ fadeIn:(BOOL)fadeIn ++ transparency:(double)transparency ++ zIndex:(NSInteger)zIndex ++ visible:(BOOL)visible ++ tileSize:(NSInteger)tileSize; ++@property(nonatomic, copy) NSString *tileOverlayId; ++@property(nonatomic, assign) BOOL fadeIn; ++@property(nonatomic, assign) double transparency; ++@property(nonatomic, assign) NSInteger zIndex; ++@property(nonatomic, assign) BOOL visible; ++@property(nonatomic, assign) NSInteger tileSize; + @end + + /// Pigeon equivalent of Flutter's EdgeInsets. + @interface FGMPlatformEdgeInsets : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithTop:(double )top +- bottom:(double )bottom +- left:(double )left +- right:(double )right; +-@property(nonatomic, assign) double top; +-@property(nonatomic, assign) double bottom; +-@property(nonatomic, assign) double left; +-@property(nonatomic, assign) double right; +++ (instancetype)makeWithTop:(double)top bottom:(double)bottom left:(double)left right:(double)right; ++@property(nonatomic, assign) double top; ++@property(nonatomic, assign) double bottom; ++@property(nonatomic, assign) double left; ++@property(nonatomic, assign) double right; + @end + + /// Pigeon equivalent of LatLng. + @interface FGMPlatformLatLng : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithLatitude:(double )latitude +- longitude:(double )longitude; +-@property(nonatomic, assign) double latitude; +-@property(nonatomic, assign) double longitude; +++ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude; ++@property(nonatomic, assign) double latitude; ++@property(nonatomic, assign) double longitude; + @end + + /// Pigeon equivalent of LatLngBounds. +@@ -498,147 +488,142 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; + + (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId +- image:(FGMPlatformBitmap *)image +- position:(nullable FGMPlatformLatLng *)position +- bounds:(nullable FGMPlatformLatLngBounds *)bounds +- anchor:(nullable FGMPlatformPoint *)anchor +- transparency:(double )transparency +- bearing:(double )bearing +- zIndex:(NSInteger )zIndex +- visible:(BOOL )visible +- clickable:(BOOL )clickable +- zoomLevel:(nullable NSNumber *)zoomLevel; +-@property(nonatomic, copy) NSString * groundOverlayId; +-@property(nonatomic, strong) FGMPlatformBitmap * image; +-@property(nonatomic, strong, nullable) FGMPlatformLatLng * position; +-@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; +-@property(nonatomic, strong, nullable) FGMPlatformPoint * anchor; +-@property(nonatomic, assign) double transparency; +-@property(nonatomic, assign) double bearing; +-@property(nonatomic, assign) NSInteger zIndex; +-@property(nonatomic, assign) BOOL visible; +-@property(nonatomic, assign) BOOL clickable; +-@property(nonatomic, strong, nullable) NSNumber * zoomLevel; ++ image:(FGMPlatformBitmap *)image ++ position:(nullable FGMPlatformLatLng *)position ++ bounds:(nullable FGMPlatformLatLngBounds *)bounds ++ anchor:(nullable FGMPlatformPoint *)anchor ++ transparency:(double)transparency ++ bearing:(double)bearing ++ zIndex:(NSInteger)zIndex ++ visible:(BOOL)visible ++ clickable:(BOOL)clickable ++ zoomLevel:(nullable NSNumber *)zoomLevel; ++@property(nonatomic, copy) NSString *groundOverlayId; ++@property(nonatomic, strong) FGMPlatformBitmap *image; ++@property(nonatomic, strong, nullable) FGMPlatformLatLng *position; ++@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds; ++@property(nonatomic, strong, nullable) FGMPlatformPoint *anchor; ++@property(nonatomic, assign) double transparency; ++@property(nonatomic, assign) double bearing; ++@property(nonatomic, assign) NSInteger zIndex; ++@property(nonatomic, assign) BOOL visible; ++@property(nonatomic, assign) BOOL clickable; ++@property(nonatomic, strong, nullable) NSNumber *zoomLevel; + @end + + /// Information passed to the platform view creation. + @interface FGMPlatformMapViewCreationParams : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition +- mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration +- initialCircles:(NSArray *)initialCircles +- initialMarkers:(NSArray *)initialMarkers +- initialPolygons:(NSArray *)initialPolygons +- initialPolylines:(NSArray *)initialPolylines +- initialHeatmaps:(NSArray *)initialHeatmaps +- initialTileOverlays:(NSArray *)initialTileOverlays +- initialClusterManagers:(NSArray *)initialClusterManagers +- initialGroundOverlays:(NSArray *)initialGroundOverlays; +-@property(nonatomic, strong) FGMPlatformCameraPosition * initialCameraPosition; +-@property(nonatomic, strong) FGMPlatformMapConfiguration * mapConfiguration; +-@property(nonatomic, copy) NSArray * initialCircles; +-@property(nonatomic, copy) NSArray * initialMarkers; +-@property(nonatomic, copy) NSArray * initialPolygons; +-@property(nonatomic, copy) NSArray * initialPolylines; +-@property(nonatomic, copy) NSArray * initialHeatmaps; +-@property(nonatomic, copy) NSArray * initialTileOverlays; +-@property(nonatomic, copy) NSArray * initialClusterManagers; +-@property(nonatomic, copy) NSArray * initialGroundOverlays; +++ (instancetype) ++ makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition ++ mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration ++ initialCircles:(NSArray *)initialCircles ++ initialMarkers:(NSArray *)initialMarkers ++ initialPolygons:(NSArray *)initialPolygons ++ initialPolylines:(NSArray *)initialPolylines ++ initialHeatmaps:(NSArray *)initialHeatmaps ++ initialTileOverlays:(NSArray *)initialTileOverlays ++ initialClusterManagers:(NSArray *)initialClusterManagers ++ initialGroundOverlays:(NSArray *)initialGroundOverlays; ++@property(nonatomic, strong) FGMPlatformCameraPosition *initialCameraPosition; ++@property(nonatomic, strong) FGMPlatformMapConfiguration *mapConfiguration; ++@property(nonatomic, copy) NSArray *initialCircles; ++@property(nonatomic, copy) NSArray *initialMarkers; ++@property(nonatomic, copy) NSArray *initialPolygons; ++@property(nonatomic, copy) NSArray *initialPolylines; ++@property(nonatomic, copy) NSArray *initialHeatmaps; ++@property(nonatomic, copy) NSArray *initialTileOverlays; ++@property(nonatomic, copy) NSArray *initialClusterManagers; ++@property(nonatomic, copy) NSArray *initialGroundOverlays; + @end + + /// Pigeon equivalent of MapConfiguration. + @interface FGMPlatformMapConfiguration : NSObject + + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled +- cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds +- mapType:(nullable FGMPlatformMapTypeBox *)mapType +- minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference +- rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled +- scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled +- tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled +- trackCameraPosition:(nullable NSNumber *)trackCameraPosition +- zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled +- myLocationEnabled:(nullable NSNumber *)myLocationEnabled +- myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled +- padding:(nullable FGMPlatformEdgeInsets *)padding +- indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled +- trafficEnabled:(nullable NSNumber *)trafficEnabled +- buildingsEnabled:(nullable NSNumber *)buildingsEnabled +- mapId:(nullable NSString *)mapId +- style:(nullable NSString *)style; +-@property(nonatomic, strong, nullable) NSNumber * compassEnabled; +-@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds * cameraTargetBounds; +-@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox * mapType; +-@property(nonatomic, strong, nullable) FGMPlatformZoomRange * minMaxZoomPreference; +-@property(nonatomic, strong, nullable) NSNumber * rotateGesturesEnabled; +-@property(nonatomic, strong, nullable) NSNumber * scrollGesturesEnabled; +-@property(nonatomic, strong, nullable) NSNumber * tiltGesturesEnabled; +-@property(nonatomic, strong, nullable) NSNumber * trackCameraPosition; +-@property(nonatomic, strong, nullable) NSNumber * zoomGesturesEnabled; +-@property(nonatomic, strong, nullable) NSNumber * myLocationEnabled; +-@property(nonatomic, strong, nullable) NSNumber * myLocationButtonEnabled; +-@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets * padding; +-@property(nonatomic, strong, nullable) NSNumber * indoorViewEnabled; +-@property(nonatomic, strong, nullable) NSNumber * trafficEnabled; +-@property(nonatomic, strong, nullable) NSNumber * buildingsEnabled; +-@property(nonatomic, copy, nullable) NSString * mapId; +-@property(nonatomic, copy, nullable) NSString * style; ++ cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds ++ mapType:(nullable FGMPlatformMapTypeBox *)mapType ++ minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference ++ rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled ++ scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled ++ tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled ++ trackCameraPosition:(nullable NSNumber *)trackCameraPosition ++ zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled ++ myLocationEnabled:(nullable NSNumber *)myLocationEnabled ++ myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled ++ padding:(nullable FGMPlatformEdgeInsets *)padding ++ indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled ++ trafficEnabled:(nullable NSNumber *)trafficEnabled ++ buildingsEnabled:(nullable NSNumber *)buildingsEnabled ++ mapId:(nullable NSString *)mapId ++ style:(nullable NSString *)style; ++@property(nonatomic, strong, nullable) NSNumber *compassEnabled; ++@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds *cameraTargetBounds; ++@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox *mapType; ++@property(nonatomic, strong, nullable) FGMPlatformZoomRange *minMaxZoomPreference; ++@property(nonatomic, strong, nullable) NSNumber *rotateGesturesEnabled; ++@property(nonatomic, strong, nullable) NSNumber *scrollGesturesEnabled; ++@property(nonatomic, strong, nullable) NSNumber *tiltGesturesEnabled; ++@property(nonatomic, strong, nullable) NSNumber *trackCameraPosition; ++@property(nonatomic, strong, nullable) NSNumber *zoomGesturesEnabled; ++@property(nonatomic, strong, nullable) NSNumber *myLocationEnabled; ++@property(nonatomic, strong, nullable) NSNumber *myLocationButtonEnabled; ++@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets *padding; ++@property(nonatomic, strong, nullable) NSNumber *indoorViewEnabled; ++@property(nonatomic, strong, nullable) NSNumber *trafficEnabled; ++@property(nonatomic, strong, nullable) NSNumber *buildingsEnabled; ++@property(nonatomic, copy, nullable) NSString *mapId; ++@property(nonatomic, copy, nullable) NSString *style; + @end + + /// Pigeon representation of an x,y coordinate. + @interface FGMPlatformPoint : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithX:(double )x +- y:(double )y; +-@property(nonatomic, assign) double x; +-@property(nonatomic, assign) double y; +++ (instancetype)makeWithX:(double)x y:(double)y; ++@property(nonatomic, assign) double x; ++@property(nonatomic, assign) double y; + @end + + /// Pigeon representation of a size. + @interface FGMPlatformSize : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithWidth:(double )width +- height:(double )height; +-@property(nonatomic, assign) double width; +-@property(nonatomic, assign) double height; +++ (instancetype)makeWithWidth:(double)width height:(double)height; ++@property(nonatomic, assign) double width; ++@property(nonatomic, assign) double height; + @end + + /// Pigeon representation of a color. + @interface FGMPlatformColor : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithRed:(double )red +- green:(double )green +- blue:(double )blue +- alpha:(double )alpha; +-@property(nonatomic, assign) double red; +-@property(nonatomic, assign) double green; +-@property(nonatomic, assign) double blue; +-@property(nonatomic, assign) double alpha; +++ (instancetype)makeWithRed:(double)red green:(double)green blue:(double)blue alpha:(double)alpha; ++@property(nonatomic, assign) double red; ++@property(nonatomic, assign) double green; ++@property(nonatomic, assign) double blue; ++@property(nonatomic, assign) double alpha; + @end + + /// Pigeon equivalent of GMSTileLayer properties. + @interface FGMPlatformTileLayer : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithVisible:(BOOL )visible +- fadeIn:(BOOL )fadeIn +- opacity:(double )opacity +- zIndex:(NSInteger )zIndex; +-@property(nonatomic, assign) BOOL visible; +-@property(nonatomic, assign) BOOL fadeIn; +-@property(nonatomic, assign) double opacity; +-@property(nonatomic, assign) NSInteger zIndex; +++ (instancetype)makeWithVisible:(BOOL)visible ++ fadeIn:(BOOL)fadeIn ++ opacity:(double)opacity ++ zIndex:(NSInteger)zIndex; ++@property(nonatomic, assign) BOOL visible; ++@property(nonatomic, assign) BOOL fadeIn; ++@property(nonatomic, assign) double opacity; ++@property(nonatomic, assign) NSInteger zIndex; + @end + + /// Pigeon equivalent of MinMaxZoomPreference. + @interface FGMPlatformZoomRange : NSObject +-+ (instancetype)makeWithMin:(nullable NSNumber *)min +- max:(nullable NSNumber *)max; +-@property(nonatomic, strong, nullable) NSNumber * min; +-@property(nonatomic, strong, nullable) NSNumber * max; +++ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max; ++@property(nonatomic, strong, nullable) NSNumber *min; ++@property(nonatomic, strong, nullable) NSNumber *max; + @end + + /// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint +@@ -669,19 +654,18 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; + + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData +- size:(nullable FGMPlatformSize *)size; +-@property(nonatomic, strong) FlutterStandardTypedData * byteData; +-@property(nonatomic, strong, nullable) FGMPlatformSize * size; ++ size:(nullable FGMPlatformSize *)size; ++@property(nonatomic, strong) FlutterStandardTypedData *byteData; ++@property(nonatomic, strong, nullable) FGMPlatformSize *size; + @end + + /// Pigeon equivalent of [AssetBitmap]. + @interface FGMPlatformBitmapAsset : NSObject + /// unavailable to enforce nonnull fields, see the class method. + - (instancetype)init NS_UNAVAILABLE; +-+ (instancetype)makeWithName:(NSString *)name +- pkg:(nullable NSString *)pkg; +-@property(nonatomic, copy) NSString * name; +-@property(nonatomic, copy, nullable) NSString * pkg; +++ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg; ++@property(nonatomic, copy) NSString *name; ++@property(nonatomic, copy, nullable) NSString *pkg; + @end + + /// Pigeon equivalent of [AssetImageBitmap]. +@@ -741,54 +725,87 @@ NSObject *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void); + /// + /// Only non-null configuration values will result in updates; options with + /// null values will remain unchanged. +-- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Updates the set of circles on the map. +-- (void)updateCirclesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updateCirclesByAdding:(NSArray *)toAdd ++ changing:(NSArray *)toChange ++ removing:(NSArray *)idsToRemove ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Updates the set of heatmaps on the map. +-- (void)updateHeatmapsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updateHeatmapsByAdding:(NSArray *)toAdd ++ changing:(NSArray *)toChange ++ removing:(NSArray *)idsToRemove ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Updates the set of custer managers for clusters on the map. +-- (void)updateClusterManagersByAdding:(NSArray *)toAdd removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updateClusterManagersByAdding:(NSArray *)toAdd ++ removing:(NSArray *)idsToRemove ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Updates the set of markers on the map. +-- (void)updateMarkersByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updateMarkersByAdding:(NSArray *)toAdd ++ changing:(NSArray *)toChange ++ removing:(NSArray *)idsToRemove ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Updates the set of polygonss on the map. +-- (void)updatePolygonsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updatePolygonsByAdding:(NSArray *)toAdd ++ changing:(NSArray *)toChange ++ removing:(NSArray *)idsToRemove ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Updates the set of polylines on the map. +-- (void)updatePolylinesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updatePolylinesByAdding:(NSArray *)toAdd ++ changing:(NSArray *)toChange ++ removing:(NSArray *)idsToRemove ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Updates the set of tile overlays on the map. +-- (void)updateTileOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updateTileOverlaysByAdding:(NSArray *)toAdd ++ changing:(NSArray *)toChange ++ removing:(NSArray *)idsToRemove ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Updates the set of ground overlays on the map. +-- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd ++ changing:(NSArray *)toChange ++ removing:(NSArray *)idsToRemove ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Gets the screen coordinate for the given map location. + /// + /// @return only when . +-- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng error:(FlutterError *_Nullable *_Nonnull)error; ++- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Gets the map location for the given screen coordinate. + /// + /// @return only when . +-- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate error:(FlutterError *_Nullable *_Nonnull)error; ++- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Gets the map region currently displayed on the map. + /// + /// @return only when . + - (nullable FGMPlatformLatLngBounds *)visibleMapRegion:(FlutterError *_Nullable *_Nonnull)error; + /// Moves the camera according to [cameraUpdate] immediately, with no + /// animation. +-- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Moves the camera according to [cameraUpdate], animating the update using a + /// duration in milliseconds if provided. +-- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate duration:(nullable NSNumber *)durationMilliseconds error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate ++ duration:(nullable NSNumber *)durationMilliseconds ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Gets the current map zoom level. + /// + /// @return only when . + - (nullable NSNumber *)currentZoomLevel:(FlutterError *_Nullable *_Nonnull)error; + /// Show the info window for the marker with the given ID. +-- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Hide the info window for the marker with the given ID. +-- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; ++- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Returns true if the marker with the given ID is currently displaying its + /// info window. + /// + /// @return only when . +-- (nullable NSNumber *)isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; ++- (nullable NSNumber *) ++ isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// Sets the style to the given map style string, where an empty string + /// indicates that the style should be cleared. + /// +@@ -911,19 +956,29 @@ extern void SetUpFGMMapsPlatformViewApiWithSuffix(id bin + - (nullable NSNumber *)isMyLocationButtonEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; + /// @return only when . + - (nullable NSNumber *)isTrafficEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +-- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; +-- (nullable FGMPlatformGroundOverlay *)groundOverlayWithIdentifier:(NSString *)groundOverlayId error:(FlutterError *_Nullable *_Nonnull)error; +-- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId error:(FlutterError *_Nullable *_Nonnull)error; ++- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId ++ error: ++ (FlutterError *_Nullable *_Nonnull)error; ++- (nullable FGMPlatformGroundOverlay *) ++ groundOverlayWithIdentifier:(NSString *)groundOverlayId ++ error:(FlutterError *_Nullable *_Nonnull)error; ++- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// @return only when . + - (nullable FGMPlatformZoomRange *)zoomRange:(FlutterError *_Nullable *_Nonnull)error; + /// @return only when . +-- (nullable NSArray *)clustersWithIdentifier:(NSString *)clusterManagerId error:(FlutterError *_Nullable *_Nonnull)error; ++- (nullable NSArray *) ++ clustersWithIdentifier:(NSString *)clusterManagerId ++ error:(FlutterError *_Nullable *_Nonnull)error; + /// @return only when . + - (nullable FGMPlatformCameraPosition *)cameraPosition:(FlutterError *_Nullable *_Nonnull)error; + @end + +-extern void SetUpFGMMapsInspectorApi(id binaryMessenger, NSObject *_Nullable api); ++extern void SetUpFGMMapsInspectorApi(id binaryMessenger, ++ NSObject *_Nullable api); + +-extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); ++extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, ++ NSObject *_Nullable api, ++ NSString *messageChannelSuffix); + + NS_ASSUME_NONNULL_END diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index c7e469ad1491..2a9b1d1a76f3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -206,6 +206,11 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { return _events(mapId).whereType(); } + @override + Stream onPoiTap({required int mapId}) { + return _events(mapId).whereType(); + } + @override Future updateMapConfiguration( MapConfiguration configuration, { @@ -1161,6 +1166,20 @@ class HostMapMessageHandler implements MapsCallbackApi { MapTapEvent(mapId, _latLngFromPlatformLatLng(position)), ); } + + @override + void onPoiTap(PlatformPointOfInterest poi) { + streamController.add( + MapPoiTapEvent( + mapId, + PointOfInterest( + position: LatLng(poi.position.latitude, poi.position.longitude), + name: poi.name, + placeId: poi.placeId, + ), + ), + ); + } } LatLng _latLngFromPlatformLatLng(PlatformLatLng latLng) { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart index bd54d5f62322..0f2aec5ded52 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.5), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -956,6 +956,54 @@ class PlatformMarker { int get hashCode => Object.hashAll(_toList()); } +/// Pigeon equivalent of the Point of Interest class. +class PlatformPointOfInterest { + PlatformPointOfInterest({ + required this.position, + this.name, + required this.placeId, + }); + + PlatformLatLng position; + + String? name; + + String placeId; + + List _toList() { + return [position, name, placeId]; + } + + Object encode() { + return _toList(); + } + + static PlatformPointOfInterest decode(Object result) { + result as List; + return PlatformPointOfInterest( + position: result[0]! as PlatformLatLng, + name: result[1]! as String, + placeId: result[2]! as String, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPointOfInterest || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); +} + /// Pigeon equivalent of the Polygon class. class PlatformPolygon { PlatformPolygon({ @@ -2388,78 +2436,81 @@ class _PigeonCodec extends StandardMessageCodec { } else if (value is PlatformMarker) { buffer.putUint8(150); writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { + } else if (value is PlatformPointOfInterest) { buffer.putUint8(151); writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { + } else if (value is PlatformPolygon) { buffer.putUint8(152); writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { + } else if (value is PlatformPolyline) { buffer.putUint8(153); writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { + } else if (value is PlatformPatternItem) { buffer.putUint8(154); writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { + } else if (value is PlatformTile) { buffer.putUint8(155); writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { + } else if (value is PlatformTileOverlay) { buffer.putUint8(156); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { + } else if (value is PlatformEdgeInsets) { buffer.putUint8(157); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { + } else if (value is PlatformLatLng) { buffer.putUint8(158); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { + } else if (value is PlatformLatLngBounds) { buffer.putUint8(159); writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { + } else if (value is PlatformCameraTargetBounds) { buffer.putUint8(160); writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { + } else if (value is PlatformGroundOverlay) { buffer.putUint8(161); writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { + } else if (value is PlatformMapViewCreationParams) { buffer.putUint8(162); writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { + } else if (value is PlatformMapConfiguration) { buffer.putUint8(163); writeValue(buffer, value.encode()); - } else if (value is PlatformSize) { + } else if (value is PlatformPoint) { buffer.putUint8(164); writeValue(buffer, value.encode()); - } else if (value is PlatformColor) { + } else if (value is PlatformSize) { buffer.putUint8(165); writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { + } else if (value is PlatformColor) { buffer.putUint8(166); writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { + } else if (value is PlatformTileLayer) { buffer.putUint8(167); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { + } else if (value is PlatformZoomRange) { buffer.putUint8(168); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { + } else if (value is PlatformBitmap) { buffer.putUint8(169); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { + } else if (value is PlatformBitmapDefaultMarker) { buffer.putUint8(170); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { + } else if (value is PlatformBitmapBytes) { buffer.putUint8(171); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { + } else if (value is PlatformBitmapAsset) { buffer.putUint8(172); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { + } else if (value is PlatformBitmapAssetImage) { buffer.putUint8(173); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { + } else if (value is PlatformBitmapAssetMap) { buffer.putUint8(174); writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapBytesMap) { + buffer.putUint8(175); + writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); } @@ -2517,52 +2568,54 @@ class _PigeonCodec extends StandardMessageCodec { case 150: return PlatformMarker.decode(readValue(buffer)!); case 151: - return PlatformPolygon.decode(readValue(buffer)!); + return PlatformPointOfInterest.decode(readValue(buffer)!); case 152: - return PlatformPolyline.decode(readValue(buffer)!); + return PlatformPolygon.decode(readValue(buffer)!); case 153: - return PlatformPatternItem.decode(readValue(buffer)!); + return PlatformPolyline.decode(readValue(buffer)!); case 154: - return PlatformTile.decode(readValue(buffer)!); + return PlatformPatternItem.decode(readValue(buffer)!); case 155: - return PlatformTileOverlay.decode(readValue(buffer)!); + return PlatformTile.decode(readValue(buffer)!); case 156: - return PlatformEdgeInsets.decode(readValue(buffer)!); + return PlatformTileOverlay.decode(readValue(buffer)!); case 157: - return PlatformLatLng.decode(readValue(buffer)!); + return PlatformEdgeInsets.decode(readValue(buffer)!); case 158: - return PlatformLatLngBounds.decode(readValue(buffer)!); + return PlatformLatLng.decode(readValue(buffer)!); case 159: - return PlatformCameraTargetBounds.decode(readValue(buffer)!); + return PlatformLatLngBounds.decode(readValue(buffer)!); case 160: - return PlatformGroundOverlay.decode(readValue(buffer)!); + return PlatformCameraTargetBounds.decode(readValue(buffer)!); case 161: - return PlatformMapViewCreationParams.decode(readValue(buffer)!); + return PlatformGroundOverlay.decode(readValue(buffer)!); case 162: - return PlatformMapConfiguration.decode(readValue(buffer)!); + return PlatformMapViewCreationParams.decode(readValue(buffer)!); case 163: - return PlatformPoint.decode(readValue(buffer)!); + return PlatformMapConfiguration.decode(readValue(buffer)!); case 164: - return PlatformSize.decode(readValue(buffer)!); + return PlatformPoint.decode(readValue(buffer)!); case 165: - return PlatformColor.decode(readValue(buffer)!); + return PlatformSize.decode(readValue(buffer)!); case 166: - return PlatformTileLayer.decode(readValue(buffer)!); + return PlatformColor.decode(readValue(buffer)!); case 167: - return PlatformZoomRange.decode(readValue(buffer)!); + return PlatformTileLayer.decode(readValue(buffer)!); case 168: - return PlatformBitmap.decode(readValue(buffer)!); + return PlatformZoomRange.decode(readValue(buffer)!); case 169: - return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); + return PlatformBitmap.decode(readValue(buffer)!); case 170: - return PlatformBitmapBytes.decode(readValue(buffer)!); + return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); case 171: - return PlatformBitmapAsset.decode(readValue(buffer)!); + return PlatformBitmapBytes.decode(readValue(buffer)!); case 172: - return PlatformBitmapAssetImage.decode(readValue(buffer)!); + return PlatformBitmapAsset.decode(readValue(buffer)!); case 173: - return PlatformBitmapAssetMap.decode(readValue(buffer)!); + return PlatformBitmapAssetImage.decode(readValue(buffer)!); case 174: + return PlatformBitmapAssetMap.decode(readValue(buffer)!); + case 175: return PlatformBitmapBytesMap.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -3301,6 +3354,9 @@ abstract class MapsCallbackApi { /// Called when a ground overlay is tapped. void onGroundOverlayTap(String groundOverlayId); + /// Called when a point of interest is tapped. + void onPoiTap(PlatformPointOfInterest poi); + /// Called to get data for a map tile. Future getTileOverlayTile( String tileOverlayId, @@ -3807,6 +3863,40 @@ abstract class MapsCallbackApi { }); } } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap$messageChannelSuffix', + pigeonChannelCodec, + binaryMessenger: binaryMessenger, + ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert( + message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.', + ); + final List args = (message as List?)!; + final PlatformPointOfInterest? arg_poi = + (args[0] as PlatformPointOfInterest?); + assert( + arg_poi != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.', + ); + try { + api.onPoiTap(arg_poi!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } { final pigeonVar_channel = BasicMessageChannel( 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.orig b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.orig new file mode 100644 index 000000000000..20c055a57bdc --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.orig @@ -0,0 +1,4301 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +PlatformException _createConnectionError(String channelName) { + return PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel: "$channelName".', + ); +} + +List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { + if (empty) { + return []; + } + if (error == null) { + return [result]; + } + return [error.code, error.message, error.details]; +} +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed + .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); + } + if (a is Map && b is Map) { + return a.length == b.length && a.entries.every((MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key])); + } + return a == b; +} + + +/// Pigeon equivalent of MapType +enum PlatformMapType { + none, + normal, + satellite, + terrain, + hybrid, +} + +/// Join types for polyline joints. +enum PlatformJointType { + mitered, + bevel, + round, +} + +/// Enumeration of possible types for PatternItem. +enum PlatformPatternItemType { + dot, + dash, + gap, +} + +/// Pigeon equivalent of [MapBitmapScaling]. +enum PlatformMapBitmapScaling { + auto, + none, +} + +/// Pigeon representatation of a CameraPosition. +class PlatformCameraPosition { + PlatformCameraPosition({ + required this.bearing, + required this.target, + required this.tilt, + required this.zoom, + }); + + double bearing; + + PlatformLatLng target; + + double tilt; + + double zoom; + + List _toList() { + return [ + bearing, + target, + tilt, + zoom, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraPosition decode(Object result) { + result as List; + return PlatformCameraPosition( + bearing: result[0]! as double, + target: result[1]! as PlatformLatLng, + tilt: result[2]! as double, + zoom: result[3]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraPosition || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon representation of a CameraUpdate. +class PlatformCameraUpdate { + PlatformCameraUpdate({ + required this.cameraUpdate, + }); + + /// This Object must be one of the classes below prefixed with + /// PlatformCameraUpdate. Each such class represents a different type of + /// camera update, and each holds a different set of data, preventing the + /// use of a single unified class. + Object cameraUpdate; + + List _toList() { + return [ + cameraUpdate, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdate decode(Object result) { + result as List; + return PlatformCameraUpdate( + cameraUpdate: result[0]!, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdate || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of NewCameraPosition +class PlatformCameraUpdateNewCameraPosition { + PlatformCameraUpdateNewCameraPosition({ + required this.cameraPosition, + }); + + PlatformCameraPosition cameraPosition; + + List _toList() { + return [ + cameraPosition, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewCameraPosition decode(Object result) { + result as List; + return PlatformCameraUpdateNewCameraPosition( + cameraPosition: result[0]! as PlatformCameraPosition, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewCameraPosition || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of NewLatLng +class PlatformCameraUpdateNewLatLng { + PlatformCameraUpdateNewLatLng({ + required this.latLng, + }); + + PlatformLatLng latLng; + + List _toList() { + return [ + latLng, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewLatLng decode(Object result) { + result as List; + return PlatformCameraUpdateNewLatLng( + latLng: result[0]! as PlatformLatLng, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLng || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of NewLatLngBounds +class PlatformCameraUpdateNewLatLngBounds { + PlatformCameraUpdateNewLatLngBounds({ + required this.bounds, + required this.padding, + }); + + PlatformLatLngBounds bounds; + + double padding; + + List _toList() { + return [ + bounds, + padding, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewLatLngBounds decode(Object result) { + result as List; + return PlatformCameraUpdateNewLatLngBounds( + bounds: result[0]! as PlatformLatLngBounds, + padding: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLngBounds || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of NewLatLngZoom +class PlatformCameraUpdateNewLatLngZoom { + PlatformCameraUpdateNewLatLngZoom({ + required this.latLng, + required this.zoom, + }); + + PlatformLatLng latLng; + + double zoom; + + List _toList() { + return [ + latLng, + zoom, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewLatLngZoom decode(Object result) { + result as List; + return PlatformCameraUpdateNewLatLngZoom( + latLng: result[0]! as PlatformLatLng, + zoom: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLngZoom || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of ScrollBy +class PlatformCameraUpdateScrollBy { + PlatformCameraUpdateScrollBy({ + required this.dx, + required this.dy, + }); + + double dx; + + double dy; + + List _toList() { + return [ + dx, + dy, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateScrollBy decode(Object result) { + result as List; + return PlatformCameraUpdateScrollBy( + dx: result[0]! as double, + dy: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateScrollBy || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of ZoomBy +class PlatformCameraUpdateZoomBy { + PlatformCameraUpdateZoomBy({ + required this.amount, + this.focus, + }); + + double amount; + + PlatformPoint? focus; + + List _toList() { + return [ + amount, + focus, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateZoomBy decode(Object result) { + result as List; + return PlatformCameraUpdateZoomBy( + amount: result[0]! as double, + focus: result[1] as PlatformPoint?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoomBy || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of ZoomIn/ZoomOut +class PlatformCameraUpdateZoom { + PlatformCameraUpdateZoom({ + required this.out, + }); + + bool out; + + List _toList() { + return [ + out, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateZoom decode(Object result) { + result as List; + return PlatformCameraUpdateZoom( + out: result[0]! as bool, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoom || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of ZoomTo +class PlatformCameraUpdateZoomTo { + PlatformCameraUpdateZoomTo({ + required this.zoom, + }); + + double zoom; + + List _toList() { + return [ + zoom, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateZoomTo decode(Object result) { + result as List; + return PlatformCameraUpdateZoomTo( + zoom: result[0]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoomTo || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Circle class. +class PlatformCircle { + PlatformCircle({ + this.consumeTapEvents = false, + required this.fillColor, + required this.strokeColor, + this.visible = true, + this.strokeWidth = 10, + this.zIndex = 0.0, + required this.center, + this.radius = 0, + required this.circleId, + }); + + bool consumeTapEvents; + + PlatformColor fillColor; + + PlatformColor strokeColor; + + bool visible; + + int strokeWidth; + + double zIndex; + + PlatformLatLng center; + + double radius; + + String circleId; + + List _toList() { + return [ + consumeTapEvents, + fillColor, + strokeColor, + visible, + strokeWidth, + zIndex, + center, + radius, + circleId, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCircle decode(Object result) { + result as List; + return PlatformCircle( + consumeTapEvents: result[0]! as bool, + fillColor: result[1]! as PlatformColor, + strokeColor: result[2]! as PlatformColor, + visible: result[3]! as bool, + strokeWidth: result[4]! as int, + zIndex: result[5]! as double, + center: result[6]! as PlatformLatLng, + radius: result[7]! as double, + circleId: result[8]! as String, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCircle || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Heatmap class. +class PlatformHeatmap { + PlatformHeatmap({ + required this.heatmapId, + required this.data, + this.gradient, + required this.opacity, + required this.radius, + required this.minimumZoomIntensity, + required this.maximumZoomIntensity, + }); + + String heatmapId; + + List data; + + PlatformHeatmapGradient? gradient; + + double opacity; + + int radius; + + int minimumZoomIntensity; + + int maximumZoomIntensity; + + List _toList() { + return [ + heatmapId, + data, + gradient, + opacity, + radius, + minimumZoomIntensity, + maximumZoomIntensity, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformHeatmap decode(Object result) { + result as List; + return PlatformHeatmap( + heatmapId: result[0]! as String, + data: (result[1] as List?)!.cast(), + gradient: result[2] as PlatformHeatmapGradient?, + opacity: result[3]! as double, + radius: result[4]! as int, + minimumZoomIntensity: result[5]! as int, + maximumZoomIntensity: result[6]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformHeatmap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the HeatmapGradient class. +/// +/// The GMUGradient structure is slightly different from HeatmapGradient, so +/// this matches the iOS API so that conversion can be done on the Dart side +/// where the structures are easier to work with. +class PlatformHeatmapGradient { + PlatformHeatmapGradient({ + required this.colors, + required this.startPoints, + required this.colorMapSize, + }); + + List colors; + + List startPoints; + + int colorMapSize; + + List _toList() { + return [ + colors, + startPoints, + colorMapSize, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformHeatmapGradient decode(Object result) { + result as List; + return PlatformHeatmapGradient( + colors: (result[0] as List?)!.cast(), + startPoints: (result[1] as List?)!.cast(), + colorMapSize: result[2]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformHeatmapGradient || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the WeightedLatLng class. +class PlatformWeightedLatLng { + PlatformWeightedLatLng({ + required this.point, + required this.weight, + }); + + PlatformLatLng point; + + double weight; + + List _toList() { + return [ + point, + weight, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformWeightedLatLng decode(Object result) { + result as List; + return PlatformWeightedLatLng( + point: result[0]! as PlatformLatLng, + weight: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformWeightedLatLng || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the InfoWindow class. +class PlatformInfoWindow { + PlatformInfoWindow({ + this.title, + this.snippet, + required this.anchor, + }); + + String? title; + + String? snippet; + + PlatformPoint anchor; + + List _toList() { + return [ + title, + snippet, + anchor, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformInfoWindow decode(Object result) { + result as List; + return PlatformInfoWindow( + title: result[0] as String?, + snippet: result[1] as String?, + anchor: result[2]! as PlatformPoint, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformInfoWindow || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of Cluster. +class PlatformCluster { + PlatformCluster({ + required this.clusterManagerId, + required this.position, + required this.bounds, + required this.markerIds, + }); + + String clusterManagerId; + + PlatformLatLng position; + + PlatformLatLngBounds bounds; + + List markerIds; + + List _toList() { + return [ + clusterManagerId, + position, + bounds, + markerIds, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCluster decode(Object result) { + result as List; + return PlatformCluster( + clusterManagerId: result[0]! as String, + position: result[1]! as PlatformLatLng, + bounds: result[2]! as PlatformLatLngBounds, + markerIds: (result[3] as List?)!.cast(), + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCluster || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the ClusterManager class. +class PlatformClusterManager { + PlatformClusterManager({ + required this.identifier, + }); + + String identifier; + + List _toList() { + return [ + identifier, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformClusterManager decode(Object result) { + result as List; + return PlatformClusterManager( + identifier: result[0]! as String, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformClusterManager || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Marker class. +class PlatformMarker { + PlatformMarker({ + this.alpha = 1.0, + required this.anchor, + this.consumeTapEvents = false, + this.draggable = false, + this.flat = false, + required this.icon, + required this.infoWindow, + required this.position, + this.rotation = 0.0, + this.visible = true, + this.zIndex = 0, + required this.markerId, + this.clusterManagerId, + }); + + double alpha; + + PlatformPoint anchor; + + bool consumeTapEvents; + + bool draggable; + + bool flat; + + PlatformBitmap icon; + + PlatformInfoWindow infoWindow; + + PlatformLatLng position; + + double rotation; + + bool visible; + + int zIndex; + + String markerId; + + String? clusterManagerId; + + List _toList() { + return [ + alpha, + anchor, + consumeTapEvents, + draggable, + flat, + icon, + infoWindow, + position, + rotation, + visible, + zIndex, + markerId, + clusterManagerId, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformMarker decode(Object result) { + result as List; + return PlatformMarker( + alpha: result[0]! as double, + anchor: result[1]! as PlatformPoint, + consumeTapEvents: result[2]! as bool, + draggable: result[3]! as bool, + flat: result[4]! as bool, + icon: result[5]! as PlatformBitmap, + infoWindow: result[6]! as PlatformInfoWindow, + position: result[7]! as PlatformLatLng, + rotation: result[8]! as double, + visible: result[9]! as bool, + zIndex: result[10]! as int, + markerId: result[11]! as String, + clusterManagerId: result[12] as String?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMarker || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Point of Interest class. +class PlatformPointOfInterest { + PlatformPointOfInterest({ + required this.position, + this.name, + required this.placeId, + }); + + PlatformLatLng position; + + String? name; + + String placeId; + + List _toList() { + return [ + position, + name, + placeId, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPointOfInterest decode(Object result) { + result as List; + return PlatformPointOfInterest( + position: result[0]! as PlatformLatLng, + name: result[1]! as String, + placeId: result[2]! as String, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPointOfInterest || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Polygon class. +class PlatformPolygon { + PlatformPolygon({ + required this.polygonId, + required this.consumesTapEvents, + required this.fillColor, + required this.geodesic, + required this.points, + required this.holes, + required this.visible, + required this.strokeColor, + required this.strokeWidth, + required this.zIndex, + }); + + String polygonId; + + bool consumesTapEvents; + + PlatformColor fillColor; + + bool geodesic; + + List points; + + List> holes; + + bool visible; + + PlatformColor strokeColor; + + int strokeWidth; + + int zIndex; + + List _toList() { + return [ + polygonId, + consumesTapEvents, + fillColor, + geodesic, + points, + holes, + visible, + strokeColor, + strokeWidth, + zIndex, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPolygon decode(Object result) { + result as List; + return PlatformPolygon( + polygonId: result[0]! as String, + consumesTapEvents: result[1]! as bool, + fillColor: result[2]! as PlatformColor, + geodesic: result[3]! as bool, + points: (result[4] as List?)!.cast(), + holes: (result[5] as List?)!.cast>(), + visible: result[6]! as bool, + strokeColor: result[7]! as PlatformColor, + strokeWidth: result[8]! as int, + zIndex: result[9]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPolygon || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Polyline class. +class PlatformPolyline { + PlatformPolyline({ + required this.polylineId, + required this.consumesTapEvents, + required this.color, + required this.geodesic, + required this.jointType, + required this.patterns, + required this.points, + required this.visible, + required this.width, + required this.zIndex, + }); + + String polylineId; + + bool consumesTapEvents; + + PlatformColor color; + + bool geodesic; + + /// The joint type. + PlatformJointType jointType; + + /// The pattern data, as a list of pattern items. + List patterns; + + List points; + + bool visible; + + int width; + + int zIndex; + + List _toList() { + return [ + polylineId, + consumesTapEvents, + color, + geodesic, + jointType, + patterns, + points, + visible, + width, + zIndex, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPolyline decode(Object result) { + result as List; + return PlatformPolyline( + polylineId: result[0]! as String, + consumesTapEvents: result[1]! as bool, + color: result[2]! as PlatformColor, + geodesic: result[3]! as bool, + jointType: result[4]! as PlatformJointType, + patterns: (result[5] as List?)!.cast(), + points: (result[6] as List?)!.cast(), + visible: result[7]! as bool, + width: result[8]! as int, + zIndex: result[9]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPolyline || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the PatternItem class. +class PlatformPatternItem { + PlatformPatternItem({ + required this.type, + this.length, + }); + + PlatformPatternItemType type; + + double? length; + + List _toList() { + return [ + type, + length, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPatternItem decode(Object result) { + result as List; + return PlatformPatternItem( + type: result[0]! as PlatformPatternItemType, + length: result[1] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPatternItem || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the Tile class. +class PlatformTile { + PlatformTile({ + required this.width, + required this.height, + this.data, + }); + + int width; + + int height; + + Uint8List? data; + + List _toList() { + return [ + width, + height, + data, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformTile decode(Object result) { + result as List; + return PlatformTile( + width: result[0]! as int, + height: result[1]! as int, + data: result[2] as Uint8List?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTile || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the TileOverlay class. +class PlatformTileOverlay { + PlatformTileOverlay({ + required this.tileOverlayId, + required this.fadeIn, + required this.transparency, + required this.zIndex, + required this.visible, + required this.tileSize, + }); + + String tileOverlayId; + + bool fadeIn; + + double transparency; + + int zIndex; + + bool visible; + + int tileSize; + + List _toList() { + return [ + tileOverlayId, + fadeIn, + transparency, + zIndex, + visible, + tileSize, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformTileOverlay decode(Object result) { + result as List; + return PlatformTileOverlay( + 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, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTileOverlay || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of Flutter's EdgeInsets. +class PlatformEdgeInsets { + PlatformEdgeInsets({ + required this.top, + required this.bottom, + required this.left, + required this.right, + }); + + double top; + + double bottom; + + double left; + + double right; + + List _toList() { + return [ + top, + bottom, + left, + right, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformEdgeInsets decode(Object result) { + result as List; + return PlatformEdgeInsets( + top: result[0]! as double, + bottom: result[1]! as double, + left: result[2]! as double, + right: result[3]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformEdgeInsets || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of LatLng. +class PlatformLatLng { + PlatformLatLng({ + required this.latitude, + required this.longitude, + }); + + double latitude; + + double longitude; + + List _toList() { + return [ + latitude, + longitude, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformLatLng decode(Object result) { + result as List; + return PlatformLatLng( + latitude: result[0]! as double, + longitude: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformLatLng || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of LatLngBounds. +class PlatformLatLngBounds { + PlatformLatLngBounds({ + required this.northeast, + required this.southwest, + }); + + PlatformLatLng northeast; + + PlatformLatLng southwest; + + List _toList() { + return [ + northeast, + southwest, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformLatLngBounds decode(Object result) { + result as List; + return PlatformLatLngBounds( + northeast: result[0]! as PlatformLatLng, + southwest: result[1]! as PlatformLatLng, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformLatLngBounds || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_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]). +class PlatformCameraTargetBounds { + PlatformCameraTargetBounds({ + this.bounds, + }); + + PlatformLatLngBounds? bounds; + + List _toList() { + return [ + bounds, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraTargetBounds decode(Object result) { + result as List; + return PlatformCameraTargetBounds( + bounds: result[0] as PlatformLatLngBounds?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraTargetBounds || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of the GroundOverlay class. +class PlatformGroundOverlay { + PlatformGroundOverlay({ + required this.groundOverlayId, + required this.image, + this.position, + this.bounds, + this.anchor, + required this.transparency, + required this.bearing, + required this.zIndex, + required this.visible, + required this.clickable, + this.zoomLevel, + }); + + String groundOverlayId; + + PlatformBitmap image; + + PlatformLatLng? position; + + PlatformLatLngBounds? bounds; + + PlatformPoint? anchor; + + double transparency; + + double bearing; + + int zIndex; + + bool visible; + + bool clickable; + + double? zoomLevel; + + List _toList() { + return [ + groundOverlayId, + image, + position, + bounds, + anchor, + transparency, + bearing, + zIndex, + visible, + clickable, + zoomLevel, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformGroundOverlay decode(Object result) { + result as List; + return PlatformGroundOverlay( + groundOverlayId: result[0]! as String, + image: result[1]! as PlatformBitmap, + position: result[2] as PlatformLatLng?, + bounds: result[3] as PlatformLatLngBounds?, + anchor: result[4] as PlatformPoint?, + transparency: result[5]! as double, + bearing: result[6]! as double, + zIndex: result[7]! as int, + visible: result[8]! as bool, + clickable: result[9]! as bool, + zoomLevel: result[10] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformGroundOverlay || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Information passed to the platform view creation. +class PlatformMapViewCreationParams { + PlatformMapViewCreationParams({ + required this.initialCameraPosition, + required this.mapConfiguration, + required this.initialCircles, + required this.initialMarkers, + required this.initialPolygons, + required this.initialPolylines, + required this.initialHeatmaps, + required this.initialTileOverlays, + required this.initialClusterManagers, + required this.initialGroundOverlays, + }); + + PlatformCameraPosition initialCameraPosition; + + PlatformMapConfiguration mapConfiguration; + + List initialCircles; + + List initialMarkers; + + List initialPolygons; + + List initialPolylines; + + List initialHeatmaps; + + List initialTileOverlays; + + List initialClusterManagers; + + List initialGroundOverlays; + + List _toList() { + return [ + initialCameraPosition, + mapConfiguration, + initialCircles, + initialMarkers, + initialPolygons, + initialPolylines, + initialHeatmaps, + initialTileOverlays, + initialClusterManagers, + initialGroundOverlays, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformMapViewCreationParams decode(Object result) { + result as List; + return PlatformMapViewCreationParams( + initialCameraPosition: result[0]! as PlatformCameraPosition, + mapConfiguration: result[1]! as PlatformMapConfiguration, + initialCircles: (result[2] as List?)!.cast(), + initialMarkers: (result[3] as List?)!.cast(), + initialPolygons: (result[4] as List?)!.cast(), + initialPolylines: (result[5] as List?)!.cast(), + initialHeatmaps: (result[6] as List?)!.cast(), + initialTileOverlays: (result[7] as List?)!.cast(), + initialClusterManagers: (result[8] as List?)!.cast(), + initialGroundOverlays: (result[9] as List?)!.cast(), + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMapViewCreationParams || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of MapConfiguration. +class PlatformMapConfiguration { + PlatformMapConfiguration({ + this.compassEnabled, + this.cameraTargetBounds, + this.mapType, + this.minMaxZoomPreference, + this.rotateGesturesEnabled, + this.scrollGesturesEnabled, + this.tiltGesturesEnabled, + this.trackCameraPosition, + this.zoomGesturesEnabled, + this.myLocationEnabled, + this.myLocationButtonEnabled, + this.padding, + this.indoorViewEnabled, + this.trafficEnabled, + this.buildingsEnabled, + this.mapId, + this.style, + }); + + bool? compassEnabled; + + PlatformCameraTargetBounds? cameraTargetBounds; + + PlatformMapType? mapType; + + PlatformZoomRange? minMaxZoomPreference; + + bool? rotateGesturesEnabled; + + bool? scrollGesturesEnabled; + + bool? tiltGesturesEnabled; + + bool? trackCameraPosition; + + bool? zoomGesturesEnabled; + + bool? myLocationEnabled; + + bool? myLocationButtonEnabled; + + PlatformEdgeInsets? padding; + + bool? indoorViewEnabled; + + bool? trafficEnabled; + + bool? buildingsEnabled; + + String? mapId; + + String? style; + + List _toList() { + return [ + compassEnabled, + cameraTargetBounds, + mapType, + minMaxZoomPreference, + rotateGesturesEnabled, + scrollGesturesEnabled, + tiltGesturesEnabled, + trackCameraPosition, + zoomGesturesEnabled, + myLocationEnabled, + myLocationButtonEnabled, + padding, + indoorViewEnabled, + trafficEnabled, + buildingsEnabled, + mapId, + style, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformMapConfiguration decode(Object result) { + result as List; + return PlatformMapConfiguration( + compassEnabled: result[0] as bool?, + cameraTargetBounds: result[1] as PlatformCameraTargetBounds?, + mapType: result[2] as PlatformMapType?, + minMaxZoomPreference: result[3] as PlatformZoomRange?, + rotateGesturesEnabled: result[4] as bool?, + scrollGesturesEnabled: result[5] as bool?, + tiltGesturesEnabled: result[6] as bool?, + trackCameraPosition: result[7] as bool?, + zoomGesturesEnabled: result[8] as bool?, + myLocationEnabled: result[9] as bool?, + myLocationButtonEnabled: result[10] as bool?, + padding: result[11] as PlatformEdgeInsets?, + indoorViewEnabled: result[12] as bool?, + trafficEnabled: result[13] as bool?, + buildingsEnabled: result[14] as bool?, + mapId: result[15] as String?, + style: result[16] as String?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMapConfiguration || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon representation of an x,y coordinate. +class PlatformPoint { + PlatformPoint({ + required this.x, + required this.y, + }); + + double x; + + double y; + + List _toList() { + return [ + x, + y, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformPoint decode(Object result) { + result as List; + return PlatformPoint( + x: result[0]! as double, + y: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPoint || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon representation of a size. +class PlatformSize { + PlatformSize({ + required this.width, + required this.height, + }); + + double width; + + double height; + + List _toList() { + return [ + width, + height, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformSize decode(Object result) { + result as List; + return PlatformSize( + width: result[0]! as double, + height: result[1]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformSize || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon representation of a color. +class PlatformColor { + PlatformColor({ + required this.red, + required this.green, + required this.blue, + required this.alpha, + }); + + double red; + + double green; + + double blue; + + double alpha; + + List _toList() { + return [ + red, + green, + blue, + alpha, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformColor decode(Object result) { + result as List; + return PlatformColor( + red: result[0]! as double, + green: result[1]! as double, + blue: result[2]! as double, + alpha: result[3]! as double, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformColor || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of GMSTileLayer properties. +class PlatformTileLayer { + PlatformTileLayer({ + required this.visible, + required this.fadeIn, + required this.opacity, + required this.zIndex, + }); + + bool visible; + + bool fadeIn; + + double opacity; + + int zIndex; + + List _toList() { + return [ + visible, + fadeIn, + opacity, + zIndex, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformTileLayer decode(Object result) { + result as List; + return PlatformTileLayer( + visible: result[0]! as bool, + fadeIn: result[1]! as bool, + opacity: result[2]! as double, + zIndex: result[3]! as int, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTileLayer || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of MinMaxZoomPreference. +class PlatformZoomRange { + PlatformZoomRange({ + this.min, + this.max, + }); + + double? min; + + double? max; + + List _toList() { + return [ + min, + max, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformZoomRange decode(Object result) { + result as List; + return PlatformZoomRange( + min: result[0] as double?, + max: result[1] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformZoomRange || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint +/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which +/// may hold the pigeon equivalent type of any of them. +class PlatformBitmap { + PlatformBitmap({ + required this.bitmap, + }); + + /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], + /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], + /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. + /// As Pigeon does not currently support data class inheritance, this + /// approach allows for the different bitmap implementations to be valid + /// argument and return types of the API methods. See + /// https://github.com/flutter/flutter/issues/117819. + Object bitmap; + + List _toList() { + return [ + bitmap, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmap decode(Object result) { + result as List; + return PlatformBitmap( + bitmap: result[0]!, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [DefaultMarker]. +class PlatformBitmapDefaultMarker { + PlatformBitmapDefaultMarker({ + this.hue, + }); + + double? hue; + + List _toList() { + return [ + hue, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapDefaultMarker decode(Object result) { + result as List; + return PlatformBitmapDefaultMarker( + hue: result[0] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapDefaultMarker || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [BytesBitmap]. +class PlatformBitmapBytes { + PlatformBitmapBytes({ + required this.byteData, + this.size, + }); + + Uint8List byteData; + + PlatformSize? size; + + List _toList() { + return [ + byteData, + size, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapBytes decode(Object result) { + result as List; + return PlatformBitmapBytes( + byteData: result[0]! as Uint8List, + size: result[1] as PlatformSize?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapBytes || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [AssetBitmap]. +class PlatformBitmapAsset { + PlatformBitmapAsset({ + required this.name, + this.pkg, + }); + + String name; + + String? pkg; + + List _toList() { + return [ + name, + pkg, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapAsset decode(Object result) { + result as List; + return PlatformBitmapAsset( + name: result[0]! as String, + pkg: result[1] as String?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAsset || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [AssetImageBitmap]. +class PlatformBitmapAssetImage { + PlatformBitmapAssetImage({ + required this.name, + required this.scale, + this.size, + }); + + String name; + + double scale; + + PlatformSize? size; + + List _toList() { + return [ + name, + scale, + size, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapAssetImage decode(Object result) { + result as List; + return PlatformBitmapAssetImage( + name: result[0]! as String, + scale: result[1]! as double, + size: result[2] as PlatformSize?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAssetImage || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [AssetMapBitmap]. +class PlatformBitmapAssetMap { + PlatformBitmapAssetMap({ + required this.assetName, + required this.bitmapScaling, + required this.imagePixelRatio, + this.width, + this.height, + }); + + String assetName; + + PlatformMapBitmapScaling bitmapScaling; + + double imagePixelRatio; + + double? width; + + double? height; + + List _toList() { + return [ + assetName, + bitmapScaling, + imagePixelRatio, + width, + height, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapAssetMap decode(Object result) { + result as List; + return PlatformBitmapAssetMap( + assetName: result[0]! as String, + bitmapScaling: result[1]! as PlatformMapBitmapScaling, + imagePixelRatio: result[2]! as double, + width: result[3] as double?, + height: result[4] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAssetMap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + +/// Pigeon equivalent of [BytesMapBitmap]. +class PlatformBitmapBytesMap { + PlatformBitmapBytesMap({ + required this.byteData, + required this.bitmapScaling, + required this.imagePixelRatio, + this.width, + this.height, + }); + + Uint8List byteData; + + PlatformMapBitmapScaling bitmapScaling; + + double imagePixelRatio; + + double? width; + + double? height; + + List _toList() { + return [ + byteData, + bitmapScaling, + imagePixelRatio, + width, + height, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformBitmapBytesMap decode(Object result) { + result as List; + return PlatformBitmapBytesMap( + byteData: result[0]! as Uint8List, + bitmapScaling: result[1]! as PlatformMapBitmapScaling, + imagePixelRatio: result[2]! as double, + width: result[3] as double?, + height: result[4] as double?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapBytesMap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()) +; +} + + +class _PigeonCodec extends StandardMessageCodec { + const _PigeonCodec(); + @override + void writeValue(WriteBuffer buffer, Object? value) { + if (value is int) { + buffer.putUint8(4); + buffer.putInt64(value); + } else if (value is PlatformMapType) { + buffer.putUint8(129); + writeValue(buffer, value.index); + } else if (value is PlatformJointType) { + buffer.putUint8(130); + writeValue(buffer, value.index); + } else if (value is PlatformPatternItemType) { + buffer.putUint8(131); + writeValue(buffer, value.index); + } else if (value is PlatformMapBitmapScaling) { + buffer.putUint8(132); + writeValue(buffer, value.index); + } else if (value is PlatformCameraPosition) { + buffer.putUint8(133); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdate) { + buffer.putUint8(134); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateNewCameraPosition) { + buffer.putUint8(135); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateNewLatLng) { + buffer.putUint8(136); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateNewLatLngBounds) { + buffer.putUint8(137); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateNewLatLngZoom) { + buffer.putUint8(138); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateScrollBy) { + buffer.putUint8(139); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateZoomBy) { + buffer.putUint8(140); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateZoom) { + buffer.putUint8(141); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraUpdateZoomTo) { + buffer.putUint8(142); + writeValue(buffer, value.encode()); + } else if (value is PlatformCircle) { + buffer.putUint8(143); + writeValue(buffer, value.encode()); + } else if (value is PlatformHeatmap) { + buffer.putUint8(144); + writeValue(buffer, value.encode()); + } else if (value is PlatformHeatmapGradient) { + buffer.putUint8(145); + writeValue(buffer, value.encode()); + } else if (value is PlatformWeightedLatLng) { + buffer.putUint8(146); + writeValue(buffer, value.encode()); + } else if (value is PlatformInfoWindow) { + buffer.putUint8(147); + writeValue(buffer, value.encode()); + } else if (value is PlatformCluster) { + buffer.putUint8(148); + writeValue(buffer, value.encode()); + } else if (value is PlatformClusterManager) { + buffer.putUint8(149); + writeValue(buffer, value.encode()); + } else if (value is PlatformMarker) { + buffer.putUint8(150); + writeValue(buffer, value.encode()); + } else if (value is PlatformPointOfInterest) { + buffer.putUint8(151); + writeValue(buffer, value.encode()); + } else if (value is PlatformPolygon) { + buffer.putUint8(152); + writeValue(buffer, value.encode()); + } else if (value is PlatformPolyline) { + buffer.putUint8(153); + writeValue(buffer, value.encode()); + } else if (value is PlatformPatternItem) { + buffer.putUint8(154); + writeValue(buffer, value.encode()); + } else if (value is PlatformTile) { + buffer.putUint8(155); + writeValue(buffer, value.encode()); + } else if (value is PlatformTileOverlay) { + buffer.putUint8(156); + writeValue(buffer, value.encode()); + } else if (value is PlatformEdgeInsets) { + buffer.putUint8(157); + writeValue(buffer, value.encode()); + } else if (value is PlatformLatLng) { + buffer.putUint8(158); + writeValue(buffer, value.encode()); + } else if (value is PlatformLatLngBounds) { + buffer.putUint8(159); + writeValue(buffer, value.encode()); + } else if (value is PlatformCameraTargetBounds) { + buffer.putUint8(160); + writeValue(buffer, value.encode()); + } else if (value is PlatformGroundOverlay) { + buffer.putUint8(161); + writeValue(buffer, value.encode()); + } else if (value is PlatformMapViewCreationParams) { + buffer.putUint8(162); + writeValue(buffer, value.encode()); + } else if (value is PlatformMapConfiguration) { + buffer.putUint8(163); + writeValue(buffer, value.encode()); + } else if (value is PlatformPoint) { + buffer.putUint8(164); + writeValue(buffer, value.encode()); + } else if (value is PlatformSize) { + buffer.putUint8(165); + writeValue(buffer, value.encode()); + } else if (value is PlatformColor) { + buffer.putUint8(166); + writeValue(buffer, value.encode()); + } else if (value is PlatformTileLayer) { + buffer.putUint8(167); + writeValue(buffer, value.encode()); + } else if (value is PlatformZoomRange) { + buffer.putUint8(168); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmap) { + buffer.putUint8(169); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapDefaultMarker) { + buffer.putUint8(170); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapBytes) { + buffer.putUint8(171); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapAsset) { + buffer.putUint8(172); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapAssetImage) { + buffer.putUint8(173); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapAssetMap) { + buffer.putUint8(174); + writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapBytesMap) { + buffer.putUint8(175); + writeValue(buffer, value.encode()); + } else { + super.writeValue(buffer, value); + } + } + + @override + Object? readValueOfType(int type, ReadBuffer buffer) { + switch (type) { + case 129: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformMapType.values[value]; + case 130: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformJointType.values[value]; + case 131: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformPatternItemType.values[value]; + case 132: + final value = readValue(buffer) as int?; + return value == null ? null : PlatformMapBitmapScaling.values[value]; + case 133: + return PlatformCameraPosition.decode(readValue(buffer)!); + case 134: + return PlatformCameraUpdate.decode(readValue(buffer)!); + case 135: + return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!); + case 136: + return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!); + case 137: + return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); + case 138: + return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); + case 139: + return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); + case 140: + return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); + case 141: + return PlatformCameraUpdateZoom.decode(readValue(buffer)!); + case 142: + return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); + case 143: + return PlatformCircle.decode(readValue(buffer)!); + case 144: + return PlatformHeatmap.decode(readValue(buffer)!); + case 145: + return PlatformHeatmapGradient.decode(readValue(buffer)!); + case 146: + return PlatformWeightedLatLng.decode(readValue(buffer)!); + case 147: + return PlatformInfoWindow.decode(readValue(buffer)!); + case 148: + return PlatformCluster.decode(readValue(buffer)!); + case 149: + return PlatformClusterManager.decode(readValue(buffer)!); + case 150: + return PlatformMarker.decode(readValue(buffer)!); + case 151: + return PlatformPointOfInterest.decode(readValue(buffer)!); + case 152: + return PlatformPolygon.decode(readValue(buffer)!); + case 153: + return PlatformPolyline.decode(readValue(buffer)!); + case 154: + return PlatformPatternItem.decode(readValue(buffer)!); + case 155: + return PlatformTile.decode(readValue(buffer)!); + case 156: + return PlatformTileOverlay.decode(readValue(buffer)!); + case 157: + return PlatformEdgeInsets.decode(readValue(buffer)!); + case 158: + return PlatformLatLng.decode(readValue(buffer)!); + case 159: + return PlatformLatLngBounds.decode(readValue(buffer)!); + case 160: + return PlatformCameraTargetBounds.decode(readValue(buffer)!); + case 161: + return PlatformGroundOverlay.decode(readValue(buffer)!); + case 162: + return PlatformMapViewCreationParams.decode(readValue(buffer)!); + case 163: + return PlatformMapConfiguration.decode(readValue(buffer)!); + case 164: + return PlatformPoint.decode(readValue(buffer)!); + case 165: + return PlatformSize.decode(readValue(buffer)!); + case 166: + return PlatformColor.decode(readValue(buffer)!); + case 167: + return PlatformTileLayer.decode(readValue(buffer)!); + case 168: + return PlatformZoomRange.decode(readValue(buffer)!); + case 169: + return PlatformBitmap.decode(readValue(buffer)!); + case 170: + return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); + case 171: + return PlatformBitmapBytes.decode(readValue(buffer)!); + case 172: + return PlatformBitmapAsset.decode(readValue(buffer)!); + case 173: + return PlatformBitmapAssetImage.decode(readValue(buffer)!); + case 174: + return PlatformBitmapAssetMap.decode(readValue(buffer)!); + case 175: + return PlatformBitmapBytesMap.decode(readValue(buffer)!); + default: + return super.readValueOfType(type, buffer); + } + } +} + +/// Interface for non-test interactions with the native SDK. +/// +/// For test-only state queries, see [MapsInspectorApi]. +class MapsApi { + /// Constructor for [MapsApi]. 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. + MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + /// Returns once the map instance is available. + Future waitForMap() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the map's configuration options. + /// + /// Only non-null configuration values will result in updates; options with + /// null values will remain unchanged. + Future updateMapConfiguration(PlatformMapConfiguration configuration) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of circles on the map. + Future updateCircles(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of heatmaps on the map. + Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of custer managers for clusters on the map. + Future updateClusterManagers(List toAdd, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of markers on the map. + Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of polygonss on the map. + Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of polylines on the map. + Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of tile overlays on the map. + Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Updates the set of ground overlays on the map. + Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Gets the screen coordinate for the given map location. + Future getScreenCoordinate(PlatformLatLng latLng) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformPoint?)!; + } + } + + /// Gets the map location for the given screen coordinate. + Future getLatLng(PlatformPoint screenCoordinate) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformLatLng?)!; + } + } + + /// Gets the map region currently displayed on the map. + Future getVisibleRegion() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformLatLngBounds?)!; + } + } + + /// Moves the camera according to [cameraUpdate] immediately, with no + /// animation. + Future moveCamera(PlatformCameraUpdate cameraUpdate) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Moves the camera according to [cameraUpdate], animating the update using a + /// duration in milliseconds if provided. + Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Gets the current map zoom level. + Future getZoomLevel() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as double?)!; + } + } + + /// Show the info window for the marker with the given ID. + Future showInfoWindow(String markerId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Hide the info window for the marker with the given ID. + Future hideInfoWindow(String markerId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Returns true if the marker with the given ID is currently displaying its + /// info window. + Future isInfoWindowShown(String markerId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + /// Sets the style to the given map style string, where an empty string + /// indicates that the style should be cleared. + /// + /// If there was an error setting the style, such as an invalid style string, + /// returns the error message. + Future setStyle(String style) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as String?); + } + } + + /// Returns the error string from the last attempt to set the map style, if + /// any. + /// + /// This allows checking asynchronously for initial style failures, as there + /// is no way to return failures from map initialization. + Future getLastStyleError() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as String?); + } + } + + /// Clears the cache of tiles previously requseted from the tile provider. + Future clearTileCache(String tileOverlayId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } + + /// Takes a snapshot of the map and returns its image data. + Future takeSnapshot() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as Uint8List?); + } + } +} + +/// Interface for calls from the native SDK to Dart. +abstract class MapsCallbackApi { + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + /// Called when the map camera starts moving. + void onCameraMoveStarted(); + + /// Called when the map camera moves. + void onCameraMove(PlatformCameraPosition cameraPosition); + + /// Called when the map camera stops moving. + void onCameraIdle(); + + /// Called when the map, not a specifc map object, is tapped. + void onTap(PlatformLatLng position); + + /// Called when the map, not a specifc map object, is long pressed. + void onLongPress(PlatformLatLng position); + + /// Called when a marker is tapped. + void onMarkerTap(String markerId); + + /// Called when a marker drag starts. + void onMarkerDragStart(String markerId, PlatformLatLng position); + + /// Called when a marker drag updates. + void onMarkerDrag(String markerId, PlatformLatLng position); + + /// Called when a marker drag ends. + void onMarkerDragEnd(String markerId, PlatformLatLng position); + + /// Called when a marker's info window is tapped. + void onInfoWindowTap(String markerId); + + /// Called when a circle is tapped. + void onCircleTap(String circleId); + + /// Called when a marker cluster is tapped. + void onClusterTap(PlatformCluster cluster); + + /// Called when a polygon is tapped. + void onPolygonTap(String polygonId); + + /// Called when a polyline is tapped. + void onPolylineTap(String polylineId); + + /// Called when a ground overlay is tapped. + void onGroundOverlayTap(String groundOverlayId); + + /// Called when a point of interest is tapped. + void onPoiTap(PlatformPointOfInterest poi); + + /// 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' : ''; + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + try { + api.onCameraMoveStarted(); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.'); + final List args = (message as List?)!; + final PlatformCameraPosition? arg_cameraPosition = (args[0] as PlatformCameraPosition?); + assert(arg_cameraPosition != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.'); + try { + api.onCameraMove(arg_cameraPosition!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + try { + api.onCameraIdle(); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.'); + final List args = (message as List?)!; + final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); + try { + api.onTap(arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.'); + final List args = (message as List?)!; + final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); + try { + api.onLongPress(arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); + try { + api.onMarkerTap(arg_markerId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); + try { + api.onMarkerDragStart(arg_markerId!, arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); + try { + api.onMarkerDrag(arg_markerId!, arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); + assert(arg_position != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); + try { + api.onMarkerDragEnd(arg_markerId!, arg_position!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.'); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); + assert(arg_markerId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); + try { + api.onInfoWindowTap(arg_markerId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.'); + final List args = (message as List?)!; + final String? arg_circleId = (args[0] as String?); + assert(arg_circleId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null, expected non-null String.'); + try { + api.onCircleTap(arg_circleId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.'); + final List args = (message as List?)!; + final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); + assert(arg_cluster != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); + try { + api.onClusterTap(arg_cluster!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.'); + final List args = (message as List?)!; + final String? arg_polygonId = (args[0] as String?); + assert(arg_polygonId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); + try { + api.onPolygonTap(arg_polygonId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.'); + final List args = (message as List?)!; + final String? arg_polylineId = (args[0] as String?); + assert(arg_polylineId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); + try { + api.onPolylineTap(arg_polylineId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.'); + final List args = (message as List?)!; + final String? arg_groundOverlayId = (args[0] as String?); + assert(arg_groundOverlayId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); + try { + api.onGroundOverlayTap(arg_groundOverlayId!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.'); + final List args = (message as List?)!; + final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); + assert(arg_poi != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); + try { + api.onPoiTap(arg_poi!); + return wrapResponse(empty: true); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, + binaryMessenger: binaryMessenger); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.'); + final List args = (message as List?)!; + final String? arg_tileOverlayId = (args[0] as String?); + assert(arg_tileOverlayId != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); + final PlatformPoint? arg_location = (args[1] as PlatformPoint?); + assert(arg_location != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); + final int? arg_zoom = (args[2] as int?); + assert(arg_zoom != null, + 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); + try { + final PlatformTile output = await api.getTileOverlayTile(arg_tileOverlayId!, arg_location!, arg_zoom!); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); + } + }); + } + } + } +} + +/// 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. +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 = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + Future createView(PlatformMapViewCreationParams? type) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return; + } + } +} + +/// Inspector API only intended for use in integration tests. +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 = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + Future areBuildingsEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areRotateGesturesEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areScrollGesturesEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areTiltGesturesEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future areZoomGesturesEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future isCompassEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future isMyLocationButtonEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future isTrafficEnabled() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as bool?)!; + } + } + + Future getTileOverlayInfo(String tileOverlayId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as PlatformTileLayer?); + } + } + + Future getGroundOverlayInfo(String groundOverlayId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as PlatformGroundOverlay?); + } + } + + Future getHeatmapInfo(String heatmapId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([heatmapId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as PlatformHeatmap?); + } + } + + Future getZoomRange() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformZoomRange?)!; + } + } + + Future> getClusters(String clusterManagerId) async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as List?)!.cast(); + } + } + + Future getCameraPosition() async { + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as PlatformCameraPosition?)!; + } + } +} diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.rej b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.rej new file mode 100644 index 000000000000..6a762b8f1585 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.rej @@ -0,0 +1,1496 @@ +--- packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart ++++ packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +@@ -31,49 +35,36 @@ List wrapResponse({Object? result, PlatformException? error, bool empty + } + return [error.code, error.message, error.details]; + } ++ + bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && +- a.indexed +- .every(((int, dynamic) item) => _deepEquals(item., b[item.])); ++ a.indexed.every( ++ ((int, dynamic) item) => _deepEquals(item., b[item.]), ++ ); + } + if (a is Map && b is Map) { +- return a.length == b.length && a.entries.every((MapEntry entry) => +- (b as Map).containsKey(entry.key) && +- _deepEquals(entry.value, b[entry.key])); ++ return a.length == b.length && ++ a.entries.every( ++ (MapEntry entry) => ++ (b as Map).containsKey(entry.key) && ++ _deepEquals(entry.value, b[entry.key]), ++ ); + } + return a == b; + } + +- + /// Pigeon equivalent of MapType +-enum PlatformMapType { +- none, +- normal, +- satellite, +- terrain, +- hybrid, +-} ++enum PlatformMapType { none, normal, satellite, terrain, hybrid } + + /// Join types for polyline joints. +-enum PlatformJointType { +- mitered, +- bevel, +- round, +-} ++enum PlatformJointType { mitered, bevel, round } + + /// Enumeration of possible types for PatternItem. +-enum PlatformPatternItemType { +- dot, +- dash, +- gap, +-} ++enum PlatformPatternItemType { dot, dash, gap } + + /// Pigeon equivalent of [MapBitmapScaling]. +-enum PlatformMapBitmapScaling { +- auto, +- none, +-} ++enum PlatformMapBitmapScaling { auto, none } + + /// Pigeon representatation of a CameraPosition. + class PlatformCameraPosition { +@@ -2644,8 +2457,10 @@ class MapsApi { + /// available for dependency injection. If it is left null, the default + /// BinaryMessenger will be used which routes to the host platform. + MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) +- : pigeonVar_binaryMessenger = binaryMessenger, +- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ : pigeonVar_binaryMessenger = binaryMessenger, ++ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); +@@ -2654,7 +2469,8 @@ class MapsApi { + + /// Returns once the map instance is available. + Future waitForMap() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -2679,14 +2495,19 @@ class MapsApi { + /// + /// Only non-null configuration values will result in updates; options with + /// null values will remain unchanged. +- Future updateMapConfiguration(PlatformMapConfiguration configuration) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration'; ++ Future updateMapConfiguration( ++ PlatformMapConfiguration configuration, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [configuration], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2702,14 +2523,21 @@ class MapsApi { + } + + /// Updates the set of circles on the map. +- Future updateCircles(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles'; ++ Future updateCircles( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2725,14 +2553,21 @@ class MapsApi { + } + + /// Updates the set of heatmaps on the map. +- Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps'; ++ Future updateHeatmaps( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2748,14 +2583,20 @@ class MapsApi { + } + + /// Updates the set of custer managers for clusters on the map. +- Future updateClusterManagers(List toAdd, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers'; ++ Future updateClusterManagers( ++ List toAdd, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2771,14 +2612,21 @@ class MapsApi { + } + + /// Updates the set of markers on the map. +- Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers'; ++ Future updateMarkers( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2794,14 +2642,21 @@ class MapsApi { + } + + /// Updates the set of polygonss on the map. +- Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons'; ++ Future updatePolygons( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2817,14 +2672,21 @@ class MapsApi { + } + + /// Updates the set of polylines on the map. +- Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines'; ++ Future updatePolylines( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2840,14 +2702,21 @@ class MapsApi { + } + + /// Updates the set of tile overlays on the map. +- Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays'; ++ Future updateTileOverlays( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2863,14 +2732,21 @@ class MapsApi { + } + + /// Updates the set of ground overlays on the map. +- Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays'; ++ Future updateGroundOverlays( ++ List toAdd, ++ List toChange, ++ List idsToRemove, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [toAdd, toChange, idsToRemove], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2887,13 +2763,16 @@ class MapsApi { + + /// Gets the screen coordinate for the given map location. + Future getScreenCoordinate(PlatformLatLng latLng) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [latLng], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2915,13 +2794,16 @@ class MapsApi { + + /// Gets the map location for the given screen coordinate. + Future getLatLng(PlatformPoint screenCoordinate) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [screenCoordinate], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2943,7 +2825,8 @@ class MapsApi { + + /// Gets the map region currently displayed on the map. + Future getVisibleRegion() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -2972,13 +2855,16 @@ class MapsApi { + /// Moves the camera according to [cameraUpdate] immediately, with no + /// animation. + Future moveCamera(PlatformCameraUpdate cameraUpdate) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [cameraUpdate], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -2995,14 +2881,20 @@ class MapsApi { + + /// Moves the camera according to [cameraUpdate], animating the update using a + /// duration in milliseconds if provided. +- Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera'; ++ Future animateCamera( ++ PlatformCameraUpdate cameraUpdate, ++ int? durationMilliseconds, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [cameraUpdate, durationMilliseconds], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3019,7 +2911,8 @@ class MapsApi { + + /// Gets the current map zoom level. + Future getZoomLevel() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3047,13 +2940,16 @@ class MapsApi { + + /// Show the info window for the marker with the given ID. + Future showInfoWindow(String markerId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [markerId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3070,13 +2966,16 @@ class MapsApi { + + /// Hide the info window for the marker with the given ID. + Future hideInfoWindow(String markerId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [markerId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3094,13 +2993,16 @@ class MapsApi { + /// Returns true if the marker with the given ID is currently displaying its + /// info window. + Future isInfoWindowShown(String markerId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [markerId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3126,13 +3028,16 @@ class MapsApi { + /// If there was an error setting the style, such as an invalid style string, + /// returns the error message. + Future setStyle(String style) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [style], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3153,7 +3058,8 @@ class MapsApi { + /// This allows checking asynchronously for initial style failures, as there + /// is no way to return failures from map initialization. + Future getLastStyleError() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3176,13 +3082,16 @@ class MapsApi { + + /// Clears the cache of tiles previously requseted from the tile provider. + Future clearTileCache(String tileOverlayId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [tileOverlayId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3199,7 +3108,8 @@ class MapsApi { + + /// Takes a snapshot of the map and returns its image data. + Future takeSnapshot() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3274,14 +3184,26 @@ abstract class MapsCallbackApi { + void onPoiTap(PlatformPointOfInterest poi); + + /// Called to get data for a map tile. +- Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); ++ Future getTileOverlayTile( ++ String tileOverlayId, ++ PlatformPoint location, ++ int zoom, ++ ); + +- static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { +- messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ static void setUp( ++ MapsCallbackApi? api, { ++ BinaryMessenger? binaryMessenger, ++ String messageChannelSuffix = '', ++ }) { ++ messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + { + final pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { +@@ -3291,41 +3213,54 @@ 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.', ++ ); + final List args = (message as List?)!; +- final PlatformCameraPosition? arg_cameraPosition = (args[0] as PlatformCameraPosition?); +- assert(arg_cameraPosition != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.'); ++ final PlatformCameraPosition? arg_cameraPosition = ++ (args[0] as PlatformCameraPosition?); ++ assert( ++ arg_cameraPosition != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.', ++ ); + try { + api.onCameraMove(arg_cameraPosition!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { +@@ -3335,373 +3270,502 @@ 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.', ++ ); + final List args = (message as List?)!; + final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); +- assert(arg_position != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onTap(arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.', ++ ); + final List args = (message as List?)!; + final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); +- assert(arg_position != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onLongPress(arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.', ++ ); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); +- assert(arg_markerId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null, expected non-null String.', ++ ); + try { + api.onMarkerTap(arg_markerId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.', ++ ); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); +- assert(arg_markerId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.', ++ ); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); +- assert(arg_position != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onMarkerDragStart(arg_markerId!, arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.', ++ ); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); +- assert(arg_markerId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null String.', ++ ); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); +- assert(arg_position != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onMarkerDrag(arg_markerId!, arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.', ++ ); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); +- assert(arg_markerId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.', ++ ); + final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); +- assert(arg_position != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); ++ assert( ++ arg_position != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.', ++ ); + try { + api.onMarkerDragEnd(arg_markerId!, arg_position!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.', ++ ); + final List args = (message as List?)!; + final String? arg_markerId = (args[0] as String?); +- assert(arg_markerId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); ++ assert( ++ arg_markerId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.', ++ ); + try { + api.onInfoWindowTap(arg_markerId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.', ++ ); + final List args = (message as List?)!; + final String? arg_circleId = (args[0] as String?); +- assert(arg_circleId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null, expected non-null String.'); ++ assert( ++ arg_circleId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null, expected non-null String.', ++ ); + try { + api.onCircleTap(arg_circleId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.', ++ ); + final List args = (message as List?)!; + final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); +- assert(arg_cluster != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); ++ assert( ++ arg_cluster != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.', ++ ); + try { + api.onClusterTap(arg_cluster!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.', ++ ); + final List args = (message as List?)!; + final String? arg_polygonId = (args[0] as String?); +- assert(arg_polygonId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); ++ assert( ++ arg_polygonId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null, expected non-null String.', ++ ); + try { + api.onPolygonTap(arg_polygonId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.', ++ ); + final List args = (message as List?)!; + final String? arg_polylineId = (args[0] as String?); +- assert(arg_polylineId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); ++ assert( ++ arg_polylineId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null, expected non-null String.', ++ ); + try { + api.onPolylineTap(arg_polylineId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.', ++ ); + final List args = (message as List?)!; + final String? arg_groundOverlayId = (args[0] as String?); +- assert(arg_groundOverlayId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); ++ assert( ++ arg_groundOverlayId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.', ++ ); + try { + api.onGroundOverlayTap(arg_groundOverlayId!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.', ++ ); + final List args = (message as List?)!; +- final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); +- assert(arg_poi != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); ++ final PlatformPointOfInterest? arg_poi = ++ (args[0] as PlatformPointOfInterest?); ++ assert( ++ arg_poi != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.', ++ ); + try { + api.onPoiTap(arg_poi!); + 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 pigeonVar_channel = BasicMessageChannel( +- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile', pigeonChannelCodec, +- binaryMessenger: binaryMessenger); ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile', ++ pigeonChannelCodec, ++ binaryMessenger: binaryMessenger, ++ ); + if (api == null) { + pigeonVar_channel.setMessageHandler(null); + } else { + pigeonVar_channel.setMessageHandler((Object? message) async { +- assert(message != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.'); ++ assert( ++ message != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.', ++ ); + final List args = (message as List?)!; + final String? arg_tileOverlayId = (args[0] as String?); +- assert(arg_tileOverlayId != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); ++ assert( ++ arg_tileOverlayId != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.', ++ ); + final PlatformPoint? arg_location = (args[1] as PlatformPoint?); +- assert(arg_location != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); ++ assert( ++ arg_location != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.', ++ ); + final int? arg_zoom = (args[2] as int?); +- assert(arg_zoom != null, +- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); ++ assert( ++ arg_zoom != null, ++ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.', ++ ); + try { +- final PlatformTile output = await api.getTileOverlayTile(arg_tileOverlayId!, arg_location!, arg_zoom!); ++ final PlatformTile output = await api.getTileOverlayTile( ++ arg_tileOverlayId!, ++ arg_location!, ++ arg_zoom!, ++ ); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); +- } catch (e) { +- return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); ++ } catch (e) { ++ return wrapResponse( ++ error: PlatformException(code: 'error', message: e.toString()), ++ ); + } + }); + } +@@ -3716,9 +3780,13 @@ 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 = ''}) +- : pigeonVar_binaryMessenger = binaryMessenger, +- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ MapsPlatformViewApi({ ++ BinaryMessenger? binaryMessenger, ++ String messageChannelSuffix = '', ++ }) : pigeonVar_binaryMessenger = binaryMessenger, ++ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); +@@ -3726,13 +3794,16 @@ class MapsPlatformViewApi { + final String pigeonVar_messageChannelSuffix; + + Future createView(PlatformMapViewCreationParams? type) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [type], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -3753,9 +3824,13 @@ 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 = ''}) +- : pigeonVar_binaryMessenger = binaryMessenger, +- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; ++ MapsInspectorApi({ ++ BinaryMessenger? binaryMessenger, ++ String messageChannelSuffix = '', ++ }) : pigeonVar_binaryMessenger = binaryMessenger, ++ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ++ ? '.' ++ : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); +@@ -3763,7 +3838,8 @@ class MapsInspectorApi { + final String pigeonVar_messageChannelSuffix; + + Future areBuildingsEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3790,7 +3866,8 @@ class MapsInspectorApi { + } + + Future areRotateGesturesEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3817,7 +3894,8 @@ class MapsInspectorApi { + } + + Future areScrollGesturesEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3844,7 +3922,8 @@ class MapsInspectorApi { + } + + Future areTiltGesturesEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3871,7 +3950,8 @@ class MapsInspectorApi { + } + + Future areZoomGesturesEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3898,7 +3978,8 @@ class MapsInspectorApi { + } + + Future isCompassEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3925,7 +4006,8 @@ class MapsInspectorApi { + } + + Future isMyLocationButtonEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3952,7 +4034,8 @@ class MapsInspectorApi { + } + + Future isTrafficEnabled() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -3979,13 +4062,16 @@ class MapsInspectorApi { + } + + Future getTileOverlayInfo(String tileOverlayId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [tileOverlayId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -4000,14 +4086,19 @@ class MapsInspectorApi { + } + } + +- Future getGroundOverlayInfo(String groundOverlayId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo'; ++ Future getGroundOverlayInfo( ++ String groundOverlayId, ++ ) async { ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [groundOverlayId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -4023,13 +4114,16 @@ class MapsInspectorApi { + } + + Future getHeatmapInfo(String heatmapId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([heatmapId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [heatmapId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -4045,7 +4139,8 @@ class MapsInspectorApi { + } + + Future getZoomRange() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, +@@ -4072,13 +4167,16 @@ class MapsInspectorApi { + } + + Future> getClusters(String clusterManagerId) async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); +- final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); ++ final Future pigeonVar_sendFuture = pigeonVar_channel.send( ++ [clusterManagerId], ++ ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); +@@ -4094,12 +4192,14 @@ class MapsInspectorApi { + message: 'Host platform returned null value for non-null return value.', + ); + } else { +- return (pigeonVar_replyList[0] as List?)!.cast(); ++ return (pigeonVar_replyList[0] as List?)! ++ .cast(); + } + } + + Future getCameraPosition() async { +- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition'; ++ final pigeonVar_channelName = ++ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index 233e91151b36..fe2da120abf1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -237,6 +237,19 @@ class PlatformMarker { final String? clusterManagerId; } +/// Pigeon equivalent of the Point of Interest class. +class PlatformPointOfInterest { + PlatformPointOfInterest({ + required this.position, + this.name, + required this.placeId, + }); + + final PlatformLatLng position; + final String? name; + final String placeId; +} + /// Pigeon equivalent of the Polygon class. class PlatformPolygon { PlatformPolygon({ @@ -823,6 +836,10 @@ abstract class MapsCallbackApi { @ObjCSelector('didTapGroundOverlayWithIdentifier:') void onGroundOverlayTap(String groundOverlayId); + /// Called when a point of interest is tapped. + @ObjCSelector('didTapPointOfInterest:') + void onPoiTap(PlatformPointOfInterest poi); + /// Called to get data for a map tile. @async @ObjCSelector('tileWithOverlayIdentifier:location:zoom:') diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml index f971ae9b5678..eaf316617735 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter_ios description: iOS implementation of the google_maps_flutter plugin. repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_ios issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 2.17.1 +version: 2.18.0 environment: sdk: ^3.9.0 @@ -19,7 +19,7 @@ flutter: dependencies: flutter: sdk: flutter - google_maps_flutter_platform_interface: ^2.13.0 + google_maps_flutter_platform_interface: ^2.15.0 stream_transform: ^2.0.0 dev_dependencies: @@ -35,3 +35,6 @@ topics: - google-maps - google-maps-flutter - map +dependency_overrides: + google_maps_flutter_platform_interface: + path: ../google_maps_flutter_platform_interface diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart index 23c7fd0c9fac..b98fc01ea27f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart @@ -1348,6 +1348,40 @@ void main() { reason: 'Should pass mapId on PlatformView creation message', ); }); + + test('onPoiTap sends events to correct stream', () async { + const mapId = 1; + final fakePosition = PlatformLatLng(latitude: 12.34, longitude: 56.78); + const fakeName = 'Googleplex'; + const fakePlaceId = 'iso_id_123'; + + final maps = GoogleMapsFlutterIOS(); + // Initialize the handler which receives messages from the native side + final HostMapMessageHandler callbackHandler = maps.ensureHandlerInitialized( + mapId, + ); + + final stream = StreamQueue(maps.onPoiTap(mapId: mapId)); + + // Simulate a message from the native side via the Pigeon generated handler + callbackHandler.onPoiTap( + PlatformPointOfInterest( + position: fakePosition, + name: fakeName, + placeId: fakePlaceId, + ), + ); + + // Verify the event in the stream + final MapPoiTapEvent event = await stream.next; + expect(event.mapId, mapId); + + final PointOfInterest poi = event.value; + expect(poi.position.latitude, fakePosition.latitude); + expect(poi.position.longitude, fakePosition.longitude); + expect(poi.name, fakeName); + expect(poi.placeId, fakePlaceId); + }); } void _expectColorsEqual(PlatformColor actual, Color expected) { diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md index 3636e5674232..be29338d9f15 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md @@ -2,7 +2,6 @@ * Adds `PointOfInterest` type. * Adds `MapPoiTapEvent` to support point-of-interest tap events. -* Adds `onPoiTap` to `GoogleMapsFlutterPlatform` to support Point of Interest tapping. ## 2.14.1 diff --git a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md index 149dba550204..3c1dab25f0e3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md @@ -2,6 +2,10 @@ * Updates minimum supported SDK version to Flutter 3.35/Dart 3.9. +## 0.6.0 + +* Added support for Tap detection on Point of Interest + ## 0.5.14+3 * Replaces uses of deprecated `Color` properties. diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart new file mode 100644 index 000000000000..81fd56c0ca8b --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/poi_test.dart @@ -0,0 +1,103 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:async'; +import 'dart:js_interop'; + +import 'package:flutter/widgets.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:google_maps/google_maps.dart' as gmaps; +import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; +import 'package:google_maps_flutter_web/google_maps_flutter_web.dart'; +import 'package:google_maps_flutter_web/src/utils.dart'; +import 'package:integration_test/integration_test.dart'; + +@JS() +@anonymous +extension type FakeIconMouseEvent._(JSObject _) implements JSObject { + external factory FakeIconMouseEvent({ + gmaps.LatLng? latLng, + String? placeId, + JSFunction? stop, + }); +} + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('POI Tap Events', () { + late GoogleMapController controller; + late StreamController> stream; + late gmaps.Map map; + + setUp(() { + stream = StreamController>.broadcast(); + map = gmaps.Map(createDivElement()); + + controller = GoogleMapController( + mapId: 1, + streamController: stream, + widgetConfiguration: const MapWidgetConfiguration( + initialCameraPosition: CameraPosition(target: LatLng(0, 0)), + textDirection: TextDirection.ltr, + ), + ); + + controller.debugSetOverrides(createMap: (_, __) => map); + controller.init(); + }); + + tearDown(() { + controller.dispose(); + }); + + testWidgets('Emits MapPoiTapEvent when clicking a POI', ( + WidgetTester tester, + ) async { + final latLng = gmaps.LatLng(10, 20); + bool? stopCalled = false; + + final event = FakeIconMouseEvent( + latLng: latLng, + placeId: 'test_place_id', + stop: (() { + stopCalled = true; + }).toJS, + ); + gmaps.event.trigger(map, 'click', event as JSAny); + + final MapEvent emittedEvent = await stream.stream.first; + + expect(emittedEvent, isA()); + final poiEvent = emittedEvent as MapPoiTapEvent; + + expect(poiEvent.mapId, 1); + expect(poiEvent.value.placeId, 'test_place_id'); + expect(poiEvent.value.position.latitude, 10); + expect(poiEvent.value.position.longitude, 20); + + expect(stopCalled, isTrue); + }); + + testWidgets('Emits MapTapEvent when clicking (no POI)', ( + WidgetTester tester, + ) async { + final latLng = gmaps.LatLng(30, 40); + final event = gmaps.MapMouseEvent()..latLng = latLng; + + gmaps.event.trigger(map, 'click', event); + + final MapEvent emittedEvent = await stream.stream.first; + + expect(emittedEvent, isA()); + final tapEvent = emittedEvent as MapTapEvent; + + expect(tapEvent.mapId, 1); + expect(tapEvent.position.latitude, 30); + expect(tapEvent.position.longitude, 40); + + expect(emittedEvent, isNot(isA())); + }); + }); +} diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml index a82a05b9be17..f76e0d8e3e6b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml @@ -8,7 +8,7 @@ environment: dependencies: flutter: sdk: flutter - google_maps_flutter_platform_interface: ^2.14.0 + google_maps_flutter_platform_interface: ^2.15.0 google_maps_flutter_web: path: ../ web: ^1.0.0 @@ -27,10 +27,14 @@ dev_dependencies: flutter: assets: - assets/ - dependency_overrides: - # Override the google_maps_flutter dependency on google_maps_flutter_web. - # TODO(ditman): Unwind the circular dependency. This will create problems - # if we need to make a breaking change to google_maps_flutter_web. + google_maps_flutter: + path: ../../google_maps_flutter + google_maps_flutter_android: + path: ../../google_maps_flutter_android + google_maps_flutter_ios: + path: ../../google_maps_flutter_ios + google_maps_flutter_platform_interface: + path: ../../google_maps_flutter_platform_interface google_maps_flutter_web: path: ../ diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index 8e862f6e3dd7..b16639f9897d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -260,9 +260,27 @@ class GoogleMapController { ) { assert(event.latLng != null); if (!_streamController.isClosed) { - _streamController.add( - MapTapEvent(_mapId, gmLatLngToLatLng(event.latLng!)), - ); + if (event is gmaps.IconMouseEvent && event.placeId != null) { + final String placeId = event.placeId!; + + // Stop the event to prevent the default Google Maps InfoWindow from popping up + event.stop(); + + _streamController.add( + MapPoiTapEvent( + _mapId, + PointOfInterest( + position: gmLatLngToLatLng(event.latLng!), + placeId: placeId, + ), + ), + ); + } else { + // If no placeId, treat it as a standard map tap + _streamController.add( + MapTapEvent(_mapId, gmLatLngToLatLng(event.latLng!)), + ); + } } }); _onRightClickSubscription = map.onRightclick.listen(( diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart index e980252e7c89..fd83749d4c21 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_flutter_web.dart @@ -289,6 +289,11 @@ class GoogleMapsPlugin extends GoogleMapsFlutterPlatform { return _events(mapId).whereType(); } + @override + Stream onPoiTap({required int mapId}) { + return _events(mapId).whereType(); + } + @override Stream onTap({required int mapId}) { return _events(mapId).whereType(); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml index f87b3ea66e81..1f2bab482905 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter_web description: Web platform implementation of google_maps_flutter repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_web issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 0.5.14+3 +version: 0.6.0 environment: sdk: ^3.9.0 @@ -23,7 +23,7 @@ dependencies: flutter_web_plugins: sdk: flutter google_maps: ^8.1.0 - google_maps_flutter_platform_interface: ^2.14.0 + google_maps_flutter_platform_interface: ^2.15.0 sanitize_html: ^2.0.0 stream_transform: ^2.0.0 web: ">=0.5.1 <2.0.0" @@ -40,3 +40,6 @@ topics: # The example deliberately includes limited-use secrets. false_secrets: - /example/web/index.html +dependency_overrides: + google_maps_flutter_platform_interface: + path: ../google_maps_flutter_platform_interface From 7596469afadeff36ef51ab2a8b0cb04f847b1615 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Sun, 8 Feb 2026 21:19:17 +0530 Subject: [PATCH 35/46] [google_maps_flutter] updated changelog.md for web package --- .../google_maps_flutter_web/CHANGELOG.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md index 3c1dab25f0e3..faa5ff6c37fe 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md @@ -1,10 +1,7 @@ -## NEXT - -* Updates minimum supported SDK version to Flutter 3.35/Dart 3.9. - ## 0.6.0 -* Added support for Tap detection on Point of Interest +* Added support for Tap detection on Point of Interest. +* Updates minimum supported SDK version to Flutter 3.35/Dart 3.9. ## 0.5.14+3 From 9cc391ea0f2b322fba12b224e977dc872c3f5a22 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Fri, 13 Feb 2026 00:48:17 +0530 Subject: [PATCH 36/46] [google_maps_flutter] Fix federated PR structure: overrides, artifacts, formatting and removed name from PointOfInterest Model --- .../example/lib/place_poi.dart | 1 - .../google_maps_flutter/example/pubspec.yaml | 7 +- .../lib/src/google_map.dart | 10 +- .../google_maps_flutter/pubspec.yaml | 1 + .../test/google_map_test.dart | 2 - .../googlemaps/GoogleMapController.java | 1 - .../flutter/plugins/googlemaps/Messages.java | 32 +- .../example/lib/place_poi.dart | 1 - .../example/pubspec.yaml | 1 + .../lib/src/google_maps_flutter_android.dart | 1 - .../lib/src/messages.g.dart | 13 +- .../lib/src/messages.g.dart.orig | 4548 ----------------- .../lib/src/messages.g.dart.rej | 1574 ------ .../pigeons/messages.dart | 7 +- .../google_maps_flutter_android/pubspec.yaml | 1 + .../google_maps_flutter_android_test.dart | 8 +- .../example/ios/RunnerTests/GoogleMapsTests.m | 50 + .../example/pubspec.yaml | 1 + .../example/test/example_google_map_test.dart | 2 - .../GoogleMapController.m | 1 - .../google_maps_flutter_pigeon_messages.g.m | 49 +- .../google_maps_flutter_pigeon_messages.g.h | 5 +- ...ogle_maps_flutter_pigeon_messages.g.h.orig | 901 ---- ...oogle_maps_flutter_pigeon_messages.g.h.rej | 807 --- .../lib/src/google_maps_flutter_ios.dart | 1 - .../lib/src/messages.g.dart | 13 +- .../lib/src/messages.g.dart.orig | 4301 ---------------- .../lib/src/messages.g.dart.rej | 1496 ------ .../pigeons/messages.dart | 7 +- .../google_maps_flutter_ios/pubspec.yaml | 1 + .../test/google_maps_flutter_ios_test.dart | 8 +- .../method_channel_google_maps_flutter.dart | 1 - .../google_maps_flutter_platform.dart | 2 +- .../lib/src/types/point_of_interest.dart | 14 +- ...thod_channel_google_maps_flutter_test.dart | 2 - .../google_maps_flutter_platform_test.dart | 8 +- .../test/types/point_of_interest_test.dart | 40 +- .../example/pubspec.yaml | 3 +- .../google_maps_flutter_web/pubspec.yaml | 8 + 39 files changed, 121 insertions(+), 13808 deletions(-) delete mode 100644 packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.orig delete mode 100644 packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.rej delete mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.orig delete mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.rej delete mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.orig delete mode 100644 packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.rej diff --git a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart index fda0bab244cc..89cf8cc5e6e9 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/lib/place_poi.dart @@ -80,7 +80,6 @@ class PlacePoiBodyState extends State { ), const SizedBox(height: 8), if (_lastPoi != null) ...[ - Text('Name: ${_lastPoi!.name ?? "Unknown"}'), Text('Place ID: ${_lastPoi!.placeId}'), Text( 'Lat/Lng: ${_lastPoi!.position.latitude.toStringAsFixed(5)}, ${_lastPoi!.position.longitude.toStringAsFixed(5)}', diff --git a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml index f0ad9085874d..6c7a96388ccd 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: # the parent directory to use the current plugin's version. path: ../ google_maps_flutter_android: ^2.19.0 - google_maps_flutter_platform_interface: ^2.15.0 + google_maps_flutter_platform_interface: ^2.14.1 dev_dependencies: build_runner: ^2.1.10 @@ -33,14 +33,11 @@ flutter: uses-material-design: true assets: - assets/ + dependency_overrides: - google_maps_flutter: - path: ../ google_maps_flutter_android: path: ../../google_maps_flutter_android google_maps_flutter_ios: path: ../../google_maps_flutter_ios google_maps_flutter_platform_interface: path: ../../google_maps_flutter_platform_interface - google_maps_flutter_web: - path: ../../google_maps_flutter_web diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index 0ea1af487e7f..458f802e770a 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -236,9 +236,6 @@ class GoogleMap extends StatefulWidget { /// See https://pub.dev/packages/google_maps_flutter_web. final Set clusterManagers; - /// Callback for Point of Interests tap - final ArgumentCallback? onPoiTap; - /// Ground overlays to be initialized for the map. /// /// Support table for Ground Overlay features: @@ -294,6 +291,9 @@ class GoogleMap extends StatefulWidget { /// Called every time a [GoogleMap] is long pressed. final ArgumentCallback? onLongPress; + /// Called when a [PointOfInterest] is tapped. + final ArgumentCallback? onPoiTap; + /// True if a "My Location" layer should be shown on the map. /// /// This layer includes a location indicator at the current device location, @@ -617,9 +617,7 @@ class _GoogleMapState extends State { } void onPoiTap(PointOfInterest poi) { - if (widget.onPoiTap != null) { - widget.onPoiTap!(poi); - } + widget.onPoiTap?.call(poi); } void onPolygonTap(PolygonId polygonId) { diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index 6611d559a096..40538d798cea 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -41,6 +41,7 @@ topics: # The example deliberately includes limited-use secrets. false_secrets: - /example/web/index.html + dependency_overrides: google_maps_flutter_android: path: ../google_maps_flutter_android diff --git a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart index e7ddf1b73f36..4dec896132ca 100644 --- a/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter/test/google_map_test.dart @@ -681,7 +681,6 @@ void main() { // Use the top-level 'platform' variable instead of redeclaring it. const poi = PointOfInterest( position: LatLng(10.0, 10.0), - name: 'Test POI', placeId: 'test_id_123', ); @@ -693,7 +692,6 @@ void main() { await tester.pump(); expect(tappedPoi, poi); - expect(tappedPoi!.name, 'Test POI'); expect(tappedPoi!.placeId, 'test_id_123'); }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java index 30f0bd240cc9..d52546981c3c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java @@ -371,7 +371,6 @@ public void onPoiClick(PointOfInterest poi) { Messages.PlatformPointOfInterest platformPoi = new Messages.PlatformPointOfInterest.Builder() .setPosition(Convert.latLngToPigeon(poi.latLng)) - .setName(poi.name) .setPlaceId(poi.placeId) .build(); 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 dd44bc42a157..77282fd0e0cb 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 @@ -2529,16 +2529,6 @@ public void setPosition(@NonNull PlatformLatLng setterArg) { this.position = setterArg; } - private @Nullable String name; - - public @Nullable String getName() { - return name; - } - - public void setName(@Nullable String setterArg) { - this.name = setterArg; - } - private @NonNull String placeId; public @NonNull String getPlaceId() { @@ -2564,14 +2554,12 @@ public boolean equals(Object o) { return false; } PlatformPointOfInterest that = (PlatformPointOfInterest) o; - return position.equals(that.position) - && Objects.equals(name, that.name) - && placeId.equals(that.placeId); + return position.equals(that.position) && placeId.equals(that.placeId); } @Override public int hashCode() { - return Objects.hash(position, name, placeId); + return Objects.hash(position, placeId); } public static final class Builder { @@ -2584,14 +2572,6 @@ public static final class Builder { return this; } - private @Nullable String name; - - @CanIgnoreReturnValue - public @NonNull Builder setName(@Nullable String setterArg) { - this.name = setterArg; - return this; - } - private @Nullable String placeId; @CanIgnoreReturnValue @@ -2603,7 +2583,6 @@ public static final class Builder { public @NonNull PlatformPointOfInterest build() { PlatformPointOfInterest pigeonReturn = new PlatformPointOfInterest(); pigeonReturn.setPosition(position); - pigeonReturn.setName(name); pigeonReturn.setPlaceId(placeId); return pigeonReturn; } @@ -2611,9 +2590,8 @@ public static final class Builder { @NonNull ArrayList toList() { - ArrayList toListResult = new ArrayList<>(3); + ArrayList toListResult = new ArrayList<>(2); toListResult.add(position); - toListResult.add(name); toListResult.add(placeId); return toListResult; } @@ -2622,9 +2600,7 @@ ArrayList toList() { PlatformPointOfInterest pigeonResult = new PlatformPointOfInterest(); Object position = pigeonVar_list.get(0); pigeonResult.setPosition((PlatformLatLng) position); - Object name = pigeonVar_list.get(1); - pigeonResult.setName((String) name); - Object placeId = pigeonVar_list.get(2); + Object placeId = pigeonVar_list.get(1); pigeonResult.setPlaceId((String) placeId); return pigeonResult; } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart index 4d1f8cf553cf..9d289f6aeae4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/lib/place_poi.dart @@ -80,7 +80,6 @@ class PlacePoiBodyState extends State { ), const SizedBox(height: 8), if (_lastPoi != null) ...[ - Text('Name: ${_lastPoi!.name ?? "Unknown"}'), Text('Place ID: ${_lastPoi!.placeId}'), Text( 'Lat/Lng: ${_lastPoi!.position.latitude.toStringAsFixed(5)}, ${_lastPoi!.position.longitude.toStringAsFixed(5)}', diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml index ba52ecaa2f46..e88bfe93c836 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml @@ -33,6 +33,7 @@ flutter: uses-material-design: true assets: - assets/ + dependency_overrides: google_maps_flutter_platform_interface: path: ../../google_maps_flutter_platform_interface 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 35b3440fbde1..be95a9e318e9 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 @@ -1269,7 +1269,6 @@ class HostMapMessageHandler implements MapsCallbackApi { mapId, PointOfInterest( position: LatLng(poi.position.latitude, poi.position.longitude), - name: poi.name, placeId: poi.placeId, ), ), 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 62c8297478fb..a522f290ca35 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 @@ -979,20 +979,14 @@ class PlatformMarker { /// Pigeon equivalent of the Point of Interest class. class PlatformPointOfInterest { - PlatformPointOfInterest({ - required this.position, - this.name, - required this.placeId, - }); + PlatformPointOfInterest({required this.position, required this.placeId}); PlatformLatLng position; - String? name; - String placeId; List _toList() { - return [position, name, placeId]; + return [position, placeId]; } Object encode() { @@ -1003,8 +997,7 @@ class PlatformPointOfInterest { result as List; return PlatformPointOfInterest( position: result[0]! as PlatformLatLng, - name: result[1] as String?, - placeId: result[2]! as String, + placeId: result[1]! as String, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.orig b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.orig deleted file mode 100644 index cf8c6a809a0c..000000000000 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.orig +++ /dev/null @@ -1,4548 +0,0 @@ -// Copyright 2013 The Flutter Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.7), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; - -import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; -import 'package:flutter/services.dart'; - -PlatformException _createConnectionError(String channelName) { - return PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); -} - -List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { - if (empty) { - return []; - } - if (error == null) { - return [result]; - } - return [error.code, error.message, error.details]; -} -bool _deepEquals(Object? a, Object? b) { - if (a is List && b is List) { - return a.length == b.length && - a.indexed - .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); - } - if (a is Map && b is Map) { - return a.length == b.length && a.entries.every((MapEntry entry) => - (b as Map).containsKey(entry.key) && - _deepEquals(entry.value, b[entry.key])); - } - return a == b; -} - - -/// Pigeon equivalent of MapType -enum PlatformMapType { - none, - normal, - satellite, - terrain, - hybrid, -} - -enum PlatformRendererType { - legacy, - latest, -} - -/// Join types for polyline joints. -enum PlatformJointType { - mitered, - bevel, - round, -} - -/// Enumeration of possible types of PlatformCap, corresponding to the -/// subclasses of Cap in the Google Maps Android SDK. -/// See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. -enum PlatformCapType { - buttCap, - roundCap, - squareCap, - customCap, -} - -/// Enumeration of possible types for PatternItem. -enum PlatformPatternItemType { - dot, - dash, - gap, -} - -/// Pigeon equivalent of [MapBitmapScaling]. -enum PlatformMapBitmapScaling { - auto, - none, -} - -/// Pigeon representatation of a CameraPosition. -class PlatformCameraPosition { - PlatformCameraPosition({ - required this.bearing, - required this.target, - required this.tilt, - required this.zoom, - }); - - double bearing; - - PlatformLatLng target; - - double tilt; - - double zoom; - - List _toList() { - return [ - bearing, - target, - tilt, - zoom, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraPosition decode(Object result) { - result as List; - return PlatformCameraPosition( - bearing: result[0]! as double, - target: result[1]! as PlatformLatLng, - tilt: result[2]! as double, - zoom: result[3]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraPosition || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon representation of a CameraUpdate. -class PlatformCameraUpdate { - PlatformCameraUpdate({ - required this.cameraUpdate, - }); - - /// This Object shall be any of the below classes prefixed with - /// PlatformCameraUpdate. Each such class represents a different type of - /// camera update, and each holds a different set of data, preventing the - /// use of a single unified class. Pigeon does not support inheritance, which - /// prevents a more strict type bound. - /// See https://github.com/flutter/flutter/issues/117819. - Object cameraUpdate; - - List _toList() { - return [ - cameraUpdate, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdate decode(Object result) { - result as List; - return PlatformCameraUpdate( - cameraUpdate: result[0]!, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdate || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of NewCameraPosition -class PlatformCameraUpdateNewCameraPosition { - PlatformCameraUpdateNewCameraPosition({ - required this.cameraPosition, - }); - - PlatformCameraPosition cameraPosition; - - List _toList() { - return [ - cameraPosition, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateNewCameraPosition decode(Object result) { - result as List; - return PlatformCameraUpdateNewCameraPosition( - cameraPosition: result[0]! as PlatformCameraPosition, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewCameraPosition || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of NewLatLng -class PlatformCameraUpdateNewLatLng { - PlatformCameraUpdateNewLatLng({ - required this.latLng, - }); - - PlatformLatLng latLng; - - List _toList() { - return [ - latLng, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateNewLatLng decode(Object result) { - result as List; - return PlatformCameraUpdateNewLatLng( - latLng: result[0]! as PlatformLatLng, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLng || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of NewLatLngBounds -class PlatformCameraUpdateNewLatLngBounds { - PlatformCameraUpdateNewLatLngBounds({ - required this.bounds, - required this.padding, - }); - - PlatformLatLngBounds bounds; - - double padding; - - List _toList() { - return [ - bounds, - padding, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateNewLatLngBounds decode(Object result) { - result as List; - return PlatformCameraUpdateNewLatLngBounds( - bounds: result[0]! as PlatformLatLngBounds, - padding: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLngBounds || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of NewLatLngZoom -class PlatformCameraUpdateNewLatLngZoom { - PlatformCameraUpdateNewLatLngZoom({ - required this.latLng, - required this.zoom, - }); - - PlatformLatLng latLng; - - double zoom; - - List _toList() { - return [ - latLng, - zoom, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateNewLatLngZoom decode(Object result) { - result as List; - return PlatformCameraUpdateNewLatLngZoom( - latLng: result[0]! as PlatformLatLng, - zoom: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLngZoom || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of ScrollBy -class PlatformCameraUpdateScrollBy { - PlatformCameraUpdateScrollBy({ - required this.dx, - required this.dy, - }); - - double dx; - - double dy; - - List _toList() { - return [ - dx, - dy, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateScrollBy decode(Object result) { - result as List; - return PlatformCameraUpdateScrollBy( - dx: result[0]! as double, - dy: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateScrollBy || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of ZoomBy -class PlatformCameraUpdateZoomBy { - PlatformCameraUpdateZoomBy({ - required this.amount, - this.focus, - }); - - double amount; - - PlatformDoublePair? focus; - - List _toList() { - return [ - amount, - focus, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateZoomBy decode(Object result) { - result as List; - return PlatformCameraUpdateZoomBy( - amount: result[0]! as double, - focus: result[1] as PlatformDoublePair?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoomBy || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of ZoomIn/ZoomOut -class PlatformCameraUpdateZoom { - PlatformCameraUpdateZoom({ - required this.out, - }); - - bool out; - - List _toList() { - return [ - out, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateZoom decode(Object result) { - result as List; - return PlatformCameraUpdateZoom( - out: result[0]! as bool, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoom || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of ZoomTo -class PlatformCameraUpdateZoomTo { - PlatformCameraUpdateZoomTo({ - required this.zoom, - }); - - double zoom; - - List _toList() { - return [ - zoom, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateZoomTo decode(Object result) { - result as List; - return PlatformCameraUpdateZoomTo( - zoom: result[0]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoomTo || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Circle class. -class PlatformCircle { - PlatformCircle({ - this.consumeTapEvents = false, - required this.fillColor, - required this.strokeColor, - this.visible = true, - this.strokeWidth = 10, - this.zIndex = 0.0, - required this.center, - this.radius = 0, - required this.circleId, - }); - - bool consumeTapEvents; - - PlatformColor fillColor; - - PlatformColor strokeColor; - - bool visible; - - int strokeWidth; - - double zIndex; - - PlatformLatLng center; - - double radius; - - String circleId; - - List _toList() { - return [ - consumeTapEvents, - fillColor, - strokeColor, - visible, - strokeWidth, - zIndex, - center, - radius, - circleId, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCircle decode(Object result) { - result as List; - return PlatformCircle( - consumeTapEvents: result[0]! as bool, - fillColor: result[1]! as PlatformColor, - strokeColor: result[2]! as PlatformColor, - visible: result[3]! as bool, - strokeWidth: result[4]! as int, - zIndex: result[5]! as double, - center: result[6]! as PlatformLatLng, - radius: result[7]! as double, - circleId: result[8]! as String, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCircle || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Heatmap class. -class PlatformHeatmap { - PlatformHeatmap({ - required this.heatmapId, - required this.data, - this.gradient, - required this.opacity, - required this.radius, - this.maxIntensity, - }); - - String heatmapId; - - List data; - - PlatformHeatmapGradient? gradient; - - double opacity; - - int radius; - - double? maxIntensity; - - List _toList() { - return [ - heatmapId, - data, - gradient, - opacity, - radius, - maxIntensity, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformHeatmap decode(Object result) { - result as List; - return PlatformHeatmap( - heatmapId: result[0]! as String, - data: (result[1] as List?)!.cast(), - gradient: result[2] as PlatformHeatmapGradient?, - opacity: result[3]! as double, - radius: result[4]! as int, - maxIntensity: result[5] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformHeatmap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the HeatmapGradient class. -/// -/// The Java Gradient structure is slightly different from HeatmapGradient, so -/// this matches the Android API so that conversion can be done on the Dart side -/// where the structures are easier to work with. -class PlatformHeatmapGradient { - PlatformHeatmapGradient({ - required this.colors, - required this.startPoints, - required this.colorMapSize, - }); - - List colors; - - List startPoints; - - int colorMapSize; - - List _toList() { - return [ - colors, - startPoints, - colorMapSize, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformHeatmapGradient decode(Object result) { - result as List; - return PlatformHeatmapGradient( - colors: (result[0] as List?)!.cast(), - startPoints: (result[1] as List?)!.cast(), - colorMapSize: result[2]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformHeatmapGradient || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the WeightedLatLng class. -class PlatformWeightedLatLng { - PlatformWeightedLatLng({ - required this.point, - required this.weight, - }); - - PlatformLatLng point; - - double weight; - - List _toList() { - return [ - point, - weight, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformWeightedLatLng decode(Object result) { - result as List; - return PlatformWeightedLatLng( - point: result[0]! as PlatformLatLng, - weight: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformWeightedLatLng || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the ClusterManager class. -class PlatformClusterManager { - PlatformClusterManager({ - required this.identifier, - }); - - String identifier; - - List _toList() { - return [ - identifier, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformClusterManager decode(Object result) { - result as List; - return PlatformClusterManager( - identifier: result[0]! as String, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformClusterManager || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pair of double values, such as for an offset or size. -class PlatformDoublePair { - PlatformDoublePair({ - required this.x, - required this.y, - }); - - double x; - - double y; - - List _toList() { - return [ - x, - y, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformDoublePair decode(Object result) { - result as List; - return PlatformDoublePair( - x: result[0]! as double, - y: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformDoublePair || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Color class. -/// -/// See https://developer.android.com/reference/android/graphics/Color.html. -class PlatformColor { - PlatformColor({ - required this.argbValue, - }); - - int argbValue; - - List _toList() { - return [ - argbValue, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformColor decode(Object result) { - result as List; - return PlatformColor( - argbValue: result[0]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformColor || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the InfoWindow class. -class PlatformInfoWindow { - PlatformInfoWindow({ - this.title, - this.snippet, - required this.anchor, - }); - - String? title; - - String? snippet; - - PlatformDoublePair anchor; - - List _toList() { - return [ - title, - snippet, - anchor, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformInfoWindow decode(Object result) { - result as List; - return PlatformInfoWindow( - title: result[0] as String?, - snippet: result[1] as String?, - anchor: result[2]! as PlatformDoublePair, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformInfoWindow || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Marker class. -class PlatformMarker { - PlatformMarker({ - this.alpha = 1.0, - required this.anchor, - this.consumeTapEvents = false, - this.draggable = false, - this.flat = false, - required this.icon, - required this.infoWindow, - required this.position, - this.rotation = 0.0, - this.visible = true, - this.zIndex = 0.0, - required this.markerId, - this.clusterManagerId, - }); - - double alpha; - - PlatformDoublePair anchor; - - bool consumeTapEvents; - - bool draggable; - - bool flat; - - PlatformBitmap icon; - - PlatformInfoWindow infoWindow; - - PlatformLatLng position; - - double rotation; - - bool visible; - - double zIndex; - - String markerId; - - String? clusterManagerId; - - List _toList() { - return [ - alpha, - anchor, - consumeTapEvents, - draggable, - flat, - icon, - infoWindow, - position, - rotation, - visible, - zIndex, - markerId, - clusterManagerId, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformMarker decode(Object result) { - result as List; - return PlatformMarker( - alpha: result[0]! as double, - anchor: result[1]! as PlatformDoublePair, - consumeTapEvents: result[2]! as bool, - draggable: result[3]! as bool, - flat: result[4]! as bool, - icon: result[5]! as PlatformBitmap, - infoWindow: result[6]! as PlatformInfoWindow, - position: result[7]! as PlatformLatLng, - rotation: result[8]! as double, - visible: result[9]! as bool, - zIndex: result[10]! as double, - markerId: result[11]! as String, - clusterManagerId: result[12] as String?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformMarker || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Point of Interest class. -class PlatformPointOfInterest { - PlatformPointOfInterest({ - required this.position, - this.name, - required this.placeId, - }); - - PlatformLatLng position; - - String? name; - - String placeId; - - List _toList() { - return [ - position, - name, - placeId, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPointOfInterest decode(Object result) { - result as List; - return PlatformPointOfInterest( - position: result[0]! as PlatformLatLng, - name: result[1] as String?, - placeId: result[2]! as String, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPointOfInterest || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Polygon class. -class PlatformPolygon { - PlatformPolygon({ - required this.polygonId, - required this.consumesTapEvents, - required this.fillColor, - required this.geodesic, - required this.points, - required this.holes, - required this.visible, - required this.strokeColor, - required this.strokeWidth, - required this.zIndex, - }); - - String polygonId; - - bool consumesTapEvents; - - PlatformColor fillColor; - - bool geodesic; - - List points; - - List> holes; - - bool visible; - - PlatformColor strokeColor; - - int strokeWidth; - - int zIndex; - - List _toList() { - return [ - polygonId, - consumesTapEvents, - fillColor, - geodesic, - points, - holes, - visible, - strokeColor, - strokeWidth, - zIndex, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPolygon decode(Object result) { - result as List; - return PlatformPolygon( - polygonId: result[0]! as String, - consumesTapEvents: result[1]! as bool, - fillColor: result[2]! as PlatformColor, - geodesic: result[3]! as bool, - points: (result[4] as List?)!.cast(), - holes: (result[5] as List?)!.cast>(), - visible: result[6]! as bool, - strokeColor: result[7]! as PlatformColor, - strokeWidth: result[8]! as int, - zIndex: result[9]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPolygon || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Polyline class. -class PlatformPolyline { - PlatformPolyline({ - required this.polylineId, - required this.consumesTapEvents, - required this.color, - required this.geodesic, - required this.jointType, - required this.patterns, - required this.points, - required this.startCap, - required this.endCap, - required this.visible, - required this.width, - required this.zIndex, - }); - - String polylineId; - - bool consumesTapEvents; - - PlatformColor color; - - bool geodesic; - - /// The joint type. - PlatformJointType jointType; - - /// The pattern data, as a list of pattern items. - List patterns; - - List points; - - /// The cap at the start and end vertex of a polyline. - /// See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. - PlatformCap startCap; - - PlatformCap endCap; - - bool visible; - - int width; - - int zIndex; - - List _toList() { - return [ - polylineId, - consumesTapEvents, - color, - geodesic, - jointType, - patterns, - points, - startCap, - endCap, - visible, - width, - zIndex, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPolyline decode(Object result) { - result as List; - return PlatformPolyline( - polylineId: result[0]! as String, - consumesTapEvents: result[1]! as bool, - color: result[2]! as PlatformColor, - geodesic: result[3]! as bool, - jointType: result[4]! as PlatformJointType, - patterns: (result[5] as List?)!.cast(), - points: (result[6] as List?)!.cast(), - startCap: result[7]! as PlatformCap, - endCap: result[8]! as PlatformCap, - visible: result[9]! as bool, - width: result[10]! as int, - zIndex: result[11]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPolyline || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of Cap from the platform interface. -/// https://github.com/flutter/packages/blob/main/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/cap.dart -class PlatformCap { - PlatformCap({ - required this.type, - this.bitmapDescriptor, - this.refWidth, - }); - - PlatformCapType type; - - PlatformBitmap? bitmapDescriptor; - - double? refWidth; - - List _toList() { - return [ - type, - bitmapDescriptor, - refWidth, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCap decode(Object result) { - result as List; - return PlatformCap( - type: result[0]! as PlatformCapType, - bitmapDescriptor: result[1] as PlatformBitmap?, - refWidth: result[2] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the PatternItem class. -class PlatformPatternItem { - PlatformPatternItem({ - required this.type, - this.length, - }); - - PlatformPatternItemType type; - - double? length; - - List _toList() { - return [ - type, - length, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPatternItem decode(Object result) { - result as List; - return PlatformPatternItem( - type: result[0]! as PlatformPatternItemType, - length: result[1] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPatternItem || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Tile class. -class PlatformTile { - PlatformTile({ - required this.width, - required this.height, - this.data, - }); - - int width; - - int height; - - Uint8List? data; - - List _toList() { - return [ - width, - height, - data, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformTile decode(Object result) { - result as List; - return PlatformTile( - width: result[0]! as int, - height: result[1]! as int, - data: result[2] as Uint8List?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformTile || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the TileOverlay class. -class PlatformTileOverlay { - PlatformTileOverlay({ - required this.tileOverlayId, - required this.fadeIn, - required this.transparency, - required this.zIndex, - required this.visible, - required this.tileSize, - }); - - String tileOverlayId; - - bool fadeIn; - - double transparency; - - int zIndex; - - bool visible; - - int tileSize; - - List _toList() { - return [ - tileOverlayId, - fadeIn, - transparency, - zIndex, - visible, - tileSize, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformTileOverlay decode(Object result) { - result as List; - return PlatformTileOverlay( - 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, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformTileOverlay || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of Flutter's EdgeInsets. -class PlatformEdgeInsets { - PlatformEdgeInsets({ - required this.top, - required this.bottom, - required this.left, - required this.right, - }); - - double top; - - double bottom; - - double left; - - double right; - - List _toList() { - return [ - top, - bottom, - left, - right, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformEdgeInsets decode(Object result) { - result as List; - return PlatformEdgeInsets( - top: result[0]! as double, - bottom: result[1]! as double, - left: result[2]! as double, - right: result[3]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformEdgeInsets || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of LatLng. -class PlatformLatLng { - PlatformLatLng({ - required this.latitude, - required this.longitude, - }); - - double latitude; - - double longitude; - - List _toList() { - return [ - latitude, - longitude, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformLatLng decode(Object result) { - result as List; - return PlatformLatLng( - latitude: result[0]! as double, - longitude: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformLatLng || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of LatLngBounds. -class PlatformLatLngBounds { - PlatformLatLngBounds({ - required this.northeast, - required this.southwest, - }); - - PlatformLatLng northeast; - - PlatformLatLng southwest; - - List _toList() { - return [ - northeast, - southwest, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformLatLngBounds decode(Object result) { - result as List; - return PlatformLatLngBounds( - northeast: result[0]! as PlatformLatLng, - southwest: result[1]! as PlatformLatLng, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformLatLngBounds || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of Cluster. -class PlatformCluster { - PlatformCluster({ - required this.clusterManagerId, - required this.position, - required this.bounds, - required this.markerIds, - }); - - String clusterManagerId; - - PlatformLatLng position; - - PlatformLatLngBounds bounds; - - List markerIds; - - List _toList() { - return [ - clusterManagerId, - position, - bounds, - markerIds, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCluster decode(Object result) { - result as List; - return PlatformCluster( - clusterManagerId: result[0]! as String, - position: result[1]! as PlatformLatLng, - bounds: result[2]! as PlatformLatLngBounds, - markerIds: (result[3] as List?)!.cast(), - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCluster || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the GroundOverlay class. -class PlatformGroundOverlay { - PlatformGroundOverlay({ - required this.groundOverlayId, - required this.image, - this.position, - this.bounds, - this.width, - this.height, - this.anchor, - required this.transparency, - required this.bearing, - required this.zIndex, - required this.visible, - required this.clickable, - }); - - String groundOverlayId; - - PlatformBitmap image; - - PlatformLatLng? position; - - PlatformLatLngBounds? bounds; - - double? width; - - double? height; - - PlatformDoublePair? anchor; - - double transparency; - - double bearing; - - int zIndex; - - bool visible; - - bool clickable; - - List _toList() { - return [ - groundOverlayId, - image, - position, - bounds, - width, - height, - anchor, - transparency, - bearing, - zIndex, - visible, - clickable, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformGroundOverlay decode(Object result) { - result as List; - return PlatformGroundOverlay( - groundOverlayId: result[0]! as String, - image: result[1]! as PlatformBitmap, - position: result[2] as PlatformLatLng?, - bounds: result[3] as PlatformLatLngBounds?, - width: result[4] as double?, - height: result[5] as double?, - anchor: result[6] as PlatformDoublePair?, - transparency: result[7]! as double, - bearing: result[8]! as double, - zIndex: result[9]! as int, - visible: result[10]! as bool, - clickable: result[11]! as bool, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformGroundOverlay || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_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]). -class PlatformCameraTargetBounds { - PlatformCameraTargetBounds({ - this.bounds, - }); - - PlatformLatLngBounds? bounds; - - List _toList() { - return [ - bounds, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraTargetBounds decode(Object result) { - result as List; - return PlatformCameraTargetBounds( - bounds: result[0] as PlatformLatLngBounds?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraTargetBounds || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Information passed to the platform view creation. -class PlatformMapViewCreationParams { - PlatformMapViewCreationParams({ - required this.initialCameraPosition, - required this.mapConfiguration, - required this.initialCircles, - required this.initialMarkers, - required this.initialPolygons, - required this.initialPolylines, - required this.initialHeatmaps, - required this.initialTileOverlays, - required this.initialClusterManagers, - required this.initialGroundOverlays, - }); - - PlatformCameraPosition initialCameraPosition; - - PlatformMapConfiguration mapConfiguration; - - List initialCircles; - - List initialMarkers; - - List initialPolygons; - - List initialPolylines; - - List initialHeatmaps; - - List initialTileOverlays; - - List initialClusterManagers; - - List initialGroundOverlays; - - List _toList() { - return [ - initialCameraPosition, - mapConfiguration, - initialCircles, - initialMarkers, - initialPolygons, - initialPolylines, - initialHeatmaps, - initialTileOverlays, - initialClusterManagers, - initialGroundOverlays, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformMapViewCreationParams decode(Object result) { - result as List; - return PlatformMapViewCreationParams( - initialCameraPosition: result[0]! as PlatformCameraPosition, - mapConfiguration: result[1]! as PlatformMapConfiguration, - initialCircles: (result[2] as List?)!.cast(), - initialMarkers: (result[3] as List?)!.cast(), - initialPolygons: (result[4] as List?)!.cast(), - initialPolylines: (result[5] as List?)!.cast(), - initialHeatmaps: (result[6] as List?)!.cast(), - initialTileOverlays: (result[7] as List?)!.cast(), - initialClusterManagers: (result[8] as List?)!.cast(), - initialGroundOverlays: (result[9] as List?)!.cast(), - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformMapViewCreationParams || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of MapConfiguration. -class PlatformMapConfiguration { - PlatformMapConfiguration({ - this.compassEnabled, - this.cameraTargetBounds, - this.mapType, - this.minMaxZoomPreference, - this.mapToolbarEnabled, - this.rotateGesturesEnabled, - this.scrollGesturesEnabled, - this.tiltGesturesEnabled, - this.trackCameraPosition, - this.zoomControlsEnabled, - this.zoomGesturesEnabled, - this.myLocationEnabled, - this.myLocationButtonEnabled, - this.padding, - this.indoorViewEnabled, - this.trafficEnabled, - this.buildingsEnabled, - this.liteModeEnabled, - this.mapId, - this.style, - }); - - bool? compassEnabled; - - PlatformCameraTargetBounds? cameraTargetBounds; - - PlatformMapType? mapType; - - PlatformZoomRange? minMaxZoomPreference; - - bool? mapToolbarEnabled; - - bool? rotateGesturesEnabled; - - bool? scrollGesturesEnabled; - - bool? tiltGesturesEnabled; - - bool? trackCameraPosition; - - bool? zoomControlsEnabled; - - bool? zoomGesturesEnabled; - - bool? myLocationEnabled; - - bool? myLocationButtonEnabled; - - PlatformEdgeInsets? padding; - - bool? indoorViewEnabled; - - bool? trafficEnabled; - - bool? buildingsEnabled; - - bool? liteModeEnabled; - - String? mapId; - - String? style; - - List _toList() { - return [ - compassEnabled, - cameraTargetBounds, - mapType, - minMaxZoomPreference, - mapToolbarEnabled, - rotateGesturesEnabled, - scrollGesturesEnabled, - tiltGesturesEnabled, - trackCameraPosition, - zoomControlsEnabled, - zoomGesturesEnabled, - myLocationEnabled, - myLocationButtonEnabled, - padding, - indoorViewEnabled, - trafficEnabled, - buildingsEnabled, - liteModeEnabled, - mapId, - style, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformMapConfiguration decode(Object result) { - result as List; - return PlatformMapConfiguration( - compassEnabled: result[0] as bool?, - cameraTargetBounds: result[1] as PlatformCameraTargetBounds?, - mapType: result[2] as PlatformMapType?, - minMaxZoomPreference: result[3] as PlatformZoomRange?, - mapToolbarEnabled: result[4] as bool?, - rotateGesturesEnabled: result[5] as bool?, - scrollGesturesEnabled: result[6] as bool?, - tiltGesturesEnabled: result[7] as bool?, - trackCameraPosition: result[8] as bool?, - zoomControlsEnabled: result[9] as bool?, - zoomGesturesEnabled: result[10] as bool?, - myLocationEnabled: result[11] as bool?, - myLocationButtonEnabled: result[12] as bool?, - padding: result[13] as PlatformEdgeInsets?, - indoorViewEnabled: result[14] as bool?, - trafficEnabled: result[15] as bool?, - buildingsEnabled: result[16] as bool?, - liteModeEnabled: result[17] as bool?, - mapId: result[18] as String?, - style: result[19] as String?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformMapConfiguration || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon representation of an x,y coordinate. -class PlatformPoint { - PlatformPoint({ - required this.x, - required this.y, - }); - - int x; - - int y; - - List _toList() { - return [ - x, - y, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPoint decode(Object result) { - result as List; - return PlatformPoint( - x: result[0]! as int, - y: result[1]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPoint || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of native TileOverlay properties. -class PlatformTileLayer { - PlatformTileLayer({ - required this.visible, - required this.fadeIn, - required this.transparency, - required this.zIndex, - }); - - bool visible; - - bool fadeIn; - - double transparency; - - double zIndex; - - List _toList() { - return [ - visible, - fadeIn, - transparency, - zIndex, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformTileLayer decode(Object result) { - result as List; - return PlatformTileLayer( - visible: result[0]! as bool, - fadeIn: result[1]! as bool, - transparency: result[2]! as double, - zIndex: result[3]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformTileLayer || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Possible outcomes of launching a URL. -class PlatformZoomRange { - PlatformZoomRange({ - this.min, - this.max, - }); - - double? min; - - double? max; - - List _toList() { - return [ - min, - max, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformZoomRange decode(Object result) { - result as List; - return PlatformZoomRange( - min: result[0] as double?, - max: result[1] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformZoomRange || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint -/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which -/// may hold the pigeon equivalent type of any of them. -class PlatformBitmap { - PlatformBitmap({ - required this.bitmap, - }); - - /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], - /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], - /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. - /// As Pigeon does not currently support data class inheritance, this - /// approach allows for the different bitmap implementations to be valid - /// argument and return types of the API methods. See - /// https://github.com/flutter/flutter/issues/117819. - Object bitmap; - - List _toList() { - return [ - bitmap, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmap decode(Object result) { - result as List; - return PlatformBitmap( - bitmap: result[0]!, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [DefaultMarker]. See -/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#defaultMarker(float) -class PlatformBitmapDefaultMarker { - PlatformBitmapDefaultMarker({ - this.hue, - }); - - double? hue; - - List _toList() { - return [ - hue, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapDefaultMarker decode(Object result) { - result as List; - return PlatformBitmapDefaultMarker( - hue: result[0] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapDefaultMarker || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [BytesBitmap]. See -/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#fromBitmap(android.graphics.Bitmap) -class PlatformBitmapBytes { - PlatformBitmapBytes({ - required this.byteData, - this.size, - }); - - Uint8List byteData; - - PlatformDoublePair? size; - - List _toList() { - return [ - byteData, - size, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapBytes decode(Object result) { - result as List; - return PlatformBitmapBytes( - byteData: result[0]! as Uint8List, - size: result[1] as PlatformDoublePair?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapBytes || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [AssetBitmap]. See -/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname -class PlatformBitmapAsset { - PlatformBitmapAsset({ - required this.name, - this.pkg, - }); - - String name; - - String? pkg; - - List _toList() { - return [ - name, - pkg, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapAsset decode(Object result) { - result as List; - return PlatformBitmapAsset( - name: result[0]! as String, - pkg: result[1] as String?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapAsset || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [AssetImageBitmap]. See -/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname -class PlatformBitmapAssetImage { - PlatformBitmapAssetImage({ - required this.name, - required this.scale, - this.size, - }); - - String name; - - double scale; - - PlatformDoublePair? size; - - List _toList() { - return [ - name, - scale, - size, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapAssetImage decode(Object result) { - result as List; - return PlatformBitmapAssetImage( - name: result[0]! as String, - scale: result[1]! as double, - size: result[2] as PlatformDoublePair?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapAssetImage || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [AssetMapBitmap]. See -/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-fromasset-string-assetname -class PlatformBitmapAssetMap { - PlatformBitmapAssetMap({ - required this.assetName, - required this.bitmapScaling, - required this.imagePixelRatio, - this.width, - this.height, - }); - - String assetName; - - PlatformMapBitmapScaling bitmapScaling; - - double imagePixelRatio; - - double? width; - - double? height; - - List _toList() { - return [ - assetName, - bitmapScaling, - imagePixelRatio, - width, - height, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapAssetMap decode(Object result) { - result as List; - return PlatformBitmapAssetMap( - assetName: result[0]! as String, - bitmapScaling: result[1]! as PlatformMapBitmapScaling, - imagePixelRatio: result[2]! as double, - width: result[3] as double?, - height: result[4] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapAssetMap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [BytesMapBitmap]. See -/// https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/BitmapDescriptorFactory#public-static-bitmapdescriptor-frombitmap-bitmap-image -class PlatformBitmapBytesMap { - PlatformBitmapBytesMap({ - required this.byteData, - required this.bitmapScaling, - required this.imagePixelRatio, - this.width, - this.height, - }); - - Uint8List byteData; - - PlatformMapBitmapScaling bitmapScaling; - - double imagePixelRatio; - - double? width; - - double? height; - - List _toList() { - return [ - byteData, - bitmapScaling, - imagePixelRatio, - width, - height, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapBytesMap decode(Object result) { - result as List; - return PlatformBitmapBytesMap( - byteData: result[0]! as Uint8List, - bitmapScaling: result[1]! as PlatformMapBitmapScaling, - imagePixelRatio: result[2]! as double, - width: result[3] as double?, - height: result[4] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapBytesMap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else if (value is PlatformMapType) { - buffer.putUint8(129); - writeValue(buffer, value.index); - } else if (value is PlatformRendererType) { - buffer.putUint8(130); - writeValue(buffer, value.index); - } else if (value is PlatformJointType) { - buffer.putUint8(131); - writeValue(buffer, value.index); - } else if (value is PlatformCapType) { - buffer.putUint8(132); - writeValue(buffer, value.index); - } else if (value is PlatformPatternItemType) { - buffer.putUint8(133); - writeValue(buffer, value.index); - } else if (value is PlatformMapBitmapScaling) { - buffer.putUint8(134); - writeValue(buffer, value.index); - } else if (value is PlatformCameraPosition) { - buffer.putUint8(135); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { - buffer.putUint8(136); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewCameraPosition) { - buffer.putUint8(137); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLng) { - buffer.putUint8(138); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngBounds) { - buffer.putUint8(139); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngZoom) { - buffer.putUint8(140); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateScrollBy) { - buffer.putUint8(141); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomBy) { - buffer.putUint8(142); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoom) { - buffer.putUint8(143); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomTo) { - buffer.putUint8(144); - writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { - buffer.putUint8(145); - writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { - buffer.putUint8(146); - writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmapGradient) { - buffer.putUint8(147); - writeValue(buffer, value.encode()); - } else if (value is PlatformWeightedLatLng) { - buffer.putUint8(148); - writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { - buffer.putUint8(149); - writeValue(buffer, value.encode()); - } else if (value is PlatformDoublePair) { - buffer.putUint8(150); - writeValue(buffer, value.encode()); - } else if (value is PlatformColor) { - buffer.putUint8(151); - writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { - buffer.putUint8(152); - writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { - buffer.putUint8(153); - writeValue(buffer, value.encode()); - } else if (value is PlatformPointOfInterest) { - buffer.putUint8(154); - writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { - buffer.putUint8(155); - writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { - buffer.putUint8(156); - writeValue(buffer, value.encode()); - } else if (value is PlatformCap) { - buffer.putUint8(157); - writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { - buffer.putUint8(158); - writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { - buffer.putUint8(159); - writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { - buffer.putUint8(160); - writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { - buffer.putUint8(161); - writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { - buffer.putUint8(162); - writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { - buffer.putUint8(163); - writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { - buffer.putUint8(164); - writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { - buffer.putUint8(165); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { - buffer.putUint8(166); - writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { - buffer.putUint8(167); - writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { - buffer.putUint8(168); - writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { - buffer.putUint8(169); - writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { - buffer.putUint8(170); - writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { - buffer.putUint8(171); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { - buffer.putUint8(172); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { - buffer.putUint8(173); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { - buffer.putUint8(174); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { - buffer.putUint8(175); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { - buffer.putUint8(176); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { - buffer.putUint8(177); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { - buffer.putUint8(178); - writeValue(buffer, value.encode()); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 129: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformMapType.values[value]; - case 130: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformRendererType.values[value]; - case 131: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformJointType.values[value]; - case 132: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformCapType.values[value]; - case 133: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformPatternItemType.values[value]; - case 134: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformMapBitmapScaling.values[value]; - case 135: - return PlatformCameraPosition.decode(readValue(buffer)!); - case 136: - return PlatformCameraUpdate.decode(readValue(buffer)!); - case 137: - return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!); - case 138: - return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!); - case 139: - return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); - case 140: - return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); - case 141: - return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); - case 142: - return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); - case 143: - return PlatformCameraUpdateZoom.decode(readValue(buffer)!); - case 144: - return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); - case 145: - return PlatformCircle.decode(readValue(buffer)!); - case 146: - return PlatformHeatmap.decode(readValue(buffer)!); - case 147: - return PlatformHeatmapGradient.decode(readValue(buffer)!); - case 148: - return PlatformWeightedLatLng.decode(readValue(buffer)!); - case 149: - return PlatformClusterManager.decode(readValue(buffer)!); - case 150: - return PlatformDoublePair.decode(readValue(buffer)!); - case 151: - return PlatformColor.decode(readValue(buffer)!); - case 152: - return PlatformInfoWindow.decode(readValue(buffer)!); - case 153: - return PlatformMarker.decode(readValue(buffer)!); - case 154: - return PlatformPointOfInterest.decode(readValue(buffer)!); - case 155: - return PlatformPolygon.decode(readValue(buffer)!); - case 156: - return PlatformPolyline.decode(readValue(buffer)!); - case 157: - return PlatformCap.decode(readValue(buffer)!); - case 158: - return PlatformPatternItem.decode(readValue(buffer)!); - case 159: - return PlatformTile.decode(readValue(buffer)!); - case 160: - return PlatformTileOverlay.decode(readValue(buffer)!); - case 161: - return PlatformEdgeInsets.decode(readValue(buffer)!); - case 162: - return PlatformLatLng.decode(readValue(buffer)!); - case 163: - return PlatformLatLngBounds.decode(readValue(buffer)!); - case 164: - return PlatformCluster.decode(readValue(buffer)!); - case 165: - return PlatformGroundOverlay.decode(readValue(buffer)!); - case 166: - return PlatformCameraTargetBounds.decode(readValue(buffer)!); - case 167: - return PlatformMapViewCreationParams.decode(readValue(buffer)!); - case 168: - return PlatformMapConfiguration.decode(readValue(buffer)!); - case 169: - return PlatformPoint.decode(readValue(buffer)!); - case 170: - return PlatformTileLayer.decode(readValue(buffer)!); - case 171: - return PlatformZoomRange.decode(readValue(buffer)!); - case 172: - return PlatformBitmap.decode(readValue(buffer)!); - case 173: - return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); - case 174: - return PlatformBitmapBytes.decode(readValue(buffer)!); - case 175: - return PlatformBitmapAsset.decode(readValue(buffer)!); - case 176: - return PlatformBitmapAssetImage.decode(readValue(buffer)!); - case 177: - return PlatformBitmapAssetMap.decode(readValue(buffer)!); - case 178: - return PlatformBitmapBytesMap.decode(readValue(buffer)!); - default: - return super.readValueOfType(type, buffer); - } - } -} - -/// Interface for non-test interactions with the native SDK. -/// -/// For test-only state queries, see [MapsInspectorApi]. -class MapsApi { - /// Constructor for [MapsApi]. 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. - MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - /// Returns once the map instance is available. - Future waitForMap() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the map's configuration options. - /// - /// Only non-null configuration values will result in updates; options with - /// null values will remain unchanged. - Future updateMapConfiguration(PlatformMapConfiguration configuration) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of circles on the map. - Future updateCircles(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of heatmaps on the map. - Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of custer managers for clusters on the map. - Future updateClusterManagers(List toAdd, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of markers on the map. - Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of polygonss on the map. - Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of polylines on the map. - Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of tile overlays on the map. - Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of ground overlays on the map. - Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Gets the screen coordinate for the given map location. - Future getScreenCoordinate(PlatformLatLng latLng) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformPoint?)!; - } - } - - /// Gets the map location for the given screen coordinate. - Future getLatLng(PlatformPoint screenCoordinate) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformLatLng?)!; - } - } - - /// Gets the map region currently displayed on the map. - Future getVisibleRegion() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformLatLngBounds?)!; - } - } - - /// Moves the camera according to [cameraUpdate] immediately, with no - /// animation. - Future moveCamera(PlatformCameraUpdate cameraUpdate) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Moves the camera according to [cameraUpdate], animating the update using a - /// duration in milliseconds if provided. - Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Gets the current map zoom level. - Future getZoomLevel() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as double?)!; - } - } - - /// Show the info window for the marker with the given ID. - Future showInfoWindow(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Hide the info window for the marker with the given ID. - Future hideInfoWindow(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Returns true if the marker with the given ID is currently displaying its - /// info window. - Future isInfoWindowShown(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - /// 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. - Future setStyle(String style) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - /// Returns true if 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. - Future didLastStyleSucceed() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - /// Clears the cache of tiles previously requseted from the tile provider. - Future clearTileCache(String tileOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Takes a snapshot of the map and returns its image data. - Future takeSnapshot() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as Uint8List?)!; - } - } -} - -abstract class MapsCallbackApi { - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - /// Called when the map camera starts moving. - void onCameraMoveStarted(); - - /// Called when the map camera moves. - void onCameraMove(PlatformCameraPosition cameraPosition); - - /// Called when the map camera stops moving. - void onCameraIdle(); - - /// Called when the map, not a specifc map object, is tapped. - void onTap(PlatformLatLng position); - - /// Called when the map, not a specifc map object, is long pressed. - void onLongPress(PlatformLatLng position); - - /// Called when a marker is tapped. - void onMarkerTap(String markerId); - - /// Called when a marker drag starts. - void onMarkerDragStart(String markerId, PlatformLatLng position); - - /// Called when a marker drag updates. - void onMarkerDrag(String markerId, PlatformLatLng position); - - /// Called when a marker drag ends. - void onMarkerDragEnd(String markerId, PlatformLatLng position); - - /// Called when a marker's info window is tapped. - void onInfoWindowTap(String markerId); - - /// Called when a circle is tapped. - void onCircleTap(String circleId); - - /// Called when a marker cluster is tapped. - void onClusterTap(PlatformCluster cluster); - - /// Called when a POI is tapped. - void onPoiTap(PlatformPointOfInterest poi); - - /// Called when a polygon is tapped. - void onPolygonTap(String polygonId); - - /// Called when a polyline is tapped. - void onPolylineTap(String polylineId); - - /// Called when a ground overlay is tapped. - void onGroundOverlayTap(String groundOverlayId); - - /// Called to get data for a map tile. - Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); - - static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { - messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - try { - api.onCameraMoveStarted(); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null.'); - final List args = (message as List?)!; - 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 { - api.onCameraMove(arg_cameraPosition!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - try { - api.onCameraIdle(); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null.'); - final List args = (message as List?)!; - final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); - try { - api.onTap(arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null.'); - final List args = (message as List?)!; - final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); - try { - api.onLongPress(arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); - try { - api.onMarkerTap(arg_markerId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); - try { - api.onMarkerDragStart(arg_markerId!, arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); - try { - api.onMarkerDrag(arg_markerId!, arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); - try { - api.onMarkerDragEnd(arg_markerId!, arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); - try { - api.onInfoWindowTap(arg_markerId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null.'); - final List args = (message as List?)!; - final String? arg_circleId = (args[0] as String?); - assert(arg_circleId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null, expected non-null String.'); - try { - api.onCircleTap(arg_circleId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null.'); - final List args = (message as List?)!; - final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); - assert(arg_cluster != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); - try { - api.onClusterTap(arg_cluster!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.'); - final List args = (message as List?)!; - final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); - assert(arg_poi != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); - try { - api.onPoiTap(arg_poi!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null.'); - final List args = (message as List?)!; - final String? arg_polygonId = (args[0] as String?); - assert(arg_polygonId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); - try { - api.onPolygonTap(arg_polygonId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null.'); - final List args = (message as List?)!; - final String? arg_polylineId = (args[0] as String?); - assert(arg_polylineId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); - try { - api.onPolylineTap(arg_polylineId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.'); - final List args = (message as List?)!; - final String? arg_groundOverlayId = (args[0] as String?); - assert(arg_groundOverlayId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); - try { - api.onGroundOverlayTap(arg_groundOverlayId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null.'); - final List args = (message as List?)!; - final String? arg_tileOverlayId = (args[0] as String?); - assert(arg_tileOverlayId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); - final PlatformPoint? arg_location = (args[1] as PlatformPoint?); - assert(arg_location != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); - final int? arg_zoom = (args[2] as int?); - 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!); - return wrapResponse(result: output); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - } -} - -/// Interface for global SDK initialization. -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 = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - /// Initializes the Google Maps SDK with the given renderer preference. - /// - /// 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. - Future initializeWithPreferredRenderer(PlatformRendererType? type) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformRendererType?)!; - } - } - - /// Attempts to trigger any thread-blocking work - /// the Google Maps SDK normally does when a map is shown for the first time. - Future warmup() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } -} - -/// 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. -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 = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future createView(PlatformMapViewCreationParams? type) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } -} - -/// Inspector API only intended for use in integration tests. -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 = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future areBuildingsEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areRotateGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areZoomControlsEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areScrollGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areTiltGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areZoomGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future isCompassEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future isLiteModeEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as bool?); - } - } - - Future isMapToolbarEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future isMyLocationButtonEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future isTrafficEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future getTileOverlayInfo(String tileOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as PlatformTileLayer?); - } - } - - Future getGroundOverlayInfo(String groundOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as PlatformGroundOverlay?); - } - } - - Future getZoomRange() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformZoomRange?)!; - } - } - - Future> getClusters(String clusterManagerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as List?)!.cast(); - } - } - - Future getCameraPosition() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformCameraPosition?)!; - } - } -} diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.rej b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.rej deleted file mode 100644 index e8ad1b59be66..000000000000 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart.rej +++ /dev/null @@ -1,1574 +0,0 @@ ---- packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart -+++ packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart -@@ -31,64 +35,43 @@ List wrapResponse({Object? result, PlatformException? error, bool empty - } - return [error.code, error.message, error.details]; - } -+ - bool _deepEquals(Object? a, Object? b) { - if (a is List && b is List) { - return a.length == b.length && -- a.indexed -- .every(((int, dynamic) item) => _deepEquals(item., b[item.])); -+ a.indexed.every( -+ ((int, dynamic) item) => _deepEquals(item., b[item.]), -+ ); - } - if (a is Map && b is Map) { -- return a.length == b.length && a.entries.every((MapEntry entry) => -- (b as Map).containsKey(entry.key) && -- _deepEquals(entry.value, b[entry.key])); -+ return a.length == b.length && -+ a.entries.every( -+ (MapEntry entry) => -+ (b as Map).containsKey(entry.key) && -+ _deepEquals(entry.value, b[entry.key]), -+ ); - } - return a == b; - } - -- - /// Pigeon equivalent of MapType --enum PlatformMapType { -- none, -- normal, -- satellite, -- terrain, -- hybrid, --} -+enum PlatformMapType { none, normal, satellite, terrain, hybrid } - --enum PlatformRendererType { -- legacy, -- latest, --} -+enum PlatformRendererType { legacy, latest } - - /// Join types for polyline joints. --enum PlatformJointType { -- mitered, -- bevel, -- round, --} -+enum PlatformJointType { mitered, bevel, round } - - /// Enumeration of possible types of PlatformCap, corresponding to the - /// subclasses of Cap in the Google Maps Android SDK. - /// See https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/Cap. --enum PlatformCapType { -- buttCap, -- roundCap, -- squareCap, -- customCap, --} -+enum PlatformCapType { buttCap, roundCap, squareCap, customCap } - - /// Enumeration of possible types for PatternItem. --enum PlatformPatternItemType { -- dot, -- dash, -- gap, --} -+enum PlatformPatternItemType { dot, dash, gap } - - /// Pigeon equivalent of [MapBitmapScaling]. --enum PlatformMapBitmapScaling { -- auto, -- none, --} -+enum PlatformMapBitmapScaling { auto, none } - - /// Pigeon representatation of a CameraPosition. - class PlatformCameraPosition { -@@ -2732,8 +2518,10 @@ class MapsApi { - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) -- : pigeonVar_binaryMessenger = binaryMessenger, -- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ : pigeonVar_binaryMessenger = binaryMessenger, -+ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); -@@ -2742,7 +2530,8 @@ class MapsApi { - - /// Returns once the map instance is available. - Future waitForMap() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.waitForMap'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -2767,14 +2556,19 @@ class MapsApi { - /// - /// Only non-null configuration values will result in updates; options with - /// null values will remain unchanged. -- Future updateMapConfiguration(PlatformMapConfiguration configuration) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration'; -+ Future updateMapConfiguration( -+ PlatformMapConfiguration configuration, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMapConfiguration'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [configuration], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2790,14 +2584,21 @@ class MapsApi { - } - - /// Updates the set of circles on the map. -- Future updateCircles(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles'; -+ Future updateCircles( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateCircles'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2813,14 +2614,21 @@ class MapsApi { - } - - /// Updates the set of heatmaps on the map. -- Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps'; -+ Future updateHeatmaps( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateHeatmaps'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2836,14 +2644,20 @@ class MapsApi { - } - - /// Updates the set of custer managers for clusters on the map. -- Future updateClusterManagers(List toAdd, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers'; -+ Future updateClusterManagers( -+ List toAdd, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateClusterManagers'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2859,14 +2673,21 @@ class MapsApi { - } - - /// Updates the set of markers on the map. -- Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers'; -+ Future updateMarkers( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateMarkers'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2882,14 +2703,21 @@ class MapsApi { - } - - /// Updates the set of polygonss on the map. -- Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons'; -+ Future updatePolygons( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolygons'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2905,14 +2733,21 @@ class MapsApi { - } - - /// Updates the set of polylines on the map. -- Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines'; -+ Future updatePolylines( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updatePolylines'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2928,14 +2763,21 @@ class MapsApi { - } - - /// Updates the set of tile overlays on the map. -- Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays'; -+ Future updateTileOverlays( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateTileOverlays'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2951,14 +2793,21 @@ class MapsApi { - } - - /// Updates the set of ground overlays on the map. -- Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays'; -+ Future updateGroundOverlays( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.updateGroundOverlays'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2975,13 +2824,16 @@ class MapsApi { - - /// Gets the screen coordinate for the given map location. - Future getScreenCoordinate(PlatformLatLng latLng) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getScreenCoordinate'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [latLng], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3003,13 +2855,16 @@ class MapsApi { - - /// Gets the map location for the given screen coordinate. - Future getLatLng(PlatformPoint screenCoordinate) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getLatLng'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [screenCoordinate], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3031,7 +2886,8 @@ class MapsApi { - - /// Gets the map region currently displayed on the map. - Future getVisibleRegion() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getVisibleRegion'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3060,13 +2916,16 @@ class MapsApi { - /// Moves the camera according to [cameraUpdate] immediately, with no - /// animation. - Future moveCamera(PlatformCameraUpdate cameraUpdate) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.moveCamera'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [cameraUpdate], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3083,14 +2942,20 @@ class MapsApi { - - /// Moves the camera according to [cameraUpdate], animating the update using a - /// duration in milliseconds if provided. -- Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera'; -+ Future animateCamera( -+ PlatformCameraUpdate cameraUpdate, -+ int? durationMilliseconds, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.animateCamera'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [cameraUpdate, durationMilliseconds], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3107,7 +2972,8 @@ class MapsApi { - - /// Gets the current map zoom level. - Future getZoomLevel() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.getZoomLevel'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3135,13 +3001,16 @@ class MapsApi { - - /// Show the info window for the marker with the given ID. - Future showInfoWindow(String markerId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.showInfoWindow'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [markerId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3158,13 +3027,16 @@ class MapsApi { - - /// Hide the info window for the marker with the given ID. - Future hideInfoWindow(String markerId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.hideInfoWindow'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [markerId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3182,13 +3054,16 @@ class MapsApi { - /// Returns true if the marker with the given ID is currently displaying its - /// info window. - Future isInfoWindowShown(String markerId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.isInfoWindowShown'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [markerId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3214,13 +3089,16 @@ class MapsApi { - /// Returns false if there was an error setting the style, such as an invalid - /// style string. - Future setStyle(String style) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.setStyle'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [style], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3246,7 +3124,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 pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.didLastStyleSucceed'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3274,13 +3153,16 @@ class MapsApi { - - /// Clears the cache of tiles previously requseted from the tile provider. - Future clearTileCache(String tileOverlayId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.clearTileCache'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [tileOverlayId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3297,7 +3179,8 @@ class MapsApi { - - /// Takes a snapshot of the map and returns its image data. - Future takeSnapshot() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsApi.takeSnapshot'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3376,14 +3259,26 @@ abstract class MapsCallbackApi { - void onGroundOverlayTap(String groundOverlayId); - - /// Called to get data for a map tile. -- Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); -+ Future getTileOverlayTile( -+ String tileOverlayId, -+ PlatformPoint location, -+ int zoom, -+ ); - -- static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { -- messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ static void setUp( -+ MapsCallbackApi? api, { -+ BinaryMessenger? binaryMessenger, -+ String messageChannelSuffix = '', -+ }) { -+ messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - { - final pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMoveStarted', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { -@@ -3393,41 +3288,54 @@ 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null.'); -+ assert( -+ message != 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?); -- assert(arg_cameraPosition != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraMove was null, expected non-null 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 { - api.onCameraMove(arg_cameraPosition!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCameraIdle', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { -@@ -3437,373 +3345,502 @@ 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onTap(arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onLongPress(arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerTap was null, expected non-null String.', -+ ); - try { - api.onMarkerTap(arg_markerId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.', -+ ); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); -- assert(arg_position != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onMarkerDragStart(arg_markerId!, arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null String.', -+ ); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); -- assert(arg_position != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onMarkerDrag(arg_markerId!, arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.', -+ ); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); -- assert(arg_position != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onMarkerDragEnd(arg_markerId!, arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.', -+ ); - try { - api.onInfoWindowTap(arg_markerId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null, expected non-null String.'); -+ assert( -+ arg_circleId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onCircleTap was null, expected non-null String.', -+ ); - try { - api.onCircleTap(arg_circleId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); -+ assert( -+ arg_cluster != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.', -+ ); - try { - api.onClusterTap(arg_cluster!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null.', -+ ); - final List args = (message as List?)!; -- final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); -- assert(arg_poi != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); -+ final PlatformPointOfInterest? arg_poi = -+ (args[0] as PlatformPointOfInterest?); -+ assert( -+ arg_poi != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.', -+ ); - try { - api.onPoiTap(arg_poi!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); -+ assert( -+ arg_polygonId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolygonTap was null, expected non-null String.', -+ ); - try { - api.onPolygonTap(arg_polygonId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); -+ assert( -+ arg_polylineId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onPolylineTap was null, expected non-null String.', -+ ); - try { - api.onPolylineTap(arg_polylineId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null.', -+ ); - final List args = (message as List?)!; - final String? arg_groundOverlayId = (args[0] as String?); -- assert(arg_groundOverlayId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); -+ assert( -+ arg_groundOverlayId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.', -+ ); - try { - api.onGroundOverlayTap(arg_groundOverlayId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null.'); -+ assert( -+ message != 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, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); -+ assert( -+ arg_tileOverlayId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.', -+ ); - final PlatformPoint? arg_location = (args[1] as PlatformPoint?); -- assert(arg_location != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); -+ assert( -+ arg_location != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.', -+ ); - final int? arg_zoom = (args[2] as int?); -- assert(arg_zoom != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_android.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); -+ 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()), -+ ); - } - }); - } -@@ -3816,9 +3853,13 @@ 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 = ''}) -- : pigeonVar_binaryMessenger = binaryMessenger, -- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ MapsInitializerApi({ -+ BinaryMessenger? binaryMessenger, -+ String messageChannelSuffix = '', -+ }) : pigeonVar_binaryMessenger = binaryMessenger, -+ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); -@@ -3831,14 +3872,19 @@ class MapsInitializerApi { - /// - /// Calling this more than once in the lifetime of an application will result - /// in an error. -- Future initializeWithPreferredRenderer(PlatformRendererType? type) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer'; -+ Future initializeWithPreferredRenderer( -+ PlatformRendererType? type, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.initializeWithPreferredRenderer'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [type], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3861,7 +3907,8 @@ class MapsInitializerApi { - /// Attempts to trigger any thread-blocking work - /// the Google Maps SDK normally does when a map is shown for the first time. - Future warmup() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInitializerApi.warmup'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3890,9 +3937,13 @@ 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 = ''}) -- : pigeonVar_binaryMessenger = binaryMessenger, -- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ MapsPlatformViewApi({ -+ BinaryMessenger? binaryMessenger, -+ String messageChannelSuffix = '', -+ }) : pigeonVar_binaryMessenger = binaryMessenger, -+ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); -@@ -3900,13 +3951,16 @@ class MapsPlatformViewApi { - final String pigeonVar_messageChannelSuffix; - - Future createView(PlatformMapViewCreationParams? type) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsPlatformViewApi.createView'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [type], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3927,9 +3981,13 @@ 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 = ''}) -- : pigeonVar_binaryMessenger = binaryMessenger, -- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ MapsInspectorApi({ -+ BinaryMessenger? binaryMessenger, -+ String messageChannelSuffix = '', -+ }) : pigeonVar_binaryMessenger = binaryMessenger, -+ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); -@@ -3937,7 +3995,8 @@ class MapsInspectorApi { - final String pigeonVar_messageChannelSuffix; - - Future areBuildingsEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areBuildingsEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3964,7 +4023,8 @@ class MapsInspectorApi { - } - - Future areRotateGesturesEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areRotateGesturesEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3991,7 +4051,8 @@ class MapsInspectorApi { - } - - Future areZoomControlsEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomControlsEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4018,7 +4079,8 @@ class MapsInspectorApi { - } - - Future areScrollGesturesEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areScrollGesturesEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4045,7 +4107,8 @@ class MapsInspectorApi { - } - - Future areTiltGesturesEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areTiltGesturesEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4072,7 +4135,8 @@ class MapsInspectorApi { - } - - Future areZoomGesturesEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.areZoomGesturesEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4099,7 +4163,8 @@ class MapsInspectorApi { - } - - Future isCompassEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isCompassEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4126,7 +4191,8 @@ class MapsInspectorApi { - } - - Future isLiteModeEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isLiteModeEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4148,7 +4214,8 @@ class MapsInspectorApi { - } - - Future isMapToolbarEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMapToolbarEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4175,7 +4242,8 @@ class MapsInspectorApi { - } - - Future isMyLocationButtonEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isMyLocationButtonEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4202,7 +4270,8 @@ class MapsInspectorApi { - } - - Future isTrafficEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.isTrafficEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4229,13 +4298,16 @@ class MapsInspectorApi { - } - - Future getTileOverlayInfo(String tileOverlayId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getTileOverlayInfo'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [tileOverlayId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -4250,14 +4322,19 @@ class MapsInspectorApi { - } - } - -- Future getGroundOverlayInfo(String groundOverlayId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo'; -+ Future getGroundOverlayInfo( -+ String groundOverlayId, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getGroundOverlayInfo'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [groundOverlayId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -4273,7 +4350,8 @@ class MapsInspectorApi { - } - - Future getZoomRange() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getZoomRange'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4300,13 +4378,16 @@ class MapsInspectorApi { - } - - Future> getClusters(String clusterManagerId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getClusters'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [clusterManagerId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -4322,12 +4403,14 @@ class MapsInspectorApi { - message: 'Host platform returned null value for non-null return value.', - ); - } else { -- return (pigeonVar_replyList[0] as List?)!.cast(); -+ return (pigeonVar_replyList[0] as List?)! -+ .cast(); - } - } - - Future getCameraPosition() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_android.MapsInspectorApi.getCameraPosition'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, 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 eade30e49f67..038cf572cecf 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 @@ -237,14 +237,9 @@ class PlatformMarker { /// Pigeon equivalent of the Point of Interest class. class PlatformPointOfInterest { - PlatformPointOfInterest({ - required this.position, - this.name, - required this.placeId, - }); + PlatformPointOfInterest({required this.position, required this.placeId}); final PlatformLatLng position; - final String? name; final String placeId; } 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 bac69828a9a9..fafadfb8f91a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml @@ -37,6 +37,7 @@ topics: - google-maps - google-maps-flutter - map + dependency_overrides: google_maps_flutter_platform_interface: path: ../google_maps_flutter_platform_interface 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 882b3ff4d633..94c051077d47 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 @@ -1500,7 +1500,6 @@ void main() { test('onPoiTap sends events to correct stream', () async { const mapId = 1; final fakePosition = PlatformLatLng(latitude: 12.34, longitude: 56.78); - const fakeName = 'Googleplex'; const fakePlaceId = 'iso_id_123'; final maps = GoogleMapsFlutterAndroid(); @@ -1511,11 +1510,7 @@ void main() { final stream = StreamQueue(maps.onPoiTap(mapId: mapId)); callbackHandler.onPoiTap( - PlatformPointOfInterest( - position: fakePosition, - name: fakeName, - placeId: fakePlaceId, - ), + PlatformPointOfInterest(position: fakePosition, placeId: fakePlaceId), ); final MapPoiTapEvent event = await stream.next; @@ -1524,7 +1519,6 @@ void main() { final PointOfInterest poi = event.value; expect(poi.position.latitude, fakePosition.latitude); expect(poi.position.longitude, fakePosition.longitude); - expect(poi.name, fakeName); expect(poi.placeId, fakePlaceId); }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m index e51da47062f7..d8a569196b83 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m @@ -54,6 +54,24 @@ @interface FLTGoogleMapFactory (Test) @property(strong, nonatomic, readonly) id sharedMapServices; @end +@interface FLTGoogleMapController (Testing) +@property(nonatomic, strong) FGMMapsCallbackApi *dartCallbackHandler; +@end + +@interface MockMapCallbackHandler : FGMMapsCallbackApi +@property(nonatomic, strong) FGMPlatformPointOfInterest *lastPoiTap; +@end + +@implementation MockMapCallbackHandler +- (void)didTapPointOfInterest:(FGMPlatformPointOfInterest *)poi + completion:(void (^)(FlutterError *_Nullable))completion { + self.lastPoiTap = poi; + if (completion) { + completion(nil); + } +} +@end + @interface GoogleMapsTests : XCTestCase @end @@ -222,6 +240,38 @@ - (void)testInspectorAPICameraPosition { XCTAssertEqual(cameraPosition.zoom, initialCameraPosition.zoom); } +- (void)testDidTapPOI { + CGRect frame = CGRectMake(0, 0, 100, 100); + GMSMapViewOptions *options = [[GMSMapViewOptions alloc] init]; + options.frame = frame; + options.camera = [GMSCameraPosition cameraWithLatitude:0 longitude:0 zoom:0]; + + PartiallyMockedMapView *mapView = [[PartiallyMockedMapView alloc] initWithOptions:options]; + + FLTGoogleMapController *controller = + [[FLTGoogleMapController alloc] initWithMapView:mapView + viewIdentifier:0 + creationParameters:[self emptyCreationParameters] + assetProvider:[[TestAssetProvider alloc] init] + binaryMessenger:[[StubBinaryMessenger alloc] init]]; + + MockMapCallbackHandler *mockHandler = + [[MockMapCallbackHandler alloc] initWithBinaryMessenger:[[StubBinaryMessenger alloc] init]]; + controller.dartCallbackHandler = mockHandler; + + NSString *placeId = @"test_place_id"; + NSString *name = @"Test POI Name"; + CLLocationCoordinate2D location = CLLocationCoordinate2DMake(10.0, 20.0); + + [controller mapView:mapView didTapPOIWithPlaceID:placeId name:name location:location]; + + XCTAssertNotNil(mockHandler.lastPoiTap, @"The POI tap should have been recorded."); + XCTAssertEqualObjects(mockHandler.lastPoiTap.placeId, placeId); + XCTAssertEqualObjects(mockHandler.lastPoiTap.name, name); + XCTAssertEqual(mockHandler.lastPoiTap.position.latitude, 10.0); + XCTAssertEqual(mockHandler.lastPoiTap.position.longitude, 20.0); +} + /// Creates an empty creation paramaters object for tests where the values don't matter, just that /// there's a valid object to pass in. - (FGMPlatformMapViewCreationParams *)emptyCreationParameters { diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml index e2b9b6898439..7eb431ce82d5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml @@ -31,6 +31,7 @@ flutter: uses-material-design: true assets: - assets/ + dependency_overrides: google_maps_flutter_platform_interface: path: ../../google_maps_flutter_platform_interface diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart index ea6030705316..310f10f909b9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/test/example_google_map_test.dart @@ -193,7 +193,6 @@ void main() { const poi = PointOfInterest( position: LatLng(10.0, 10.0), - name: 'Test POI', placeId: 'test_id_123', ); @@ -202,7 +201,6 @@ void main() { await tester.pump(); expect(tappedPoi, poi); - expect(tappedPoi!.name, 'Test POI'); expect(tappedPoi!.placeId, 'test_id_123'); }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m index e2e0b666e8b4..6b7ce10fcb50 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m @@ -566,7 +566,6 @@ - (void)mapView:(GMSMapView *)mapView location:(CLLocationCoordinate2D)location { FGMPlatformPointOfInterest *poi = [FGMPlatformPointOfInterest makeWithPosition:FGMGetPigeonLatLngForCoordinate(location) - name:name placeId:placeID]; [self.dartCallbackHandler didTapPointOfInterest:poi diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m index 60d18f1a8c67..58dd35dcce31 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m @@ -881,20 +881,16 @@ + (nullable FGMPlatformMarker *)nullableFromList:(NSArray *)list { @end @implementation FGMPlatformPointOfInterest -+ (instancetype)makeWithPosition:(FGMPlatformLatLng *)position - name:(NSString *)name - placeId:(NSString *)placeId { ++ (instancetype)makeWithPosition:(FGMPlatformLatLng *)position placeId:(NSString *)placeId { FGMPlatformPointOfInterest *pigeonResult = [[FGMPlatformPointOfInterest alloc] init]; pigeonResult.position = position; - pigeonResult.name = name; pigeonResult.placeId = placeId; return pigeonResult; } + (FGMPlatformPointOfInterest *)fromList:(NSArray *)list { FGMPlatformPointOfInterest *pigeonResult = [[FGMPlatformPointOfInterest alloc] init]; pigeonResult.position = GetNullableObjectAtIndex(list, 0); - pigeonResult.name = GetNullableObjectAtIndex(list, 1); - pigeonResult.placeId = GetNullableObjectAtIndex(list, 2); + pigeonResult.placeId = GetNullableObjectAtIndex(list, 1); return pigeonResult; } + (nullable FGMPlatformPointOfInterest *)nullableFromList:(NSArray *)list { @@ -903,7 +899,6 @@ + (nullable FGMPlatformPointOfInterest *)nullableFromList:(NSArray *)list { - (NSArray *)toList { return @[ self.position ?: [NSNull null], - self.name ?: [NSNull null], self.placeId ?: [NSNull null], ]; } @@ -2274,11 +2269,11 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, binaryMessenger:binaryMessenger codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updatePolylinesByAdding: - changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updatePolylinesByAdding:changing:removing:error:)", - api); + NSCAssert( + [api respondsToSelector:@selector(updatePolylinesByAdding:changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updatePolylinesByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); @@ -2305,11 +2300,11 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, binaryMessenger:binaryMessenger codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateTileOverlaysByAdding: - changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateTileOverlaysByAdding:changing:removing:error:)", - api); + NSCAssert( + [api respondsToSelector:@selector(updateTileOverlaysByAdding:changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateTileOverlaysByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); @@ -2336,11 +2331,11 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, binaryMessenger:binaryMessenger codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(updateGroundOverlaysByAdding: - changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateGroundOverlaysByAdding:changing:removing:error:)", - api); + NSCAssert( + [api respondsToSelector:@selector(updateGroundOverlaysByAdding:changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateGroundOverlaysByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); @@ -2569,11 +2564,11 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, binaryMessenger:binaryMessenger codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier: - error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)", - api); + NSCAssert( + [api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_markerId = GetNullableObjectAtIndex(args, 0); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h index b1d81e6cc9e2..4df9a8590384 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h @@ -343,11 +343,8 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @interface FGMPlatformPointOfInterest : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithPosition:(FGMPlatformLatLng *)position - name:(NSString *)name - placeId:(NSString *)placeId; ++ (instancetype)makeWithPosition:(FGMPlatformLatLng *)position placeId:(NSString *)placeId; @property(nonatomic, strong) FGMPlatformLatLng *position; -@property(nonatomic, copy) NSString *name; @property(nonatomic, copy) NSString *placeId; @end diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.orig b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.orig deleted file mode 100644 index e52fe5cfa423..000000000000 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.orig +++ /dev/null @@ -1,901 +0,0 @@ -// Copyright 2013 The Flutter Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.7), do not edit directly. -// See also: https://pub.dev/packages/pigeon - -@import Foundation; - -@protocol FlutterBinaryMessenger; -@protocol FlutterMessageCodec; -@class FlutterError; -@class FlutterStandardTypedData; - -NS_ASSUME_NONNULL_BEGIN - -/// Pigeon equivalent of MapType -typedef NS_ENUM(NSUInteger, FGMPlatformMapType) { - FGMPlatformMapTypeNone = 0, - FGMPlatformMapTypeNormal = 1, - FGMPlatformMapTypeSatellite = 2, - FGMPlatformMapTypeTerrain = 3, - FGMPlatformMapTypeHybrid = 4, -}; - -/// Wrapper for FGMPlatformMapType to allow for nullability. -@interface FGMPlatformMapTypeBox : NSObject -@property(nonatomic, assign) FGMPlatformMapType value; -- (instancetype)initWithValue:(FGMPlatformMapType)value; -@end - -/// Join types for polyline joints. -typedef NS_ENUM(NSUInteger, FGMPlatformJointType) { - FGMPlatformJointTypeMitered = 0, - FGMPlatformJointTypeBevel = 1, - FGMPlatformJointTypeRound = 2, -}; - -/// Wrapper for FGMPlatformJointType to allow for nullability. -@interface FGMPlatformJointTypeBox : NSObject -@property(nonatomic, assign) FGMPlatformJointType value; -- (instancetype)initWithValue:(FGMPlatformJointType)value; -@end - -/// Enumeration of possible types for PatternItem. -typedef NS_ENUM(NSUInteger, FGMPlatformPatternItemType) { - FGMPlatformPatternItemTypeDot = 0, - FGMPlatformPatternItemTypeDash = 1, - FGMPlatformPatternItemTypeGap = 2, -}; - -/// Wrapper for FGMPlatformPatternItemType to allow for nullability. -@interface FGMPlatformPatternItemTypeBox : NSObject -@property(nonatomic, assign) FGMPlatformPatternItemType value; -- (instancetype)initWithValue:(FGMPlatformPatternItemType)value; -@end - -/// Pigeon equivalent of [MapBitmapScaling]. -typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - FGMPlatformMapBitmapScalingAuto = 0, - FGMPlatformMapBitmapScalingNone = 1, -}; - -/// Wrapper for FGMPlatformMapBitmapScaling to allow for nullability. -@interface FGMPlatformMapBitmapScalingBox : NSObject -@property(nonatomic, assign) FGMPlatformMapBitmapScaling value; -- (instancetype)initWithValue:(FGMPlatformMapBitmapScaling)value; -@end - -@class FGMPlatformCameraPosition; -@class FGMPlatformCameraUpdate; -@class FGMPlatformCameraUpdateNewCameraPosition; -@class FGMPlatformCameraUpdateNewLatLng; -@class FGMPlatformCameraUpdateNewLatLngBounds; -@class FGMPlatformCameraUpdateNewLatLngZoom; -@class FGMPlatformCameraUpdateScrollBy; -@class FGMPlatformCameraUpdateZoomBy; -@class FGMPlatformCameraUpdateZoom; -@class FGMPlatformCameraUpdateZoomTo; -@class FGMPlatformCircle; -@class FGMPlatformHeatmap; -@class FGMPlatformHeatmapGradient; -@class FGMPlatformWeightedLatLng; -@class FGMPlatformInfoWindow; -@class FGMPlatformCluster; -@class FGMPlatformClusterManager; -@class FGMPlatformMarker; -@class FGMPlatformPointOfInterest; -@class FGMPlatformPolygon; -@class FGMPlatformPolyline; -@class FGMPlatformPatternItem; -@class FGMPlatformTile; -@class FGMPlatformTileOverlay; -@class FGMPlatformEdgeInsets; -@class FGMPlatformLatLng; -@class FGMPlatformLatLngBounds; -@class FGMPlatformCameraTargetBounds; -@class FGMPlatformGroundOverlay; -@class FGMPlatformMapViewCreationParams; -@class FGMPlatformMapConfiguration; -@class FGMPlatformPoint; -@class FGMPlatformSize; -@class FGMPlatformColor; -@class FGMPlatformTileLayer; -@class FGMPlatformZoomRange; -@class FGMPlatformBitmap; -@class FGMPlatformBitmapDefaultMarker; -@class FGMPlatformBitmapBytes; -@class FGMPlatformBitmapAsset; -@class FGMPlatformBitmapAssetImage; -@class FGMPlatformBitmapAssetMap; -@class FGMPlatformBitmapBytesMap; - -/// Pigeon representatation of a CameraPosition. -@interface FGMPlatformCameraPosition : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBearing:(double )bearing - target:(FGMPlatformLatLng *)target - tilt:(double )tilt - zoom:(double )zoom; -@property(nonatomic, assign) double bearing; -@property(nonatomic, strong) FGMPlatformLatLng * target; -@property(nonatomic, assign) double tilt; -@property(nonatomic, assign) double zoom; -@end - -/// Pigeon representation of a CameraUpdate. -@interface FGMPlatformCameraUpdate : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithCameraUpdate:(id )cameraUpdate; -/// This Object must be one of the classes below prefixed with -/// PlatformCameraUpdate. Each such class represents a different type of -/// camera update, and each holds a different set of data, preventing the -/// use of a single unified class. -@property(nonatomic, strong) id cameraUpdate; -@end - -/// Pigeon equivalent of NewCameraPosition -@interface FGMPlatformCameraUpdateNewCameraPosition : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition; -@property(nonatomic, strong) FGMPlatformCameraPosition * cameraPosition; -@end - -/// Pigeon equivalent of NewLatLng -@interface FGMPlatformCameraUpdateNewLatLng : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng; -@property(nonatomic, strong) FGMPlatformLatLng * latLng; -@end - -/// Pigeon equivalent of NewLatLngBounds -@interface FGMPlatformCameraUpdateNewLatLngBounds : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds - padding:(double )padding; -@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; -@property(nonatomic, assign) double padding; -@end - -/// Pigeon equivalent of NewLatLngZoom -@interface FGMPlatformCameraUpdateNewLatLngZoom : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng - zoom:(double )zoom; -@property(nonatomic, strong) FGMPlatformLatLng * latLng; -@property(nonatomic, assign) double zoom; -@end - -/// Pigeon equivalent of ScrollBy -@interface FGMPlatformCameraUpdateScrollBy : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithDx:(double )dx - dy:(double )dy; -@property(nonatomic, assign) double dx; -@property(nonatomic, assign) double dy; -@end - -/// Pigeon equivalent of ZoomBy -@interface FGMPlatformCameraUpdateZoomBy : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAmount:(double )amount - focus:(nullable FGMPlatformPoint *)focus; -@property(nonatomic, assign) double amount; -@property(nonatomic, strong, nullable) FGMPlatformPoint * focus; -@end - -/// Pigeon equivalent of ZoomIn/ZoomOut -@interface FGMPlatformCameraUpdateZoom : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithOut:(BOOL )out; -@property(nonatomic, assign) BOOL out; -@end - -/// Pigeon equivalent of ZoomTo -@interface FGMPlatformCameraUpdateZoomTo : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithZoom:(double )zoom; -@property(nonatomic, assign) double zoom; -@end - -/// Pigeon equivalent of the Circle class. -@interface FGMPlatformCircle : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithConsumeTapEvents:(BOOL )consumeTapEvents - fillColor:(FGMPlatformColor *)fillColor - strokeColor:(FGMPlatformColor *)strokeColor - visible:(BOOL )visible - strokeWidth:(NSInteger )strokeWidth - zIndex:(double )zIndex - center:(FGMPlatformLatLng *)center - radius:(double )radius - circleId:(NSString *)circleId; -@property(nonatomic, assign) BOOL consumeTapEvents; -@property(nonatomic, strong) FGMPlatformColor * fillColor; -@property(nonatomic, strong) FGMPlatformColor * strokeColor; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger strokeWidth; -@property(nonatomic, assign) double zIndex; -@property(nonatomic, strong) FGMPlatformLatLng * center; -@property(nonatomic, assign) double radius; -@property(nonatomic, copy) NSString * circleId; -@end - -/// Pigeon equivalent of the Heatmap class. -@interface FGMPlatformHeatmap : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithHeatmapId:(NSString *)heatmapId - data:(NSArray *)data - gradient:(nullable FGMPlatformHeatmapGradient *)gradient - opacity:(double )opacity - radius:(NSInteger )radius - minimumZoomIntensity:(NSInteger )minimumZoomIntensity - maximumZoomIntensity:(NSInteger )maximumZoomIntensity; -@property(nonatomic, copy) NSString * heatmapId; -@property(nonatomic, copy) NSArray * data; -@property(nonatomic, strong, nullable) FGMPlatformHeatmapGradient * gradient; -@property(nonatomic, assign) double opacity; -@property(nonatomic, assign) NSInteger radius; -@property(nonatomic, assign) NSInteger minimumZoomIntensity; -@property(nonatomic, assign) NSInteger maximumZoomIntensity; -@end - -/// Pigeon equivalent of the HeatmapGradient class. -/// -/// The GMUGradient structure is slightly different from HeatmapGradient, so -/// this matches the iOS API so that conversion can be done on the Dart side -/// where the structures are easier to work with. -@interface FGMPlatformHeatmapGradient : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithColors:(NSArray *)colors - startPoints:(NSArray *)startPoints - colorMapSize:(NSInteger )colorMapSize; -@property(nonatomic, copy) NSArray * colors; -@property(nonatomic, copy) NSArray * startPoints; -@property(nonatomic, assign) NSInteger colorMapSize; -@end - -/// Pigeon equivalent of the WeightedLatLng class. -@interface FGMPlatformWeightedLatLng : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point - weight:(double )weight; -@property(nonatomic, strong) FGMPlatformLatLng * point; -@property(nonatomic, assign) double weight; -@end - -/// Pigeon equivalent of the InfoWindow class. -@interface FGMPlatformInfoWindow : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithTitle:(nullable NSString *)title - snippet:(nullable NSString *)snippet - anchor:(FGMPlatformPoint *)anchor; -@property(nonatomic, copy, nullable) NSString * title; -@property(nonatomic, copy, nullable) NSString * snippet; -@property(nonatomic, strong) FGMPlatformPoint * anchor; -@end - -/// Pigeon equivalent of Cluster. -@interface FGMPlatformCluster : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId - position:(FGMPlatformLatLng *)position - bounds:(FGMPlatformLatLngBounds *)bounds - markerIds:(NSArray *)markerIds; -@property(nonatomic, copy) NSString * clusterManagerId; -@property(nonatomic, strong) FGMPlatformLatLng * position; -@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; -@property(nonatomic, copy) NSArray * markerIds; -@end - -/// Pigeon equivalent of the ClusterManager class. -@interface FGMPlatformClusterManager : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithIdentifier:(NSString *)identifier; -@property(nonatomic, copy) NSString * identifier; -@end - -/// Pigeon equivalent of the Marker class. -@interface FGMPlatformMarker : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAlpha:(double )alpha - anchor:(FGMPlatformPoint *)anchor - consumeTapEvents:(BOOL )consumeTapEvents - draggable:(BOOL )draggable - flat:(BOOL )flat - icon:(FGMPlatformBitmap *)icon - infoWindow:(FGMPlatformInfoWindow *)infoWindow - position:(FGMPlatformLatLng *)position - rotation:(double )rotation - visible:(BOOL )visible - zIndex:(NSInteger )zIndex - markerId:(NSString *)markerId - clusterManagerId:(nullable NSString *)clusterManagerId; -@property(nonatomic, assign) double alpha; -@property(nonatomic, strong) FGMPlatformPoint * anchor; -@property(nonatomic, assign) BOOL consumeTapEvents; -@property(nonatomic, assign) BOOL draggable; -@property(nonatomic, assign) BOOL flat; -@property(nonatomic, strong) FGMPlatformBitmap * icon; -@property(nonatomic, strong) FGMPlatformInfoWindow * infoWindow; -@property(nonatomic, strong) FGMPlatformLatLng * position; -@property(nonatomic, assign) double rotation; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, copy) NSString * markerId; -@property(nonatomic, copy, nullable) NSString * clusterManagerId; -@end - -/// Pigeon equivalent of the Point of Interest class. -@interface FGMPlatformPointOfInterest : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithPosition:(FGMPlatformLatLng *)position - name:(NSString *)name - placeId:(NSString *)placeId; -@property(nonatomic, strong) FGMPlatformLatLng * position; -@property(nonatomic, copy) NSString * name; -@property(nonatomic, copy) NSString * placeId; -@end - -/// Pigeon equivalent of the Polygon class. -@interface FGMPlatformPolygon : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithPolygonId:(NSString *)polygonId - consumesTapEvents:(BOOL )consumesTapEvents - fillColor:(FGMPlatformColor *)fillColor - geodesic:(BOOL )geodesic - points:(NSArray *)points - holes:(NSArray *> *)holes - visible:(BOOL )visible - strokeColor:(FGMPlatformColor *)strokeColor - strokeWidth:(NSInteger )strokeWidth - zIndex:(NSInteger )zIndex; -@property(nonatomic, copy) NSString * polygonId; -@property(nonatomic, assign) BOOL consumesTapEvents; -@property(nonatomic, strong) FGMPlatformColor * fillColor; -@property(nonatomic, assign) BOOL geodesic; -@property(nonatomic, copy) NSArray * points; -@property(nonatomic, copy) NSArray *> * holes; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, strong) FGMPlatformColor * strokeColor; -@property(nonatomic, assign) NSInteger strokeWidth; -@property(nonatomic, assign) NSInteger zIndex; -@end - -/// Pigeon equivalent of the Polyline class. -@interface FGMPlatformPolyline : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithPolylineId:(NSString *)polylineId - consumesTapEvents:(BOOL )consumesTapEvents - color:(FGMPlatformColor *)color - geodesic:(BOOL )geodesic - jointType:(FGMPlatformJointType)jointType - patterns:(NSArray *)patterns - points:(NSArray *)points - visible:(BOOL )visible - width:(NSInteger )width - zIndex:(NSInteger )zIndex; -@property(nonatomic, copy) NSString * polylineId; -@property(nonatomic, assign) BOOL consumesTapEvents; -@property(nonatomic, strong) FGMPlatformColor * color; -@property(nonatomic, assign) BOOL geodesic; -/// The joint type. -@property(nonatomic, assign) FGMPlatformJointType jointType; -/// The pattern data, as a list of pattern items. -@property(nonatomic, copy) NSArray * patterns; -@property(nonatomic, copy) NSArray * points; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger width; -@property(nonatomic, assign) NSInteger zIndex; -@end - -/// Pigeon equivalent of the PatternItem class. -@interface FGMPlatformPatternItem : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type - length:(nullable NSNumber *)length; -@property(nonatomic, assign) FGMPlatformPatternItemType type; -@property(nonatomic, strong, nullable) NSNumber * length; -@end - -/// Pigeon equivalent of the Tile class. -@interface FGMPlatformTile : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithWidth:(NSInteger )width - height:(NSInteger )height - data:(nullable FlutterStandardTypedData *)data; -@property(nonatomic, assign) NSInteger width; -@property(nonatomic, assign) NSInteger height; -@property(nonatomic, strong, nullable) FlutterStandardTypedData * data; -@end - -/// Pigeon equivalent of the TileOverlay class. -@interface FGMPlatformTileOverlay : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId - fadeIn:(BOOL )fadeIn - transparency:(double )transparency - zIndex:(NSInteger )zIndex - visible:(BOOL )visible - tileSize:(NSInteger )tileSize; -@property(nonatomic, copy) NSString * tileOverlayId; -@property(nonatomic, assign) BOOL fadeIn; -@property(nonatomic, assign) double transparency; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger tileSize; -@end - -/// Pigeon equivalent of Flutter's EdgeInsets. -@interface FGMPlatformEdgeInsets : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithTop:(double )top - bottom:(double )bottom - left:(double )left - right:(double )right; -@property(nonatomic, assign) double top; -@property(nonatomic, assign) double bottom; -@property(nonatomic, assign) double left; -@property(nonatomic, assign) double right; -@end - -/// Pigeon equivalent of LatLng. -@interface FGMPlatformLatLng : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithLatitude:(double )latitude - longitude:(double )longitude; -@property(nonatomic, assign) double latitude; -@property(nonatomic, assign) double longitude; -@end - -/// Pigeon equivalent of LatLngBounds. -@interface FGMPlatformLatLngBounds : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast - southwest:(FGMPlatformLatLng *)southwest; -@property(nonatomic, strong) FGMPlatformLatLng * northeast; -@property(nonatomic, strong) FGMPlatformLatLng * southwest; -@end - -/// 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]). -@interface FGMPlatformCameraTargetBounds : NSObject -+ (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds; -@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; -@end - -/// Pigeon equivalent of the GroundOverlay class. -@interface FGMPlatformGroundOverlay : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId - image:(FGMPlatformBitmap *)image - position:(nullable FGMPlatformLatLng *)position - bounds:(nullable FGMPlatformLatLngBounds *)bounds - anchor:(nullable FGMPlatformPoint *)anchor - transparency:(double )transparency - bearing:(double )bearing - zIndex:(NSInteger )zIndex - visible:(BOOL )visible - clickable:(BOOL )clickable - zoomLevel:(nullable NSNumber *)zoomLevel; -@property(nonatomic, copy) NSString * groundOverlayId; -@property(nonatomic, strong) FGMPlatformBitmap * image; -@property(nonatomic, strong, nullable) FGMPlatformLatLng * position; -@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; -@property(nonatomic, strong, nullable) FGMPlatformPoint * anchor; -@property(nonatomic, assign) double transparency; -@property(nonatomic, assign) double bearing; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) BOOL clickable; -@property(nonatomic, strong, nullable) NSNumber * zoomLevel; -@end - -/// Information passed to the platform view creation. -@interface FGMPlatformMapViewCreationParams : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition - mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration - initialCircles:(NSArray *)initialCircles - initialMarkers:(NSArray *)initialMarkers - initialPolygons:(NSArray *)initialPolygons - initialPolylines:(NSArray *)initialPolylines - initialHeatmaps:(NSArray *)initialHeatmaps - initialTileOverlays:(NSArray *)initialTileOverlays - initialClusterManagers:(NSArray *)initialClusterManagers - initialGroundOverlays:(NSArray *)initialGroundOverlays; -@property(nonatomic, strong) FGMPlatformCameraPosition * initialCameraPosition; -@property(nonatomic, strong) FGMPlatformMapConfiguration * mapConfiguration; -@property(nonatomic, copy) NSArray * initialCircles; -@property(nonatomic, copy) NSArray * initialMarkers; -@property(nonatomic, copy) NSArray * initialPolygons; -@property(nonatomic, copy) NSArray * initialPolylines; -@property(nonatomic, copy) NSArray * initialHeatmaps; -@property(nonatomic, copy) NSArray * initialTileOverlays; -@property(nonatomic, copy) NSArray * initialClusterManagers; -@property(nonatomic, copy) NSArray * initialGroundOverlays; -@end - -/// Pigeon equivalent of MapConfiguration. -@interface FGMPlatformMapConfiguration : NSObject -+ (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style; -@property(nonatomic, strong, nullable) NSNumber * compassEnabled; -@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds * cameraTargetBounds; -@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox * mapType; -@property(nonatomic, strong, nullable) FGMPlatformZoomRange * minMaxZoomPreference; -@property(nonatomic, strong, nullable) NSNumber * rotateGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber * scrollGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber * tiltGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber * trackCameraPosition; -@property(nonatomic, strong, nullable) NSNumber * zoomGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber * myLocationEnabled; -@property(nonatomic, strong, nullable) NSNumber * myLocationButtonEnabled; -@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets * padding; -@property(nonatomic, strong, nullable) NSNumber * indoorViewEnabled; -@property(nonatomic, strong, nullable) NSNumber * trafficEnabled; -@property(nonatomic, strong, nullable) NSNumber * buildingsEnabled; -@property(nonatomic, copy, nullable) NSString * mapId; -@property(nonatomic, copy, nullable) NSString * style; -@end - -/// Pigeon representation of an x,y coordinate. -@interface FGMPlatformPoint : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithX:(double )x - y:(double )y; -@property(nonatomic, assign) double x; -@property(nonatomic, assign) double y; -@end - -/// Pigeon representation of a size. -@interface FGMPlatformSize : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithWidth:(double )width - height:(double )height; -@property(nonatomic, assign) double width; -@property(nonatomic, assign) double height; -@end - -/// Pigeon representation of a color. -@interface FGMPlatformColor : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithRed:(double )red - green:(double )green - blue:(double )blue - alpha:(double )alpha; -@property(nonatomic, assign) double red; -@property(nonatomic, assign) double green; -@property(nonatomic, assign) double blue; -@property(nonatomic, assign) double alpha; -@end - -/// Pigeon equivalent of GMSTileLayer properties. -@interface FGMPlatformTileLayer : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithVisible:(BOOL )visible - fadeIn:(BOOL )fadeIn - opacity:(double )opacity - zIndex:(NSInteger )zIndex; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) BOOL fadeIn; -@property(nonatomic, assign) double opacity; -@property(nonatomic, assign) NSInteger zIndex; -@end - -/// Pigeon equivalent of MinMaxZoomPreference. -@interface FGMPlatformZoomRange : NSObject -+ (instancetype)makeWithMin:(nullable NSNumber *)min - max:(nullable NSNumber *)max; -@property(nonatomic, strong, nullable) NSNumber * min; -@property(nonatomic, strong, nullable) NSNumber * max; -@end - -/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint -/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which -/// may hold the pigeon equivalent type of any of them. -@interface FGMPlatformBitmap : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithBitmap:(id )bitmap; -/// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], -/// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], -/// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. -/// As Pigeon does not currently support data class inheritance, this -/// approach allows for the different bitmap implementations to be valid -/// argument and return types of the API methods. See -/// https://github.com/flutter/flutter/issues/117819. -@property(nonatomic, strong) id bitmap; -@end - -/// Pigeon equivalent of [DefaultMarker]. -@interface FGMPlatformBitmapDefaultMarker : NSObject -+ (instancetype)makeWithHue:(nullable NSNumber *)hue; -@property(nonatomic, strong, nullable) NSNumber * hue; -@end - -/// Pigeon equivalent of [BytesBitmap]. -@interface FGMPlatformBitmapBytes : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - size:(nullable FGMPlatformSize *)size; -@property(nonatomic, strong) FlutterStandardTypedData * byteData; -@property(nonatomic, strong, nullable) FGMPlatformSize * size; -@end - -/// Pigeon equivalent of [AssetBitmap]. -@interface FGMPlatformBitmapAsset : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithName:(NSString *)name - pkg:(nullable NSString *)pkg; -@property(nonatomic, copy) NSString * name; -@property(nonatomic, copy, nullable) NSString * pkg; -@end - -/// Pigeon equivalent of [AssetImageBitmap]. -@interface FGMPlatformBitmapAssetImage : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithName:(NSString *)name - scale:(double )scale - size:(nullable FGMPlatformSize *)size; -@property(nonatomic, copy) NSString * name; -@property(nonatomic, assign) double scale; -@property(nonatomic, strong, nullable) FGMPlatformSize * size; -@end - -/// Pigeon equivalent of [AssetMapBitmap]. -@interface FGMPlatformBitmapAssetMap : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAssetName:(NSString *)assetName - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double )imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height; -@property(nonatomic, copy) NSString * assetName; -@property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; -@property(nonatomic, assign) double imagePixelRatio; -@property(nonatomic, strong, nullable) NSNumber * width; -@property(nonatomic, strong, nullable) NSNumber * height; -@end - -/// Pigeon equivalent of [BytesMapBitmap]. -@interface FGMPlatformBitmapBytesMap : NSObject -/// `init` unavailable to enforce nonnull fields, see the `make` class method. -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double )imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height; -@property(nonatomic, strong) FlutterStandardTypedData * byteData; -@property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; -@property(nonatomic, assign) double imagePixelRatio; -@property(nonatomic, strong, nullable) NSNumber * width; -@property(nonatomic, strong, nullable) NSNumber * height; -@end - -/// The codec used by all APIs. -NSObject *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void); - -/// Interface for non-test interactions with the native SDK. -/// -/// For test-only state queries, see [MapsInspectorApi]. -@protocol FGMMapsApi -/// Returns once the map instance is available. -- (void)waitForMapWithError:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the map's configuration options. -/// -/// Only non-null configuration values will result in updates; options with -/// null values will remain unchanged. -- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration error:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the set of circles on the map. -- (void)updateCirclesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the set of heatmaps on the map. -- (void)updateHeatmapsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the set of custer managers for clusters on the map. -- (void)updateClusterManagersByAdding:(NSArray *)toAdd removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the set of markers on the map. -- (void)updateMarkersByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the set of polygonss on the map. -- (void)updatePolygonsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the set of polylines on the map. -- (void)updatePolylinesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the set of tile overlays on the map. -- (void)updateTileOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -/// Updates the set of ground overlays on the map. -- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -/// Gets the screen coordinate for the given map location. -/// -/// @return `nil` only when `error != nil`. -- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng error:(FlutterError *_Nullable *_Nonnull)error; -/// Gets the map location for the given screen coordinate. -/// -/// @return `nil` only when `error != nil`. -- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate error:(FlutterError *_Nullable *_Nonnull)error; -/// Gets the map region currently displayed on the map. -/// -/// @return `nil` only when `error != nil`. -- (nullable FGMPlatformLatLngBounds *)visibleMapRegion:(FlutterError *_Nullable *_Nonnull)error; -/// Moves the camera according to [cameraUpdate] immediately, with no -/// animation. -- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate error:(FlutterError *_Nullable *_Nonnull)error; -/// Moves the camera according to [cameraUpdate], animating the update using a -/// duration in milliseconds if provided. -- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate duration:(nullable NSNumber *)durationMilliseconds error:(FlutterError *_Nullable *_Nonnull)error; -/// Gets the current map zoom level. -/// -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)currentZoomLevel:(FlutterError *_Nullable *_Nonnull)error; -/// Show the info window for the marker with the given ID. -- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; -/// Hide the info window for the marker with the given ID. -- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; -/// Returns true if the marker with the given ID is currently displaying its -/// info window. -/// -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; -/// Sets the style to the given map style string, where an empty string -/// indicates that the style should be cleared. -/// -/// If there was an error setting the style, such as an invalid style string, -/// returns the error message. -- (nullable NSString *)setStyle:(NSString *)style error:(FlutterError *_Nullable *_Nonnull)error; -/// Returns the error string from the last attempt to set the map style, if -/// any. -/// -/// This allows checking asynchronously for initial style failures, as there -/// is no way to return failures from map initialization. -- (nullable NSString *)lastStyleError:(FlutterError *_Nullable *_Nonnull)error; -/// Clears the cache of tiles previously requseted from the tile provider. -- (void)clearTileCacheForOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; -/// Takes a snapshot of the map and returns its image data. -- (nullable FlutterStandardTypedData *)takeSnapshotWithError:(FlutterError *_Nullable *_Nonnull)error; -@end - -extern void SetUpFGMMapsApi(id binaryMessenger, NSObject *_Nullable api); - -extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); - - -/// Interface for calls from the native SDK to Dart. -@interface FGMMapsCallbackApi : NSObject -- (instancetype)initWithBinaryMessenger:(id)binaryMessenger; -- (instancetype)initWithBinaryMessenger:(id)binaryMessenger messageChannelSuffix:(nullable NSString *)messageChannelSuffix; -/// Called when the map camera starts moving. -- (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion; -/// Called when the map camera moves. -- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when the map camera stops moving. -- (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion; -/// Called when the map, not a specifc map object, is tapped. -- (void)didTapAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when the map, not a specifc map object, is long pressed. -- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a marker is tapped. -- (void)didTapMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a marker drag starts. -- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a marker drag updates. -- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a marker drag ends. -- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a marker's info window is tapped. -- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a circle is tapped. -- (void)didTapCircleWithIdentifier:(NSString *)circleId completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a marker cluster is tapped. -- (void)didTapCluster:(FGMPlatformCluster *)cluster completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a polygon is tapped. -- (void)didTapPolygonWithIdentifier:(NSString *)polygonId completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a polyline is tapped. -- (void)didTapPolylineWithIdentifier:(NSString *)polylineId completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a ground overlay is tapped. -- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion; -/// Called when a point of interest is tapped. -- (void)didTapPointOfInterest:(FGMPlatformPointOfInterest *)poi completion:(void (^)(FlutterError *_Nullable))completion; -/// Called to get data for a map tile. -- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId location:(FGMPlatformPoint *)location zoom:(NSInteger)zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion; -@end - - -/// Dummy interface to force generation of the platform view creation params, -/// which are not used in any Pigeon calls, only the platform view creation -/// call made internally by Flutter. -@protocol FGMMapsPlatformViewApi -- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type error:(FlutterError *_Nullable *_Nonnull)error; -@end - -extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, NSObject *_Nullable api); - -extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); - - -/// Inspector API only intended for use in integration tests. -@protocol FGMMapsInspectorApi -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)areBuildingsEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)areRotateGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)areScrollGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)areTiltGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)areZoomGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)isCompassEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)isMyLocationButtonEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable NSNumber *)isTrafficEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformGroundOverlay *)groundOverlayWithIdentifier:(NSString *)groundOverlayId error:(FlutterError *_Nullable *_Nonnull)error; -- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId error:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable FGMPlatformZoomRange *)zoomRange:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable NSArray *)clustersWithIdentifier:(NSString *)clusterManagerId error:(FlutterError *_Nullable *_Nonnull)error; -/// @return `nil` only when `error != nil`. -- (nullable FGMPlatformCameraPosition *)cameraPosition:(FlutterError *_Nullable *_Nonnull)error; -@end - -extern void SetUpFGMMapsInspectorApi(id binaryMessenger, NSObject *_Nullable api); - -extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); - -NS_ASSUME_NONNULL_END diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.rej b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.rej deleted file mode 100644 index 2abdb3ac441a..000000000000 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h.rej +++ /dev/null @@ -1,807 +0,0 @@ ---- packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h -+++ packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h -@@ -114,26 +114,26 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - @interface FGMPlatformCameraPosition : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithBearing:(double )bearing -- target:(FGMPlatformLatLng *)target -- tilt:(double )tilt -- zoom:(double )zoom; --@property(nonatomic, assign) double bearing; --@property(nonatomic, strong) FGMPlatformLatLng * target; --@property(nonatomic, assign) double tilt; --@property(nonatomic, assign) double zoom; -++ (instancetype)makeWithBearing:(double)bearing -+ target:(FGMPlatformLatLng *)target -+ tilt:(double)tilt -+ zoom:(double)zoom; -+@property(nonatomic, assign) double bearing; -+@property(nonatomic, strong) FGMPlatformLatLng *target; -+@property(nonatomic, assign) double tilt; -+@property(nonatomic, assign) double zoom; - @end - - /// Pigeon representation of a CameraUpdate. - @interface FGMPlatformCameraUpdate : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithCameraUpdate:(id )cameraUpdate; -++ (instancetype)makeWithCameraUpdate:(id)cameraUpdate; - /// This Object must be one of the classes below prefixed with - /// PlatformCameraUpdate. Each such class represents a different type of - /// camera update, and each holds a different set of data, preventing the - /// use of a single unified class. --@property(nonatomic, strong) id cameraUpdate; -+@property(nonatomic, strong) id cameraUpdate; - @end - - /// Pigeon equivalent of NewCameraPosition -@@ -149,87 +149,83 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; - + (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng; --@property(nonatomic, strong) FGMPlatformLatLng * latLng; -+@property(nonatomic, strong) FGMPlatformLatLng *latLng; - @end - - /// Pigeon equivalent of NewLatLngBounds - @interface FGMPlatformCameraUpdateNewLatLngBounds : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds -- padding:(double )padding; --@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; --@property(nonatomic, assign) double padding; -++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding; -+@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds; -+@property(nonatomic, assign) double padding; - @end - - /// Pigeon equivalent of NewLatLngZoom - @interface FGMPlatformCameraUpdateNewLatLngZoom : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng -- zoom:(double )zoom; --@property(nonatomic, strong) FGMPlatformLatLng * latLng; --@property(nonatomic, assign) double zoom; -++ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom; -+@property(nonatomic, strong) FGMPlatformLatLng *latLng; -+@property(nonatomic, assign) double zoom; - @end - - /// Pigeon equivalent of ScrollBy - @interface FGMPlatformCameraUpdateScrollBy : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithDx:(double )dx -- dy:(double )dy; --@property(nonatomic, assign) double dx; --@property(nonatomic, assign) double dy; -++ (instancetype)makeWithDx:(double)dx dy:(double)dy; -+@property(nonatomic, assign) double dx; -+@property(nonatomic, assign) double dy; - @end - - /// Pigeon equivalent of ZoomBy - @interface FGMPlatformCameraUpdateZoomBy : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithAmount:(double )amount -- focus:(nullable FGMPlatformPoint *)focus; --@property(nonatomic, assign) double amount; --@property(nonatomic, strong, nullable) FGMPlatformPoint * focus; -++ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus; -+@property(nonatomic, assign) double amount; -+@property(nonatomic, strong, nullable) FGMPlatformPoint *focus; - @end - - /// Pigeon equivalent of ZoomIn/ZoomOut - @interface FGMPlatformCameraUpdateZoom : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithOut:(BOOL )out; --@property(nonatomic, assign) BOOL out; -++ (instancetype)makeWithOut:(BOOL)out; -+@property(nonatomic, assign) BOOL out; - @end - - /// Pigeon equivalent of ZoomTo - @interface FGMPlatformCameraUpdateZoomTo : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithZoom:(double )zoom; --@property(nonatomic, assign) double zoom; -++ (instancetype)makeWithZoom:(double)zoom; -+@property(nonatomic, assign) double zoom; - @end - - /// Pigeon equivalent of the Circle class. - @interface FGMPlatformCircle : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithConsumeTapEvents:(BOOL )consumeTapEvents -- fillColor:(FGMPlatformColor *)fillColor -- strokeColor:(FGMPlatformColor *)strokeColor -- visible:(BOOL )visible -- strokeWidth:(NSInteger )strokeWidth -- zIndex:(double )zIndex -- center:(FGMPlatformLatLng *)center -- radius:(double )radius -- circleId:(NSString *)circleId; --@property(nonatomic, assign) BOOL consumeTapEvents; --@property(nonatomic, strong) FGMPlatformColor * fillColor; --@property(nonatomic, strong) FGMPlatformColor * strokeColor; --@property(nonatomic, assign) BOOL visible; --@property(nonatomic, assign) NSInteger strokeWidth; --@property(nonatomic, assign) double zIndex; --@property(nonatomic, strong) FGMPlatformLatLng * center; --@property(nonatomic, assign) double radius; --@property(nonatomic, copy) NSString * circleId; -++ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents -+ fillColor:(FGMPlatformColor *)fillColor -+ strokeColor:(FGMPlatformColor *)strokeColor -+ visible:(BOOL)visible -+ strokeWidth:(NSInteger)strokeWidth -+ zIndex:(double)zIndex -+ center:(FGMPlatformLatLng *)center -+ radius:(double)radius -+ circleId:(NSString *)circleId; -+@property(nonatomic, assign) BOOL consumeTapEvents; -+@property(nonatomic, strong) FGMPlatformColor *fillColor; -+@property(nonatomic, strong) FGMPlatformColor *strokeColor; -+@property(nonatomic, assign) BOOL visible; -+@property(nonatomic, assign) NSInteger strokeWidth; -+@property(nonatomic, assign) double zIndex; -+@property(nonatomic, strong) FGMPlatformLatLng *center; -+@property(nonatomic, assign) double radius; -+@property(nonatomic, copy) NSString *circleId; - @end - - /// Pigeon equivalent of the Heatmap class. -@@ -261,21 +257,20 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; - + (instancetype)makeWithColors:(NSArray *)colors -- startPoints:(NSArray *)startPoints -- colorMapSize:(NSInteger )colorMapSize; --@property(nonatomic, copy) NSArray * colors; --@property(nonatomic, copy) NSArray * startPoints; --@property(nonatomic, assign) NSInteger colorMapSize; -+ startPoints:(NSArray *)startPoints -+ colorMapSize:(NSInteger)colorMapSize; -+@property(nonatomic, copy) NSArray *colors; -+@property(nonatomic, copy) NSArray *startPoints; -+@property(nonatomic, assign) NSInteger colorMapSize; - @end - - /// Pigeon equivalent of the WeightedLatLng class. - @interface FGMPlatformWeightedLatLng : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point -- weight:(double )weight; --@property(nonatomic, strong) FGMPlatformLatLng * point; --@property(nonatomic, assign) double weight; -++ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point weight:(double)weight; -+@property(nonatomic, strong) FGMPlatformLatLng *point; -+@property(nonatomic, assign) double weight; - @end - - /// Pigeon equivalent of the InfoWindow class. -@@ -309,39 +304,39 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; - + (instancetype)makeWithIdentifier:(NSString *)identifier; --@property(nonatomic, copy) NSString * identifier; -+@property(nonatomic, copy) NSString *identifier; - @end - - /// Pigeon equivalent of the Marker class. - @interface FGMPlatformMarker : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithAlpha:(double )alpha -- anchor:(FGMPlatformPoint *)anchor -- consumeTapEvents:(BOOL )consumeTapEvents -- draggable:(BOOL )draggable -- flat:(BOOL )flat -- icon:(FGMPlatformBitmap *)icon -- infoWindow:(FGMPlatformInfoWindow *)infoWindow -- position:(FGMPlatformLatLng *)position -- rotation:(double )rotation -- visible:(BOOL )visible -- zIndex:(NSInteger )zIndex -- markerId:(NSString *)markerId -- clusterManagerId:(nullable NSString *)clusterManagerId; --@property(nonatomic, assign) double alpha; --@property(nonatomic, strong) FGMPlatformPoint * anchor; --@property(nonatomic, assign) BOOL consumeTapEvents; --@property(nonatomic, assign) BOOL draggable; --@property(nonatomic, assign) BOOL flat; --@property(nonatomic, strong) FGMPlatformBitmap * icon; --@property(nonatomic, strong) FGMPlatformInfoWindow * infoWindow; --@property(nonatomic, strong) FGMPlatformLatLng * position; --@property(nonatomic, assign) double rotation; --@property(nonatomic, assign) BOOL visible; --@property(nonatomic, assign) NSInteger zIndex; --@property(nonatomic, copy) NSString * markerId; --@property(nonatomic, copy, nullable) NSString * clusterManagerId; -++ (instancetype)makeWithAlpha:(double)alpha -+ anchor:(FGMPlatformPoint *)anchor -+ consumeTapEvents:(BOOL)consumeTapEvents -+ draggable:(BOOL)draggable -+ flat:(BOOL)flat -+ icon:(FGMPlatformBitmap *)icon -+ infoWindow:(FGMPlatformInfoWindow *)infoWindow -+ position:(FGMPlatformLatLng *)position -+ rotation:(double)rotation -+ visible:(BOOL)visible -+ zIndex:(NSInteger)zIndex -+ markerId:(NSString *)markerId -+ clusterManagerId:(nullable NSString *)clusterManagerId; -+@property(nonatomic, assign) double alpha; -+@property(nonatomic, strong) FGMPlatformPoint *anchor; -+@property(nonatomic, assign) BOOL consumeTapEvents; -+@property(nonatomic, assign) BOOL draggable; -+@property(nonatomic, assign) BOOL flat; -+@property(nonatomic, strong) FGMPlatformBitmap *icon; -+@property(nonatomic, strong) FGMPlatformInfoWindow *infoWindow; -+@property(nonatomic, strong) FGMPlatformLatLng *position; -+@property(nonatomic, assign) double rotation; -+@property(nonatomic, assign) BOOL visible; -+@property(nonatomic, assign) NSInteger zIndex; -+@property(nonatomic, copy) NSString *markerId; -+@property(nonatomic, copy, nullable) NSString *clusterManagerId; - @end - - /// Pigeon equivalent of the Point of Interest class. -@@ -387,49 +382,48 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; - + (instancetype)makeWithPolylineId:(NSString *)polylineId -- consumesTapEvents:(BOOL )consumesTapEvents -- color:(FGMPlatformColor *)color -- geodesic:(BOOL )geodesic -- jointType:(FGMPlatformJointType)jointType -- patterns:(NSArray *)patterns -- points:(NSArray *)points -- visible:(BOOL )visible -- width:(NSInteger )width -- zIndex:(NSInteger )zIndex; --@property(nonatomic, copy) NSString * polylineId; --@property(nonatomic, assign) BOOL consumesTapEvents; --@property(nonatomic, strong) FGMPlatformColor * color; --@property(nonatomic, assign) BOOL geodesic; -+ consumesTapEvents:(BOOL)consumesTapEvents -+ color:(FGMPlatformColor *)color -+ geodesic:(BOOL)geodesic -+ jointType:(FGMPlatformJointType)jointType -+ patterns:(NSArray *)patterns -+ points:(NSArray *)points -+ visible:(BOOL)visible -+ width:(NSInteger)width -+ zIndex:(NSInteger)zIndex; -+@property(nonatomic, copy) NSString *polylineId; -+@property(nonatomic, assign) BOOL consumesTapEvents; -+@property(nonatomic, strong) FGMPlatformColor *color; -+@property(nonatomic, assign) BOOL geodesic; - /// The joint type. - @property(nonatomic, assign) FGMPlatformJointType jointType; - /// The pattern data, as a list of pattern items. --@property(nonatomic, copy) NSArray * patterns; --@property(nonatomic, copy) NSArray * points; --@property(nonatomic, assign) BOOL visible; --@property(nonatomic, assign) NSInteger width; --@property(nonatomic, assign) NSInteger zIndex; -+@property(nonatomic, copy) NSArray *patterns; -+@property(nonatomic, copy) NSArray *points; -+@property(nonatomic, assign) BOOL visible; -+@property(nonatomic, assign) NSInteger width; -+@property(nonatomic, assign) NSInteger zIndex; - @end - - /// Pigeon equivalent of the PatternItem class. - @interface FGMPlatformPatternItem : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type -- length:(nullable NSNumber *)length; -++ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length; - @property(nonatomic, assign) FGMPlatformPatternItemType type; --@property(nonatomic, strong, nullable) NSNumber * length; -+@property(nonatomic, strong, nullable) NSNumber *length; - @end - - /// Pigeon equivalent of the Tile class. - @interface FGMPlatformTile : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithWidth:(NSInteger )width -- height:(NSInteger )height -- data:(nullable FlutterStandardTypedData *)data; --@property(nonatomic, assign) NSInteger width; --@property(nonatomic, assign) NSInteger height; --@property(nonatomic, strong, nullable) FlutterStandardTypedData * data; -++ (instancetype)makeWithWidth:(NSInteger)width -+ height:(NSInteger)height -+ data:(nullable FlutterStandardTypedData *)data; -+@property(nonatomic, assign) NSInteger width; -+@property(nonatomic, assign) NSInteger height; -+@property(nonatomic, strong, nullable) FlutterStandardTypedData *data; - @end - - /// Pigeon equivalent of the TileOverlay class. -@@ -437,41 +431,37 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; - + (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId -- fadeIn:(BOOL )fadeIn -- transparency:(double )transparency -- zIndex:(NSInteger )zIndex -- visible:(BOOL )visible -- tileSize:(NSInteger )tileSize; --@property(nonatomic, copy) NSString * tileOverlayId; --@property(nonatomic, assign) BOOL fadeIn; --@property(nonatomic, assign) double transparency; --@property(nonatomic, assign) NSInteger zIndex; --@property(nonatomic, assign) BOOL visible; --@property(nonatomic, assign) NSInteger tileSize; -+ fadeIn:(BOOL)fadeIn -+ transparency:(double)transparency -+ zIndex:(NSInteger)zIndex -+ visible:(BOOL)visible -+ tileSize:(NSInteger)tileSize; -+@property(nonatomic, copy) NSString *tileOverlayId; -+@property(nonatomic, assign) BOOL fadeIn; -+@property(nonatomic, assign) double transparency; -+@property(nonatomic, assign) NSInteger zIndex; -+@property(nonatomic, assign) BOOL visible; -+@property(nonatomic, assign) NSInteger tileSize; - @end - - /// Pigeon equivalent of Flutter's EdgeInsets. - @interface FGMPlatformEdgeInsets : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithTop:(double )top -- bottom:(double )bottom -- left:(double )left -- right:(double )right; --@property(nonatomic, assign) double top; --@property(nonatomic, assign) double bottom; --@property(nonatomic, assign) double left; --@property(nonatomic, assign) double right; -++ (instancetype)makeWithTop:(double)top bottom:(double)bottom left:(double)left right:(double)right; -+@property(nonatomic, assign) double top; -+@property(nonatomic, assign) double bottom; -+@property(nonatomic, assign) double left; -+@property(nonatomic, assign) double right; - @end - - /// Pigeon equivalent of LatLng. - @interface FGMPlatformLatLng : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithLatitude:(double )latitude -- longitude:(double )longitude; --@property(nonatomic, assign) double latitude; --@property(nonatomic, assign) double longitude; -++ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude; -+@property(nonatomic, assign) double latitude; -+@property(nonatomic, assign) double longitude; - @end - - /// Pigeon equivalent of LatLngBounds. -@@ -498,147 +488,142 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; - + (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId -- image:(FGMPlatformBitmap *)image -- position:(nullable FGMPlatformLatLng *)position -- bounds:(nullable FGMPlatformLatLngBounds *)bounds -- anchor:(nullable FGMPlatformPoint *)anchor -- transparency:(double )transparency -- bearing:(double )bearing -- zIndex:(NSInteger )zIndex -- visible:(BOOL )visible -- clickable:(BOOL )clickable -- zoomLevel:(nullable NSNumber *)zoomLevel; --@property(nonatomic, copy) NSString * groundOverlayId; --@property(nonatomic, strong) FGMPlatformBitmap * image; --@property(nonatomic, strong, nullable) FGMPlatformLatLng * position; --@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds * bounds; --@property(nonatomic, strong, nullable) FGMPlatformPoint * anchor; --@property(nonatomic, assign) double transparency; --@property(nonatomic, assign) double bearing; --@property(nonatomic, assign) NSInteger zIndex; --@property(nonatomic, assign) BOOL visible; --@property(nonatomic, assign) BOOL clickable; --@property(nonatomic, strong, nullable) NSNumber * zoomLevel; -+ image:(FGMPlatformBitmap *)image -+ position:(nullable FGMPlatformLatLng *)position -+ bounds:(nullable FGMPlatformLatLngBounds *)bounds -+ anchor:(nullable FGMPlatformPoint *)anchor -+ transparency:(double)transparency -+ bearing:(double)bearing -+ zIndex:(NSInteger)zIndex -+ visible:(BOOL)visible -+ clickable:(BOOL)clickable -+ zoomLevel:(nullable NSNumber *)zoomLevel; -+@property(nonatomic, copy) NSString *groundOverlayId; -+@property(nonatomic, strong) FGMPlatformBitmap *image; -+@property(nonatomic, strong, nullable) FGMPlatformLatLng *position; -+@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds; -+@property(nonatomic, strong, nullable) FGMPlatformPoint *anchor; -+@property(nonatomic, assign) double transparency; -+@property(nonatomic, assign) double bearing; -+@property(nonatomic, assign) NSInteger zIndex; -+@property(nonatomic, assign) BOOL visible; -+@property(nonatomic, assign) BOOL clickable; -+@property(nonatomic, strong, nullable) NSNumber *zoomLevel; - @end - - /// Information passed to the platform view creation. - @interface FGMPlatformMapViewCreationParams : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition -- mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration -- initialCircles:(NSArray *)initialCircles -- initialMarkers:(NSArray *)initialMarkers -- initialPolygons:(NSArray *)initialPolygons -- initialPolylines:(NSArray *)initialPolylines -- initialHeatmaps:(NSArray *)initialHeatmaps -- initialTileOverlays:(NSArray *)initialTileOverlays -- initialClusterManagers:(NSArray *)initialClusterManagers -- initialGroundOverlays:(NSArray *)initialGroundOverlays; --@property(nonatomic, strong) FGMPlatformCameraPosition * initialCameraPosition; --@property(nonatomic, strong) FGMPlatformMapConfiguration * mapConfiguration; --@property(nonatomic, copy) NSArray * initialCircles; --@property(nonatomic, copy) NSArray * initialMarkers; --@property(nonatomic, copy) NSArray * initialPolygons; --@property(nonatomic, copy) NSArray * initialPolylines; --@property(nonatomic, copy) NSArray * initialHeatmaps; --@property(nonatomic, copy) NSArray * initialTileOverlays; --@property(nonatomic, copy) NSArray * initialClusterManagers; --@property(nonatomic, copy) NSArray * initialGroundOverlays; -++ (instancetype) -+ makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition -+ mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration -+ initialCircles:(NSArray *)initialCircles -+ initialMarkers:(NSArray *)initialMarkers -+ initialPolygons:(NSArray *)initialPolygons -+ initialPolylines:(NSArray *)initialPolylines -+ initialHeatmaps:(NSArray *)initialHeatmaps -+ initialTileOverlays:(NSArray *)initialTileOverlays -+ initialClusterManagers:(NSArray *)initialClusterManagers -+ initialGroundOverlays:(NSArray *)initialGroundOverlays; -+@property(nonatomic, strong) FGMPlatformCameraPosition *initialCameraPosition; -+@property(nonatomic, strong) FGMPlatformMapConfiguration *mapConfiguration; -+@property(nonatomic, copy) NSArray *initialCircles; -+@property(nonatomic, copy) NSArray *initialMarkers; -+@property(nonatomic, copy) NSArray *initialPolygons; -+@property(nonatomic, copy) NSArray *initialPolylines; -+@property(nonatomic, copy) NSArray *initialHeatmaps; -+@property(nonatomic, copy) NSArray *initialTileOverlays; -+@property(nonatomic, copy) NSArray *initialClusterManagers; -+@property(nonatomic, copy) NSArray *initialGroundOverlays; - @end - - /// Pigeon equivalent of MapConfiguration. - @interface FGMPlatformMapConfiguration : NSObject - + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled -- cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds -- mapType:(nullable FGMPlatformMapTypeBox *)mapType -- minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference -- rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled -- scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled -- tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled -- trackCameraPosition:(nullable NSNumber *)trackCameraPosition -- zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled -- myLocationEnabled:(nullable NSNumber *)myLocationEnabled -- myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled -- padding:(nullable FGMPlatformEdgeInsets *)padding -- indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled -- trafficEnabled:(nullable NSNumber *)trafficEnabled -- buildingsEnabled:(nullable NSNumber *)buildingsEnabled -- mapId:(nullable NSString *)mapId -- style:(nullable NSString *)style; --@property(nonatomic, strong, nullable) NSNumber * compassEnabled; --@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds * cameraTargetBounds; --@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox * mapType; --@property(nonatomic, strong, nullable) FGMPlatformZoomRange * minMaxZoomPreference; --@property(nonatomic, strong, nullable) NSNumber * rotateGesturesEnabled; --@property(nonatomic, strong, nullable) NSNumber * scrollGesturesEnabled; --@property(nonatomic, strong, nullable) NSNumber * tiltGesturesEnabled; --@property(nonatomic, strong, nullable) NSNumber * trackCameraPosition; --@property(nonatomic, strong, nullable) NSNumber * zoomGesturesEnabled; --@property(nonatomic, strong, nullable) NSNumber * myLocationEnabled; --@property(nonatomic, strong, nullable) NSNumber * myLocationButtonEnabled; --@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets * padding; --@property(nonatomic, strong, nullable) NSNumber * indoorViewEnabled; --@property(nonatomic, strong, nullable) NSNumber * trafficEnabled; --@property(nonatomic, strong, nullable) NSNumber * buildingsEnabled; --@property(nonatomic, copy, nullable) NSString * mapId; --@property(nonatomic, copy, nullable) NSString * style; -+ cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds -+ mapType:(nullable FGMPlatformMapTypeBox *)mapType -+ minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference -+ rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled -+ scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled -+ tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled -+ trackCameraPosition:(nullable NSNumber *)trackCameraPosition -+ zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled -+ myLocationEnabled:(nullable NSNumber *)myLocationEnabled -+ myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled -+ padding:(nullable FGMPlatformEdgeInsets *)padding -+ indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled -+ trafficEnabled:(nullable NSNumber *)trafficEnabled -+ buildingsEnabled:(nullable NSNumber *)buildingsEnabled -+ mapId:(nullable NSString *)mapId -+ style:(nullable NSString *)style; -+@property(nonatomic, strong, nullable) NSNumber *compassEnabled; -+@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds *cameraTargetBounds; -+@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox *mapType; -+@property(nonatomic, strong, nullable) FGMPlatformZoomRange *minMaxZoomPreference; -+@property(nonatomic, strong, nullable) NSNumber *rotateGesturesEnabled; -+@property(nonatomic, strong, nullable) NSNumber *scrollGesturesEnabled; -+@property(nonatomic, strong, nullable) NSNumber *tiltGesturesEnabled; -+@property(nonatomic, strong, nullable) NSNumber *trackCameraPosition; -+@property(nonatomic, strong, nullable) NSNumber *zoomGesturesEnabled; -+@property(nonatomic, strong, nullable) NSNumber *myLocationEnabled; -+@property(nonatomic, strong, nullable) NSNumber *myLocationButtonEnabled; -+@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets *padding; -+@property(nonatomic, strong, nullable) NSNumber *indoorViewEnabled; -+@property(nonatomic, strong, nullable) NSNumber *trafficEnabled; -+@property(nonatomic, strong, nullable) NSNumber *buildingsEnabled; -+@property(nonatomic, copy, nullable) NSString *mapId; -+@property(nonatomic, copy, nullable) NSString *style; - @end - - /// Pigeon representation of an x,y coordinate. - @interface FGMPlatformPoint : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithX:(double )x -- y:(double )y; --@property(nonatomic, assign) double x; --@property(nonatomic, assign) double y; -++ (instancetype)makeWithX:(double)x y:(double)y; -+@property(nonatomic, assign) double x; -+@property(nonatomic, assign) double y; - @end - - /// Pigeon representation of a size. - @interface FGMPlatformSize : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithWidth:(double )width -- height:(double )height; --@property(nonatomic, assign) double width; --@property(nonatomic, assign) double height; -++ (instancetype)makeWithWidth:(double)width height:(double)height; -+@property(nonatomic, assign) double width; -+@property(nonatomic, assign) double height; - @end - - /// Pigeon representation of a color. - @interface FGMPlatformColor : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithRed:(double )red -- green:(double )green -- blue:(double )blue -- alpha:(double )alpha; --@property(nonatomic, assign) double red; --@property(nonatomic, assign) double green; --@property(nonatomic, assign) double blue; --@property(nonatomic, assign) double alpha; -++ (instancetype)makeWithRed:(double)red green:(double)green blue:(double)blue alpha:(double)alpha; -+@property(nonatomic, assign) double red; -+@property(nonatomic, assign) double green; -+@property(nonatomic, assign) double blue; -+@property(nonatomic, assign) double alpha; - @end - - /// Pigeon equivalent of GMSTileLayer properties. - @interface FGMPlatformTileLayer : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithVisible:(BOOL )visible -- fadeIn:(BOOL )fadeIn -- opacity:(double )opacity -- zIndex:(NSInteger )zIndex; --@property(nonatomic, assign) BOOL visible; --@property(nonatomic, assign) BOOL fadeIn; --@property(nonatomic, assign) double opacity; --@property(nonatomic, assign) NSInteger zIndex; -++ (instancetype)makeWithVisible:(BOOL)visible -+ fadeIn:(BOOL)fadeIn -+ opacity:(double)opacity -+ zIndex:(NSInteger)zIndex; -+@property(nonatomic, assign) BOOL visible; -+@property(nonatomic, assign) BOOL fadeIn; -+@property(nonatomic, assign) double opacity; -+@property(nonatomic, assign) NSInteger zIndex; - @end - - /// Pigeon equivalent of MinMaxZoomPreference. - @interface FGMPlatformZoomRange : NSObject --+ (instancetype)makeWithMin:(nullable NSNumber *)min -- max:(nullable NSNumber *)max; --@property(nonatomic, strong, nullable) NSNumber * min; --@property(nonatomic, strong, nullable) NSNumber * max; -++ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max; -+@property(nonatomic, strong, nullable) NSNumber *min; -+@property(nonatomic, strong, nullable) NSNumber *max; - @end - - /// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint -@@ -669,19 +654,18 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; - + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData -- size:(nullable FGMPlatformSize *)size; --@property(nonatomic, strong) FlutterStandardTypedData * byteData; --@property(nonatomic, strong, nullable) FGMPlatformSize * size; -+ size:(nullable FGMPlatformSize *)size; -+@property(nonatomic, strong) FlutterStandardTypedData *byteData; -+@property(nonatomic, strong, nullable) FGMPlatformSize *size; - @end - - /// Pigeon equivalent of [AssetBitmap]. - @interface FGMPlatformBitmapAsset : NSObject - /// unavailable to enforce nonnull fields, see the class method. - - (instancetype)init NS_UNAVAILABLE; --+ (instancetype)makeWithName:(NSString *)name -- pkg:(nullable NSString *)pkg; --@property(nonatomic, copy) NSString * name; --@property(nonatomic, copy, nullable) NSString * pkg; -++ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg; -+@property(nonatomic, copy) NSString *name; -+@property(nonatomic, copy, nullable) NSString *pkg; - @end - - /// Pigeon equivalent of [AssetImageBitmap]. -@@ -741,54 +725,87 @@ NSObject *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void); - /// - /// Only non-null configuration values will result in updates; options with - /// null values will remain unchanged. --- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Updates the set of circles on the map. --- (void)updateCirclesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updateCirclesByAdding:(NSArray *)toAdd -+ changing:(NSArray *)toChange -+ removing:(NSArray *)idsToRemove -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Updates the set of heatmaps on the map. --- (void)updateHeatmapsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updateHeatmapsByAdding:(NSArray *)toAdd -+ changing:(NSArray *)toChange -+ removing:(NSArray *)idsToRemove -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Updates the set of custer managers for clusters on the map. --- (void)updateClusterManagersByAdding:(NSArray *)toAdd removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updateClusterManagersByAdding:(NSArray *)toAdd -+ removing:(NSArray *)idsToRemove -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Updates the set of markers on the map. --- (void)updateMarkersByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updateMarkersByAdding:(NSArray *)toAdd -+ changing:(NSArray *)toChange -+ removing:(NSArray *)idsToRemove -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Updates the set of polygonss on the map. --- (void)updatePolygonsByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updatePolygonsByAdding:(NSArray *)toAdd -+ changing:(NSArray *)toChange -+ removing:(NSArray *)idsToRemove -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Updates the set of polylines on the map. --- (void)updatePolylinesByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updatePolylinesByAdding:(NSArray *)toAdd -+ changing:(NSArray *)toChange -+ removing:(NSArray *)idsToRemove -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Updates the set of tile overlays on the map. --- (void)updateTileOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updateTileOverlaysByAdding:(NSArray *)toAdd -+ changing:(NSArray *)toChange -+ removing:(NSArray *)idsToRemove -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Updates the set of ground overlays on the map. --- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd changing:(NSArray *)toChange removing:(NSArray *)idsToRemove error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)updateGroundOverlaysByAdding:(NSArray *)toAdd -+ changing:(NSArray *)toChange -+ removing:(NSArray *)idsToRemove -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Gets the screen coordinate for the given map location. - /// - /// @return only when . --- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng error:(FlutterError *_Nullable *_Nonnull)error; -+- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Gets the map location for the given screen coordinate. - /// - /// @return only when . --- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate error:(FlutterError *_Nullable *_Nonnull)error; -+- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Gets the map region currently displayed on the map. - /// - /// @return only when . - - (nullable FGMPlatformLatLngBounds *)visibleMapRegion:(FlutterError *_Nullable *_Nonnull)error; - /// Moves the camera according to [cameraUpdate] immediately, with no - /// animation. --- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Moves the camera according to [cameraUpdate], animating the update using a - /// duration in milliseconds if provided. --- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate duration:(nullable NSNumber *)durationMilliseconds error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate -+ duration:(nullable NSNumber *)durationMilliseconds -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Gets the current map zoom level. - /// - /// @return only when . - - (nullable NSNumber *)currentZoomLevel:(FlutterError *_Nullable *_Nonnull)error; - /// Show the info window for the marker with the given ID. --- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Hide the info window for the marker with the given ID. --- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; -+- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Returns true if the marker with the given ID is currently displaying its - /// info window. - /// - /// @return only when . --- (nullable NSNumber *)isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId error:(FlutterError *_Nullable *_Nonnull)error; -+- (nullable NSNumber *) -+ isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// Sets the style to the given map style string, where an empty string - /// indicates that the style should be cleared. - /// -@@ -911,19 +956,29 @@ extern void SetUpFGMMapsPlatformViewApiWithSuffix(id bin - - (nullable NSNumber *)isMyLocationButtonEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; - /// @return only when . - - (nullable NSNumber *)isTrafficEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; --- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId error:(FlutterError *_Nullable *_Nonnull)error; --- (nullable FGMPlatformGroundOverlay *)groundOverlayWithIdentifier:(NSString *)groundOverlayId error:(FlutterError *_Nullable *_Nonnull)error; --- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId error:(FlutterError *_Nullable *_Nonnull)error; -+- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId -+ error: -+ (FlutterError *_Nullable *_Nonnull)error; -+- (nullable FGMPlatformGroundOverlay *) -+ groundOverlayWithIdentifier:(NSString *)groundOverlayId -+ error:(FlutterError *_Nullable *_Nonnull)error; -+- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// @return only when . - - (nullable FGMPlatformZoomRange *)zoomRange:(FlutterError *_Nullable *_Nonnull)error; - /// @return only when . --- (nullable NSArray *)clustersWithIdentifier:(NSString *)clusterManagerId error:(FlutterError *_Nullable *_Nonnull)error; -+- (nullable NSArray *) -+ clustersWithIdentifier:(NSString *)clusterManagerId -+ error:(FlutterError *_Nullable *_Nonnull)error; - /// @return only when . - - (nullable FGMPlatformCameraPosition *)cameraPosition:(FlutterError *_Nullable *_Nonnull)error; - @end - --extern void SetUpFGMMapsInspectorApi(id binaryMessenger, NSObject *_Nullable api); -+extern void SetUpFGMMapsInspectorApi(id binaryMessenger, -+ NSObject *_Nullable api); - --extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); -+extern void SetUpFGMMapsInspectorApiWithSuffix(id binaryMessenger, -+ NSObject *_Nullable api, -+ NSString *messageChannelSuffix); - - NS_ASSUME_NONNULL_END diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart index 2a9b1d1a76f3..d1bec9961f24 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/google_maps_flutter_ios.dart @@ -1174,7 +1174,6 @@ class HostMapMessageHandler implements MapsCallbackApi { mapId, PointOfInterest( position: LatLng(poi.position.latitude, poi.position.longitude), - name: poi.name, placeId: poi.placeId, ), ), diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart index 0f2aec5ded52..9d5fff9cc140 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart @@ -958,20 +958,14 @@ class PlatformMarker { /// Pigeon equivalent of the Point of Interest class. class PlatformPointOfInterest { - PlatformPointOfInterest({ - required this.position, - this.name, - required this.placeId, - }); + PlatformPointOfInterest({required this.position, required this.placeId}); PlatformLatLng position; - String? name; - String placeId; List _toList() { - return [position, name, placeId]; + return [position, placeId]; } Object encode() { @@ -982,8 +976,7 @@ class PlatformPointOfInterest { result as List; return PlatformPointOfInterest( position: result[0]! as PlatformLatLng, - name: result[1]! as String, - placeId: result[2]! as String, + placeId: result[1]! as String, ); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.orig b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.orig deleted file mode 100644 index 20c055a57bdc..000000000000 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.orig +++ /dev/null @@ -1,4301 +0,0 @@ -// Copyright 2013 The Flutter Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// Autogenerated from Pigeon (v26.1.7), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers - -import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; - -import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; -import 'package:flutter/services.dart'; - -PlatformException _createConnectionError(String channelName) { - return PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); -} - -List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { - if (empty) { - return []; - } - if (error == null) { - return [result]; - } - return [error.code, error.message, error.details]; -} -bool _deepEquals(Object? a, Object? b) { - if (a is List && b is List) { - return a.length == b.length && - a.indexed - .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); - } - if (a is Map && b is Map) { - return a.length == b.length && a.entries.every((MapEntry entry) => - (b as Map).containsKey(entry.key) && - _deepEquals(entry.value, b[entry.key])); - } - return a == b; -} - - -/// Pigeon equivalent of MapType -enum PlatformMapType { - none, - normal, - satellite, - terrain, - hybrid, -} - -/// Join types for polyline joints. -enum PlatformJointType { - mitered, - bevel, - round, -} - -/// Enumeration of possible types for PatternItem. -enum PlatformPatternItemType { - dot, - dash, - gap, -} - -/// Pigeon equivalent of [MapBitmapScaling]. -enum PlatformMapBitmapScaling { - auto, - none, -} - -/// Pigeon representatation of a CameraPosition. -class PlatformCameraPosition { - PlatformCameraPosition({ - required this.bearing, - required this.target, - required this.tilt, - required this.zoom, - }); - - double bearing; - - PlatformLatLng target; - - double tilt; - - double zoom; - - List _toList() { - return [ - bearing, - target, - tilt, - zoom, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraPosition decode(Object result) { - result as List; - return PlatformCameraPosition( - bearing: result[0]! as double, - target: result[1]! as PlatformLatLng, - tilt: result[2]! as double, - zoom: result[3]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraPosition || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon representation of a CameraUpdate. -class PlatformCameraUpdate { - PlatformCameraUpdate({ - required this.cameraUpdate, - }); - - /// This Object must be one of the classes below prefixed with - /// PlatformCameraUpdate. Each such class represents a different type of - /// camera update, and each holds a different set of data, preventing the - /// use of a single unified class. - Object cameraUpdate; - - List _toList() { - return [ - cameraUpdate, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdate decode(Object result) { - result as List; - return PlatformCameraUpdate( - cameraUpdate: result[0]!, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdate || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of NewCameraPosition -class PlatformCameraUpdateNewCameraPosition { - PlatformCameraUpdateNewCameraPosition({ - required this.cameraPosition, - }); - - PlatformCameraPosition cameraPosition; - - List _toList() { - return [ - cameraPosition, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateNewCameraPosition decode(Object result) { - result as List; - return PlatformCameraUpdateNewCameraPosition( - cameraPosition: result[0]! as PlatformCameraPosition, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewCameraPosition || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of NewLatLng -class PlatformCameraUpdateNewLatLng { - PlatformCameraUpdateNewLatLng({ - required this.latLng, - }); - - PlatformLatLng latLng; - - List _toList() { - return [ - latLng, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateNewLatLng decode(Object result) { - result as List; - return PlatformCameraUpdateNewLatLng( - latLng: result[0]! as PlatformLatLng, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLng || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of NewLatLngBounds -class PlatformCameraUpdateNewLatLngBounds { - PlatformCameraUpdateNewLatLngBounds({ - required this.bounds, - required this.padding, - }); - - PlatformLatLngBounds bounds; - - double padding; - - List _toList() { - return [ - bounds, - padding, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateNewLatLngBounds decode(Object result) { - result as List; - return PlatformCameraUpdateNewLatLngBounds( - bounds: result[0]! as PlatformLatLngBounds, - padding: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLngBounds || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of NewLatLngZoom -class PlatformCameraUpdateNewLatLngZoom { - PlatformCameraUpdateNewLatLngZoom({ - required this.latLng, - required this.zoom, - }); - - PlatformLatLng latLng; - - double zoom; - - List _toList() { - return [ - latLng, - zoom, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateNewLatLngZoom decode(Object result) { - result as List; - return PlatformCameraUpdateNewLatLngZoom( - latLng: result[0]! as PlatformLatLng, - zoom: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateNewLatLngZoom || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of ScrollBy -class PlatformCameraUpdateScrollBy { - PlatformCameraUpdateScrollBy({ - required this.dx, - required this.dy, - }); - - double dx; - - double dy; - - List _toList() { - return [ - dx, - dy, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateScrollBy decode(Object result) { - result as List; - return PlatformCameraUpdateScrollBy( - dx: result[0]! as double, - dy: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateScrollBy || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of ZoomBy -class PlatformCameraUpdateZoomBy { - PlatformCameraUpdateZoomBy({ - required this.amount, - this.focus, - }); - - double amount; - - PlatformPoint? focus; - - List _toList() { - return [ - amount, - focus, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateZoomBy decode(Object result) { - result as List; - return PlatformCameraUpdateZoomBy( - amount: result[0]! as double, - focus: result[1] as PlatformPoint?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoomBy || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of ZoomIn/ZoomOut -class PlatformCameraUpdateZoom { - PlatformCameraUpdateZoom({ - required this.out, - }); - - bool out; - - List _toList() { - return [ - out, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateZoom decode(Object result) { - result as List; - return PlatformCameraUpdateZoom( - out: result[0]! as bool, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoom || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of ZoomTo -class PlatformCameraUpdateZoomTo { - PlatformCameraUpdateZoomTo({ - required this.zoom, - }); - - double zoom; - - List _toList() { - return [ - zoom, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraUpdateZoomTo decode(Object result) { - result as List; - return PlatformCameraUpdateZoomTo( - zoom: result[0]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraUpdateZoomTo || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Circle class. -class PlatformCircle { - PlatformCircle({ - this.consumeTapEvents = false, - required this.fillColor, - required this.strokeColor, - this.visible = true, - this.strokeWidth = 10, - this.zIndex = 0.0, - required this.center, - this.radius = 0, - required this.circleId, - }); - - bool consumeTapEvents; - - PlatformColor fillColor; - - PlatformColor strokeColor; - - bool visible; - - int strokeWidth; - - double zIndex; - - PlatformLatLng center; - - double radius; - - String circleId; - - List _toList() { - return [ - consumeTapEvents, - fillColor, - strokeColor, - visible, - strokeWidth, - zIndex, - center, - radius, - circleId, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCircle decode(Object result) { - result as List; - return PlatformCircle( - consumeTapEvents: result[0]! as bool, - fillColor: result[1]! as PlatformColor, - strokeColor: result[2]! as PlatformColor, - visible: result[3]! as bool, - strokeWidth: result[4]! as int, - zIndex: result[5]! as double, - center: result[6]! as PlatformLatLng, - radius: result[7]! as double, - circleId: result[8]! as String, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCircle || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Heatmap class. -class PlatformHeatmap { - PlatformHeatmap({ - required this.heatmapId, - required this.data, - this.gradient, - required this.opacity, - required this.radius, - required this.minimumZoomIntensity, - required this.maximumZoomIntensity, - }); - - String heatmapId; - - List data; - - PlatformHeatmapGradient? gradient; - - double opacity; - - int radius; - - int minimumZoomIntensity; - - int maximumZoomIntensity; - - List _toList() { - return [ - heatmapId, - data, - gradient, - opacity, - radius, - minimumZoomIntensity, - maximumZoomIntensity, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformHeatmap decode(Object result) { - result as List; - return PlatformHeatmap( - heatmapId: result[0]! as String, - data: (result[1] as List?)!.cast(), - gradient: result[2] as PlatformHeatmapGradient?, - opacity: result[3]! as double, - radius: result[4]! as int, - minimumZoomIntensity: result[5]! as int, - maximumZoomIntensity: result[6]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformHeatmap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the HeatmapGradient class. -/// -/// The GMUGradient structure is slightly different from HeatmapGradient, so -/// this matches the iOS API so that conversion can be done on the Dart side -/// where the structures are easier to work with. -class PlatformHeatmapGradient { - PlatformHeatmapGradient({ - required this.colors, - required this.startPoints, - required this.colorMapSize, - }); - - List colors; - - List startPoints; - - int colorMapSize; - - List _toList() { - return [ - colors, - startPoints, - colorMapSize, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformHeatmapGradient decode(Object result) { - result as List; - return PlatformHeatmapGradient( - colors: (result[0] as List?)!.cast(), - startPoints: (result[1] as List?)!.cast(), - colorMapSize: result[2]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformHeatmapGradient || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the WeightedLatLng class. -class PlatformWeightedLatLng { - PlatformWeightedLatLng({ - required this.point, - required this.weight, - }); - - PlatformLatLng point; - - double weight; - - List _toList() { - return [ - point, - weight, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformWeightedLatLng decode(Object result) { - result as List; - return PlatformWeightedLatLng( - point: result[0]! as PlatformLatLng, - weight: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformWeightedLatLng || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the InfoWindow class. -class PlatformInfoWindow { - PlatformInfoWindow({ - this.title, - this.snippet, - required this.anchor, - }); - - String? title; - - String? snippet; - - PlatformPoint anchor; - - List _toList() { - return [ - title, - snippet, - anchor, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformInfoWindow decode(Object result) { - result as List; - return PlatformInfoWindow( - title: result[0] as String?, - snippet: result[1] as String?, - anchor: result[2]! as PlatformPoint, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformInfoWindow || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of Cluster. -class PlatformCluster { - PlatformCluster({ - required this.clusterManagerId, - required this.position, - required this.bounds, - required this.markerIds, - }); - - String clusterManagerId; - - PlatformLatLng position; - - PlatformLatLngBounds bounds; - - List markerIds; - - List _toList() { - return [ - clusterManagerId, - position, - bounds, - markerIds, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCluster decode(Object result) { - result as List; - return PlatformCluster( - clusterManagerId: result[0]! as String, - position: result[1]! as PlatformLatLng, - bounds: result[2]! as PlatformLatLngBounds, - markerIds: (result[3] as List?)!.cast(), - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCluster || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the ClusterManager class. -class PlatformClusterManager { - PlatformClusterManager({ - required this.identifier, - }); - - String identifier; - - List _toList() { - return [ - identifier, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformClusterManager decode(Object result) { - result as List; - return PlatformClusterManager( - identifier: result[0]! as String, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformClusterManager || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Marker class. -class PlatformMarker { - PlatformMarker({ - this.alpha = 1.0, - required this.anchor, - this.consumeTapEvents = false, - this.draggable = false, - this.flat = false, - required this.icon, - required this.infoWindow, - required this.position, - this.rotation = 0.0, - this.visible = true, - this.zIndex = 0, - required this.markerId, - this.clusterManagerId, - }); - - double alpha; - - PlatformPoint anchor; - - bool consumeTapEvents; - - bool draggable; - - bool flat; - - PlatformBitmap icon; - - PlatformInfoWindow infoWindow; - - PlatformLatLng position; - - double rotation; - - bool visible; - - int zIndex; - - String markerId; - - String? clusterManagerId; - - List _toList() { - return [ - alpha, - anchor, - consumeTapEvents, - draggable, - flat, - icon, - infoWindow, - position, - rotation, - visible, - zIndex, - markerId, - clusterManagerId, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformMarker decode(Object result) { - result as List; - return PlatformMarker( - alpha: result[0]! as double, - anchor: result[1]! as PlatformPoint, - consumeTapEvents: result[2]! as bool, - draggable: result[3]! as bool, - flat: result[4]! as bool, - icon: result[5]! as PlatformBitmap, - infoWindow: result[6]! as PlatformInfoWindow, - position: result[7]! as PlatformLatLng, - rotation: result[8]! as double, - visible: result[9]! as bool, - zIndex: result[10]! as int, - markerId: result[11]! as String, - clusterManagerId: result[12] as String?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformMarker || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Point of Interest class. -class PlatformPointOfInterest { - PlatformPointOfInterest({ - required this.position, - this.name, - required this.placeId, - }); - - PlatformLatLng position; - - String? name; - - String placeId; - - List _toList() { - return [ - position, - name, - placeId, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPointOfInterest decode(Object result) { - result as List; - return PlatformPointOfInterest( - position: result[0]! as PlatformLatLng, - name: result[1]! as String, - placeId: result[2]! as String, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPointOfInterest || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Polygon class. -class PlatformPolygon { - PlatformPolygon({ - required this.polygonId, - required this.consumesTapEvents, - required this.fillColor, - required this.geodesic, - required this.points, - required this.holes, - required this.visible, - required this.strokeColor, - required this.strokeWidth, - required this.zIndex, - }); - - String polygonId; - - bool consumesTapEvents; - - PlatformColor fillColor; - - bool geodesic; - - List points; - - List> holes; - - bool visible; - - PlatformColor strokeColor; - - int strokeWidth; - - int zIndex; - - List _toList() { - return [ - polygonId, - consumesTapEvents, - fillColor, - geodesic, - points, - holes, - visible, - strokeColor, - strokeWidth, - zIndex, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPolygon decode(Object result) { - result as List; - return PlatformPolygon( - polygonId: result[0]! as String, - consumesTapEvents: result[1]! as bool, - fillColor: result[2]! as PlatformColor, - geodesic: result[3]! as bool, - points: (result[4] as List?)!.cast(), - holes: (result[5] as List?)!.cast>(), - visible: result[6]! as bool, - strokeColor: result[7]! as PlatformColor, - strokeWidth: result[8]! as int, - zIndex: result[9]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPolygon || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Polyline class. -class PlatformPolyline { - PlatformPolyline({ - required this.polylineId, - required this.consumesTapEvents, - required this.color, - required this.geodesic, - required this.jointType, - required this.patterns, - required this.points, - required this.visible, - required this.width, - required this.zIndex, - }); - - String polylineId; - - bool consumesTapEvents; - - PlatformColor color; - - bool geodesic; - - /// The joint type. - PlatformJointType jointType; - - /// The pattern data, as a list of pattern items. - List patterns; - - List points; - - bool visible; - - int width; - - int zIndex; - - List _toList() { - return [ - polylineId, - consumesTapEvents, - color, - geodesic, - jointType, - patterns, - points, - visible, - width, - zIndex, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPolyline decode(Object result) { - result as List; - return PlatformPolyline( - polylineId: result[0]! as String, - consumesTapEvents: result[1]! as bool, - color: result[2]! as PlatformColor, - geodesic: result[3]! as bool, - jointType: result[4]! as PlatformJointType, - patterns: (result[5] as List?)!.cast(), - points: (result[6] as List?)!.cast(), - visible: result[7]! as bool, - width: result[8]! as int, - zIndex: result[9]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPolyline || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the PatternItem class. -class PlatformPatternItem { - PlatformPatternItem({ - required this.type, - this.length, - }); - - PlatformPatternItemType type; - - double? length; - - List _toList() { - return [ - type, - length, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPatternItem decode(Object result) { - result as List; - return PlatformPatternItem( - type: result[0]! as PlatformPatternItemType, - length: result[1] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPatternItem || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the Tile class. -class PlatformTile { - PlatformTile({ - required this.width, - required this.height, - this.data, - }); - - int width; - - int height; - - Uint8List? data; - - List _toList() { - return [ - width, - height, - data, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformTile decode(Object result) { - result as List; - return PlatformTile( - width: result[0]! as int, - height: result[1]! as int, - data: result[2] as Uint8List?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformTile || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the TileOverlay class. -class PlatformTileOverlay { - PlatformTileOverlay({ - required this.tileOverlayId, - required this.fadeIn, - required this.transparency, - required this.zIndex, - required this.visible, - required this.tileSize, - }); - - String tileOverlayId; - - bool fadeIn; - - double transparency; - - int zIndex; - - bool visible; - - int tileSize; - - List _toList() { - return [ - tileOverlayId, - fadeIn, - transparency, - zIndex, - visible, - tileSize, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformTileOverlay decode(Object result) { - result as List; - return PlatformTileOverlay( - 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, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformTileOverlay || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of Flutter's EdgeInsets. -class PlatformEdgeInsets { - PlatformEdgeInsets({ - required this.top, - required this.bottom, - required this.left, - required this.right, - }); - - double top; - - double bottom; - - double left; - - double right; - - List _toList() { - return [ - top, - bottom, - left, - right, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformEdgeInsets decode(Object result) { - result as List; - return PlatformEdgeInsets( - top: result[0]! as double, - bottom: result[1]! as double, - left: result[2]! as double, - right: result[3]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformEdgeInsets || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of LatLng. -class PlatformLatLng { - PlatformLatLng({ - required this.latitude, - required this.longitude, - }); - - double latitude; - - double longitude; - - List _toList() { - return [ - latitude, - longitude, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformLatLng decode(Object result) { - result as List; - return PlatformLatLng( - latitude: result[0]! as double, - longitude: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformLatLng || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of LatLngBounds. -class PlatformLatLngBounds { - PlatformLatLngBounds({ - required this.northeast, - required this.southwest, - }); - - PlatformLatLng northeast; - - PlatformLatLng southwest; - - List _toList() { - return [ - northeast, - southwest, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformLatLngBounds decode(Object result) { - result as List; - return PlatformLatLngBounds( - northeast: result[0]! as PlatformLatLng, - southwest: result[1]! as PlatformLatLng, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformLatLngBounds || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_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]). -class PlatformCameraTargetBounds { - PlatformCameraTargetBounds({ - this.bounds, - }); - - PlatformLatLngBounds? bounds; - - List _toList() { - return [ - bounds, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformCameraTargetBounds decode(Object result) { - result as List; - return PlatformCameraTargetBounds( - bounds: result[0] as PlatformLatLngBounds?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformCameraTargetBounds || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of the GroundOverlay class. -class PlatformGroundOverlay { - PlatformGroundOverlay({ - required this.groundOverlayId, - required this.image, - this.position, - this.bounds, - this.anchor, - required this.transparency, - required this.bearing, - required this.zIndex, - required this.visible, - required this.clickable, - this.zoomLevel, - }); - - String groundOverlayId; - - PlatformBitmap image; - - PlatformLatLng? position; - - PlatformLatLngBounds? bounds; - - PlatformPoint? anchor; - - double transparency; - - double bearing; - - int zIndex; - - bool visible; - - bool clickable; - - double? zoomLevel; - - List _toList() { - return [ - groundOverlayId, - image, - position, - bounds, - anchor, - transparency, - bearing, - zIndex, - visible, - clickable, - zoomLevel, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformGroundOverlay decode(Object result) { - result as List; - return PlatformGroundOverlay( - groundOverlayId: result[0]! as String, - image: result[1]! as PlatformBitmap, - position: result[2] as PlatformLatLng?, - bounds: result[3] as PlatformLatLngBounds?, - anchor: result[4] as PlatformPoint?, - transparency: result[5]! as double, - bearing: result[6]! as double, - zIndex: result[7]! as int, - visible: result[8]! as bool, - clickable: result[9]! as bool, - zoomLevel: result[10] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformGroundOverlay || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Information passed to the platform view creation. -class PlatformMapViewCreationParams { - PlatformMapViewCreationParams({ - required this.initialCameraPosition, - required this.mapConfiguration, - required this.initialCircles, - required this.initialMarkers, - required this.initialPolygons, - required this.initialPolylines, - required this.initialHeatmaps, - required this.initialTileOverlays, - required this.initialClusterManagers, - required this.initialGroundOverlays, - }); - - PlatformCameraPosition initialCameraPosition; - - PlatformMapConfiguration mapConfiguration; - - List initialCircles; - - List initialMarkers; - - List initialPolygons; - - List initialPolylines; - - List initialHeatmaps; - - List initialTileOverlays; - - List initialClusterManagers; - - List initialGroundOverlays; - - List _toList() { - return [ - initialCameraPosition, - mapConfiguration, - initialCircles, - initialMarkers, - initialPolygons, - initialPolylines, - initialHeatmaps, - initialTileOverlays, - initialClusterManagers, - initialGroundOverlays, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformMapViewCreationParams decode(Object result) { - result as List; - return PlatformMapViewCreationParams( - initialCameraPosition: result[0]! as PlatformCameraPosition, - mapConfiguration: result[1]! as PlatformMapConfiguration, - initialCircles: (result[2] as List?)!.cast(), - initialMarkers: (result[3] as List?)!.cast(), - initialPolygons: (result[4] as List?)!.cast(), - initialPolylines: (result[5] as List?)!.cast(), - initialHeatmaps: (result[6] as List?)!.cast(), - initialTileOverlays: (result[7] as List?)!.cast(), - initialClusterManagers: (result[8] as List?)!.cast(), - initialGroundOverlays: (result[9] as List?)!.cast(), - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformMapViewCreationParams || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of MapConfiguration. -class PlatformMapConfiguration { - PlatformMapConfiguration({ - this.compassEnabled, - this.cameraTargetBounds, - this.mapType, - this.minMaxZoomPreference, - this.rotateGesturesEnabled, - this.scrollGesturesEnabled, - this.tiltGesturesEnabled, - this.trackCameraPosition, - this.zoomGesturesEnabled, - this.myLocationEnabled, - this.myLocationButtonEnabled, - this.padding, - this.indoorViewEnabled, - this.trafficEnabled, - this.buildingsEnabled, - this.mapId, - this.style, - }); - - bool? compassEnabled; - - PlatformCameraTargetBounds? cameraTargetBounds; - - PlatformMapType? mapType; - - PlatformZoomRange? minMaxZoomPreference; - - bool? rotateGesturesEnabled; - - bool? scrollGesturesEnabled; - - bool? tiltGesturesEnabled; - - bool? trackCameraPosition; - - bool? zoomGesturesEnabled; - - bool? myLocationEnabled; - - bool? myLocationButtonEnabled; - - PlatformEdgeInsets? padding; - - bool? indoorViewEnabled; - - bool? trafficEnabled; - - bool? buildingsEnabled; - - String? mapId; - - String? style; - - List _toList() { - return [ - compassEnabled, - cameraTargetBounds, - mapType, - minMaxZoomPreference, - rotateGesturesEnabled, - scrollGesturesEnabled, - tiltGesturesEnabled, - trackCameraPosition, - zoomGesturesEnabled, - myLocationEnabled, - myLocationButtonEnabled, - padding, - indoorViewEnabled, - trafficEnabled, - buildingsEnabled, - mapId, - style, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformMapConfiguration decode(Object result) { - result as List; - return PlatformMapConfiguration( - compassEnabled: result[0] as bool?, - cameraTargetBounds: result[1] as PlatformCameraTargetBounds?, - mapType: result[2] as PlatformMapType?, - minMaxZoomPreference: result[3] as PlatformZoomRange?, - rotateGesturesEnabled: result[4] as bool?, - scrollGesturesEnabled: result[5] as bool?, - tiltGesturesEnabled: result[6] as bool?, - trackCameraPosition: result[7] as bool?, - zoomGesturesEnabled: result[8] as bool?, - myLocationEnabled: result[9] as bool?, - myLocationButtonEnabled: result[10] as bool?, - padding: result[11] as PlatformEdgeInsets?, - indoorViewEnabled: result[12] as bool?, - trafficEnabled: result[13] as bool?, - buildingsEnabled: result[14] as bool?, - mapId: result[15] as String?, - style: result[16] as String?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformMapConfiguration || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon representation of an x,y coordinate. -class PlatformPoint { - PlatformPoint({ - required this.x, - required this.y, - }); - - double x; - - double y; - - List _toList() { - return [ - x, - y, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformPoint decode(Object result) { - result as List; - return PlatformPoint( - x: result[0]! as double, - y: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformPoint || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon representation of a size. -class PlatformSize { - PlatformSize({ - required this.width, - required this.height, - }); - - double width; - - double height; - - List _toList() { - return [ - width, - height, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformSize decode(Object result) { - result as List; - return PlatformSize( - width: result[0]! as double, - height: result[1]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformSize || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon representation of a color. -class PlatformColor { - PlatformColor({ - required this.red, - required this.green, - required this.blue, - required this.alpha, - }); - - double red; - - double green; - - double blue; - - double alpha; - - List _toList() { - return [ - red, - green, - blue, - alpha, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformColor decode(Object result) { - result as List; - return PlatformColor( - red: result[0]! as double, - green: result[1]! as double, - blue: result[2]! as double, - alpha: result[3]! as double, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformColor || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of GMSTileLayer properties. -class PlatformTileLayer { - PlatformTileLayer({ - required this.visible, - required this.fadeIn, - required this.opacity, - required this.zIndex, - }); - - bool visible; - - bool fadeIn; - - double opacity; - - int zIndex; - - List _toList() { - return [ - visible, - fadeIn, - opacity, - zIndex, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformTileLayer decode(Object result) { - result as List; - return PlatformTileLayer( - visible: result[0]! as bool, - fadeIn: result[1]! as bool, - opacity: result[2]! as double, - zIndex: result[3]! as int, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformTileLayer || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of MinMaxZoomPreference. -class PlatformZoomRange { - PlatformZoomRange({ - this.min, - this.max, - }); - - double? min; - - double? max; - - List _toList() { - return [ - min, - max, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformZoomRange decode(Object result) { - result as List; - return PlatformZoomRange( - min: result[0] as double?, - max: result[1] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformZoomRange || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint -/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which -/// may hold the pigeon equivalent type of any of them. -class PlatformBitmap { - PlatformBitmap({ - required this.bitmap, - }); - - /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset], - /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap], - /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker]. - /// As Pigeon does not currently support data class inheritance, this - /// approach allows for the different bitmap implementations to be valid - /// argument and return types of the API methods. See - /// https://github.com/flutter/flutter/issues/117819. - Object bitmap; - - List _toList() { - return [ - bitmap, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmap decode(Object result) { - result as List; - return PlatformBitmap( - bitmap: result[0]!, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [DefaultMarker]. -class PlatformBitmapDefaultMarker { - PlatformBitmapDefaultMarker({ - this.hue, - }); - - double? hue; - - List _toList() { - return [ - hue, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapDefaultMarker decode(Object result) { - result as List; - return PlatformBitmapDefaultMarker( - hue: result[0] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapDefaultMarker || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [BytesBitmap]. -class PlatformBitmapBytes { - PlatformBitmapBytes({ - required this.byteData, - this.size, - }); - - Uint8List byteData; - - PlatformSize? size; - - List _toList() { - return [ - byteData, - size, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapBytes decode(Object result) { - result as List; - return PlatformBitmapBytes( - byteData: result[0]! as Uint8List, - size: result[1] as PlatformSize?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapBytes || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [AssetBitmap]. -class PlatformBitmapAsset { - PlatformBitmapAsset({ - required this.name, - this.pkg, - }); - - String name; - - String? pkg; - - List _toList() { - return [ - name, - pkg, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapAsset decode(Object result) { - result as List; - return PlatformBitmapAsset( - name: result[0]! as String, - pkg: result[1] as String?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapAsset || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [AssetImageBitmap]. -class PlatformBitmapAssetImage { - PlatformBitmapAssetImage({ - required this.name, - required this.scale, - this.size, - }); - - String name; - - double scale; - - PlatformSize? size; - - List _toList() { - return [ - name, - scale, - size, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapAssetImage decode(Object result) { - result as List; - return PlatformBitmapAssetImage( - name: result[0]! as String, - scale: result[1]! as double, - size: result[2] as PlatformSize?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapAssetImage || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [AssetMapBitmap]. -class PlatformBitmapAssetMap { - PlatformBitmapAssetMap({ - required this.assetName, - required this.bitmapScaling, - required this.imagePixelRatio, - this.width, - this.height, - }); - - String assetName; - - PlatformMapBitmapScaling bitmapScaling; - - double imagePixelRatio; - - double? width; - - double? height; - - List _toList() { - return [ - assetName, - bitmapScaling, - imagePixelRatio, - width, - height, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapAssetMap decode(Object result) { - result as List; - return PlatformBitmapAssetMap( - assetName: result[0]! as String, - bitmapScaling: result[1]! as PlatformMapBitmapScaling, - imagePixelRatio: result[2]! as double, - width: result[3] as double?, - height: result[4] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapAssetMap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - -/// Pigeon equivalent of [BytesMapBitmap]. -class PlatformBitmapBytesMap { - PlatformBitmapBytesMap({ - required this.byteData, - required this.bitmapScaling, - required this.imagePixelRatio, - this.width, - this.height, - }); - - Uint8List byteData; - - PlatformMapBitmapScaling bitmapScaling; - - double imagePixelRatio; - - double? width; - - double? height; - - List _toList() { - return [ - byteData, - bitmapScaling, - imagePixelRatio, - width, - height, - ]; - } - - Object encode() { - return _toList(); } - - static PlatformBitmapBytesMap decode(Object result) { - result as List; - return PlatformBitmapBytesMap( - byteData: result[0]! as Uint8List, - bitmapScaling: result[1]! as PlatformMapBitmapScaling, - imagePixelRatio: result[2]! as double, - width: result[3] as double?, - height: result[4] as double?, - ); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - bool operator ==(Object other) { - if (other is! PlatformBitmapBytesMap || other.runtimeType != runtimeType) { - return false; - } - if (identical(this, other)) { - return true; - } - return _deepEquals(encode(), other.encode()); - } - - @override - // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()) -; -} - - -class _PigeonCodec extends StandardMessageCodec { - const _PigeonCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is int) { - buffer.putUint8(4); - buffer.putInt64(value); - } else if (value is PlatformMapType) { - buffer.putUint8(129); - writeValue(buffer, value.index); - } else if (value is PlatformJointType) { - buffer.putUint8(130); - writeValue(buffer, value.index); - } else if (value is PlatformPatternItemType) { - buffer.putUint8(131); - writeValue(buffer, value.index); - } else if (value is PlatformMapBitmapScaling) { - buffer.putUint8(132); - writeValue(buffer, value.index); - } else if (value is PlatformCameraPosition) { - buffer.putUint8(133); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { - buffer.putUint8(134); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewCameraPosition) { - buffer.putUint8(135); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLng) { - buffer.putUint8(136); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngBounds) { - buffer.putUint8(137); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngZoom) { - buffer.putUint8(138); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateScrollBy) { - buffer.putUint8(139); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomBy) { - buffer.putUint8(140); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoom) { - buffer.putUint8(141); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomTo) { - buffer.putUint8(142); - writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { - buffer.putUint8(143); - writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { - buffer.putUint8(144); - writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmapGradient) { - buffer.putUint8(145); - writeValue(buffer, value.encode()); - } else if (value is PlatformWeightedLatLng) { - buffer.putUint8(146); - writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { - buffer.putUint8(147); - writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { - buffer.putUint8(148); - writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { - buffer.putUint8(149); - writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { - buffer.putUint8(150); - writeValue(buffer, value.encode()); - } else if (value is PlatformPointOfInterest) { - buffer.putUint8(151); - writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { - buffer.putUint8(152); - writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { - buffer.putUint8(153); - writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { - buffer.putUint8(154); - writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { - buffer.putUint8(155); - writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { - buffer.putUint8(156); - writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { - buffer.putUint8(157); - writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { - buffer.putUint8(158); - writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { - buffer.putUint8(159); - writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { - buffer.putUint8(160); - writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { - buffer.putUint8(161); - writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { - buffer.putUint8(162); - writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { - buffer.putUint8(163); - writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { - buffer.putUint8(164); - writeValue(buffer, value.encode()); - } else if (value is PlatformSize) { - buffer.putUint8(165); - writeValue(buffer, value.encode()); - } else if (value is PlatformColor) { - buffer.putUint8(166); - writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { - buffer.putUint8(167); - writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { - buffer.putUint8(168); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { - buffer.putUint8(169); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { - buffer.putUint8(170); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { - buffer.putUint8(171); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { - buffer.putUint8(172); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { - buffer.putUint8(173); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { - buffer.putUint8(174); - writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { - buffer.putUint8(175); - writeValue(buffer, value.encode()); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 129: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformMapType.values[value]; - case 130: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformJointType.values[value]; - case 131: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformPatternItemType.values[value]; - case 132: - final value = readValue(buffer) as int?; - return value == null ? null : PlatformMapBitmapScaling.values[value]; - case 133: - return PlatformCameraPosition.decode(readValue(buffer)!); - case 134: - return PlatformCameraUpdate.decode(readValue(buffer)!); - case 135: - return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!); - case 136: - return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!); - case 137: - return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); - case 138: - return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); - case 139: - return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); - case 140: - return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); - case 141: - return PlatformCameraUpdateZoom.decode(readValue(buffer)!); - case 142: - return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); - case 143: - return PlatformCircle.decode(readValue(buffer)!); - case 144: - return PlatformHeatmap.decode(readValue(buffer)!); - case 145: - return PlatformHeatmapGradient.decode(readValue(buffer)!); - case 146: - return PlatformWeightedLatLng.decode(readValue(buffer)!); - case 147: - return PlatformInfoWindow.decode(readValue(buffer)!); - case 148: - return PlatformCluster.decode(readValue(buffer)!); - case 149: - return PlatformClusterManager.decode(readValue(buffer)!); - case 150: - return PlatformMarker.decode(readValue(buffer)!); - case 151: - return PlatformPointOfInterest.decode(readValue(buffer)!); - case 152: - return PlatformPolygon.decode(readValue(buffer)!); - case 153: - return PlatformPolyline.decode(readValue(buffer)!); - case 154: - return PlatformPatternItem.decode(readValue(buffer)!); - case 155: - return PlatformTile.decode(readValue(buffer)!); - case 156: - return PlatformTileOverlay.decode(readValue(buffer)!); - case 157: - return PlatformEdgeInsets.decode(readValue(buffer)!); - case 158: - return PlatformLatLng.decode(readValue(buffer)!); - case 159: - return PlatformLatLngBounds.decode(readValue(buffer)!); - case 160: - return PlatformCameraTargetBounds.decode(readValue(buffer)!); - case 161: - return PlatformGroundOverlay.decode(readValue(buffer)!); - case 162: - return PlatformMapViewCreationParams.decode(readValue(buffer)!); - case 163: - return PlatformMapConfiguration.decode(readValue(buffer)!); - case 164: - return PlatformPoint.decode(readValue(buffer)!); - case 165: - return PlatformSize.decode(readValue(buffer)!); - case 166: - return PlatformColor.decode(readValue(buffer)!); - case 167: - return PlatformTileLayer.decode(readValue(buffer)!); - case 168: - return PlatformZoomRange.decode(readValue(buffer)!); - case 169: - return PlatformBitmap.decode(readValue(buffer)!); - case 170: - return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); - case 171: - return PlatformBitmapBytes.decode(readValue(buffer)!); - case 172: - return PlatformBitmapAsset.decode(readValue(buffer)!); - case 173: - return PlatformBitmapAssetImage.decode(readValue(buffer)!); - case 174: - return PlatformBitmapAssetMap.decode(readValue(buffer)!); - case 175: - return PlatformBitmapBytesMap.decode(readValue(buffer)!); - default: - return super.readValueOfType(type, buffer); - } - } -} - -/// Interface for non-test interactions with the native SDK. -/// -/// For test-only state queries, see [MapsInspectorApi]. -class MapsApi { - /// Constructor for [MapsApi]. 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. - MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - /// Returns once the map instance is available. - Future waitForMap() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the map's configuration options. - /// - /// Only non-null configuration values will result in updates; options with - /// null values will remain unchanged. - Future updateMapConfiguration(PlatformMapConfiguration configuration) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of circles on the map. - Future updateCircles(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of heatmaps on the map. - Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of custer managers for clusters on the map. - Future updateClusterManagers(List toAdd, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of markers on the map. - Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of polygonss on the map. - Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of polylines on the map. - Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of tile overlays on the map. - Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Updates the set of ground overlays on the map. - Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Gets the screen coordinate for the given map location. - Future getScreenCoordinate(PlatformLatLng latLng) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformPoint?)!; - } - } - - /// Gets the map location for the given screen coordinate. - Future getLatLng(PlatformPoint screenCoordinate) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformLatLng?)!; - } - } - - /// Gets the map region currently displayed on the map. - Future getVisibleRegion() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformLatLngBounds?)!; - } - } - - /// Moves the camera according to [cameraUpdate] immediately, with no - /// animation. - Future moveCamera(PlatformCameraUpdate cameraUpdate) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Moves the camera according to [cameraUpdate], animating the update using a - /// duration in milliseconds if provided. - Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Gets the current map zoom level. - Future getZoomLevel() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as double?)!; - } - } - - /// Show the info window for the marker with the given ID. - Future showInfoWindow(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Hide the info window for the marker with the given ID. - Future hideInfoWindow(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Returns true if the marker with the given ID is currently displaying its - /// info window. - Future isInfoWindowShown(String markerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - /// Sets the style to the given map style string, where an empty string - /// indicates that the style should be cleared. - /// - /// If there was an error setting the style, such as an invalid style string, - /// returns the error message. - Future setStyle(String style) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as String?); - } - } - - /// Returns the error string from the last attempt to set the map style, if - /// any. - /// - /// This allows checking asynchronously for initial style failures, as there - /// is no way to return failures from map initialization. - Future getLastStyleError() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as String?); - } - } - - /// Clears the cache of tiles previously requseted from the tile provider. - Future clearTileCache(String tileOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } - - /// Takes a snapshot of the map and returns its image data. - Future takeSnapshot() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as Uint8List?); - } - } -} - -/// Interface for calls from the native SDK to Dart. -abstract class MapsCallbackApi { - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - /// Called when the map camera starts moving. - void onCameraMoveStarted(); - - /// Called when the map camera moves. - void onCameraMove(PlatformCameraPosition cameraPosition); - - /// Called when the map camera stops moving. - void onCameraIdle(); - - /// Called when the map, not a specifc map object, is tapped. - void onTap(PlatformLatLng position); - - /// Called when the map, not a specifc map object, is long pressed. - void onLongPress(PlatformLatLng position); - - /// Called when a marker is tapped. - void onMarkerTap(String markerId); - - /// Called when a marker drag starts. - void onMarkerDragStart(String markerId, PlatformLatLng position); - - /// Called when a marker drag updates. - void onMarkerDrag(String markerId, PlatformLatLng position); - - /// Called when a marker drag ends. - void onMarkerDragEnd(String markerId, PlatformLatLng position); - - /// Called when a marker's info window is tapped. - void onInfoWindowTap(String markerId); - - /// Called when a circle is tapped. - void onCircleTap(String circleId); - - /// Called when a marker cluster is tapped. - void onClusterTap(PlatformCluster cluster); - - /// Called when a polygon is tapped. - void onPolygonTap(String polygonId); - - /// Called when a polyline is tapped. - void onPolylineTap(String polylineId); - - /// Called when a ground overlay is tapped. - void onGroundOverlayTap(String groundOverlayId); - - /// Called when a point of interest is tapped. - void onPoiTap(PlatformPointOfInterest poi); - - /// 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' : ''; - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - try { - api.onCameraMoveStarted(); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.'); - final List args = (message as List?)!; - final PlatformCameraPosition? arg_cameraPosition = (args[0] as PlatformCameraPosition?); - assert(arg_cameraPosition != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.'); - try { - api.onCameraMove(arg_cameraPosition!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - try { - api.onCameraIdle(); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.'); - final List args = (message as List?)!; - final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); - try { - api.onTap(arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.'); - final List args = (message as List?)!; - final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); - try { - api.onLongPress(arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); - try { - api.onMarkerTap(arg_markerId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); - try { - api.onMarkerDragStart(arg_markerId!, arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); - try { - api.onMarkerDrag(arg_markerId!, arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); - assert(arg_position != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); - try { - api.onMarkerDragEnd(arg_markerId!, arg_position!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.'); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); - assert(arg_markerId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); - try { - api.onInfoWindowTap(arg_markerId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.'); - final List args = (message as List?)!; - final String? arg_circleId = (args[0] as String?); - assert(arg_circleId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null, expected non-null String.'); - try { - api.onCircleTap(arg_circleId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.'); - final List args = (message as List?)!; - final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); - assert(arg_cluster != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); - try { - api.onClusterTap(arg_cluster!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.'); - final List args = (message as List?)!; - final String? arg_polygonId = (args[0] as String?); - assert(arg_polygonId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); - try { - api.onPolygonTap(arg_polygonId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.'); - final List args = (message as List?)!; - final String? arg_polylineId = (args[0] as String?); - assert(arg_polylineId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); - try { - api.onPolylineTap(arg_polylineId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.'); - final List args = (message as List?)!; - final String? arg_groundOverlayId = (args[0] as String?); - assert(arg_groundOverlayId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); - try { - api.onGroundOverlayTap(arg_groundOverlayId!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.'); - final List args = (message as List?)!; - final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); - assert(arg_poi != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); - try { - api.onPoiTap(arg_poi!); - return wrapResponse(empty: true); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - { - final pigeonVar_channel = BasicMessageChannel( - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile$messageChannelSuffix', pigeonChannelCodec, - binaryMessenger: binaryMessenger); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { - assert(message != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.'); - final List args = (message as List?)!; - final String? arg_tileOverlayId = (args[0] as String?); - assert(arg_tileOverlayId != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); - final PlatformPoint? arg_location = (args[1] as PlatformPoint?); - assert(arg_location != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); - final int? arg_zoom = (args[2] as int?); - assert(arg_zoom != null, - 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); - try { - final PlatformTile output = await api.getTileOverlayTile(arg_tileOverlayId!, arg_location!, arg_zoom!); - return wrapResponse(result: output); - } on PlatformException catch (e) { - return wrapResponse(error: e); - } catch (e) { - return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); - } - }); - } - } - } -} - -/// 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. -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 = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future createView(PlatformMapViewCreationParams? type) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return; - } - } -} - -/// Inspector API only intended for use in integration tests. -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 = ''}) - : pigeonVar_binaryMessenger = binaryMessenger, - pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - - final String pigeonVar_messageChannelSuffix; - - Future areBuildingsEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areRotateGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areScrollGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areTiltGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future areZoomGesturesEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future isCompassEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future isMyLocationButtonEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future isTrafficEnabled() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as bool?)!; - } - } - - Future getTileOverlayInfo(String tileOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as PlatformTileLayer?); - } - } - - Future getGroundOverlayInfo(String groundOverlayId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as PlatformGroundOverlay?); - } - } - - Future getHeatmapInfo(String heatmapId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([heatmapId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else { - return (pigeonVar_replyList[0] as PlatformHeatmap?); - } - } - - Future getZoomRange() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformZoomRange?)!; - } - } - - Future> getClusters(String clusterManagerId) async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as List?)!.cast(); - } - } - - Future getCameraPosition() async { - final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition$pigeonVar_messageChannelSuffix'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); - final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); - } else if (pigeonVar_replyList.length > 1) { - throw PlatformException( - code: pigeonVar_replyList[0]! as String, - message: pigeonVar_replyList[1] as String?, - details: pigeonVar_replyList[2], - ); - } else if (pigeonVar_replyList[0] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (pigeonVar_replyList[0] as PlatformCameraPosition?)!; - } - } -} diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.rej b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.rej deleted file mode 100644 index 6a762b8f1585..000000000000 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart.rej +++ /dev/null @@ -1,1496 +0,0 @@ ---- packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart -+++ packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart -@@ -31,49 +35,36 @@ List wrapResponse({Object? result, PlatformException? error, bool empty - } - return [error.code, error.message, error.details]; - } -+ - bool _deepEquals(Object? a, Object? b) { - if (a is List && b is List) { - return a.length == b.length && -- a.indexed -- .every(((int, dynamic) item) => _deepEquals(item., b[item.])); -+ a.indexed.every( -+ ((int, dynamic) item) => _deepEquals(item., b[item.]), -+ ); - } - if (a is Map && b is Map) { -- return a.length == b.length && a.entries.every((MapEntry entry) => -- (b as Map).containsKey(entry.key) && -- _deepEquals(entry.value, b[entry.key])); -+ return a.length == b.length && -+ a.entries.every( -+ (MapEntry entry) => -+ (b as Map).containsKey(entry.key) && -+ _deepEquals(entry.value, b[entry.key]), -+ ); - } - return a == b; - } - -- - /// Pigeon equivalent of MapType --enum PlatformMapType { -- none, -- normal, -- satellite, -- terrain, -- hybrid, --} -+enum PlatformMapType { none, normal, satellite, terrain, hybrid } - - /// Join types for polyline joints. --enum PlatformJointType { -- mitered, -- bevel, -- round, --} -+enum PlatformJointType { mitered, bevel, round } - - /// Enumeration of possible types for PatternItem. --enum PlatformPatternItemType { -- dot, -- dash, -- gap, --} -+enum PlatformPatternItemType { dot, dash, gap } - - /// Pigeon equivalent of [MapBitmapScaling]. --enum PlatformMapBitmapScaling { -- auto, -- none, --} -+enum PlatformMapBitmapScaling { auto, none } - - /// Pigeon representatation of a CameraPosition. - class PlatformCameraPosition { -@@ -2644,8 +2457,10 @@ class MapsApi { - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - MapsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) -- : pigeonVar_binaryMessenger = binaryMessenger, -- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ : pigeonVar_binaryMessenger = binaryMessenger, -+ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); -@@ -2654,7 +2469,8 @@ class MapsApi { - - /// Returns once the map instance is available. - Future waitForMap() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -2679,14 +2495,19 @@ class MapsApi { - /// - /// Only non-null configuration values will result in updates; options with - /// null values will remain unchanged. -- Future updateMapConfiguration(PlatformMapConfiguration configuration) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration'; -+ Future updateMapConfiguration( -+ PlatformMapConfiguration configuration, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([configuration]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [configuration], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2702,14 +2523,21 @@ class MapsApi { - } - - /// Updates the set of circles on the map. -- Future updateCircles(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles'; -+ Future updateCircles( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2725,14 +2553,21 @@ class MapsApi { - } - - /// Updates the set of heatmaps on the map. -- Future updateHeatmaps(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps'; -+ Future updateHeatmaps( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2748,14 +2583,20 @@ class MapsApi { - } - - /// Updates the set of custer managers for clusters on the map. -- Future updateClusterManagers(List toAdd, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers'; -+ Future updateClusterManagers( -+ List toAdd, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2771,14 +2612,21 @@ class MapsApi { - } - - /// Updates the set of markers on the map. -- Future updateMarkers(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers'; -+ Future updateMarkers( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2794,14 +2642,21 @@ class MapsApi { - } - - /// Updates the set of polygonss on the map. -- Future updatePolygons(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons'; -+ Future updatePolygons( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2817,14 +2672,21 @@ class MapsApi { - } - - /// Updates the set of polylines on the map. -- Future updatePolylines(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines'; -+ Future updatePolylines( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2840,14 +2702,21 @@ class MapsApi { - } - - /// Updates the set of tile overlays on the map. -- Future updateTileOverlays(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays'; -+ Future updateTileOverlays( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2863,14 +2732,21 @@ class MapsApi { - } - - /// Updates the set of ground overlays on the map. -- Future updateGroundOverlays(List toAdd, List toChange, List idsToRemove) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays'; -+ Future updateGroundOverlays( -+ List toAdd, -+ List toChange, -+ List idsToRemove, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([toAdd, toChange, idsToRemove]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [toAdd, toChange, idsToRemove], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2887,13 +2763,16 @@ class MapsApi { - - /// Gets the screen coordinate for the given map location. - Future getScreenCoordinate(PlatformLatLng latLng) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([latLng]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [latLng], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2915,13 +2794,16 @@ class MapsApi { - - /// Gets the map location for the given screen coordinate. - Future getLatLng(PlatformPoint screenCoordinate) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([screenCoordinate]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [screenCoordinate], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2943,7 +2825,8 @@ class MapsApi { - - /// Gets the map region currently displayed on the map. - Future getVisibleRegion() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -2972,13 +2855,16 @@ class MapsApi { - /// Moves the camera according to [cameraUpdate] immediately, with no - /// animation. - Future moveCamera(PlatformCameraUpdate cameraUpdate) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [cameraUpdate], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -2995,14 +2881,20 @@ class MapsApi { - - /// Moves the camera according to [cameraUpdate], animating the update using a - /// duration in milliseconds if provided. -- Future animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera'; -+ Future animateCamera( -+ PlatformCameraUpdate cameraUpdate, -+ int? durationMilliseconds, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([cameraUpdate, durationMilliseconds]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [cameraUpdate, durationMilliseconds], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3019,7 +2911,8 @@ class MapsApi { - - /// Gets the current map zoom level. - Future getZoomLevel() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3047,13 +2940,16 @@ class MapsApi { - - /// Show the info window for the marker with the given ID. - Future showInfoWindow(String markerId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [markerId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3070,13 +2966,16 @@ class MapsApi { - - /// Hide the info window for the marker with the given ID. - Future hideInfoWindow(String markerId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [markerId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3094,13 +2993,16 @@ class MapsApi { - /// Returns true if the marker with the given ID is currently displaying its - /// info window. - Future isInfoWindowShown(String markerId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([markerId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [markerId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3126,13 +3028,16 @@ class MapsApi { - /// If there was an error setting the style, such as an invalid style string, - /// returns the error message. - Future setStyle(String style) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([style]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [style], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3153,7 +3058,8 @@ class MapsApi { - /// This allows checking asynchronously for initial style failures, as there - /// is no way to return failures from map initialization. - Future getLastStyleError() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3176,13 +3082,16 @@ class MapsApi { - - /// Clears the cache of tiles previously requseted from the tile provider. - Future clearTileCache(String tileOverlayId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [tileOverlayId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3199,7 +3108,8 @@ class MapsApi { - - /// Takes a snapshot of the map and returns its image data. - Future takeSnapshot() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3274,14 +3184,26 @@ abstract class MapsCallbackApi { - void onPoiTap(PlatformPointOfInterest poi); - - /// Called to get data for a map tile. -- Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); -+ Future getTileOverlayTile( -+ String tileOverlayId, -+ PlatformPoint location, -+ int zoom, -+ ); - -- static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { -- messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ static void setUp( -+ MapsCallbackApi? api, { -+ BinaryMessenger? binaryMessenger, -+ String messageChannelSuffix = '', -+ }) { -+ messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - { - final pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { -@@ -3291,41 +3213,54 @@ 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null.', -+ ); - final List args = (message as List?)!; -- final PlatformCameraPosition? arg_cameraPosition = (args[0] as PlatformCameraPosition?); -- assert(arg_cameraPosition != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.'); -+ final PlatformCameraPosition? arg_cameraPosition = -+ (args[0] as PlatformCameraPosition?); -+ assert( -+ arg_cameraPosition != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove was null, expected non-null PlatformCameraPosition.', -+ ); - try { - api.onCameraMove(arg_cameraPosition!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { -@@ -3335,373 +3270,502 @@ 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null.', -+ ); - final List args = (message as List?)!; - final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); -- assert(arg_position != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onTap(arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null.', -+ ); - final List args = (message as List?)!; - final PlatformLatLng? arg_position = (args[0] as PlatformLatLng?); -- assert(arg_position != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onLongPress(arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null.', -+ ); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); -- assert(arg_markerId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap was null, expected non-null String.', -+ ); - try { - api.onMarkerTap(arg_markerId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null.', -+ ); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); -- assert(arg_markerId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null String.', -+ ); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); -- assert(arg_position != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onMarkerDragStart(arg_markerId!, arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null.', -+ ); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); -- assert(arg_markerId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null String.', -+ ); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); -- assert(arg_position != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onMarkerDrag(arg_markerId!, arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null.', -+ ); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); -- assert(arg_markerId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null String.', -+ ); - final PlatformLatLng? arg_position = (args[1] as PlatformLatLng?); -- assert(arg_position != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.'); -+ assert( -+ arg_position != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd was null, expected non-null PlatformLatLng.', -+ ); - try { - api.onMarkerDragEnd(arg_markerId!, arg_position!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null.', -+ ); - final List args = (message as List?)!; - final String? arg_markerId = (args[0] as String?); -- assert(arg_markerId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.'); -+ assert( -+ arg_markerId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap was null, expected non-null String.', -+ ); - try { - api.onInfoWindowTap(arg_markerId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null.', -+ ); - final List args = (message as List?)!; - final String? arg_circleId = (args[0] as String?); -- assert(arg_circleId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null, expected non-null String.'); -+ assert( -+ arg_circleId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap was null, expected non-null String.', -+ ); - try { - api.onCircleTap(arg_circleId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null.', -+ ); - final List args = (message as List?)!; - final PlatformCluster? arg_cluster = (args[0] as PlatformCluster?); -- assert(arg_cluster != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.'); -+ assert( -+ arg_cluster != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap was null, expected non-null PlatformCluster.', -+ ); - try { - api.onClusterTap(arg_cluster!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null.', -+ ); - final List args = (message as List?)!; - final String? arg_polygonId = (args[0] as String?); -- assert(arg_polygonId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null, expected non-null String.'); -+ assert( -+ arg_polygonId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap was null, expected non-null String.', -+ ); - try { - api.onPolygonTap(arg_polygonId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null.', -+ ); - final List args = (message as List?)!; - final String? arg_polylineId = (args[0] as String?); -- assert(arg_polylineId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null, expected non-null String.'); -+ assert( -+ arg_polylineId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap was null, expected non-null String.', -+ ); - try { - api.onPolylineTap(arg_polylineId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null.', -+ ); - final List args = (message as List?)!; - final String? arg_groundOverlayId = (args[0] as String?); -- assert(arg_groundOverlayId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.'); -+ assert( -+ arg_groundOverlayId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap was null, expected non-null String.', -+ ); - try { - api.onGroundOverlayTap(arg_groundOverlayId!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null.', -+ ); - final List args = (message as List?)!; -- final PlatformPointOfInterest? arg_poi = (args[0] as PlatformPointOfInterest?); -- assert(arg_poi != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.'); -+ final PlatformPointOfInterest? arg_poi = -+ (args[0] as PlatformPointOfInterest?); -+ assert( -+ arg_poi != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPoiTap was null, expected non-null PlatformPointOfInterest.', -+ ); - try { - api.onPoiTap(arg_poi!); - 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 pigeonVar_channel = BasicMessageChannel( -- 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile', pigeonChannelCodec, -- binaryMessenger: binaryMessenger); -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile', -+ pigeonChannelCodec, -+ binaryMessenger: binaryMessenger, -+ ); - if (api == null) { - pigeonVar_channel.setMessageHandler(null); - } else { - pigeonVar_channel.setMessageHandler((Object? message) async { -- assert(message != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.'); -+ assert( -+ message != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null.', -+ ); - final List args = (message as List?)!; - final String? arg_tileOverlayId = (args[0] as String?); -- assert(arg_tileOverlayId != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.'); -+ assert( -+ arg_tileOverlayId != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null String.', -+ ); - final PlatformPoint? arg_location = (args[1] as PlatformPoint?); -- assert(arg_location != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.'); -+ assert( -+ arg_location != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null PlatformPoint.', -+ ); - final int? arg_zoom = (args[2] as int?); -- assert(arg_zoom != null, -- 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.'); -+ assert( -+ arg_zoom != null, -+ 'Argument for dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile was null, expected non-null int.', -+ ); - try { -- final PlatformTile output = await api.getTileOverlayTile(arg_tileOverlayId!, arg_location!, arg_zoom!); -+ final PlatformTile output = await api.getTileOverlayTile( -+ arg_tileOverlayId!, -+ arg_location!, -+ arg_zoom!, -+ ); - return wrapResponse(result: output); - } on PlatformException catch (e) { - return wrapResponse(error: e); -- } catch (e) { -- return wrapResponse(error: PlatformException(code: 'error', message: e.toString())); -+ } catch (e) { -+ return wrapResponse( -+ error: PlatformException(code: 'error', message: e.toString()), -+ ); - } - }); - } -@@ -3716,9 +3780,13 @@ 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 = ''}) -- : pigeonVar_binaryMessenger = binaryMessenger, -- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ MapsPlatformViewApi({ -+ BinaryMessenger? binaryMessenger, -+ String messageChannelSuffix = '', -+ }) : pigeonVar_binaryMessenger = binaryMessenger, -+ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); -@@ -3726,13 +3794,16 @@ class MapsPlatformViewApi { - final String pigeonVar_messageChannelSuffix; - - Future createView(PlatformMapViewCreationParams? type) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([type]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [type], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -3753,9 +3824,13 @@ 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 = ''}) -- : pigeonVar_binaryMessenger = binaryMessenger, -- pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.' : ''; -+ MapsInspectorApi({ -+ BinaryMessenger? binaryMessenger, -+ String messageChannelSuffix = '', -+ }) : pigeonVar_binaryMessenger = binaryMessenger, -+ pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty -+ ? '.' -+ : ''; - final BinaryMessenger? pigeonVar_binaryMessenger; - - static const MessageCodec pigeonChannelCodec = _PigeonCodec(); -@@ -3763,7 +3838,8 @@ class MapsInspectorApi { - final String pigeonVar_messageChannelSuffix; - - Future areBuildingsEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3790,7 +3866,8 @@ class MapsInspectorApi { - } - - Future areRotateGesturesEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3817,7 +3894,8 @@ class MapsInspectorApi { - } - - Future areScrollGesturesEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3844,7 +3922,8 @@ class MapsInspectorApi { - } - - Future areTiltGesturesEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3871,7 +3950,8 @@ class MapsInspectorApi { - } - - Future areZoomGesturesEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3898,7 +3978,8 @@ class MapsInspectorApi { - } - - Future isCompassEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3925,7 +4006,8 @@ class MapsInspectorApi { - } - - Future isMyLocationButtonEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3952,7 +4034,8 @@ class MapsInspectorApi { - } - - Future isTrafficEnabled() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -3979,13 +4062,16 @@ class MapsInspectorApi { - } - - Future getTileOverlayInfo(String tileOverlayId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([tileOverlayId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [tileOverlayId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -4000,14 +4086,19 @@ class MapsInspectorApi { - } - } - -- Future getGroundOverlayInfo(String groundOverlayId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo'; -+ Future getGroundOverlayInfo( -+ String groundOverlayId, -+ ) async { -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([groundOverlayId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [groundOverlayId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -4023,13 +4114,16 @@ class MapsInspectorApi { - } - - Future getHeatmapInfo(String heatmapId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([heatmapId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [heatmapId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -4045,7 +4139,8 @@ class MapsInspectorApi { - } - - Future getZoomRange() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, -@@ -4072,13 +4167,16 @@ class MapsInspectorApi { - } - - Future> getClusters(String clusterManagerId) async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, - binaryMessenger: pigeonVar_binaryMessenger, - ); -- final Future pigeonVar_sendFuture = pigeonVar_channel.send([clusterManagerId]); -+ final Future pigeonVar_sendFuture = pigeonVar_channel.send( -+ [clusterManagerId], -+ ); - final pigeonVar_replyList = await pigeonVar_sendFuture as List?; - if (pigeonVar_replyList == null) { - throw _createConnectionError(pigeonVar_channelName); -@@ -4094,12 +4192,14 @@ class MapsInspectorApi { - message: 'Host platform returned null value for non-null return value.', - ); - } else { -- return (pigeonVar_replyList[0] as List?)!.cast(); -+ return (pigeonVar_replyList[0] as List?)! -+ .cast(); - } - } - - Future getCameraPosition() async { -- final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition'; -+ final pigeonVar_channelName = -+ 'dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition'; - final pigeonVar_channel = BasicMessageChannel( - pigeonVar_channelName, - pigeonChannelCodec, diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart index fe2da120abf1..e786d3a3077d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pigeons/messages.dart @@ -239,14 +239,9 @@ class PlatformMarker { /// Pigeon equivalent of the Point of Interest class. class PlatformPointOfInterest { - PlatformPointOfInterest({ - required this.position, - this.name, - required this.placeId, - }); + PlatformPointOfInterest({required this.position, required this.placeId}); final PlatformLatLng position; - final String? name; final String placeId; } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml index eaf316617735..bd96631f56b9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml @@ -35,6 +35,7 @@ topics: - google-maps - google-maps-flutter - map + dependency_overrides: google_maps_flutter_platform_interface: path: ../google_maps_flutter_platform_interface diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart index b98fc01ea27f..3440eb7a81fe 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.dart @@ -1352,7 +1352,6 @@ void main() { test('onPoiTap sends events to correct stream', () async { const mapId = 1; final fakePosition = PlatformLatLng(latitude: 12.34, longitude: 56.78); - const fakeName = 'Googleplex'; const fakePlaceId = 'iso_id_123'; final maps = GoogleMapsFlutterIOS(); @@ -1365,11 +1364,7 @@ void main() { // Simulate a message from the native side via the Pigeon generated handler callbackHandler.onPoiTap( - PlatformPointOfInterest( - position: fakePosition, - name: fakeName, - placeId: fakePlaceId, - ), + PlatformPointOfInterest(position: fakePosition, placeId: fakePlaceId), ); // Verify the event in the stream @@ -1379,7 +1374,6 @@ void main() { final PointOfInterest poi = event.value; expect(poi.position.latitude, fakePosition.latitude); expect(poi.position.longitude, fakePosition.longitude); - expect(poi.name, fakeName); expect(poi.placeId, fakePlaceId); }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart index d7d9d3efb38b..e1d26518ca10 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart @@ -232,7 +232,6 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform { mapId, PointOfInterest( position: LatLng.fromJson(arguments['position'])!, - name: arguments['name']! as String, placeId: arguments['placeId']! as String, ), ), diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart index 80372b6b38f8..a55b0caa7af3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/platform_interface/google_maps_flutter_platform.dart @@ -371,7 +371,7 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface { /// A [PointOfInterest] has been tapped. Stream onPoiTap({required int mapId}) { - throw UnimplementedError('onPoiTap() has not been implemented.'); + return const Stream.empty(); } /// A [Polyline] has been tapped. diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/point_of_interest.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/point_of_interest.dart index 33b47b43de34..1d2b900d7dd9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/point_of_interest.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/point_of_interest.dart @@ -12,18 +12,11 @@ import 'types.dart'; @immutable class PointOfInterest { /// Creates an immutable representation of a point of interest. - const PointOfInterest({ - required this.position, - this.name, - required this.placeId, - }); + const PointOfInterest({required this.position, required this.placeId}); /// The geographical location of the POI. final LatLng position; - /// The name of the POI (e.g., "Googleplex"). - final String? name; - /// The unique Place ID defined by Google (e.g., "ChIJj61dQgK6j4AR4GeTYWZsKWw"). final String placeId; @@ -37,15 +30,14 @@ class PointOfInterest { } return other is PointOfInterest && position == other.position && - name == other.name && placeId == other.placeId; } @override - int get hashCode => Object.hash(position, name, placeId); + int get hashCode => Object.hash(position, placeId); @override String toString() { - return 'PointOfInterest{position: $position, name: $name, placeId: $placeId}'; + return 'PointOfInterest{position: $position, placeId: $placeId}'; } } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/method_channel/method_channel_google_maps_flutter_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/method_channel/method_channel_google_maps_flutter_test.dart index caa12fbb7d98..5da820c537bc 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/method_channel/method_channel_google_maps_flutter_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/method_channel/method_channel_google_maps_flutter_test.dart @@ -150,7 +150,6 @@ void main() { final poiData = { 'placeId': 'place123', - 'name': 'Googleplex', 'position': [37.422, -122.084], }; @@ -166,7 +165,6 @@ void main() { ); expect(events.length, 1); - expect(events[0].value.name, 'Googleplex'); expect(events[0].value.placeId, 'place123'); }); }); diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart index 10be2cd4ecb1..b5fc1bce2888 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/platform_interface/google_maps_flutter_platform_test.dart @@ -155,11 +155,11 @@ void main() { ); }); - test('onPoiTap default implementation throws UnimplementedError', () { + test('onPoiTap default implementation returns an empty stream', () { final platform = ExtendsGoogleMapsFlutterPlatform(); - // Most stream methods in the platform interface should provide a stream or throw. - // Verify that your new onPoiTap is reachable. - expect(() => platform.onPoiTap(mapId: 0), throwsUnimplementedError); + // The default implementation should now return a stream, not throw. + final Stream stream = platform.onPoiTap(mapId: 0); + expect(stream, isA>()); }); } diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/point_of_interest_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/point_of_interest_test.dart index b25e43629d64..631b4c89a8a2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/point_of_interest_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/point_of_interest_test.dart @@ -10,54 +10,24 @@ void main() { test('constructor with all named parameters', () { const poi = PointOfInterest( position: LatLng(10.0, 20.0), - name: 'Test Name', placeId: 'test_id', ); expect(poi.position, const LatLng(10.0, 20.0)); - expect(poi.name, 'Test Name'); expect(poi.placeId, 'test_id'); }); - test('constructor with null name (Web support)', () { - const poi = PointOfInterest( - position: LatLng(10.0, 20.0), - placeId: 'test_id', - ); - expect(poi.name, isNull); - }); - test('equality', () { - const poi1 = PointOfInterest( - position: LatLng(10.0, 20.0), - name: 'A', - placeId: 'ID', - ); - const poi2 = PointOfInterest( - position: LatLng(10.0, 20.0), - name: 'A', - placeId: 'ID', - ); - const poi3 = PointOfInterest( - position: LatLng(10.1, 20.0), - name: 'A', - placeId: 'ID', - ); + const poi1 = PointOfInterest(position: LatLng(10.0, 20.0), placeId: 'ID'); + const poi2 = PointOfInterest(position: LatLng(10.0, 20.0), placeId: 'ID'); + const poi3 = PointOfInterest(position: LatLng(10.1, 20.0), placeId: 'ID'); expect(poi1, poi2); expect(poi1, isNot(poi3)); }); test('hashCode', () { - const poi1 = PointOfInterest( - position: LatLng(10.0, 20.0), - name: 'A', - placeId: 'ID', - ); - const poi2 = PointOfInterest( - position: LatLng(10.0, 20.0), - name: 'A', - placeId: 'ID', - ); + const poi1 = PointOfInterest(position: LatLng(10.0, 20.0), placeId: 'ID'); + const poi2 = PointOfInterest(position: LatLng(10.0, 20.0), placeId: 'ID'); expect(poi1.hashCode, poi2.hashCode); }); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml index f76e0d8e3e6b..4cd1b3a375bb 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml @@ -27,6 +27,7 @@ dev_dependencies: flutter: assets: - assets/ + dependency_overrides: google_maps_flutter: path: ../../google_maps_flutter @@ -37,4 +38,4 @@ dependency_overrides: google_maps_flutter_platform_interface: path: ../../google_maps_flutter_platform_interface google_maps_flutter_web: - path: ../ + path: ../../google_maps_flutter_web diff --git a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml index 1f2bab482905..2fcaf64d63f3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml @@ -40,6 +40,14 @@ topics: # The example deliberately includes limited-use secrets. false_secrets: - /example/web/index.html + dependency_overrides: + google_maps_flutter: + path: ../google_maps_flutter + google_maps_flutter_android: + path: ../google_maps_flutter_android + google_maps_flutter_ios: + path: ../google_maps_flutter_ios google_maps_flutter_platform_interface: path: ../google_maps_flutter_platform_interface + From 28b709bb7f2314adc3163a4d3cc63fd4fba482f9 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Fri, 13 Feb 2026 01:14:20 +0530 Subject: [PATCH 37/46] [google_maps_flutter] updated formatting errors --- .../example/ios/RunnerTests/GoogleMapsTests.m | 4 +-- .../GoogleMapController.m | 1 - .../google_maps_flutter_pigeon_messages.g.m | 30 +++++++++---------- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m index d8a569196b83..ce4eb09fb210 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m @@ -260,14 +260,12 @@ - (void)testDidTapPOI { controller.dartCallbackHandler = mockHandler; NSString *placeId = @"test_place_id"; - NSString *name = @"Test POI Name"; CLLocationCoordinate2D location = CLLocationCoordinate2DMake(10.0, 20.0); - [controller mapView:mapView didTapPOIWithPlaceID:placeId name:name location:location]; + [controller mapView:mapView didTapPOIWithPlaceID:placeId location:location]; XCTAssertNotNil(mockHandler.lastPoiTap, @"The POI tap should have been recorded."); XCTAssertEqualObjects(mockHandler.lastPoiTap.placeId, placeId); - XCTAssertEqualObjects(mockHandler.lastPoiTap.name, name); XCTAssertEqual(mockHandler.lastPoiTap.position.latitude, 10.0); XCTAssertEqual(mockHandler.lastPoiTap.position.longitude, 20.0); } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m index 6b7ce10fcb50..3c34f36b1440 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m @@ -562,7 +562,6 @@ - (void)mapView:(GMSMapView *)mapView didTapAtCoordinate:(CLLocationCoordinate2D - (void)mapView:(GMSMapView *)mapView didTapPOIWithPlaceID:(NSString *)placeID - name:(NSString *)name location:(CLLocationCoordinate2D)location { FGMPlatformPointOfInterest *poi = [FGMPlatformPointOfInterest makeWithPosition:FGMGetPigeonLatLngForCoordinate(location) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m index 58dd35dcce31..edee312560d4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m @@ -2269,11 +2269,11 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, binaryMessenger:binaryMessenger codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(updatePolylinesByAdding:changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updatePolylinesByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updatePolylinesByAdding: + changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updatePolylinesByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); @@ -2300,11 +2300,11 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, binaryMessenger:binaryMessenger codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(updateTileOverlaysByAdding:changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateTileOverlaysByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateTileOverlaysByAdding: + changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateTileOverlaysByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); @@ -2331,11 +2331,11 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, binaryMessenger:binaryMessenger codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(updateGroundOverlaysByAdding:changing:removing:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(updateGroundOverlaysByAdding:changing:removing:error:)", - api); + NSCAssert([api respondsToSelector:@selector(updateGroundOverlaysByAdding: + changing:removing:error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(updateGroundOverlaysByAdding:changing:removing:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_toAdd = GetNullableObjectAtIndex(args, 0); From 25899828b9e822e86d49f7cc1b6d54690fbe608d Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Fri, 13 Feb 2026 01:14:36 +0530 Subject: [PATCH 38/46] [google_maps_flutter] updated pubspecs to use dart sdk 3.8.0 --- .../google_maps_flutter_android/pubspec.yaml | 4 ++-- .../google_maps_flutter/google_maps_flutter_ios/pubspec.yaml | 4 ++-- .../google_maps_flutter/google_maps_flutter_web/pubspec.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) 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 fafadfb8f91a..1fb9a8d7f6ec 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml @@ -5,8 +5,8 @@ issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+ version: 2.19.0 environment: - sdk: ^3.9.0 - flutter: ">=3.35.0" + sdk: ^3.8.0 + flutter: ">=3.32.0" flutter: plugin: diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml index bd96631f56b9..4482f57d458d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml @@ -5,8 +5,8 @@ issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+ version: 2.18.0 environment: - sdk: ^3.9.0 - flutter: ">=3.35.0" + sdk: ^3.8.0 + flutter: ">=3.32.0" flutter: plugin: diff --git a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml index 2fcaf64d63f3..07902660013f 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml @@ -5,8 +5,8 @@ issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+ version: 0.6.0 environment: - sdk: ^3.9.0 - flutter: ">=3.35.0" + sdk: ^3.8.0 + flutter: ">=3.32.0" flutter: plugin: From 5acc132f761277f92beb55af34af39ddf2eaebf9 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Fri, 13 Feb 2026 01:25:57 +0530 Subject: [PATCH 39/46] [google_maps_flutter] updated web version to 0.7.0 --- .../google_maps_flutter/google_maps_flutter_web/CHANGELOG.md | 3 +-- .../google_maps_flutter/google_maps_flutter_web/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md index faa5ff6c37fe..538e563e6833 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md @@ -1,7 +1,6 @@ -## 0.6.0 +## 0.7.0 * Added support for Tap detection on Point of Interest. -* Updates minimum supported SDK version to Flutter 3.35/Dart 3.9. ## 0.5.14+3 diff --git a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml index 07902660013f..022b36139a70 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter_web description: Web platform implementation of google_maps_flutter repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_web issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 0.6.0 +version: 0.7.0 environment: sdk: ^3.8.0 From 9d9139c25e1da6b2189b41cbe5d8140364485439 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Fri, 13 Feb 2026 01:26:18 +0530 Subject: [PATCH 40/46] [google_maps_flutter] removed name from onPoiClick tests --- .../io/flutter/plugins/googlemaps/GoogleMapControllerTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java index 8bb8d59da545..ec3a49ac1489 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java @@ -324,7 +324,7 @@ public void getCameraPositionReturnsCorrectData() { @Test public void onPoiClick() { GoogleMapController controller = getGoogleMapControllerWithMockedDependencies(); - PointOfInterest poi = new PointOfInterest(new LatLng(1.0, 2.0), "placeId", "name"); + PointOfInterest poi = new PointOfInterest(new LatLng(1.0, 2.0), "placeId"); controller.onPoiClick(poi); @@ -334,7 +334,6 @@ public void onPoiClick() { verify(flutterApi).onPoiTap(poiCaptor.capture(), any(Messages.VoidResult.class)); Messages.PlatformPointOfInterest capturedPoi = poiCaptor.getValue(); - assertEquals("name", capturedPoi.getName()); assertEquals("placeId", capturedPoi.getPlaceId()); assertEquals(1.0, capturedPoi.getPosition().getLatitude(), 1e-6); assertEquals(2.0, capturedPoi.getPosition().getLongitude(), 1e-6); From b57aba03f585d8be1e1ea923fd92dff9315428e2 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Fri, 13 Feb 2026 11:58:26 +0530 Subject: [PATCH 41/46] [google_maps_flutter] updated format --- .../google_maps_flutter_pigeon_messages.g.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m index edee312560d4..3ad79d71fc2b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m @@ -2564,11 +2564,11 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, binaryMessenger:binaryMessenger codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)], - @"FGMMapsApi api (%@) doesn't respond to " - @"@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)", - api); + NSCAssert([api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier: + error:)], + @"FGMMapsApi api (%@) doesn't respond to " + @"@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_markerId = GetNullableObjectAtIndex(args, 0); From 679b64f90bfe9a48aaab9cc34a6d7c5a05219e41 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Fri, 13 Feb 2026 11:59:02 +0530 Subject: [PATCH 42/46] [google_maps_flutter] added the name field --- .../flutter/plugins/googlemaps/GoogleMapControllerTest.java | 2 +- .../example/ios/RunnerTests/GoogleMapsTests.m | 1 + .../Sources/google_maps_flutter_ios/GoogleMapController.m | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java index ec3a49ac1489..0bacd60a4c86 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/test/java/io/flutter/plugins/googlemaps/GoogleMapControllerTest.java @@ -324,7 +324,7 @@ public void getCameraPositionReturnsCorrectData() { @Test public void onPoiClick() { GoogleMapController controller = getGoogleMapControllerWithMockedDependencies(); - PointOfInterest poi = new PointOfInterest(new LatLng(1.0, 2.0), "placeId"); + PointOfInterest poi = new PointOfInterest(new LatLng(1.0, 2.0), "placeId", "name"); controller.onPoiClick(poi); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m index ce4eb09fb210..6c6591818904 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/RunnerTests/GoogleMapsTests.m @@ -260,6 +260,7 @@ - (void)testDidTapPOI { controller.dartCallbackHandler = mockHandler; NSString *placeId = @"test_place_id"; + NSString *name = @"Test POI Name"; CLLocationCoordinate2D location = CLLocationCoordinate2DMake(10.0, 20.0); [controller mapView:mapView didTapPOIWithPlaceID:placeId location:location]; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m index 3c34f36b1440..8281d5c1b8e4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m @@ -562,11 +562,11 @@ - (void)mapView:(GMSMapView *)mapView didTapAtCoordinate:(CLLocationCoordinate2D - (void)mapView:(GMSMapView *)mapView didTapPOIWithPlaceID:(NSString *)placeID + name:(NSString *)name location:(CLLocationCoordinate2D)location { FGMPlatformPointOfInterest *poi = [FGMPlatformPointOfInterest makeWithPosition:FGMGetPigeonLatLngForCoordinate(location) - placeId:placeID]; - + placeId:placeID [self.dartCallbackHandler didTapPointOfInterest:poi completion:^(FlutterError *_Nullable _){ }]; From f7cd0a25c32a7433a22ea0d99bfcf6f725cf995d Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Fri, 13 Feb 2026 12:00:50 +0530 Subject: [PATCH 43/46] [google_maps_flutter] downgraded sdk version in examples --- .../example/pubspec.yaml | 4 ++-- .../example/pubspec.yaml | 4 ++-- .../example/pubspec.yaml | 23 +++---------------- 3 files changed, 7 insertions(+), 24 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml index e88bfe93c836..3901e13664b5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml @@ -3,8 +3,8 @@ description: Demonstrates how to use the google_maps_flutter plugin. publish_to: none environment: - sdk: ^3.9.0 - flutter: ">=3.35.0" + sdk: ^3.8.0 + flutter: ">=3.32.0" dependencies: cupertino_icons: ^1.0.5 diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml index 7eb431ce82d5..9f68a6eaea39 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml @@ -3,8 +3,8 @@ description: Demonstrates how to use the google_maps_flutter plugin. publish_to: none environment: - sdk: ^3.9.0 - flutter: ">=3.35.0" + sdk: ^3.8.0 + flutter: ">=3.32.0" dependencies: cupertino_icons: ^1.0.5 diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml index 4cd1b3a375bb..85db692cfd6e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml @@ -2,8 +2,8 @@ name: google_maps_flutter_web_integration_tests publish_to: none environment: - sdk: ^3.9.0 - flutter: ">=3.35.0" + sdk: ^3.8.0 + flutter: ">=3.32.0" dependencies: flutter: @@ -21,21 +21,4 @@ dev_dependencies: google_maps_flutter: ^2.2.0 # Needed for projection_test.dart http: ^1.2.2 integration_test: - sdk: flutter - mockito: ^5.4.4 - -flutter: - assets: - - assets/ - -dependency_overrides: - google_maps_flutter: - path: ../../google_maps_flutter - google_maps_flutter_android: - path: ../../google_maps_flutter_android - google_maps_flutter_ios: - path: ../../google_maps_flutter_ios - google_maps_flutter_platform_interface: - path: ../../google_maps_flutter_platform_interface - google_maps_flutter_web: - path: ../../google_maps_flutter_web + \ No newline at end of file From f1480dd24ff3df83fb82dcf1327d64a384918f4b Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Fri, 13 Feb 2026 12:07:01 +0530 Subject: [PATCH 44/46] [google_maps_flutter] updated web version to use 0.5.15 --- packages/google_maps_flutter/google_maps_flutter/pubspec.yaml | 2 +- .../google_maps_flutter/google_maps_flutter_web/CHANGELOG.md | 2 +- .../google_maps_flutter/google_maps_flutter_web/pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index 40538d798cea..0a3dff7ffea3 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: google_maps_flutter_android: ^2.19.0 google_maps_flutter_ios: ^2.18.0 google_maps_flutter_platform_interface: ^2.15.0 - google_maps_flutter_web: ^0.6.0 + google_maps_flutter_web: ^0.5.15 dev_dependencies: flutter_test: diff --git a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md index 538e563e6833..543b32c2d353 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.7.0 +## 0.5.15 * Added support for Tap detection on Point of Interest. diff --git a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml index 022b36139a70..ba40d8618ea1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter_web description: Web platform implementation of google_maps_flutter repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_web issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 0.7.0 +version: 0.5.15 environment: sdk: ^3.8.0 From 89450b3f09d7f882d3c80d088ac6c80a65007da1 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Fri, 13 Feb 2026 12:42:31 +0530 Subject: [PATCH 45/46] [google_maps_flutter] updated pubspecs for dependency overrides --- .../google_maps_flutter/example/pubspec.yaml | 4 ++++ .../example/pubspec.yaml | 20 +++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml index 6c7a96388ccd..f73e16833ae0 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml @@ -35,9 +35,13 @@ flutter: - assets/ dependency_overrides: + google_maps_flutter: + path: ../ google_maps_flutter_android: path: ../../google_maps_flutter_android google_maps_flutter_ios: path: ../../google_maps_flutter_ios google_maps_flutter_platform_interface: path: ../../google_maps_flutter_platform_interface + google_maps_flutter_web: + path: ../../google_maps_flutter_web diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml index 85db692cfd6e..532c63cbba21 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml @@ -2,13 +2,13 @@ name: google_maps_flutter_web_integration_tests publish_to: none environment: - sdk: ^3.8.0 - flutter: ">=3.32.0" + sdk: ^3.9.0 + flutter: ">=3.35.0" dependencies: flutter: sdk: flutter - google_maps_flutter_platform_interface: ^2.15.0 + google_maps_flutter_platform_interface: ^2.14.0 google_maps_flutter_web: path: ../ web: ^1.0.0 @@ -21,4 +21,16 @@ dev_dependencies: google_maps_flutter: ^2.2.0 # Needed for projection_test.dart http: ^1.2.2 integration_test: - \ No newline at end of file + sdk: flutter + mockito: ^5.4.4 + +flutter: + assets: + - assets/ + +dependency_overrides: + google_maps_flutter_platform_interface: + path: ../../google_maps_flutter_platform_interface + google_maps_flutter_web: + path: ../ + \ No newline at end of file From d0f16d6e96ed177961ac3d7c475d5dbbf935aa05 Mon Sep 17 00:00:00 2001 From: Asim Roy Chowdhury Date: Fri, 13 Feb 2026 20:15:46 +0530 Subject: [PATCH 46/46] [google_maps_flutter] updated google_maps_flutter example pubspec and resolved syntax error --- .../google_maps_flutter/example/pubspec.yaml | 2 -- .../Sources/google_maps_flutter_ios/GoogleMapController.m | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml index f73e16833ae0..1ab05458f51f 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml @@ -35,8 +35,6 @@ flutter: - assets/ dependency_overrides: - google_maps_flutter: - path: ../ google_maps_flutter_android: path: ../../google_maps_flutter_android google_maps_flutter_ios: diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m index 8281d5c1b8e4..5d415aa3ae3d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.m @@ -566,7 +566,7 @@ - (void)mapView:(GMSMapView *)mapView location:(CLLocationCoordinate2D)location { FGMPlatformPointOfInterest *poi = [FGMPlatformPointOfInterest makeWithPosition:FGMGetPigeonLatLngForCoordinate(location) - placeId:placeID + placeId:placeID]; [self.dartCallbackHandler didTapPointOfInterest:poi completion:^(FlutterError *_Nullable _){ }];