diff --git a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md index 5e0229a484a8..8315da2a43bd 100644 --- a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.17.1 + +* Adds support for `CameraUpdate.newLatLngBoundsWithEdgeInsets`. + ## 2.17.0 * Adds missing re-exports of classes related to advanced markers. diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index c2d0c564b7f3..0342292634b8 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.17.0 +version: 2.17.1 environment: sdk: ^3.10.0 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 bdad55260cc1..9ddf58fec82e 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 @@ -3,6 +3,7 @@ // found in the LICENSE file. import 'dart:async'; +import 'dart:math'; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; @@ -406,20 +407,134 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { CameraUpdate cameraUpdate, CameraUpdateAnimationConfiguration configuration, { required int mapId, - }) { + }) async { + var effective = cameraUpdate; + if (cameraUpdate is CameraUpdateNewLatLngBoundsWithEdgeInsets) { + final CameraPosition pos = await _computeBoundsWithEdgeInsets( + cameraUpdate.bounds, + cameraUpdate.padding, + mapId, + ); + effective = CameraUpdate.newCameraPosition(pos); + } return _hostApi(mapId).animateCamera( - _platformCameraUpdateFromCameraUpdate(cameraUpdate), + _platformCameraUpdateFromCameraUpdate(effective), configuration.duration?.inMilliseconds, ); } @override - Future moveCamera(CameraUpdate cameraUpdate, {required int mapId}) { + Future moveCamera( + CameraUpdate cameraUpdate, { + required int mapId, + }) async { + var effective = cameraUpdate; + if (cameraUpdate is CameraUpdateNewLatLngBoundsWithEdgeInsets) { + final CameraPosition pos = await _computeBoundsWithEdgeInsets( + cameraUpdate.bounds, + cameraUpdate.padding, + mapId, + ); + effective = CameraUpdate.newCameraPosition(pos); + } return _hostApi( mapId, - ).moveCamera(_platformCameraUpdateFromCameraUpdate(cameraUpdate)); + ).moveCamera(_platformCameraUpdateFromCameraUpdate(effective)); } + static const double _kMercatorTileSize = 256.0; + + /// Computes a [CameraPosition] that fits [bounds] within the map viewport + /// minus [padding]. + /// + /// Uses Web Mercator projection to calculate the zoom level and offset + /// center from the current map dimensions. + Future _computeBoundsWithEdgeInsets( + LatLngBounds bounds, + EdgeInsets padding, + int mapId, + ) async { + final double currentZoom = await getZoomLevel(mapId: mapId); + final LatLngBounds region = await getVisibleRegion(mapId: mapId); + final double scale = pow(2.0, currentZoom).toDouble(); + + double regionLngSpan = + region.northeast.longitude - region.southwest.longitude; + if (regionLngSpan <= 0) { + regionLngSpan += 360; + } + final double mapWidthDp = + regionLngSpan / 360.0 * _kMercatorTileSize * scale; + + final double regionNeY = _mercatorY(region.northeast.latitude); + final double regionSwY = _mercatorY(region.southwest.latitude); + final double mapHeightDp = + (regionSwY - regionNeY) * _kMercatorTileSize * scale; + + final double availW = mapWidthDp - padding.left - padding.right; + final double availH = mapHeightDp - padding.top - padding.bottom; + + final LatLng ne = bounds.northeast; + final LatLng sw = bounds.southwest; + double lngSpan = ne.longitude - sw.longitude; + if (lngSpan <= 0) { + lngSpan += 360; + } + + final double neY = _mercatorY(ne.latitude); + final double swY = _mercatorY(sw.latitude); + final double latSpanMerc = (swY - neY).abs(); + + final double centerLat = (ne.latitude + sw.latitude) / 2; + double centerLng = (ne.longitude + sw.longitude) / 2; + if (ne.longitude < sw.longitude) { + centerLng += 180; + if (centerLng > 180) { + centerLng -= 360; + } + } + + if (availW <= 0 || availH <= 0) { + return CameraPosition( + target: LatLng(centerLat, centerLng), + zoom: currentZoom, + ); + } + + final double zoomLng = _log2( + availW / (lngSpan / 360.0 * _kMercatorTileSize), + ); + final double zoomLat = _log2(availH / (latSpanMerc * _kMercatorTileSize)); + final double zoom = min(zoomLng, zoomLat); + + final double targetScale = pow(2.0, zoom).toDouble(); + final double lngPerDp = 360.0 / (_kMercatorTileSize * targetScale); + final double offsetLng = (padding.right - padding.left) / 2 * lngPerDp; + + final double centerMercY = _mercatorY(centerLat); + final double centerPxY = centerMercY * _kMercatorTileSize * targetScale; + final double offsetPxY = centerPxY + (padding.bottom - padding.top) / 2; + final double offsetLat = _inverseMercatorY( + offsetPxY / (_kMercatorTileSize * targetScale), + ); + + return CameraPosition( + target: LatLng(offsetLat, centerLng + offsetLng), + zoom: zoom, + ); + } + + static double _mercatorY(double lat) { + final double latRad = lat * pi / 180; + return (1 - log(tan(latRad) + 1 / cos(latRad)) / pi) / 2; + } + + static double _inverseMercatorY(double y) { + return (2 * atan(exp(pi * (1 - 2 * y))) - pi / 2) * 180 / pi; + } + + static double _log2(double x) => log(x) / ln2; + @override Future setMapStyle(String? mapStyle, {required int mapId}) async { final bool success = await _hostApi(mapId).setStyle(mapStyle ?? ''); @@ -1007,6 +1122,13 @@ class GoogleMapsFlutterAndroid extends GoogleMapsFlutterPlatform { dy: update.dy, ), ); + case CameraUpdateType.newLatLngBoundsWithEdgeInsets: + // Requires async platform calls (getZoomLevel, getVisibleRegion) to + // compute the polyfill, so it is handled in moveCamera/animateCamera + // before reaching this static sync method. + throw StateError( + 'newLatLngBoundsWithEdgeInsets should be unreachable here.', + ); } } 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 dea5e50d236c..d2684de0ae8d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml @@ -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.16.0 stream_transform: ^2.0.0 dev_dependencies: 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 089a5e191ee3..1f912e7b9abe 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 @@ -1673,4 +1673,113 @@ void main() { PlatformMarkerType.marker, ); }); + + group('newLatLngBoundsWithEdgeInsets polyfill', () { + void stubMapState(MockMapsApi api, {required double zoom}) { + when(api.getZoomLevel()).thenAnswer((_) async => zoom); + when(api.getVisibleRegion()).thenAnswer( + (_) async => PlatformLatLngBounds( + southwest: PlatformLatLng(latitude: -10, longitude: -20), + northeast: PlatformLatLng(latitude: 10, longitude: 20), + ), + ); + } + + test( + 'moveCamera with symmetric padding produces centered result', + () async { + const mapId = 1; + final (GoogleMapsFlutterAndroid maps, MockMapsApi api) = setUpMockMap( + mapId: mapId, + ); + stubMapState(api, zoom: 5); + + final bounds = LatLngBounds( + southwest: const LatLng(-1, -1), + northeast: const LatLng(1, 1), + ); + await maps.moveCamera( + CameraUpdate.newLatLngBoundsWithEdgeInsets( + bounds, + const EdgeInsets.all(50), + ), + mapId: mapId, + ); + + final verification = verify(api.moveCamera(captureAny)); + final passedUpdate = verification.captured[0] as PlatformCameraUpdate; + final pos = + passedUpdate.cameraUpdate as PlatformCameraUpdateNewCameraPosition; + expect(pos.cameraPosition.target.latitude, closeTo(0, 0.01)); + expect(pos.cameraPosition.target.longitude, closeTo(0, 0.01)); + expect(pos.cameraPosition.zoom, greaterThan(0)); + }, + ); + + test('moveCamera with bottom-heavy padding shifts center upward', () async { + const mapId = 1; + final (GoogleMapsFlutterAndroid maps, MockMapsApi api) = setUpMockMap( + mapId: mapId, + ); + stubMapState(api, zoom: 5); + + final bounds = LatLngBounds( + southwest: const LatLng(-1, -1), + northeast: const LatLng(1, 1), + ); + await maps.moveCamera( + CameraUpdate.newLatLngBoundsWithEdgeInsets( + bounds, + const EdgeInsets.only(bottom: 200), + ), + mapId: mapId, + ); + + final verification = verify(api.moveCamera(captureAny)); + final passedUpdate = verification.captured[0] as PlatformCameraUpdate; + final pos = + passedUpdate.cameraUpdate as PlatformCameraUpdateNewCameraPosition; + expect( + pos.cameraPosition.target.latitude, + lessThan(0), + reason: + 'Bottom-heavy padding should shift the center south (negative latitude)', + ); + expect(pos.cameraPosition.target.longitude, closeTo(0, 0.01)); + }); + + test( + 'moveCamera with right-heavy padding shifts center rightward', + () async { + const mapId = 1; + final (GoogleMapsFlutterAndroid maps, MockMapsApi api) = setUpMockMap( + mapId: mapId, + ); + stubMapState(api, zoom: 5); + + final bounds = LatLngBounds( + southwest: const LatLng(-1, -1), + northeast: const LatLng(1, 1), + ); + await maps.moveCamera( + CameraUpdate.newLatLngBoundsWithEdgeInsets( + bounds, + const EdgeInsets.only(right: 200), + ), + mapId: mapId, + ); + + final verification = verify(api.moveCamera(captureAny)); + final passedUpdate = verification.captured[0] as PlatformCameraUpdate; + final pos = + passedUpdate.cameraUpdate as PlatformCameraUpdateNewCameraPosition; + expect(pos.cameraPosition.target.latitude, closeTo(0, 0.01)); + expect( + pos.cameraPosition.target.longitude, + greaterThan(0), + reason: 'Right-heavy padding should shift the center eastward', + ); + }, + ); + }); } 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 179691037daf..f4a5318b0e56 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.19.0 + +* Adds support for `CameraUpdate.newLatLngBoundsWithEdgeInsets`. + ## 2.18.1 * Removes conditional header logic that broke add-to-app builds. diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMConversionUtils.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMConversionUtils.m index 001ebc30cbfa..2886bdf8da69 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMConversionUtils.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMConversionUtils.m @@ -241,6 +241,14 @@ GMSCollisionBehavior FGMGetCollisionBehaviorForPigeonCollisionBehavior( return [GMSCameraUpdate fitBounds:FGMGetCoordinateBoundsForPigeonLatLngBounds(typedUpdate.bounds) withPadding:typedUpdate.padding]; + } else if ([update isKindOfClass:[FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets class]]) { + FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *typedUpdate = + (FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)update; + FGMPlatformEdgeInsets *padding = typedUpdate.padding; + return + [GMSCameraUpdate fitBounds:FGMGetCoordinateBoundsForPigeonLatLngBounds(typedUpdate.bounds) + withEdgeInsets:UIEdgeInsetsMake(padding.top, padding.left, + padding.bottom, padding.right)]; } else if ([update isKindOfClass:[FGMPlatformCameraUpdateNewLatLngZoom class]]) { FGMPlatformCameraUpdateNewLatLngZoom *typedUpdate = (FGMPlatformCameraUpdateNewLatLngZoom *)update; 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 3302fd9e13b8..0bfc5b66502d 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,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.3.3), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "google_maps_flutter_pigeon_messages.g.h" @@ -12,6 +12,96 @@ @import Flutter; #endif +static BOOL __attribute__((unused)) FLTPigeonDeepEquals(id _Nullable a, id _Nullable b) { + if (a == b) { + return YES; + } + if (a == nil) { + return b == [NSNull null]; + } + if (b == nil) { + return a == [NSNull null]; + } + if ([a isKindOfClass:[NSNumber class]] && [b isKindOfClass:[NSNumber class]]) { + return [a isEqual:b] || (isnan([(NSNumber *)a doubleValue]) && isnan([(NSNumber *)b doubleValue])); + } + if ([a isKindOfClass:[NSArray class]] && [b isKindOfClass:[NSArray class]]) { + NSArray *arrayA = (NSArray *)a; + NSArray *arrayB = (NSArray *)b; + if (arrayA.count != arrayB.count) { + return NO; + } + for (NSUInteger i = 0; i < arrayA.count; i++) { + if (!FLTPigeonDeepEquals(arrayA[i], arrayB[i])) { + return NO; + } + } + return YES; + } + if ([a isKindOfClass:[NSDictionary class]] && [b isKindOfClass:[NSDictionary class]]) { + NSDictionary *dictA = (NSDictionary *)a; + NSDictionary *dictB = (NSDictionary *)b; + if (dictA.count != dictB.count) { + return NO; + } + for (id keyA in dictA) { + id valueA = dictA[keyA]; + BOOL found = NO; + for (id keyB in dictB) { + if (FLTPigeonDeepEquals(keyA, keyB)) { + id valueB = dictB[keyB]; + if (FLTPigeonDeepEquals(valueA, valueB)) { + found = YES; + break; + } else { + return NO; + } + } + } + if (!found) { + return NO; + } + } + return YES; + } + return [a isEqual:b]; +} + +static NSUInteger __attribute__((unused)) FLTPigeonDeepHash(id _Nullable value) { + if (value == nil || value == (id)[NSNull null]) { + return 0; + } + if ([value isKindOfClass:[NSNumber class]]) { + NSNumber *n = (NSNumber *)value; + double d = n.doubleValue; + if (isnan(d)) { + // Normalize NaN to a consistent hash. + return (NSUInteger)0x7FF8000000000000; + } + if (d == 0.0) { + // Normalize -0.0 to 0.0 so they have the same hash code. + d = 0.0; + } + return @(d).hash; + } + if ([value isKindOfClass:[NSArray class]]) { + NSUInteger result = 1; + for (id item in (NSArray *)value) { + result = result * 31 + FLTPigeonDeepHash(item); + } + return result; + } + if ([value isKindOfClass:[NSDictionary class]]) { + NSUInteger result = 0; + NSDictionary *dict = (NSDictionary *)value; + for (id key in dict) { + result += ((FLTPigeonDeepHash(key) * 31) ^ FLTPigeonDeepHash(dict[key])); + } + return result; + } + return [value hash]; +} + static NSArray *wrapResult(id result, FlutterError *error) { if (error) { return @[ @@ -22,12 +112,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) { @@ -46,7 +131,7 @@ - (instancetype)initWithValue:(FGMPlatformMapType)value { } @end -/// Pigeon equivalent of MarkerCollisionBehavior. +/// Pigeon equivalent of the MarkerCollisionBehavior enum. @implementation FGMPlatformMarkerCollisionBehaviorBox - (instancetype)initWithValue:(FGMPlatformMarkerCollisionBehavior)value { self = [super init]; @@ -130,6 +215,12 @@ + (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray *)toList; @end +@interface FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets () ++ (FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)fromList:(NSArray *)list; ++ (nullable FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)nullableFromList:(NSArray *)list; +- (NSArray *)toList; +@end + @interface FGMPlatformCameraUpdateNewLatLngZoom () + (FGMPlatformCameraUpdateNewLatLngZoom *)fromList:(NSArray *)list; + (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray *)list; @@ -359,11 +450,11 @@ + (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray *)list; @end @implementation FGMPlatformCameraPosition -+ (instancetype)makeWithBearing:(double)bearing - target:(FGMPlatformLatLng *)target - tilt:(double)tilt - zoom:(double)zoom { - FGMPlatformCameraPosition *pigeonResult = [[FGMPlatformCameraPosition alloc] init]; ++ (instancetype)makeWithBearing:(double )bearing + target:(FGMPlatformLatLng *)target + tilt:(double )tilt + zoom:(double )zoom { + FGMPlatformCameraPosition* pigeonResult = [[FGMPlatformCameraPosition alloc] init]; pigeonResult.bearing = bearing; pigeonResult.target = target; pigeonResult.tilt = tilt; @@ -389,11 +480,30 @@ + (nullable FGMPlatformCameraPosition *)nullableFromList:(NSArray *)list { @(self.zoom), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraPosition *other = (FGMPlatformCameraPosition *)object; + return (self.bearing == other.bearing || (isnan(self.bearing) && isnan(other.bearing))) && FLTPigeonDeepEquals(self.target, other.target) && (self.tilt == other.tilt || (isnan(self.tilt) && isnan(other.tilt))) && (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.bearing) ? (NSUInteger)0x7FF8000000000000 : @(self.bearing).hash); + result = result * 31 + FLTPigeonDeepHash(self.target); + result = result * 31 + (isnan(self.tilt) ? (NSUInteger)0x7FF8000000000000 : @(self.tilt).hash); + result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash); + return result; +} @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; } @@ -410,18 +520,32 @@ + (nullable FGMPlatformCameraUpdate *)nullableFromList:(NSArray *)list { self.cameraUpdate ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdate *other = (FGMPlatformCameraUpdate *)object; + return FLTPigeonDeepEquals(self.cameraUpdate, other.cameraUpdate); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.cameraUpdate); + return result; +} @end @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; } @@ -433,11 +557,27 @@ + (nullable FGMPlatformCameraUpdateNewCameraPosition *)nullableFromList:(NSArray self.cameraPosition ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateNewCameraPosition *other = (FGMPlatformCameraUpdateNewCameraPosition *)object; + return FLTPigeonDeepEquals(self.cameraPosition, other.cameraPosition); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.cameraPosition); + return result; +} @end @implementation FGMPlatformCameraUpdateNewLatLng + (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng { - FGMPlatformCameraUpdateNewLatLng *pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init]; + FGMPlatformCameraUpdateNewLatLng* pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init]; pigeonResult.latLng = latLng; return pigeonResult; } @@ -454,19 +594,34 @@ + (nullable FGMPlatformCameraUpdateNewLatLng *)nullableFromList:(NSArray *)l self.latLng ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateNewLatLng *other = (FGMPlatformCameraUpdateNewLatLng *)object; + return FLTPigeonDeepEquals(self.latLng, other.latLng); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.latLng); + return result; +} @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; @@ -480,19 +635,77 @@ + (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray *)list { + FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *pigeonResult = [[FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets alloc] init]; + pigeonResult.bounds = GetNullableObjectAtIndex(list, 0); + pigeonResult.padding = GetNullableObjectAtIndex(list, 1); + return pigeonResult; +} ++ (nullable FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)nullableFromList:(NSArray *)list { + return (list) ? [FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets fromList:list] : nil; +} +- (NSArray *)toList { + return @[ + self.bounds ?: [NSNull null], + self.padding ?: [NSNull null], + ]; +} +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *other = (FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)object; + return FLTPigeonDeepEquals(self.bounds, other.bounds) && FLTPigeonDeepEquals(self.padding, other.padding); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.bounds); + result = result * 31 + FLTPigeonDeepHash(self.padding); + return result; +} @end @implementation FGMPlatformCameraUpdateNewLatLngZoom -+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom { - FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult = - [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init]; ++ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng + zoom:(double )zoom { + FGMPlatformCameraUpdateNewLatLngZoom* pigeonResult = [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init]; pigeonResult.latLng = latLng; pigeonResult.zoom = zoom; return pigeonResult; } + (FGMPlatformCameraUpdateNewLatLngZoom *)fromList:(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; @@ -506,11 +719,29 @@ + (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray @(self.zoom), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateNewLatLngZoom *other = (FGMPlatformCameraUpdateNewLatLngZoom *)object; + return FLTPigeonDeepEquals(self.latLng, other.latLng) && (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.latLng); + result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash); + return result; +} @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; @@ -530,11 +761,29 @@ + (nullable FGMPlatformCameraUpdateScrollBy *)nullableFromList:(NSArray *)li @(self.dy), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateScrollBy *other = (FGMPlatformCameraUpdateScrollBy *)object; + return (self.dx == other.dx || (isnan(self.dx) && isnan(other.dx))) && (self.dy == other.dy || (isnan(self.dy) && isnan(other.dy))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.dx) ? (NSUInteger)0x7FF8000000000000 : @(self.dx).hash); + result = result * 31 + (isnan(self.dy) ? (NSUInteger)0x7FF8000000000000 : @(self.dy).hash); + return result; +} @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; @@ -554,11 +803,28 @@ + (nullable FGMPlatformCameraUpdateZoomBy *)nullableFromList:(NSArray *)list self.focus ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateZoomBy *other = (FGMPlatformCameraUpdateZoomBy *)object; + return (self.amount == other.amount || (isnan(self.amount) && isnan(other.amount))) && FLTPigeonDeepEquals(self.focus, other.focus); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.amount) ? (NSUInteger)0x7FF8000000000000 : @(self.amount).hash); + result = result * 31 + FLTPigeonDeepHash(self.focus); + return result; +} @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; } @@ -575,11 +841,27 @@ + (nullable FGMPlatformCameraUpdateZoom *)nullableFromList:(NSArray *)list { @(self.out), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateZoom *other = (FGMPlatformCameraUpdateZoom *)object; + return self.out == other.out; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.out).hash; + return result; +} @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; } @@ -596,19 +878,35 @@ + (nullable FGMPlatformCameraUpdateZoomTo *)nullableFromList:(NSArray *)list @(self.zoom), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateZoomTo *other = (FGMPlatformCameraUpdateZoomTo *)object; + return (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash); + return result; +} @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; @@ -649,17 +947,41 @@ + (nullable FGMPlatformCircle *)nullableFromList:(NSArray *)list { self.circleId ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCircle *other = (FGMPlatformCircle *)object; + return self.consumeTapEvents == other.consumeTapEvents && FLTPigeonDeepEquals(self.fillColor, other.fillColor) && FLTPigeonDeepEquals(self.strokeColor, other.strokeColor) && self.visible == other.visible && self.strokeWidth == other.strokeWidth && (self.zIndex == other.zIndex || (isnan(self.zIndex) && isnan(other.zIndex))) && FLTPigeonDeepEquals(self.center, other.center) && (self.radius == other.radius || (isnan(self.radius) && isnan(other.radius))) && FLTPigeonDeepEquals(self.circleId, other.circleId); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.consumeTapEvents).hash; + result = result * 31 + FLTPigeonDeepHash(self.fillColor); + result = result * 31 + FLTPigeonDeepHash(self.strokeColor); + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.strokeWidth).hash; + result = result * 31 + (isnan(self.zIndex) ? (NSUInteger)0x7FF8000000000000 : @(self.zIndex).hash); + result = result * 31 + FLTPigeonDeepHash(self.center); + result = result * 31 + (isnan(self.radius) ? (NSUInteger)0x7FF8000000000000 : @(self.radius).hash); + result = result * 31 + FLTPigeonDeepHash(self.circleId); + return result; +} @end @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; @@ -694,13 +1016,35 @@ + (nullable FGMPlatformHeatmap *)nullableFromList:(NSArray *)list { @(self.maximumZoomIntensity), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformHeatmap *other = (FGMPlatformHeatmap *)object; + return FLTPigeonDeepEquals(self.heatmapId, other.heatmapId) && FLTPigeonDeepEquals(self.data, other.data) && FLTPigeonDeepEquals(self.gradient, other.gradient) && (self.opacity == other.opacity || (isnan(self.opacity) && isnan(other.opacity))) && self.radius == other.radius && self.minimumZoomIntensity == other.minimumZoomIntensity && self.maximumZoomIntensity == other.maximumZoomIntensity; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.heatmapId); + result = result * 31 + FLTPigeonDeepHash(self.data); + result = result * 31 + FLTPigeonDeepHash(self.gradient); + result = result * 31 + (isnan(self.opacity) ? (NSUInteger)0x7FF8000000000000 : @(self.opacity).hash); + result = result * 31 + @(self.radius).hash; + result = result * 31 + @(self.minimumZoomIntensity).hash; + result = result * 31 + @(self.maximumZoomIntensity).hash; + return result; +} @end @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; @@ -723,11 +1067,30 @@ + (nullable FGMPlatformHeatmapGradient *)nullableFromList:(NSArray *)list { @(self.colorMapSize), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformHeatmapGradient *other = (FGMPlatformHeatmapGradient *)object; + return FLTPigeonDeepEquals(self.colors, other.colors) && FLTPigeonDeepEquals(self.startPoints, other.startPoints) && self.colorMapSize == other.colorMapSize; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.colors); + result = result * 31 + FLTPigeonDeepHash(self.startPoints); + result = result * 31 + @(self.colorMapSize).hash; + return result; +} @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; @@ -747,13 +1110,30 @@ + (nullable FGMPlatformWeightedLatLng *)nullableFromList:(NSArray *)list { @(self.weight), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformWeightedLatLng *other = (FGMPlatformWeightedLatLng *)object; + return FLTPigeonDeepEquals(self.point, other.point) && (self.weight == other.weight || (isnan(self.weight) && isnan(other.weight))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.point); + result = result * 31 + (isnan(self.weight) ? (NSUInteger)0x7FF8000000000000 : @(self.weight).hash); + return result; +} @end @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; @@ -776,14 +1156,32 @@ + (nullable FGMPlatformInfoWindow *)nullableFromList:(NSArray *)list { self.anchor ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformInfoWindow *other = (FGMPlatformInfoWindow *)object; + return FLTPigeonDeepEquals(self.title, other.title) && FLTPigeonDeepEquals(self.snippet, other.snippet) && FLTPigeonDeepEquals(self.anchor, other.anchor); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.title); + result = result * 31 + FLTPigeonDeepHash(self.snippet); + result = result * 31 + FLTPigeonDeepHash(self.anchor); + return result; +} @end @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; @@ -809,11 +1207,30 @@ + (nullable FGMPlatformCluster *)nullableFromList:(NSArray *)list { self.markerIds ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCluster *other = (FGMPlatformCluster *)object; + return FLTPigeonDeepEquals(self.clusterManagerId, other.clusterManagerId) && FLTPigeonDeepEquals(self.position, other.position) && FLTPigeonDeepEquals(self.bounds, other.bounds) && FLTPigeonDeepEquals(self.markerIds, other.markerIds); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.clusterManagerId); + result = result * 31 + FLTPigeonDeepHash(self.position); + result = result * 31 + FLTPigeonDeepHash(self.bounds); + result = result * 31 + FLTPigeonDeepHash(self.markerIds); + return result; +} @end @implementation FGMPlatformClusterManager + (instancetype)makeWithIdentifier:(NSString *)identifier { - FGMPlatformClusterManager *pigeonResult = [[FGMPlatformClusterManager alloc] init]; + FGMPlatformClusterManager* pigeonResult = [[FGMPlatformClusterManager alloc] init]; pigeonResult.identifier = identifier; return pigeonResult; } @@ -830,24 +1247,40 @@ + (nullable FGMPlatformClusterManager *)nullableFromList:(NSArray *)list { self.identifier ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformClusterManager *other = (FGMPlatformClusterManager *)object; + return FLTPigeonDeepEquals(self.identifier, other.identifier); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.identifier); + return result; +} @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 - collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior { - FGMPlatformMarker *pigeonResult = [[FGMPlatformMarker alloc] init]; ++ (instancetype)makeWithAlpha:(double )alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL )consumeTapEvents + draggable:(BOOL )draggable + flat:(BOOL )flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double )rotation + visible:(BOOL )visible + zIndex:(NSInteger )zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId + collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior { + FGMPlatformMarker* pigeonResult = [[FGMPlatformMarker alloc] init]; pigeonResult.alpha = alpha; pigeonResult.anchor = anchor; pigeonResult.consumeTapEvents = consumeTapEvents; @@ -903,20 +1336,49 @@ + (nullable FGMPlatformMarker *)nullableFromList:(NSArray *)list { self.collisionBehavior ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformMarker *other = (FGMPlatformMarker *)object; + return (self.alpha == other.alpha || (isnan(self.alpha) && isnan(other.alpha))) && FLTPigeonDeepEquals(self.anchor, other.anchor) && self.consumeTapEvents == other.consumeTapEvents && self.draggable == other.draggable && self.flat == other.flat && FLTPigeonDeepEquals(self.icon, other.icon) && FLTPigeonDeepEquals(self.infoWindow, other.infoWindow) && FLTPigeonDeepEquals(self.position, other.position) && (self.rotation == other.rotation || (isnan(self.rotation) && isnan(other.rotation))) && self.visible == other.visible && self.zIndex == other.zIndex && FLTPigeonDeepEquals(self.markerId, other.markerId) && FLTPigeonDeepEquals(self.clusterManagerId, other.clusterManagerId) && FLTPigeonDeepEquals(self.collisionBehavior, other.collisionBehavior); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.alpha) ? (NSUInteger)0x7FF8000000000000 : @(self.alpha).hash); + result = result * 31 + FLTPigeonDeepHash(self.anchor); + result = result * 31 + @(self.consumeTapEvents).hash; + result = result * 31 + @(self.draggable).hash; + result = result * 31 + @(self.flat).hash; + result = result * 31 + FLTPigeonDeepHash(self.icon); + result = result * 31 + FLTPigeonDeepHash(self.infoWindow); + result = result * 31 + FLTPigeonDeepHash(self.position); + result = result * 31 + (isnan(self.rotation) ? (NSUInteger)0x7FF8000000000000 : @(self.rotation).hash); + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.zIndex).hash; + result = result * 31 + FLTPigeonDeepHash(self.markerId); + result = result * 31 + FLTPigeonDeepHash(self.clusterManagerId); + result = result * 31 + FLTPigeonDeepHash(self.collisionBehavior); + return result; +} @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; @@ -960,20 +1422,45 @@ + (nullable FGMPlatformPolygon *)nullableFromList:(NSArray *)list { @(self.zIndex), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformPolygon *other = (FGMPlatformPolygon *)object; + return FLTPigeonDeepEquals(self.polygonId, other.polygonId) && self.consumesTapEvents == other.consumesTapEvents && FLTPigeonDeepEquals(self.fillColor, other.fillColor) && self.geodesic == other.geodesic && FLTPigeonDeepEquals(self.points, other.points) && FLTPigeonDeepEquals(self.holes, other.holes) && self.visible == other.visible && FLTPigeonDeepEquals(self.strokeColor, other.strokeColor) && self.strokeWidth == other.strokeWidth && self.zIndex == other.zIndex; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.polygonId); + result = result * 31 + @(self.consumesTapEvents).hash; + result = result * 31 + FLTPigeonDeepHash(self.fillColor); + result = result * 31 + @(self.geodesic).hash; + result = result * 31 + FLTPigeonDeepHash(self.points); + result = result * 31 + FLTPigeonDeepHash(self.holes); + result = result * 31 + @(self.visible).hash; + result = result * 31 + FLTPigeonDeepHash(self.strokeColor); + result = result * 31 + @(self.strokeWidth).hash; + result = result * 31 + @(self.zIndex).hash; + return result; +} @end @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; @@ -1018,19 +1505,44 @@ + (nullable FGMPlatformPolyline *)nullableFromList:(NSArray *)list { @(self.zIndex), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformPolyline *other = (FGMPlatformPolyline *)object; + return FLTPigeonDeepEquals(self.polylineId, other.polylineId) && self.consumesTapEvents == other.consumesTapEvents && FLTPigeonDeepEquals(self.color, other.color) && self.geodesic == other.geodesic && self.jointType == other.jointType && FLTPigeonDeepEquals(self.patterns, other.patterns) && FLTPigeonDeepEquals(self.points, other.points) && self.visible == other.visible && self.width == other.width && self.zIndex == other.zIndex; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.polylineId); + result = result * 31 + @(self.consumesTapEvents).hash; + result = result * 31 + FLTPigeonDeepHash(self.color); + result = result * 31 + @(self.geodesic).hash; + result = result * 31 + @(self.jointType).hash; + result = result * 31 + FLTPigeonDeepHash(self.patterns); + result = result * 31 + FLTPigeonDeepHash(self.points); + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.width).hash; + result = result * 31 + @(self.zIndex).hash; + return result; +} @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; @@ -1044,13 +1556,30 @@ + (nullable FGMPlatformPatternItem *)nullableFromList:(NSArray *)list { self.length ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformPatternItem *other = (FGMPlatformPatternItem *)object; + return self.type == other.type && FLTPigeonDeepEquals(self.length, other.length); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.type).hash; + result = result * 31 + FLTPigeonDeepHash(self.length); + return result; +} @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; @@ -1073,16 +1602,34 @@ + (nullable FGMPlatformTile *)nullableFromList:(NSArray *)list { self.data ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformTile *other = (FGMPlatformTile *)object; + return self.width == other.width && self.height == other.height && FLTPigeonDeepEquals(self.data, other.data); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.width).hash; + result = result * 31 + @(self.height).hash; + result = result * 31 + FLTPigeonDeepHash(self.data); + return result; +} @end @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; @@ -1114,14 +1661,35 @@ + (nullable FGMPlatformTileOverlay *)nullableFromList:(NSArray *)list { @(self.tileSize), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformTileOverlay *other = (FGMPlatformTileOverlay *)object; + return FLTPigeonDeepEquals(self.tileOverlayId, other.tileOverlayId) && self.fadeIn == other.fadeIn && (self.transparency == other.transparency || (isnan(self.transparency) && isnan(other.transparency))) && self.zIndex == other.zIndex && self.visible == other.visible && self.tileSize == other.tileSize; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.tileOverlayId); + result = result * 31 + @(self.fadeIn).hash; + result = result * 31 + (isnan(self.transparency) ? (NSUInteger)0x7FF8000000000000 : @(self.transparency).hash); + result = result * 31 + @(self.zIndex).hash; + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.tileSize).hash; + return result; +} @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; @@ -1147,11 +1715,31 @@ + (nullable FGMPlatformEdgeInsets *)nullableFromList:(NSArray *)list { @(self.right), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformEdgeInsets *other = (FGMPlatformEdgeInsets *)object; + return (self.top == other.top || (isnan(self.top) && isnan(other.top))) && (self.bottom == other.bottom || (isnan(self.bottom) && isnan(other.bottom))) && (self.left == other.left || (isnan(self.left) && isnan(other.left))) && (self.right == other.right || (isnan(self.right) && isnan(other.right))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.top) ? (NSUInteger)0x7FF8000000000000 : @(self.top).hash); + result = result * 31 + (isnan(self.bottom) ? (NSUInteger)0x7FF8000000000000 : @(self.bottom).hash); + result = result * 31 + (isnan(self.left) ? (NSUInteger)0x7FF8000000000000 : @(self.left).hash); + result = result * 31 + (isnan(self.right) ? (NSUInteger)0x7FF8000000000000 : @(self.right).hash); + return result; +} @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; @@ -1171,12 +1759,29 @@ + (nullable FGMPlatformLatLng *)nullableFromList:(NSArray *)list { @(self.longitude), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformLatLng *other = (FGMPlatformLatLng *)object; + return (self.latitude == other.latitude || (isnan(self.latitude) && isnan(other.latitude))) && (self.longitude == other.longitude || (isnan(self.longitude) && isnan(other.longitude))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.latitude) ? (NSUInteger)0x7FF8000000000000 : @(self.latitude).hash); + result = result * 31 + (isnan(self.longitude) ? (NSUInteger)0x7FF8000000000000 : @(self.longitude).hash); + return result; +} @end @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; @@ -1196,11 +1801,28 @@ + (nullable FGMPlatformLatLngBounds *)nullableFromList:(NSArray *)list { self.southwest ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformLatLngBounds *other = (FGMPlatformLatLngBounds *)object; + return FLTPigeonDeepEquals(self.northeast, other.northeast) && FLTPigeonDeepEquals(self.southwest, other.southwest); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.northeast); + result = result * 31 + FLTPigeonDeepHash(self.southwest); + return result; +} @end @implementation FGMPlatformCameraTargetBounds + (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds { - FGMPlatformCameraTargetBounds *pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init]; + FGMPlatformCameraTargetBounds* pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init]; pigeonResult.bounds = bounds; return pigeonResult; } @@ -1217,21 +1839,37 @@ + (nullable FGMPlatformCameraTargetBounds *)nullableFromList:(NSArray *)list self.bounds ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraTargetBounds *other = (FGMPlatformCameraTargetBounds *)object; + return FLTPigeonDeepEquals(self.bounds, other.bounds); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.bounds); + return result; +} @end @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; @@ -1278,21 +1916,46 @@ + (nullable FGMPlatformGroundOverlay *)nullableFromList:(NSArray *)list { self.zoomLevel ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformGroundOverlay *other = (FGMPlatformGroundOverlay *)object; + return FLTPigeonDeepEquals(self.groundOverlayId, other.groundOverlayId) && FLTPigeonDeepEquals(self.image, other.image) && FLTPigeonDeepEquals(self.position, other.position) && FLTPigeonDeepEquals(self.bounds, other.bounds) && FLTPigeonDeepEquals(self.anchor, other.anchor) && (self.transparency == other.transparency || (isnan(self.transparency) && isnan(other.transparency))) && (self.bearing == other.bearing || (isnan(self.bearing) && isnan(other.bearing))) && self.zIndex == other.zIndex && self.visible == other.visible && self.clickable == other.clickable && FLTPigeonDeepEquals(self.zoomLevel, other.zoomLevel); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.groundOverlayId); + result = result * 31 + FLTPigeonDeepHash(self.image); + result = result * 31 + FLTPigeonDeepHash(self.position); + result = result * 31 + FLTPigeonDeepHash(self.bounds); + result = result * 31 + FLTPigeonDeepHash(self.anchor); + result = result * 31 + (isnan(self.transparency) ? (NSUInteger)0x7FF8000000000000 : @(self.transparency).hash); + result = result * 31 + (isnan(self.bearing) ? (NSUInteger)0x7FF8000000000000 : @(self.bearing).hash); + result = result * 31 + @(self.zIndex).hash; + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.clickable).hash; + result = result * 31 + FLTPigeonDeepHash(self.zoomLevel); + return result; +} @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; @@ -1336,28 +1999,53 @@ + (nullable FGMPlatformMapViewCreationParams *)nullableFromList:(NSArray *)l self.initialGroundOverlays ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformMapViewCreationParams *other = (FGMPlatformMapViewCreationParams *)object; + return FLTPigeonDeepEquals(self.initialCameraPosition, other.initialCameraPosition) && FLTPigeonDeepEquals(self.mapConfiguration, other.mapConfiguration) && FLTPigeonDeepEquals(self.initialCircles, other.initialCircles) && FLTPigeonDeepEquals(self.initialMarkers, other.initialMarkers) && FLTPigeonDeepEquals(self.initialPolygons, other.initialPolygons) && FLTPigeonDeepEquals(self.initialPolylines, other.initialPolylines) && FLTPigeonDeepEquals(self.initialHeatmaps, other.initialHeatmaps) && FLTPigeonDeepEquals(self.initialTileOverlays, other.initialTileOverlays) && FLTPigeonDeepEquals(self.initialClusterManagers, other.initialClusterManagers) && FLTPigeonDeepEquals(self.initialGroundOverlays, other.initialGroundOverlays); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.initialCameraPosition); + result = result * 31 + FLTPigeonDeepHash(self.mapConfiguration); + result = result * 31 + FLTPigeonDeepHash(self.initialCircles); + result = result * 31 + FLTPigeonDeepHash(self.initialMarkers); + result = result * 31 + FLTPigeonDeepHash(self.initialPolygons); + result = result * 31 + FLTPigeonDeepHash(self.initialPolylines); + result = result * 31 + FLTPigeonDeepHash(self.initialHeatmaps); + result = result * 31 + FLTPigeonDeepHash(self.initialTileOverlays); + result = result * 31 + FLTPigeonDeepHash(self.initialClusterManagers); + result = result * 31 + FLTPigeonDeepHash(self.initialGroundOverlays); + return result; +} @end @implementation FGMPlatformMapConfiguration + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - markerType:(FGMPlatformMarkerType)markerType - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style { - FGMPlatformMapConfiguration *pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + markerType:(FGMPlatformMarkerType)markerType + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style { + FGMPlatformMapConfiguration* pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; pigeonResult.compassEnabled = compassEnabled; pigeonResult.cameraTargetBounds = cameraTargetBounds; pigeonResult.mapType = mapType; @@ -1426,11 +2114,45 @@ + (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray *)list { self.style ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformMapConfiguration *other = (FGMPlatformMapConfiguration *)object; + return FLTPigeonDeepEquals(self.compassEnabled, other.compassEnabled) && FLTPigeonDeepEquals(self.cameraTargetBounds, other.cameraTargetBounds) && FLTPigeonDeepEquals(self.mapType, other.mapType) && FLTPigeonDeepEquals(self.minMaxZoomPreference, other.minMaxZoomPreference) && FLTPigeonDeepEquals(self.rotateGesturesEnabled, other.rotateGesturesEnabled) && FLTPigeonDeepEquals(self.scrollGesturesEnabled, other.scrollGesturesEnabled) && FLTPigeonDeepEquals(self.tiltGesturesEnabled, other.tiltGesturesEnabled) && FLTPigeonDeepEquals(self.trackCameraPosition, other.trackCameraPosition) && FLTPigeonDeepEquals(self.zoomGesturesEnabled, other.zoomGesturesEnabled) && FLTPigeonDeepEquals(self.myLocationEnabled, other.myLocationEnabled) && FLTPigeonDeepEquals(self.myLocationButtonEnabled, other.myLocationButtonEnabled) && FLTPigeonDeepEquals(self.padding, other.padding) && FLTPigeonDeepEquals(self.indoorViewEnabled, other.indoorViewEnabled) && FLTPigeonDeepEquals(self.trafficEnabled, other.trafficEnabled) && FLTPigeonDeepEquals(self.buildingsEnabled, other.buildingsEnabled) && self.markerType == other.markerType && FLTPigeonDeepEquals(self.mapId, other.mapId) && FLTPigeonDeepEquals(self.style, other.style); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.compassEnabled); + result = result * 31 + FLTPigeonDeepHash(self.cameraTargetBounds); + result = result * 31 + FLTPigeonDeepHash(self.mapType); + result = result * 31 + FLTPigeonDeepHash(self.minMaxZoomPreference); + result = result * 31 + FLTPigeonDeepHash(self.rotateGesturesEnabled); + result = result * 31 + FLTPigeonDeepHash(self.scrollGesturesEnabled); + result = result * 31 + FLTPigeonDeepHash(self.tiltGesturesEnabled); + result = result * 31 + FLTPigeonDeepHash(self.trackCameraPosition); + result = result * 31 + FLTPigeonDeepHash(self.zoomGesturesEnabled); + result = result * 31 + FLTPigeonDeepHash(self.myLocationEnabled); + result = result * 31 + FLTPigeonDeepHash(self.myLocationButtonEnabled); + result = result * 31 + FLTPigeonDeepHash(self.padding); + result = result * 31 + FLTPigeonDeepHash(self.indoorViewEnabled); + result = result * 31 + FLTPigeonDeepHash(self.trafficEnabled); + result = result * 31 + FLTPigeonDeepHash(self.buildingsEnabled); + result = result * 31 + @(self.markerType).hash; + result = result * 31 + FLTPigeonDeepHash(self.mapId); + result = result * 31 + FLTPigeonDeepHash(self.style); + return result; +} @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; @@ -1450,11 +2172,29 @@ + (nullable FGMPlatformPoint *)nullableFromList:(NSArray *)list { @(self.y), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformPoint *other = (FGMPlatformPoint *)object; + return (self.x == other.x || (isnan(self.x) && isnan(other.x))) && (self.y == other.y || (isnan(self.y) && isnan(other.y))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.x) ? (NSUInteger)0x7FF8000000000000 : @(self.x).hash); + result = result * 31 + (isnan(self.y) ? (NSUInteger)0x7FF8000000000000 : @(self.y).hash); + return result; +} @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; @@ -1474,11 +2214,31 @@ + (nullable FGMPlatformSize *)nullableFromList:(NSArray *)list { @(self.height), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformSize *other = (FGMPlatformSize *)object; + return (self.width == other.width || (isnan(self.width) && isnan(other.width))) && (self.height == other.height || (isnan(self.height) && isnan(other.height))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.width) ? (NSUInteger)0x7FF8000000000000 : @(self.width).hash); + result = result * 31 + (isnan(self.height) ? (NSUInteger)0x7FF8000000000000 : @(self.height).hash); + return result; +} @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; @@ -1504,14 +2264,33 @@ + (nullable FGMPlatformColor *)nullableFromList:(NSArray *)list { @(self.alpha), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformColor *other = (FGMPlatformColor *)object; + return (self.red == other.red || (isnan(self.red) && isnan(other.red))) && (self.green == other.green || (isnan(self.green) && isnan(other.green))) && (self.blue == other.blue || (isnan(self.blue) && isnan(other.blue))) && (self.alpha == other.alpha || (isnan(self.alpha) && isnan(other.alpha))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.red) ? (NSUInteger)0x7FF8000000000000 : @(self.red).hash); + result = result * 31 + (isnan(self.green) ? (NSUInteger)0x7FF8000000000000 : @(self.green).hash); + result = result * 31 + (isnan(self.blue) ? (NSUInteger)0x7FF8000000000000 : @(self.blue).hash); + result = result * 31 + (isnan(self.alpha) ? (NSUInteger)0x7FF8000000000000 : @(self.alpha).hash); + return result; +} @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; @@ -1537,11 +2316,31 @@ + (nullable FGMPlatformTileLayer *)nullableFromList:(NSArray *)list { @(self.zIndex), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformTileLayer *other = (FGMPlatformTileLayer *)object; + return self.visible == other.visible && self.fadeIn == other.fadeIn && (self.opacity == other.opacity || (isnan(self.opacity) && isnan(other.opacity))) && self.zIndex == other.zIndex; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.fadeIn).hash; + result = result * 31 + (isnan(self.opacity) ? (NSUInteger)0x7FF8000000000000 : @(self.opacity).hash); + result = result * 31 + @(self.zIndex).hash; + return result; +} @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; @@ -1561,11 +2360,28 @@ + (nullable FGMPlatformZoomRange *)nullableFromList:(NSArray *)list { self.max ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformZoomRange *other = (FGMPlatformZoomRange *)object; + return FLTPigeonDeepEquals(self.min, other.min) && FLTPigeonDeepEquals(self.max, other.max); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.min); + result = result * 31 + FLTPigeonDeepHash(self.max); + return result; +} @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; } @@ -1582,11 +2398,27 @@ + (nullable FGMPlatformBitmap *)nullableFromList:(NSArray *)list { self.bitmap ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmap *other = (FGMPlatformBitmap *)object; + return FLTPigeonDeepEquals(self.bitmap, other.bitmap); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.bitmap); + return result; +} @end @implementation FGMPlatformBitmapDefaultMarker + (instancetype)makeWithHue:(nullable NSNumber *)hue { - FGMPlatformBitmapDefaultMarker *pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init]; + FGMPlatformBitmapDefaultMarker* pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init]; pigeonResult.hue = hue; return pigeonResult; } @@ -1603,12 +2435,28 @@ + (nullable FGMPlatformBitmapDefaultMarker *)nullableFromList:(NSArray *)lis self.hue ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapDefaultMarker *other = (FGMPlatformBitmapDefaultMarker *)object; + return FLTPigeonDeepEquals(self.hue, other.hue); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.hue); + return result; +} @end @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; @@ -1628,11 +2476,29 @@ + (nullable FGMPlatformBitmapBytes *)nullableFromList:(NSArray *)list { self.size ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapBytes *other = (FGMPlatformBitmapBytes *)object; + return FLTPigeonDeepEquals(self.byteData, other.byteData) && FLTPigeonDeepEquals(self.size, other.size); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.byteData); + result = result * 31 + FLTPigeonDeepHash(self.size); + return result; +} @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; @@ -1652,13 +2518,30 @@ + (nullable FGMPlatformBitmapAsset *)nullableFromList:(NSArray *)list { self.pkg ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapAsset *other = (FGMPlatformBitmapAsset *)object; + return FLTPigeonDeepEquals(self.name, other.name) && FLTPigeonDeepEquals(self.pkg, other.pkg); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.name); + result = result * 31 + FLTPigeonDeepHash(self.pkg); + return result; +} @end @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; @@ -1681,15 +2564,33 @@ + (nullable FGMPlatformBitmapAssetImage *)nullableFromList:(NSArray *)list { self.size ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapAssetImage *other = (FGMPlatformBitmapAssetImage *)object; + return FLTPigeonDeepEquals(self.name, other.name) && (self.scale == other.scale || (isnan(self.scale) && isnan(other.scale))) && FLTPigeonDeepEquals(self.size, other.size); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.name); + result = result * 31 + (isnan(self.scale) ? (NSUInteger)0x7FF8000000000000 : @(self.scale).hash); + result = result * 31 + FLTPigeonDeepHash(self.size); + return result; +} @end @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,8 +2601,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); @@ -1720,15 +2620,35 @@ + (nullable FGMPlatformBitmapAssetMap *)nullableFromList:(NSArray *)list { self.height ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapAssetMap *other = (FGMPlatformBitmapAssetMap *)object; + return FLTPigeonDeepEquals(self.assetName, other.assetName) && self.bitmapScaling == other.bitmapScaling && (self.imagePixelRatio == other.imagePixelRatio || (isnan(self.imagePixelRatio) && isnan(other.imagePixelRatio))) && FLTPigeonDeepEquals(self.width, other.width) && FLTPigeonDeepEquals(self.height, other.height); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.assetName); + result = result * 31 + @(self.bitmapScaling).hash; + result = result * 31 + (isnan(self.imagePixelRatio) ? (NSUInteger)0x7FF8000000000000 : @(self.imagePixelRatio).hash); + result = result * 31 + FLTPigeonDeepHash(self.width); + result = result * 31 + FLTPigeonDeepHash(self.height); + return result; +} @end @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; @@ -1739,8 +2659,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); @@ -1759,16 +2678,36 @@ + (nullable FGMPlatformBitmapBytesMap *)nullableFromList:(NSArray *)list { self.height ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapBytesMap *other = (FGMPlatformBitmapBytesMap *)object; + return FLTPigeonDeepEquals(self.byteData, other.byteData) && self.bitmapScaling == other.bitmapScaling && (self.imagePixelRatio == other.imagePixelRatio || (isnan(self.imagePixelRatio) && isnan(other.imagePixelRatio))) && FLTPigeonDeepEquals(self.width, other.width) && FLTPigeonDeepEquals(self.height, other.height); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.byteData); + result = result * 31 + @(self.bitmapScaling).hash; + result = result * 31 + (isnan(self.imagePixelRatio) ? (NSUInteger)0x7FF8000000000000 : @(self.imagePixelRatio).hash); + result = result * 31 + FLTPigeonDeepHash(self.width); + result = result * 31 + FLTPigeonDeepHash(self.height); + return result; +} @end @implementation FGMPlatformBitmapPinConfig + (instancetype)makeWithBackgroundColor:(nullable FGMPlatformColor *)backgroundColor - borderColor:(nullable FGMPlatformColor *)borderColor - glyphColor:(nullable FGMPlatformColor *)glyphColor - glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor - glyphText:(nullable NSString *)glyphText - glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap { - FGMPlatformBitmapPinConfig *pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init]; + borderColor:(nullable FGMPlatformColor *)borderColor + glyphColor:(nullable FGMPlatformColor *)glyphColor + glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor + glyphText:(nullable NSString *)glyphText + glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap { + FGMPlatformBitmapPinConfig* pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init]; pigeonResult.backgroundColor = backgroundColor; pigeonResult.borderColor = borderColor; pigeonResult.glyphColor = glyphColor; @@ -1800,6 +2739,27 @@ + (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray *)list { self.glyphBitmap ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapPinConfig *other = (FGMPlatformBitmapPinConfig *)object; + return FLTPigeonDeepEquals(self.backgroundColor, other.backgroundColor) && FLTPigeonDeepEquals(self.borderColor, other.borderColor) && FLTPigeonDeepEquals(self.glyphColor, other.glyphColor) && FLTPigeonDeepEquals(self.glyphTextColor, other.glyphTextColor) && FLTPigeonDeepEquals(self.glyphText, other.glyphText) && FLTPigeonDeepEquals(self.glyphBitmap, other.glyphBitmap); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.backgroundColor); + result = result * 31 + FLTPigeonDeepHash(self.borderColor); + result = result * 31 + FLTPigeonDeepHash(self.glyphColor); + result = result * 31 + FLTPigeonDeepHash(self.glyphTextColor); + result = result * 31 + FLTPigeonDeepHash(self.glyphText); + result = result * 31 + FLTPigeonDeepHash(self.glyphBitmap); + return result; +} @end @interface FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReader : FlutterStandardReader @@ -1809,125 +2769,115 @@ - (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 - : [[FGMPlatformMarkerCollisionBehaviorBox alloc] - initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformMarkerCollisionBehaviorBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 131: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil - ? nil - : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 132: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil - : [[FGMPlatformPatternItemTypeBox alloc] - initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformPatternItemTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 133: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil - ? nil - : [[FGMPlatformMarkerTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformMarkerTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 134: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil - : [[FGMPlatformMapBitmapScalingBox alloc] - initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformMapBitmapScalingBox alloc] initWithValue:[enumAsNumber integerValue]]; } - case 135: + case 135: return [FGMPlatformCameraPosition fromList:[self readValue]]; - case 136: + case 136: return [FGMPlatformCameraUpdate fromList:[self readValue]]; - case 137: + case 137: return [FGMPlatformCameraUpdateNewCameraPosition fromList:[self readValue]]; - case 138: + case 138: return [FGMPlatformCameraUpdateNewLatLng fromList:[self readValue]]; - case 139: + case 139: return [FGMPlatformCameraUpdateNewLatLngBounds fromList:[self readValue]]; - case 140: + case 140: + return [FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets fromList:[self readValue]]; + case 141: return [FGMPlatformCameraUpdateNewLatLngZoom fromList:[self readValue]]; - case 141: + case 142: return [FGMPlatformCameraUpdateScrollBy fromList:[self readValue]]; - case 142: + case 143: return [FGMPlatformCameraUpdateZoomBy fromList:[self readValue]]; - case 143: + case 144: return [FGMPlatformCameraUpdateZoom fromList:[self readValue]]; - case 144: + case 145: return [FGMPlatformCameraUpdateZoomTo fromList:[self readValue]]; - case 145: + case 146: return [FGMPlatformCircle fromList:[self readValue]]; - case 146: + case 147: return [FGMPlatformHeatmap fromList:[self readValue]]; - case 147: + case 148: return [FGMPlatformHeatmapGradient fromList:[self readValue]]; - case 148: + case 149: return [FGMPlatformWeightedLatLng fromList:[self readValue]]; - case 149: + case 150: return [FGMPlatformInfoWindow fromList:[self readValue]]; - case 150: + case 151: return [FGMPlatformCluster fromList:[self readValue]]; - case 151: + case 152: return [FGMPlatformClusterManager fromList:[self readValue]]; - case 152: + case 153: return [FGMPlatformMarker fromList:[self readValue]]; - case 153: + case 154: return [FGMPlatformPolygon fromList:[self readValue]]; - case 154: + case 155: return [FGMPlatformPolyline fromList:[self readValue]]; - case 155: + case 156: return [FGMPlatformPatternItem fromList:[self readValue]]; - case 156: + case 157: return [FGMPlatformTile fromList:[self readValue]]; - case 157: + case 158: return [FGMPlatformTileOverlay fromList:[self readValue]]; - case 158: + case 159: return [FGMPlatformEdgeInsets fromList:[self readValue]]; - case 159: + case 160: return [FGMPlatformLatLng fromList:[self readValue]]; - case 160: + case 161: return [FGMPlatformLatLngBounds fromList:[self readValue]]; - case 161: + case 162: return [FGMPlatformCameraTargetBounds fromList:[self readValue]]; - case 162: + case 163: return [FGMPlatformGroundOverlay fromList:[self readValue]]; - case 163: + case 164: return [FGMPlatformMapViewCreationParams fromList:[self readValue]]; - case 164: + case 165: return [FGMPlatformMapConfiguration fromList:[self readValue]]; - case 165: + case 166: return [FGMPlatformPoint fromList:[self readValue]]; - case 166: + case 167: return [FGMPlatformSize fromList:[self readValue]]; - case 167: + case 168: return [FGMPlatformColor fromList:[self readValue]]; - case 168: + case 169: return [FGMPlatformTileLayer fromList:[self readValue]]; - case 169: + case 170: return [FGMPlatformZoomRange fromList:[self readValue]]; - case 170: + case 171: return [FGMPlatformBitmap fromList:[self readValue]]; - case 171: + case 172: return [FGMPlatformBitmapDefaultMarker fromList:[self readValue]]; - case 172: + case 173: return [FGMPlatformBitmapBytes fromList:[self readValue]]; - case 173: + case 174: return [FGMPlatformBitmapAsset fromList:[self readValue]]; - case 174: + case 175: return [FGMPlatformBitmapAssetImage fromList:[self readValue]]; - case 175: + case 176: return [FGMPlatformBitmapAssetMap fromList:[self readValue]]; - case 176: + case 177: return [FGMPlatformBitmapBytesMap fromList:[self readValue]]; - case 177: + case 178: return [FGMPlatformBitmapPinConfig fromList:[self readValue]]; default: return [super readValueOfType:type]; @@ -1978,120 +2928,123 @@ - (void)writeValue:(id)value { } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngBounds class]]) { [self writeByte:139]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngZoom class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets class]]) { [self writeByte:140]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateScrollBy class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngZoom class]]) { [self writeByte:141]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomBy class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateScrollBy class]]) { [self writeByte:142]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoom class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomBy class]]) { [self writeByte:143]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomTo class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoom class]]) { [self writeByte:144]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCircle class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomTo class]]) { [self writeByte:145]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformHeatmap class]]) { + } else if ([value isKindOfClass:[FGMPlatformCircle class]]) { [self writeByte:146]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformHeatmapGradient class]]) { + } else if ([value isKindOfClass:[FGMPlatformHeatmap class]]) { [self writeByte:147]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformWeightedLatLng class]]) { + } else if ([value isKindOfClass:[FGMPlatformHeatmapGradient class]]) { [self writeByte:148]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformInfoWindow class]]) { + } else if ([value isKindOfClass:[FGMPlatformWeightedLatLng class]]) { [self writeByte:149]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCluster class]]) { + } else if ([value isKindOfClass:[FGMPlatformInfoWindow class]]) { [self writeByte:150]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformClusterManager class]]) { + } else if ([value isKindOfClass:[FGMPlatformCluster class]]) { [self writeByte:151]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformMarker class]]) { + } else if ([value isKindOfClass:[FGMPlatformClusterManager class]]) { [self writeByte:152]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) { + } else if ([value isKindOfClass:[FGMPlatformMarker class]]) { [self writeByte:153]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) { + } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) { [self writeByte:154]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) { + } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) { [self writeByte:155]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTile class]]) { + } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) { [self writeByte:156]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) { + } else if ([value isKindOfClass:[FGMPlatformTile class]]) { [self writeByte:157]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) { + } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) { [self writeByte:158]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) { + } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) { [self writeByte:159]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) { + } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) { [self writeByte:160]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) { + } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) { [self writeByte:161]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) { [self writeByte:162]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) { + } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) { [self writeByte:163]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) { + } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) { [self writeByte:164]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPoint class]]) { + } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) { [self writeByte:165]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformSize class]]) { + } else if ([value isKindOfClass:[FGMPlatformPoint class]]) { [self writeByte:166]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformColor class]]) { + } else if ([value isKindOfClass:[FGMPlatformSize class]]) { [self writeByte:167]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) { + } else if ([value isKindOfClass:[FGMPlatformColor class]]) { [self writeByte:168]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) { + } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) { [self writeByte:169]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) { + } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) { [self writeByte:170]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) { [self writeByte:171]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) { [self writeByte:172]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) { [self writeByte:173]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) { [self writeByte:174]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) { [self writeByte:175]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) { [self writeByte:176]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapPinConfig class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) { [self writeByte:177]; [self writeValue:[value toList]]; + } else if ([value isKindOfClass:[FGMPlatformBitmapPinConfig class]]) { + [self writeByte:178]; + [self writeValue:[value toList]]; } else { [super writeValue:value]; } @@ -2113,8 +3066,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; @@ -2123,24 +3075,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]; @@ -2155,18 +3100,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); @@ -2180,29 +3120,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 { @@ -2211,28 +3142,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 { @@ -2241,18 +3164,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); @@ -2267,29 +3185,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 { @@ -2298,28 +3207,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 { @@ -2328,29 +3229,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 { @@ -2359,29 +3251,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 { @@ -2390,29 +3273,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 { @@ -2421,18 +3295,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); @@ -2446,25 +3315,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 { @@ -2473,16 +3335,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]; @@ -2495,18 +3354,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); @@ -2521,27 +3375,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 { @@ -2550,17 +3396,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]; @@ -2572,18 +3414,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); @@ -2597,18 +3434,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); @@ -2623,25 +3455,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 { @@ -2654,17 +3479,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); @@ -2682,16 +3503,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]; @@ -2703,18 +3521,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); @@ -2728,17 +3541,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]; @@ -2750,17 +3559,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Returns true if the map supports advanced markers. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.isAdvancedMarkersAvailable", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isAdvancedMarkersAvailable:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(isAdvancedMarkersAvailable:)", - api); + NSCAssert([api respondsToSelector:@selector(isAdvancedMarkersAvailable:)], @"FGMMapsApi api (%@) doesn't respond to @selector(isAdvancedMarkersAvailable:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isAdvancedMarkersAvailable:&error]; @@ -2781,450 +3586,335 @@ @implementation FGMMapsCallbackApi - (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger { return [self initWithBinaryMessenger:binaryMessenger messageChannelSuffix:@""]; } -- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger - messageChannelSuffix:(nullable NSString *)messageChannelSuffix { +- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger messageChannelSuffix:(nullable NSString*)messageChannelSuffix{ self = [self init]; if (self) { _binaryMessenger = binaryMessenger; - _messageChannelSuffix = [messageChannelSuffix length] == 0 - ? @"" - : [NSString stringWithFormat:@".%@", messageChannelSuffix]; + _messageChannelSuffix = [messageChannelSuffix length] == 0 ? @"" : [NSString stringWithFormat: @".%@", messageChannelSuffix]; } return self; } - (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted", - _messageChannelSuffix]; - 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)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_groundOverlayId ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId location:(FGMPlatformPoint *)arg_location zoom:(NSInteger)arg_zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec: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); @@ -3237,30 +3927,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]; @@ -3271,18 +3951,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]; @@ -3293,18 +3968,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]; @@ -3315,18 +3985,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]; @@ -3337,18 +4002,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]; @@ -3359,18 +4019,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]; @@ -3381,18 +4036,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]; @@ -3403,18 +4053,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]; @@ -3425,24 +4070,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 { @@ -3450,24 +4089,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 { @@ -3475,18 +4108,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); @@ -3499,16 +4127,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]; @@ -3519,24 +4144,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 { @@ -3544,16 +4163,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 053f0f577650..7917bbd64e66 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,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.3.3), do not edit directly. // See also: https://pub.dev/packages/pigeon @import Foundation; @@ -28,7 +28,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapType) { - (instancetype)initWithValue:(FGMPlatformMapType)value; @end -/// Pigeon equivalent of MarkerCollisionBehavior. +/// Pigeon equivalent of the MarkerCollisionBehavior enum. typedef NS_ENUM(NSUInteger, FGMPlatformMarkerCollisionBehavior) { FGMPlatformMarkerCollisionBehaviorRequiredDisplay = 0, FGMPlatformMarkerCollisionBehaviorOptionalAndHidesLowerPriority = 1, @@ -95,6 +95,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @class FGMPlatformCameraUpdateNewCameraPosition; @class FGMPlatformCameraUpdateNewLatLng; @class FGMPlatformCameraUpdateNewLatLngBounds; +@class FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets; @class FGMPlatformCameraUpdateNewLatLngZoom; @class FGMPlatformCameraUpdateScrollBy; @class FGMPlatformCameraUpdateZoomBy; @@ -138,26 +139,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 @@ -165,7 +166,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 @@ -173,83 +174,97 @@ 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 NewLatLngBoundsWithEdgeInsets +@interface FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds + padding:(FGMPlatformEdgeInsets *)padding; +@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, strong) FGMPlatformEdgeInsets * 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. @@ -257,19 +272,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. @@ -281,20 +296,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. @@ -302,11 +318,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. @@ -314,13 +330,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. @@ -328,41 +344,41 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithIdentifier:(NSString *)identifier; -@property(nonatomic, copy) NSString *identifier; +@property(nonatomic, copy) NSString * identifier; @end /// Pigeon equivalent of the Marker class. @interface FGMPlatformMarker : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAlpha:(double)alpha - anchor:(FGMPlatformPoint *)anchor - consumeTapEvents:(BOOL)consumeTapEvents - draggable:(BOOL)draggable - flat:(BOOL)flat - icon:(FGMPlatformBitmap *)icon - infoWindow:(FGMPlatformInfoWindow *)infoWindow - position:(FGMPlatformLatLng *)position - rotation:(double)rotation - visible:(BOOL)visible - zIndex:(NSInteger)zIndex - markerId:(NSString *)markerId - clusterManagerId:(nullable NSString *)clusterManagerId - collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior; -@property(nonatomic, assign) double alpha; -@property(nonatomic, strong) FGMPlatformPoint *anchor; -@property(nonatomic, assign) BOOL consumeTapEvents; -@property(nonatomic, assign) BOOL draggable; -@property(nonatomic, assign) BOOL flat; -@property(nonatomic, strong) FGMPlatformBitmap *icon; -@property(nonatomic, strong) FGMPlatformInfoWindow *infoWindow; -@property(nonatomic, strong) FGMPlatformLatLng *position; -@property(nonatomic, assign) double rotation; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, copy) NSString *markerId; -@property(nonatomic, copy, nullable) NSString *clusterManagerId; -@property(nonatomic, strong, nullable) FGMPlatformMarkerCollisionBehaviorBox *collisionBehavior; ++ (instancetype)makeWithAlpha:(double )alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL )consumeTapEvents + draggable:(BOOL )draggable + flat:(BOOL )flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double )rotation + visible:(BOOL )visible + zIndex:(NSInteger )zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId + collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior; +@property(nonatomic, assign) double alpha; +@property(nonatomic, strong) FGMPlatformPoint * anchor; +@property(nonatomic, assign) BOOL consumeTapEvents; +@property(nonatomic, assign) BOOL draggable; +@property(nonatomic, assign) BOOL flat; +@property(nonatomic, strong) FGMPlatformBitmap * icon; +@property(nonatomic, strong) FGMPlatformInfoWindow * infoWindow; +@property(nonatomic, strong) FGMPlatformLatLng * position; +@property(nonatomic, assign) double rotation; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, copy) NSString * markerId; +@property(nonatomic, copy, nullable) NSString * clusterManagerId; +@property(nonatomic, strong, nullable) FGMPlatformMarkerCollisionBehaviorBox * collisionBehavior; @end /// Pigeon equivalent of the Polygon class. @@ -370,25 +386,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. @@ -396,48 +412,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. @@ -445,37 +462,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. @@ -483,9 +504,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. @@ -494,7 +515,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. @@ -502,54 +523,53 @@ 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. @@ -557,91 +577,97 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - markerType:(FGMPlatformMarkerType)markerType - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style; -@property(nonatomic, strong, nullable) NSNumber *compassEnabled; -@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds *cameraTargetBounds; -@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox *mapType; -@property(nonatomic, strong, nullable) FGMPlatformZoomRange *minMaxZoomPreference; -@property(nonatomic, strong, nullable) NSNumber *rotateGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *scrollGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *tiltGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *trackCameraPosition; -@property(nonatomic, strong, nullable) NSNumber *zoomGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *myLocationEnabled; -@property(nonatomic, strong, nullable) NSNumber *myLocationButtonEnabled; -@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets *padding; -@property(nonatomic, strong, nullable) NSNumber *indoorViewEnabled; -@property(nonatomic, strong, nullable) NSNumber *trafficEnabled; -@property(nonatomic, strong, nullable) NSNumber *buildingsEnabled; + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + markerType:(FGMPlatformMarkerType)markerType + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style; +@property(nonatomic, strong, nullable) NSNumber * compassEnabled; +@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds * cameraTargetBounds; +@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox * mapType; +@property(nonatomic, strong, nullable) FGMPlatformZoomRange * minMaxZoomPreference; +@property(nonatomic, strong, nullable) NSNumber * rotateGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * scrollGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * tiltGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * trackCameraPosition; +@property(nonatomic, strong, nullable) NSNumber * zoomGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * myLocationEnabled; +@property(nonatomic, strong, nullable) NSNumber * myLocationButtonEnabled; +@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets * padding; +@property(nonatomic, strong, nullable) NSNumber * indoorViewEnabled; +@property(nonatomic, strong, nullable) NSNumber * trafficEnabled; +@property(nonatomic, strong, nullable) NSNumber * buildingsEnabled; @property(nonatomic, assign) FGMPlatformMarkerType markerType; -@property(nonatomic, copy, nullable) NSString *mapId; -@property(nonatomic, copy, nullable) NSString *style; +@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 @@ -650,7 +676,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]. @@ -658,13 +684,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]. @@ -672,18 +698,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]. @@ -691,11 +718,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]. @@ -703,15 +730,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]. @@ -719,31 +746,31 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double)imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height; -@property(nonatomic, strong) FlutterStandardTypedData *byteData; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double )imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height; +@property(nonatomic, strong) FlutterStandardTypedData * byteData; @property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; -@property(nonatomic, assign) double imagePixelRatio; -@property(nonatomic, strong, nullable) NSNumber *width; -@property(nonatomic, strong, nullable) NSNumber *height; +@property(nonatomic, assign) double imagePixelRatio; +@property(nonatomic, strong, nullable) NSNumber * width; +@property(nonatomic, strong, nullable) NSNumber * height; @end /// Pigeon equivalent of [PinConfig]. @interface FGMPlatformBitmapPinConfig : NSObject + (instancetype)makeWithBackgroundColor:(nullable FGMPlatformColor *)backgroundColor - borderColor:(nullable FGMPlatformColor *)borderColor - glyphColor:(nullable FGMPlatformColor *)glyphColor - glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor - glyphText:(nullable NSString *)glyphText - glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap; -@property(nonatomic, strong, nullable) FGMPlatformColor *backgroundColor; -@property(nonatomic, strong, nullable) FGMPlatformColor *borderColor; -@property(nonatomic, strong, nullable) FGMPlatformColor *glyphColor; -@property(nonatomic, strong, nullable) FGMPlatformColor *glyphTextColor; -@property(nonatomic, copy, nullable) NSString *glyphText; -@property(nonatomic, strong, nullable) FGMPlatformBitmap *glyphBitmap; + borderColor:(nullable FGMPlatformColor *)borderColor + glyphColor:(nullable FGMPlatformColor *)glyphColor + glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor + glyphText:(nullable NSString *)glyphText + glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap; +@property(nonatomic, strong, nullable) FGMPlatformColor * backgroundColor; +@property(nonatomic, strong, nullable) FGMPlatformColor * borderColor; +@property(nonatomic, strong, nullable) FGMPlatformColor * glyphColor; +@property(nonatomic, strong, nullable) FGMPlatformColor * glyphTextColor; +@property(nonatomic, copy, nullable) NSString * glyphText; +@property(nonatomic, strong, nullable) FGMPlatformBitmap * glyphBitmap; @end /// The codec used by all APIs. @@ -759,87 +786,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. /// @@ -853,97 +847,70 @@ 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; /// Returns true if the map supports advanced markers. /// /// @return `nil` only when `error != nil`. - (nullable NSNumber *)isAdvancedMarkersAvailable:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsApi(id binaryMessenger, - NSObject *_Nullable api); +extern void SetUpFGMMapsApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); -extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, - NSObject *_Nullable api, - NSString *messageChannelSuffix); /// Interface for calls from the native SDK to Dart. @interface FGMMapsCallbackApi : NSObject - (instancetype)initWithBinaryMessenger:(id)binaryMessenger; -- (instancetype)initWithBinaryMessenger:(id)binaryMessenger - messageChannelSuffix:(nullable NSString *)messageChannelSuffix; +- (instancetype)initWithBinaryMessenger:(id)binaryMessenger messageChannelSuffix:(nullable NSString *)messageChannelSuffix; /// Called when the map camera starts moving. - (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map camera moves. -- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition completion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map camera stops moving. - (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map, not a specifc map object, is tapped. -- (void)didTapAtPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map, not a specifc map object, is long pressed. -- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker is tapped. -- (void)didTapMarkerWithIdentifier:(NSString *)markerId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag starts. -- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag updates. -- (void)didDragMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag ends. -- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker's info window is tapped. -- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a circle is tapped. -- (void)didTapCircleWithIdentifier:(NSString *)circleId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapCircleWithIdentifier:(NSString *)circleId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker cluster is tapped. -- (void)didTapCluster:(FGMPlatformCluster *)cluster - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapCluster:(FGMPlatformCluster *)cluster completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a polygon is tapped. -- (void)didTapPolygonWithIdentifier:(NSString *)polygonId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPolygonWithIdentifier:(NSString *)polygonId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a polyline is tapped. -- (void)didTapPolylineWithIdentifier:(NSString *)polylineId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPolylineWithIdentifier:(NSString *)polylineId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a ground overlay is tapped. -- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion; /// Called to get data for a map tile. -- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId - location:(FGMPlatformPoint *)location - zoom:(NSInteger)zoom - completion:(void (^)(FGMPlatformTile *_Nullable, - FlutterError *_Nullable))completion; +- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId location:(FGMPlatformPoint *)location zoom:(NSInteger)zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion; @end + /// Dummy interface to force generation of the platform view creation params, /// which are not used in any Pigeon calls, only the platform view creation /// call made internally by Flutter. @protocol FGMMapsPlatformViewApi -- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type error:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, - NSObject *_Nullable api); +extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); -extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, - NSObject *_Nullable api, - NSString *messageChannelSuffix); /// Inspector API only intended for use in integration tests. @protocol FGMMapsInspectorApi @@ -963,29 +930,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 c1709a97ad52..3840a3737daf 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 @@ -886,6 +886,19 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { dy: update.dy, ), ); + case CameraUpdateType.newLatLngBoundsWithEdgeInsets: + update as CameraUpdateNewLatLngBoundsWithEdgeInsets; + return PlatformCameraUpdate( + cameraUpdate: PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets( + bounds: _platformLatLngBoundsFromLatLngBounds(update.bounds)!, + padding: PlatformEdgeInsets( + top: update.padding.top, + left: update.padding.left, + bottom: update.padding.bottom, + right: update.padding.right, + ), + ), + ); } } 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 87fd64fcb0bc..24482c82ff61 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,28 +1,44 @@ // 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.3.3), 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: unused_import, unused_shown_name +// ignore_for_file: type=lint import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; +import 'dart:typed_data' show Float64List, Int32List, Int64List; -import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; import 'package:flutter/services.dart'; +import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; -PlatformException _createConnectionError(String channelName) { - return PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); +Object? _extractReplyValueOrThrow( + List? replyList, + String channelName, { + required bool isNullValid, +}) { + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel: "$channelName".', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } + return replyList.firstOrNull; } -List wrapResponse({ - Object? result, - PlatformException? error, - bool empty = false, -}) { + +List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { if (empty) { return []; } @@ -31,29 +47,79 @@ List wrapResponse({ } return [error.code, error.message, error.details]; } - bool _deepEquals(Object? a, Object? b) { + if (identical(a, b)) { + return true; + } + if (a is double && b is double) { + if (a.isNaN && b.isNaN) { + return true; + } + return a == 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]), - ); + if (a.length != b.length) { + return false; + } + for (final MapEntry entryA in a.entries) { + bool found = false; + for (final MapEntry entryB in b.entries) { + if (_deepEquals(entryA.key, entryB.key)) { + if (_deepEquals(entryA.value, entryB.value)) { + found = true; + break; + } else { + return false; + } + } + } + if (!found) { + return false; + } + } + return true; } return a == b; } +int _deepHash(Object? value) { + if (value is List) { + return Object.hashAll(value.map(_deepHash)); + } + if (value is Map) { + int result = 0; + for (final MapEntry entry in value.entries) { + result += (_deepHash(entry.key) * 31) ^ _deepHash(entry.value); + } + return result; + } + if (value is double && value.isNaN) { + // Normalize NaN to a consistent hash. + return 0x7FF8000000000000.hashCode; + } + if (value is double && value == 0.0) { + // Normalize -0.0 to 0.0 so they have the same hash code. + return 0.0.hashCode; + } + return value.hashCode; +} + + /// Pigeon equivalent of MapType -enum PlatformMapType { none, normal, satellite, terrain, hybrid } +enum PlatformMapType { + none, + normal, + satellite, + terrain, + hybrid, +} -/// Pigeon equivalent of MarkerCollisionBehavior. +/// Pigeon equivalent of the MarkerCollisionBehavior enum. enum PlatformMarkerCollisionBehavior { requiredDisplay, optionalAndHidesLowerPriority, @@ -61,15 +127,29 @@ enum PlatformMarkerCollisionBehavior { } /// 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, +} -enum PlatformMarkerType { marker, advancedMarker } +enum PlatformMarkerType { + marker, + advancedMarker, +} /// Pigeon equivalent of [MapBitmapScaling]. -enum PlatformMapBitmapScaling { auto, none } +enum PlatformMapBitmapScaling { + auto, + none, +} /// Pigeon representatation of a CameraPosition. class PlatformCameraPosition { @@ -89,12 +169,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; @@ -115,17 +199,19 @@ class PlatformCameraPosition { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(bearing, other.bearing) && _deepEquals(target, other.target) && _deepEquals(tilt, other.tilt) && _deepEquals(zoom, other.zoom); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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 @@ -134,16 +220,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 @@ -155,27 +244,30 @@ class PlatformCameraUpdate { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(cameraUpdate, other.cameraUpdate); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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,56 +279,59 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(cameraPosition, other.cameraPosition); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(latLng, other.latLng); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of NewLatLngBounds @@ -251,12 +346,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,36 +366,86 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(bounds, other.bounds) && _deepEquals(padding, other.padding); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); +} + +/// Pigeon equivalent of NewLatLngBoundsWithEdgeInsets +class PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets { + PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets({ + required this.bounds, + required this.padding, + }); + + PlatformLatLngBounds bounds; + + PlatformEdgeInsets padding; + + List _toList() { + return [ + bounds, + padding, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets decode(Object result) { + result as List; + return PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets( + bounds: result[0]! as PlatformLatLngBounds, + padding: result[1]! as PlatformEdgeInsets, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(bounds, other.bounds) && _deepEquals(padding, other.padding); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => _deepHash([runtimeType, ..._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,36 +458,40 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(latLng, other.latLng) && _deepEquals(zoom, other.zoom); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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,36 +504,40 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(dx, other.dx) && _deepEquals(dy, other.dy); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -395,93 +550,100 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(amount, other.amount) && _deepEquals(focus, other.focus); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(out, other.out); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(zoom, other.zoom); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Circle class. @@ -531,8 +693,7 @@ class PlatformCircle { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCircle decode(Object result) { result as List; @@ -558,12 +719,12 @@ class PlatformCircle { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(consumeTapEvents, other.consumeTapEvents) && _deepEquals(fillColor, other.fillColor) && _deepEquals(strokeColor, other.strokeColor) && _deepEquals(visible, other.visible) && _deepEquals(strokeWidth, other.strokeWidth) && _deepEquals(zIndex, other.zIndex) && _deepEquals(center, other.center) && _deepEquals(radius, other.radius) && _deepEquals(circleId, other.circleId); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Heatmap class. @@ -605,14 +766,13 @@ class PlatformHeatmap { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformHeatmap decode(Object result) { result as List; return PlatformHeatmap( heatmapId: result[0]! as String, - data: (result[1] as List?)!.cast(), + data: (result[1]! as List).cast(), gradient: result[2] as PlatformHeatmapGradient?, opacity: result[3]! as double, radius: result[4]! as int, @@ -630,12 +790,12 @@ class PlatformHeatmap { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(heatmapId, other.heatmapId) && _deepEquals(data, other.data) && _deepEquals(gradient, other.gradient) && _deepEquals(opacity, other.opacity) && _deepEquals(radius, other.radius) && _deepEquals(minimumZoomIntensity, other.minimumZoomIntensity) && _deepEquals(maximumZoomIntensity, other.maximumZoomIntensity); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the HeatmapGradient class. @@ -657,18 +817,21 @@ 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; return PlatformHeatmapGradient( - colors: (result[0] as List?)!.cast(), - startPoints: (result[1] as List?)!.cast(), + colors: (result[0]! as List).cast(), + startPoints: (result[1]! as List).cast(), colorMapSize: result[2]! as int, ); } @@ -682,29 +845,34 @@ class PlatformHeatmapGradient { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(colors, other.colors) && _deepEquals(startPoints, other.startPoints) && _deepEquals(colorMapSize, other.colorMapSize); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -723,17 +891,21 @@ class PlatformWeightedLatLng { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(point, other.point) && _deepEquals(weight, other.weight); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -742,12 +914,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; @@ -767,12 +942,12 @@ class PlatformInfoWindow { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(title, other.title) && _deepEquals(snippet, other.snippet) && _deepEquals(anchor, other.anchor); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of Cluster. @@ -793,12 +968,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; @@ -806,7 +985,7 @@ class PlatformCluster { clusterManagerId: result[0]! as String, position: result[1]! as PlatformLatLng, bounds: result[2]! as PlatformLatLngBounds, - markerIds: (result[3] as List?)!.cast(), + markerIds: (result[3]! as List).cast(), ); } @@ -819,31 +998,36 @@ class PlatformCluster { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(clusterManagerId, other.clusterManagerId) && _deepEquals(position, other.position) && _deepEquals(bounds, other.bounds) && _deepEquals(markerIds, other.markerIds); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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 @@ -855,12 +1039,12 @@ class PlatformClusterManager { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(identifier, other.identifier); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Marker class. @@ -930,8 +1114,7 @@ class PlatformMarker { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformMarker decode(Object result) { result as List; @@ -962,12 +1145,12 @@ class PlatformMarker { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(alpha, other.alpha) && _deepEquals(anchor, other.anchor) && _deepEquals(consumeTapEvents, other.consumeTapEvents) && _deepEquals(draggable, other.draggable) && _deepEquals(flat, other.flat) && _deepEquals(icon, other.icon) && _deepEquals(infoWindow, other.infoWindow) && _deepEquals(position, other.position) && _deepEquals(rotation, other.rotation) && _deepEquals(visible, other.visible) && _deepEquals(zIndex, other.zIndex) && _deepEquals(markerId, other.markerId) && _deepEquals(clusterManagerId, other.clusterManagerId) && _deepEquals(collisionBehavior, other.collisionBehavior); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Polygon class. @@ -1021,8 +1204,7 @@ class PlatformPolygon { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformPolygon decode(Object result) { result as List; @@ -1031,8 +1213,8 @@ class PlatformPolygon { 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>(), + 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, @@ -1049,12 +1231,12 @@ class PlatformPolygon { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(polygonId, other.polygonId) && _deepEquals(consumesTapEvents, other.consumesTapEvents) && _deepEquals(fillColor, other.fillColor) && _deepEquals(geodesic, other.geodesic) && _deepEquals(points, other.points) && _deepEquals(holes, other.holes) && _deepEquals(visible, other.visible) && _deepEquals(strokeColor, other.strokeColor) && _deepEquals(strokeWidth, other.strokeWidth) && _deepEquals(zIndex, other.zIndex); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Polyline class. @@ -1110,8 +1292,7 @@ class PlatformPolyline { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformPolyline decode(Object result) { result as List; @@ -1121,8 +1302,8 @@ class PlatformPolyline { 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(), + 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, @@ -1138,29 +1319,34 @@ class PlatformPolyline { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(polylineId, other.polylineId) && _deepEquals(consumesTapEvents, other.consumesTapEvents) && _deepEquals(color, other.color) && _deepEquals(geodesic, other.geodesic) && _deepEquals(jointType, other.jointType) && _deepEquals(patterns, other.patterns) && _deepEquals(points, other.points) && _deepEquals(visible, other.visible) && _deepEquals(width, other.width) && _deepEquals(zIndex, other.zIndex); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1179,17 +1365,21 @@ class PlatformPatternItem { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(type, other.type) && _deepEquals(length, other.length); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1198,12 +1388,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; @@ -1223,12 +1416,12 @@ class PlatformTile { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(width, other.width) && _deepEquals(height, other.height) && _deepEquals(data, other.data); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the TileOverlay class. @@ -1266,8 +1459,7 @@ class PlatformTileOverlay { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformTileOverlay decode(Object result) { result as List; @@ -1290,12 +1482,12 @@ class PlatformTileOverlay { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(tileOverlayId, other.tileOverlayId) && _deepEquals(fadeIn, other.fadeIn) && _deepEquals(transparency, other.transparency) && _deepEquals(zIndex, other.zIndex) && _deepEquals(visible, other.visible) && _deepEquals(tileSize, other.tileSize); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of Flutter's EdgeInsets. @@ -1316,12 +1508,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; @@ -1342,29 +1538,34 @@ class PlatformEdgeInsets { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(top, other.top) && _deepEquals(bottom, other.bottom) && _deepEquals(left, other.left) && _deepEquals(right, other.right); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1383,29 +1584,34 @@ class PlatformLatLng { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(latitude, other.latitude) && _deepEquals(longitude, other.longitude); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1424,12 +1630,12 @@ class PlatformLatLngBounds { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(northeast, other.northeast) && _deepEquals(southwest, other.southwest); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of CameraTargetBounds. @@ -1437,17 +1643,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; @@ -1459,19 +1668,18 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(bounds, other.bounds); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the GroundOverlay class. @@ -1529,8 +1737,7 @@ class PlatformGroundOverlay { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformGroundOverlay decode(Object result) { result as List; @@ -1558,12 +1765,12 @@ class PlatformGroundOverlay { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(groundOverlayId, other.groundOverlayId) && _deepEquals(image, other.image) && _deepEquals(position, other.position) && _deepEquals(bounds, other.bounds) && _deepEquals(anchor, other.anchor) && _deepEquals(transparency, other.transparency) && _deepEquals(bearing, other.bearing) && _deepEquals(zIndex, other.zIndex) && _deepEquals(visible, other.visible) && _deepEquals(clickable, other.clickable) && _deepEquals(zoomLevel, other.zoomLevel); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Information passed to the platform view creation. @@ -1617,44 +1824,39 @@ class PlatformMapViewCreationParams { } Object encode() { - return _toList(); - } + 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(), + 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) { + if (other is! PlatformMapViewCreationParams || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(initialCameraPosition, other.initialCameraPosition) && _deepEquals(mapConfiguration, other.mapConfiguration) && _deepEquals(initialCircles, other.initialCircles) && _deepEquals(initialMarkers, other.initialMarkers) && _deepEquals(initialPolygons, other.initialPolygons) && _deepEquals(initialPolylines, other.initialPolylines) && _deepEquals(initialHeatmaps, other.initialHeatmaps) && _deepEquals(initialTileOverlays, other.initialTileOverlays) && _deepEquals(initialClusterManagers, other.initialClusterManagers) && _deepEquals(initialGroundOverlays, other.initialGroundOverlays); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of MapConfiguration. @@ -1740,8 +1942,7 @@ class PlatformMapConfiguration { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformMapConfiguration decode(Object result) { result as List; @@ -1770,40 +1971,47 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(compassEnabled, other.compassEnabled) && _deepEquals(cameraTargetBounds, other.cameraTargetBounds) && _deepEquals(mapType, other.mapType) && _deepEquals(minMaxZoomPreference, other.minMaxZoomPreference) && _deepEquals(rotateGesturesEnabled, other.rotateGesturesEnabled) && _deepEquals(scrollGesturesEnabled, other.scrollGesturesEnabled) && _deepEquals(tiltGesturesEnabled, other.tiltGesturesEnabled) && _deepEquals(trackCameraPosition, other.trackCameraPosition) && _deepEquals(zoomGesturesEnabled, other.zoomGesturesEnabled) && _deepEquals(myLocationEnabled, other.myLocationEnabled) && _deepEquals(myLocationButtonEnabled, other.myLocationButtonEnabled) && _deepEquals(padding, other.padding) && _deepEquals(indoorViewEnabled, other.indoorViewEnabled) && _deepEquals(trafficEnabled, other.trafficEnabled) && _deepEquals(buildingsEnabled, other.buildingsEnabled) && _deepEquals(markerType, other.markerType) && _deepEquals(mapId, other.mapId) && _deepEquals(style, other.style); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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 @@ -1815,29 +2023,34 @@ class PlatformPoint { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(x, other.x) && _deepEquals(y, other.y); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1856,12 +2069,12 @@ class PlatformSize { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(width, other.width) && _deepEquals(height, other.height); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon representation of a color. @@ -1882,12 +2095,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; @@ -1908,12 +2125,12 @@ class PlatformColor { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(red, other.red) && _deepEquals(green, other.green) && _deepEquals(blue, other.blue) && _deepEquals(alpha, other.alpha); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of GMSTileLayer properties. @@ -1934,12 +2151,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; @@ -1960,29 +2181,34 @@ class PlatformTileLayer { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(visible, other.visible) && _deepEquals(fadeIn, other.fadeIn) && _deepEquals(opacity, other.opacity) && _deepEquals(zIndex, other.zIndex); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -2001,19 +2227,21 @@ class PlatformZoomRange { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(min, other.min) && _deepEquals(max, other.max); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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], @@ -2025,16 +2253,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 @@ -2046,66 +2277,75 @@ class PlatformBitmap { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(bitmap, other.bitmap); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(hue, other.hue); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -2124,29 +2364,34 @@ class PlatformBitmapBytes { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(byteData, other.byteData) && _deepEquals(size, other.size); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -2165,12 +2410,12 @@ class PlatformBitmapAsset { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(name, other.name) && _deepEquals(pkg, other.pkg); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of [AssetImageBitmap]. @@ -2188,12 +2433,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; @@ -2207,19 +2455,18 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(name, other.name) && _deepEquals(scale, other.scale) && _deepEquals(size, other.size); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of [AssetMapBitmap]. @@ -2243,12 +2490,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; @@ -2270,12 +2522,12 @@ class PlatformBitmapAssetMap { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(assetName, other.assetName) && _deepEquals(bitmapScaling, other.bitmapScaling) && _deepEquals(imagePixelRatio, other.imagePixelRatio) && _deepEquals(width, other.width) && _deepEquals(height, other.height); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of [BytesMapBitmap]. @@ -2299,12 +2551,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; @@ -2326,12 +2583,12 @@ class PlatformBitmapBytesMap { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(byteData, other.byteData) && _deepEquals(bitmapScaling, other.bitmapScaling) && _deepEquals(imagePixelRatio, other.imagePixelRatio) && _deepEquals(width, other.width) && _deepEquals(height, other.height); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of [PinConfig]. @@ -2369,8 +2626,7 @@ class PlatformBitmapPinConfig { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmapPinConfig decode(Object result) { result as List; @@ -2393,14 +2649,15 @@ class PlatformBitmapPinConfig { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(backgroundColor, other.backgroundColor) && _deepEquals(borderColor, other.borderColor) && _deepEquals(glyphColor, other.glyphColor) && _deepEquals(glyphTextColor, other.glyphTextColor) && _deepEquals(glyphText, other.glyphText) && _deepEquals(glyphBitmap, other.glyphBitmap); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } + class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -2408,153 +2665,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 PlatformMarkerCollisionBehavior) { + } else if (value is PlatformMarkerCollisionBehavior) { buffer.putUint8(130); writeValue(buffer, value.index); - } else if (value is PlatformJointType) { + } else if (value is PlatformJointType) { buffer.putUint8(131); writeValue(buffer, value.index); - } else if (value is PlatformPatternItemType) { + } else if (value is PlatformPatternItemType) { buffer.putUint8(132); writeValue(buffer, value.index); - } else if (value is PlatformMarkerType) { + } else if (value is PlatformMarkerType) { buffer.putUint8(133); writeValue(buffer, value.index); - } else if (value is PlatformMapBitmapScaling) { + } else if (value is PlatformMapBitmapScaling) { buffer.putUint8(134); writeValue(buffer, value.index); - } else if (value is PlatformCameraPosition) { + } else if (value is PlatformCameraPosition) { buffer.putUint8(135); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { + } else if (value is PlatformCameraUpdate) { buffer.putUint8(136); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewCameraPosition) { + } else if (value is PlatformCameraUpdateNewCameraPosition) { buffer.putUint8(137); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLng) { + } else if (value is PlatformCameraUpdateNewLatLng) { buffer.putUint8(138); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngBounds) { + } else if (value is PlatformCameraUpdateNewLatLngBounds) { buffer.putUint8(139); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngZoom) { + } else if (value is PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets) { buffer.putUint8(140); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateScrollBy) { + } else if (value is PlatformCameraUpdateNewLatLngZoom) { buffer.putUint8(141); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomBy) { + } else if (value is PlatformCameraUpdateScrollBy) { buffer.putUint8(142); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoom) { + } else if (value is PlatformCameraUpdateZoomBy) { buffer.putUint8(143); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomTo) { + } else if (value is PlatformCameraUpdateZoom) { buffer.putUint8(144); writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { + } else if (value is PlatformCameraUpdateZoomTo) { buffer.putUint8(145); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { + } else if (value is PlatformCircle) { buffer.putUint8(146); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmapGradient) { + } else if (value is PlatformHeatmap) { buffer.putUint8(147); writeValue(buffer, value.encode()); - } else if (value is PlatformWeightedLatLng) { + } else if (value is PlatformHeatmapGradient) { buffer.putUint8(148); writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { + } else if (value is PlatformWeightedLatLng) { buffer.putUint8(149); writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { + } else if (value is PlatformInfoWindow) { buffer.putUint8(150); writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { + } else if (value is PlatformCluster) { buffer.putUint8(151); writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { + } else if (value is PlatformClusterManager) { buffer.putUint8(152); writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { + } else if (value is PlatformMarker) { buffer.putUint8(153); writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { + } else if (value is PlatformPolygon) { buffer.putUint8(154); writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { + } else if (value is PlatformPolyline) { buffer.putUint8(155); writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { + } else if (value is PlatformPatternItem) { buffer.putUint8(156); writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { + } else if (value is PlatformTile) { buffer.putUint8(157); writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { + } else if (value is PlatformTileOverlay) { buffer.putUint8(158); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { + } else if (value is PlatformEdgeInsets) { buffer.putUint8(159); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { + } else if (value is PlatformLatLng) { buffer.putUint8(160); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { + } else if (value is PlatformLatLngBounds) { buffer.putUint8(161); writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { + } else if (value is PlatformCameraTargetBounds) { buffer.putUint8(162); writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { + } else if (value is PlatformGroundOverlay) { buffer.putUint8(163); writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { + } else if (value is PlatformMapViewCreationParams) { buffer.putUint8(164); writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { + } else if (value is PlatformMapConfiguration) { buffer.putUint8(165); writeValue(buffer, value.encode()); - } else if (value is PlatformSize) { + } else if (value is PlatformPoint) { buffer.putUint8(166); writeValue(buffer, value.encode()); - } else if (value is PlatformColor) { + } else if (value is PlatformSize) { buffer.putUint8(167); writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { + } else if (value is PlatformColor) { buffer.putUint8(168); writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { + } else if (value is PlatformTileLayer) { buffer.putUint8(169); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { + } else if (value is PlatformZoomRange) { buffer.putUint8(170); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { + } else if (value is PlatformBitmap) { buffer.putUint8(171); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { + } else if (value is PlatformBitmapDefaultMarker) { buffer.putUint8(172); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { + } else if (value is PlatformBitmapBytes) { buffer.putUint8(173); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { + } else if (value is PlatformBitmapAsset) { buffer.putUint8(174); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { + } else if (value is PlatformBitmapAssetImage) { buffer.putUint8(175); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { + } else if (value is PlatformBitmapAssetMap) { buffer.putUint8(176); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapPinConfig) { + } else if (value is PlatformBitmapBytesMap) { buffer.putUint8(177); writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapPinConfig) { + buffer.putUint8(178); + writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); } @@ -2568,9 +2828,7 @@ class _PigeonCodec extends StandardMessageCodec { return value == null ? null : PlatformMapType.values[value]; case 130: final value = readValue(buffer) as int?; - return value == null - ? null - : PlatformMarkerCollisionBehavior.values[value]; + return value == null ? null : PlatformMarkerCollisionBehavior.values[value]; case 131: final value = readValue(buffer) as int?; return value == null ? null : PlatformJointType.values[value]; @@ -2594,80 +2852,82 @@ class _PigeonCodec extends StandardMessageCodec { case 139: return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); case 140: - return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); + return PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets.decode(readValue(buffer)!); case 141: - return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); + return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); case 142: - return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); + return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); case 143: - return PlatformCameraUpdateZoom.decode(readValue(buffer)!); + return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); case 144: - return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); + return PlatformCameraUpdateZoom.decode(readValue(buffer)!); case 145: - return PlatformCircle.decode(readValue(buffer)!); + return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); case 146: - return PlatformHeatmap.decode(readValue(buffer)!); + return PlatformCircle.decode(readValue(buffer)!); case 147: - return PlatformHeatmapGradient.decode(readValue(buffer)!); + return PlatformHeatmap.decode(readValue(buffer)!); case 148: - return PlatformWeightedLatLng.decode(readValue(buffer)!); + return PlatformHeatmapGradient.decode(readValue(buffer)!); case 149: - return PlatformInfoWindow.decode(readValue(buffer)!); + return PlatformWeightedLatLng.decode(readValue(buffer)!); case 150: - return PlatformCluster.decode(readValue(buffer)!); + return PlatformInfoWindow.decode(readValue(buffer)!); case 151: - return PlatformClusterManager.decode(readValue(buffer)!); + return PlatformCluster.decode(readValue(buffer)!); case 152: - return PlatformMarker.decode(readValue(buffer)!); + return PlatformClusterManager.decode(readValue(buffer)!); case 153: - return PlatformPolygon.decode(readValue(buffer)!); + return PlatformMarker.decode(readValue(buffer)!); case 154: - return PlatformPolyline.decode(readValue(buffer)!); + return PlatformPolygon.decode(readValue(buffer)!); case 155: - return PlatformPatternItem.decode(readValue(buffer)!); + return PlatformPolyline.decode(readValue(buffer)!); case 156: - return PlatformTile.decode(readValue(buffer)!); + return PlatformPatternItem.decode(readValue(buffer)!); case 157: - return PlatformTileOverlay.decode(readValue(buffer)!); + return PlatformTile.decode(readValue(buffer)!); case 158: - return PlatformEdgeInsets.decode(readValue(buffer)!); + return PlatformTileOverlay.decode(readValue(buffer)!); case 159: - return PlatformLatLng.decode(readValue(buffer)!); + return PlatformEdgeInsets.decode(readValue(buffer)!); case 160: - return PlatformLatLngBounds.decode(readValue(buffer)!); + return PlatformLatLng.decode(readValue(buffer)!); case 161: - return PlatformCameraTargetBounds.decode(readValue(buffer)!); + return PlatformLatLngBounds.decode(readValue(buffer)!); case 162: - return PlatformGroundOverlay.decode(readValue(buffer)!); + return PlatformCameraTargetBounds.decode(readValue(buffer)!); case 163: - return PlatformMapViewCreationParams.decode(readValue(buffer)!); + return PlatformGroundOverlay.decode(readValue(buffer)!); case 164: - return PlatformMapConfiguration.decode(readValue(buffer)!); + return PlatformMapViewCreationParams.decode(readValue(buffer)!); case 165: - return PlatformPoint.decode(readValue(buffer)!); + return PlatformMapConfiguration.decode(readValue(buffer)!); case 166: - return PlatformSize.decode(readValue(buffer)!); + return PlatformPoint.decode(readValue(buffer)!); case 167: - return PlatformColor.decode(readValue(buffer)!); + return PlatformSize.decode(readValue(buffer)!); case 168: - return PlatformTileLayer.decode(readValue(buffer)!); + return PlatformColor.decode(readValue(buffer)!); case 169: - return PlatformZoomRange.decode(readValue(buffer)!); + return PlatformTileLayer.decode(readValue(buffer)!); case 170: - return PlatformBitmap.decode(readValue(buffer)!); + return PlatformZoomRange.decode(readValue(buffer)!); case 171: - return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); + return PlatformBitmap.decode(readValue(buffer)!); case 172: - return PlatformBitmapBytes.decode(readValue(buffer)!); + return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); case 173: - return PlatformBitmapAsset.decode(readValue(buffer)!); + return PlatformBitmapBytes.decode(readValue(buffer)!); case 174: - return PlatformBitmapAssetImage.decode(readValue(buffer)!); + return PlatformBitmapAsset.decode(readValue(buffer)!); case 175: - return PlatformBitmapAssetMap.decode(readValue(buffer)!); + return PlatformBitmapAssetImage.decode(readValue(buffer)!); case 176: - return PlatformBitmapBytesMap.decode(readValue(buffer)!); + return PlatformBitmapAssetMap.decode(readValue(buffer)!); case 177: + return PlatformBitmapBytesMap.decode(readValue(buffer)!); + case 178: return PlatformBitmapPinConfig.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -2683,10 +2943,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(); @@ -2695,8 +2953,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, @@ -2704,355 +2961,232 @@ class MapsApi { ); 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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'; + 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! 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_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); - } else 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! 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_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3060,85 +3194,59 @@ class MapsApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! 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_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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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, @@ -3146,106 +3254,73 @@ class MapsApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! 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_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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } /// Sets the style to the given map style string, where an empty string @@ -3254,28 +3329,22 @@ 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); - } else 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as String?; } /// Returns the error string from the last attempt to set the map style, if @@ -3284,8 +3353,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, @@ -3293,49 +3361,38 @@ class MapsApi { ); 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue 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_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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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, @@ -3343,23 +3400,19 @@ class MapsApi { ); 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as Uint8List?; } /// Returns true if the map supports advanced markers. Future isAdvancedMarkersAvailable() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3367,22 +3420,14 @@ class MapsApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } } @@ -3436,26 +3481,14 @@ abstract class MapsCallbackApi { void onGroundOverlayTap(String groundOverlayId); /// Called to get data for a map tile. - Future getTileOverlayTile( - String tileOverlayId, - PlatformPoint location, - int zoom, - ); - - static void setUp( - MapsCallbackApi? api, { - BinaryMessenger? binaryMessenger, - String messageChannelSuffix = '', - }) { - messageChannelSuffix = messageChannelSuffix.isNotEmpty - ? '.$messageChannelSuffix' - : ''; + Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); + + static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { + messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; { final 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 { @@ -3465,54 +3498,37 @@ 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.', - ); - 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 List args = message! as List; + final PlatformCameraPosition arg_cameraPosition = args[0]! as PlatformCameraPosition; try { - api.onCameraMove(arg_cameraPosition!); + 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 { @@ -3522,468 +3538,286 @@ 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.', - ); - 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.', - ); + final List args = message! as List; + final PlatformLatLng arg_position = args[0]! as PlatformLatLng; try { - api.onTap(arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final PlatformLatLng arg_position = args[0]! as PlatformLatLng; try { - api.onLongPress(arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; try { - api.onMarkerTap(arg_markerId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; + final PlatformLatLng arg_position = args[1]! as PlatformLatLng; try { - api.onMarkerDragStart(arg_markerId!, arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; + final PlatformLatLng arg_position = args[1]! as PlatformLatLng; try { - api.onMarkerDrag(arg_markerId!, arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; + final PlatformLatLng arg_position = args[1]! as PlatformLatLng; try { - api.onMarkerDragEnd(arg_markerId!, arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; try { - api.onInfoWindowTap(arg_markerId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_circleId = args[0]! as String; try { - api.onCircleTap(arg_circleId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final PlatformCluster arg_cluster = args[0]! as PlatformCluster; try { - api.onClusterTap(arg_cluster!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_polygonId = args[0]! as String; try { - api.onPolygonTap(arg_polygonId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_polylineId = args[0]! as String; try { - api.onPolylineTap(arg_polylineId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_groundOverlayId = args[0]! as String; try { - api.onGroundOverlayTap(arg_groundOverlayId!); + 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.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.', - ); + final List args = message! as List; + final String arg_tileOverlayId = args[0]! as String; + final PlatformPoint arg_location = args[1]! as PlatformPoint; + final int arg_zoom = args[2]! as 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())); } }); } @@ -3998,13 +3832,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(); @@ -4012,28 +3842,21 @@ 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } } @@ -4042,13 +3865,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(); @@ -4056,8 +3875,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, @@ -4065,27 +3883,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4093,27 +3902,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4121,27 +3921,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4149,27 +3940,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4177,27 +3959,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4205,27 +3978,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4233,27 +3997,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4261,104 +4016,75 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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); - } else 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as PlatformTileLayer?; } - 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); - } else 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as PlatformGroundOverlay?; } 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); - } else 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as PlatformHeatmap?; } 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, @@ -4366,58 +4092,37 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as PlatformZoomRange; } 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); - } else 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(); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return (pigeonVar_replyValue! 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, @@ -4425,21 +4130,13 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as PlatformCameraPosition; } } 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 66e475c54232..1035d468e0bc 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 @@ -71,6 +71,13 @@ class PlatformCameraUpdateNewLatLngBounds { final double padding; } +/// Pigeon equivalent of NewLatLngBoundsWithEdgeInsets +class PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets { + PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets(this.bounds, this.padding); + final PlatformLatLngBounds bounds; + final PlatformEdgeInsets padding; +} + /// Pigeon equivalent of NewLatLngZoom class PlatformCameraUpdateNewLatLngZoom { PlatformCameraUpdateNewLatLngZoom(this.latLng, this.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 d8548ac8dac0..7f5d1c382f5f 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.1 +version: 2.19.0 environment: sdk: ^3.10.0 @@ -19,7 +19,7 @@ flutter: dependencies: flutter: sdk: flutter - google_maps_flutter_platform_interface: ^2.14.2 + google_maps_flutter_platform_interface: ^2.16.0 stream_transform: ^2.0.0 dev_dependencies: 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 48396c35f65c..89f047fbf5e2 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 @@ -1336,6 +1336,56 @@ void main() { expect(typedUpdate.out, true); }); + test( + 'moveCamera calls through with expected newLatLngBoundsWithEdgeInsets', + () async { + const mapId = 1; + final (GoogleMapsFlutterIOS maps, MockMapsApi api) = setUpMockMap( + mapId: mapId, + ); + + final bounds = LatLngBounds( + northeast: const LatLng(10.0, 20.0), + southwest: const LatLng(9.0, 21.0), + ); + const padding = EdgeInsets.fromLTRB(10.0, 20.0, 30.0, 40.0); + final CameraUpdate update = CameraUpdate.newLatLngBoundsWithEdgeInsets( + bounds, + padding, + ); + await maps.moveCamera(update, mapId: mapId); + + final VerificationResult verification = verify( + api.moveCamera(captureAny), + ); + final passedUpdate = verification.captured[0] as PlatformCameraUpdate; + final typedUpdate = + passedUpdate.cameraUpdate + as PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets; + update as CameraUpdateNewLatLngBoundsWithEdgeInsets; + expect( + typedUpdate.bounds.northeast.latitude, + update.bounds.northeast.latitude, + ); + expect( + typedUpdate.bounds.northeast.longitude, + update.bounds.northeast.longitude, + ); + expect( + typedUpdate.bounds.southwest.latitude, + update.bounds.southwest.latitude, + ); + expect( + typedUpdate.bounds.southwest.longitude, + update.bounds.southwest.longitude, + ); + expect(typedUpdate.padding.top, update.padding.top); + expect(typedUpdate.padding.left, update.padding.left); + expect(typedUpdate.padding.bottom, update.padding.bottom); + expect(typedUpdate.padding.right, update.padding.right); + }, + ); + test('MapBitmapScaling to PlatformMapBitmapScaling', () { expect( GoogleMapsFlutterIOS.platformMapBitmapScalingFromScaling( diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.mocks.dart b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.mocks.dart index e4ff2b78e188..419c7cb2b353 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.mocks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/test/google_maps_flutter_ios_test.mocks.dart @@ -23,6 +23,7 @@ import 'package:mockito/src/dummies.dart' as _i3; // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakePlatformPoint_0 extends _i1.SmartFake implements _i2.PlatformPoint { _FakePlatformPoint_0(Object parent, Invocation parentInvocation) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/FGMConversionUtils.m b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/FGMConversionUtils.m index 001ebc30cbfa..2886bdf8da69 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/FGMConversionUtils.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/FGMConversionUtils.m @@ -241,6 +241,14 @@ GMSCollisionBehavior FGMGetCollisionBehaviorForPigeonCollisionBehavior( return [GMSCameraUpdate fitBounds:FGMGetCoordinateBoundsForPigeonLatLngBounds(typedUpdate.bounds) withPadding:typedUpdate.padding]; + } else if ([update isKindOfClass:[FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets class]]) { + FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *typedUpdate = + (FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)update; + FGMPlatformEdgeInsets *padding = typedUpdate.padding; + return + [GMSCameraUpdate fitBounds:FGMGetCoordinateBoundsForPigeonLatLngBounds(typedUpdate.bounds) + withEdgeInsets:UIEdgeInsetsMake(padding.top, padding.left, + padding.bottom, padding.right)]; } else if ([update isKindOfClass:[FGMPlatformCameraUpdateNewLatLngZoom class]]) { FGMPlatformCameraUpdateNewLatLngZoom *typedUpdate = (FGMPlatformCameraUpdateNewLatLngZoom *)update; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/google_maps_flutter_pigeon_messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/google_maps_flutter_pigeon_messages.g.m index 3302fd9e13b8..0bfc5b66502d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/google_maps_flutter_pigeon_messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/google_maps_flutter_pigeon_messages.g.m @@ -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.3.3), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "google_maps_flutter_pigeon_messages.g.h" @@ -12,6 +12,96 @@ @import Flutter; #endif +static BOOL __attribute__((unused)) FLTPigeonDeepEquals(id _Nullable a, id _Nullable b) { + if (a == b) { + return YES; + } + if (a == nil) { + return b == [NSNull null]; + } + if (b == nil) { + return a == [NSNull null]; + } + if ([a isKindOfClass:[NSNumber class]] && [b isKindOfClass:[NSNumber class]]) { + return [a isEqual:b] || (isnan([(NSNumber *)a doubleValue]) && isnan([(NSNumber *)b doubleValue])); + } + if ([a isKindOfClass:[NSArray class]] && [b isKindOfClass:[NSArray class]]) { + NSArray *arrayA = (NSArray *)a; + NSArray *arrayB = (NSArray *)b; + if (arrayA.count != arrayB.count) { + return NO; + } + for (NSUInteger i = 0; i < arrayA.count; i++) { + if (!FLTPigeonDeepEquals(arrayA[i], arrayB[i])) { + return NO; + } + } + return YES; + } + if ([a isKindOfClass:[NSDictionary class]] && [b isKindOfClass:[NSDictionary class]]) { + NSDictionary *dictA = (NSDictionary *)a; + NSDictionary *dictB = (NSDictionary *)b; + if (dictA.count != dictB.count) { + return NO; + } + for (id keyA in dictA) { + id valueA = dictA[keyA]; + BOOL found = NO; + for (id keyB in dictB) { + if (FLTPigeonDeepEquals(keyA, keyB)) { + id valueB = dictB[keyB]; + if (FLTPigeonDeepEquals(valueA, valueB)) { + found = YES; + break; + } else { + return NO; + } + } + } + if (!found) { + return NO; + } + } + return YES; + } + return [a isEqual:b]; +} + +static NSUInteger __attribute__((unused)) FLTPigeonDeepHash(id _Nullable value) { + if (value == nil || value == (id)[NSNull null]) { + return 0; + } + if ([value isKindOfClass:[NSNumber class]]) { + NSNumber *n = (NSNumber *)value; + double d = n.doubleValue; + if (isnan(d)) { + // Normalize NaN to a consistent hash. + return (NSUInteger)0x7FF8000000000000; + } + if (d == 0.0) { + // Normalize -0.0 to 0.0 so they have the same hash code. + d = 0.0; + } + return @(d).hash; + } + if ([value isKindOfClass:[NSArray class]]) { + NSUInteger result = 1; + for (id item in (NSArray *)value) { + result = result * 31 + FLTPigeonDeepHash(item); + } + return result; + } + if ([value isKindOfClass:[NSDictionary class]]) { + NSUInteger result = 0; + NSDictionary *dict = (NSDictionary *)value; + for (id key in dict) { + result += ((FLTPigeonDeepHash(key) * 31) ^ FLTPigeonDeepHash(dict[key])); + } + return result; + } + return [value hash]; +} + static NSArray *wrapResult(id result, FlutterError *error) { if (error) { return @[ @@ -22,12 +112,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) { @@ -46,7 +131,7 @@ - (instancetype)initWithValue:(FGMPlatformMapType)value { } @end -/// Pigeon equivalent of MarkerCollisionBehavior. +/// Pigeon equivalent of the MarkerCollisionBehavior enum. @implementation FGMPlatformMarkerCollisionBehaviorBox - (instancetype)initWithValue:(FGMPlatformMarkerCollisionBehavior)value { self = [super init]; @@ -130,6 +215,12 @@ + (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray *)toList; @end +@interface FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets () ++ (FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)fromList:(NSArray *)list; ++ (nullable FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)nullableFromList:(NSArray *)list; +- (NSArray *)toList; +@end + @interface FGMPlatformCameraUpdateNewLatLngZoom () + (FGMPlatformCameraUpdateNewLatLngZoom *)fromList:(NSArray *)list; + (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray *)list; @@ -359,11 +450,11 @@ + (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray *)list; @end @implementation FGMPlatformCameraPosition -+ (instancetype)makeWithBearing:(double)bearing - target:(FGMPlatformLatLng *)target - tilt:(double)tilt - zoom:(double)zoom { - FGMPlatformCameraPosition *pigeonResult = [[FGMPlatformCameraPosition alloc] init]; ++ (instancetype)makeWithBearing:(double )bearing + target:(FGMPlatformLatLng *)target + tilt:(double )tilt + zoom:(double )zoom { + FGMPlatformCameraPosition* pigeonResult = [[FGMPlatformCameraPosition alloc] init]; pigeonResult.bearing = bearing; pigeonResult.target = target; pigeonResult.tilt = tilt; @@ -389,11 +480,30 @@ + (nullable FGMPlatformCameraPosition *)nullableFromList:(NSArray *)list { @(self.zoom), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraPosition *other = (FGMPlatformCameraPosition *)object; + return (self.bearing == other.bearing || (isnan(self.bearing) && isnan(other.bearing))) && FLTPigeonDeepEquals(self.target, other.target) && (self.tilt == other.tilt || (isnan(self.tilt) && isnan(other.tilt))) && (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.bearing) ? (NSUInteger)0x7FF8000000000000 : @(self.bearing).hash); + result = result * 31 + FLTPigeonDeepHash(self.target); + result = result * 31 + (isnan(self.tilt) ? (NSUInteger)0x7FF8000000000000 : @(self.tilt).hash); + result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash); + return result; +} @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; } @@ -410,18 +520,32 @@ + (nullable FGMPlatformCameraUpdate *)nullableFromList:(NSArray *)list { self.cameraUpdate ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdate *other = (FGMPlatformCameraUpdate *)object; + return FLTPigeonDeepEquals(self.cameraUpdate, other.cameraUpdate); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.cameraUpdate); + return result; +} @end @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; } @@ -433,11 +557,27 @@ + (nullable FGMPlatformCameraUpdateNewCameraPosition *)nullableFromList:(NSArray self.cameraPosition ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateNewCameraPosition *other = (FGMPlatformCameraUpdateNewCameraPosition *)object; + return FLTPigeonDeepEquals(self.cameraPosition, other.cameraPosition); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.cameraPosition); + return result; +} @end @implementation FGMPlatformCameraUpdateNewLatLng + (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng { - FGMPlatformCameraUpdateNewLatLng *pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init]; + FGMPlatformCameraUpdateNewLatLng* pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init]; pigeonResult.latLng = latLng; return pigeonResult; } @@ -454,19 +594,34 @@ + (nullable FGMPlatformCameraUpdateNewLatLng *)nullableFromList:(NSArray *)l self.latLng ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateNewLatLng *other = (FGMPlatformCameraUpdateNewLatLng *)object; + return FLTPigeonDeepEquals(self.latLng, other.latLng); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.latLng); + return result; +} @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; @@ -480,19 +635,77 @@ + (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray *)list { + FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *pigeonResult = [[FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets alloc] init]; + pigeonResult.bounds = GetNullableObjectAtIndex(list, 0); + pigeonResult.padding = GetNullableObjectAtIndex(list, 1); + return pigeonResult; +} ++ (nullable FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)nullableFromList:(NSArray *)list { + return (list) ? [FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets fromList:list] : nil; +} +- (NSArray *)toList { + return @[ + self.bounds ?: [NSNull null], + self.padding ?: [NSNull null], + ]; +} +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *other = (FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)object; + return FLTPigeonDeepEquals(self.bounds, other.bounds) && FLTPigeonDeepEquals(self.padding, other.padding); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.bounds); + result = result * 31 + FLTPigeonDeepHash(self.padding); + return result; +} @end @implementation FGMPlatformCameraUpdateNewLatLngZoom -+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom { - FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult = - [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init]; ++ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng + zoom:(double )zoom { + FGMPlatformCameraUpdateNewLatLngZoom* pigeonResult = [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init]; pigeonResult.latLng = latLng; pigeonResult.zoom = zoom; return pigeonResult; } + (FGMPlatformCameraUpdateNewLatLngZoom *)fromList:(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; @@ -506,11 +719,29 @@ + (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray @(self.zoom), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateNewLatLngZoom *other = (FGMPlatformCameraUpdateNewLatLngZoom *)object; + return FLTPigeonDeepEquals(self.latLng, other.latLng) && (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.latLng); + result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash); + return result; +} @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; @@ -530,11 +761,29 @@ + (nullable FGMPlatformCameraUpdateScrollBy *)nullableFromList:(NSArray *)li @(self.dy), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateScrollBy *other = (FGMPlatformCameraUpdateScrollBy *)object; + return (self.dx == other.dx || (isnan(self.dx) && isnan(other.dx))) && (self.dy == other.dy || (isnan(self.dy) && isnan(other.dy))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.dx) ? (NSUInteger)0x7FF8000000000000 : @(self.dx).hash); + result = result * 31 + (isnan(self.dy) ? (NSUInteger)0x7FF8000000000000 : @(self.dy).hash); + return result; +} @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; @@ -554,11 +803,28 @@ + (nullable FGMPlatformCameraUpdateZoomBy *)nullableFromList:(NSArray *)list self.focus ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateZoomBy *other = (FGMPlatformCameraUpdateZoomBy *)object; + return (self.amount == other.amount || (isnan(self.amount) && isnan(other.amount))) && FLTPigeonDeepEquals(self.focus, other.focus); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.amount) ? (NSUInteger)0x7FF8000000000000 : @(self.amount).hash); + result = result * 31 + FLTPigeonDeepHash(self.focus); + return result; +} @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; } @@ -575,11 +841,27 @@ + (nullable FGMPlatformCameraUpdateZoom *)nullableFromList:(NSArray *)list { @(self.out), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateZoom *other = (FGMPlatformCameraUpdateZoom *)object; + return self.out == other.out; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.out).hash; + return result; +} @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; } @@ -596,19 +878,35 @@ + (nullable FGMPlatformCameraUpdateZoomTo *)nullableFromList:(NSArray *)list @(self.zoom), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateZoomTo *other = (FGMPlatformCameraUpdateZoomTo *)object; + return (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash); + return result; +} @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; @@ -649,17 +947,41 @@ + (nullable FGMPlatformCircle *)nullableFromList:(NSArray *)list { self.circleId ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCircle *other = (FGMPlatformCircle *)object; + return self.consumeTapEvents == other.consumeTapEvents && FLTPigeonDeepEquals(self.fillColor, other.fillColor) && FLTPigeonDeepEquals(self.strokeColor, other.strokeColor) && self.visible == other.visible && self.strokeWidth == other.strokeWidth && (self.zIndex == other.zIndex || (isnan(self.zIndex) && isnan(other.zIndex))) && FLTPigeonDeepEquals(self.center, other.center) && (self.radius == other.radius || (isnan(self.radius) && isnan(other.radius))) && FLTPigeonDeepEquals(self.circleId, other.circleId); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.consumeTapEvents).hash; + result = result * 31 + FLTPigeonDeepHash(self.fillColor); + result = result * 31 + FLTPigeonDeepHash(self.strokeColor); + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.strokeWidth).hash; + result = result * 31 + (isnan(self.zIndex) ? (NSUInteger)0x7FF8000000000000 : @(self.zIndex).hash); + result = result * 31 + FLTPigeonDeepHash(self.center); + result = result * 31 + (isnan(self.radius) ? (NSUInteger)0x7FF8000000000000 : @(self.radius).hash); + result = result * 31 + FLTPigeonDeepHash(self.circleId); + return result; +} @end @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; @@ -694,13 +1016,35 @@ + (nullable FGMPlatformHeatmap *)nullableFromList:(NSArray *)list { @(self.maximumZoomIntensity), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformHeatmap *other = (FGMPlatformHeatmap *)object; + return FLTPigeonDeepEquals(self.heatmapId, other.heatmapId) && FLTPigeonDeepEquals(self.data, other.data) && FLTPigeonDeepEquals(self.gradient, other.gradient) && (self.opacity == other.opacity || (isnan(self.opacity) && isnan(other.opacity))) && self.radius == other.radius && self.minimumZoomIntensity == other.minimumZoomIntensity && self.maximumZoomIntensity == other.maximumZoomIntensity; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.heatmapId); + result = result * 31 + FLTPigeonDeepHash(self.data); + result = result * 31 + FLTPigeonDeepHash(self.gradient); + result = result * 31 + (isnan(self.opacity) ? (NSUInteger)0x7FF8000000000000 : @(self.opacity).hash); + result = result * 31 + @(self.radius).hash; + result = result * 31 + @(self.minimumZoomIntensity).hash; + result = result * 31 + @(self.maximumZoomIntensity).hash; + return result; +} @end @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; @@ -723,11 +1067,30 @@ + (nullable FGMPlatformHeatmapGradient *)nullableFromList:(NSArray *)list { @(self.colorMapSize), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformHeatmapGradient *other = (FGMPlatformHeatmapGradient *)object; + return FLTPigeonDeepEquals(self.colors, other.colors) && FLTPigeonDeepEquals(self.startPoints, other.startPoints) && self.colorMapSize == other.colorMapSize; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.colors); + result = result * 31 + FLTPigeonDeepHash(self.startPoints); + result = result * 31 + @(self.colorMapSize).hash; + return result; +} @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; @@ -747,13 +1110,30 @@ + (nullable FGMPlatformWeightedLatLng *)nullableFromList:(NSArray *)list { @(self.weight), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformWeightedLatLng *other = (FGMPlatformWeightedLatLng *)object; + return FLTPigeonDeepEquals(self.point, other.point) && (self.weight == other.weight || (isnan(self.weight) && isnan(other.weight))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.point); + result = result * 31 + (isnan(self.weight) ? (NSUInteger)0x7FF8000000000000 : @(self.weight).hash); + return result; +} @end @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; @@ -776,14 +1156,32 @@ + (nullable FGMPlatformInfoWindow *)nullableFromList:(NSArray *)list { self.anchor ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformInfoWindow *other = (FGMPlatformInfoWindow *)object; + return FLTPigeonDeepEquals(self.title, other.title) && FLTPigeonDeepEquals(self.snippet, other.snippet) && FLTPigeonDeepEquals(self.anchor, other.anchor); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.title); + result = result * 31 + FLTPigeonDeepHash(self.snippet); + result = result * 31 + FLTPigeonDeepHash(self.anchor); + return result; +} @end @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; @@ -809,11 +1207,30 @@ + (nullable FGMPlatformCluster *)nullableFromList:(NSArray *)list { self.markerIds ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCluster *other = (FGMPlatformCluster *)object; + return FLTPigeonDeepEquals(self.clusterManagerId, other.clusterManagerId) && FLTPigeonDeepEquals(self.position, other.position) && FLTPigeonDeepEquals(self.bounds, other.bounds) && FLTPigeonDeepEquals(self.markerIds, other.markerIds); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.clusterManagerId); + result = result * 31 + FLTPigeonDeepHash(self.position); + result = result * 31 + FLTPigeonDeepHash(self.bounds); + result = result * 31 + FLTPigeonDeepHash(self.markerIds); + return result; +} @end @implementation FGMPlatformClusterManager + (instancetype)makeWithIdentifier:(NSString *)identifier { - FGMPlatformClusterManager *pigeonResult = [[FGMPlatformClusterManager alloc] init]; + FGMPlatformClusterManager* pigeonResult = [[FGMPlatformClusterManager alloc] init]; pigeonResult.identifier = identifier; return pigeonResult; } @@ -830,24 +1247,40 @@ + (nullable FGMPlatformClusterManager *)nullableFromList:(NSArray *)list { self.identifier ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformClusterManager *other = (FGMPlatformClusterManager *)object; + return FLTPigeonDeepEquals(self.identifier, other.identifier); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.identifier); + return result; +} @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 - collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior { - FGMPlatformMarker *pigeonResult = [[FGMPlatformMarker alloc] init]; ++ (instancetype)makeWithAlpha:(double )alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL )consumeTapEvents + draggable:(BOOL )draggable + flat:(BOOL )flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double )rotation + visible:(BOOL )visible + zIndex:(NSInteger )zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId + collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior { + FGMPlatformMarker* pigeonResult = [[FGMPlatformMarker alloc] init]; pigeonResult.alpha = alpha; pigeonResult.anchor = anchor; pigeonResult.consumeTapEvents = consumeTapEvents; @@ -903,20 +1336,49 @@ + (nullable FGMPlatformMarker *)nullableFromList:(NSArray *)list { self.collisionBehavior ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformMarker *other = (FGMPlatformMarker *)object; + return (self.alpha == other.alpha || (isnan(self.alpha) && isnan(other.alpha))) && FLTPigeonDeepEquals(self.anchor, other.anchor) && self.consumeTapEvents == other.consumeTapEvents && self.draggable == other.draggable && self.flat == other.flat && FLTPigeonDeepEquals(self.icon, other.icon) && FLTPigeonDeepEquals(self.infoWindow, other.infoWindow) && FLTPigeonDeepEquals(self.position, other.position) && (self.rotation == other.rotation || (isnan(self.rotation) && isnan(other.rotation))) && self.visible == other.visible && self.zIndex == other.zIndex && FLTPigeonDeepEquals(self.markerId, other.markerId) && FLTPigeonDeepEquals(self.clusterManagerId, other.clusterManagerId) && FLTPigeonDeepEquals(self.collisionBehavior, other.collisionBehavior); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.alpha) ? (NSUInteger)0x7FF8000000000000 : @(self.alpha).hash); + result = result * 31 + FLTPigeonDeepHash(self.anchor); + result = result * 31 + @(self.consumeTapEvents).hash; + result = result * 31 + @(self.draggable).hash; + result = result * 31 + @(self.flat).hash; + result = result * 31 + FLTPigeonDeepHash(self.icon); + result = result * 31 + FLTPigeonDeepHash(self.infoWindow); + result = result * 31 + FLTPigeonDeepHash(self.position); + result = result * 31 + (isnan(self.rotation) ? (NSUInteger)0x7FF8000000000000 : @(self.rotation).hash); + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.zIndex).hash; + result = result * 31 + FLTPigeonDeepHash(self.markerId); + result = result * 31 + FLTPigeonDeepHash(self.clusterManagerId); + result = result * 31 + FLTPigeonDeepHash(self.collisionBehavior); + return result; +} @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; @@ -960,20 +1422,45 @@ + (nullable FGMPlatformPolygon *)nullableFromList:(NSArray *)list { @(self.zIndex), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformPolygon *other = (FGMPlatformPolygon *)object; + return FLTPigeonDeepEquals(self.polygonId, other.polygonId) && self.consumesTapEvents == other.consumesTapEvents && FLTPigeonDeepEquals(self.fillColor, other.fillColor) && self.geodesic == other.geodesic && FLTPigeonDeepEquals(self.points, other.points) && FLTPigeonDeepEquals(self.holes, other.holes) && self.visible == other.visible && FLTPigeonDeepEquals(self.strokeColor, other.strokeColor) && self.strokeWidth == other.strokeWidth && self.zIndex == other.zIndex; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.polygonId); + result = result * 31 + @(self.consumesTapEvents).hash; + result = result * 31 + FLTPigeonDeepHash(self.fillColor); + result = result * 31 + @(self.geodesic).hash; + result = result * 31 + FLTPigeonDeepHash(self.points); + result = result * 31 + FLTPigeonDeepHash(self.holes); + result = result * 31 + @(self.visible).hash; + result = result * 31 + FLTPigeonDeepHash(self.strokeColor); + result = result * 31 + @(self.strokeWidth).hash; + result = result * 31 + @(self.zIndex).hash; + return result; +} @end @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; @@ -1018,19 +1505,44 @@ + (nullable FGMPlatformPolyline *)nullableFromList:(NSArray *)list { @(self.zIndex), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformPolyline *other = (FGMPlatformPolyline *)object; + return FLTPigeonDeepEquals(self.polylineId, other.polylineId) && self.consumesTapEvents == other.consumesTapEvents && FLTPigeonDeepEquals(self.color, other.color) && self.geodesic == other.geodesic && self.jointType == other.jointType && FLTPigeonDeepEquals(self.patterns, other.patterns) && FLTPigeonDeepEquals(self.points, other.points) && self.visible == other.visible && self.width == other.width && self.zIndex == other.zIndex; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.polylineId); + result = result * 31 + @(self.consumesTapEvents).hash; + result = result * 31 + FLTPigeonDeepHash(self.color); + result = result * 31 + @(self.geodesic).hash; + result = result * 31 + @(self.jointType).hash; + result = result * 31 + FLTPigeonDeepHash(self.patterns); + result = result * 31 + FLTPigeonDeepHash(self.points); + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.width).hash; + result = result * 31 + @(self.zIndex).hash; + return result; +} @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; @@ -1044,13 +1556,30 @@ + (nullable FGMPlatformPatternItem *)nullableFromList:(NSArray *)list { self.length ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformPatternItem *other = (FGMPlatformPatternItem *)object; + return self.type == other.type && FLTPigeonDeepEquals(self.length, other.length); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.type).hash; + result = result * 31 + FLTPigeonDeepHash(self.length); + return result; +} @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; @@ -1073,16 +1602,34 @@ + (nullable FGMPlatformTile *)nullableFromList:(NSArray *)list { self.data ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformTile *other = (FGMPlatformTile *)object; + return self.width == other.width && self.height == other.height && FLTPigeonDeepEquals(self.data, other.data); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.width).hash; + result = result * 31 + @(self.height).hash; + result = result * 31 + FLTPigeonDeepHash(self.data); + return result; +} @end @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; @@ -1114,14 +1661,35 @@ + (nullable FGMPlatformTileOverlay *)nullableFromList:(NSArray *)list { @(self.tileSize), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformTileOverlay *other = (FGMPlatformTileOverlay *)object; + return FLTPigeonDeepEquals(self.tileOverlayId, other.tileOverlayId) && self.fadeIn == other.fadeIn && (self.transparency == other.transparency || (isnan(self.transparency) && isnan(other.transparency))) && self.zIndex == other.zIndex && self.visible == other.visible && self.tileSize == other.tileSize; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.tileOverlayId); + result = result * 31 + @(self.fadeIn).hash; + result = result * 31 + (isnan(self.transparency) ? (NSUInteger)0x7FF8000000000000 : @(self.transparency).hash); + result = result * 31 + @(self.zIndex).hash; + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.tileSize).hash; + return result; +} @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; @@ -1147,11 +1715,31 @@ + (nullable FGMPlatformEdgeInsets *)nullableFromList:(NSArray *)list { @(self.right), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformEdgeInsets *other = (FGMPlatformEdgeInsets *)object; + return (self.top == other.top || (isnan(self.top) && isnan(other.top))) && (self.bottom == other.bottom || (isnan(self.bottom) && isnan(other.bottom))) && (self.left == other.left || (isnan(self.left) && isnan(other.left))) && (self.right == other.right || (isnan(self.right) && isnan(other.right))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.top) ? (NSUInteger)0x7FF8000000000000 : @(self.top).hash); + result = result * 31 + (isnan(self.bottom) ? (NSUInteger)0x7FF8000000000000 : @(self.bottom).hash); + result = result * 31 + (isnan(self.left) ? (NSUInteger)0x7FF8000000000000 : @(self.left).hash); + result = result * 31 + (isnan(self.right) ? (NSUInteger)0x7FF8000000000000 : @(self.right).hash); + return result; +} @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; @@ -1171,12 +1759,29 @@ + (nullable FGMPlatformLatLng *)nullableFromList:(NSArray *)list { @(self.longitude), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformLatLng *other = (FGMPlatformLatLng *)object; + return (self.latitude == other.latitude || (isnan(self.latitude) && isnan(other.latitude))) && (self.longitude == other.longitude || (isnan(self.longitude) && isnan(other.longitude))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.latitude) ? (NSUInteger)0x7FF8000000000000 : @(self.latitude).hash); + result = result * 31 + (isnan(self.longitude) ? (NSUInteger)0x7FF8000000000000 : @(self.longitude).hash); + return result; +} @end @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; @@ -1196,11 +1801,28 @@ + (nullable FGMPlatformLatLngBounds *)nullableFromList:(NSArray *)list { self.southwest ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformLatLngBounds *other = (FGMPlatformLatLngBounds *)object; + return FLTPigeonDeepEquals(self.northeast, other.northeast) && FLTPigeonDeepEquals(self.southwest, other.southwest); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.northeast); + result = result * 31 + FLTPigeonDeepHash(self.southwest); + return result; +} @end @implementation FGMPlatformCameraTargetBounds + (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds { - FGMPlatformCameraTargetBounds *pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init]; + FGMPlatformCameraTargetBounds* pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init]; pigeonResult.bounds = bounds; return pigeonResult; } @@ -1217,21 +1839,37 @@ + (nullable FGMPlatformCameraTargetBounds *)nullableFromList:(NSArray *)list self.bounds ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraTargetBounds *other = (FGMPlatformCameraTargetBounds *)object; + return FLTPigeonDeepEquals(self.bounds, other.bounds); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.bounds); + return result; +} @end @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; @@ -1278,21 +1916,46 @@ + (nullable FGMPlatformGroundOverlay *)nullableFromList:(NSArray *)list { self.zoomLevel ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformGroundOverlay *other = (FGMPlatformGroundOverlay *)object; + return FLTPigeonDeepEquals(self.groundOverlayId, other.groundOverlayId) && FLTPigeonDeepEquals(self.image, other.image) && FLTPigeonDeepEquals(self.position, other.position) && FLTPigeonDeepEquals(self.bounds, other.bounds) && FLTPigeonDeepEquals(self.anchor, other.anchor) && (self.transparency == other.transparency || (isnan(self.transparency) && isnan(other.transparency))) && (self.bearing == other.bearing || (isnan(self.bearing) && isnan(other.bearing))) && self.zIndex == other.zIndex && self.visible == other.visible && self.clickable == other.clickable && FLTPigeonDeepEquals(self.zoomLevel, other.zoomLevel); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.groundOverlayId); + result = result * 31 + FLTPigeonDeepHash(self.image); + result = result * 31 + FLTPigeonDeepHash(self.position); + result = result * 31 + FLTPigeonDeepHash(self.bounds); + result = result * 31 + FLTPigeonDeepHash(self.anchor); + result = result * 31 + (isnan(self.transparency) ? (NSUInteger)0x7FF8000000000000 : @(self.transparency).hash); + result = result * 31 + (isnan(self.bearing) ? (NSUInteger)0x7FF8000000000000 : @(self.bearing).hash); + result = result * 31 + @(self.zIndex).hash; + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.clickable).hash; + result = result * 31 + FLTPigeonDeepHash(self.zoomLevel); + return result; +} @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; @@ -1336,28 +1999,53 @@ + (nullable FGMPlatformMapViewCreationParams *)nullableFromList:(NSArray *)l self.initialGroundOverlays ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformMapViewCreationParams *other = (FGMPlatformMapViewCreationParams *)object; + return FLTPigeonDeepEquals(self.initialCameraPosition, other.initialCameraPosition) && FLTPigeonDeepEquals(self.mapConfiguration, other.mapConfiguration) && FLTPigeonDeepEquals(self.initialCircles, other.initialCircles) && FLTPigeonDeepEquals(self.initialMarkers, other.initialMarkers) && FLTPigeonDeepEquals(self.initialPolygons, other.initialPolygons) && FLTPigeonDeepEquals(self.initialPolylines, other.initialPolylines) && FLTPigeonDeepEquals(self.initialHeatmaps, other.initialHeatmaps) && FLTPigeonDeepEquals(self.initialTileOverlays, other.initialTileOverlays) && FLTPigeonDeepEquals(self.initialClusterManagers, other.initialClusterManagers) && FLTPigeonDeepEquals(self.initialGroundOverlays, other.initialGroundOverlays); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.initialCameraPosition); + result = result * 31 + FLTPigeonDeepHash(self.mapConfiguration); + result = result * 31 + FLTPigeonDeepHash(self.initialCircles); + result = result * 31 + FLTPigeonDeepHash(self.initialMarkers); + result = result * 31 + FLTPigeonDeepHash(self.initialPolygons); + result = result * 31 + FLTPigeonDeepHash(self.initialPolylines); + result = result * 31 + FLTPigeonDeepHash(self.initialHeatmaps); + result = result * 31 + FLTPigeonDeepHash(self.initialTileOverlays); + result = result * 31 + FLTPigeonDeepHash(self.initialClusterManagers); + result = result * 31 + FLTPigeonDeepHash(self.initialGroundOverlays); + return result; +} @end @implementation FGMPlatformMapConfiguration + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - markerType:(FGMPlatformMarkerType)markerType - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style { - FGMPlatformMapConfiguration *pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + markerType:(FGMPlatformMarkerType)markerType + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style { + FGMPlatformMapConfiguration* pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; pigeonResult.compassEnabled = compassEnabled; pigeonResult.cameraTargetBounds = cameraTargetBounds; pigeonResult.mapType = mapType; @@ -1426,11 +2114,45 @@ + (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray *)list { self.style ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformMapConfiguration *other = (FGMPlatformMapConfiguration *)object; + return FLTPigeonDeepEquals(self.compassEnabled, other.compassEnabled) && FLTPigeonDeepEquals(self.cameraTargetBounds, other.cameraTargetBounds) && FLTPigeonDeepEquals(self.mapType, other.mapType) && FLTPigeonDeepEquals(self.minMaxZoomPreference, other.minMaxZoomPreference) && FLTPigeonDeepEquals(self.rotateGesturesEnabled, other.rotateGesturesEnabled) && FLTPigeonDeepEquals(self.scrollGesturesEnabled, other.scrollGesturesEnabled) && FLTPigeonDeepEquals(self.tiltGesturesEnabled, other.tiltGesturesEnabled) && FLTPigeonDeepEquals(self.trackCameraPosition, other.trackCameraPosition) && FLTPigeonDeepEquals(self.zoomGesturesEnabled, other.zoomGesturesEnabled) && FLTPigeonDeepEquals(self.myLocationEnabled, other.myLocationEnabled) && FLTPigeonDeepEquals(self.myLocationButtonEnabled, other.myLocationButtonEnabled) && FLTPigeonDeepEquals(self.padding, other.padding) && FLTPigeonDeepEquals(self.indoorViewEnabled, other.indoorViewEnabled) && FLTPigeonDeepEquals(self.trafficEnabled, other.trafficEnabled) && FLTPigeonDeepEquals(self.buildingsEnabled, other.buildingsEnabled) && self.markerType == other.markerType && FLTPigeonDeepEquals(self.mapId, other.mapId) && FLTPigeonDeepEquals(self.style, other.style); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.compassEnabled); + result = result * 31 + FLTPigeonDeepHash(self.cameraTargetBounds); + result = result * 31 + FLTPigeonDeepHash(self.mapType); + result = result * 31 + FLTPigeonDeepHash(self.minMaxZoomPreference); + result = result * 31 + FLTPigeonDeepHash(self.rotateGesturesEnabled); + result = result * 31 + FLTPigeonDeepHash(self.scrollGesturesEnabled); + result = result * 31 + FLTPigeonDeepHash(self.tiltGesturesEnabled); + result = result * 31 + FLTPigeonDeepHash(self.trackCameraPosition); + result = result * 31 + FLTPigeonDeepHash(self.zoomGesturesEnabled); + result = result * 31 + FLTPigeonDeepHash(self.myLocationEnabled); + result = result * 31 + FLTPigeonDeepHash(self.myLocationButtonEnabled); + result = result * 31 + FLTPigeonDeepHash(self.padding); + result = result * 31 + FLTPigeonDeepHash(self.indoorViewEnabled); + result = result * 31 + FLTPigeonDeepHash(self.trafficEnabled); + result = result * 31 + FLTPigeonDeepHash(self.buildingsEnabled); + result = result * 31 + @(self.markerType).hash; + result = result * 31 + FLTPigeonDeepHash(self.mapId); + result = result * 31 + FLTPigeonDeepHash(self.style); + return result; +} @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; @@ -1450,11 +2172,29 @@ + (nullable FGMPlatformPoint *)nullableFromList:(NSArray *)list { @(self.y), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformPoint *other = (FGMPlatformPoint *)object; + return (self.x == other.x || (isnan(self.x) && isnan(other.x))) && (self.y == other.y || (isnan(self.y) && isnan(other.y))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.x) ? (NSUInteger)0x7FF8000000000000 : @(self.x).hash); + result = result * 31 + (isnan(self.y) ? (NSUInteger)0x7FF8000000000000 : @(self.y).hash); + return result; +} @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; @@ -1474,11 +2214,31 @@ + (nullable FGMPlatformSize *)nullableFromList:(NSArray *)list { @(self.height), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformSize *other = (FGMPlatformSize *)object; + return (self.width == other.width || (isnan(self.width) && isnan(other.width))) && (self.height == other.height || (isnan(self.height) && isnan(other.height))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.width) ? (NSUInteger)0x7FF8000000000000 : @(self.width).hash); + result = result * 31 + (isnan(self.height) ? (NSUInteger)0x7FF8000000000000 : @(self.height).hash); + return result; +} @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; @@ -1504,14 +2264,33 @@ + (nullable FGMPlatformColor *)nullableFromList:(NSArray *)list { @(self.alpha), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformColor *other = (FGMPlatformColor *)object; + return (self.red == other.red || (isnan(self.red) && isnan(other.red))) && (self.green == other.green || (isnan(self.green) && isnan(other.green))) && (self.blue == other.blue || (isnan(self.blue) && isnan(other.blue))) && (self.alpha == other.alpha || (isnan(self.alpha) && isnan(other.alpha))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.red) ? (NSUInteger)0x7FF8000000000000 : @(self.red).hash); + result = result * 31 + (isnan(self.green) ? (NSUInteger)0x7FF8000000000000 : @(self.green).hash); + result = result * 31 + (isnan(self.blue) ? (NSUInteger)0x7FF8000000000000 : @(self.blue).hash); + result = result * 31 + (isnan(self.alpha) ? (NSUInteger)0x7FF8000000000000 : @(self.alpha).hash); + return result; +} @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; @@ -1537,11 +2316,31 @@ + (nullable FGMPlatformTileLayer *)nullableFromList:(NSArray *)list { @(self.zIndex), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformTileLayer *other = (FGMPlatformTileLayer *)object; + return self.visible == other.visible && self.fadeIn == other.fadeIn && (self.opacity == other.opacity || (isnan(self.opacity) && isnan(other.opacity))) && self.zIndex == other.zIndex; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.fadeIn).hash; + result = result * 31 + (isnan(self.opacity) ? (NSUInteger)0x7FF8000000000000 : @(self.opacity).hash); + result = result * 31 + @(self.zIndex).hash; + return result; +} @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; @@ -1561,11 +2360,28 @@ + (nullable FGMPlatformZoomRange *)nullableFromList:(NSArray *)list { self.max ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformZoomRange *other = (FGMPlatformZoomRange *)object; + return FLTPigeonDeepEquals(self.min, other.min) && FLTPigeonDeepEquals(self.max, other.max); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.min); + result = result * 31 + FLTPigeonDeepHash(self.max); + return result; +} @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; } @@ -1582,11 +2398,27 @@ + (nullable FGMPlatformBitmap *)nullableFromList:(NSArray *)list { self.bitmap ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmap *other = (FGMPlatformBitmap *)object; + return FLTPigeonDeepEquals(self.bitmap, other.bitmap); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.bitmap); + return result; +} @end @implementation FGMPlatformBitmapDefaultMarker + (instancetype)makeWithHue:(nullable NSNumber *)hue { - FGMPlatformBitmapDefaultMarker *pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init]; + FGMPlatformBitmapDefaultMarker* pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init]; pigeonResult.hue = hue; return pigeonResult; } @@ -1603,12 +2435,28 @@ + (nullable FGMPlatformBitmapDefaultMarker *)nullableFromList:(NSArray *)lis self.hue ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapDefaultMarker *other = (FGMPlatformBitmapDefaultMarker *)object; + return FLTPigeonDeepEquals(self.hue, other.hue); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.hue); + return result; +} @end @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; @@ -1628,11 +2476,29 @@ + (nullable FGMPlatformBitmapBytes *)nullableFromList:(NSArray *)list { self.size ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapBytes *other = (FGMPlatformBitmapBytes *)object; + return FLTPigeonDeepEquals(self.byteData, other.byteData) && FLTPigeonDeepEquals(self.size, other.size); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.byteData); + result = result * 31 + FLTPigeonDeepHash(self.size); + return result; +} @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; @@ -1652,13 +2518,30 @@ + (nullable FGMPlatformBitmapAsset *)nullableFromList:(NSArray *)list { self.pkg ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapAsset *other = (FGMPlatformBitmapAsset *)object; + return FLTPigeonDeepEquals(self.name, other.name) && FLTPigeonDeepEquals(self.pkg, other.pkg); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.name); + result = result * 31 + FLTPigeonDeepHash(self.pkg); + return result; +} @end @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; @@ -1681,15 +2564,33 @@ + (nullable FGMPlatformBitmapAssetImage *)nullableFromList:(NSArray *)list { self.size ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapAssetImage *other = (FGMPlatformBitmapAssetImage *)object; + return FLTPigeonDeepEquals(self.name, other.name) && (self.scale == other.scale || (isnan(self.scale) && isnan(other.scale))) && FLTPigeonDeepEquals(self.size, other.size); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.name); + result = result * 31 + (isnan(self.scale) ? (NSUInteger)0x7FF8000000000000 : @(self.scale).hash); + result = result * 31 + FLTPigeonDeepHash(self.size); + return result; +} @end @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,8 +2601,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); @@ -1720,15 +2620,35 @@ + (nullable FGMPlatformBitmapAssetMap *)nullableFromList:(NSArray *)list { self.height ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapAssetMap *other = (FGMPlatformBitmapAssetMap *)object; + return FLTPigeonDeepEquals(self.assetName, other.assetName) && self.bitmapScaling == other.bitmapScaling && (self.imagePixelRatio == other.imagePixelRatio || (isnan(self.imagePixelRatio) && isnan(other.imagePixelRatio))) && FLTPigeonDeepEquals(self.width, other.width) && FLTPigeonDeepEquals(self.height, other.height); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.assetName); + result = result * 31 + @(self.bitmapScaling).hash; + result = result * 31 + (isnan(self.imagePixelRatio) ? (NSUInteger)0x7FF8000000000000 : @(self.imagePixelRatio).hash); + result = result * 31 + FLTPigeonDeepHash(self.width); + result = result * 31 + FLTPigeonDeepHash(self.height); + return result; +} @end @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; @@ -1739,8 +2659,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); @@ -1759,16 +2678,36 @@ + (nullable FGMPlatformBitmapBytesMap *)nullableFromList:(NSArray *)list { self.height ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapBytesMap *other = (FGMPlatformBitmapBytesMap *)object; + return FLTPigeonDeepEquals(self.byteData, other.byteData) && self.bitmapScaling == other.bitmapScaling && (self.imagePixelRatio == other.imagePixelRatio || (isnan(self.imagePixelRatio) && isnan(other.imagePixelRatio))) && FLTPigeonDeepEquals(self.width, other.width) && FLTPigeonDeepEquals(self.height, other.height); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.byteData); + result = result * 31 + @(self.bitmapScaling).hash; + result = result * 31 + (isnan(self.imagePixelRatio) ? (NSUInteger)0x7FF8000000000000 : @(self.imagePixelRatio).hash); + result = result * 31 + FLTPigeonDeepHash(self.width); + result = result * 31 + FLTPigeonDeepHash(self.height); + return result; +} @end @implementation FGMPlatformBitmapPinConfig + (instancetype)makeWithBackgroundColor:(nullable FGMPlatformColor *)backgroundColor - borderColor:(nullable FGMPlatformColor *)borderColor - glyphColor:(nullable FGMPlatformColor *)glyphColor - glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor - glyphText:(nullable NSString *)glyphText - glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap { - FGMPlatformBitmapPinConfig *pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init]; + borderColor:(nullable FGMPlatformColor *)borderColor + glyphColor:(nullable FGMPlatformColor *)glyphColor + glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor + glyphText:(nullable NSString *)glyphText + glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap { + FGMPlatformBitmapPinConfig* pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init]; pigeonResult.backgroundColor = backgroundColor; pigeonResult.borderColor = borderColor; pigeonResult.glyphColor = glyphColor; @@ -1800,6 +2739,27 @@ + (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray *)list { self.glyphBitmap ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapPinConfig *other = (FGMPlatformBitmapPinConfig *)object; + return FLTPigeonDeepEquals(self.backgroundColor, other.backgroundColor) && FLTPigeonDeepEquals(self.borderColor, other.borderColor) && FLTPigeonDeepEquals(self.glyphColor, other.glyphColor) && FLTPigeonDeepEquals(self.glyphTextColor, other.glyphTextColor) && FLTPigeonDeepEquals(self.glyphText, other.glyphText) && FLTPigeonDeepEquals(self.glyphBitmap, other.glyphBitmap); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.backgroundColor); + result = result * 31 + FLTPigeonDeepHash(self.borderColor); + result = result * 31 + FLTPigeonDeepHash(self.glyphColor); + result = result * 31 + FLTPigeonDeepHash(self.glyphTextColor); + result = result * 31 + FLTPigeonDeepHash(self.glyphText); + result = result * 31 + FLTPigeonDeepHash(self.glyphBitmap); + return result; +} @end @interface FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReader : FlutterStandardReader @@ -1809,125 +2769,115 @@ - (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 - : [[FGMPlatformMarkerCollisionBehaviorBox alloc] - initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformMarkerCollisionBehaviorBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 131: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil - ? nil - : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 132: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil - : [[FGMPlatformPatternItemTypeBox alloc] - initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformPatternItemTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 133: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil - ? nil - : [[FGMPlatformMarkerTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformMarkerTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 134: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil - : [[FGMPlatformMapBitmapScalingBox alloc] - initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformMapBitmapScalingBox alloc] initWithValue:[enumAsNumber integerValue]]; } - case 135: + case 135: return [FGMPlatformCameraPosition fromList:[self readValue]]; - case 136: + case 136: return [FGMPlatformCameraUpdate fromList:[self readValue]]; - case 137: + case 137: return [FGMPlatformCameraUpdateNewCameraPosition fromList:[self readValue]]; - case 138: + case 138: return [FGMPlatformCameraUpdateNewLatLng fromList:[self readValue]]; - case 139: + case 139: return [FGMPlatformCameraUpdateNewLatLngBounds fromList:[self readValue]]; - case 140: + case 140: + return [FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets fromList:[self readValue]]; + case 141: return [FGMPlatformCameraUpdateNewLatLngZoom fromList:[self readValue]]; - case 141: + case 142: return [FGMPlatformCameraUpdateScrollBy fromList:[self readValue]]; - case 142: + case 143: return [FGMPlatformCameraUpdateZoomBy fromList:[self readValue]]; - case 143: + case 144: return [FGMPlatformCameraUpdateZoom fromList:[self readValue]]; - case 144: + case 145: return [FGMPlatformCameraUpdateZoomTo fromList:[self readValue]]; - case 145: + case 146: return [FGMPlatformCircle fromList:[self readValue]]; - case 146: + case 147: return [FGMPlatformHeatmap fromList:[self readValue]]; - case 147: + case 148: return [FGMPlatformHeatmapGradient fromList:[self readValue]]; - case 148: + case 149: return [FGMPlatformWeightedLatLng fromList:[self readValue]]; - case 149: + case 150: return [FGMPlatformInfoWindow fromList:[self readValue]]; - case 150: + case 151: return [FGMPlatformCluster fromList:[self readValue]]; - case 151: + case 152: return [FGMPlatformClusterManager fromList:[self readValue]]; - case 152: + case 153: return [FGMPlatformMarker fromList:[self readValue]]; - case 153: + case 154: return [FGMPlatformPolygon fromList:[self readValue]]; - case 154: + case 155: return [FGMPlatformPolyline fromList:[self readValue]]; - case 155: + case 156: return [FGMPlatformPatternItem fromList:[self readValue]]; - case 156: + case 157: return [FGMPlatformTile fromList:[self readValue]]; - case 157: + case 158: return [FGMPlatformTileOverlay fromList:[self readValue]]; - case 158: + case 159: return [FGMPlatformEdgeInsets fromList:[self readValue]]; - case 159: + case 160: return [FGMPlatformLatLng fromList:[self readValue]]; - case 160: + case 161: return [FGMPlatformLatLngBounds fromList:[self readValue]]; - case 161: + case 162: return [FGMPlatformCameraTargetBounds fromList:[self readValue]]; - case 162: + case 163: return [FGMPlatformGroundOverlay fromList:[self readValue]]; - case 163: + case 164: return [FGMPlatformMapViewCreationParams fromList:[self readValue]]; - case 164: + case 165: return [FGMPlatformMapConfiguration fromList:[self readValue]]; - case 165: + case 166: return [FGMPlatformPoint fromList:[self readValue]]; - case 166: + case 167: return [FGMPlatformSize fromList:[self readValue]]; - case 167: + case 168: return [FGMPlatformColor fromList:[self readValue]]; - case 168: + case 169: return [FGMPlatformTileLayer fromList:[self readValue]]; - case 169: + case 170: return [FGMPlatformZoomRange fromList:[self readValue]]; - case 170: + case 171: return [FGMPlatformBitmap fromList:[self readValue]]; - case 171: + case 172: return [FGMPlatformBitmapDefaultMarker fromList:[self readValue]]; - case 172: + case 173: return [FGMPlatformBitmapBytes fromList:[self readValue]]; - case 173: + case 174: return [FGMPlatformBitmapAsset fromList:[self readValue]]; - case 174: + case 175: return [FGMPlatformBitmapAssetImage fromList:[self readValue]]; - case 175: + case 176: return [FGMPlatformBitmapAssetMap fromList:[self readValue]]; - case 176: + case 177: return [FGMPlatformBitmapBytesMap fromList:[self readValue]]; - case 177: + case 178: return [FGMPlatformBitmapPinConfig fromList:[self readValue]]; default: return [super readValueOfType:type]; @@ -1978,120 +2928,123 @@ - (void)writeValue:(id)value { } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngBounds class]]) { [self writeByte:139]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngZoom class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets class]]) { [self writeByte:140]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateScrollBy class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngZoom class]]) { [self writeByte:141]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomBy class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateScrollBy class]]) { [self writeByte:142]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoom class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomBy class]]) { [self writeByte:143]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomTo class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoom class]]) { [self writeByte:144]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCircle class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomTo class]]) { [self writeByte:145]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformHeatmap class]]) { + } else if ([value isKindOfClass:[FGMPlatformCircle class]]) { [self writeByte:146]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformHeatmapGradient class]]) { + } else if ([value isKindOfClass:[FGMPlatformHeatmap class]]) { [self writeByte:147]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformWeightedLatLng class]]) { + } else if ([value isKindOfClass:[FGMPlatformHeatmapGradient class]]) { [self writeByte:148]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformInfoWindow class]]) { + } else if ([value isKindOfClass:[FGMPlatformWeightedLatLng class]]) { [self writeByte:149]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCluster class]]) { + } else if ([value isKindOfClass:[FGMPlatformInfoWindow class]]) { [self writeByte:150]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformClusterManager class]]) { + } else if ([value isKindOfClass:[FGMPlatformCluster class]]) { [self writeByte:151]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformMarker class]]) { + } else if ([value isKindOfClass:[FGMPlatformClusterManager class]]) { [self writeByte:152]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) { + } else if ([value isKindOfClass:[FGMPlatformMarker class]]) { [self writeByte:153]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) { + } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) { [self writeByte:154]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) { + } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) { [self writeByte:155]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTile class]]) { + } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) { [self writeByte:156]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) { + } else if ([value isKindOfClass:[FGMPlatformTile class]]) { [self writeByte:157]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) { + } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) { [self writeByte:158]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) { + } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) { [self writeByte:159]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) { + } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) { [self writeByte:160]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) { + } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) { [self writeByte:161]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) { [self writeByte:162]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) { + } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) { [self writeByte:163]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) { + } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) { [self writeByte:164]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPoint class]]) { + } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) { [self writeByte:165]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformSize class]]) { + } else if ([value isKindOfClass:[FGMPlatformPoint class]]) { [self writeByte:166]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformColor class]]) { + } else if ([value isKindOfClass:[FGMPlatformSize class]]) { [self writeByte:167]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) { + } else if ([value isKindOfClass:[FGMPlatformColor class]]) { [self writeByte:168]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) { + } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) { [self writeByte:169]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) { + } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) { [self writeByte:170]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) { [self writeByte:171]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) { [self writeByte:172]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) { [self writeByte:173]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) { [self writeByte:174]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) { [self writeByte:175]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) { [self writeByte:176]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapPinConfig class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) { [self writeByte:177]; [self writeValue:[value toList]]; + } else if ([value isKindOfClass:[FGMPlatformBitmapPinConfig class]]) { + [self writeByte:178]; + [self writeValue:[value toList]]; } else { [super writeValue:value]; } @@ -2113,8 +3066,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; @@ -2123,24 +3075,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]; @@ -2155,18 +3100,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); @@ -2180,29 +3120,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 { @@ -2211,28 +3142,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 { @@ -2241,18 +3164,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); @@ -2267,29 +3185,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 { @@ -2298,28 +3207,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 { @@ -2328,29 +3229,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 { @@ -2359,29 +3251,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 { @@ -2390,29 +3273,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 { @@ -2421,18 +3295,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); @@ -2446,25 +3315,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 { @@ -2473,16 +3335,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]; @@ -2495,18 +3354,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); @@ -2521,27 +3375,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 { @@ -2550,17 +3396,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]; @@ -2572,18 +3414,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); @@ -2597,18 +3434,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); @@ -2623,25 +3455,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 { @@ -2654,17 +3479,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); @@ -2682,16 +3503,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]; @@ -2703,18 +3521,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); @@ -2728,17 +3541,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]; @@ -2750,17 +3559,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Returns true if the map supports advanced markers. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.isAdvancedMarkersAvailable", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isAdvancedMarkersAvailable:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(isAdvancedMarkersAvailable:)", - api); + NSCAssert([api respondsToSelector:@selector(isAdvancedMarkersAvailable:)], @"FGMMapsApi api (%@) doesn't respond to @selector(isAdvancedMarkersAvailable:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isAdvancedMarkersAvailable:&error]; @@ -2781,450 +3586,335 @@ @implementation FGMMapsCallbackApi - (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger { return [self initWithBinaryMessenger:binaryMessenger messageChannelSuffix:@""]; } -- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger - messageChannelSuffix:(nullable NSString *)messageChannelSuffix { +- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger messageChannelSuffix:(nullable NSString*)messageChannelSuffix{ self = [self init]; if (self) { _binaryMessenger = binaryMessenger; - _messageChannelSuffix = [messageChannelSuffix length] == 0 - ? @"" - : [NSString stringWithFormat:@".%@", messageChannelSuffix]; + _messageChannelSuffix = [messageChannelSuffix length] == 0 ? @"" : [NSString stringWithFormat: @".%@", messageChannelSuffix]; } return self; } - (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted", - _messageChannelSuffix]; - 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)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_groundOverlayId ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId location:(FGMPlatformPoint *)arg_location zoom:(NSInteger)arg_zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec: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); @@ -3237,30 +3927,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]; @@ -3271,18 +3951,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]; @@ -3293,18 +3968,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]; @@ -3315,18 +3985,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]; @@ -3337,18 +4002,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]; @@ -3359,18 +4019,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]; @@ -3381,18 +4036,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]; @@ -3403,18 +4053,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]; @@ -3425,24 +4070,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 { @@ -3450,24 +4089,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 { @@ -3475,18 +4108,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); @@ -3499,16 +4127,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]; @@ -3519,24 +4144,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 { @@ -3544,16 +4163,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_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/include/google_maps_flutter_ios_sdk10/google_maps_flutter_pigeon_messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/include/google_maps_flutter_ios_sdk10/google_maps_flutter_pigeon_messages.g.h index 053f0f577650..7917bbd64e66 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/include/google_maps_flutter_ios_sdk10/google_maps_flutter_pigeon_messages.g.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/include/google_maps_flutter_ios_sdk10/google_maps_flutter_pigeon_messages.g.h @@ -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.3.3), do not edit directly. // See also: https://pub.dev/packages/pigeon @import Foundation; @@ -28,7 +28,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapType) { - (instancetype)initWithValue:(FGMPlatformMapType)value; @end -/// Pigeon equivalent of MarkerCollisionBehavior. +/// Pigeon equivalent of the MarkerCollisionBehavior enum. typedef NS_ENUM(NSUInteger, FGMPlatformMarkerCollisionBehavior) { FGMPlatformMarkerCollisionBehaviorRequiredDisplay = 0, FGMPlatformMarkerCollisionBehaviorOptionalAndHidesLowerPriority = 1, @@ -95,6 +95,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @class FGMPlatformCameraUpdateNewCameraPosition; @class FGMPlatformCameraUpdateNewLatLng; @class FGMPlatformCameraUpdateNewLatLngBounds; +@class FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets; @class FGMPlatformCameraUpdateNewLatLngZoom; @class FGMPlatformCameraUpdateScrollBy; @class FGMPlatformCameraUpdateZoomBy; @@ -138,26 +139,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 @@ -165,7 +166,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 @@ -173,83 +174,97 @@ 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 NewLatLngBoundsWithEdgeInsets +@interface FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds + padding:(FGMPlatformEdgeInsets *)padding; +@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, strong) FGMPlatformEdgeInsets * 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. @@ -257,19 +272,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. @@ -281,20 +296,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. @@ -302,11 +318,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. @@ -314,13 +330,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. @@ -328,41 +344,41 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithIdentifier:(NSString *)identifier; -@property(nonatomic, copy) NSString *identifier; +@property(nonatomic, copy) NSString * identifier; @end /// Pigeon equivalent of the Marker class. @interface FGMPlatformMarker : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAlpha:(double)alpha - anchor:(FGMPlatformPoint *)anchor - consumeTapEvents:(BOOL)consumeTapEvents - draggable:(BOOL)draggable - flat:(BOOL)flat - icon:(FGMPlatformBitmap *)icon - infoWindow:(FGMPlatformInfoWindow *)infoWindow - position:(FGMPlatformLatLng *)position - rotation:(double)rotation - visible:(BOOL)visible - zIndex:(NSInteger)zIndex - markerId:(NSString *)markerId - clusterManagerId:(nullable NSString *)clusterManagerId - collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior; -@property(nonatomic, assign) double alpha; -@property(nonatomic, strong) FGMPlatformPoint *anchor; -@property(nonatomic, assign) BOOL consumeTapEvents; -@property(nonatomic, assign) BOOL draggable; -@property(nonatomic, assign) BOOL flat; -@property(nonatomic, strong) FGMPlatformBitmap *icon; -@property(nonatomic, strong) FGMPlatformInfoWindow *infoWindow; -@property(nonatomic, strong) FGMPlatformLatLng *position; -@property(nonatomic, assign) double rotation; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, copy) NSString *markerId; -@property(nonatomic, copy, nullable) NSString *clusterManagerId; -@property(nonatomic, strong, nullable) FGMPlatformMarkerCollisionBehaviorBox *collisionBehavior; ++ (instancetype)makeWithAlpha:(double )alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL )consumeTapEvents + draggable:(BOOL )draggable + flat:(BOOL )flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double )rotation + visible:(BOOL )visible + zIndex:(NSInteger )zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId + collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior; +@property(nonatomic, assign) double alpha; +@property(nonatomic, strong) FGMPlatformPoint * anchor; +@property(nonatomic, assign) BOOL consumeTapEvents; +@property(nonatomic, assign) BOOL draggable; +@property(nonatomic, assign) BOOL flat; +@property(nonatomic, strong) FGMPlatformBitmap * icon; +@property(nonatomic, strong) FGMPlatformInfoWindow * infoWindow; +@property(nonatomic, strong) FGMPlatformLatLng * position; +@property(nonatomic, assign) double rotation; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, copy) NSString * markerId; +@property(nonatomic, copy, nullable) NSString * clusterManagerId; +@property(nonatomic, strong, nullable) FGMPlatformMarkerCollisionBehaviorBox * collisionBehavior; @end /// Pigeon equivalent of the Polygon class. @@ -370,25 +386,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. @@ -396,48 +412,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. @@ -445,37 +462,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. @@ -483,9 +504,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. @@ -494,7 +515,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. @@ -502,54 +523,53 @@ 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. @@ -557,91 +577,97 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - markerType:(FGMPlatformMarkerType)markerType - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style; -@property(nonatomic, strong, nullable) NSNumber *compassEnabled; -@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds *cameraTargetBounds; -@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox *mapType; -@property(nonatomic, strong, nullable) FGMPlatformZoomRange *minMaxZoomPreference; -@property(nonatomic, strong, nullable) NSNumber *rotateGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *scrollGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *tiltGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *trackCameraPosition; -@property(nonatomic, strong, nullable) NSNumber *zoomGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *myLocationEnabled; -@property(nonatomic, strong, nullable) NSNumber *myLocationButtonEnabled; -@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets *padding; -@property(nonatomic, strong, nullable) NSNumber *indoorViewEnabled; -@property(nonatomic, strong, nullable) NSNumber *trafficEnabled; -@property(nonatomic, strong, nullable) NSNumber *buildingsEnabled; + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + markerType:(FGMPlatformMarkerType)markerType + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style; +@property(nonatomic, strong, nullable) NSNumber * compassEnabled; +@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds * cameraTargetBounds; +@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox * mapType; +@property(nonatomic, strong, nullable) FGMPlatformZoomRange * minMaxZoomPreference; +@property(nonatomic, strong, nullable) NSNumber * rotateGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * scrollGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * tiltGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * trackCameraPosition; +@property(nonatomic, strong, nullable) NSNumber * zoomGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * myLocationEnabled; +@property(nonatomic, strong, nullable) NSNumber * myLocationButtonEnabled; +@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets * padding; +@property(nonatomic, strong, nullable) NSNumber * indoorViewEnabled; +@property(nonatomic, strong, nullable) NSNumber * trafficEnabled; +@property(nonatomic, strong, nullable) NSNumber * buildingsEnabled; @property(nonatomic, assign) FGMPlatformMarkerType markerType; -@property(nonatomic, copy, nullable) NSString *mapId; -@property(nonatomic, copy, nullable) NSString *style; +@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 @@ -650,7 +676,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]. @@ -658,13 +684,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]. @@ -672,18 +698,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]. @@ -691,11 +718,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]. @@ -703,15 +730,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]. @@ -719,31 +746,31 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double)imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height; -@property(nonatomic, strong) FlutterStandardTypedData *byteData; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double )imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height; +@property(nonatomic, strong) FlutterStandardTypedData * byteData; @property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; -@property(nonatomic, assign) double imagePixelRatio; -@property(nonatomic, strong, nullable) NSNumber *width; -@property(nonatomic, strong, nullable) NSNumber *height; +@property(nonatomic, assign) double imagePixelRatio; +@property(nonatomic, strong, nullable) NSNumber * width; +@property(nonatomic, strong, nullable) NSNumber * height; @end /// Pigeon equivalent of [PinConfig]. @interface FGMPlatformBitmapPinConfig : NSObject + (instancetype)makeWithBackgroundColor:(nullable FGMPlatformColor *)backgroundColor - borderColor:(nullable FGMPlatformColor *)borderColor - glyphColor:(nullable FGMPlatformColor *)glyphColor - glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor - glyphText:(nullable NSString *)glyphText - glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap; -@property(nonatomic, strong, nullable) FGMPlatformColor *backgroundColor; -@property(nonatomic, strong, nullable) FGMPlatformColor *borderColor; -@property(nonatomic, strong, nullable) FGMPlatformColor *glyphColor; -@property(nonatomic, strong, nullable) FGMPlatformColor *glyphTextColor; -@property(nonatomic, copy, nullable) NSString *glyphText; -@property(nonatomic, strong, nullable) FGMPlatformBitmap *glyphBitmap; + borderColor:(nullable FGMPlatformColor *)borderColor + glyphColor:(nullable FGMPlatformColor *)glyphColor + glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor + glyphText:(nullable NSString *)glyphText + glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap; +@property(nonatomic, strong, nullable) FGMPlatformColor * backgroundColor; +@property(nonatomic, strong, nullable) FGMPlatformColor * borderColor; +@property(nonatomic, strong, nullable) FGMPlatformColor * glyphColor; +@property(nonatomic, strong, nullable) FGMPlatformColor * glyphTextColor; +@property(nonatomic, copy, nullable) NSString * glyphText; +@property(nonatomic, strong, nullable) FGMPlatformBitmap * glyphBitmap; @end /// The codec used by all APIs. @@ -759,87 +786,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. /// @@ -853,97 +847,70 @@ 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; /// Returns true if the map supports advanced markers. /// /// @return `nil` only when `error != nil`. - (nullable NSNumber *)isAdvancedMarkersAvailable:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsApi(id binaryMessenger, - NSObject *_Nullable api); +extern void SetUpFGMMapsApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); -extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, - NSObject *_Nullable api, - NSString *messageChannelSuffix); /// Interface for calls from the native SDK to Dart. @interface FGMMapsCallbackApi : NSObject - (instancetype)initWithBinaryMessenger:(id)binaryMessenger; -- (instancetype)initWithBinaryMessenger:(id)binaryMessenger - messageChannelSuffix:(nullable NSString *)messageChannelSuffix; +- (instancetype)initWithBinaryMessenger:(id)binaryMessenger messageChannelSuffix:(nullable NSString *)messageChannelSuffix; /// Called when the map camera starts moving. - (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map camera moves. -- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition completion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map camera stops moving. - (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map, not a specifc map object, is tapped. -- (void)didTapAtPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map, not a specifc map object, is long pressed. -- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker is tapped. -- (void)didTapMarkerWithIdentifier:(NSString *)markerId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag starts. -- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag updates. -- (void)didDragMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag ends. -- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker's info window is tapped. -- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a circle is tapped. -- (void)didTapCircleWithIdentifier:(NSString *)circleId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapCircleWithIdentifier:(NSString *)circleId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker cluster is tapped. -- (void)didTapCluster:(FGMPlatformCluster *)cluster - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapCluster:(FGMPlatformCluster *)cluster completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a polygon is tapped. -- (void)didTapPolygonWithIdentifier:(NSString *)polygonId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPolygonWithIdentifier:(NSString *)polygonId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a polyline is tapped. -- (void)didTapPolylineWithIdentifier:(NSString *)polylineId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPolylineWithIdentifier:(NSString *)polylineId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a ground overlay is tapped. -- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion; /// Called to get data for a map tile. -- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId - location:(FGMPlatformPoint *)location - zoom:(NSInteger)zoom - completion:(void (^)(FGMPlatformTile *_Nullable, - FlutterError *_Nullable))completion; +- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId location:(FGMPlatformPoint *)location zoom:(NSInteger)zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion; @end + /// Dummy interface to force generation of the platform view creation params, /// which are not used in any Pigeon calls, only the platform view creation /// call made internally by Flutter. @protocol FGMMapsPlatformViewApi -- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type error:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, - NSObject *_Nullable api); +extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); -extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, - NSObject *_Nullable api, - NSString *messageChannelSuffix); /// Inspector API only intended for use in integration tests. @protocol FGMMapsInspectorApi @@ -963,29 +930,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_sdk10/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/lib/src/google_maps_flutter_ios.dart index c1709a97ad52..3840a3737daf 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/lib/src/google_maps_flutter_ios.dart @@ -886,6 +886,19 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { dy: update.dy, ), ); + case CameraUpdateType.newLatLngBoundsWithEdgeInsets: + update as CameraUpdateNewLatLngBoundsWithEdgeInsets; + return PlatformCameraUpdate( + cameraUpdate: PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets( + bounds: _platformLatLngBoundsFromLatLngBounds(update.bounds)!, + padding: PlatformEdgeInsets( + top: update.padding.top, + left: update.padding.left, + bottom: update.padding.bottom, + right: update.padding.right, + ), + ), + ); } } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/lib/src/messages.g.dart index 87fd64fcb0bc..24482c82ff61 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/lib/src/messages.g.dart @@ -1,28 +1,44 @@ // 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.3.3), 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: unused_import, unused_shown_name +// ignore_for_file: type=lint import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; +import 'dart:typed_data' show Float64List, Int32List, Int64List; -import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; import 'package:flutter/services.dart'; +import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; -PlatformException _createConnectionError(String channelName) { - return PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); +Object? _extractReplyValueOrThrow( + List? replyList, + String channelName, { + required bool isNullValid, +}) { + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel: "$channelName".', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } + return replyList.firstOrNull; } -List wrapResponse({ - Object? result, - PlatformException? error, - bool empty = false, -}) { + +List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { if (empty) { return []; } @@ -31,29 +47,79 @@ List wrapResponse({ } return [error.code, error.message, error.details]; } - bool _deepEquals(Object? a, Object? b) { + if (identical(a, b)) { + return true; + } + if (a is double && b is double) { + if (a.isNaN && b.isNaN) { + return true; + } + return a == 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]), - ); + if (a.length != b.length) { + return false; + } + for (final MapEntry entryA in a.entries) { + bool found = false; + for (final MapEntry entryB in b.entries) { + if (_deepEquals(entryA.key, entryB.key)) { + if (_deepEquals(entryA.value, entryB.value)) { + found = true; + break; + } else { + return false; + } + } + } + if (!found) { + return false; + } + } + return true; } return a == b; } +int _deepHash(Object? value) { + if (value is List) { + return Object.hashAll(value.map(_deepHash)); + } + if (value is Map) { + int result = 0; + for (final MapEntry entry in value.entries) { + result += (_deepHash(entry.key) * 31) ^ _deepHash(entry.value); + } + return result; + } + if (value is double && value.isNaN) { + // Normalize NaN to a consistent hash. + return 0x7FF8000000000000.hashCode; + } + if (value is double && value == 0.0) { + // Normalize -0.0 to 0.0 so they have the same hash code. + return 0.0.hashCode; + } + return value.hashCode; +} + + /// Pigeon equivalent of MapType -enum PlatformMapType { none, normal, satellite, terrain, hybrid } +enum PlatformMapType { + none, + normal, + satellite, + terrain, + hybrid, +} -/// Pigeon equivalent of MarkerCollisionBehavior. +/// Pigeon equivalent of the MarkerCollisionBehavior enum. enum PlatformMarkerCollisionBehavior { requiredDisplay, optionalAndHidesLowerPriority, @@ -61,15 +127,29 @@ enum PlatformMarkerCollisionBehavior { } /// 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, +} -enum PlatformMarkerType { marker, advancedMarker } +enum PlatformMarkerType { + marker, + advancedMarker, +} /// Pigeon equivalent of [MapBitmapScaling]. -enum PlatformMapBitmapScaling { auto, none } +enum PlatformMapBitmapScaling { + auto, + none, +} /// Pigeon representatation of a CameraPosition. class PlatformCameraPosition { @@ -89,12 +169,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; @@ -115,17 +199,19 @@ class PlatformCameraPosition { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(bearing, other.bearing) && _deepEquals(target, other.target) && _deepEquals(tilt, other.tilt) && _deepEquals(zoom, other.zoom); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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 @@ -134,16 +220,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 @@ -155,27 +244,30 @@ class PlatformCameraUpdate { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(cameraUpdate, other.cameraUpdate); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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,56 +279,59 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(cameraPosition, other.cameraPosition); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(latLng, other.latLng); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of NewLatLngBounds @@ -251,12 +346,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,36 +366,86 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(bounds, other.bounds) && _deepEquals(padding, other.padding); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); +} + +/// Pigeon equivalent of NewLatLngBoundsWithEdgeInsets +class PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets { + PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets({ + required this.bounds, + required this.padding, + }); + + PlatformLatLngBounds bounds; + + PlatformEdgeInsets padding; + + List _toList() { + return [ + bounds, + padding, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets decode(Object result) { + result as List; + return PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets( + bounds: result[0]! as PlatformLatLngBounds, + padding: result[1]! as PlatformEdgeInsets, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(bounds, other.bounds) && _deepEquals(padding, other.padding); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => _deepHash([runtimeType, ..._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,36 +458,40 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(latLng, other.latLng) && _deepEquals(zoom, other.zoom); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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,36 +504,40 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(dx, other.dx) && _deepEquals(dy, other.dy); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -395,93 +550,100 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(amount, other.amount) && _deepEquals(focus, other.focus); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(out, other.out); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(zoom, other.zoom); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Circle class. @@ -531,8 +693,7 @@ class PlatformCircle { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCircle decode(Object result) { result as List; @@ -558,12 +719,12 @@ class PlatformCircle { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(consumeTapEvents, other.consumeTapEvents) && _deepEquals(fillColor, other.fillColor) && _deepEquals(strokeColor, other.strokeColor) && _deepEquals(visible, other.visible) && _deepEquals(strokeWidth, other.strokeWidth) && _deepEquals(zIndex, other.zIndex) && _deepEquals(center, other.center) && _deepEquals(radius, other.radius) && _deepEquals(circleId, other.circleId); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Heatmap class. @@ -605,14 +766,13 @@ class PlatformHeatmap { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformHeatmap decode(Object result) { result as List; return PlatformHeatmap( heatmapId: result[0]! as String, - data: (result[1] as List?)!.cast(), + data: (result[1]! as List).cast(), gradient: result[2] as PlatformHeatmapGradient?, opacity: result[3]! as double, radius: result[4]! as int, @@ -630,12 +790,12 @@ class PlatformHeatmap { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(heatmapId, other.heatmapId) && _deepEquals(data, other.data) && _deepEquals(gradient, other.gradient) && _deepEquals(opacity, other.opacity) && _deepEquals(radius, other.radius) && _deepEquals(minimumZoomIntensity, other.minimumZoomIntensity) && _deepEquals(maximumZoomIntensity, other.maximumZoomIntensity); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the HeatmapGradient class. @@ -657,18 +817,21 @@ 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; return PlatformHeatmapGradient( - colors: (result[0] as List?)!.cast(), - startPoints: (result[1] as List?)!.cast(), + colors: (result[0]! as List).cast(), + startPoints: (result[1]! as List).cast(), colorMapSize: result[2]! as int, ); } @@ -682,29 +845,34 @@ class PlatformHeatmapGradient { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(colors, other.colors) && _deepEquals(startPoints, other.startPoints) && _deepEquals(colorMapSize, other.colorMapSize); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -723,17 +891,21 @@ class PlatformWeightedLatLng { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(point, other.point) && _deepEquals(weight, other.weight); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -742,12 +914,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; @@ -767,12 +942,12 @@ class PlatformInfoWindow { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(title, other.title) && _deepEquals(snippet, other.snippet) && _deepEquals(anchor, other.anchor); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of Cluster. @@ -793,12 +968,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; @@ -806,7 +985,7 @@ class PlatformCluster { clusterManagerId: result[0]! as String, position: result[1]! as PlatformLatLng, bounds: result[2]! as PlatformLatLngBounds, - markerIds: (result[3] as List?)!.cast(), + markerIds: (result[3]! as List).cast(), ); } @@ -819,31 +998,36 @@ class PlatformCluster { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(clusterManagerId, other.clusterManagerId) && _deepEquals(position, other.position) && _deepEquals(bounds, other.bounds) && _deepEquals(markerIds, other.markerIds); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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 @@ -855,12 +1039,12 @@ class PlatformClusterManager { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(identifier, other.identifier); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Marker class. @@ -930,8 +1114,7 @@ class PlatformMarker { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformMarker decode(Object result) { result as List; @@ -962,12 +1145,12 @@ class PlatformMarker { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(alpha, other.alpha) && _deepEquals(anchor, other.anchor) && _deepEquals(consumeTapEvents, other.consumeTapEvents) && _deepEquals(draggable, other.draggable) && _deepEquals(flat, other.flat) && _deepEquals(icon, other.icon) && _deepEquals(infoWindow, other.infoWindow) && _deepEquals(position, other.position) && _deepEquals(rotation, other.rotation) && _deepEquals(visible, other.visible) && _deepEquals(zIndex, other.zIndex) && _deepEquals(markerId, other.markerId) && _deepEquals(clusterManagerId, other.clusterManagerId) && _deepEquals(collisionBehavior, other.collisionBehavior); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Polygon class. @@ -1021,8 +1204,7 @@ class PlatformPolygon { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformPolygon decode(Object result) { result as List; @@ -1031,8 +1213,8 @@ class PlatformPolygon { 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>(), + 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, @@ -1049,12 +1231,12 @@ class PlatformPolygon { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(polygonId, other.polygonId) && _deepEquals(consumesTapEvents, other.consumesTapEvents) && _deepEquals(fillColor, other.fillColor) && _deepEquals(geodesic, other.geodesic) && _deepEquals(points, other.points) && _deepEquals(holes, other.holes) && _deepEquals(visible, other.visible) && _deepEquals(strokeColor, other.strokeColor) && _deepEquals(strokeWidth, other.strokeWidth) && _deepEquals(zIndex, other.zIndex); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Polyline class. @@ -1110,8 +1292,7 @@ class PlatformPolyline { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformPolyline decode(Object result) { result as List; @@ -1121,8 +1302,8 @@ class PlatformPolyline { 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(), + 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, @@ -1138,29 +1319,34 @@ class PlatformPolyline { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(polylineId, other.polylineId) && _deepEquals(consumesTapEvents, other.consumesTapEvents) && _deepEquals(color, other.color) && _deepEquals(geodesic, other.geodesic) && _deepEquals(jointType, other.jointType) && _deepEquals(patterns, other.patterns) && _deepEquals(points, other.points) && _deepEquals(visible, other.visible) && _deepEquals(width, other.width) && _deepEquals(zIndex, other.zIndex); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1179,17 +1365,21 @@ class PlatformPatternItem { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(type, other.type) && _deepEquals(length, other.length); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1198,12 +1388,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; @@ -1223,12 +1416,12 @@ class PlatformTile { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(width, other.width) && _deepEquals(height, other.height) && _deepEquals(data, other.data); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the TileOverlay class. @@ -1266,8 +1459,7 @@ class PlatformTileOverlay { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformTileOverlay decode(Object result) { result as List; @@ -1290,12 +1482,12 @@ class PlatformTileOverlay { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(tileOverlayId, other.tileOverlayId) && _deepEquals(fadeIn, other.fadeIn) && _deepEquals(transparency, other.transparency) && _deepEquals(zIndex, other.zIndex) && _deepEquals(visible, other.visible) && _deepEquals(tileSize, other.tileSize); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of Flutter's EdgeInsets. @@ -1316,12 +1508,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; @@ -1342,29 +1538,34 @@ class PlatformEdgeInsets { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(top, other.top) && _deepEquals(bottom, other.bottom) && _deepEquals(left, other.left) && _deepEquals(right, other.right); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1383,29 +1584,34 @@ class PlatformLatLng { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(latitude, other.latitude) && _deepEquals(longitude, other.longitude); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1424,12 +1630,12 @@ class PlatformLatLngBounds { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(northeast, other.northeast) && _deepEquals(southwest, other.southwest); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of CameraTargetBounds. @@ -1437,17 +1643,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; @@ -1459,19 +1668,18 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(bounds, other.bounds); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the GroundOverlay class. @@ -1529,8 +1737,7 @@ class PlatformGroundOverlay { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformGroundOverlay decode(Object result) { result as List; @@ -1558,12 +1765,12 @@ class PlatformGroundOverlay { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(groundOverlayId, other.groundOverlayId) && _deepEquals(image, other.image) && _deepEquals(position, other.position) && _deepEquals(bounds, other.bounds) && _deepEquals(anchor, other.anchor) && _deepEquals(transparency, other.transparency) && _deepEquals(bearing, other.bearing) && _deepEquals(zIndex, other.zIndex) && _deepEquals(visible, other.visible) && _deepEquals(clickable, other.clickable) && _deepEquals(zoomLevel, other.zoomLevel); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Information passed to the platform view creation. @@ -1617,44 +1824,39 @@ class PlatformMapViewCreationParams { } Object encode() { - return _toList(); - } + 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(), + 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) { + if (other is! PlatformMapViewCreationParams || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(initialCameraPosition, other.initialCameraPosition) && _deepEquals(mapConfiguration, other.mapConfiguration) && _deepEquals(initialCircles, other.initialCircles) && _deepEquals(initialMarkers, other.initialMarkers) && _deepEquals(initialPolygons, other.initialPolygons) && _deepEquals(initialPolylines, other.initialPolylines) && _deepEquals(initialHeatmaps, other.initialHeatmaps) && _deepEquals(initialTileOverlays, other.initialTileOverlays) && _deepEquals(initialClusterManagers, other.initialClusterManagers) && _deepEquals(initialGroundOverlays, other.initialGroundOverlays); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of MapConfiguration. @@ -1740,8 +1942,7 @@ class PlatformMapConfiguration { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformMapConfiguration decode(Object result) { result as List; @@ -1770,40 +1971,47 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(compassEnabled, other.compassEnabled) && _deepEquals(cameraTargetBounds, other.cameraTargetBounds) && _deepEquals(mapType, other.mapType) && _deepEquals(minMaxZoomPreference, other.minMaxZoomPreference) && _deepEquals(rotateGesturesEnabled, other.rotateGesturesEnabled) && _deepEquals(scrollGesturesEnabled, other.scrollGesturesEnabled) && _deepEquals(tiltGesturesEnabled, other.tiltGesturesEnabled) && _deepEquals(trackCameraPosition, other.trackCameraPosition) && _deepEquals(zoomGesturesEnabled, other.zoomGesturesEnabled) && _deepEquals(myLocationEnabled, other.myLocationEnabled) && _deepEquals(myLocationButtonEnabled, other.myLocationButtonEnabled) && _deepEquals(padding, other.padding) && _deepEquals(indoorViewEnabled, other.indoorViewEnabled) && _deepEquals(trafficEnabled, other.trafficEnabled) && _deepEquals(buildingsEnabled, other.buildingsEnabled) && _deepEquals(markerType, other.markerType) && _deepEquals(mapId, other.mapId) && _deepEquals(style, other.style); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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 @@ -1815,29 +2023,34 @@ class PlatformPoint { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(x, other.x) && _deepEquals(y, other.y); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1856,12 +2069,12 @@ class PlatformSize { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(width, other.width) && _deepEquals(height, other.height); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon representation of a color. @@ -1882,12 +2095,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; @@ -1908,12 +2125,12 @@ class PlatformColor { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(red, other.red) && _deepEquals(green, other.green) && _deepEquals(blue, other.blue) && _deepEquals(alpha, other.alpha); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of GMSTileLayer properties. @@ -1934,12 +2151,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; @@ -1960,29 +2181,34 @@ class PlatformTileLayer { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(visible, other.visible) && _deepEquals(fadeIn, other.fadeIn) && _deepEquals(opacity, other.opacity) && _deepEquals(zIndex, other.zIndex); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -2001,19 +2227,21 @@ class PlatformZoomRange { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(min, other.min) && _deepEquals(max, other.max); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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], @@ -2025,16 +2253,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 @@ -2046,66 +2277,75 @@ class PlatformBitmap { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(bitmap, other.bitmap); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(hue, other.hue); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -2124,29 +2364,34 @@ class PlatformBitmapBytes { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(byteData, other.byteData) && _deepEquals(size, other.size); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -2165,12 +2410,12 @@ class PlatformBitmapAsset { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(name, other.name) && _deepEquals(pkg, other.pkg); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of [AssetImageBitmap]. @@ -2188,12 +2433,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; @@ -2207,19 +2455,18 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(name, other.name) && _deepEquals(scale, other.scale) && _deepEquals(size, other.size); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of [AssetMapBitmap]. @@ -2243,12 +2490,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; @@ -2270,12 +2522,12 @@ class PlatformBitmapAssetMap { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(assetName, other.assetName) && _deepEquals(bitmapScaling, other.bitmapScaling) && _deepEquals(imagePixelRatio, other.imagePixelRatio) && _deepEquals(width, other.width) && _deepEquals(height, other.height); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of [BytesMapBitmap]. @@ -2299,12 +2551,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; @@ -2326,12 +2583,12 @@ class PlatformBitmapBytesMap { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(byteData, other.byteData) && _deepEquals(bitmapScaling, other.bitmapScaling) && _deepEquals(imagePixelRatio, other.imagePixelRatio) && _deepEquals(width, other.width) && _deepEquals(height, other.height); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of [PinConfig]. @@ -2369,8 +2626,7 @@ class PlatformBitmapPinConfig { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmapPinConfig decode(Object result) { result as List; @@ -2393,14 +2649,15 @@ class PlatformBitmapPinConfig { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(backgroundColor, other.backgroundColor) && _deepEquals(borderColor, other.borderColor) && _deepEquals(glyphColor, other.glyphColor) && _deepEquals(glyphTextColor, other.glyphTextColor) && _deepEquals(glyphText, other.glyphText) && _deepEquals(glyphBitmap, other.glyphBitmap); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } + class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -2408,153 +2665,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 PlatformMarkerCollisionBehavior) { + } else if (value is PlatformMarkerCollisionBehavior) { buffer.putUint8(130); writeValue(buffer, value.index); - } else if (value is PlatformJointType) { + } else if (value is PlatformJointType) { buffer.putUint8(131); writeValue(buffer, value.index); - } else if (value is PlatformPatternItemType) { + } else if (value is PlatformPatternItemType) { buffer.putUint8(132); writeValue(buffer, value.index); - } else if (value is PlatformMarkerType) { + } else if (value is PlatformMarkerType) { buffer.putUint8(133); writeValue(buffer, value.index); - } else if (value is PlatformMapBitmapScaling) { + } else if (value is PlatformMapBitmapScaling) { buffer.putUint8(134); writeValue(buffer, value.index); - } else if (value is PlatformCameraPosition) { + } else if (value is PlatformCameraPosition) { buffer.putUint8(135); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { + } else if (value is PlatformCameraUpdate) { buffer.putUint8(136); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewCameraPosition) { + } else if (value is PlatformCameraUpdateNewCameraPosition) { buffer.putUint8(137); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLng) { + } else if (value is PlatformCameraUpdateNewLatLng) { buffer.putUint8(138); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngBounds) { + } else if (value is PlatformCameraUpdateNewLatLngBounds) { buffer.putUint8(139); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngZoom) { + } else if (value is PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets) { buffer.putUint8(140); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateScrollBy) { + } else if (value is PlatformCameraUpdateNewLatLngZoom) { buffer.putUint8(141); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomBy) { + } else if (value is PlatformCameraUpdateScrollBy) { buffer.putUint8(142); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoom) { + } else if (value is PlatformCameraUpdateZoomBy) { buffer.putUint8(143); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomTo) { + } else if (value is PlatformCameraUpdateZoom) { buffer.putUint8(144); writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { + } else if (value is PlatformCameraUpdateZoomTo) { buffer.putUint8(145); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { + } else if (value is PlatformCircle) { buffer.putUint8(146); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmapGradient) { + } else if (value is PlatformHeatmap) { buffer.putUint8(147); writeValue(buffer, value.encode()); - } else if (value is PlatformWeightedLatLng) { + } else if (value is PlatformHeatmapGradient) { buffer.putUint8(148); writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { + } else if (value is PlatformWeightedLatLng) { buffer.putUint8(149); writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { + } else if (value is PlatformInfoWindow) { buffer.putUint8(150); writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { + } else if (value is PlatformCluster) { buffer.putUint8(151); writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { + } else if (value is PlatformClusterManager) { buffer.putUint8(152); writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { + } else if (value is PlatformMarker) { buffer.putUint8(153); writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { + } else if (value is PlatformPolygon) { buffer.putUint8(154); writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { + } else if (value is PlatformPolyline) { buffer.putUint8(155); writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { + } else if (value is PlatformPatternItem) { buffer.putUint8(156); writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { + } else if (value is PlatformTile) { buffer.putUint8(157); writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { + } else if (value is PlatformTileOverlay) { buffer.putUint8(158); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { + } else if (value is PlatformEdgeInsets) { buffer.putUint8(159); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { + } else if (value is PlatformLatLng) { buffer.putUint8(160); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { + } else if (value is PlatformLatLngBounds) { buffer.putUint8(161); writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { + } else if (value is PlatformCameraTargetBounds) { buffer.putUint8(162); writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { + } else if (value is PlatformGroundOverlay) { buffer.putUint8(163); writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { + } else if (value is PlatformMapViewCreationParams) { buffer.putUint8(164); writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { + } else if (value is PlatformMapConfiguration) { buffer.putUint8(165); writeValue(buffer, value.encode()); - } else if (value is PlatformSize) { + } else if (value is PlatformPoint) { buffer.putUint8(166); writeValue(buffer, value.encode()); - } else if (value is PlatformColor) { + } else if (value is PlatformSize) { buffer.putUint8(167); writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { + } else if (value is PlatformColor) { buffer.putUint8(168); writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { + } else if (value is PlatformTileLayer) { buffer.putUint8(169); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { + } else if (value is PlatformZoomRange) { buffer.putUint8(170); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { + } else if (value is PlatformBitmap) { buffer.putUint8(171); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { + } else if (value is PlatformBitmapDefaultMarker) { buffer.putUint8(172); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { + } else if (value is PlatformBitmapBytes) { buffer.putUint8(173); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { + } else if (value is PlatformBitmapAsset) { buffer.putUint8(174); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { + } else if (value is PlatformBitmapAssetImage) { buffer.putUint8(175); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { + } else if (value is PlatformBitmapAssetMap) { buffer.putUint8(176); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapPinConfig) { + } else if (value is PlatformBitmapBytesMap) { buffer.putUint8(177); writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapPinConfig) { + buffer.putUint8(178); + writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); } @@ -2568,9 +2828,7 @@ class _PigeonCodec extends StandardMessageCodec { return value == null ? null : PlatformMapType.values[value]; case 130: final value = readValue(buffer) as int?; - return value == null - ? null - : PlatformMarkerCollisionBehavior.values[value]; + return value == null ? null : PlatformMarkerCollisionBehavior.values[value]; case 131: final value = readValue(buffer) as int?; return value == null ? null : PlatformJointType.values[value]; @@ -2594,80 +2852,82 @@ class _PigeonCodec extends StandardMessageCodec { case 139: return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); case 140: - return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); + return PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets.decode(readValue(buffer)!); case 141: - return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); + return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); case 142: - return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); + return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); case 143: - return PlatformCameraUpdateZoom.decode(readValue(buffer)!); + return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); case 144: - return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); + return PlatformCameraUpdateZoom.decode(readValue(buffer)!); case 145: - return PlatformCircle.decode(readValue(buffer)!); + return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); case 146: - return PlatformHeatmap.decode(readValue(buffer)!); + return PlatformCircle.decode(readValue(buffer)!); case 147: - return PlatformHeatmapGradient.decode(readValue(buffer)!); + return PlatformHeatmap.decode(readValue(buffer)!); case 148: - return PlatformWeightedLatLng.decode(readValue(buffer)!); + return PlatformHeatmapGradient.decode(readValue(buffer)!); case 149: - return PlatformInfoWindow.decode(readValue(buffer)!); + return PlatformWeightedLatLng.decode(readValue(buffer)!); case 150: - return PlatformCluster.decode(readValue(buffer)!); + return PlatformInfoWindow.decode(readValue(buffer)!); case 151: - return PlatformClusterManager.decode(readValue(buffer)!); + return PlatformCluster.decode(readValue(buffer)!); case 152: - return PlatformMarker.decode(readValue(buffer)!); + return PlatformClusterManager.decode(readValue(buffer)!); case 153: - return PlatformPolygon.decode(readValue(buffer)!); + return PlatformMarker.decode(readValue(buffer)!); case 154: - return PlatformPolyline.decode(readValue(buffer)!); + return PlatformPolygon.decode(readValue(buffer)!); case 155: - return PlatformPatternItem.decode(readValue(buffer)!); + return PlatformPolyline.decode(readValue(buffer)!); case 156: - return PlatformTile.decode(readValue(buffer)!); + return PlatformPatternItem.decode(readValue(buffer)!); case 157: - return PlatformTileOverlay.decode(readValue(buffer)!); + return PlatformTile.decode(readValue(buffer)!); case 158: - return PlatformEdgeInsets.decode(readValue(buffer)!); + return PlatformTileOverlay.decode(readValue(buffer)!); case 159: - return PlatformLatLng.decode(readValue(buffer)!); + return PlatformEdgeInsets.decode(readValue(buffer)!); case 160: - return PlatformLatLngBounds.decode(readValue(buffer)!); + return PlatformLatLng.decode(readValue(buffer)!); case 161: - return PlatformCameraTargetBounds.decode(readValue(buffer)!); + return PlatformLatLngBounds.decode(readValue(buffer)!); case 162: - return PlatformGroundOverlay.decode(readValue(buffer)!); + return PlatformCameraTargetBounds.decode(readValue(buffer)!); case 163: - return PlatformMapViewCreationParams.decode(readValue(buffer)!); + return PlatformGroundOverlay.decode(readValue(buffer)!); case 164: - return PlatformMapConfiguration.decode(readValue(buffer)!); + return PlatformMapViewCreationParams.decode(readValue(buffer)!); case 165: - return PlatformPoint.decode(readValue(buffer)!); + return PlatformMapConfiguration.decode(readValue(buffer)!); case 166: - return PlatformSize.decode(readValue(buffer)!); + return PlatformPoint.decode(readValue(buffer)!); case 167: - return PlatformColor.decode(readValue(buffer)!); + return PlatformSize.decode(readValue(buffer)!); case 168: - return PlatformTileLayer.decode(readValue(buffer)!); + return PlatformColor.decode(readValue(buffer)!); case 169: - return PlatformZoomRange.decode(readValue(buffer)!); + return PlatformTileLayer.decode(readValue(buffer)!); case 170: - return PlatformBitmap.decode(readValue(buffer)!); + return PlatformZoomRange.decode(readValue(buffer)!); case 171: - return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); + return PlatformBitmap.decode(readValue(buffer)!); case 172: - return PlatformBitmapBytes.decode(readValue(buffer)!); + return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); case 173: - return PlatformBitmapAsset.decode(readValue(buffer)!); + return PlatformBitmapBytes.decode(readValue(buffer)!); case 174: - return PlatformBitmapAssetImage.decode(readValue(buffer)!); + return PlatformBitmapAsset.decode(readValue(buffer)!); case 175: - return PlatformBitmapAssetMap.decode(readValue(buffer)!); + return PlatformBitmapAssetImage.decode(readValue(buffer)!); case 176: - return PlatformBitmapBytesMap.decode(readValue(buffer)!); + return PlatformBitmapAssetMap.decode(readValue(buffer)!); case 177: + return PlatformBitmapBytesMap.decode(readValue(buffer)!); + case 178: return PlatformBitmapPinConfig.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -2683,10 +2943,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(); @@ -2695,8 +2953,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, @@ -2704,355 +2961,232 @@ class MapsApi { ); 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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'; + 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! 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_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); - } else 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! 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_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3060,85 +3194,59 @@ class MapsApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! 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_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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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, @@ -3146,106 +3254,73 @@ class MapsApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! 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_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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } /// Sets the style to the given map style string, where an empty string @@ -3254,28 +3329,22 @@ 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); - } else 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as String?; } /// Returns the error string from the last attempt to set the map style, if @@ -3284,8 +3353,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, @@ -3293,49 +3361,38 @@ class MapsApi { ); 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue 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_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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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, @@ -3343,23 +3400,19 @@ class MapsApi { ); 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as Uint8List?; } /// Returns true if the map supports advanced markers. Future isAdvancedMarkersAvailable() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3367,22 +3420,14 @@ class MapsApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } } @@ -3436,26 +3481,14 @@ abstract class MapsCallbackApi { void onGroundOverlayTap(String groundOverlayId); /// Called to get data for a map tile. - Future getTileOverlayTile( - String tileOverlayId, - PlatformPoint location, - int zoom, - ); - - static void setUp( - MapsCallbackApi? api, { - BinaryMessenger? binaryMessenger, - String messageChannelSuffix = '', - }) { - messageChannelSuffix = messageChannelSuffix.isNotEmpty - ? '.$messageChannelSuffix' - : ''; + Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); + + static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { + messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; { final 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 { @@ -3465,54 +3498,37 @@ 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.', - ); - 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 List args = message! as List; + final PlatformCameraPosition arg_cameraPosition = args[0]! as PlatformCameraPosition; try { - api.onCameraMove(arg_cameraPosition!); + 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 { @@ -3522,468 +3538,286 @@ 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.', - ); - 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.', - ); + final List args = message! as List; + final PlatformLatLng arg_position = args[0]! as PlatformLatLng; try { - api.onTap(arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final PlatformLatLng arg_position = args[0]! as PlatformLatLng; try { - api.onLongPress(arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; try { - api.onMarkerTap(arg_markerId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; + final PlatformLatLng arg_position = args[1]! as PlatformLatLng; try { - api.onMarkerDragStart(arg_markerId!, arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; + final PlatformLatLng arg_position = args[1]! as PlatformLatLng; try { - api.onMarkerDrag(arg_markerId!, arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; + final PlatformLatLng arg_position = args[1]! as PlatformLatLng; try { - api.onMarkerDragEnd(arg_markerId!, arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; try { - api.onInfoWindowTap(arg_markerId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_circleId = args[0]! as String; try { - api.onCircleTap(arg_circleId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final PlatformCluster arg_cluster = args[0]! as PlatformCluster; try { - api.onClusterTap(arg_cluster!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_polygonId = args[0]! as String; try { - api.onPolygonTap(arg_polygonId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_polylineId = args[0]! as String; try { - api.onPolylineTap(arg_polylineId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_groundOverlayId = args[0]! as String; try { - api.onGroundOverlayTap(arg_groundOverlayId!); + 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.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.', - ); + final List args = message! as List; + final String arg_tileOverlayId = args[0]! as String; + final PlatformPoint arg_location = args[1]! as PlatformPoint; + final int arg_zoom = args[2]! as 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())); } }); } @@ -3998,13 +3832,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(); @@ -4012,28 +3842,21 @@ 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } } @@ -4042,13 +3865,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(); @@ -4056,8 +3875,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, @@ -4065,27 +3883,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4093,27 +3902,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4121,27 +3921,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4149,27 +3940,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4177,27 +3959,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4205,27 +3978,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4233,27 +3997,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4261,104 +4016,75 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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); - } else 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as PlatformTileLayer?; } - 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); - } else 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as PlatformGroundOverlay?; } 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); - } else 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as PlatformHeatmap?; } 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, @@ -4366,58 +4092,37 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as PlatformZoomRange; } 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); - } else 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(); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return (pigeonVar_replyValue! 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, @@ -4425,21 +4130,13 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as PlatformCameraPosition; } } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/pigeons/messages.dart index d86ff8472237..059f63f890a8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/pigeons/messages.dart @@ -71,6 +71,13 @@ class PlatformCameraUpdateNewLatLngBounds { final double padding; } +/// Pigeon equivalent of NewLatLngBoundsWithEdgeInsets +class PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets { + PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets(this.bounds, this.padding); + final PlatformLatLngBounds bounds; + final PlatformEdgeInsets padding; +} + /// Pigeon equivalent of NewLatLngZoom class PlatformCameraUpdateNewLatLngZoom { PlatformCameraUpdateNewLatLngZoom(this.latLng, this.zoom); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/test/google_maps_flutter_ios_test.dart index 48396c35f65c..89f047fbf5e2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/test/google_maps_flutter_ios_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/test/google_maps_flutter_ios_test.dart @@ -1336,6 +1336,56 @@ void main() { expect(typedUpdate.out, true); }); + test( + 'moveCamera calls through with expected newLatLngBoundsWithEdgeInsets', + () async { + const mapId = 1; + final (GoogleMapsFlutterIOS maps, MockMapsApi api) = setUpMockMap( + mapId: mapId, + ); + + final bounds = LatLngBounds( + northeast: const LatLng(10.0, 20.0), + southwest: const LatLng(9.0, 21.0), + ); + const padding = EdgeInsets.fromLTRB(10.0, 20.0, 30.0, 40.0); + final CameraUpdate update = CameraUpdate.newLatLngBoundsWithEdgeInsets( + bounds, + padding, + ); + await maps.moveCamera(update, mapId: mapId); + + final VerificationResult verification = verify( + api.moveCamera(captureAny), + ); + final passedUpdate = verification.captured[0] as PlatformCameraUpdate; + final typedUpdate = + passedUpdate.cameraUpdate + as PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets; + update as CameraUpdateNewLatLngBoundsWithEdgeInsets; + expect( + typedUpdate.bounds.northeast.latitude, + update.bounds.northeast.latitude, + ); + expect( + typedUpdate.bounds.northeast.longitude, + update.bounds.northeast.longitude, + ); + expect( + typedUpdate.bounds.southwest.latitude, + update.bounds.southwest.latitude, + ); + expect( + typedUpdate.bounds.southwest.longitude, + update.bounds.southwest.longitude, + ); + expect(typedUpdate.padding.top, update.padding.top); + expect(typedUpdate.padding.left, update.padding.left); + expect(typedUpdate.padding.bottom, update.padding.bottom); + expect(typedUpdate.padding.right, update.padding.right); + }, + ); + test('MapBitmapScaling to PlatformMapBitmapScaling', () { expect( GoogleMapsFlutterIOS.platformMapBitmapScalingFromScaling( diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/test/google_maps_flutter_ios_test.mocks.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/test/google_maps_flutter_ios_test.mocks.dart index 443bc62e1739..95d6458f46c9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/test/google_maps_flutter_ios_test.mocks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/test/google_maps_flutter_ios_test.mocks.dart @@ -23,6 +23,7 @@ import 'package:mockito/src/dummies.dart' as _i3; // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakePlatformPoint_0 extends _i1.SmartFake implements _i2.PlatformPoint { _FakePlatformPoint_0(Object parent, Invocation parentInvocation) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/FGMConversionUtils.m b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/FGMConversionUtils.m index 001ebc30cbfa..2886bdf8da69 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/FGMConversionUtils.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/FGMConversionUtils.m @@ -241,6 +241,14 @@ GMSCollisionBehavior FGMGetCollisionBehaviorForPigeonCollisionBehavior( return [GMSCameraUpdate fitBounds:FGMGetCoordinateBoundsForPigeonLatLngBounds(typedUpdate.bounds) withPadding:typedUpdate.padding]; + } else if ([update isKindOfClass:[FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets class]]) { + FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *typedUpdate = + (FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)update; + FGMPlatformEdgeInsets *padding = typedUpdate.padding; + return + [GMSCameraUpdate fitBounds:FGMGetCoordinateBoundsForPigeonLatLngBounds(typedUpdate.bounds) + withEdgeInsets:UIEdgeInsetsMake(padding.top, padding.left, + padding.bottom, padding.right)]; } else if ([update isKindOfClass:[FGMPlatformCameraUpdateNewLatLngZoom class]]) { FGMPlatformCameraUpdateNewLatLngZoom *typedUpdate = (FGMPlatformCameraUpdateNewLatLngZoom *)update; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/google_maps_flutter_pigeon_messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/google_maps_flutter_pigeon_messages.g.m index 3302fd9e13b8..0bfc5b66502d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/google_maps_flutter_pigeon_messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/google_maps_flutter_pigeon_messages.g.m @@ -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.3.3), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "google_maps_flutter_pigeon_messages.g.h" @@ -12,6 +12,96 @@ @import Flutter; #endif +static BOOL __attribute__((unused)) FLTPigeonDeepEquals(id _Nullable a, id _Nullable b) { + if (a == b) { + return YES; + } + if (a == nil) { + return b == [NSNull null]; + } + if (b == nil) { + return a == [NSNull null]; + } + if ([a isKindOfClass:[NSNumber class]] && [b isKindOfClass:[NSNumber class]]) { + return [a isEqual:b] || (isnan([(NSNumber *)a doubleValue]) && isnan([(NSNumber *)b doubleValue])); + } + if ([a isKindOfClass:[NSArray class]] && [b isKindOfClass:[NSArray class]]) { + NSArray *arrayA = (NSArray *)a; + NSArray *arrayB = (NSArray *)b; + if (arrayA.count != arrayB.count) { + return NO; + } + for (NSUInteger i = 0; i < arrayA.count; i++) { + if (!FLTPigeonDeepEquals(arrayA[i], arrayB[i])) { + return NO; + } + } + return YES; + } + if ([a isKindOfClass:[NSDictionary class]] && [b isKindOfClass:[NSDictionary class]]) { + NSDictionary *dictA = (NSDictionary *)a; + NSDictionary *dictB = (NSDictionary *)b; + if (dictA.count != dictB.count) { + return NO; + } + for (id keyA in dictA) { + id valueA = dictA[keyA]; + BOOL found = NO; + for (id keyB in dictB) { + if (FLTPigeonDeepEquals(keyA, keyB)) { + id valueB = dictB[keyB]; + if (FLTPigeonDeepEquals(valueA, valueB)) { + found = YES; + break; + } else { + return NO; + } + } + } + if (!found) { + return NO; + } + } + return YES; + } + return [a isEqual:b]; +} + +static NSUInteger __attribute__((unused)) FLTPigeonDeepHash(id _Nullable value) { + if (value == nil || value == (id)[NSNull null]) { + return 0; + } + if ([value isKindOfClass:[NSNumber class]]) { + NSNumber *n = (NSNumber *)value; + double d = n.doubleValue; + if (isnan(d)) { + // Normalize NaN to a consistent hash. + return (NSUInteger)0x7FF8000000000000; + } + if (d == 0.0) { + // Normalize -0.0 to 0.0 so they have the same hash code. + d = 0.0; + } + return @(d).hash; + } + if ([value isKindOfClass:[NSArray class]]) { + NSUInteger result = 1; + for (id item in (NSArray *)value) { + result = result * 31 + FLTPigeonDeepHash(item); + } + return result; + } + if ([value isKindOfClass:[NSDictionary class]]) { + NSUInteger result = 0; + NSDictionary *dict = (NSDictionary *)value; + for (id key in dict) { + result += ((FLTPigeonDeepHash(key) * 31) ^ FLTPigeonDeepHash(dict[key])); + } + return result; + } + return [value hash]; +} + static NSArray *wrapResult(id result, FlutterError *error) { if (error) { return @[ @@ -22,12 +112,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) { @@ -46,7 +131,7 @@ - (instancetype)initWithValue:(FGMPlatformMapType)value { } @end -/// Pigeon equivalent of MarkerCollisionBehavior. +/// Pigeon equivalent of the MarkerCollisionBehavior enum. @implementation FGMPlatformMarkerCollisionBehaviorBox - (instancetype)initWithValue:(FGMPlatformMarkerCollisionBehavior)value { self = [super init]; @@ -130,6 +215,12 @@ + (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray *)toList; @end +@interface FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets () ++ (FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)fromList:(NSArray *)list; ++ (nullable FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)nullableFromList:(NSArray *)list; +- (NSArray *)toList; +@end + @interface FGMPlatformCameraUpdateNewLatLngZoom () + (FGMPlatformCameraUpdateNewLatLngZoom *)fromList:(NSArray *)list; + (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray *)list; @@ -359,11 +450,11 @@ + (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray *)list; @end @implementation FGMPlatformCameraPosition -+ (instancetype)makeWithBearing:(double)bearing - target:(FGMPlatformLatLng *)target - tilt:(double)tilt - zoom:(double)zoom { - FGMPlatformCameraPosition *pigeonResult = [[FGMPlatformCameraPosition alloc] init]; ++ (instancetype)makeWithBearing:(double )bearing + target:(FGMPlatformLatLng *)target + tilt:(double )tilt + zoom:(double )zoom { + FGMPlatformCameraPosition* pigeonResult = [[FGMPlatformCameraPosition alloc] init]; pigeonResult.bearing = bearing; pigeonResult.target = target; pigeonResult.tilt = tilt; @@ -389,11 +480,30 @@ + (nullable FGMPlatformCameraPosition *)nullableFromList:(NSArray *)list { @(self.zoom), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraPosition *other = (FGMPlatformCameraPosition *)object; + return (self.bearing == other.bearing || (isnan(self.bearing) && isnan(other.bearing))) && FLTPigeonDeepEquals(self.target, other.target) && (self.tilt == other.tilt || (isnan(self.tilt) && isnan(other.tilt))) && (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.bearing) ? (NSUInteger)0x7FF8000000000000 : @(self.bearing).hash); + result = result * 31 + FLTPigeonDeepHash(self.target); + result = result * 31 + (isnan(self.tilt) ? (NSUInteger)0x7FF8000000000000 : @(self.tilt).hash); + result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash); + return result; +} @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; } @@ -410,18 +520,32 @@ + (nullable FGMPlatformCameraUpdate *)nullableFromList:(NSArray *)list { self.cameraUpdate ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdate *other = (FGMPlatformCameraUpdate *)object; + return FLTPigeonDeepEquals(self.cameraUpdate, other.cameraUpdate); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.cameraUpdate); + return result; +} @end @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; } @@ -433,11 +557,27 @@ + (nullable FGMPlatformCameraUpdateNewCameraPosition *)nullableFromList:(NSArray self.cameraPosition ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateNewCameraPosition *other = (FGMPlatformCameraUpdateNewCameraPosition *)object; + return FLTPigeonDeepEquals(self.cameraPosition, other.cameraPosition); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.cameraPosition); + return result; +} @end @implementation FGMPlatformCameraUpdateNewLatLng + (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng { - FGMPlatformCameraUpdateNewLatLng *pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init]; + FGMPlatformCameraUpdateNewLatLng* pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init]; pigeonResult.latLng = latLng; return pigeonResult; } @@ -454,19 +594,34 @@ + (nullable FGMPlatformCameraUpdateNewLatLng *)nullableFromList:(NSArray *)l self.latLng ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateNewLatLng *other = (FGMPlatformCameraUpdateNewLatLng *)object; + return FLTPigeonDeepEquals(self.latLng, other.latLng); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.latLng); + return result; +} @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; @@ -480,19 +635,77 @@ + (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray *)list { + FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *pigeonResult = [[FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets alloc] init]; + pigeonResult.bounds = GetNullableObjectAtIndex(list, 0); + pigeonResult.padding = GetNullableObjectAtIndex(list, 1); + return pigeonResult; +} ++ (nullable FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)nullableFromList:(NSArray *)list { + return (list) ? [FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets fromList:list] : nil; +} +- (NSArray *)toList { + return @[ + self.bounds ?: [NSNull null], + self.padding ?: [NSNull null], + ]; +} +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *other = (FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)object; + return FLTPigeonDeepEquals(self.bounds, other.bounds) && FLTPigeonDeepEquals(self.padding, other.padding); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.bounds); + result = result * 31 + FLTPigeonDeepHash(self.padding); + return result; +} @end @implementation FGMPlatformCameraUpdateNewLatLngZoom -+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom { - FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult = - [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init]; ++ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng + zoom:(double )zoom { + FGMPlatformCameraUpdateNewLatLngZoom* pigeonResult = [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init]; pigeonResult.latLng = latLng; pigeonResult.zoom = zoom; return pigeonResult; } + (FGMPlatformCameraUpdateNewLatLngZoom *)fromList:(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; @@ -506,11 +719,29 @@ + (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray @(self.zoom), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateNewLatLngZoom *other = (FGMPlatformCameraUpdateNewLatLngZoom *)object; + return FLTPigeonDeepEquals(self.latLng, other.latLng) && (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.latLng); + result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash); + return result; +} @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; @@ -530,11 +761,29 @@ + (nullable FGMPlatformCameraUpdateScrollBy *)nullableFromList:(NSArray *)li @(self.dy), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateScrollBy *other = (FGMPlatformCameraUpdateScrollBy *)object; + return (self.dx == other.dx || (isnan(self.dx) && isnan(other.dx))) && (self.dy == other.dy || (isnan(self.dy) && isnan(other.dy))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.dx) ? (NSUInteger)0x7FF8000000000000 : @(self.dx).hash); + result = result * 31 + (isnan(self.dy) ? (NSUInteger)0x7FF8000000000000 : @(self.dy).hash); + return result; +} @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; @@ -554,11 +803,28 @@ + (nullable FGMPlatformCameraUpdateZoomBy *)nullableFromList:(NSArray *)list self.focus ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateZoomBy *other = (FGMPlatformCameraUpdateZoomBy *)object; + return (self.amount == other.amount || (isnan(self.amount) && isnan(other.amount))) && FLTPigeonDeepEquals(self.focus, other.focus); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.amount) ? (NSUInteger)0x7FF8000000000000 : @(self.amount).hash); + result = result * 31 + FLTPigeonDeepHash(self.focus); + return result; +} @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; } @@ -575,11 +841,27 @@ + (nullable FGMPlatformCameraUpdateZoom *)nullableFromList:(NSArray *)list { @(self.out), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateZoom *other = (FGMPlatformCameraUpdateZoom *)object; + return self.out == other.out; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.out).hash; + return result; +} @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; } @@ -596,19 +878,35 @@ + (nullable FGMPlatformCameraUpdateZoomTo *)nullableFromList:(NSArray *)list @(self.zoom), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateZoomTo *other = (FGMPlatformCameraUpdateZoomTo *)object; + return (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash); + return result; +} @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; @@ -649,17 +947,41 @@ + (nullable FGMPlatformCircle *)nullableFromList:(NSArray *)list { self.circleId ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCircle *other = (FGMPlatformCircle *)object; + return self.consumeTapEvents == other.consumeTapEvents && FLTPigeonDeepEquals(self.fillColor, other.fillColor) && FLTPigeonDeepEquals(self.strokeColor, other.strokeColor) && self.visible == other.visible && self.strokeWidth == other.strokeWidth && (self.zIndex == other.zIndex || (isnan(self.zIndex) && isnan(other.zIndex))) && FLTPigeonDeepEquals(self.center, other.center) && (self.radius == other.radius || (isnan(self.radius) && isnan(other.radius))) && FLTPigeonDeepEquals(self.circleId, other.circleId); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.consumeTapEvents).hash; + result = result * 31 + FLTPigeonDeepHash(self.fillColor); + result = result * 31 + FLTPigeonDeepHash(self.strokeColor); + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.strokeWidth).hash; + result = result * 31 + (isnan(self.zIndex) ? (NSUInteger)0x7FF8000000000000 : @(self.zIndex).hash); + result = result * 31 + FLTPigeonDeepHash(self.center); + result = result * 31 + (isnan(self.radius) ? (NSUInteger)0x7FF8000000000000 : @(self.radius).hash); + result = result * 31 + FLTPigeonDeepHash(self.circleId); + return result; +} @end @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; @@ -694,13 +1016,35 @@ + (nullable FGMPlatformHeatmap *)nullableFromList:(NSArray *)list { @(self.maximumZoomIntensity), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformHeatmap *other = (FGMPlatformHeatmap *)object; + return FLTPigeonDeepEquals(self.heatmapId, other.heatmapId) && FLTPigeonDeepEquals(self.data, other.data) && FLTPigeonDeepEquals(self.gradient, other.gradient) && (self.opacity == other.opacity || (isnan(self.opacity) && isnan(other.opacity))) && self.radius == other.radius && self.minimumZoomIntensity == other.minimumZoomIntensity && self.maximumZoomIntensity == other.maximumZoomIntensity; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.heatmapId); + result = result * 31 + FLTPigeonDeepHash(self.data); + result = result * 31 + FLTPigeonDeepHash(self.gradient); + result = result * 31 + (isnan(self.opacity) ? (NSUInteger)0x7FF8000000000000 : @(self.opacity).hash); + result = result * 31 + @(self.radius).hash; + result = result * 31 + @(self.minimumZoomIntensity).hash; + result = result * 31 + @(self.maximumZoomIntensity).hash; + return result; +} @end @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; @@ -723,11 +1067,30 @@ + (nullable FGMPlatformHeatmapGradient *)nullableFromList:(NSArray *)list { @(self.colorMapSize), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformHeatmapGradient *other = (FGMPlatformHeatmapGradient *)object; + return FLTPigeonDeepEquals(self.colors, other.colors) && FLTPigeonDeepEquals(self.startPoints, other.startPoints) && self.colorMapSize == other.colorMapSize; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.colors); + result = result * 31 + FLTPigeonDeepHash(self.startPoints); + result = result * 31 + @(self.colorMapSize).hash; + return result; +} @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; @@ -747,13 +1110,30 @@ + (nullable FGMPlatformWeightedLatLng *)nullableFromList:(NSArray *)list { @(self.weight), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformWeightedLatLng *other = (FGMPlatformWeightedLatLng *)object; + return FLTPigeonDeepEquals(self.point, other.point) && (self.weight == other.weight || (isnan(self.weight) && isnan(other.weight))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.point); + result = result * 31 + (isnan(self.weight) ? (NSUInteger)0x7FF8000000000000 : @(self.weight).hash); + return result; +} @end @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; @@ -776,14 +1156,32 @@ + (nullable FGMPlatformInfoWindow *)nullableFromList:(NSArray *)list { self.anchor ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformInfoWindow *other = (FGMPlatformInfoWindow *)object; + return FLTPigeonDeepEquals(self.title, other.title) && FLTPigeonDeepEquals(self.snippet, other.snippet) && FLTPigeonDeepEquals(self.anchor, other.anchor); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.title); + result = result * 31 + FLTPigeonDeepHash(self.snippet); + result = result * 31 + FLTPigeonDeepHash(self.anchor); + return result; +} @end @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; @@ -809,11 +1207,30 @@ + (nullable FGMPlatformCluster *)nullableFromList:(NSArray *)list { self.markerIds ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCluster *other = (FGMPlatformCluster *)object; + return FLTPigeonDeepEquals(self.clusterManagerId, other.clusterManagerId) && FLTPigeonDeepEquals(self.position, other.position) && FLTPigeonDeepEquals(self.bounds, other.bounds) && FLTPigeonDeepEquals(self.markerIds, other.markerIds); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.clusterManagerId); + result = result * 31 + FLTPigeonDeepHash(self.position); + result = result * 31 + FLTPigeonDeepHash(self.bounds); + result = result * 31 + FLTPigeonDeepHash(self.markerIds); + return result; +} @end @implementation FGMPlatformClusterManager + (instancetype)makeWithIdentifier:(NSString *)identifier { - FGMPlatformClusterManager *pigeonResult = [[FGMPlatformClusterManager alloc] init]; + FGMPlatformClusterManager* pigeonResult = [[FGMPlatformClusterManager alloc] init]; pigeonResult.identifier = identifier; return pigeonResult; } @@ -830,24 +1247,40 @@ + (nullable FGMPlatformClusterManager *)nullableFromList:(NSArray *)list { self.identifier ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformClusterManager *other = (FGMPlatformClusterManager *)object; + return FLTPigeonDeepEquals(self.identifier, other.identifier); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.identifier); + return result; +} @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 - collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior { - FGMPlatformMarker *pigeonResult = [[FGMPlatformMarker alloc] init]; ++ (instancetype)makeWithAlpha:(double )alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL )consumeTapEvents + draggable:(BOOL )draggable + flat:(BOOL )flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double )rotation + visible:(BOOL )visible + zIndex:(NSInteger )zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId + collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior { + FGMPlatformMarker* pigeonResult = [[FGMPlatformMarker alloc] init]; pigeonResult.alpha = alpha; pigeonResult.anchor = anchor; pigeonResult.consumeTapEvents = consumeTapEvents; @@ -903,20 +1336,49 @@ + (nullable FGMPlatformMarker *)nullableFromList:(NSArray *)list { self.collisionBehavior ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformMarker *other = (FGMPlatformMarker *)object; + return (self.alpha == other.alpha || (isnan(self.alpha) && isnan(other.alpha))) && FLTPigeonDeepEquals(self.anchor, other.anchor) && self.consumeTapEvents == other.consumeTapEvents && self.draggable == other.draggable && self.flat == other.flat && FLTPigeonDeepEquals(self.icon, other.icon) && FLTPigeonDeepEquals(self.infoWindow, other.infoWindow) && FLTPigeonDeepEquals(self.position, other.position) && (self.rotation == other.rotation || (isnan(self.rotation) && isnan(other.rotation))) && self.visible == other.visible && self.zIndex == other.zIndex && FLTPigeonDeepEquals(self.markerId, other.markerId) && FLTPigeonDeepEquals(self.clusterManagerId, other.clusterManagerId) && FLTPigeonDeepEquals(self.collisionBehavior, other.collisionBehavior); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.alpha) ? (NSUInteger)0x7FF8000000000000 : @(self.alpha).hash); + result = result * 31 + FLTPigeonDeepHash(self.anchor); + result = result * 31 + @(self.consumeTapEvents).hash; + result = result * 31 + @(self.draggable).hash; + result = result * 31 + @(self.flat).hash; + result = result * 31 + FLTPigeonDeepHash(self.icon); + result = result * 31 + FLTPigeonDeepHash(self.infoWindow); + result = result * 31 + FLTPigeonDeepHash(self.position); + result = result * 31 + (isnan(self.rotation) ? (NSUInteger)0x7FF8000000000000 : @(self.rotation).hash); + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.zIndex).hash; + result = result * 31 + FLTPigeonDeepHash(self.markerId); + result = result * 31 + FLTPigeonDeepHash(self.clusterManagerId); + result = result * 31 + FLTPigeonDeepHash(self.collisionBehavior); + return result; +} @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; @@ -960,20 +1422,45 @@ + (nullable FGMPlatformPolygon *)nullableFromList:(NSArray *)list { @(self.zIndex), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformPolygon *other = (FGMPlatformPolygon *)object; + return FLTPigeonDeepEquals(self.polygonId, other.polygonId) && self.consumesTapEvents == other.consumesTapEvents && FLTPigeonDeepEquals(self.fillColor, other.fillColor) && self.geodesic == other.geodesic && FLTPigeonDeepEquals(self.points, other.points) && FLTPigeonDeepEquals(self.holes, other.holes) && self.visible == other.visible && FLTPigeonDeepEquals(self.strokeColor, other.strokeColor) && self.strokeWidth == other.strokeWidth && self.zIndex == other.zIndex; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.polygonId); + result = result * 31 + @(self.consumesTapEvents).hash; + result = result * 31 + FLTPigeonDeepHash(self.fillColor); + result = result * 31 + @(self.geodesic).hash; + result = result * 31 + FLTPigeonDeepHash(self.points); + result = result * 31 + FLTPigeonDeepHash(self.holes); + result = result * 31 + @(self.visible).hash; + result = result * 31 + FLTPigeonDeepHash(self.strokeColor); + result = result * 31 + @(self.strokeWidth).hash; + result = result * 31 + @(self.zIndex).hash; + return result; +} @end @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; @@ -1018,19 +1505,44 @@ + (nullable FGMPlatformPolyline *)nullableFromList:(NSArray *)list { @(self.zIndex), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformPolyline *other = (FGMPlatformPolyline *)object; + return FLTPigeonDeepEquals(self.polylineId, other.polylineId) && self.consumesTapEvents == other.consumesTapEvents && FLTPigeonDeepEquals(self.color, other.color) && self.geodesic == other.geodesic && self.jointType == other.jointType && FLTPigeonDeepEquals(self.patterns, other.patterns) && FLTPigeonDeepEquals(self.points, other.points) && self.visible == other.visible && self.width == other.width && self.zIndex == other.zIndex; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.polylineId); + result = result * 31 + @(self.consumesTapEvents).hash; + result = result * 31 + FLTPigeonDeepHash(self.color); + result = result * 31 + @(self.geodesic).hash; + result = result * 31 + @(self.jointType).hash; + result = result * 31 + FLTPigeonDeepHash(self.patterns); + result = result * 31 + FLTPigeonDeepHash(self.points); + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.width).hash; + result = result * 31 + @(self.zIndex).hash; + return result; +} @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; @@ -1044,13 +1556,30 @@ + (nullable FGMPlatformPatternItem *)nullableFromList:(NSArray *)list { self.length ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformPatternItem *other = (FGMPlatformPatternItem *)object; + return self.type == other.type && FLTPigeonDeepEquals(self.length, other.length); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.type).hash; + result = result * 31 + FLTPigeonDeepHash(self.length); + return result; +} @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; @@ -1073,16 +1602,34 @@ + (nullable FGMPlatformTile *)nullableFromList:(NSArray *)list { self.data ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformTile *other = (FGMPlatformTile *)object; + return self.width == other.width && self.height == other.height && FLTPigeonDeepEquals(self.data, other.data); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.width).hash; + result = result * 31 + @(self.height).hash; + result = result * 31 + FLTPigeonDeepHash(self.data); + return result; +} @end @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; @@ -1114,14 +1661,35 @@ + (nullable FGMPlatformTileOverlay *)nullableFromList:(NSArray *)list { @(self.tileSize), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformTileOverlay *other = (FGMPlatformTileOverlay *)object; + return FLTPigeonDeepEquals(self.tileOverlayId, other.tileOverlayId) && self.fadeIn == other.fadeIn && (self.transparency == other.transparency || (isnan(self.transparency) && isnan(other.transparency))) && self.zIndex == other.zIndex && self.visible == other.visible && self.tileSize == other.tileSize; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.tileOverlayId); + result = result * 31 + @(self.fadeIn).hash; + result = result * 31 + (isnan(self.transparency) ? (NSUInteger)0x7FF8000000000000 : @(self.transparency).hash); + result = result * 31 + @(self.zIndex).hash; + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.tileSize).hash; + return result; +} @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; @@ -1147,11 +1715,31 @@ + (nullable FGMPlatformEdgeInsets *)nullableFromList:(NSArray *)list { @(self.right), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformEdgeInsets *other = (FGMPlatformEdgeInsets *)object; + return (self.top == other.top || (isnan(self.top) && isnan(other.top))) && (self.bottom == other.bottom || (isnan(self.bottom) && isnan(other.bottom))) && (self.left == other.left || (isnan(self.left) && isnan(other.left))) && (self.right == other.right || (isnan(self.right) && isnan(other.right))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.top) ? (NSUInteger)0x7FF8000000000000 : @(self.top).hash); + result = result * 31 + (isnan(self.bottom) ? (NSUInteger)0x7FF8000000000000 : @(self.bottom).hash); + result = result * 31 + (isnan(self.left) ? (NSUInteger)0x7FF8000000000000 : @(self.left).hash); + result = result * 31 + (isnan(self.right) ? (NSUInteger)0x7FF8000000000000 : @(self.right).hash); + return result; +} @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; @@ -1171,12 +1759,29 @@ + (nullable FGMPlatformLatLng *)nullableFromList:(NSArray *)list { @(self.longitude), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformLatLng *other = (FGMPlatformLatLng *)object; + return (self.latitude == other.latitude || (isnan(self.latitude) && isnan(other.latitude))) && (self.longitude == other.longitude || (isnan(self.longitude) && isnan(other.longitude))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.latitude) ? (NSUInteger)0x7FF8000000000000 : @(self.latitude).hash); + result = result * 31 + (isnan(self.longitude) ? (NSUInteger)0x7FF8000000000000 : @(self.longitude).hash); + return result; +} @end @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; @@ -1196,11 +1801,28 @@ + (nullable FGMPlatformLatLngBounds *)nullableFromList:(NSArray *)list { self.southwest ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformLatLngBounds *other = (FGMPlatformLatLngBounds *)object; + return FLTPigeonDeepEquals(self.northeast, other.northeast) && FLTPigeonDeepEquals(self.southwest, other.southwest); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.northeast); + result = result * 31 + FLTPigeonDeepHash(self.southwest); + return result; +} @end @implementation FGMPlatformCameraTargetBounds + (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds { - FGMPlatformCameraTargetBounds *pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init]; + FGMPlatformCameraTargetBounds* pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init]; pigeonResult.bounds = bounds; return pigeonResult; } @@ -1217,21 +1839,37 @@ + (nullable FGMPlatformCameraTargetBounds *)nullableFromList:(NSArray *)list self.bounds ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraTargetBounds *other = (FGMPlatformCameraTargetBounds *)object; + return FLTPigeonDeepEquals(self.bounds, other.bounds); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.bounds); + return result; +} @end @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; @@ -1278,21 +1916,46 @@ + (nullable FGMPlatformGroundOverlay *)nullableFromList:(NSArray *)list { self.zoomLevel ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformGroundOverlay *other = (FGMPlatformGroundOverlay *)object; + return FLTPigeonDeepEquals(self.groundOverlayId, other.groundOverlayId) && FLTPigeonDeepEquals(self.image, other.image) && FLTPigeonDeepEquals(self.position, other.position) && FLTPigeonDeepEquals(self.bounds, other.bounds) && FLTPigeonDeepEquals(self.anchor, other.anchor) && (self.transparency == other.transparency || (isnan(self.transparency) && isnan(other.transparency))) && (self.bearing == other.bearing || (isnan(self.bearing) && isnan(other.bearing))) && self.zIndex == other.zIndex && self.visible == other.visible && self.clickable == other.clickable && FLTPigeonDeepEquals(self.zoomLevel, other.zoomLevel); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.groundOverlayId); + result = result * 31 + FLTPigeonDeepHash(self.image); + result = result * 31 + FLTPigeonDeepHash(self.position); + result = result * 31 + FLTPigeonDeepHash(self.bounds); + result = result * 31 + FLTPigeonDeepHash(self.anchor); + result = result * 31 + (isnan(self.transparency) ? (NSUInteger)0x7FF8000000000000 : @(self.transparency).hash); + result = result * 31 + (isnan(self.bearing) ? (NSUInteger)0x7FF8000000000000 : @(self.bearing).hash); + result = result * 31 + @(self.zIndex).hash; + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.clickable).hash; + result = result * 31 + FLTPigeonDeepHash(self.zoomLevel); + return result; +} @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; @@ -1336,28 +1999,53 @@ + (nullable FGMPlatformMapViewCreationParams *)nullableFromList:(NSArray *)l self.initialGroundOverlays ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformMapViewCreationParams *other = (FGMPlatformMapViewCreationParams *)object; + return FLTPigeonDeepEquals(self.initialCameraPosition, other.initialCameraPosition) && FLTPigeonDeepEquals(self.mapConfiguration, other.mapConfiguration) && FLTPigeonDeepEquals(self.initialCircles, other.initialCircles) && FLTPigeonDeepEquals(self.initialMarkers, other.initialMarkers) && FLTPigeonDeepEquals(self.initialPolygons, other.initialPolygons) && FLTPigeonDeepEquals(self.initialPolylines, other.initialPolylines) && FLTPigeonDeepEquals(self.initialHeatmaps, other.initialHeatmaps) && FLTPigeonDeepEquals(self.initialTileOverlays, other.initialTileOverlays) && FLTPigeonDeepEquals(self.initialClusterManagers, other.initialClusterManagers) && FLTPigeonDeepEquals(self.initialGroundOverlays, other.initialGroundOverlays); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.initialCameraPosition); + result = result * 31 + FLTPigeonDeepHash(self.mapConfiguration); + result = result * 31 + FLTPigeonDeepHash(self.initialCircles); + result = result * 31 + FLTPigeonDeepHash(self.initialMarkers); + result = result * 31 + FLTPigeonDeepHash(self.initialPolygons); + result = result * 31 + FLTPigeonDeepHash(self.initialPolylines); + result = result * 31 + FLTPigeonDeepHash(self.initialHeatmaps); + result = result * 31 + FLTPigeonDeepHash(self.initialTileOverlays); + result = result * 31 + FLTPigeonDeepHash(self.initialClusterManagers); + result = result * 31 + FLTPigeonDeepHash(self.initialGroundOverlays); + return result; +} @end @implementation FGMPlatformMapConfiguration + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - markerType:(FGMPlatformMarkerType)markerType - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style { - FGMPlatformMapConfiguration *pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + markerType:(FGMPlatformMarkerType)markerType + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style { + FGMPlatformMapConfiguration* pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; pigeonResult.compassEnabled = compassEnabled; pigeonResult.cameraTargetBounds = cameraTargetBounds; pigeonResult.mapType = mapType; @@ -1426,11 +2114,45 @@ + (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray *)list { self.style ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformMapConfiguration *other = (FGMPlatformMapConfiguration *)object; + return FLTPigeonDeepEquals(self.compassEnabled, other.compassEnabled) && FLTPigeonDeepEquals(self.cameraTargetBounds, other.cameraTargetBounds) && FLTPigeonDeepEquals(self.mapType, other.mapType) && FLTPigeonDeepEquals(self.minMaxZoomPreference, other.minMaxZoomPreference) && FLTPigeonDeepEquals(self.rotateGesturesEnabled, other.rotateGesturesEnabled) && FLTPigeonDeepEquals(self.scrollGesturesEnabled, other.scrollGesturesEnabled) && FLTPigeonDeepEquals(self.tiltGesturesEnabled, other.tiltGesturesEnabled) && FLTPigeonDeepEquals(self.trackCameraPosition, other.trackCameraPosition) && FLTPigeonDeepEquals(self.zoomGesturesEnabled, other.zoomGesturesEnabled) && FLTPigeonDeepEquals(self.myLocationEnabled, other.myLocationEnabled) && FLTPigeonDeepEquals(self.myLocationButtonEnabled, other.myLocationButtonEnabled) && FLTPigeonDeepEquals(self.padding, other.padding) && FLTPigeonDeepEquals(self.indoorViewEnabled, other.indoorViewEnabled) && FLTPigeonDeepEquals(self.trafficEnabled, other.trafficEnabled) && FLTPigeonDeepEquals(self.buildingsEnabled, other.buildingsEnabled) && self.markerType == other.markerType && FLTPigeonDeepEquals(self.mapId, other.mapId) && FLTPigeonDeepEquals(self.style, other.style); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.compassEnabled); + result = result * 31 + FLTPigeonDeepHash(self.cameraTargetBounds); + result = result * 31 + FLTPigeonDeepHash(self.mapType); + result = result * 31 + FLTPigeonDeepHash(self.minMaxZoomPreference); + result = result * 31 + FLTPigeonDeepHash(self.rotateGesturesEnabled); + result = result * 31 + FLTPigeonDeepHash(self.scrollGesturesEnabled); + result = result * 31 + FLTPigeonDeepHash(self.tiltGesturesEnabled); + result = result * 31 + FLTPigeonDeepHash(self.trackCameraPosition); + result = result * 31 + FLTPigeonDeepHash(self.zoomGesturesEnabled); + result = result * 31 + FLTPigeonDeepHash(self.myLocationEnabled); + result = result * 31 + FLTPigeonDeepHash(self.myLocationButtonEnabled); + result = result * 31 + FLTPigeonDeepHash(self.padding); + result = result * 31 + FLTPigeonDeepHash(self.indoorViewEnabled); + result = result * 31 + FLTPigeonDeepHash(self.trafficEnabled); + result = result * 31 + FLTPigeonDeepHash(self.buildingsEnabled); + result = result * 31 + @(self.markerType).hash; + result = result * 31 + FLTPigeonDeepHash(self.mapId); + result = result * 31 + FLTPigeonDeepHash(self.style); + return result; +} @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; @@ -1450,11 +2172,29 @@ + (nullable FGMPlatformPoint *)nullableFromList:(NSArray *)list { @(self.y), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformPoint *other = (FGMPlatformPoint *)object; + return (self.x == other.x || (isnan(self.x) && isnan(other.x))) && (self.y == other.y || (isnan(self.y) && isnan(other.y))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.x) ? (NSUInteger)0x7FF8000000000000 : @(self.x).hash); + result = result * 31 + (isnan(self.y) ? (NSUInteger)0x7FF8000000000000 : @(self.y).hash); + return result; +} @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; @@ -1474,11 +2214,31 @@ + (nullable FGMPlatformSize *)nullableFromList:(NSArray *)list { @(self.height), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformSize *other = (FGMPlatformSize *)object; + return (self.width == other.width || (isnan(self.width) && isnan(other.width))) && (self.height == other.height || (isnan(self.height) && isnan(other.height))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.width) ? (NSUInteger)0x7FF8000000000000 : @(self.width).hash); + result = result * 31 + (isnan(self.height) ? (NSUInteger)0x7FF8000000000000 : @(self.height).hash); + return result; +} @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; @@ -1504,14 +2264,33 @@ + (nullable FGMPlatformColor *)nullableFromList:(NSArray *)list { @(self.alpha), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformColor *other = (FGMPlatformColor *)object; + return (self.red == other.red || (isnan(self.red) && isnan(other.red))) && (self.green == other.green || (isnan(self.green) && isnan(other.green))) && (self.blue == other.blue || (isnan(self.blue) && isnan(other.blue))) && (self.alpha == other.alpha || (isnan(self.alpha) && isnan(other.alpha))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.red) ? (NSUInteger)0x7FF8000000000000 : @(self.red).hash); + result = result * 31 + (isnan(self.green) ? (NSUInteger)0x7FF8000000000000 : @(self.green).hash); + result = result * 31 + (isnan(self.blue) ? (NSUInteger)0x7FF8000000000000 : @(self.blue).hash); + result = result * 31 + (isnan(self.alpha) ? (NSUInteger)0x7FF8000000000000 : @(self.alpha).hash); + return result; +} @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; @@ -1537,11 +2316,31 @@ + (nullable FGMPlatformTileLayer *)nullableFromList:(NSArray *)list { @(self.zIndex), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformTileLayer *other = (FGMPlatformTileLayer *)object; + return self.visible == other.visible && self.fadeIn == other.fadeIn && (self.opacity == other.opacity || (isnan(self.opacity) && isnan(other.opacity))) && self.zIndex == other.zIndex; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.fadeIn).hash; + result = result * 31 + (isnan(self.opacity) ? (NSUInteger)0x7FF8000000000000 : @(self.opacity).hash); + result = result * 31 + @(self.zIndex).hash; + return result; +} @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; @@ -1561,11 +2360,28 @@ + (nullable FGMPlatformZoomRange *)nullableFromList:(NSArray *)list { self.max ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformZoomRange *other = (FGMPlatformZoomRange *)object; + return FLTPigeonDeepEquals(self.min, other.min) && FLTPigeonDeepEquals(self.max, other.max); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.min); + result = result * 31 + FLTPigeonDeepHash(self.max); + return result; +} @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; } @@ -1582,11 +2398,27 @@ + (nullable FGMPlatformBitmap *)nullableFromList:(NSArray *)list { self.bitmap ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmap *other = (FGMPlatformBitmap *)object; + return FLTPigeonDeepEquals(self.bitmap, other.bitmap); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.bitmap); + return result; +} @end @implementation FGMPlatformBitmapDefaultMarker + (instancetype)makeWithHue:(nullable NSNumber *)hue { - FGMPlatformBitmapDefaultMarker *pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init]; + FGMPlatformBitmapDefaultMarker* pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init]; pigeonResult.hue = hue; return pigeonResult; } @@ -1603,12 +2435,28 @@ + (nullable FGMPlatformBitmapDefaultMarker *)nullableFromList:(NSArray *)lis self.hue ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapDefaultMarker *other = (FGMPlatformBitmapDefaultMarker *)object; + return FLTPigeonDeepEquals(self.hue, other.hue); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.hue); + return result; +} @end @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; @@ -1628,11 +2476,29 @@ + (nullable FGMPlatformBitmapBytes *)nullableFromList:(NSArray *)list { self.size ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapBytes *other = (FGMPlatformBitmapBytes *)object; + return FLTPigeonDeepEquals(self.byteData, other.byteData) && FLTPigeonDeepEquals(self.size, other.size); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.byteData); + result = result * 31 + FLTPigeonDeepHash(self.size); + return result; +} @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; @@ -1652,13 +2518,30 @@ + (nullable FGMPlatformBitmapAsset *)nullableFromList:(NSArray *)list { self.pkg ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapAsset *other = (FGMPlatformBitmapAsset *)object; + return FLTPigeonDeepEquals(self.name, other.name) && FLTPigeonDeepEquals(self.pkg, other.pkg); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.name); + result = result * 31 + FLTPigeonDeepHash(self.pkg); + return result; +} @end @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; @@ -1681,15 +2564,33 @@ + (nullable FGMPlatformBitmapAssetImage *)nullableFromList:(NSArray *)list { self.size ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapAssetImage *other = (FGMPlatformBitmapAssetImage *)object; + return FLTPigeonDeepEquals(self.name, other.name) && (self.scale == other.scale || (isnan(self.scale) && isnan(other.scale))) && FLTPigeonDeepEquals(self.size, other.size); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.name); + result = result * 31 + (isnan(self.scale) ? (NSUInteger)0x7FF8000000000000 : @(self.scale).hash); + result = result * 31 + FLTPigeonDeepHash(self.size); + return result; +} @end @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,8 +2601,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); @@ -1720,15 +2620,35 @@ + (nullable FGMPlatformBitmapAssetMap *)nullableFromList:(NSArray *)list { self.height ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapAssetMap *other = (FGMPlatformBitmapAssetMap *)object; + return FLTPigeonDeepEquals(self.assetName, other.assetName) && self.bitmapScaling == other.bitmapScaling && (self.imagePixelRatio == other.imagePixelRatio || (isnan(self.imagePixelRatio) && isnan(other.imagePixelRatio))) && FLTPigeonDeepEquals(self.width, other.width) && FLTPigeonDeepEquals(self.height, other.height); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.assetName); + result = result * 31 + @(self.bitmapScaling).hash; + result = result * 31 + (isnan(self.imagePixelRatio) ? (NSUInteger)0x7FF8000000000000 : @(self.imagePixelRatio).hash); + result = result * 31 + FLTPigeonDeepHash(self.width); + result = result * 31 + FLTPigeonDeepHash(self.height); + return result; +} @end @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; @@ -1739,8 +2659,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); @@ -1759,16 +2678,36 @@ + (nullable FGMPlatformBitmapBytesMap *)nullableFromList:(NSArray *)list { self.height ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapBytesMap *other = (FGMPlatformBitmapBytesMap *)object; + return FLTPigeonDeepEquals(self.byteData, other.byteData) && self.bitmapScaling == other.bitmapScaling && (self.imagePixelRatio == other.imagePixelRatio || (isnan(self.imagePixelRatio) && isnan(other.imagePixelRatio))) && FLTPigeonDeepEquals(self.width, other.width) && FLTPigeonDeepEquals(self.height, other.height); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.byteData); + result = result * 31 + @(self.bitmapScaling).hash; + result = result * 31 + (isnan(self.imagePixelRatio) ? (NSUInteger)0x7FF8000000000000 : @(self.imagePixelRatio).hash); + result = result * 31 + FLTPigeonDeepHash(self.width); + result = result * 31 + FLTPigeonDeepHash(self.height); + return result; +} @end @implementation FGMPlatformBitmapPinConfig + (instancetype)makeWithBackgroundColor:(nullable FGMPlatformColor *)backgroundColor - borderColor:(nullable FGMPlatformColor *)borderColor - glyphColor:(nullable FGMPlatformColor *)glyphColor - glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor - glyphText:(nullable NSString *)glyphText - glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap { - FGMPlatformBitmapPinConfig *pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init]; + borderColor:(nullable FGMPlatformColor *)borderColor + glyphColor:(nullable FGMPlatformColor *)glyphColor + glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor + glyphText:(nullable NSString *)glyphText + glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap { + FGMPlatformBitmapPinConfig* pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init]; pigeonResult.backgroundColor = backgroundColor; pigeonResult.borderColor = borderColor; pigeonResult.glyphColor = glyphColor; @@ -1800,6 +2739,27 @@ + (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray *)list { self.glyphBitmap ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapPinConfig *other = (FGMPlatformBitmapPinConfig *)object; + return FLTPigeonDeepEquals(self.backgroundColor, other.backgroundColor) && FLTPigeonDeepEquals(self.borderColor, other.borderColor) && FLTPigeonDeepEquals(self.glyphColor, other.glyphColor) && FLTPigeonDeepEquals(self.glyphTextColor, other.glyphTextColor) && FLTPigeonDeepEquals(self.glyphText, other.glyphText) && FLTPigeonDeepEquals(self.glyphBitmap, other.glyphBitmap); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.backgroundColor); + result = result * 31 + FLTPigeonDeepHash(self.borderColor); + result = result * 31 + FLTPigeonDeepHash(self.glyphColor); + result = result * 31 + FLTPigeonDeepHash(self.glyphTextColor); + result = result * 31 + FLTPigeonDeepHash(self.glyphText); + result = result * 31 + FLTPigeonDeepHash(self.glyphBitmap); + return result; +} @end @interface FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReader : FlutterStandardReader @@ -1809,125 +2769,115 @@ - (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 - : [[FGMPlatformMarkerCollisionBehaviorBox alloc] - initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformMarkerCollisionBehaviorBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 131: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil - ? nil - : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 132: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil - : [[FGMPlatformPatternItemTypeBox alloc] - initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformPatternItemTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 133: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil - ? nil - : [[FGMPlatformMarkerTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformMarkerTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 134: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil - : [[FGMPlatformMapBitmapScalingBox alloc] - initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformMapBitmapScalingBox alloc] initWithValue:[enumAsNumber integerValue]]; } - case 135: + case 135: return [FGMPlatformCameraPosition fromList:[self readValue]]; - case 136: + case 136: return [FGMPlatformCameraUpdate fromList:[self readValue]]; - case 137: + case 137: return [FGMPlatformCameraUpdateNewCameraPosition fromList:[self readValue]]; - case 138: + case 138: return [FGMPlatformCameraUpdateNewLatLng fromList:[self readValue]]; - case 139: + case 139: return [FGMPlatformCameraUpdateNewLatLngBounds fromList:[self readValue]]; - case 140: + case 140: + return [FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets fromList:[self readValue]]; + case 141: return [FGMPlatformCameraUpdateNewLatLngZoom fromList:[self readValue]]; - case 141: + case 142: return [FGMPlatformCameraUpdateScrollBy fromList:[self readValue]]; - case 142: + case 143: return [FGMPlatformCameraUpdateZoomBy fromList:[self readValue]]; - case 143: + case 144: return [FGMPlatformCameraUpdateZoom fromList:[self readValue]]; - case 144: + case 145: return [FGMPlatformCameraUpdateZoomTo fromList:[self readValue]]; - case 145: + case 146: return [FGMPlatformCircle fromList:[self readValue]]; - case 146: + case 147: return [FGMPlatformHeatmap fromList:[self readValue]]; - case 147: + case 148: return [FGMPlatformHeatmapGradient fromList:[self readValue]]; - case 148: + case 149: return [FGMPlatformWeightedLatLng fromList:[self readValue]]; - case 149: + case 150: return [FGMPlatformInfoWindow fromList:[self readValue]]; - case 150: + case 151: return [FGMPlatformCluster fromList:[self readValue]]; - case 151: + case 152: return [FGMPlatformClusterManager fromList:[self readValue]]; - case 152: + case 153: return [FGMPlatformMarker fromList:[self readValue]]; - case 153: + case 154: return [FGMPlatformPolygon fromList:[self readValue]]; - case 154: + case 155: return [FGMPlatformPolyline fromList:[self readValue]]; - case 155: + case 156: return [FGMPlatformPatternItem fromList:[self readValue]]; - case 156: + case 157: return [FGMPlatformTile fromList:[self readValue]]; - case 157: + case 158: return [FGMPlatformTileOverlay fromList:[self readValue]]; - case 158: + case 159: return [FGMPlatformEdgeInsets fromList:[self readValue]]; - case 159: + case 160: return [FGMPlatformLatLng fromList:[self readValue]]; - case 160: + case 161: return [FGMPlatformLatLngBounds fromList:[self readValue]]; - case 161: + case 162: return [FGMPlatformCameraTargetBounds fromList:[self readValue]]; - case 162: + case 163: return [FGMPlatformGroundOverlay fromList:[self readValue]]; - case 163: + case 164: return [FGMPlatformMapViewCreationParams fromList:[self readValue]]; - case 164: + case 165: return [FGMPlatformMapConfiguration fromList:[self readValue]]; - case 165: + case 166: return [FGMPlatformPoint fromList:[self readValue]]; - case 166: + case 167: return [FGMPlatformSize fromList:[self readValue]]; - case 167: + case 168: return [FGMPlatformColor fromList:[self readValue]]; - case 168: + case 169: return [FGMPlatformTileLayer fromList:[self readValue]]; - case 169: + case 170: return [FGMPlatformZoomRange fromList:[self readValue]]; - case 170: + case 171: return [FGMPlatformBitmap fromList:[self readValue]]; - case 171: + case 172: return [FGMPlatformBitmapDefaultMarker fromList:[self readValue]]; - case 172: + case 173: return [FGMPlatformBitmapBytes fromList:[self readValue]]; - case 173: + case 174: return [FGMPlatformBitmapAsset fromList:[self readValue]]; - case 174: + case 175: return [FGMPlatformBitmapAssetImage fromList:[self readValue]]; - case 175: + case 176: return [FGMPlatformBitmapAssetMap fromList:[self readValue]]; - case 176: + case 177: return [FGMPlatformBitmapBytesMap fromList:[self readValue]]; - case 177: + case 178: return [FGMPlatformBitmapPinConfig fromList:[self readValue]]; default: return [super readValueOfType:type]; @@ -1978,120 +2928,123 @@ - (void)writeValue:(id)value { } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngBounds class]]) { [self writeByte:139]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngZoom class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets class]]) { [self writeByte:140]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateScrollBy class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngZoom class]]) { [self writeByte:141]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomBy class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateScrollBy class]]) { [self writeByte:142]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoom class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomBy class]]) { [self writeByte:143]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomTo class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoom class]]) { [self writeByte:144]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCircle class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomTo class]]) { [self writeByte:145]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformHeatmap class]]) { + } else if ([value isKindOfClass:[FGMPlatformCircle class]]) { [self writeByte:146]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformHeatmapGradient class]]) { + } else if ([value isKindOfClass:[FGMPlatformHeatmap class]]) { [self writeByte:147]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformWeightedLatLng class]]) { + } else if ([value isKindOfClass:[FGMPlatformHeatmapGradient class]]) { [self writeByte:148]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformInfoWindow class]]) { + } else if ([value isKindOfClass:[FGMPlatformWeightedLatLng class]]) { [self writeByte:149]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCluster class]]) { + } else if ([value isKindOfClass:[FGMPlatformInfoWindow class]]) { [self writeByte:150]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformClusterManager class]]) { + } else if ([value isKindOfClass:[FGMPlatformCluster class]]) { [self writeByte:151]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformMarker class]]) { + } else if ([value isKindOfClass:[FGMPlatformClusterManager class]]) { [self writeByte:152]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) { + } else if ([value isKindOfClass:[FGMPlatformMarker class]]) { [self writeByte:153]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) { + } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) { [self writeByte:154]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) { + } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) { [self writeByte:155]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTile class]]) { + } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) { [self writeByte:156]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) { + } else if ([value isKindOfClass:[FGMPlatformTile class]]) { [self writeByte:157]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) { + } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) { [self writeByte:158]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) { + } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) { [self writeByte:159]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) { + } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) { [self writeByte:160]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) { + } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) { [self writeByte:161]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) { [self writeByte:162]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) { + } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) { [self writeByte:163]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) { + } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) { [self writeByte:164]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPoint class]]) { + } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) { [self writeByte:165]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformSize class]]) { + } else if ([value isKindOfClass:[FGMPlatformPoint class]]) { [self writeByte:166]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformColor class]]) { + } else if ([value isKindOfClass:[FGMPlatformSize class]]) { [self writeByte:167]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) { + } else if ([value isKindOfClass:[FGMPlatformColor class]]) { [self writeByte:168]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) { + } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) { [self writeByte:169]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) { + } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) { [self writeByte:170]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) { [self writeByte:171]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) { [self writeByte:172]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) { [self writeByte:173]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) { [self writeByte:174]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) { [self writeByte:175]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) { [self writeByte:176]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapPinConfig class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) { [self writeByte:177]; [self writeValue:[value toList]]; + } else if ([value isKindOfClass:[FGMPlatformBitmapPinConfig class]]) { + [self writeByte:178]; + [self writeValue:[value toList]]; } else { [super writeValue:value]; } @@ -2113,8 +3066,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; @@ -2123,24 +3075,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]; @@ -2155,18 +3100,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); @@ -2180,29 +3120,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 { @@ -2211,28 +3142,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 { @@ -2241,18 +3164,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); @@ -2267,29 +3185,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 { @@ -2298,28 +3207,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 { @@ -2328,29 +3229,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 { @@ -2359,29 +3251,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 { @@ -2390,29 +3273,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 { @@ -2421,18 +3295,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); @@ -2446,25 +3315,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 { @@ -2473,16 +3335,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]; @@ -2495,18 +3354,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); @@ -2521,27 +3375,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 { @@ -2550,17 +3396,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]; @@ -2572,18 +3414,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); @@ -2597,18 +3434,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); @@ -2623,25 +3455,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 { @@ -2654,17 +3479,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); @@ -2682,16 +3503,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]; @@ -2703,18 +3521,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); @@ -2728,17 +3541,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]; @@ -2750,17 +3559,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Returns true if the map supports advanced markers. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.isAdvancedMarkersAvailable", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isAdvancedMarkersAvailable:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(isAdvancedMarkersAvailable:)", - api); + NSCAssert([api respondsToSelector:@selector(isAdvancedMarkersAvailable:)], @"FGMMapsApi api (%@) doesn't respond to @selector(isAdvancedMarkersAvailable:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isAdvancedMarkersAvailable:&error]; @@ -2781,450 +3586,335 @@ @implementation FGMMapsCallbackApi - (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger { return [self initWithBinaryMessenger:binaryMessenger messageChannelSuffix:@""]; } -- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger - messageChannelSuffix:(nullable NSString *)messageChannelSuffix { +- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger messageChannelSuffix:(nullable NSString*)messageChannelSuffix{ self = [self init]; if (self) { _binaryMessenger = binaryMessenger; - _messageChannelSuffix = [messageChannelSuffix length] == 0 - ? @"" - : [NSString stringWithFormat:@".%@", messageChannelSuffix]; + _messageChannelSuffix = [messageChannelSuffix length] == 0 ? @"" : [NSString stringWithFormat: @".%@", messageChannelSuffix]; } return self; } - (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted", - _messageChannelSuffix]; - 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)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_groundOverlayId ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId location:(FGMPlatformPoint *)arg_location zoom:(NSInteger)arg_zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec: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); @@ -3237,30 +3927,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]; @@ -3271,18 +3951,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]; @@ -3293,18 +3968,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]; @@ -3315,18 +3985,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]; @@ -3337,18 +4002,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]; @@ -3359,18 +4019,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]; @@ -3381,18 +4036,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]; @@ -3403,18 +4053,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]; @@ -3425,24 +4070,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 { @@ -3450,24 +4089,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 { @@ -3475,18 +4108,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); @@ -3499,16 +4127,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]; @@ -3519,24 +4144,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 { @@ -3544,16 +4163,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_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/include/google_maps_flutter_ios_sdk9/google_maps_flutter_pigeon_messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/include/google_maps_flutter_ios_sdk9/google_maps_flutter_pigeon_messages.g.h index 053f0f577650..7917bbd64e66 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/include/google_maps_flutter_ios_sdk9/google_maps_flutter_pigeon_messages.g.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/include/google_maps_flutter_ios_sdk9/google_maps_flutter_pigeon_messages.g.h @@ -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.3.3), do not edit directly. // See also: https://pub.dev/packages/pigeon @import Foundation; @@ -28,7 +28,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapType) { - (instancetype)initWithValue:(FGMPlatformMapType)value; @end -/// Pigeon equivalent of MarkerCollisionBehavior. +/// Pigeon equivalent of the MarkerCollisionBehavior enum. typedef NS_ENUM(NSUInteger, FGMPlatformMarkerCollisionBehavior) { FGMPlatformMarkerCollisionBehaviorRequiredDisplay = 0, FGMPlatformMarkerCollisionBehaviorOptionalAndHidesLowerPriority = 1, @@ -95,6 +95,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @class FGMPlatformCameraUpdateNewCameraPosition; @class FGMPlatformCameraUpdateNewLatLng; @class FGMPlatformCameraUpdateNewLatLngBounds; +@class FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets; @class FGMPlatformCameraUpdateNewLatLngZoom; @class FGMPlatformCameraUpdateScrollBy; @class FGMPlatformCameraUpdateZoomBy; @@ -138,26 +139,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 @@ -165,7 +166,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 @@ -173,83 +174,97 @@ 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 NewLatLngBoundsWithEdgeInsets +@interface FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds + padding:(FGMPlatformEdgeInsets *)padding; +@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, strong) FGMPlatformEdgeInsets * 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. @@ -257,19 +272,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. @@ -281,20 +296,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. @@ -302,11 +318,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. @@ -314,13 +330,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. @@ -328,41 +344,41 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithIdentifier:(NSString *)identifier; -@property(nonatomic, copy) NSString *identifier; +@property(nonatomic, copy) NSString * identifier; @end /// Pigeon equivalent of the Marker class. @interface FGMPlatformMarker : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAlpha:(double)alpha - anchor:(FGMPlatformPoint *)anchor - consumeTapEvents:(BOOL)consumeTapEvents - draggable:(BOOL)draggable - flat:(BOOL)flat - icon:(FGMPlatformBitmap *)icon - infoWindow:(FGMPlatformInfoWindow *)infoWindow - position:(FGMPlatformLatLng *)position - rotation:(double)rotation - visible:(BOOL)visible - zIndex:(NSInteger)zIndex - markerId:(NSString *)markerId - clusterManagerId:(nullable NSString *)clusterManagerId - collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior; -@property(nonatomic, assign) double alpha; -@property(nonatomic, strong) FGMPlatformPoint *anchor; -@property(nonatomic, assign) BOOL consumeTapEvents; -@property(nonatomic, assign) BOOL draggable; -@property(nonatomic, assign) BOOL flat; -@property(nonatomic, strong) FGMPlatformBitmap *icon; -@property(nonatomic, strong) FGMPlatformInfoWindow *infoWindow; -@property(nonatomic, strong) FGMPlatformLatLng *position; -@property(nonatomic, assign) double rotation; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, copy) NSString *markerId; -@property(nonatomic, copy, nullable) NSString *clusterManagerId; -@property(nonatomic, strong, nullable) FGMPlatformMarkerCollisionBehaviorBox *collisionBehavior; ++ (instancetype)makeWithAlpha:(double )alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL )consumeTapEvents + draggable:(BOOL )draggable + flat:(BOOL )flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double )rotation + visible:(BOOL )visible + zIndex:(NSInteger )zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId + collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior; +@property(nonatomic, assign) double alpha; +@property(nonatomic, strong) FGMPlatformPoint * anchor; +@property(nonatomic, assign) BOOL consumeTapEvents; +@property(nonatomic, assign) BOOL draggable; +@property(nonatomic, assign) BOOL flat; +@property(nonatomic, strong) FGMPlatformBitmap * icon; +@property(nonatomic, strong) FGMPlatformInfoWindow * infoWindow; +@property(nonatomic, strong) FGMPlatformLatLng * position; +@property(nonatomic, assign) double rotation; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, copy) NSString * markerId; +@property(nonatomic, copy, nullable) NSString * clusterManagerId; +@property(nonatomic, strong, nullable) FGMPlatformMarkerCollisionBehaviorBox * collisionBehavior; @end /// Pigeon equivalent of the Polygon class. @@ -370,25 +386,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. @@ -396,48 +412,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. @@ -445,37 +462,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. @@ -483,9 +504,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. @@ -494,7 +515,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. @@ -502,54 +523,53 @@ 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. @@ -557,91 +577,97 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - markerType:(FGMPlatformMarkerType)markerType - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style; -@property(nonatomic, strong, nullable) NSNumber *compassEnabled; -@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds *cameraTargetBounds; -@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox *mapType; -@property(nonatomic, strong, nullable) FGMPlatformZoomRange *minMaxZoomPreference; -@property(nonatomic, strong, nullable) NSNumber *rotateGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *scrollGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *tiltGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *trackCameraPosition; -@property(nonatomic, strong, nullable) NSNumber *zoomGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *myLocationEnabled; -@property(nonatomic, strong, nullable) NSNumber *myLocationButtonEnabled; -@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets *padding; -@property(nonatomic, strong, nullable) NSNumber *indoorViewEnabled; -@property(nonatomic, strong, nullable) NSNumber *trafficEnabled; -@property(nonatomic, strong, nullable) NSNumber *buildingsEnabled; + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + markerType:(FGMPlatformMarkerType)markerType + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style; +@property(nonatomic, strong, nullable) NSNumber * compassEnabled; +@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds * cameraTargetBounds; +@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox * mapType; +@property(nonatomic, strong, nullable) FGMPlatformZoomRange * minMaxZoomPreference; +@property(nonatomic, strong, nullable) NSNumber * rotateGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * scrollGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * tiltGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * trackCameraPosition; +@property(nonatomic, strong, nullable) NSNumber * zoomGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * myLocationEnabled; +@property(nonatomic, strong, nullable) NSNumber * myLocationButtonEnabled; +@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets * padding; +@property(nonatomic, strong, nullable) NSNumber * indoorViewEnabled; +@property(nonatomic, strong, nullable) NSNumber * trafficEnabled; +@property(nonatomic, strong, nullable) NSNumber * buildingsEnabled; @property(nonatomic, assign) FGMPlatformMarkerType markerType; -@property(nonatomic, copy, nullable) NSString *mapId; -@property(nonatomic, copy, nullable) NSString *style; +@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 @@ -650,7 +676,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]. @@ -658,13 +684,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]. @@ -672,18 +698,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]. @@ -691,11 +718,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]. @@ -703,15 +730,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]. @@ -719,31 +746,31 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double)imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height; -@property(nonatomic, strong) FlutterStandardTypedData *byteData; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double )imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height; +@property(nonatomic, strong) FlutterStandardTypedData * byteData; @property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; -@property(nonatomic, assign) double imagePixelRatio; -@property(nonatomic, strong, nullable) NSNumber *width; -@property(nonatomic, strong, nullable) NSNumber *height; +@property(nonatomic, assign) double imagePixelRatio; +@property(nonatomic, strong, nullable) NSNumber * width; +@property(nonatomic, strong, nullable) NSNumber * height; @end /// Pigeon equivalent of [PinConfig]. @interface FGMPlatformBitmapPinConfig : NSObject + (instancetype)makeWithBackgroundColor:(nullable FGMPlatformColor *)backgroundColor - borderColor:(nullable FGMPlatformColor *)borderColor - glyphColor:(nullable FGMPlatformColor *)glyphColor - glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor - glyphText:(nullable NSString *)glyphText - glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap; -@property(nonatomic, strong, nullable) FGMPlatformColor *backgroundColor; -@property(nonatomic, strong, nullable) FGMPlatformColor *borderColor; -@property(nonatomic, strong, nullable) FGMPlatformColor *glyphColor; -@property(nonatomic, strong, nullable) FGMPlatformColor *glyphTextColor; -@property(nonatomic, copy, nullable) NSString *glyphText; -@property(nonatomic, strong, nullable) FGMPlatformBitmap *glyphBitmap; + borderColor:(nullable FGMPlatformColor *)borderColor + glyphColor:(nullable FGMPlatformColor *)glyphColor + glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor + glyphText:(nullable NSString *)glyphText + glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap; +@property(nonatomic, strong, nullable) FGMPlatformColor * backgroundColor; +@property(nonatomic, strong, nullable) FGMPlatformColor * borderColor; +@property(nonatomic, strong, nullable) FGMPlatformColor * glyphColor; +@property(nonatomic, strong, nullable) FGMPlatformColor * glyphTextColor; +@property(nonatomic, copy, nullable) NSString * glyphText; +@property(nonatomic, strong, nullable) FGMPlatformBitmap * glyphBitmap; @end /// The codec used by all APIs. @@ -759,87 +786,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. /// @@ -853,97 +847,70 @@ 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; /// Returns true if the map supports advanced markers. /// /// @return `nil` only when `error != nil`. - (nullable NSNumber *)isAdvancedMarkersAvailable:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsApi(id binaryMessenger, - NSObject *_Nullable api); +extern void SetUpFGMMapsApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); -extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, - NSObject *_Nullable api, - NSString *messageChannelSuffix); /// Interface for calls from the native SDK to Dart. @interface FGMMapsCallbackApi : NSObject - (instancetype)initWithBinaryMessenger:(id)binaryMessenger; -- (instancetype)initWithBinaryMessenger:(id)binaryMessenger - messageChannelSuffix:(nullable NSString *)messageChannelSuffix; +- (instancetype)initWithBinaryMessenger:(id)binaryMessenger messageChannelSuffix:(nullable NSString *)messageChannelSuffix; /// Called when the map camera starts moving. - (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map camera moves. -- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition completion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map camera stops moving. - (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map, not a specifc map object, is tapped. -- (void)didTapAtPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map, not a specifc map object, is long pressed. -- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker is tapped. -- (void)didTapMarkerWithIdentifier:(NSString *)markerId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag starts. -- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag updates. -- (void)didDragMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag ends. -- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker's info window is tapped. -- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a circle is tapped. -- (void)didTapCircleWithIdentifier:(NSString *)circleId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapCircleWithIdentifier:(NSString *)circleId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker cluster is tapped. -- (void)didTapCluster:(FGMPlatformCluster *)cluster - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapCluster:(FGMPlatformCluster *)cluster completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a polygon is tapped. -- (void)didTapPolygonWithIdentifier:(NSString *)polygonId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPolygonWithIdentifier:(NSString *)polygonId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a polyline is tapped. -- (void)didTapPolylineWithIdentifier:(NSString *)polylineId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPolylineWithIdentifier:(NSString *)polylineId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a ground overlay is tapped. -- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion; /// Called to get data for a map tile. -- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId - location:(FGMPlatformPoint *)location - zoom:(NSInteger)zoom - completion:(void (^)(FGMPlatformTile *_Nullable, - FlutterError *_Nullable))completion; +- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId location:(FGMPlatformPoint *)location zoom:(NSInteger)zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion; @end + /// Dummy interface to force generation of the platform view creation params, /// which are not used in any Pigeon calls, only the platform view creation /// call made internally by Flutter. @protocol FGMMapsPlatformViewApi -- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type error:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, - NSObject *_Nullable api); +extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); -extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, - NSObject *_Nullable api, - NSString *messageChannelSuffix); /// Inspector API only intended for use in integration tests. @protocol FGMMapsInspectorApi @@ -963,29 +930,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_sdk9/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/lib/src/google_maps_flutter_ios.dart index c1709a97ad52..3840a3737daf 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/lib/src/google_maps_flutter_ios.dart @@ -886,6 +886,19 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { dy: update.dy, ), ); + case CameraUpdateType.newLatLngBoundsWithEdgeInsets: + update as CameraUpdateNewLatLngBoundsWithEdgeInsets; + return PlatformCameraUpdate( + cameraUpdate: PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets( + bounds: _platformLatLngBoundsFromLatLngBounds(update.bounds)!, + padding: PlatformEdgeInsets( + top: update.padding.top, + left: update.padding.left, + bottom: update.padding.bottom, + right: update.padding.right, + ), + ), + ); } } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/lib/src/messages.g.dart index 87fd64fcb0bc..24482c82ff61 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/lib/src/messages.g.dart @@ -1,28 +1,44 @@ // 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.3.3), 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: unused_import, unused_shown_name +// ignore_for_file: type=lint import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; +import 'dart:typed_data' show Float64List, Int32List, Int64List; -import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; import 'package:flutter/services.dart'; +import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; -PlatformException _createConnectionError(String channelName) { - return PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); +Object? _extractReplyValueOrThrow( + List? replyList, + String channelName, { + required bool isNullValid, +}) { + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel: "$channelName".', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } + return replyList.firstOrNull; } -List wrapResponse({ - Object? result, - PlatformException? error, - bool empty = false, -}) { + +List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { if (empty) { return []; } @@ -31,29 +47,79 @@ List wrapResponse({ } return [error.code, error.message, error.details]; } - bool _deepEquals(Object? a, Object? b) { + if (identical(a, b)) { + return true; + } + if (a is double && b is double) { + if (a.isNaN && b.isNaN) { + return true; + } + return a == 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]), - ); + if (a.length != b.length) { + return false; + } + for (final MapEntry entryA in a.entries) { + bool found = false; + for (final MapEntry entryB in b.entries) { + if (_deepEquals(entryA.key, entryB.key)) { + if (_deepEquals(entryA.value, entryB.value)) { + found = true; + break; + } else { + return false; + } + } + } + if (!found) { + return false; + } + } + return true; } return a == b; } +int _deepHash(Object? value) { + if (value is List) { + return Object.hashAll(value.map(_deepHash)); + } + if (value is Map) { + int result = 0; + for (final MapEntry entry in value.entries) { + result += (_deepHash(entry.key) * 31) ^ _deepHash(entry.value); + } + return result; + } + if (value is double && value.isNaN) { + // Normalize NaN to a consistent hash. + return 0x7FF8000000000000.hashCode; + } + if (value is double && value == 0.0) { + // Normalize -0.0 to 0.0 so they have the same hash code. + return 0.0.hashCode; + } + return value.hashCode; +} + + /// Pigeon equivalent of MapType -enum PlatformMapType { none, normal, satellite, terrain, hybrid } +enum PlatformMapType { + none, + normal, + satellite, + terrain, + hybrid, +} -/// Pigeon equivalent of MarkerCollisionBehavior. +/// Pigeon equivalent of the MarkerCollisionBehavior enum. enum PlatformMarkerCollisionBehavior { requiredDisplay, optionalAndHidesLowerPriority, @@ -61,15 +127,29 @@ enum PlatformMarkerCollisionBehavior { } /// 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, +} -enum PlatformMarkerType { marker, advancedMarker } +enum PlatformMarkerType { + marker, + advancedMarker, +} /// Pigeon equivalent of [MapBitmapScaling]. -enum PlatformMapBitmapScaling { auto, none } +enum PlatformMapBitmapScaling { + auto, + none, +} /// Pigeon representatation of a CameraPosition. class PlatformCameraPosition { @@ -89,12 +169,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; @@ -115,17 +199,19 @@ class PlatformCameraPosition { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(bearing, other.bearing) && _deepEquals(target, other.target) && _deepEquals(tilt, other.tilt) && _deepEquals(zoom, other.zoom); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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 @@ -134,16 +220,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 @@ -155,27 +244,30 @@ class PlatformCameraUpdate { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(cameraUpdate, other.cameraUpdate); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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,56 +279,59 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(cameraPosition, other.cameraPosition); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(latLng, other.latLng); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of NewLatLngBounds @@ -251,12 +346,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,36 +366,86 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(bounds, other.bounds) && _deepEquals(padding, other.padding); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); +} + +/// Pigeon equivalent of NewLatLngBoundsWithEdgeInsets +class PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets { + PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets({ + required this.bounds, + required this.padding, + }); + + PlatformLatLngBounds bounds; + + PlatformEdgeInsets padding; + + List _toList() { + return [ + bounds, + padding, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets decode(Object result) { + result as List; + return PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets( + bounds: result[0]! as PlatformLatLngBounds, + padding: result[1]! as PlatformEdgeInsets, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(bounds, other.bounds) && _deepEquals(padding, other.padding); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => _deepHash([runtimeType, ..._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,36 +458,40 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(latLng, other.latLng) && _deepEquals(zoom, other.zoom); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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,36 +504,40 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(dx, other.dx) && _deepEquals(dy, other.dy); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -395,93 +550,100 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(amount, other.amount) && _deepEquals(focus, other.focus); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(out, other.out); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(zoom, other.zoom); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Circle class. @@ -531,8 +693,7 @@ class PlatformCircle { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCircle decode(Object result) { result as List; @@ -558,12 +719,12 @@ class PlatformCircle { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(consumeTapEvents, other.consumeTapEvents) && _deepEquals(fillColor, other.fillColor) && _deepEquals(strokeColor, other.strokeColor) && _deepEquals(visible, other.visible) && _deepEquals(strokeWidth, other.strokeWidth) && _deepEquals(zIndex, other.zIndex) && _deepEquals(center, other.center) && _deepEquals(radius, other.radius) && _deepEquals(circleId, other.circleId); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Heatmap class. @@ -605,14 +766,13 @@ class PlatformHeatmap { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformHeatmap decode(Object result) { result as List; return PlatformHeatmap( heatmapId: result[0]! as String, - data: (result[1] as List?)!.cast(), + data: (result[1]! as List).cast(), gradient: result[2] as PlatformHeatmapGradient?, opacity: result[3]! as double, radius: result[4]! as int, @@ -630,12 +790,12 @@ class PlatformHeatmap { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(heatmapId, other.heatmapId) && _deepEquals(data, other.data) && _deepEquals(gradient, other.gradient) && _deepEquals(opacity, other.opacity) && _deepEquals(radius, other.radius) && _deepEquals(minimumZoomIntensity, other.minimumZoomIntensity) && _deepEquals(maximumZoomIntensity, other.maximumZoomIntensity); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the HeatmapGradient class. @@ -657,18 +817,21 @@ 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; return PlatformHeatmapGradient( - colors: (result[0] as List?)!.cast(), - startPoints: (result[1] as List?)!.cast(), + colors: (result[0]! as List).cast(), + startPoints: (result[1]! as List).cast(), colorMapSize: result[2]! as int, ); } @@ -682,29 +845,34 @@ class PlatformHeatmapGradient { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(colors, other.colors) && _deepEquals(startPoints, other.startPoints) && _deepEquals(colorMapSize, other.colorMapSize); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -723,17 +891,21 @@ class PlatformWeightedLatLng { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(point, other.point) && _deepEquals(weight, other.weight); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -742,12 +914,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; @@ -767,12 +942,12 @@ class PlatformInfoWindow { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(title, other.title) && _deepEquals(snippet, other.snippet) && _deepEquals(anchor, other.anchor); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of Cluster. @@ -793,12 +968,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; @@ -806,7 +985,7 @@ class PlatformCluster { clusterManagerId: result[0]! as String, position: result[1]! as PlatformLatLng, bounds: result[2]! as PlatformLatLngBounds, - markerIds: (result[3] as List?)!.cast(), + markerIds: (result[3]! as List).cast(), ); } @@ -819,31 +998,36 @@ class PlatformCluster { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(clusterManagerId, other.clusterManagerId) && _deepEquals(position, other.position) && _deepEquals(bounds, other.bounds) && _deepEquals(markerIds, other.markerIds); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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 @@ -855,12 +1039,12 @@ class PlatformClusterManager { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(identifier, other.identifier); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Marker class. @@ -930,8 +1114,7 @@ class PlatformMarker { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformMarker decode(Object result) { result as List; @@ -962,12 +1145,12 @@ class PlatformMarker { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(alpha, other.alpha) && _deepEquals(anchor, other.anchor) && _deepEquals(consumeTapEvents, other.consumeTapEvents) && _deepEquals(draggable, other.draggable) && _deepEquals(flat, other.flat) && _deepEquals(icon, other.icon) && _deepEquals(infoWindow, other.infoWindow) && _deepEquals(position, other.position) && _deepEquals(rotation, other.rotation) && _deepEquals(visible, other.visible) && _deepEquals(zIndex, other.zIndex) && _deepEquals(markerId, other.markerId) && _deepEquals(clusterManagerId, other.clusterManagerId) && _deepEquals(collisionBehavior, other.collisionBehavior); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Polygon class. @@ -1021,8 +1204,7 @@ class PlatformPolygon { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformPolygon decode(Object result) { result as List; @@ -1031,8 +1213,8 @@ class PlatformPolygon { 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>(), + 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, @@ -1049,12 +1231,12 @@ class PlatformPolygon { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(polygonId, other.polygonId) && _deepEquals(consumesTapEvents, other.consumesTapEvents) && _deepEquals(fillColor, other.fillColor) && _deepEquals(geodesic, other.geodesic) && _deepEquals(points, other.points) && _deepEquals(holes, other.holes) && _deepEquals(visible, other.visible) && _deepEquals(strokeColor, other.strokeColor) && _deepEquals(strokeWidth, other.strokeWidth) && _deepEquals(zIndex, other.zIndex); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Polyline class. @@ -1110,8 +1292,7 @@ class PlatformPolyline { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformPolyline decode(Object result) { result as List; @@ -1121,8 +1302,8 @@ class PlatformPolyline { 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(), + 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, @@ -1138,29 +1319,34 @@ class PlatformPolyline { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(polylineId, other.polylineId) && _deepEquals(consumesTapEvents, other.consumesTapEvents) && _deepEquals(color, other.color) && _deepEquals(geodesic, other.geodesic) && _deepEquals(jointType, other.jointType) && _deepEquals(patterns, other.patterns) && _deepEquals(points, other.points) && _deepEquals(visible, other.visible) && _deepEquals(width, other.width) && _deepEquals(zIndex, other.zIndex); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1179,17 +1365,21 @@ class PlatformPatternItem { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(type, other.type) && _deepEquals(length, other.length); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1198,12 +1388,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; @@ -1223,12 +1416,12 @@ class PlatformTile { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(width, other.width) && _deepEquals(height, other.height) && _deepEquals(data, other.data); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the TileOverlay class. @@ -1266,8 +1459,7 @@ class PlatformTileOverlay { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformTileOverlay decode(Object result) { result as List; @@ -1290,12 +1482,12 @@ class PlatformTileOverlay { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(tileOverlayId, other.tileOverlayId) && _deepEquals(fadeIn, other.fadeIn) && _deepEquals(transparency, other.transparency) && _deepEquals(zIndex, other.zIndex) && _deepEquals(visible, other.visible) && _deepEquals(tileSize, other.tileSize); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of Flutter's EdgeInsets. @@ -1316,12 +1508,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; @@ -1342,29 +1538,34 @@ class PlatformEdgeInsets { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(top, other.top) && _deepEquals(bottom, other.bottom) && _deepEquals(left, other.left) && _deepEquals(right, other.right); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1383,29 +1584,34 @@ class PlatformLatLng { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(latitude, other.latitude) && _deepEquals(longitude, other.longitude); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1424,12 +1630,12 @@ class PlatformLatLngBounds { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(northeast, other.northeast) && _deepEquals(southwest, other.southwest); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of CameraTargetBounds. @@ -1437,17 +1643,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; @@ -1459,19 +1668,18 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(bounds, other.bounds); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the GroundOverlay class. @@ -1529,8 +1737,7 @@ class PlatformGroundOverlay { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformGroundOverlay decode(Object result) { result as List; @@ -1558,12 +1765,12 @@ class PlatformGroundOverlay { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(groundOverlayId, other.groundOverlayId) && _deepEquals(image, other.image) && _deepEquals(position, other.position) && _deepEquals(bounds, other.bounds) && _deepEquals(anchor, other.anchor) && _deepEquals(transparency, other.transparency) && _deepEquals(bearing, other.bearing) && _deepEquals(zIndex, other.zIndex) && _deepEquals(visible, other.visible) && _deepEquals(clickable, other.clickable) && _deepEquals(zoomLevel, other.zoomLevel); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Information passed to the platform view creation. @@ -1617,44 +1824,39 @@ class PlatformMapViewCreationParams { } Object encode() { - return _toList(); - } + 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(), + 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) { + if (other is! PlatformMapViewCreationParams || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(initialCameraPosition, other.initialCameraPosition) && _deepEquals(mapConfiguration, other.mapConfiguration) && _deepEquals(initialCircles, other.initialCircles) && _deepEquals(initialMarkers, other.initialMarkers) && _deepEquals(initialPolygons, other.initialPolygons) && _deepEquals(initialPolylines, other.initialPolylines) && _deepEquals(initialHeatmaps, other.initialHeatmaps) && _deepEquals(initialTileOverlays, other.initialTileOverlays) && _deepEquals(initialClusterManagers, other.initialClusterManagers) && _deepEquals(initialGroundOverlays, other.initialGroundOverlays); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of MapConfiguration. @@ -1740,8 +1942,7 @@ class PlatformMapConfiguration { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformMapConfiguration decode(Object result) { result as List; @@ -1770,40 +1971,47 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(compassEnabled, other.compassEnabled) && _deepEquals(cameraTargetBounds, other.cameraTargetBounds) && _deepEquals(mapType, other.mapType) && _deepEquals(minMaxZoomPreference, other.minMaxZoomPreference) && _deepEquals(rotateGesturesEnabled, other.rotateGesturesEnabled) && _deepEquals(scrollGesturesEnabled, other.scrollGesturesEnabled) && _deepEquals(tiltGesturesEnabled, other.tiltGesturesEnabled) && _deepEquals(trackCameraPosition, other.trackCameraPosition) && _deepEquals(zoomGesturesEnabled, other.zoomGesturesEnabled) && _deepEquals(myLocationEnabled, other.myLocationEnabled) && _deepEquals(myLocationButtonEnabled, other.myLocationButtonEnabled) && _deepEquals(padding, other.padding) && _deepEquals(indoorViewEnabled, other.indoorViewEnabled) && _deepEquals(trafficEnabled, other.trafficEnabled) && _deepEquals(buildingsEnabled, other.buildingsEnabled) && _deepEquals(markerType, other.markerType) && _deepEquals(mapId, other.mapId) && _deepEquals(style, other.style); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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 @@ -1815,29 +2023,34 @@ class PlatformPoint { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(x, other.x) && _deepEquals(y, other.y); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1856,12 +2069,12 @@ class PlatformSize { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(width, other.width) && _deepEquals(height, other.height); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon representation of a color. @@ -1882,12 +2095,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; @@ -1908,12 +2125,12 @@ class PlatformColor { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(red, other.red) && _deepEquals(green, other.green) && _deepEquals(blue, other.blue) && _deepEquals(alpha, other.alpha); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of GMSTileLayer properties. @@ -1934,12 +2151,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; @@ -1960,29 +2181,34 @@ class PlatformTileLayer { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(visible, other.visible) && _deepEquals(fadeIn, other.fadeIn) && _deepEquals(opacity, other.opacity) && _deepEquals(zIndex, other.zIndex); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -2001,19 +2227,21 @@ class PlatformZoomRange { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(min, other.min) && _deepEquals(max, other.max); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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], @@ -2025,16 +2253,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 @@ -2046,66 +2277,75 @@ class PlatformBitmap { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(bitmap, other.bitmap); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(hue, other.hue); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -2124,29 +2364,34 @@ class PlatformBitmapBytes { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(byteData, other.byteData) && _deepEquals(size, other.size); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -2165,12 +2410,12 @@ class PlatformBitmapAsset { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(name, other.name) && _deepEquals(pkg, other.pkg); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of [AssetImageBitmap]. @@ -2188,12 +2433,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; @@ -2207,19 +2455,18 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(name, other.name) && _deepEquals(scale, other.scale) && _deepEquals(size, other.size); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of [AssetMapBitmap]. @@ -2243,12 +2490,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; @@ -2270,12 +2522,12 @@ class PlatformBitmapAssetMap { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(assetName, other.assetName) && _deepEquals(bitmapScaling, other.bitmapScaling) && _deepEquals(imagePixelRatio, other.imagePixelRatio) && _deepEquals(width, other.width) && _deepEquals(height, other.height); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of [BytesMapBitmap]. @@ -2299,12 +2551,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; @@ -2326,12 +2583,12 @@ class PlatformBitmapBytesMap { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(byteData, other.byteData) && _deepEquals(bitmapScaling, other.bitmapScaling) && _deepEquals(imagePixelRatio, other.imagePixelRatio) && _deepEquals(width, other.width) && _deepEquals(height, other.height); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of [PinConfig]. @@ -2369,8 +2626,7 @@ class PlatformBitmapPinConfig { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmapPinConfig decode(Object result) { result as List; @@ -2393,14 +2649,15 @@ class PlatformBitmapPinConfig { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(backgroundColor, other.backgroundColor) && _deepEquals(borderColor, other.borderColor) && _deepEquals(glyphColor, other.glyphColor) && _deepEquals(glyphTextColor, other.glyphTextColor) && _deepEquals(glyphText, other.glyphText) && _deepEquals(glyphBitmap, other.glyphBitmap); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } + class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -2408,153 +2665,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 PlatformMarkerCollisionBehavior) { + } else if (value is PlatformMarkerCollisionBehavior) { buffer.putUint8(130); writeValue(buffer, value.index); - } else if (value is PlatformJointType) { + } else if (value is PlatformJointType) { buffer.putUint8(131); writeValue(buffer, value.index); - } else if (value is PlatformPatternItemType) { + } else if (value is PlatformPatternItemType) { buffer.putUint8(132); writeValue(buffer, value.index); - } else if (value is PlatformMarkerType) { + } else if (value is PlatformMarkerType) { buffer.putUint8(133); writeValue(buffer, value.index); - } else if (value is PlatformMapBitmapScaling) { + } else if (value is PlatformMapBitmapScaling) { buffer.putUint8(134); writeValue(buffer, value.index); - } else if (value is PlatformCameraPosition) { + } else if (value is PlatformCameraPosition) { buffer.putUint8(135); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { + } else if (value is PlatformCameraUpdate) { buffer.putUint8(136); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewCameraPosition) { + } else if (value is PlatformCameraUpdateNewCameraPosition) { buffer.putUint8(137); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLng) { + } else if (value is PlatformCameraUpdateNewLatLng) { buffer.putUint8(138); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngBounds) { + } else if (value is PlatformCameraUpdateNewLatLngBounds) { buffer.putUint8(139); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngZoom) { + } else if (value is PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets) { buffer.putUint8(140); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateScrollBy) { + } else if (value is PlatformCameraUpdateNewLatLngZoom) { buffer.putUint8(141); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomBy) { + } else if (value is PlatformCameraUpdateScrollBy) { buffer.putUint8(142); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoom) { + } else if (value is PlatformCameraUpdateZoomBy) { buffer.putUint8(143); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomTo) { + } else if (value is PlatformCameraUpdateZoom) { buffer.putUint8(144); writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { + } else if (value is PlatformCameraUpdateZoomTo) { buffer.putUint8(145); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { + } else if (value is PlatformCircle) { buffer.putUint8(146); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmapGradient) { + } else if (value is PlatformHeatmap) { buffer.putUint8(147); writeValue(buffer, value.encode()); - } else if (value is PlatformWeightedLatLng) { + } else if (value is PlatformHeatmapGradient) { buffer.putUint8(148); writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { + } else if (value is PlatformWeightedLatLng) { buffer.putUint8(149); writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { + } else if (value is PlatformInfoWindow) { buffer.putUint8(150); writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { + } else if (value is PlatformCluster) { buffer.putUint8(151); writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { + } else if (value is PlatformClusterManager) { buffer.putUint8(152); writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { + } else if (value is PlatformMarker) { buffer.putUint8(153); writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { + } else if (value is PlatformPolygon) { buffer.putUint8(154); writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { + } else if (value is PlatformPolyline) { buffer.putUint8(155); writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { + } else if (value is PlatformPatternItem) { buffer.putUint8(156); writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { + } else if (value is PlatformTile) { buffer.putUint8(157); writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { + } else if (value is PlatformTileOverlay) { buffer.putUint8(158); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { + } else if (value is PlatformEdgeInsets) { buffer.putUint8(159); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { + } else if (value is PlatformLatLng) { buffer.putUint8(160); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { + } else if (value is PlatformLatLngBounds) { buffer.putUint8(161); writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { + } else if (value is PlatformCameraTargetBounds) { buffer.putUint8(162); writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { + } else if (value is PlatformGroundOverlay) { buffer.putUint8(163); writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { + } else if (value is PlatformMapViewCreationParams) { buffer.putUint8(164); writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { + } else if (value is PlatformMapConfiguration) { buffer.putUint8(165); writeValue(buffer, value.encode()); - } else if (value is PlatformSize) { + } else if (value is PlatformPoint) { buffer.putUint8(166); writeValue(buffer, value.encode()); - } else if (value is PlatformColor) { + } else if (value is PlatformSize) { buffer.putUint8(167); writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { + } else if (value is PlatformColor) { buffer.putUint8(168); writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { + } else if (value is PlatformTileLayer) { buffer.putUint8(169); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { + } else if (value is PlatformZoomRange) { buffer.putUint8(170); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { + } else if (value is PlatformBitmap) { buffer.putUint8(171); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { + } else if (value is PlatformBitmapDefaultMarker) { buffer.putUint8(172); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { + } else if (value is PlatformBitmapBytes) { buffer.putUint8(173); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { + } else if (value is PlatformBitmapAsset) { buffer.putUint8(174); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { + } else if (value is PlatformBitmapAssetImage) { buffer.putUint8(175); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { + } else if (value is PlatformBitmapAssetMap) { buffer.putUint8(176); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapPinConfig) { + } else if (value is PlatformBitmapBytesMap) { buffer.putUint8(177); writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapPinConfig) { + buffer.putUint8(178); + writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); } @@ -2568,9 +2828,7 @@ class _PigeonCodec extends StandardMessageCodec { return value == null ? null : PlatformMapType.values[value]; case 130: final value = readValue(buffer) as int?; - return value == null - ? null - : PlatformMarkerCollisionBehavior.values[value]; + return value == null ? null : PlatformMarkerCollisionBehavior.values[value]; case 131: final value = readValue(buffer) as int?; return value == null ? null : PlatformJointType.values[value]; @@ -2594,80 +2852,82 @@ class _PigeonCodec extends StandardMessageCodec { case 139: return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); case 140: - return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); + return PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets.decode(readValue(buffer)!); case 141: - return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); + return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); case 142: - return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); + return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); case 143: - return PlatformCameraUpdateZoom.decode(readValue(buffer)!); + return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); case 144: - return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); + return PlatformCameraUpdateZoom.decode(readValue(buffer)!); case 145: - return PlatformCircle.decode(readValue(buffer)!); + return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); case 146: - return PlatformHeatmap.decode(readValue(buffer)!); + return PlatformCircle.decode(readValue(buffer)!); case 147: - return PlatformHeatmapGradient.decode(readValue(buffer)!); + return PlatformHeatmap.decode(readValue(buffer)!); case 148: - return PlatformWeightedLatLng.decode(readValue(buffer)!); + return PlatformHeatmapGradient.decode(readValue(buffer)!); case 149: - return PlatformInfoWindow.decode(readValue(buffer)!); + return PlatformWeightedLatLng.decode(readValue(buffer)!); case 150: - return PlatformCluster.decode(readValue(buffer)!); + return PlatformInfoWindow.decode(readValue(buffer)!); case 151: - return PlatformClusterManager.decode(readValue(buffer)!); + return PlatformCluster.decode(readValue(buffer)!); case 152: - return PlatformMarker.decode(readValue(buffer)!); + return PlatformClusterManager.decode(readValue(buffer)!); case 153: - return PlatformPolygon.decode(readValue(buffer)!); + return PlatformMarker.decode(readValue(buffer)!); case 154: - return PlatformPolyline.decode(readValue(buffer)!); + return PlatformPolygon.decode(readValue(buffer)!); case 155: - return PlatformPatternItem.decode(readValue(buffer)!); + return PlatformPolyline.decode(readValue(buffer)!); case 156: - return PlatformTile.decode(readValue(buffer)!); + return PlatformPatternItem.decode(readValue(buffer)!); case 157: - return PlatformTileOverlay.decode(readValue(buffer)!); + return PlatformTile.decode(readValue(buffer)!); case 158: - return PlatformEdgeInsets.decode(readValue(buffer)!); + return PlatformTileOverlay.decode(readValue(buffer)!); case 159: - return PlatformLatLng.decode(readValue(buffer)!); + return PlatformEdgeInsets.decode(readValue(buffer)!); case 160: - return PlatformLatLngBounds.decode(readValue(buffer)!); + return PlatformLatLng.decode(readValue(buffer)!); case 161: - return PlatformCameraTargetBounds.decode(readValue(buffer)!); + return PlatformLatLngBounds.decode(readValue(buffer)!); case 162: - return PlatformGroundOverlay.decode(readValue(buffer)!); + return PlatformCameraTargetBounds.decode(readValue(buffer)!); case 163: - return PlatformMapViewCreationParams.decode(readValue(buffer)!); + return PlatformGroundOverlay.decode(readValue(buffer)!); case 164: - return PlatformMapConfiguration.decode(readValue(buffer)!); + return PlatformMapViewCreationParams.decode(readValue(buffer)!); case 165: - return PlatformPoint.decode(readValue(buffer)!); + return PlatformMapConfiguration.decode(readValue(buffer)!); case 166: - return PlatformSize.decode(readValue(buffer)!); + return PlatformPoint.decode(readValue(buffer)!); case 167: - return PlatformColor.decode(readValue(buffer)!); + return PlatformSize.decode(readValue(buffer)!); case 168: - return PlatformTileLayer.decode(readValue(buffer)!); + return PlatformColor.decode(readValue(buffer)!); case 169: - return PlatformZoomRange.decode(readValue(buffer)!); + return PlatformTileLayer.decode(readValue(buffer)!); case 170: - return PlatformBitmap.decode(readValue(buffer)!); + return PlatformZoomRange.decode(readValue(buffer)!); case 171: - return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); + return PlatformBitmap.decode(readValue(buffer)!); case 172: - return PlatformBitmapBytes.decode(readValue(buffer)!); + return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); case 173: - return PlatformBitmapAsset.decode(readValue(buffer)!); + return PlatformBitmapBytes.decode(readValue(buffer)!); case 174: - return PlatformBitmapAssetImage.decode(readValue(buffer)!); + return PlatformBitmapAsset.decode(readValue(buffer)!); case 175: - return PlatformBitmapAssetMap.decode(readValue(buffer)!); + return PlatformBitmapAssetImage.decode(readValue(buffer)!); case 176: - return PlatformBitmapBytesMap.decode(readValue(buffer)!); + return PlatformBitmapAssetMap.decode(readValue(buffer)!); case 177: + return PlatformBitmapBytesMap.decode(readValue(buffer)!); + case 178: return PlatformBitmapPinConfig.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -2683,10 +2943,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(); @@ -2695,8 +2953,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, @@ -2704,355 +2961,232 @@ class MapsApi { ); 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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'; + 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! 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_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); - } else 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! 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_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3060,85 +3194,59 @@ class MapsApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! 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_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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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, @@ -3146,106 +3254,73 @@ class MapsApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! 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_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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } /// Sets the style to the given map style string, where an empty string @@ -3254,28 +3329,22 @@ 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); - } else 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as String?; } /// Returns the error string from the last attempt to set the map style, if @@ -3284,8 +3353,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, @@ -3293,49 +3361,38 @@ class MapsApi { ); 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue 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_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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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, @@ -3343,23 +3400,19 @@ class MapsApi { ); 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as Uint8List?; } /// Returns true if the map supports advanced markers. Future isAdvancedMarkersAvailable() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3367,22 +3420,14 @@ class MapsApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } } @@ -3436,26 +3481,14 @@ abstract class MapsCallbackApi { void onGroundOverlayTap(String groundOverlayId); /// Called to get data for a map tile. - Future getTileOverlayTile( - String tileOverlayId, - PlatformPoint location, - int zoom, - ); - - static void setUp( - MapsCallbackApi? api, { - BinaryMessenger? binaryMessenger, - String messageChannelSuffix = '', - }) { - messageChannelSuffix = messageChannelSuffix.isNotEmpty - ? '.$messageChannelSuffix' - : ''; + Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); + + static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { + messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; { final 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 { @@ -3465,54 +3498,37 @@ 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.', - ); - 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 List args = message! as List; + final PlatformCameraPosition arg_cameraPosition = args[0]! as PlatformCameraPosition; try { - api.onCameraMove(arg_cameraPosition!); + 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 { @@ -3522,468 +3538,286 @@ 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.', - ); - 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.', - ); + final List args = message! as List; + final PlatformLatLng arg_position = args[0]! as PlatformLatLng; try { - api.onTap(arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final PlatformLatLng arg_position = args[0]! as PlatformLatLng; try { - api.onLongPress(arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; try { - api.onMarkerTap(arg_markerId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; + final PlatformLatLng arg_position = args[1]! as PlatformLatLng; try { - api.onMarkerDragStart(arg_markerId!, arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; + final PlatformLatLng arg_position = args[1]! as PlatformLatLng; try { - api.onMarkerDrag(arg_markerId!, arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; + final PlatformLatLng arg_position = args[1]! as PlatformLatLng; try { - api.onMarkerDragEnd(arg_markerId!, arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; try { - api.onInfoWindowTap(arg_markerId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_circleId = args[0]! as String; try { - api.onCircleTap(arg_circleId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final PlatformCluster arg_cluster = args[0]! as PlatformCluster; try { - api.onClusterTap(arg_cluster!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_polygonId = args[0]! as String; try { - api.onPolygonTap(arg_polygonId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_polylineId = args[0]! as String; try { - api.onPolylineTap(arg_polylineId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_groundOverlayId = args[0]! as String; try { - api.onGroundOverlayTap(arg_groundOverlayId!); + 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.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.', - ); + final List args = message! as List; + final String arg_tileOverlayId = args[0]! as String; + final PlatformPoint arg_location = args[1]! as PlatformPoint; + final int arg_zoom = args[2]! as 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())); } }); } @@ -3998,13 +3832,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(); @@ -4012,28 +3842,21 @@ 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } } @@ -4042,13 +3865,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(); @@ -4056,8 +3875,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, @@ -4065,27 +3883,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4093,27 +3902,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4121,27 +3921,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4149,27 +3940,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4177,27 +3959,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4205,27 +3978,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4233,27 +3997,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4261,104 +4016,75 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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); - } else 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as PlatformTileLayer?; } - 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); - } else 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as PlatformGroundOverlay?; } 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); - } else 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as PlatformHeatmap?; } 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, @@ -4366,58 +4092,37 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as PlatformZoomRange; } 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); - } else 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(); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return (pigeonVar_replyValue! 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, @@ -4425,21 +4130,13 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as PlatformCameraPosition; } } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/pigeons/messages.dart index 82235e3afb63..6cf556628e16 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/pigeons/messages.dart @@ -71,6 +71,13 @@ class PlatformCameraUpdateNewLatLngBounds { final double padding; } +/// Pigeon equivalent of NewLatLngBoundsWithEdgeInsets +class PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets { + PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets(this.bounds, this.padding); + final PlatformLatLngBounds bounds; + final PlatformEdgeInsets padding; +} + /// Pigeon equivalent of NewLatLngZoom class PlatformCameraUpdateNewLatLngZoom { PlatformCameraUpdateNewLatLngZoom(this.latLng, this.zoom); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/test/google_maps_flutter_ios_test.dart index 48396c35f65c..89f047fbf5e2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/test/google_maps_flutter_ios_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/test/google_maps_flutter_ios_test.dart @@ -1336,6 +1336,56 @@ void main() { expect(typedUpdate.out, true); }); + test( + 'moveCamera calls through with expected newLatLngBoundsWithEdgeInsets', + () async { + const mapId = 1; + final (GoogleMapsFlutterIOS maps, MockMapsApi api) = setUpMockMap( + mapId: mapId, + ); + + final bounds = LatLngBounds( + northeast: const LatLng(10.0, 20.0), + southwest: const LatLng(9.0, 21.0), + ); + const padding = EdgeInsets.fromLTRB(10.0, 20.0, 30.0, 40.0); + final CameraUpdate update = CameraUpdate.newLatLngBoundsWithEdgeInsets( + bounds, + padding, + ); + await maps.moveCamera(update, mapId: mapId); + + final VerificationResult verification = verify( + api.moveCamera(captureAny), + ); + final passedUpdate = verification.captured[0] as PlatformCameraUpdate; + final typedUpdate = + passedUpdate.cameraUpdate + as PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets; + update as CameraUpdateNewLatLngBoundsWithEdgeInsets; + expect( + typedUpdate.bounds.northeast.latitude, + update.bounds.northeast.latitude, + ); + expect( + typedUpdate.bounds.northeast.longitude, + update.bounds.northeast.longitude, + ); + expect( + typedUpdate.bounds.southwest.latitude, + update.bounds.southwest.latitude, + ); + expect( + typedUpdate.bounds.southwest.longitude, + update.bounds.southwest.longitude, + ); + expect(typedUpdate.padding.top, update.padding.top); + expect(typedUpdate.padding.left, update.padding.left); + expect(typedUpdate.padding.bottom, update.padding.bottom); + expect(typedUpdate.padding.right, update.padding.right); + }, + ); + test('MapBitmapScaling to PlatformMapBitmapScaling', () { expect( GoogleMapsFlutterIOS.platformMapBitmapScalingFromScaling( diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/test/google_maps_flutter_ios_test.mocks.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/test/google_maps_flutter_ios_test.mocks.dart index 1dc745d619de..8b6ea40e83f4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/test/google_maps_flutter_ios_test.mocks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/test/google_maps_flutter_ios_test.mocks.dart @@ -23,6 +23,7 @@ import 'package:mockito/src/dummies.dart' as _i3; // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakePlatformPoint_0 extends _i1.SmartFake implements _i2.PlatformPoint { _FakePlatformPoint_0(Object parent, Invocation parentInvocation) diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMConversionUtils.m b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMConversionUtils.m index 001ebc30cbfa..2886bdf8da69 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMConversionUtils.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMConversionUtils.m @@ -241,6 +241,14 @@ GMSCollisionBehavior FGMGetCollisionBehaviorForPigeonCollisionBehavior( return [GMSCameraUpdate fitBounds:FGMGetCoordinateBoundsForPigeonLatLngBounds(typedUpdate.bounds) withPadding:typedUpdate.padding]; + } else if ([update isKindOfClass:[FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets class]]) { + FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *typedUpdate = + (FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)update; + FGMPlatformEdgeInsets *padding = typedUpdate.padding; + return + [GMSCameraUpdate fitBounds:FGMGetCoordinateBoundsForPigeonLatLngBounds(typedUpdate.bounds) + withEdgeInsets:UIEdgeInsetsMake(padding.top, padding.left, + padding.bottom, padding.right)]; } else if ([update isKindOfClass:[FGMPlatformCameraUpdateNewLatLngZoom class]]) { FGMPlatformCameraUpdateNewLatLngZoom *typedUpdate = (FGMPlatformCameraUpdateNewLatLngZoom *)update; diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/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_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m index 3302fd9e13b8..0bfc5b66502d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/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_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.m @@ -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.3.3), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "google_maps_flutter_pigeon_messages.g.h" @@ -12,6 +12,96 @@ @import Flutter; #endif +static BOOL __attribute__((unused)) FLTPigeonDeepEquals(id _Nullable a, id _Nullable b) { + if (a == b) { + return YES; + } + if (a == nil) { + return b == [NSNull null]; + } + if (b == nil) { + return a == [NSNull null]; + } + if ([a isKindOfClass:[NSNumber class]] && [b isKindOfClass:[NSNumber class]]) { + return [a isEqual:b] || (isnan([(NSNumber *)a doubleValue]) && isnan([(NSNumber *)b doubleValue])); + } + if ([a isKindOfClass:[NSArray class]] && [b isKindOfClass:[NSArray class]]) { + NSArray *arrayA = (NSArray *)a; + NSArray *arrayB = (NSArray *)b; + if (arrayA.count != arrayB.count) { + return NO; + } + for (NSUInteger i = 0; i < arrayA.count; i++) { + if (!FLTPigeonDeepEquals(arrayA[i], arrayB[i])) { + return NO; + } + } + return YES; + } + if ([a isKindOfClass:[NSDictionary class]] && [b isKindOfClass:[NSDictionary class]]) { + NSDictionary *dictA = (NSDictionary *)a; + NSDictionary *dictB = (NSDictionary *)b; + if (dictA.count != dictB.count) { + return NO; + } + for (id keyA in dictA) { + id valueA = dictA[keyA]; + BOOL found = NO; + for (id keyB in dictB) { + if (FLTPigeonDeepEquals(keyA, keyB)) { + id valueB = dictB[keyB]; + if (FLTPigeonDeepEquals(valueA, valueB)) { + found = YES; + break; + } else { + return NO; + } + } + } + if (!found) { + return NO; + } + } + return YES; + } + return [a isEqual:b]; +} + +static NSUInteger __attribute__((unused)) FLTPigeonDeepHash(id _Nullable value) { + if (value == nil || value == (id)[NSNull null]) { + return 0; + } + if ([value isKindOfClass:[NSNumber class]]) { + NSNumber *n = (NSNumber *)value; + double d = n.doubleValue; + if (isnan(d)) { + // Normalize NaN to a consistent hash. + return (NSUInteger)0x7FF8000000000000; + } + if (d == 0.0) { + // Normalize -0.0 to 0.0 so they have the same hash code. + d = 0.0; + } + return @(d).hash; + } + if ([value isKindOfClass:[NSArray class]]) { + NSUInteger result = 1; + for (id item in (NSArray *)value) { + result = result * 31 + FLTPigeonDeepHash(item); + } + return result; + } + if ([value isKindOfClass:[NSDictionary class]]) { + NSUInteger result = 0; + NSDictionary *dict = (NSDictionary *)value; + for (id key in dict) { + result += ((FLTPigeonDeepHash(key) * 31) ^ FLTPigeonDeepHash(dict[key])); + } + return result; + } + return [value hash]; +} + static NSArray *wrapResult(id result, FlutterError *error) { if (error) { return @[ @@ -22,12 +112,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) { @@ -46,7 +131,7 @@ - (instancetype)initWithValue:(FGMPlatformMapType)value { } @end -/// Pigeon equivalent of MarkerCollisionBehavior. +/// Pigeon equivalent of the MarkerCollisionBehavior enum. @implementation FGMPlatformMarkerCollisionBehaviorBox - (instancetype)initWithValue:(FGMPlatformMarkerCollisionBehavior)value { self = [super init]; @@ -130,6 +215,12 @@ + (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray *)toList; @end +@interface FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets () ++ (FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)fromList:(NSArray *)list; ++ (nullable FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)nullableFromList:(NSArray *)list; +- (NSArray *)toList; +@end + @interface FGMPlatformCameraUpdateNewLatLngZoom () + (FGMPlatformCameraUpdateNewLatLngZoom *)fromList:(NSArray *)list; + (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray *)list; @@ -359,11 +450,11 @@ + (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray *)list; @end @implementation FGMPlatformCameraPosition -+ (instancetype)makeWithBearing:(double)bearing - target:(FGMPlatformLatLng *)target - tilt:(double)tilt - zoom:(double)zoom { - FGMPlatformCameraPosition *pigeonResult = [[FGMPlatformCameraPosition alloc] init]; ++ (instancetype)makeWithBearing:(double )bearing + target:(FGMPlatformLatLng *)target + tilt:(double )tilt + zoom:(double )zoom { + FGMPlatformCameraPosition* pigeonResult = [[FGMPlatformCameraPosition alloc] init]; pigeonResult.bearing = bearing; pigeonResult.target = target; pigeonResult.tilt = tilt; @@ -389,11 +480,30 @@ + (nullable FGMPlatformCameraPosition *)nullableFromList:(NSArray *)list { @(self.zoom), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraPosition *other = (FGMPlatformCameraPosition *)object; + return (self.bearing == other.bearing || (isnan(self.bearing) && isnan(other.bearing))) && FLTPigeonDeepEquals(self.target, other.target) && (self.tilt == other.tilt || (isnan(self.tilt) && isnan(other.tilt))) && (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.bearing) ? (NSUInteger)0x7FF8000000000000 : @(self.bearing).hash); + result = result * 31 + FLTPigeonDeepHash(self.target); + result = result * 31 + (isnan(self.tilt) ? (NSUInteger)0x7FF8000000000000 : @(self.tilt).hash); + result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash); + return result; +} @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; } @@ -410,18 +520,32 @@ + (nullable FGMPlatformCameraUpdate *)nullableFromList:(NSArray *)list { self.cameraUpdate ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdate *other = (FGMPlatformCameraUpdate *)object; + return FLTPigeonDeepEquals(self.cameraUpdate, other.cameraUpdate); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.cameraUpdate); + return result; +} @end @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; } @@ -433,11 +557,27 @@ + (nullable FGMPlatformCameraUpdateNewCameraPosition *)nullableFromList:(NSArray self.cameraPosition ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateNewCameraPosition *other = (FGMPlatformCameraUpdateNewCameraPosition *)object; + return FLTPigeonDeepEquals(self.cameraPosition, other.cameraPosition); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.cameraPosition); + return result; +} @end @implementation FGMPlatformCameraUpdateNewLatLng + (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng { - FGMPlatformCameraUpdateNewLatLng *pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init]; + FGMPlatformCameraUpdateNewLatLng* pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init]; pigeonResult.latLng = latLng; return pigeonResult; } @@ -454,19 +594,34 @@ + (nullable FGMPlatformCameraUpdateNewLatLng *)nullableFromList:(NSArray *)l self.latLng ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateNewLatLng *other = (FGMPlatformCameraUpdateNewLatLng *)object; + return FLTPigeonDeepEquals(self.latLng, other.latLng); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.latLng); + return result; +} @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; @@ -480,19 +635,77 @@ + (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray *)list { + FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *pigeonResult = [[FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets alloc] init]; + pigeonResult.bounds = GetNullableObjectAtIndex(list, 0); + pigeonResult.padding = GetNullableObjectAtIndex(list, 1); + return pigeonResult; +} ++ (nullable FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)nullableFromList:(NSArray *)list { + return (list) ? [FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets fromList:list] : nil; +} +- (NSArray *)toList { + return @[ + self.bounds ?: [NSNull null], + self.padding ?: [NSNull null], + ]; +} +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *other = (FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets *)object; + return FLTPigeonDeepEquals(self.bounds, other.bounds) && FLTPigeonDeepEquals(self.padding, other.padding); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.bounds); + result = result * 31 + FLTPigeonDeepHash(self.padding); + return result; +} @end @implementation FGMPlatformCameraUpdateNewLatLngZoom -+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom { - FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult = - [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init]; ++ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng + zoom:(double )zoom { + FGMPlatformCameraUpdateNewLatLngZoom* pigeonResult = [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init]; pigeonResult.latLng = latLng; pigeonResult.zoom = zoom; return pigeonResult; } + (FGMPlatformCameraUpdateNewLatLngZoom *)fromList:(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; @@ -506,11 +719,29 @@ + (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray @(self.zoom), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateNewLatLngZoom *other = (FGMPlatformCameraUpdateNewLatLngZoom *)object; + return FLTPigeonDeepEquals(self.latLng, other.latLng) && (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.latLng); + result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash); + return result; +} @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; @@ -530,11 +761,29 @@ + (nullable FGMPlatformCameraUpdateScrollBy *)nullableFromList:(NSArray *)li @(self.dy), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateScrollBy *other = (FGMPlatformCameraUpdateScrollBy *)object; + return (self.dx == other.dx || (isnan(self.dx) && isnan(other.dx))) && (self.dy == other.dy || (isnan(self.dy) && isnan(other.dy))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.dx) ? (NSUInteger)0x7FF8000000000000 : @(self.dx).hash); + result = result * 31 + (isnan(self.dy) ? (NSUInteger)0x7FF8000000000000 : @(self.dy).hash); + return result; +} @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; @@ -554,11 +803,28 @@ + (nullable FGMPlatformCameraUpdateZoomBy *)nullableFromList:(NSArray *)list self.focus ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateZoomBy *other = (FGMPlatformCameraUpdateZoomBy *)object; + return (self.amount == other.amount || (isnan(self.amount) && isnan(other.amount))) && FLTPigeonDeepEquals(self.focus, other.focus); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.amount) ? (NSUInteger)0x7FF8000000000000 : @(self.amount).hash); + result = result * 31 + FLTPigeonDeepHash(self.focus); + return result; +} @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; } @@ -575,11 +841,27 @@ + (nullable FGMPlatformCameraUpdateZoom *)nullableFromList:(NSArray *)list { @(self.out), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateZoom *other = (FGMPlatformCameraUpdateZoom *)object; + return self.out == other.out; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.out).hash; + return result; +} @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; } @@ -596,19 +878,35 @@ + (nullable FGMPlatformCameraUpdateZoomTo *)nullableFromList:(NSArray *)list @(self.zoom), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraUpdateZoomTo *other = (FGMPlatformCameraUpdateZoomTo *)object; + return (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash); + return result; +} @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; @@ -649,17 +947,41 @@ + (nullable FGMPlatformCircle *)nullableFromList:(NSArray *)list { self.circleId ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCircle *other = (FGMPlatformCircle *)object; + return self.consumeTapEvents == other.consumeTapEvents && FLTPigeonDeepEquals(self.fillColor, other.fillColor) && FLTPigeonDeepEquals(self.strokeColor, other.strokeColor) && self.visible == other.visible && self.strokeWidth == other.strokeWidth && (self.zIndex == other.zIndex || (isnan(self.zIndex) && isnan(other.zIndex))) && FLTPigeonDeepEquals(self.center, other.center) && (self.radius == other.radius || (isnan(self.radius) && isnan(other.radius))) && FLTPigeonDeepEquals(self.circleId, other.circleId); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.consumeTapEvents).hash; + result = result * 31 + FLTPigeonDeepHash(self.fillColor); + result = result * 31 + FLTPigeonDeepHash(self.strokeColor); + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.strokeWidth).hash; + result = result * 31 + (isnan(self.zIndex) ? (NSUInteger)0x7FF8000000000000 : @(self.zIndex).hash); + result = result * 31 + FLTPigeonDeepHash(self.center); + result = result * 31 + (isnan(self.radius) ? (NSUInteger)0x7FF8000000000000 : @(self.radius).hash); + result = result * 31 + FLTPigeonDeepHash(self.circleId); + return result; +} @end @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; @@ -694,13 +1016,35 @@ + (nullable FGMPlatformHeatmap *)nullableFromList:(NSArray *)list { @(self.maximumZoomIntensity), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformHeatmap *other = (FGMPlatformHeatmap *)object; + return FLTPigeonDeepEquals(self.heatmapId, other.heatmapId) && FLTPigeonDeepEquals(self.data, other.data) && FLTPigeonDeepEquals(self.gradient, other.gradient) && (self.opacity == other.opacity || (isnan(self.opacity) && isnan(other.opacity))) && self.radius == other.radius && self.minimumZoomIntensity == other.minimumZoomIntensity && self.maximumZoomIntensity == other.maximumZoomIntensity; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.heatmapId); + result = result * 31 + FLTPigeonDeepHash(self.data); + result = result * 31 + FLTPigeonDeepHash(self.gradient); + result = result * 31 + (isnan(self.opacity) ? (NSUInteger)0x7FF8000000000000 : @(self.opacity).hash); + result = result * 31 + @(self.radius).hash; + result = result * 31 + @(self.minimumZoomIntensity).hash; + result = result * 31 + @(self.maximumZoomIntensity).hash; + return result; +} @end @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; @@ -723,11 +1067,30 @@ + (nullable FGMPlatformHeatmapGradient *)nullableFromList:(NSArray *)list { @(self.colorMapSize), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformHeatmapGradient *other = (FGMPlatformHeatmapGradient *)object; + return FLTPigeonDeepEquals(self.colors, other.colors) && FLTPigeonDeepEquals(self.startPoints, other.startPoints) && self.colorMapSize == other.colorMapSize; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.colors); + result = result * 31 + FLTPigeonDeepHash(self.startPoints); + result = result * 31 + @(self.colorMapSize).hash; + return result; +} @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; @@ -747,13 +1110,30 @@ + (nullable FGMPlatformWeightedLatLng *)nullableFromList:(NSArray *)list { @(self.weight), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformWeightedLatLng *other = (FGMPlatformWeightedLatLng *)object; + return FLTPigeonDeepEquals(self.point, other.point) && (self.weight == other.weight || (isnan(self.weight) && isnan(other.weight))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.point); + result = result * 31 + (isnan(self.weight) ? (NSUInteger)0x7FF8000000000000 : @(self.weight).hash); + return result; +} @end @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; @@ -776,14 +1156,32 @@ + (nullable FGMPlatformInfoWindow *)nullableFromList:(NSArray *)list { self.anchor ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformInfoWindow *other = (FGMPlatformInfoWindow *)object; + return FLTPigeonDeepEquals(self.title, other.title) && FLTPigeonDeepEquals(self.snippet, other.snippet) && FLTPigeonDeepEquals(self.anchor, other.anchor); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.title); + result = result * 31 + FLTPigeonDeepHash(self.snippet); + result = result * 31 + FLTPigeonDeepHash(self.anchor); + return result; +} @end @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; @@ -809,11 +1207,30 @@ + (nullable FGMPlatformCluster *)nullableFromList:(NSArray *)list { self.markerIds ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCluster *other = (FGMPlatformCluster *)object; + return FLTPigeonDeepEquals(self.clusterManagerId, other.clusterManagerId) && FLTPigeonDeepEquals(self.position, other.position) && FLTPigeonDeepEquals(self.bounds, other.bounds) && FLTPigeonDeepEquals(self.markerIds, other.markerIds); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.clusterManagerId); + result = result * 31 + FLTPigeonDeepHash(self.position); + result = result * 31 + FLTPigeonDeepHash(self.bounds); + result = result * 31 + FLTPigeonDeepHash(self.markerIds); + return result; +} @end @implementation FGMPlatformClusterManager + (instancetype)makeWithIdentifier:(NSString *)identifier { - FGMPlatformClusterManager *pigeonResult = [[FGMPlatformClusterManager alloc] init]; + FGMPlatformClusterManager* pigeonResult = [[FGMPlatformClusterManager alloc] init]; pigeonResult.identifier = identifier; return pigeonResult; } @@ -830,24 +1247,40 @@ + (nullable FGMPlatformClusterManager *)nullableFromList:(NSArray *)list { self.identifier ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformClusterManager *other = (FGMPlatformClusterManager *)object; + return FLTPigeonDeepEquals(self.identifier, other.identifier); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.identifier); + return result; +} @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 - collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior { - FGMPlatformMarker *pigeonResult = [[FGMPlatformMarker alloc] init]; ++ (instancetype)makeWithAlpha:(double )alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL )consumeTapEvents + draggable:(BOOL )draggable + flat:(BOOL )flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double )rotation + visible:(BOOL )visible + zIndex:(NSInteger )zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId + collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior { + FGMPlatformMarker* pigeonResult = [[FGMPlatformMarker alloc] init]; pigeonResult.alpha = alpha; pigeonResult.anchor = anchor; pigeonResult.consumeTapEvents = consumeTapEvents; @@ -903,20 +1336,49 @@ + (nullable FGMPlatformMarker *)nullableFromList:(NSArray *)list { self.collisionBehavior ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformMarker *other = (FGMPlatformMarker *)object; + return (self.alpha == other.alpha || (isnan(self.alpha) && isnan(other.alpha))) && FLTPigeonDeepEquals(self.anchor, other.anchor) && self.consumeTapEvents == other.consumeTapEvents && self.draggable == other.draggable && self.flat == other.flat && FLTPigeonDeepEquals(self.icon, other.icon) && FLTPigeonDeepEquals(self.infoWindow, other.infoWindow) && FLTPigeonDeepEquals(self.position, other.position) && (self.rotation == other.rotation || (isnan(self.rotation) && isnan(other.rotation))) && self.visible == other.visible && self.zIndex == other.zIndex && FLTPigeonDeepEquals(self.markerId, other.markerId) && FLTPigeonDeepEquals(self.clusterManagerId, other.clusterManagerId) && FLTPigeonDeepEquals(self.collisionBehavior, other.collisionBehavior); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.alpha) ? (NSUInteger)0x7FF8000000000000 : @(self.alpha).hash); + result = result * 31 + FLTPigeonDeepHash(self.anchor); + result = result * 31 + @(self.consumeTapEvents).hash; + result = result * 31 + @(self.draggable).hash; + result = result * 31 + @(self.flat).hash; + result = result * 31 + FLTPigeonDeepHash(self.icon); + result = result * 31 + FLTPigeonDeepHash(self.infoWindow); + result = result * 31 + FLTPigeonDeepHash(self.position); + result = result * 31 + (isnan(self.rotation) ? (NSUInteger)0x7FF8000000000000 : @(self.rotation).hash); + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.zIndex).hash; + result = result * 31 + FLTPigeonDeepHash(self.markerId); + result = result * 31 + FLTPigeonDeepHash(self.clusterManagerId); + result = result * 31 + FLTPigeonDeepHash(self.collisionBehavior); + return result; +} @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; @@ -960,20 +1422,45 @@ + (nullable FGMPlatformPolygon *)nullableFromList:(NSArray *)list { @(self.zIndex), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformPolygon *other = (FGMPlatformPolygon *)object; + return FLTPigeonDeepEquals(self.polygonId, other.polygonId) && self.consumesTapEvents == other.consumesTapEvents && FLTPigeonDeepEquals(self.fillColor, other.fillColor) && self.geodesic == other.geodesic && FLTPigeonDeepEquals(self.points, other.points) && FLTPigeonDeepEquals(self.holes, other.holes) && self.visible == other.visible && FLTPigeonDeepEquals(self.strokeColor, other.strokeColor) && self.strokeWidth == other.strokeWidth && self.zIndex == other.zIndex; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.polygonId); + result = result * 31 + @(self.consumesTapEvents).hash; + result = result * 31 + FLTPigeonDeepHash(self.fillColor); + result = result * 31 + @(self.geodesic).hash; + result = result * 31 + FLTPigeonDeepHash(self.points); + result = result * 31 + FLTPigeonDeepHash(self.holes); + result = result * 31 + @(self.visible).hash; + result = result * 31 + FLTPigeonDeepHash(self.strokeColor); + result = result * 31 + @(self.strokeWidth).hash; + result = result * 31 + @(self.zIndex).hash; + return result; +} @end @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; @@ -1018,19 +1505,44 @@ + (nullable FGMPlatformPolyline *)nullableFromList:(NSArray *)list { @(self.zIndex), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformPolyline *other = (FGMPlatformPolyline *)object; + return FLTPigeonDeepEquals(self.polylineId, other.polylineId) && self.consumesTapEvents == other.consumesTapEvents && FLTPigeonDeepEquals(self.color, other.color) && self.geodesic == other.geodesic && self.jointType == other.jointType && FLTPigeonDeepEquals(self.patterns, other.patterns) && FLTPigeonDeepEquals(self.points, other.points) && self.visible == other.visible && self.width == other.width && self.zIndex == other.zIndex; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.polylineId); + result = result * 31 + @(self.consumesTapEvents).hash; + result = result * 31 + FLTPigeonDeepHash(self.color); + result = result * 31 + @(self.geodesic).hash; + result = result * 31 + @(self.jointType).hash; + result = result * 31 + FLTPigeonDeepHash(self.patterns); + result = result * 31 + FLTPigeonDeepHash(self.points); + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.width).hash; + result = result * 31 + @(self.zIndex).hash; + return result; +} @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; @@ -1044,13 +1556,30 @@ + (nullable FGMPlatformPatternItem *)nullableFromList:(NSArray *)list { self.length ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformPatternItem *other = (FGMPlatformPatternItem *)object; + return self.type == other.type && FLTPigeonDeepEquals(self.length, other.length); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.type).hash; + result = result * 31 + FLTPigeonDeepHash(self.length); + return result; +} @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; @@ -1073,16 +1602,34 @@ + (nullable FGMPlatformTile *)nullableFromList:(NSArray *)list { self.data ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformTile *other = (FGMPlatformTile *)object; + return self.width == other.width && self.height == other.height && FLTPigeonDeepEquals(self.data, other.data); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.width).hash; + result = result * 31 + @(self.height).hash; + result = result * 31 + FLTPigeonDeepHash(self.data); + return result; +} @end @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; @@ -1114,14 +1661,35 @@ + (nullable FGMPlatformTileOverlay *)nullableFromList:(NSArray *)list { @(self.tileSize), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformTileOverlay *other = (FGMPlatformTileOverlay *)object; + return FLTPigeonDeepEquals(self.tileOverlayId, other.tileOverlayId) && self.fadeIn == other.fadeIn && (self.transparency == other.transparency || (isnan(self.transparency) && isnan(other.transparency))) && self.zIndex == other.zIndex && self.visible == other.visible && self.tileSize == other.tileSize; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.tileOverlayId); + result = result * 31 + @(self.fadeIn).hash; + result = result * 31 + (isnan(self.transparency) ? (NSUInteger)0x7FF8000000000000 : @(self.transparency).hash); + result = result * 31 + @(self.zIndex).hash; + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.tileSize).hash; + return result; +} @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; @@ -1147,11 +1715,31 @@ + (nullable FGMPlatformEdgeInsets *)nullableFromList:(NSArray *)list { @(self.right), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformEdgeInsets *other = (FGMPlatformEdgeInsets *)object; + return (self.top == other.top || (isnan(self.top) && isnan(other.top))) && (self.bottom == other.bottom || (isnan(self.bottom) && isnan(other.bottom))) && (self.left == other.left || (isnan(self.left) && isnan(other.left))) && (self.right == other.right || (isnan(self.right) && isnan(other.right))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.top) ? (NSUInteger)0x7FF8000000000000 : @(self.top).hash); + result = result * 31 + (isnan(self.bottom) ? (NSUInteger)0x7FF8000000000000 : @(self.bottom).hash); + result = result * 31 + (isnan(self.left) ? (NSUInteger)0x7FF8000000000000 : @(self.left).hash); + result = result * 31 + (isnan(self.right) ? (NSUInteger)0x7FF8000000000000 : @(self.right).hash); + return result; +} @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; @@ -1171,12 +1759,29 @@ + (nullable FGMPlatformLatLng *)nullableFromList:(NSArray *)list { @(self.longitude), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformLatLng *other = (FGMPlatformLatLng *)object; + return (self.latitude == other.latitude || (isnan(self.latitude) && isnan(other.latitude))) && (self.longitude == other.longitude || (isnan(self.longitude) && isnan(other.longitude))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.latitude) ? (NSUInteger)0x7FF8000000000000 : @(self.latitude).hash); + result = result * 31 + (isnan(self.longitude) ? (NSUInteger)0x7FF8000000000000 : @(self.longitude).hash); + return result; +} @end @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; @@ -1196,11 +1801,28 @@ + (nullable FGMPlatformLatLngBounds *)nullableFromList:(NSArray *)list { self.southwest ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformLatLngBounds *other = (FGMPlatformLatLngBounds *)object; + return FLTPigeonDeepEquals(self.northeast, other.northeast) && FLTPigeonDeepEquals(self.southwest, other.southwest); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.northeast); + result = result * 31 + FLTPigeonDeepHash(self.southwest); + return result; +} @end @implementation FGMPlatformCameraTargetBounds + (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds { - FGMPlatformCameraTargetBounds *pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init]; + FGMPlatformCameraTargetBounds* pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init]; pigeonResult.bounds = bounds; return pigeonResult; } @@ -1217,21 +1839,37 @@ + (nullable FGMPlatformCameraTargetBounds *)nullableFromList:(NSArray *)list self.bounds ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformCameraTargetBounds *other = (FGMPlatformCameraTargetBounds *)object; + return FLTPigeonDeepEquals(self.bounds, other.bounds); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.bounds); + return result; +} @end @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; @@ -1278,21 +1916,46 @@ + (nullable FGMPlatformGroundOverlay *)nullableFromList:(NSArray *)list { self.zoomLevel ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformGroundOverlay *other = (FGMPlatformGroundOverlay *)object; + return FLTPigeonDeepEquals(self.groundOverlayId, other.groundOverlayId) && FLTPigeonDeepEquals(self.image, other.image) && FLTPigeonDeepEquals(self.position, other.position) && FLTPigeonDeepEquals(self.bounds, other.bounds) && FLTPigeonDeepEquals(self.anchor, other.anchor) && (self.transparency == other.transparency || (isnan(self.transparency) && isnan(other.transparency))) && (self.bearing == other.bearing || (isnan(self.bearing) && isnan(other.bearing))) && self.zIndex == other.zIndex && self.visible == other.visible && self.clickable == other.clickable && FLTPigeonDeepEquals(self.zoomLevel, other.zoomLevel); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.groundOverlayId); + result = result * 31 + FLTPigeonDeepHash(self.image); + result = result * 31 + FLTPigeonDeepHash(self.position); + result = result * 31 + FLTPigeonDeepHash(self.bounds); + result = result * 31 + FLTPigeonDeepHash(self.anchor); + result = result * 31 + (isnan(self.transparency) ? (NSUInteger)0x7FF8000000000000 : @(self.transparency).hash); + result = result * 31 + (isnan(self.bearing) ? (NSUInteger)0x7FF8000000000000 : @(self.bearing).hash); + result = result * 31 + @(self.zIndex).hash; + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.clickable).hash; + result = result * 31 + FLTPigeonDeepHash(self.zoomLevel); + return result; +} @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; @@ -1336,28 +1999,53 @@ + (nullable FGMPlatformMapViewCreationParams *)nullableFromList:(NSArray *)l self.initialGroundOverlays ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformMapViewCreationParams *other = (FGMPlatformMapViewCreationParams *)object; + return FLTPigeonDeepEquals(self.initialCameraPosition, other.initialCameraPosition) && FLTPigeonDeepEquals(self.mapConfiguration, other.mapConfiguration) && FLTPigeonDeepEquals(self.initialCircles, other.initialCircles) && FLTPigeonDeepEquals(self.initialMarkers, other.initialMarkers) && FLTPigeonDeepEquals(self.initialPolygons, other.initialPolygons) && FLTPigeonDeepEquals(self.initialPolylines, other.initialPolylines) && FLTPigeonDeepEquals(self.initialHeatmaps, other.initialHeatmaps) && FLTPigeonDeepEquals(self.initialTileOverlays, other.initialTileOverlays) && FLTPigeonDeepEquals(self.initialClusterManagers, other.initialClusterManagers) && FLTPigeonDeepEquals(self.initialGroundOverlays, other.initialGroundOverlays); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.initialCameraPosition); + result = result * 31 + FLTPigeonDeepHash(self.mapConfiguration); + result = result * 31 + FLTPigeonDeepHash(self.initialCircles); + result = result * 31 + FLTPigeonDeepHash(self.initialMarkers); + result = result * 31 + FLTPigeonDeepHash(self.initialPolygons); + result = result * 31 + FLTPigeonDeepHash(self.initialPolylines); + result = result * 31 + FLTPigeonDeepHash(self.initialHeatmaps); + result = result * 31 + FLTPigeonDeepHash(self.initialTileOverlays); + result = result * 31 + FLTPigeonDeepHash(self.initialClusterManagers); + result = result * 31 + FLTPigeonDeepHash(self.initialGroundOverlays); + return result; +} @end @implementation FGMPlatformMapConfiguration + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - markerType:(FGMPlatformMarkerType)markerType - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style { - FGMPlatformMapConfiguration *pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + markerType:(FGMPlatformMarkerType)markerType + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style { + FGMPlatformMapConfiguration* pigeonResult = [[FGMPlatformMapConfiguration alloc] init]; pigeonResult.compassEnabled = compassEnabled; pigeonResult.cameraTargetBounds = cameraTargetBounds; pigeonResult.mapType = mapType; @@ -1426,11 +2114,45 @@ + (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray *)list { self.style ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformMapConfiguration *other = (FGMPlatformMapConfiguration *)object; + return FLTPigeonDeepEquals(self.compassEnabled, other.compassEnabled) && FLTPigeonDeepEquals(self.cameraTargetBounds, other.cameraTargetBounds) && FLTPigeonDeepEquals(self.mapType, other.mapType) && FLTPigeonDeepEquals(self.minMaxZoomPreference, other.minMaxZoomPreference) && FLTPigeonDeepEquals(self.rotateGesturesEnabled, other.rotateGesturesEnabled) && FLTPigeonDeepEquals(self.scrollGesturesEnabled, other.scrollGesturesEnabled) && FLTPigeonDeepEquals(self.tiltGesturesEnabled, other.tiltGesturesEnabled) && FLTPigeonDeepEquals(self.trackCameraPosition, other.trackCameraPosition) && FLTPigeonDeepEquals(self.zoomGesturesEnabled, other.zoomGesturesEnabled) && FLTPigeonDeepEquals(self.myLocationEnabled, other.myLocationEnabled) && FLTPigeonDeepEquals(self.myLocationButtonEnabled, other.myLocationButtonEnabled) && FLTPigeonDeepEquals(self.padding, other.padding) && FLTPigeonDeepEquals(self.indoorViewEnabled, other.indoorViewEnabled) && FLTPigeonDeepEquals(self.trafficEnabled, other.trafficEnabled) && FLTPigeonDeepEquals(self.buildingsEnabled, other.buildingsEnabled) && self.markerType == other.markerType && FLTPigeonDeepEquals(self.mapId, other.mapId) && FLTPigeonDeepEquals(self.style, other.style); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.compassEnabled); + result = result * 31 + FLTPigeonDeepHash(self.cameraTargetBounds); + result = result * 31 + FLTPigeonDeepHash(self.mapType); + result = result * 31 + FLTPigeonDeepHash(self.minMaxZoomPreference); + result = result * 31 + FLTPigeonDeepHash(self.rotateGesturesEnabled); + result = result * 31 + FLTPigeonDeepHash(self.scrollGesturesEnabled); + result = result * 31 + FLTPigeonDeepHash(self.tiltGesturesEnabled); + result = result * 31 + FLTPigeonDeepHash(self.trackCameraPosition); + result = result * 31 + FLTPigeonDeepHash(self.zoomGesturesEnabled); + result = result * 31 + FLTPigeonDeepHash(self.myLocationEnabled); + result = result * 31 + FLTPigeonDeepHash(self.myLocationButtonEnabled); + result = result * 31 + FLTPigeonDeepHash(self.padding); + result = result * 31 + FLTPigeonDeepHash(self.indoorViewEnabled); + result = result * 31 + FLTPigeonDeepHash(self.trafficEnabled); + result = result * 31 + FLTPigeonDeepHash(self.buildingsEnabled); + result = result * 31 + @(self.markerType).hash; + result = result * 31 + FLTPigeonDeepHash(self.mapId); + result = result * 31 + FLTPigeonDeepHash(self.style); + return result; +} @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; @@ -1450,11 +2172,29 @@ + (nullable FGMPlatformPoint *)nullableFromList:(NSArray *)list { @(self.y), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformPoint *other = (FGMPlatformPoint *)object; + return (self.x == other.x || (isnan(self.x) && isnan(other.x))) && (self.y == other.y || (isnan(self.y) && isnan(other.y))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.x) ? (NSUInteger)0x7FF8000000000000 : @(self.x).hash); + result = result * 31 + (isnan(self.y) ? (NSUInteger)0x7FF8000000000000 : @(self.y).hash); + return result; +} @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; @@ -1474,11 +2214,31 @@ + (nullable FGMPlatformSize *)nullableFromList:(NSArray *)list { @(self.height), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformSize *other = (FGMPlatformSize *)object; + return (self.width == other.width || (isnan(self.width) && isnan(other.width))) && (self.height == other.height || (isnan(self.height) && isnan(other.height))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.width) ? (NSUInteger)0x7FF8000000000000 : @(self.width).hash); + result = result * 31 + (isnan(self.height) ? (NSUInteger)0x7FF8000000000000 : @(self.height).hash); + return result; +} @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; @@ -1504,14 +2264,33 @@ + (nullable FGMPlatformColor *)nullableFromList:(NSArray *)list { @(self.alpha), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformColor *other = (FGMPlatformColor *)object; + return (self.red == other.red || (isnan(self.red) && isnan(other.red))) && (self.green == other.green || (isnan(self.green) && isnan(other.green))) && (self.blue == other.blue || (isnan(self.blue) && isnan(other.blue))) && (self.alpha == other.alpha || (isnan(self.alpha) && isnan(other.alpha))); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + (isnan(self.red) ? (NSUInteger)0x7FF8000000000000 : @(self.red).hash); + result = result * 31 + (isnan(self.green) ? (NSUInteger)0x7FF8000000000000 : @(self.green).hash); + result = result * 31 + (isnan(self.blue) ? (NSUInteger)0x7FF8000000000000 : @(self.blue).hash); + result = result * 31 + (isnan(self.alpha) ? (NSUInteger)0x7FF8000000000000 : @(self.alpha).hash); + return result; +} @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; @@ -1537,11 +2316,31 @@ + (nullable FGMPlatformTileLayer *)nullableFromList:(NSArray *)list { @(self.zIndex), ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformTileLayer *other = (FGMPlatformTileLayer *)object; + return self.visible == other.visible && self.fadeIn == other.fadeIn && (self.opacity == other.opacity || (isnan(self.opacity) && isnan(other.opacity))) && self.zIndex == other.zIndex; +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + @(self.visible).hash; + result = result * 31 + @(self.fadeIn).hash; + result = result * 31 + (isnan(self.opacity) ? (NSUInteger)0x7FF8000000000000 : @(self.opacity).hash); + result = result * 31 + @(self.zIndex).hash; + return result; +} @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; @@ -1561,11 +2360,28 @@ + (nullable FGMPlatformZoomRange *)nullableFromList:(NSArray *)list { self.max ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformZoomRange *other = (FGMPlatformZoomRange *)object; + return FLTPigeonDeepEquals(self.min, other.min) && FLTPigeonDeepEquals(self.max, other.max); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.min); + result = result * 31 + FLTPigeonDeepHash(self.max); + return result; +} @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; } @@ -1582,11 +2398,27 @@ + (nullable FGMPlatformBitmap *)nullableFromList:(NSArray *)list { self.bitmap ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmap *other = (FGMPlatformBitmap *)object; + return FLTPigeonDeepEquals(self.bitmap, other.bitmap); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.bitmap); + return result; +} @end @implementation FGMPlatformBitmapDefaultMarker + (instancetype)makeWithHue:(nullable NSNumber *)hue { - FGMPlatformBitmapDefaultMarker *pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init]; + FGMPlatformBitmapDefaultMarker* pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init]; pigeonResult.hue = hue; return pigeonResult; } @@ -1603,12 +2435,28 @@ + (nullable FGMPlatformBitmapDefaultMarker *)nullableFromList:(NSArray *)lis self.hue ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapDefaultMarker *other = (FGMPlatformBitmapDefaultMarker *)object; + return FLTPigeonDeepEquals(self.hue, other.hue); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.hue); + return result; +} @end @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; @@ -1628,11 +2476,29 @@ + (nullable FGMPlatformBitmapBytes *)nullableFromList:(NSArray *)list { self.size ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapBytes *other = (FGMPlatformBitmapBytes *)object; + return FLTPigeonDeepEquals(self.byteData, other.byteData) && FLTPigeonDeepEquals(self.size, other.size); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.byteData); + result = result * 31 + FLTPigeonDeepHash(self.size); + return result; +} @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; @@ -1652,13 +2518,30 @@ + (nullable FGMPlatformBitmapAsset *)nullableFromList:(NSArray *)list { self.pkg ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapAsset *other = (FGMPlatformBitmapAsset *)object; + return FLTPigeonDeepEquals(self.name, other.name) && FLTPigeonDeepEquals(self.pkg, other.pkg); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.name); + result = result * 31 + FLTPigeonDeepHash(self.pkg); + return result; +} @end @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; @@ -1681,15 +2564,33 @@ + (nullable FGMPlatformBitmapAssetImage *)nullableFromList:(NSArray *)list { self.size ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapAssetImage *other = (FGMPlatformBitmapAssetImage *)object; + return FLTPigeonDeepEquals(self.name, other.name) && (self.scale == other.scale || (isnan(self.scale) && isnan(other.scale))) && FLTPigeonDeepEquals(self.size, other.size); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.name); + result = result * 31 + (isnan(self.scale) ? (NSUInteger)0x7FF8000000000000 : @(self.scale).hash); + result = result * 31 + FLTPigeonDeepHash(self.size); + return result; +} @end @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,8 +2601,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); @@ -1720,15 +2620,35 @@ + (nullable FGMPlatformBitmapAssetMap *)nullableFromList:(NSArray *)list { self.height ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapAssetMap *other = (FGMPlatformBitmapAssetMap *)object; + return FLTPigeonDeepEquals(self.assetName, other.assetName) && self.bitmapScaling == other.bitmapScaling && (self.imagePixelRatio == other.imagePixelRatio || (isnan(self.imagePixelRatio) && isnan(other.imagePixelRatio))) && FLTPigeonDeepEquals(self.width, other.width) && FLTPigeonDeepEquals(self.height, other.height); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.assetName); + result = result * 31 + @(self.bitmapScaling).hash; + result = result * 31 + (isnan(self.imagePixelRatio) ? (NSUInteger)0x7FF8000000000000 : @(self.imagePixelRatio).hash); + result = result * 31 + FLTPigeonDeepHash(self.width); + result = result * 31 + FLTPigeonDeepHash(self.height); + return result; +} @end @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; @@ -1739,8 +2659,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); @@ -1759,16 +2678,36 @@ + (nullable FGMPlatformBitmapBytesMap *)nullableFromList:(NSArray *)list { self.height ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapBytesMap *other = (FGMPlatformBitmapBytesMap *)object; + return FLTPigeonDeepEquals(self.byteData, other.byteData) && self.bitmapScaling == other.bitmapScaling && (self.imagePixelRatio == other.imagePixelRatio || (isnan(self.imagePixelRatio) && isnan(other.imagePixelRatio))) && FLTPigeonDeepEquals(self.width, other.width) && FLTPigeonDeepEquals(self.height, other.height); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.byteData); + result = result * 31 + @(self.bitmapScaling).hash; + result = result * 31 + (isnan(self.imagePixelRatio) ? (NSUInteger)0x7FF8000000000000 : @(self.imagePixelRatio).hash); + result = result * 31 + FLTPigeonDeepHash(self.width); + result = result * 31 + FLTPigeonDeepHash(self.height); + return result; +} @end @implementation FGMPlatformBitmapPinConfig + (instancetype)makeWithBackgroundColor:(nullable FGMPlatformColor *)backgroundColor - borderColor:(nullable FGMPlatformColor *)borderColor - glyphColor:(nullable FGMPlatformColor *)glyphColor - glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor - glyphText:(nullable NSString *)glyphText - glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap { - FGMPlatformBitmapPinConfig *pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init]; + borderColor:(nullable FGMPlatformColor *)borderColor + glyphColor:(nullable FGMPlatformColor *)glyphColor + glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor + glyphText:(nullable NSString *)glyphText + glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap { + FGMPlatformBitmapPinConfig* pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init]; pigeonResult.backgroundColor = backgroundColor; pigeonResult.borderColor = borderColor; pigeonResult.glyphColor = glyphColor; @@ -1800,6 +2739,27 @@ + (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray *)list { self.glyphBitmap ?: [NSNull null], ]; } +- (BOOL)isEqual:(id)object { + if (self == object) { + return YES; + } + if (![object isKindOfClass:[self class]]) { + return NO; + } + FGMPlatformBitmapPinConfig *other = (FGMPlatformBitmapPinConfig *)object; + return FLTPigeonDeepEquals(self.backgroundColor, other.backgroundColor) && FLTPigeonDeepEquals(self.borderColor, other.borderColor) && FLTPigeonDeepEquals(self.glyphColor, other.glyphColor) && FLTPigeonDeepEquals(self.glyphTextColor, other.glyphTextColor) && FLTPigeonDeepEquals(self.glyphText, other.glyphText) && FLTPigeonDeepEquals(self.glyphBitmap, other.glyphBitmap); +} + +- (NSUInteger)hash { + NSUInteger result = [self class].hash; + result = result * 31 + FLTPigeonDeepHash(self.backgroundColor); + result = result * 31 + FLTPigeonDeepHash(self.borderColor); + result = result * 31 + FLTPigeonDeepHash(self.glyphColor); + result = result * 31 + FLTPigeonDeepHash(self.glyphTextColor); + result = result * 31 + FLTPigeonDeepHash(self.glyphText); + result = result * 31 + FLTPigeonDeepHash(self.glyphBitmap); + return result; +} @end @interface FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReader : FlutterStandardReader @@ -1809,125 +2769,115 @@ - (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 - : [[FGMPlatformMarkerCollisionBehaviorBox alloc] - initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformMarkerCollisionBehaviorBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 131: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil - ? nil - : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 132: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil - : [[FGMPlatformPatternItemTypeBox alloc] - initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformPatternItemTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 133: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil - ? nil - : [[FGMPlatformMarkerTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformMarkerTypeBox alloc] initWithValue:[enumAsNumber integerValue]]; } case 134: { NSNumber *enumAsNumber = [self readValue]; - return enumAsNumber == nil ? nil - : [[FGMPlatformMapBitmapScalingBox alloc] - initWithValue:[enumAsNumber integerValue]]; + return enumAsNumber == nil ? nil : [[FGMPlatformMapBitmapScalingBox alloc] initWithValue:[enumAsNumber integerValue]]; } - case 135: + case 135: return [FGMPlatformCameraPosition fromList:[self readValue]]; - case 136: + case 136: return [FGMPlatformCameraUpdate fromList:[self readValue]]; - case 137: + case 137: return [FGMPlatformCameraUpdateNewCameraPosition fromList:[self readValue]]; - case 138: + case 138: return [FGMPlatformCameraUpdateNewLatLng fromList:[self readValue]]; - case 139: + case 139: return [FGMPlatformCameraUpdateNewLatLngBounds fromList:[self readValue]]; - case 140: + case 140: + return [FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets fromList:[self readValue]]; + case 141: return [FGMPlatformCameraUpdateNewLatLngZoom fromList:[self readValue]]; - case 141: + case 142: return [FGMPlatformCameraUpdateScrollBy fromList:[self readValue]]; - case 142: + case 143: return [FGMPlatformCameraUpdateZoomBy fromList:[self readValue]]; - case 143: + case 144: return [FGMPlatformCameraUpdateZoom fromList:[self readValue]]; - case 144: + case 145: return [FGMPlatformCameraUpdateZoomTo fromList:[self readValue]]; - case 145: + case 146: return [FGMPlatformCircle fromList:[self readValue]]; - case 146: + case 147: return [FGMPlatformHeatmap fromList:[self readValue]]; - case 147: + case 148: return [FGMPlatformHeatmapGradient fromList:[self readValue]]; - case 148: + case 149: return [FGMPlatformWeightedLatLng fromList:[self readValue]]; - case 149: + case 150: return [FGMPlatformInfoWindow fromList:[self readValue]]; - case 150: + case 151: return [FGMPlatformCluster fromList:[self readValue]]; - case 151: + case 152: return [FGMPlatformClusterManager fromList:[self readValue]]; - case 152: + case 153: return [FGMPlatformMarker fromList:[self readValue]]; - case 153: + case 154: return [FGMPlatformPolygon fromList:[self readValue]]; - case 154: + case 155: return [FGMPlatformPolyline fromList:[self readValue]]; - case 155: + case 156: return [FGMPlatformPatternItem fromList:[self readValue]]; - case 156: + case 157: return [FGMPlatformTile fromList:[self readValue]]; - case 157: + case 158: return [FGMPlatformTileOverlay fromList:[self readValue]]; - case 158: + case 159: return [FGMPlatformEdgeInsets fromList:[self readValue]]; - case 159: + case 160: return [FGMPlatformLatLng fromList:[self readValue]]; - case 160: + case 161: return [FGMPlatformLatLngBounds fromList:[self readValue]]; - case 161: + case 162: return [FGMPlatformCameraTargetBounds fromList:[self readValue]]; - case 162: + case 163: return [FGMPlatformGroundOverlay fromList:[self readValue]]; - case 163: + case 164: return [FGMPlatformMapViewCreationParams fromList:[self readValue]]; - case 164: + case 165: return [FGMPlatformMapConfiguration fromList:[self readValue]]; - case 165: + case 166: return [FGMPlatformPoint fromList:[self readValue]]; - case 166: + case 167: return [FGMPlatformSize fromList:[self readValue]]; - case 167: + case 168: return [FGMPlatformColor fromList:[self readValue]]; - case 168: + case 169: return [FGMPlatformTileLayer fromList:[self readValue]]; - case 169: + case 170: return [FGMPlatformZoomRange fromList:[self readValue]]; - case 170: + case 171: return [FGMPlatformBitmap fromList:[self readValue]]; - case 171: + case 172: return [FGMPlatformBitmapDefaultMarker fromList:[self readValue]]; - case 172: + case 173: return [FGMPlatformBitmapBytes fromList:[self readValue]]; - case 173: + case 174: return [FGMPlatformBitmapAsset fromList:[self readValue]]; - case 174: + case 175: return [FGMPlatformBitmapAssetImage fromList:[self readValue]]; - case 175: + case 176: return [FGMPlatformBitmapAssetMap fromList:[self readValue]]; - case 176: + case 177: return [FGMPlatformBitmapBytesMap fromList:[self readValue]]; - case 177: + case 178: return [FGMPlatformBitmapPinConfig fromList:[self readValue]]; default: return [super readValueOfType:type]; @@ -1978,120 +2928,123 @@ - (void)writeValue:(id)value { } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngBounds class]]) { [self writeByte:139]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngZoom class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets class]]) { [self writeByte:140]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateScrollBy class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngZoom class]]) { [self writeByte:141]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomBy class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateScrollBy class]]) { [self writeByte:142]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoom class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomBy class]]) { [self writeByte:143]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomTo class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoom class]]) { [self writeByte:144]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCircle class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomTo class]]) { [self writeByte:145]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformHeatmap class]]) { + } else if ([value isKindOfClass:[FGMPlatformCircle class]]) { [self writeByte:146]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformHeatmapGradient class]]) { + } else if ([value isKindOfClass:[FGMPlatformHeatmap class]]) { [self writeByte:147]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformWeightedLatLng class]]) { + } else if ([value isKindOfClass:[FGMPlatformHeatmapGradient class]]) { [self writeByte:148]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformInfoWindow class]]) { + } else if ([value isKindOfClass:[FGMPlatformWeightedLatLng class]]) { [self writeByte:149]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCluster class]]) { + } else if ([value isKindOfClass:[FGMPlatformInfoWindow class]]) { [self writeByte:150]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformClusterManager class]]) { + } else if ([value isKindOfClass:[FGMPlatformCluster class]]) { [self writeByte:151]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformMarker class]]) { + } else if ([value isKindOfClass:[FGMPlatformClusterManager class]]) { [self writeByte:152]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) { + } else if ([value isKindOfClass:[FGMPlatformMarker class]]) { [self writeByte:153]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) { + } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) { [self writeByte:154]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) { + } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) { [self writeByte:155]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTile class]]) { + } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) { [self writeByte:156]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) { + } else if ([value isKindOfClass:[FGMPlatformTile class]]) { [self writeByte:157]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) { + } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) { [self writeByte:158]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) { + } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) { [self writeByte:159]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) { + } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) { [self writeByte:160]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) { + } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) { [self writeByte:161]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) { + } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) { [self writeByte:162]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) { + } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) { [self writeByte:163]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) { + } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) { [self writeByte:164]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformPoint class]]) { + } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) { [self writeByte:165]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformSize class]]) { + } else if ([value isKindOfClass:[FGMPlatformPoint class]]) { [self writeByte:166]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformColor class]]) { + } else if ([value isKindOfClass:[FGMPlatformSize class]]) { [self writeByte:167]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) { + } else if ([value isKindOfClass:[FGMPlatformColor class]]) { [self writeByte:168]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) { + } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) { [self writeByte:169]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) { + } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) { [self writeByte:170]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) { [self writeByte:171]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) { [self writeByte:172]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) { [self writeByte:173]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) { [self writeByte:174]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) { [self writeByte:175]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) { [self writeByte:176]; [self writeValue:[value toList]]; - } else if ([value isKindOfClass:[FGMPlatformBitmapPinConfig class]]) { + } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) { [self writeByte:177]; [self writeValue:[value toList]]; + } else if ([value isKindOfClass:[FGMPlatformBitmapPinConfig class]]) { + [self writeByte:178]; + [self writeValue:[value toList]]; } else { [super writeValue:value]; } @@ -2113,8 +3066,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; @@ -2123,24 +3075,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]; @@ -2155,18 +3100,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); @@ -2180,29 +3120,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 { @@ -2211,28 +3142,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 { @@ -2241,18 +3164,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); @@ -2267,29 +3185,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 { @@ -2298,28 +3207,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 { @@ -2328,29 +3229,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 { @@ -2359,29 +3251,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 { @@ -2390,29 +3273,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 { @@ -2421,18 +3295,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); @@ -2446,25 +3315,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 { @@ -2473,16 +3335,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]; @@ -2495,18 +3354,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); @@ -2521,27 +3375,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 { @@ -2550,17 +3396,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]; @@ -2572,18 +3414,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); @@ -2597,18 +3434,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); @@ -2623,25 +3455,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 { @@ -2654,17 +3479,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); @@ -2682,16 +3503,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]; @@ -2703,18 +3521,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); @@ -2728,17 +3541,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]; @@ -2750,17 +3559,13 @@ void SetUpFGMMapsApiWithSuffix(id binaryMessenger, } /// Returns true if the map supports advanced markers. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:[NSString stringWithFormat:@"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios." - @"MapsApi.isAdvancedMarkersAvailable", - messageChannelSuffix] + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; + codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(isAdvancedMarkersAvailable:)], - @"FGMMapsApi api (%@) doesn't respond to @selector(isAdvancedMarkersAvailable:)", - api); + NSCAssert([api respondsToSelector:@selector(isAdvancedMarkersAvailable:)], @"FGMMapsApi api (%@) doesn't respond to @selector(isAdvancedMarkersAvailable:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; NSNumber *output = [api isAdvancedMarkersAvailable:&error]; @@ -2781,450 +3586,335 @@ @implementation FGMMapsCallbackApi - (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger { return [self initWithBinaryMessenger:binaryMessenger messageChannelSuffix:@""]; } -- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger - messageChannelSuffix:(nullable NSString *)messageChannelSuffix { +- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger messageChannelSuffix:(nullable NSString*)messageChannelSuffix{ self = [self init]; if (self) { _binaryMessenger = binaryMessenger; - _messageChannelSuffix = [messageChannelSuffix length] == 0 - ? @"" - : [NSString stringWithFormat:@".%@", messageChannelSuffix]; + _messageChannelSuffix = [messageChannelSuffix length] == 0 ? @"" : [NSString stringWithFormat: @".%@", messageChannelSuffix]; } return self; } - (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion { - NSString *channelName = [NSString - stringWithFormat: - @"%@%@", - @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted", - _messageChannelSuffix]; - 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)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_groundOverlayId ?: [NSNull null]] reply:^(NSArray *reply) { + if (reply != nil) { + if (reply.count > 1) { + completion([FlutterError errorWithCode:reply[0] message:reply[1] details:reply[2]]); + } else { + completion(nil); + } + } else { + completion(createConnectionError(channelName)); + } + }]; +} +- (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId location:(FGMPlatformPoint *)arg_location zoom:(NSInteger)arg_zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion { + NSString *channelName = [NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile", _messageChannelSuffix]; + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:channelName - binaryMessenger:self.binaryMessenger - codec: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); @@ -3237,30 +3927,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]; @@ -3271,18 +3951,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]; @@ -3293,18 +3968,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]; @@ -3315,18 +3985,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]; @@ -3337,18 +4002,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]; @@ -3359,18 +4019,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]; @@ -3381,18 +4036,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]; @@ -3403,18 +4053,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]; @@ -3425,24 +4070,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 { @@ -3450,24 +4089,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 { @@ -3475,18 +4108,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); @@ -3499,16 +4127,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]; @@ -3519,24 +4144,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 { @@ -3544,16 +4163,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_shared_code/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_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h index 053f0f577650..7917bbd64e66 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/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_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/include/google_maps_flutter_ios/google_maps_flutter_pigeon_messages.g.h @@ -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.3.3), do not edit directly. // See also: https://pub.dev/packages/pigeon @import Foundation; @@ -28,7 +28,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapType) { - (instancetype)initWithValue:(FGMPlatformMapType)value; @end -/// Pigeon equivalent of MarkerCollisionBehavior. +/// Pigeon equivalent of the MarkerCollisionBehavior enum. typedef NS_ENUM(NSUInteger, FGMPlatformMarkerCollisionBehavior) { FGMPlatformMarkerCollisionBehaviorRequiredDisplay = 0, FGMPlatformMarkerCollisionBehaviorOptionalAndHidesLowerPriority = 1, @@ -95,6 +95,7 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { @class FGMPlatformCameraUpdateNewCameraPosition; @class FGMPlatformCameraUpdateNewLatLng; @class FGMPlatformCameraUpdateNewLatLngBounds; +@class FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets; @class FGMPlatformCameraUpdateNewLatLngZoom; @class FGMPlatformCameraUpdateScrollBy; @class FGMPlatformCameraUpdateZoomBy; @@ -138,26 +139,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 @@ -165,7 +166,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 @@ -173,83 +174,97 @@ 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 NewLatLngBoundsWithEdgeInsets +@interface FGMPlatformCameraUpdateNewLatLngBoundsWithEdgeInsets : NSObject +/// `init` unavailable to enforce nonnull fields, see the `make` class method. +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds + padding:(FGMPlatformEdgeInsets *)padding; +@property(nonatomic, strong) FGMPlatformLatLngBounds * bounds; +@property(nonatomic, strong) FGMPlatformEdgeInsets * 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. @@ -257,19 +272,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. @@ -281,20 +296,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. @@ -302,11 +318,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. @@ -314,13 +330,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. @@ -328,41 +344,41 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithIdentifier:(NSString *)identifier; -@property(nonatomic, copy) NSString *identifier; +@property(nonatomic, copy) NSString * identifier; @end /// Pigeon equivalent of the Marker class. @interface FGMPlatformMarker : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithAlpha:(double)alpha - anchor:(FGMPlatformPoint *)anchor - consumeTapEvents:(BOOL)consumeTapEvents - draggable:(BOOL)draggable - flat:(BOOL)flat - icon:(FGMPlatformBitmap *)icon - infoWindow:(FGMPlatformInfoWindow *)infoWindow - position:(FGMPlatformLatLng *)position - rotation:(double)rotation - visible:(BOOL)visible - zIndex:(NSInteger)zIndex - markerId:(NSString *)markerId - clusterManagerId:(nullable NSString *)clusterManagerId - collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior; -@property(nonatomic, assign) double alpha; -@property(nonatomic, strong) FGMPlatformPoint *anchor; -@property(nonatomic, assign) BOOL consumeTapEvents; -@property(nonatomic, assign) BOOL draggable; -@property(nonatomic, assign) BOOL flat; -@property(nonatomic, strong) FGMPlatformBitmap *icon; -@property(nonatomic, strong) FGMPlatformInfoWindow *infoWindow; -@property(nonatomic, strong) FGMPlatformLatLng *position; -@property(nonatomic, assign) double rotation; -@property(nonatomic, assign) BOOL visible; -@property(nonatomic, assign) NSInteger zIndex; -@property(nonatomic, copy) NSString *markerId; -@property(nonatomic, copy, nullable) NSString *clusterManagerId; -@property(nonatomic, strong, nullable) FGMPlatformMarkerCollisionBehaviorBox *collisionBehavior; ++ (instancetype)makeWithAlpha:(double )alpha + anchor:(FGMPlatformPoint *)anchor + consumeTapEvents:(BOOL )consumeTapEvents + draggable:(BOOL )draggable + flat:(BOOL )flat + icon:(FGMPlatformBitmap *)icon + infoWindow:(FGMPlatformInfoWindow *)infoWindow + position:(FGMPlatformLatLng *)position + rotation:(double )rotation + visible:(BOOL )visible + zIndex:(NSInteger )zIndex + markerId:(NSString *)markerId + clusterManagerId:(nullable NSString *)clusterManagerId + collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior; +@property(nonatomic, assign) double alpha; +@property(nonatomic, strong) FGMPlatformPoint * anchor; +@property(nonatomic, assign) BOOL consumeTapEvents; +@property(nonatomic, assign) BOOL draggable; +@property(nonatomic, assign) BOOL flat; +@property(nonatomic, strong) FGMPlatformBitmap * icon; +@property(nonatomic, strong) FGMPlatformInfoWindow * infoWindow; +@property(nonatomic, strong) FGMPlatformLatLng * position; +@property(nonatomic, assign) double rotation; +@property(nonatomic, assign) BOOL visible; +@property(nonatomic, assign) NSInteger zIndex; +@property(nonatomic, copy) NSString * markerId; +@property(nonatomic, copy, nullable) NSString * clusterManagerId; +@property(nonatomic, strong, nullable) FGMPlatformMarkerCollisionBehaviorBox * collisionBehavior; @end /// Pigeon equivalent of the Polygon class. @@ -370,25 +386,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. @@ -396,48 +412,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. @@ -445,37 +462,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. @@ -483,9 +504,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. @@ -494,7 +515,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. @@ -502,54 +523,53 @@ 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. @@ -557,91 +577,97 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled - cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds - mapType:(nullable FGMPlatformMapTypeBox *)mapType - minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference - rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled - scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled - tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled - trackCameraPosition:(nullable NSNumber *)trackCameraPosition - zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled - myLocationEnabled:(nullable NSNumber *)myLocationEnabled - myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled - padding:(nullable FGMPlatformEdgeInsets *)padding - indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled - trafficEnabled:(nullable NSNumber *)trafficEnabled - buildingsEnabled:(nullable NSNumber *)buildingsEnabled - markerType:(FGMPlatformMarkerType)markerType - mapId:(nullable NSString *)mapId - style:(nullable NSString *)style; -@property(nonatomic, strong, nullable) NSNumber *compassEnabled; -@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds *cameraTargetBounds; -@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox *mapType; -@property(nonatomic, strong, nullable) FGMPlatformZoomRange *minMaxZoomPreference; -@property(nonatomic, strong, nullable) NSNumber *rotateGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *scrollGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *tiltGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *trackCameraPosition; -@property(nonatomic, strong, nullable) NSNumber *zoomGesturesEnabled; -@property(nonatomic, strong, nullable) NSNumber *myLocationEnabled; -@property(nonatomic, strong, nullable) NSNumber *myLocationButtonEnabled; -@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets *padding; -@property(nonatomic, strong, nullable) NSNumber *indoorViewEnabled; -@property(nonatomic, strong, nullable) NSNumber *trafficEnabled; -@property(nonatomic, strong, nullable) NSNumber *buildingsEnabled; + cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds + mapType:(nullable FGMPlatformMapTypeBox *)mapType + minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference + rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled + scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled + tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled + trackCameraPosition:(nullable NSNumber *)trackCameraPosition + zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled + myLocationEnabled:(nullable NSNumber *)myLocationEnabled + myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled + padding:(nullable FGMPlatformEdgeInsets *)padding + indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled + trafficEnabled:(nullable NSNumber *)trafficEnabled + buildingsEnabled:(nullable NSNumber *)buildingsEnabled + markerType:(FGMPlatformMarkerType)markerType + mapId:(nullable NSString *)mapId + style:(nullable NSString *)style; +@property(nonatomic, strong, nullable) NSNumber * compassEnabled; +@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds * cameraTargetBounds; +@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox * mapType; +@property(nonatomic, strong, nullable) FGMPlatformZoomRange * minMaxZoomPreference; +@property(nonatomic, strong, nullable) NSNumber * rotateGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * scrollGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * tiltGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * trackCameraPosition; +@property(nonatomic, strong, nullable) NSNumber * zoomGesturesEnabled; +@property(nonatomic, strong, nullable) NSNumber * myLocationEnabled; +@property(nonatomic, strong, nullable) NSNumber * myLocationButtonEnabled; +@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets * padding; +@property(nonatomic, strong, nullable) NSNumber * indoorViewEnabled; +@property(nonatomic, strong, nullable) NSNumber * trafficEnabled; +@property(nonatomic, strong, nullable) NSNumber * buildingsEnabled; @property(nonatomic, assign) FGMPlatformMarkerType markerType; -@property(nonatomic, copy, nullable) NSString *mapId; -@property(nonatomic, copy, nullable) NSString *style; +@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 @@ -650,7 +676,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]. @@ -658,13 +684,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]. @@ -672,18 +698,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]. @@ -691,11 +718,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]. @@ -703,15 +730,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]. @@ -719,31 +746,31 @@ typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData - bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling - imagePixelRatio:(double)imagePixelRatio - width:(nullable NSNumber *)width - height:(nullable NSNumber *)height; -@property(nonatomic, strong) FlutterStandardTypedData *byteData; + bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling + imagePixelRatio:(double )imagePixelRatio + width:(nullable NSNumber *)width + height:(nullable NSNumber *)height; +@property(nonatomic, strong) FlutterStandardTypedData * byteData; @property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling; -@property(nonatomic, assign) double imagePixelRatio; -@property(nonatomic, strong, nullable) NSNumber *width; -@property(nonatomic, strong, nullable) NSNumber *height; +@property(nonatomic, assign) double imagePixelRatio; +@property(nonatomic, strong, nullable) NSNumber * width; +@property(nonatomic, strong, nullable) NSNumber * height; @end /// Pigeon equivalent of [PinConfig]. @interface FGMPlatformBitmapPinConfig : NSObject + (instancetype)makeWithBackgroundColor:(nullable FGMPlatformColor *)backgroundColor - borderColor:(nullable FGMPlatformColor *)borderColor - glyphColor:(nullable FGMPlatformColor *)glyphColor - glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor - glyphText:(nullable NSString *)glyphText - glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap; -@property(nonatomic, strong, nullable) FGMPlatformColor *backgroundColor; -@property(nonatomic, strong, nullable) FGMPlatformColor *borderColor; -@property(nonatomic, strong, nullable) FGMPlatformColor *glyphColor; -@property(nonatomic, strong, nullable) FGMPlatformColor *glyphTextColor; -@property(nonatomic, copy, nullable) NSString *glyphText; -@property(nonatomic, strong, nullable) FGMPlatformBitmap *glyphBitmap; + borderColor:(nullable FGMPlatformColor *)borderColor + glyphColor:(nullable FGMPlatformColor *)glyphColor + glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor + glyphText:(nullable NSString *)glyphText + glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap; +@property(nonatomic, strong, nullable) FGMPlatformColor * backgroundColor; +@property(nonatomic, strong, nullable) FGMPlatformColor * borderColor; +@property(nonatomic, strong, nullable) FGMPlatformColor * glyphColor; +@property(nonatomic, strong, nullable) FGMPlatformColor * glyphTextColor; +@property(nonatomic, copy, nullable) NSString * glyphText; +@property(nonatomic, strong, nullable) FGMPlatformBitmap * glyphBitmap; @end /// The codec used by all APIs. @@ -759,87 +786,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. /// @@ -853,97 +847,70 @@ 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; /// Returns true if the map supports advanced markers. /// /// @return `nil` only when `error != nil`. - (nullable NSNumber *)isAdvancedMarkersAvailable:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsApi(id binaryMessenger, - NSObject *_Nullable api); +extern void SetUpFGMMapsApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); -extern void SetUpFGMMapsApiWithSuffix(id binaryMessenger, - NSObject *_Nullable api, - NSString *messageChannelSuffix); /// Interface for calls from the native SDK to Dart. @interface FGMMapsCallbackApi : NSObject - (instancetype)initWithBinaryMessenger:(id)binaryMessenger; -- (instancetype)initWithBinaryMessenger:(id)binaryMessenger - messageChannelSuffix:(nullable NSString *)messageChannelSuffix; +- (instancetype)initWithBinaryMessenger:(id)binaryMessenger messageChannelSuffix:(nullable NSString *)messageChannelSuffix; /// Called when the map camera starts moving. - (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map camera moves. -- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition completion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map camera stops moving. - (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map, not a specifc map object, is tapped. -- (void)didTapAtPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when the map, not a specifc map object, is long pressed. -- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker is tapped. -- (void)didTapMarkerWithIdentifier:(NSString *)markerId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag starts. -- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag updates. -- (void)didDragMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker drag ends. -- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId - atPosition:(FGMPlatformLatLng *)position - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker's info window is tapped. -- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a circle is tapped. -- (void)didTapCircleWithIdentifier:(NSString *)circleId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapCircleWithIdentifier:(NSString *)circleId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a marker cluster is tapped. -- (void)didTapCluster:(FGMPlatformCluster *)cluster - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapCluster:(FGMPlatformCluster *)cluster completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a polygon is tapped. -- (void)didTapPolygonWithIdentifier:(NSString *)polygonId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPolygonWithIdentifier:(NSString *)polygonId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a polyline is tapped. -- (void)didTapPolylineWithIdentifier:(NSString *)polylineId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapPolylineWithIdentifier:(NSString *)polylineId completion:(void (^)(FlutterError *_Nullable))completion; /// Called when a ground overlay is tapped. -- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId - completion:(void (^)(FlutterError *_Nullable))completion; +- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId completion:(void (^)(FlutterError *_Nullable))completion; /// Called to get data for a map tile. -- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId - location:(FGMPlatformPoint *)location - zoom:(NSInteger)zoom - completion:(void (^)(FGMPlatformTile *_Nullable, - FlutterError *_Nullable))completion; +- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId location:(FGMPlatformPoint *)location zoom:(NSInteger)zoom completion:(void (^)(FGMPlatformTile *_Nullable, FlutterError *_Nullable))completion; @end + /// Dummy interface to force generation of the platform view creation params, /// which are not used in any Pigeon calls, only the platform view creation /// call made internally by Flutter. @protocol FGMMapsPlatformViewApi -- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type - error:(FlutterError *_Nullable *_Nonnull)error; +- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type error:(FlutterError *_Nullable *_Nonnull)error; @end -extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, - NSObject *_Nullable api); +extern void SetUpFGMMapsPlatformViewApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); -extern void SetUpFGMMapsPlatformViewApiWithSuffix(id binaryMessenger, - NSObject *_Nullable api, - NSString *messageChannelSuffix); /// Inspector API only intended for use in integration tests. @protocol FGMMapsInspectorApi @@ -963,29 +930,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_shared_code/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/lib/src/google_maps_flutter_ios.dart index c1709a97ad52..3840a3737daf 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/lib/src/google_maps_flutter_ios.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/lib/src/google_maps_flutter_ios.dart @@ -886,6 +886,19 @@ class GoogleMapsFlutterIOS extends GoogleMapsFlutterPlatform { dy: update.dy, ), ); + case CameraUpdateType.newLatLngBoundsWithEdgeInsets: + update as CameraUpdateNewLatLngBoundsWithEdgeInsets; + return PlatformCameraUpdate( + cameraUpdate: PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets( + bounds: _platformLatLngBoundsFromLatLngBounds(update.bounds)!, + padding: PlatformEdgeInsets( + top: update.padding.top, + left: update.padding.left, + bottom: update.padding.bottom, + right: update.padding.right, + ), + ), + ); } } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/lib/src/messages.g.dart index 87fd64fcb0bc..24482c82ff61 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/lib/src/messages.g.dart @@ -1,28 +1,44 @@ // 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.3.3), 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: unused_import, unused_shown_name +// ignore_for_file: type=lint import 'dart:async'; -import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; +import 'dart:typed_data' show Float64List, Int32List, Int64List; -import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; import 'package:flutter/services.dart'; +import 'package:meta/meta.dart' show immutable, protected, visibleForTesting; -PlatformException _createConnectionError(String channelName) { - return PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel: "$channelName".', - ); +Object? _extractReplyValueOrThrow( + List? replyList, + String channelName, { + required bool isNullValid, +}) { + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel: "$channelName".', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } + return replyList.firstOrNull; } -List wrapResponse({ - Object? result, - PlatformException? error, - bool empty = false, -}) { + +List wrapResponse({Object? result, PlatformException? error, bool empty = false}) { if (empty) { return []; } @@ -31,29 +47,79 @@ List wrapResponse({ } return [error.code, error.message, error.details]; } - bool _deepEquals(Object? a, Object? b) { + if (identical(a, b)) { + return true; + } + if (a is double && b is double) { + if (a.isNaN && b.isNaN) { + return true; + } + return a == 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]), - ); + if (a.length != b.length) { + return false; + } + for (final MapEntry entryA in a.entries) { + bool found = false; + for (final MapEntry entryB in b.entries) { + if (_deepEquals(entryA.key, entryB.key)) { + if (_deepEquals(entryA.value, entryB.value)) { + found = true; + break; + } else { + return false; + } + } + } + if (!found) { + return false; + } + } + return true; } return a == b; } +int _deepHash(Object? value) { + if (value is List) { + return Object.hashAll(value.map(_deepHash)); + } + if (value is Map) { + int result = 0; + for (final MapEntry entry in value.entries) { + result += (_deepHash(entry.key) * 31) ^ _deepHash(entry.value); + } + return result; + } + if (value is double && value.isNaN) { + // Normalize NaN to a consistent hash. + return 0x7FF8000000000000.hashCode; + } + if (value is double && value == 0.0) { + // Normalize -0.0 to 0.0 so they have the same hash code. + return 0.0.hashCode; + } + return value.hashCode; +} + + /// Pigeon equivalent of MapType -enum PlatformMapType { none, normal, satellite, terrain, hybrid } +enum PlatformMapType { + none, + normal, + satellite, + terrain, + hybrid, +} -/// Pigeon equivalent of MarkerCollisionBehavior. +/// Pigeon equivalent of the MarkerCollisionBehavior enum. enum PlatformMarkerCollisionBehavior { requiredDisplay, optionalAndHidesLowerPriority, @@ -61,15 +127,29 @@ enum PlatformMarkerCollisionBehavior { } /// 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, +} -enum PlatformMarkerType { marker, advancedMarker } +enum PlatformMarkerType { + marker, + advancedMarker, +} /// Pigeon equivalent of [MapBitmapScaling]. -enum PlatformMapBitmapScaling { auto, none } +enum PlatformMapBitmapScaling { + auto, + none, +} /// Pigeon representatation of a CameraPosition. class PlatformCameraPosition { @@ -89,12 +169,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; @@ -115,17 +199,19 @@ class PlatformCameraPosition { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(bearing, other.bearing) && _deepEquals(target, other.target) && _deepEquals(tilt, other.tilt) && _deepEquals(zoom, other.zoom); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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 @@ -134,16 +220,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 @@ -155,27 +244,30 @@ class PlatformCameraUpdate { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(cameraUpdate, other.cameraUpdate); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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,56 +279,59 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(cameraPosition, other.cameraPosition); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(latLng, other.latLng); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of NewLatLngBounds @@ -251,12 +346,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,36 +366,86 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(bounds, other.bounds) && _deepEquals(padding, other.padding); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); +} + +/// Pigeon equivalent of NewLatLngBoundsWithEdgeInsets +class PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets { + PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets({ + required this.bounds, + required this.padding, + }); + + PlatformLatLngBounds bounds; + + PlatformEdgeInsets padding; + + List _toList() { + return [ + bounds, + padding, + ]; + } + + Object encode() { + return _toList(); } + + static PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets decode(Object result) { + result as List; + return PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets( + bounds: result[0]! as PlatformLatLngBounds, + padding: result[1]! as PlatformEdgeInsets, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(bounds, other.bounds) && _deepEquals(padding, other.padding); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => _deepHash([runtimeType, ..._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,36 +458,40 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(latLng, other.latLng) && _deepEquals(zoom, other.zoom); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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,36 +504,40 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(dx, other.dx) && _deepEquals(dy, other.dy); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -395,93 +550,100 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(amount, other.amount) && _deepEquals(focus, other.focus); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(out, other.out); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(zoom, other.zoom); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Circle class. @@ -531,8 +693,7 @@ class PlatformCircle { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformCircle decode(Object result) { result as List; @@ -558,12 +719,12 @@ class PlatformCircle { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(consumeTapEvents, other.consumeTapEvents) && _deepEquals(fillColor, other.fillColor) && _deepEquals(strokeColor, other.strokeColor) && _deepEquals(visible, other.visible) && _deepEquals(strokeWidth, other.strokeWidth) && _deepEquals(zIndex, other.zIndex) && _deepEquals(center, other.center) && _deepEquals(radius, other.radius) && _deepEquals(circleId, other.circleId); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Heatmap class. @@ -605,14 +766,13 @@ class PlatformHeatmap { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformHeatmap decode(Object result) { result as List; return PlatformHeatmap( heatmapId: result[0]! as String, - data: (result[1] as List?)!.cast(), + data: (result[1]! as List).cast(), gradient: result[2] as PlatformHeatmapGradient?, opacity: result[3]! as double, radius: result[4]! as int, @@ -630,12 +790,12 @@ class PlatformHeatmap { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(heatmapId, other.heatmapId) && _deepEquals(data, other.data) && _deepEquals(gradient, other.gradient) && _deepEquals(opacity, other.opacity) && _deepEquals(radius, other.radius) && _deepEquals(minimumZoomIntensity, other.minimumZoomIntensity) && _deepEquals(maximumZoomIntensity, other.maximumZoomIntensity); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the HeatmapGradient class. @@ -657,18 +817,21 @@ 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; return PlatformHeatmapGradient( - colors: (result[0] as List?)!.cast(), - startPoints: (result[1] as List?)!.cast(), + colors: (result[0]! as List).cast(), + startPoints: (result[1]! as List).cast(), colorMapSize: result[2]! as int, ); } @@ -682,29 +845,34 @@ class PlatformHeatmapGradient { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(colors, other.colors) && _deepEquals(startPoints, other.startPoints) && _deepEquals(colorMapSize, other.colorMapSize); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -723,17 +891,21 @@ class PlatformWeightedLatLng { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(point, other.point) && _deepEquals(weight, other.weight); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -742,12 +914,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; @@ -767,12 +942,12 @@ class PlatformInfoWindow { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(title, other.title) && _deepEquals(snippet, other.snippet) && _deepEquals(anchor, other.anchor); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of Cluster. @@ -793,12 +968,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; @@ -806,7 +985,7 @@ class PlatformCluster { clusterManagerId: result[0]! as String, position: result[1]! as PlatformLatLng, bounds: result[2]! as PlatformLatLngBounds, - markerIds: (result[3] as List?)!.cast(), + markerIds: (result[3]! as List).cast(), ); } @@ -819,31 +998,36 @@ class PlatformCluster { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(clusterManagerId, other.clusterManagerId) && _deepEquals(position, other.position) && _deepEquals(bounds, other.bounds) && _deepEquals(markerIds, other.markerIds); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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 @@ -855,12 +1039,12 @@ class PlatformClusterManager { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(identifier, other.identifier); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Marker class. @@ -930,8 +1114,7 @@ class PlatformMarker { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformMarker decode(Object result) { result as List; @@ -962,12 +1145,12 @@ class PlatformMarker { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(alpha, other.alpha) && _deepEquals(anchor, other.anchor) && _deepEquals(consumeTapEvents, other.consumeTapEvents) && _deepEquals(draggable, other.draggable) && _deepEquals(flat, other.flat) && _deepEquals(icon, other.icon) && _deepEquals(infoWindow, other.infoWindow) && _deepEquals(position, other.position) && _deepEquals(rotation, other.rotation) && _deepEquals(visible, other.visible) && _deepEquals(zIndex, other.zIndex) && _deepEquals(markerId, other.markerId) && _deepEquals(clusterManagerId, other.clusterManagerId) && _deepEquals(collisionBehavior, other.collisionBehavior); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Polygon class. @@ -1021,8 +1204,7 @@ class PlatformPolygon { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformPolygon decode(Object result) { result as List; @@ -1031,8 +1213,8 @@ class PlatformPolygon { 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>(), + 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, @@ -1049,12 +1231,12 @@ class PlatformPolygon { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(polygonId, other.polygonId) && _deepEquals(consumesTapEvents, other.consumesTapEvents) && _deepEquals(fillColor, other.fillColor) && _deepEquals(geodesic, other.geodesic) && _deepEquals(points, other.points) && _deepEquals(holes, other.holes) && _deepEquals(visible, other.visible) && _deepEquals(strokeColor, other.strokeColor) && _deepEquals(strokeWidth, other.strokeWidth) && _deepEquals(zIndex, other.zIndex); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the Polyline class. @@ -1110,8 +1292,7 @@ class PlatformPolyline { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformPolyline decode(Object result) { result as List; @@ -1121,8 +1302,8 @@ class PlatformPolyline { 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(), + 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, @@ -1138,29 +1319,34 @@ class PlatformPolyline { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(polylineId, other.polylineId) && _deepEquals(consumesTapEvents, other.consumesTapEvents) && _deepEquals(color, other.color) && _deepEquals(geodesic, other.geodesic) && _deepEquals(jointType, other.jointType) && _deepEquals(patterns, other.patterns) && _deepEquals(points, other.points) && _deepEquals(visible, other.visible) && _deepEquals(width, other.width) && _deepEquals(zIndex, other.zIndex); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1179,17 +1365,21 @@ class PlatformPatternItem { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(type, other.type) && _deepEquals(length, other.length); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1198,12 +1388,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; @@ -1223,12 +1416,12 @@ class PlatformTile { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(width, other.width) && _deepEquals(height, other.height) && _deepEquals(data, other.data); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the TileOverlay class. @@ -1266,8 +1459,7 @@ class PlatformTileOverlay { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformTileOverlay decode(Object result) { result as List; @@ -1290,12 +1482,12 @@ class PlatformTileOverlay { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(tileOverlayId, other.tileOverlayId) && _deepEquals(fadeIn, other.fadeIn) && _deepEquals(transparency, other.transparency) && _deepEquals(zIndex, other.zIndex) && _deepEquals(visible, other.visible) && _deepEquals(tileSize, other.tileSize); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of Flutter's EdgeInsets. @@ -1316,12 +1508,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; @@ -1342,29 +1538,34 @@ class PlatformEdgeInsets { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(top, other.top) && _deepEquals(bottom, other.bottom) && _deepEquals(left, other.left) && _deepEquals(right, other.right); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1383,29 +1584,34 @@ class PlatformLatLng { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(latitude, other.latitude) && _deepEquals(longitude, other.longitude); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1424,12 +1630,12 @@ class PlatformLatLngBounds { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(northeast, other.northeast) && _deepEquals(southwest, other.southwest); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of CameraTargetBounds. @@ -1437,17 +1643,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; @@ -1459,19 +1668,18 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(bounds, other.bounds); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of the GroundOverlay class. @@ -1529,8 +1737,7 @@ class PlatformGroundOverlay { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformGroundOverlay decode(Object result) { result as List; @@ -1558,12 +1765,12 @@ class PlatformGroundOverlay { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(groundOverlayId, other.groundOverlayId) && _deepEquals(image, other.image) && _deepEquals(position, other.position) && _deepEquals(bounds, other.bounds) && _deepEquals(anchor, other.anchor) && _deepEquals(transparency, other.transparency) && _deepEquals(bearing, other.bearing) && _deepEquals(zIndex, other.zIndex) && _deepEquals(visible, other.visible) && _deepEquals(clickable, other.clickable) && _deepEquals(zoomLevel, other.zoomLevel); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Information passed to the platform view creation. @@ -1617,44 +1824,39 @@ class PlatformMapViewCreationParams { } Object encode() { - return _toList(); - } + 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(), + 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) { + if (other is! PlatformMapViewCreationParams || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(initialCameraPosition, other.initialCameraPosition) && _deepEquals(mapConfiguration, other.mapConfiguration) && _deepEquals(initialCircles, other.initialCircles) && _deepEquals(initialMarkers, other.initialMarkers) && _deepEquals(initialPolygons, other.initialPolygons) && _deepEquals(initialPolylines, other.initialPolylines) && _deepEquals(initialHeatmaps, other.initialHeatmaps) && _deepEquals(initialTileOverlays, other.initialTileOverlays) && _deepEquals(initialClusterManagers, other.initialClusterManagers) && _deepEquals(initialGroundOverlays, other.initialGroundOverlays); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of MapConfiguration. @@ -1740,8 +1942,7 @@ class PlatformMapConfiguration { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformMapConfiguration decode(Object result) { result as List; @@ -1770,40 +1971,47 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(compassEnabled, other.compassEnabled) && _deepEquals(cameraTargetBounds, other.cameraTargetBounds) && _deepEquals(mapType, other.mapType) && _deepEquals(minMaxZoomPreference, other.minMaxZoomPreference) && _deepEquals(rotateGesturesEnabled, other.rotateGesturesEnabled) && _deepEquals(scrollGesturesEnabled, other.scrollGesturesEnabled) && _deepEquals(tiltGesturesEnabled, other.tiltGesturesEnabled) && _deepEquals(trackCameraPosition, other.trackCameraPosition) && _deepEquals(zoomGesturesEnabled, other.zoomGesturesEnabled) && _deepEquals(myLocationEnabled, other.myLocationEnabled) && _deepEquals(myLocationButtonEnabled, other.myLocationButtonEnabled) && _deepEquals(padding, other.padding) && _deepEquals(indoorViewEnabled, other.indoorViewEnabled) && _deepEquals(trafficEnabled, other.trafficEnabled) && _deepEquals(buildingsEnabled, other.buildingsEnabled) && _deepEquals(markerType, other.markerType) && _deepEquals(mapId, other.mapId) && _deepEquals(style, other.style); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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 @@ -1815,29 +2023,34 @@ class PlatformPoint { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(x, other.x) && _deepEquals(y, other.y); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -1856,12 +2069,12 @@ class PlatformSize { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(width, other.width) && _deepEquals(height, other.height); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon representation of a color. @@ -1882,12 +2095,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; @@ -1908,12 +2125,12 @@ class PlatformColor { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(red, other.red) && _deepEquals(green, other.green) && _deepEquals(blue, other.blue) && _deepEquals(alpha, other.alpha); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of GMSTileLayer properties. @@ -1934,12 +2151,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; @@ -1960,29 +2181,34 @@ class PlatformTileLayer { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(visible, other.visible) && _deepEquals(fadeIn, other.fadeIn) && _deepEquals(opacity, other.opacity) && _deepEquals(zIndex, other.zIndex); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -2001,19 +2227,21 @@ class PlatformZoomRange { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(min, other.min) && _deepEquals(max, other.max); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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], @@ -2025,16 +2253,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 @@ -2046,66 +2277,75 @@ class PlatformBitmap { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(bitmap, other.bitmap); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(hue, other.hue); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -2124,29 +2364,34 @@ class PlatformBitmapBytes { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(byteData, other.byteData) && _deepEquals(size, other.size); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._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; @@ -2165,12 +2410,12 @@ class PlatformBitmapAsset { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(name, other.name) && _deepEquals(pkg, other.pkg); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of [AssetImageBitmap]. @@ -2188,12 +2433,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; @@ -2207,19 +2455,18 @@ 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)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(name, other.name) && _deepEquals(scale, other.scale) && _deepEquals(size, other.size); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of [AssetMapBitmap]. @@ -2243,12 +2490,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; @@ -2270,12 +2522,12 @@ class PlatformBitmapAssetMap { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(assetName, other.assetName) && _deepEquals(bitmapScaling, other.bitmapScaling) && _deepEquals(imagePixelRatio, other.imagePixelRatio) && _deepEquals(width, other.width) && _deepEquals(height, other.height); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of [BytesMapBitmap]. @@ -2299,12 +2551,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; @@ -2326,12 +2583,12 @@ class PlatformBitmapBytesMap { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(byteData, other.byteData) && _deepEquals(bitmapScaling, other.bitmapScaling) && _deepEquals(imagePixelRatio, other.imagePixelRatio) && _deepEquals(width, other.width) && _deepEquals(height, other.height); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } /// Pigeon equivalent of [PinConfig]. @@ -2369,8 +2626,7 @@ class PlatformBitmapPinConfig { } Object encode() { - return _toList(); - } + return _toList(); } static PlatformBitmapPinConfig decode(Object result) { result as List; @@ -2393,14 +2649,15 @@ class PlatformBitmapPinConfig { if (identical(this, other)) { return true; } - return _deepEquals(encode(), other.encode()); + return _deepEquals(backgroundColor, other.backgroundColor) && _deepEquals(borderColor, other.borderColor) && _deepEquals(glyphColor, other.glyphColor) && _deepEquals(glyphTextColor, other.glyphTextColor) && _deepEquals(glyphText, other.glyphText) && _deepEquals(glyphBitmap, other.glyphBitmap); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes - int get hashCode => Object.hashAll(_toList()); + int get hashCode => _deepHash([runtimeType, ..._toList()]); } + class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override @@ -2408,153 +2665,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 PlatformMarkerCollisionBehavior) { + } else if (value is PlatformMarkerCollisionBehavior) { buffer.putUint8(130); writeValue(buffer, value.index); - } else if (value is PlatformJointType) { + } else if (value is PlatformJointType) { buffer.putUint8(131); writeValue(buffer, value.index); - } else if (value is PlatformPatternItemType) { + } else if (value is PlatformPatternItemType) { buffer.putUint8(132); writeValue(buffer, value.index); - } else if (value is PlatformMarkerType) { + } else if (value is PlatformMarkerType) { buffer.putUint8(133); writeValue(buffer, value.index); - } else if (value is PlatformMapBitmapScaling) { + } else if (value is PlatformMapBitmapScaling) { buffer.putUint8(134); writeValue(buffer, value.index); - } else if (value is PlatformCameraPosition) { + } else if (value is PlatformCameraPosition) { buffer.putUint8(135); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdate) { + } else if (value is PlatformCameraUpdate) { buffer.putUint8(136); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewCameraPosition) { + } else if (value is PlatformCameraUpdateNewCameraPosition) { buffer.putUint8(137); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLng) { + } else if (value is PlatformCameraUpdateNewLatLng) { buffer.putUint8(138); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngBounds) { + } else if (value is PlatformCameraUpdateNewLatLngBounds) { buffer.putUint8(139); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateNewLatLngZoom) { + } else if (value is PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets) { buffer.putUint8(140); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateScrollBy) { + } else if (value is PlatformCameraUpdateNewLatLngZoom) { buffer.putUint8(141); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomBy) { + } else if (value is PlatformCameraUpdateScrollBy) { buffer.putUint8(142); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoom) { + } else if (value is PlatformCameraUpdateZoomBy) { buffer.putUint8(143); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraUpdateZoomTo) { + } else if (value is PlatformCameraUpdateZoom) { buffer.putUint8(144); writeValue(buffer, value.encode()); - } else if (value is PlatformCircle) { + } else if (value is PlatformCameraUpdateZoomTo) { buffer.putUint8(145); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmap) { + } else if (value is PlatformCircle) { buffer.putUint8(146); writeValue(buffer, value.encode()); - } else if (value is PlatformHeatmapGradient) { + } else if (value is PlatformHeatmap) { buffer.putUint8(147); writeValue(buffer, value.encode()); - } else if (value is PlatformWeightedLatLng) { + } else if (value is PlatformHeatmapGradient) { buffer.putUint8(148); writeValue(buffer, value.encode()); - } else if (value is PlatformInfoWindow) { + } else if (value is PlatformWeightedLatLng) { buffer.putUint8(149); writeValue(buffer, value.encode()); - } else if (value is PlatformCluster) { + } else if (value is PlatformInfoWindow) { buffer.putUint8(150); writeValue(buffer, value.encode()); - } else if (value is PlatformClusterManager) { + } else if (value is PlatformCluster) { buffer.putUint8(151); writeValue(buffer, value.encode()); - } else if (value is PlatformMarker) { + } else if (value is PlatformClusterManager) { buffer.putUint8(152); writeValue(buffer, value.encode()); - } else if (value is PlatformPolygon) { + } else if (value is PlatformMarker) { buffer.putUint8(153); writeValue(buffer, value.encode()); - } else if (value is PlatformPolyline) { + } else if (value is PlatformPolygon) { buffer.putUint8(154); writeValue(buffer, value.encode()); - } else if (value is PlatformPatternItem) { + } else if (value is PlatformPolyline) { buffer.putUint8(155); writeValue(buffer, value.encode()); - } else if (value is PlatformTile) { + } else if (value is PlatformPatternItem) { buffer.putUint8(156); writeValue(buffer, value.encode()); - } else if (value is PlatformTileOverlay) { + } else if (value is PlatformTile) { buffer.putUint8(157); writeValue(buffer, value.encode()); - } else if (value is PlatformEdgeInsets) { + } else if (value is PlatformTileOverlay) { buffer.putUint8(158); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLng) { + } else if (value is PlatformEdgeInsets) { buffer.putUint8(159); writeValue(buffer, value.encode()); - } else if (value is PlatformLatLngBounds) { + } else if (value is PlatformLatLng) { buffer.putUint8(160); writeValue(buffer, value.encode()); - } else if (value is PlatformCameraTargetBounds) { + } else if (value is PlatformLatLngBounds) { buffer.putUint8(161); writeValue(buffer, value.encode()); - } else if (value is PlatformGroundOverlay) { + } else if (value is PlatformCameraTargetBounds) { buffer.putUint8(162); writeValue(buffer, value.encode()); - } else if (value is PlatformMapViewCreationParams) { + } else if (value is PlatformGroundOverlay) { buffer.putUint8(163); writeValue(buffer, value.encode()); - } else if (value is PlatformMapConfiguration) { + } else if (value is PlatformMapViewCreationParams) { buffer.putUint8(164); writeValue(buffer, value.encode()); - } else if (value is PlatformPoint) { + } else if (value is PlatformMapConfiguration) { buffer.putUint8(165); writeValue(buffer, value.encode()); - } else if (value is PlatformSize) { + } else if (value is PlatformPoint) { buffer.putUint8(166); writeValue(buffer, value.encode()); - } else if (value is PlatformColor) { + } else if (value is PlatformSize) { buffer.putUint8(167); writeValue(buffer, value.encode()); - } else if (value is PlatformTileLayer) { + } else if (value is PlatformColor) { buffer.putUint8(168); writeValue(buffer, value.encode()); - } else if (value is PlatformZoomRange) { + } else if (value is PlatformTileLayer) { buffer.putUint8(169); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmap) { + } else if (value is PlatformZoomRange) { buffer.putUint8(170); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapDefaultMarker) { + } else if (value is PlatformBitmap) { buffer.putUint8(171); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytes) { + } else if (value is PlatformBitmapDefaultMarker) { buffer.putUint8(172); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAsset) { + } else if (value is PlatformBitmapBytes) { buffer.putUint8(173); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetImage) { + } else if (value is PlatformBitmapAsset) { buffer.putUint8(174); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapAssetMap) { + } else if (value is PlatformBitmapAssetImage) { buffer.putUint8(175); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapBytesMap) { + } else if (value is PlatformBitmapAssetMap) { buffer.putUint8(176); writeValue(buffer, value.encode()); - } else if (value is PlatformBitmapPinConfig) { + } else if (value is PlatformBitmapBytesMap) { buffer.putUint8(177); writeValue(buffer, value.encode()); + } else if (value is PlatformBitmapPinConfig) { + buffer.putUint8(178); + writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); } @@ -2568,9 +2828,7 @@ class _PigeonCodec extends StandardMessageCodec { return value == null ? null : PlatformMapType.values[value]; case 130: final value = readValue(buffer) as int?; - return value == null - ? null - : PlatformMarkerCollisionBehavior.values[value]; + return value == null ? null : PlatformMarkerCollisionBehavior.values[value]; case 131: final value = readValue(buffer) as int?; return value == null ? null : PlatformJointType.values[value]; @@ -2594,80 +2852,82 @@ class _PigeonCodec extends StandardMessageCodec { case 139: return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!); case 140: - return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); + return PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets.decode(readValue(buffer)!); case 141: - return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); + return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!); case 142: - return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); + return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!); case 143: - return PlatformCameraUpdateZoom.decode(readValue(buffer)!); + return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!); case 144: - return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); + return PlatformCameraUpdateZoom.decode(readValue(buffer)!); case 145: - return PlatformCircle.decode(readValue(buffer)!); + return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!); case 146: - return PlatformHeatmap.decode(readValue(buffer)!); + return PlatformCircle.decode(readValue(buffer)!); case 147: - return PlatformHeatmapGradient.decode(readValue(buffer)!); + return PlatformHeatmap.decode(readValue(buffer)!); case 148: - return PlatformWeightedLatLng.decode(readValue(buffer)!); + return PlatformHeatmapGradient.decode(readValue(buffer)!); case 149: - return PlatformInfoWindow.decode(readValue(buffer)!); + return PlatformWeightedLatLng.decode(readValue(buffer)!); case 150: - return PlatformCluster.decode(readValue(buffer)!); + return PlatformInfoWindow.decode(readValue(buffer)!); case 151: - return PlatformClusterManager.decode(readValue(buffer)!); + return PlatformCluster.decode(readValue(buffer)!); case 152: - return PlatformMarker.decode(readValue(buffer)!); + return PlatformClusterManager.decode(readValue(buffer)!); case 153: - return PlatformPolygon.decode(readValue(buffer)!); + return PlatformMarker.decode(readValue(buffer)!); case 154: - return PlatformPolyline.decode(readValue(buffer)!); + return PlatformPolygon.decode(readValue(buffer)!); case 155: - return PlatformPatternItem.decode(readValue(buffer)!); + return PlatformPolyline.decode(readValue(buffer)!); case 156: - return PlatformTile.decode(readValue(buffer)!); + return PlatformPatternItem.decode(readValue(buffer)!); case 157: - return PlatformTileOverlay.decode(readValue(buffer)!); + return PlatformTile.decode(readValue(buffer)!); case 158: - return PlatformEdgeInsets.decode(readValue(buffer)!); + return PlatformTileOverlay.decode(readValue(buffer)!); case 159: - return PlatformLatLng.decode(readValue(buffer)!); + return PlatformEdgeInsets.decode(readValue(buffer)!); case 160: - return PlatformLatLngBounds.decode(readValue(buffer)!); + return PlatformLatLng.decode(readValue(buffer)!); case 161: - return PlatformCameraTargetBounds.decode(readValue(buffer)!); + return PlatformLatLngBounds.decode(readValue(buffer)!); case 162: - return PlatformGroundOverlay.decode(readValue(buffer)!); + return PlatformCameraTargetBounds.decode(readValue(buffer)!); case 163: - return PlatformMapViewCreationParams.decode(readValue(buffer)!); + return PlatformGroundOverlay.decode(readValue(buffer)!); case 164: - return PlatformMapConfiguration.decode(readValue(buffer)!); + return PlatformMapViewCreationParams.decode(readValue(buffer)!); case 165: - return PlatformPoint.decode(readValue(buffer)!); + return PlatformMapConfiguration.decode(readValue(buffer)!); case 166: - return PlatformSize.decode(readValue(buffer)!); + return PlatformPoint.decode(readValue(buffer)!); case 167: - return PlatformColor.decode(readValue(buffer)!); + return PlatformSize.decode(readValue(buffer)!); case 168: - return PlatformTileLayer.decode(readValue(buffer)!); + return PlatformColor.decode(readValue(buffer)!); case 169: - return PlatformZoomRange.decode(readValue(buffer)!); + return PlatformTileLayer.decode(readValue(buffer)!); case 170: - return PlatformBitmap.decode(readValue(buffer)!); + return PlatformZoomRange.decode(readValue(buffer)!); case 171: - return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); + return PlatformBitmap.decode(readValue(buffer)!); case 172: - return PlatformBitmapBytes.decode(readValue(buffer)!); + return PlatformBitmapDefaultMarker.decode(readValue(buffer)!); case 173: - return PlatformBitmapAsset.decode(readValue(buffer)!); + return PlatformBitmapBytes.decode(readValue(buffer)!); case 174: - return PlatformBitmapAssetImage.decode(readValue(buffer)!); + return PlatformBitmapAsset.decode(readValue(buffer)!); case 175: - return PlatformBitmapAssetMap.decode(readValue(buffer)!); + return PlatformBitmapAssetImage.decode(readValue(buffer)!); case 176: - return PlatformBitmapBytesMap.decode(readValue(buffer)!); + return PlatformBitmapAssetMap.decode(readValue(buffer)!); case 177: + return PlatformBitmapBytesMap.decode(readValue(buffer)!); + case 178: return PlatformBitmapPinConfig.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -2683,10 +2943,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(); @@ -2695,8 +2953,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, @@ -2704,355 +2961,232 @@ class MapsApi { ); 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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'; + 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! 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_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); - } else 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! 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_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3060,85 +3194,59 @@ class MapsApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! 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_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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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, @@ -3146,106 +3254,73 @@ class MapsApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! 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_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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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); - } else 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } /// Sets the style to the given map style string, where an empty string @@ -3254,28 +3329,22 @@ 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); - } else 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as String?; } /// Returns the error string from the last attempt to set the map style, if @@ -3284,8 +3353,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, @@ -3293,49 +3361,38 @@ class MapsApi { ); 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue 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_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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } /// 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, @@ -3343,23 +3400,19 @@ class MapsApi { ); 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as Uint8List?; } /// Returns true if the map supports advanced markers. Future isAdvancedMarkersAvailable() async { - final pigeonVar_channelName = - 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable$pigeonVar_messageChannelSuffix'; + final pigeonVar_channelName = 'dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable$pigeonVar_messageChannelSuffix'; final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, @@ -3367,22 +3420,14 @@ class MapsApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } } @@ -3436,26 +3481,14 @@ abstract class MapsCallbackApi { void onGroundOverlayTap(String groundOverlayId); /// Called to get data for a map tile. - Future getTileOverlayTile( - String tileOverlayId, - PlatformPoint location, - int zoom, - ); - - static void setUp( - MapsCallbackApi? api, { - BinaryMessenger? binaryMessenger, - String messageChannelSuffix = '', - }) { - messageChannelSuffix = messageChannelSuffix.isNotEmpty - ? '.$messageChannelSuffix' - : ''; + Future getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom); + + static void setUp(MapsCallbackApi? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) { + messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; { final 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 { @@ -3465,54 +3498,37 @@ 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.', - ); - 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 List args = message! as List; + final PlatformCameraPosition arg_cameraPosition = args[0]! as PlatformCameraPosition; try { - api.onCameraMove(arg_cameraPosition!); + 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 { @@ -3522,468 +3538,286 @@ 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.', - ); - 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.', - ); + final List args = message! as List; + final PlatformLatLng arg_position = args[0]! as PlatformLatLng; try { - api.onTap(arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final PlatformLatLng arg_position = args[0]! as PlatformLatLng; try { - api.onLongPress(arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; try { - api.onMarkerTap(arg_markerId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; + final PlatformLatLng arg_position = args[1]! as PlatformLatLng; try { - api.onMarkerDragStart(arg_markerId!, arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; + final PlatformLatLng arg_position = args[1]! as PlatformLatLng; try { - api.onMarkerDrag(arg_markerId!, arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; + final PlatformLatLng arg_position = args[1]! as PlatformLatLng; try { - api.onMarkerDragEnd(arg_markerId!, arg_position!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_markerId = args[0]! as String; try { - api.onInfoWindowTap(arg_markerId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_circleId = args[0]! as String; try { - api.onCircleTap(arg_circleId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final PlatformCluster arg_cluster = args[0]! as PlatformCluster; try { - api.onClusterTap(arg_cluster!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_polygonId = args[0]! as String; try { - api.onPolygonTap(arg_polygonId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_polylineId = args[0]! as String; try { - api.onPolylineTap(arg_polylineId!); + 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.', - ); - 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.', - ); + final List args = message! as List; + final String arg_groundOverlayId = args[0]! as String; try { - api.onGroundOverlayTap(arg_groundOverlayId!); + 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.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.', - ); + final List args = message! as List; + final String arg_tileOverlayId = args[0]! as String; + final PlatformPoint arg_location = args[1]! as PlatformPoint; + final int arg_zoom = args[2]! as 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())); } }); } @@ -3998,13 +3832,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(); @@ -4012,28 +3842,21 @@ 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); - } else 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; - } + + _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; } } @@ -4042,13 +3865,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(); @@ -4056,8 +3875,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, @@ -4065,27 +3883,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4093,27 +3902,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4121,27 +3921,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4149,27 +3940,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4177,27 +3959,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4205,27 +3978,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4233,27 +3997,18 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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, @@ -4261,104 +4016,75 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as bool; } 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); - } else 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as PlatformTileLayer?; } - 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); - } else 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as PlatformGroundOverlay?; } 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); - } else 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?); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: true, + ) + ; + return pigeonVar_replyValue as PlatformHeatmap?; } 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, @@ -4366,58 +4092,37 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as PlatformZoomRange; } 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); - } else 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(); - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return (pigeonVar_replyValue! 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, @@ -4425,21 +4130,13 @@ class MapsInspectorApi { ); 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?)!; - } + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ) + ; + return pigeonVar_replyValue! as PlatformCameraPosition; } } diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/pigeons/messages.dart index 66e475c54232..1035d468e0bc 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/pigeons/messages.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/pigeons/messages.dart @@ -71,6 +71,13 @@ class PlatformCameraUpdateNewLatLngBounds { final double padding; } +/// Pigeon equivalent of NewLatLngBoundsWithEdgeInsets +class PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets { + PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets(this.bounds, this.padding); + final PlatformLatLngBounds bounds; + final PlatformEdgeInsets padding; +} + /// Pigeon equivalent of NewLatLngZoom class PlatformCameraUpdateNewLatLngZoom { PlatformCameraUpdateNewLatLngZoom(this.latLng, this.zoom); diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/test/google_maps_flutter_ios_test.dart index 48396c35f65c..89f047fbf5e2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/test/google_maps_flutter_ios_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/test/google_maps_flutter_ios_test.dart @@ -1336,6 +1336,56 @@ void main() { expect(typedUpdate.out, true); }); + test( + 'moveCamera calls through with expected newLatLngBoundsWithEdgeInsets', + () async { + const mapId = 1; + final (GoogleMapsFlutterIOS maps, MockMapsApi api) = setUpMockMap( + mapId: mapId, + ); + + final bounds = LatLngBounds( + northeast: const LatLng(10.0, 20.0), + southwest: const LatLng(9.0, 21.0), + ); + const padding = EdgeInsets.fromLTRB(10.0, 20.0, 30.0, 40.0); + final CameraUpdate update = CameraUpdate.newLatLngBoundsWithEdgeInsets( + bounds, + padding, + ); + await maps.moveCamera(update, mapId: mapId); + + final VerificationResult verification = verify( + api.moveCamera(captureAny), + ); + final passedUpdate = verification.captured[0] as PlatformCameraUpdate; + final typedUpdate = + passedUpdate.cameraUpdate + as PlatformCameraUpdateNewLatLngBoundsWithEdgeInsets; + update as CameraUpdateNewLatLngBoundsWithEdgeInsets; + expect( + typedUpdate.bounds.northeast.latitude, + update.bounds.northeast.latitude, + ); + expect( + typedUpdate.bounds.northeast.longitude, + update.bounds.northeast.longitude, + ); + expect( + typedUpdate.bounds.southwest.latitude, + update.bounds.southwest.latitude, + ); + expect( + typedUpdate.bounds.southwest.longitude, + update.bounds.southwest.longitude, + ); + expect(typedUpdate.padding.top, update.padding.top); + expect(typedUpdate.padding.left, update.padding.left); + expect(typedUpdate.padding.bottom, update.padding.bottom); + expect(typedUpdate.padding.right, update.padding.right); + }, + ); + test('MapBitmapScaling to PlatformMapBitmapScaling', () { expect( GoogleMapsFlutterIOS.platformMapBitmapScalingFromScaling( diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/test/google_maps_flutter_ios_test.mocks.dart b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/test/google_maps_flutter_ios_test.mocks.dart index e4ff2b78e188..419c7cb2b353 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/test/google_maps_flutter_ios_test.mocks.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/test/google_maps_flutter_ios_test.mocks.dart @@ -23,6 +23,7 @@ import 'package:mockito/src/dummies.dart' as _i3; // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakePlatformPoint_0 extends _i1.SmartFake implements _i2.PlatformPoint { _FakePlatformPoint_0(Object parent, Invocation parentInvocation) 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 6a6c637674a7..58a20212dcaa 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,7 @@ +## 2.16.0 + +* Adds `CameraUpdate.newLatLngBoundsWithEdgeInsets` for asymmetric camera padding. + ## 2.15.0 * Adds support for `colorScheme` for cloud-based maps styling brightness in web. diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/camera.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/camera.dart index af6c5d0e45e1..6ea0e9dcb9c8 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/camera.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/camera.dart @@ -5,6 +5,7 @@ import 'dart:ui' show Offset; import 'package:flutter/foundation.dart'; +import 'package:flutter/painting.dart' show EdgeInsets; import 'types.dart'; @@ -138,6 +139,9 @@ enum CameraUpdateType { /// Zoom out zoomOut, + + /// New coordinates bounding box with edge insets + newLatLngBoundsWithEdgeInsets, } /// Defines a camera move, supporting absolute moves as well as moves relative @@ -167,6 +171,20 @@ abstract class CameraUpdate { return CameraUpdateNewLatLngBounds(bounds, padding); } + /// Returns a camera update that transforms the camera so that the specified + /// geographical bounding box is centered in the map view at the greatest + /// possible zoom level, with [padding] insets from each edge. + /// The camera's new tilt and bearing will both be 0.0. + /// + /// This is currently only supported on iOS. On Android and Web, this will + /// throw an [UnsupportedError]. + static CameraUpdate newLatLngBoundsWithEdgeInsets( + LatLngBounds bounds, + EdgeInsets padding, + ) { + return CameraUpdateNewLatLngBoundsWithEdgeInsets(bounds, padding); + } + /// Returns a camera update that moves the camera target to the specified /// geographical location and zoom level. static CameraUpdate newLatLngZoom(LatLng latLng, double zoom) { @@ -254,6 +272,29 @@ class CameraUpdateNewLatLngBounds extends CameraUpdate { Object toJson() => ['newLatLngBounds', bounds.toJson(), padding]; } +/// Defines a camera move to a new bounding latitude and longitude range with +/// edge insets. +class CameraUpdateNewLatLngBoundsWithEdgeInsets extends CameraUpdate { + /// Creates a camera move to a bounding range with edge insets. + const CameraUpdateNewLatLngBoundsWithEdgeInsets(this.bounds, this.padding) + : super._(CameraUpdateType.newLatLngBoundsWithEdgeInsets); + + /// The northeast and southwest bounding coordinates. + final LatLngBounds bounds; + + /// The padding by which the view is inset from each edge. + final EdgeInsets padding; + @override + Object toJson() => [ + 'newLatLngBoundsWithEdgeInsets', + bounds.toJson(), + padding.top, + padding.left, + padding.bottom, + padding.right, + ]; +} + /// Defines a camera move to new coordinates with a zoom level. class CameraUpdateNewLatLngZoom extends CameraUpdate { /// Creates a camera move with coordinates and zoom level. 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 3f0790182d2e..0b5653a5b0ca 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.15.0 +version: 2.16.0 environment: sdk: ^3.9.0 diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/camera_test.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/camera_test.dart index 0ecb775e2cf9..7ac3f6cde45c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/camera_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/camera_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 'package:flutter/painting.dart' show EdgeInsets; import 'package:flutter_test/flutter_test.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; @@ -127,4 +128,28 @@ void main() { final jsonList = cameraUpdate.toJson() as List; expect(jsonList[0], 'zoomOut'); }); + + test('CameraUpdate.newLatLngBoundsWithEdgeInsets', () { + final latLngBounds = LatLngBounds( + northeast: const LatLng(1.0, 2.0), + southwest: const LatLng(-2.0, -3.0), + ); + const padding = EdgeInsets.fromLTRB(10.0, 20.0, 30.0, 40.0); + final CameraUpdate cameraUpdate = + CameraUpdate.newLatLngBoundsWithEdgeInsets(latLngBounds, padding); + expect(cameraUpdate.runtimeType, CameraUpdateNewLatLngBoundsWithEdgeInsets); + expect( + cameraUpdate.updateType, + CameraUpdateType.newLatLngBoundsWithEdgeInsets, + ); + cameraUpdate as CameraUpdateNewLatLngBoundsWithEdgeInsets; + expect(cameraUpdate.bounds, latLngBounds); + expect(cameraUpdate.padding, padding); + final jsonList = cameraUpdate.toJson() as List; + expect(jsonList[0], 'newLatLngBoundsWithEdgeInsets'); + expect(jsonList[2], 20.0); + expect(jsonList[3], 10.0); + expect(jsonList[4], 40.0); + expect(jsonList[5], 30.0); + }); } 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 07df4664dc2a..52868a99ffe4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.6.3 + +* Adds support for `CameraUpdate.newLatLngBoundsWithEdgeInsets`. + ## 0.6.2 * Adds `colorScheme` support for controlling cloud-based map brightness. diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index efbf2398ff49..7960edbaeaa7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -1020,6 +1020,22 @@ void _applyCameraUpdate(gmaps.Map map, CameraUpdate update) { map.zoom = (map.isZoomDefined() ? map.zoom : 0) - 1; case 'zoomTo': map.zoom = json[1]! as num; + case 'newLatLngBoundsWithEdgeInsets': + final List latLngPair = asJsonList(json[1]); + final List latLng1 = asJsonList(latLngPair[0]); + final List latLng2 = asJsonList(latLngPair[1]); + map.fitBounds( + gmaps.LatLngBounds( + gmaps.LatLng(latLng1[0]! as num, latLng1[1]! as num), + gmaps.LatLng(latLng2[0]! as num, latLng2[1]! as num), + ), + gmaps.Padding( + top: json[2]! as num, + left: json[3]! as num, + bottom: json[4]! as num, + right: json[5]! as num, + ), + ); default: throw UnimplementedError('Unimplemented CameraMove: ${json[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 423d547c4abe..c0ee683b0b6a 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.2 +version: 0.6.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.16.0 sanitize_html: ^2.0.0 stream_transform: ^2.0.0 web: ^1.0.0