diff --git a/packages/camera/camera_android/android/src/main/java/io/flutter/plugins/camera/Messages.java b/packages/camera/camera_android/android/src/main/java/io/flutter/plugins/camera/Messages.java index 8a355e54b8f..f0c3f2ff146 100644 --- a/packages/camera/camera_android/android/src/main/java/io/flutter/plugins/camera/Messages.java +++ b/packages/camera/camera_android/android/src/main/java/io/flutter/plugins/camera/Messages.java @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.4.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon package io.flutter.plugins.camera; diff --git a/packages/camera/camera_android/lib/src/messages.g.dart b/packages/camera/camera_android/lib/src/messages.g.dart index d0e24d02de8..e4c04745251 100644 --- a/packages/camera/camera_android/lib/src/messages.g.dart +++ b/packages/camera/camera_android/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.4.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -32,6 +32,24 @@ List wrapResponse({ return [error.code, error.message, error.details]; } +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); + } + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); + } + return a == b; +} + /// Pigeon equivalent of [CameraLensDirection]. enum PlatformCameraLensDirection { front, back, external } @@ -77,10 +95,14 @@ class PlatformCameraDescription { int sensorOrientation; - Object encode() { + List _toList() { return [name, lensDirection, sensorOrientation]; } + Object encode() { + return _toList(); + } + static PlatformCameraDescription decode(Object result) { result as List; return PlatformCameraDescription( @@ -89,6 +111,23 @@ class PlatformCameraDescription { sensorOrientation: result[2]! as int, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraDescription || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Data needed for [CameraInitializedEvent]. @@ -111,7 +150,7 @@ class PlatformCameraState { bool focusPointSupported; - Object encode() { + List _toList() { return [ previewSize, exposureMode, @@ -121,6 +160,10 @@ class PlatformCameraState { ]; } + Object encode() { + return _toList(); + } + static PlatformCameraState decode(Object result) { result as List; return PlatformCameraState( @@ -131,6 +174,22 @@ class PlatformCameraState { focusPointSupported: result[4]! as bool, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraState || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [Size]. @@ -141,10 +200,14 @@ class PlatformSize { double height; - Object encode() { + List _toList() { return [width, height]; } + Object encode() { + return _toList(); + } + static PlatformSize decode(Object result) { result as List; return PlatformSize( @@ -152,6 +215,22 @@ class PlatformSize { height: result[1]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformSize || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [Point]. @@ -162,14 +241,34 @@ class PlatformPoint { double y; - Object encode() { + List _toList() { return [x, y]; } + Object encode() { + return _toList(); + } + static PlatformPoint decode(Object result) { result as List; return PlatformPoint(x: result[0]! as double, y: result[1]! as double); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPoint || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [MediaSettings]. @@ -192,7 +291,7 @@ class PlatformMediaSettings { bool enableAudio; - Object encode() { + List _toList() { return [ resolutionPreset, fps, @@ -202,6 +301,10 @@ class PlatformMediaSettings { ]; } + Object encode() { + return _toList(); + } + static PlatformMediaSettings decode(Object result) { result as List; return PlatformMediaSettings( @@ -212,6 +315,22 @@ class PlatformMediaSettings { enableAudio: result[4]! as bool, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMediaSettings || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -330,8 +449,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -364,9 +484,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraName, mediaSettings], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraName, mediaSettings]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -395,8 +517,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [imageFormat], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([imageFormat]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -420,8 +545,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -447,8 +573,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [orientation], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([orientation]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -472,8 +601,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -498,8 +628,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -528,8 +659,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enableStream], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([enableStream]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -554,8 +688,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -584,8 +719,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -609,8 +745,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -634,8 +771,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -659,8 +797,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -684,8 +823,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [flashMode], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([flashMode]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -709,8 +851,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [exposureMode], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([exposureMode]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -736,8 +881,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [point], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([point]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -761,8 +909,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -791,8 +940,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -821,8 +971,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -852,8 +1003,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [offset], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([offset]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -882,8 +1036,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [focusMode], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([focusMode]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -909,8 +1066,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [point], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([point]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -934,8 +1094,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -964,8 +1125,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -994,8 +1156,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [zoom], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([zoom]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1019,8 +1184,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1044,8 +1210,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1071,8 +1238,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [description], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([description]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/camera/camera_android/pubspec.yaml b/packages/camera/camera_android/pubspec.yaml index 182ebb0cbe5..1b2078c24a8 100644 --- a/packages/camera/camera_android/pubspec.yaml +++ b/packages/camera/camera_android/pubspec.yaml @@ -32,7 +32,7 @@ dev_dependencies: sdk: flutter leak_tracker_flutter_testing: any mockito: ^5.4.4 - pigeon: ^22.4.1 + pigeon: ^26.1.0 topics: - camera diff --git a/packages/camera/camera_android_camerax/android/src/main/java/io/flutter/plugins/camerax/CameraXLibrary.g.kt b/packages/camera/camera_android_camerax/android/src/main/java/io/flutter/plugins/camerax/CameraXLibrary.g.kt index c08f52606d5..22e63b54ce8 100644 --- a/packages/camera/camera_android_camerax/android/src/main/java/io/flutter/plugins/camerax/CameraXLibrary.g.kt +++ b/packages/camera/camera_android_camerax/android/src/main/java/io/flutter/plugins/camerax/CameraXLibrary.g.kt @@ -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 (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @@ -74,11 +74,39 @@ class CameraXLibraryPigeonInstanceManager( fun onFinalize(identifier: Long) } - private val identifiers = java.util.WeakHashMap() - private val weakInstances = HashMap>() + // Extends WeakReference and overrides the `equals` and `hashCode` methods using identity rather + // than equality. + // + // Two `IdentityWeakReference`s are equal if either + // 1: `get()` returns the identical nonnull value for both references. + // 2: `get()` returns null for both references and the references are identical. + class IdentityWeakReference : java.lang.ref.WeakReference { + private val savedHashCode: Int + + constructor(instance: T) : this(instance, null) + + constructor(instance: T, queue: java.lang.ref.ReferenceQueue?) : super(instance, queue) { + savedHashCode = System.identityHashCode(instance) + } + + override fun equals(other: Any?): Boolean { + val instance = get() + if (instance != null) { + return other is IdentityWeakReference<*> && other.get() === instance + } + return other === this + } + + override fun hashCode(): Int { + return savedHashCode + } + } + + private val identifiers = java.util.WeakHashMap, Long>() + private val weakInstances = HashMap>() private val strongInstances = HashMap() private val referenceQueue = java.lang.ref.ReferenceQueue() - private val weakReferencesToIdentifiers = HashMap, Long>() + private val weakReferencesToIdentifiers = HashMap, Long>() private val handler = android.os.Handler(android.os.Looper.getMainLooper()) private val releaseAllFinalizedInstancesRunnable = Runnable { this.releaseAllFinalizedInstances() @@ -143,9 +171,12 @@ class CameraXLibraryPigeonInstanceManager( */ fun getIdentifierForStrongReference(instance: Any?): Long? { logWarningIfFinalizationListenerHasStopped() - val identifier = identifiers[instance] + if (instance == null) { + return null + } + val identifier = identifiers[IdentityWeakReference(instance)] if (identifier != null) { - strongInstances[identifier] = instance!! + strongInstances[identifier] = instance } return identifier } @@ -184,14 +215,14 @@ class CameraXLibraryPigeonInstanceManager( /** Retrieves the instance associated with identifier, if present, otherwise `null`. */ fun getInstance(identifier: Long): T? { logWarningIfFinalizationListenerHasStopped() - val instance = weakInstances[identifier] as java.lang.ref.WeakReference? + val instance = weakInstances[identifier] as IdentityWeakReference? return instance?.get() } /** Returns whether this manager contains the given `instance`. */ fun containsInstance(instance: Any?): Boolean { logWarningIfFinalizationListenerHasStopped() - return identifiers.containsKey(instance) + return instance != null && identifiers.containsKey(IdentityWeakReference(instance)) } /** @@ -232,9 +263,8 @@ class CameraXLibraryPigeonInstanceManager( if (hasFinalizationListenerStopped()) { return } - var reference: java.lang.ref.WeakReference? - while ((referenceQueue.poll() as java.lang.ref.WeakReference?).also { reference = it } != - null) { + var reference: IdentityWeakReference? + while ((referenceQueue.poll() as IdentityWeakReference?).also { reference = it } != null) { val identifier = weakReferencesToIdentifiers.remove(reference) if (identifier != null) { weakInstances.remove(identifier) @@ -250,8 +280,8 @@ class CameraXLibraryPigeonInstanceManager( require(!weakInstances.containsKey(identifier)) { "Identifier has already been added: $identifier" } - val weakReference = java.lang.ref.WeakReference(instance, referenceQueue) - identifiers[instance] = identifier + val weakReference = IdentityWeakReference(instance, referenceQueue) + identifiers[weakReference] = identifier weakInstances[identifier] = weakReference weakReferencesToIdentifiers[weakReference] = identifier strongInstances[identifier] = instance @@ -854,112 +884,330 @@ private class CameraXLibraryPigeonProxyApiBaseCodec( return } + fun logNewInstanceFailure(apiName: String, value: Any, exception: Throwable?) { + Log.w( + "PigeonProxyApiBaseCodec", + "Failed to create new Dart proxy instance of $apiName: $value. $exception") + } + if (value is android.util.Size) { - registrar.getPigeonApiCameraSize().pigeon_newInstance(value) {} + registrar.getPigeonApiCameraSize().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("CameraSize", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.ResolutionInfo) { - registrar.getPigeonApiResolutionInfo().pigeon_newInstance(value) {} + registrar.getPigeonApiResolutionInfo().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("ResolutionInfo", value, it.exceptionOrNull()) + } + } } else if (value is android.util.Range<*>) { - registrar.getPigeonApiCameraIntegerRange().pigeon_newInstance(value) {} + registrar.getPigeonApiCameraIntegerRange().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("CameraIntegerRange", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.video.VideoRecordEvent.Start) { - registrar.getPigeonApiVideoRecordEventStart().pigeon_newInstance(value) {} + registrar.getPigeonApiVideoRecordEventStart().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("VideoRecordEventStart", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.video.VideoRecordEvent.Finalize) { - registrar.getPigeonApiVideoRecordEventFinalize().pigeon_newInstance(value) {} + registrar.getPigeonApiVideoRecordEventFinalize().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("VideoRecordEventFinalize", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.video.VideoRecordEvent) { - registrar.getPigeonApiVideoRecordEvent().pigeon_newInstance(value) {} + registrar.getPigeonApiVideoRecordEvent().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("VideoRecordEvent", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.MeteringPoint) { - registrar.getPigeonApiMeteringPoint().pigeon_newInstance(value) {} + registrar.getPigeonApiMeteringPoint().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("MeteringPoint", value, it.exceptionOrNull()) + } + } } else if (value is androidx.lifecycle.Observer<*>) { - registrar.getPigeonApiObserver().pigeon_newInstance(value) {} + registrar.getPigeonApiObserver().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("Observer", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.CameraInfo) { - registrar.getPigeonApiCameraInfo().pigeon_newInstance(value) {} + registrar.getPigeonApiCameraInfo().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("CameraInfo", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.CameraSelector) { - registrar.getPigeonApiCameraSelector().pigeon_newInstance(value) {} + registrar.getPigeonApiCameraSelector().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("CameraSelector", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.lifecycle.ProcessCameraProvider) { - registrar.getPigeonApiProcessCameraProvider().pigeon_newInstance(value) {} + registrar.getPigeonApiProcessCameraProvider().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("ProcessCameraProvider", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.Camera) { - registrar.getPigeonApiCamera().pigeon_newInstance(value) {} + registrar.getPigeonApiCamera().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("Camera", value, it.exceptionOrNull()) + } + } } else if (value is SystemServicesManager) { - registrar.getPigeonApiSystemServicesManager().pigeon_newInstance(value) {} + registrar.getPigeonApiSystemServicesManager().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("SystemServicesManager", value, it.exceptionOrNull()) + } + } } else if (value is CameraPermissionsError) { - registrar.getPigeonApiCameraPermissionsError().pigeon_newInstance(value) {} + registrar.getPigeonApiCameraPermissionsError().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("CameraPermissionsError", value, it.exceptionOrNull()) + } + } } else if (value is DeviceOrientationManager) { - registrar.getPigeonApiDeviceOrientationManager().pigeon_newInstance(value) {} + registrar.getPigeonApiDeviceOrientationManager().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("DeviceOrientationManager", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.Preview) { - registrar.getPigeonApiPreview().pigeon_newInstance(value) {} + registrar.getPigeonApiPreview().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("Preview", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.video.VideoCapture<*>) { - registrar.getPigeonApiVideoCapture().pigeon_newInstance(value) {} + registrar.getPigeonApiVideoCapture().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("VideoCapture", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.video.Recorder) { - registrar.getPigeonApiRecorder().pigeon_newInstance(value) {} + registrar.getPigeonApiRecorder().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("Recorder", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.video.VideoOutput) { - registrar.getPigeonApiVideoOutput().pigeon_newInstance(value) {} + registrar.getPigeonApiVideoOutput().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("VideoOutput", value, it.exceptionOrNull()) + } + } } else if (value is VideoRecordEventListener) { - registrar.getPigeonApiVideoRecordEventListener().pigeon_newInstance(value) {} + registrar.getPigeonApiVideoRecordEventListener().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("VideoRecordEventListener", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.video.PendingRecording) { - registrar.getPigeonApiPendingRecording().pigeon_newInstance(value) {} + registrar.getPigeonApiPendingRecording().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("PendingRecording", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.video.Recording) { - registrar.getPigeonApiRecording().pigeon_newInstance(value) {} + registrar.getPigeonApiRecording().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("Recording", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.ImageCapture) { - registrar.getPigeonApiImageCapture().pigeon_newInstance(value) {} + registrar.getPigeonApiImageCapture().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("ImageCapture", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.resolutionselector.ResolutionStrategy) { - registrar.getPigeonApiResolutionStrategy().pigeon_newInstance(value) {} + registrar.getPigeonApiResolutionStrategy().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("ResolutionStrategy", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.resolutionselector.ResolutionSelector) { - registrar.getPigeonApiResolutionSelector().pigeon_newInstance(value) {} + registrar.getPigeonApiResolutionSelector().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("ResolutionSelector", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.resolutionselector.AspectRatioStrategy) { - registrar.getPigeonApiAspectRatioStrategy().pigeon_newInstance(value) {} + registrar.getPigeonApiAspectRatioStrategy().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("AspectRatioStrategy", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.CameraState) { - registrar.getPigeonApiCameraState().pigeon_newInstance(value) {} + registrar.getPigeonApiCameraState().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("CameraState", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.ExposureState) { - registrar.getPigeonApiExposureState().pigeon_newInstance(value) {} + registrar.getPigeonApiExposureState().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("ExposureState", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.ZoomState) { - registrar.getPigeonApiZoomState().pigeon_newInstance(value) {} + registrar.getPigeonApiZoomState().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("ZoomState", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.ImageAnalysis) { - registrar.getPigeonApiImageAnalysis().pigeon_newInstance(value) {} + registrar.getPigeonApiImageAnalysis().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("ImageAnalysis", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.UseCase) { - registrar.getPigeonApiUseCase().pigeon_newInstance(value) {} + registrar.getPigeonApiUseCase().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("UseCase", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.ImageAnalysis.Analyzer) { - registrar.getPigeonApiAnalyzer().pigeon_newInstance(value) {} + registrar.getPigeonApiAnalyzer().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("Analyzer", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.CameraState.StateError) { - registrar.getPigeonApiCameraStateStateError().pigeon_newInstance(value) {} + registrar.getPigeonApiCameraStateStateError().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("CameraStateStateError", value, it.exceptionOrNull()) + } + } } else if (value is io.flutter.plugins.camerax.LiveDataProxyApi.LiveDataWrapper) { - registrar.getPigeonApiLiveData().pigeon_newInstance(value) {} + registrar.getPigeonApiLiveData().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("LiveData", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.ImageProxy) { - registrar.getPigeonApiImageProxy().pigeon_newInstance(value) {} + registrar.getPigeonApiImageProxy().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("ImageProxy", value, it.exceptionOrNull()) + } + } } else if (value is ImageProxyUtils) { - registrar.getPigeonApiImageProxyUtils().pigeon_newInstance(value) {} + registrar.getPigeonApiImageProxyUtils().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("ImageProxyUtils", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.ImageProxy.PlaneProxy) { - registrar.getPigeonApiPlaneProxy().pigeon_newInstance(value) {} + registrar.getPigeonApiPlaneProxy().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("PlaneProxy", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.video.QualitySelector) { - registrar.getPigeonApiQualitySelector().pigeon_newInstance(value) {} + registrar.getPigeonApiQualitySelector().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("QualitySelector", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.video.FallbackStrategy) { - registrar.getPigeonApiFallbackStrategy().pigeon_newInstance(value) {} + registrar.getPigeonApiFallbackStrategy().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("FallbackStrategy", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.CameraControl) { - registrar.getPigeonApiCameraControl().pigeon_newInstance(value) {} + registrar.getPigeonApiCameraControl().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("CameraControl", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.FocusMeteringAction.Builder) { - registrar.getPigeonApiFocusMeteringActionBuilder().pigeon_newInstance(value) {} + registrar.getPigeonApiFocusMeteringActionBuilder().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("FocusMeteringActionBuilder", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.FocusMeteringAction) { - registrar.getPigeonApiFocusMeteringAction().pigeon_newInstance(value) {} + registrar.getPigeonApiFocusMeteringAction().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("FocusMeteringAction", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.FocusMeteringResult) { - registrar.getPigeonApiFocusMeteringResult().pigeon_newInstance(value) {} + registrar.getPigeonApiFocusMeteringResult().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("FocusMeteringResult", value, it.exceptionOrNull()) + } + } } else if (value is android.hardware.camera2.CaptureRequest) { - registrar.getPigeonApiCaptureRequest().pigeon_newInstance(value) {} + registrar.getPigeonApiCaptureRequest().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("CaptureRequest", value, it.exceptionOrNull()) + } + } } else if (value is android.hardware.camera2.CaptureRequest.Key<*>) { - registrar.getPigeonApiCaptureRequestKey().pigeon_newInstance(value) {} + registrar.getPigeonApiCaptureRequestKey().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("CaptureRequestKey", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.camera2.interop.CaptureRequestOptions) { - registrar.getPigeonApiCaptureRequestOptions().pigeon_newInstance(value) {} + registrar.getPigeonApiCaptureRequestOptions().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("CaptureRequestOptions", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.camera2.interop.Camera2CameraControl) { - registrar.getPigeonApiCamera2CameraControl().pigeon_newInstance(value) {} + registrar.getPigeonApiCamera2CameraControl().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("Camera2CameraControl", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.resolutionselector.ResolutionFilter) { - registrar.getPigeonApiResolutionFilter().pigeon_newInstance(value) {} + registrar.getPigeonApiResolutionFilter().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("ResolutionFilter", value, it.exceptionOrNull()) + } + } } else if (value is android.hardware.camera2.CameraCharacteristics.Key<*>) { - registrar.getPigeonApiCameraCharacteristicsKey().pigeon_newInstance(value) {} + registrar.getPigeonApiCameraCharacteristicsKey().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("CameraCharacteristicsKey", value, it.exceptionOrNull()) + } + } } else if (value is android.hardware.camera2.CameraCharacteristics) { - registrar.getPigeonApiCameraCharacteristics().pigeon_newInstance(value) {} + registrar.getPigeonApiCameraCharacteristics().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("CameraCharacteristics", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.camera2.interop.Camera2CameraInfo) { - registrar.getPigeonApiCamera2CameraInfo().pigeon_newInstance(value) {} + registrar.getPigeonApiCamera2CameraInfo().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("Camera2CameraInfo", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.DisplayOrientedMeteringPointFactory) { - registrar.getPigeonApiDisplayOrientedMeteringPointFactory().pigeon_newInstance(value) {} + registrar.getPigeonApiDisplayOrientedMeteringPointFactory().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("DisplayOrientedMeteringPointFactory", value, it.exceptionOrNull()) + } + } } else if (value is androidx.camera.core.MeteringPointFactory) { - registrar.getPigeonApiMeteringPointFactory().pigeon_newInstance(value) {} + registrar.getPigeonApiMeteringPointFactory().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("MeteringPointFactory", value, it.exceptionOrNull()) + } + } } when { @@ -1324,47 +1572,47 @@ private open class CameraXLibraryPigeonCodec : StandardMessageCodec() { when (value) { is InfoSupportedHardwareLevel -> { stream.write(129) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is AspectRatio -> { stream.write(130) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is CameraStateType -> { stream.write(131) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is LiveDataSupportedType -> { stream.write(132) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is VideoQuality -> { stream.write(133) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is MeteringMode -> { stream.write(134) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is LensFacing -> { stream.write(135) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is CameraXFlashMode -> { stream.write(136) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is ResolutionStrategyFallbackRule -> { stream.write(137) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is AspectRatioStrategyFallbackRule -> { stream.write(138) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is CameraStateErrorCode -> { stream.write(139) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } else -> super.writeValue(stream, value) } @@ -5382,14 +5630,12 @@ abstract class PigeonApiImageProxy( } } } -/** Utils for working with [ImageProxy]s. */ +/** Utilities for working with [ImageProxy]s. */ @Suppress("UNCHECKED_CAST") abstract class PigeonApiImageProxyUtils( open val pigeonRegistrar: CameraXLibraryPigeonProxyApiRegistrar ) { - /** - * Returns a single Byte Buffer that is representative of the [planes] that are NV21 compatible. - */ + /** Returns a single buffer that is representative of three NV21-compatible [planes]. */ abstract fun getNv21Buffer( imageWidth: Long, imageHeight: Long, diff --git a/packages/camera/camera_android_camerax/lib/src/camerax_library.dart b/packages/camera/camera_android_camerax/lib/src/camerax_library.dart index 1033d3540c7..ba884275d35 100644 --- a/packages/camera/camera_android_camerax/lib/src/camerax_library.dart +++ b/packages/camera/camera_android_camerax/lib/src/camerax_library.dart @@ -167,7 +167,7 @@ class Observer extends camerax.Observer { // ignore: non_constant_identifier_names super.pigeon_instanceManager, }) : _genericOnChanged = onChanged, - super( + super.pigeon_new( onChanged: (camerax.Observer instance, Object value) { onChanged(instance as Observer, value as T); }, diff --git a/packages/camera/camera_android_camerax/lib/src/camerax_library.g.dart b/packages/camera/camera_android_camerax/lib/src/camerax_library.g.dart index cff83c85079..6b45756e556 100644 --- a/packages/camera/camera_android_camerax/lib/src/camerax_library.g.dart +++ b/packages/camera/camera_android_camerax/lib/src/camerax_library.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -10,7 +10,7 @@ import 'dart:io' show Platform; import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; import 'package:flutter/foundation.dart' - show ReadBuffer, WriteBuffer, immutable, protected; + show ReadBuffer, WriteBuffer, immutable, protected, visibleForTesting; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart' show WidgetsFlutterBinding; @@ -35,8 +35,281 @@ List wrapResponse({ return [error.code, error.message, error.details]; } -/// An immutable object that serves as the base class for all ProxyApis and -/// can provide functional copies of itself. +/// Provides overrides for the constructors and static members of each +/// Dart proxy class. +/// +/// This is only intended to be used with unit tests to prevent errors from +/// making message calls in a unit test. +/// +/// See [PigeonOverrides.pigeon_reset] to set all overrides back to null. +@visibleForTesting +class PigeonOverrides { + /// Overrides [CameraSize.new]. + static CameraSize Function({required int width, required int height})? + cameraSize_new; + + /// Overrides [CameraIntegerRange.new]. + static CameraIntegerRange Function({required int lower, required int upper})? + cameraIntegerRange_new; + + /// Overrides [Observer.new]. + static Observer Function({ + required void Function(Observer pigeon_instance, Object value) onChanged, + })? + observer_new; + + /// Overrides [CameraSelector.new]. + static CameraSelector Function({ + LensFacing? requireLensFacing, + CameraInfo? cameraInfoForFilter, + })? + cameraSelector_new; + + /// Overrides [SystemServicesManager.new]. + static SystemServicesManager Function({ + required void Function( + SystemServicesManager pigeon_instance, + String errorDescription, + ) + onCameraError, + })? + systemServicesManager_new; + + /// Overrides [DeviceOrientationManager.new]. + static DeviceOrientationManager Function({ + required void Function( + DeviceOrientationManager pigeon_instance, + String orientation, + ) + onDeviceOrientationChanged, + })? + deviceOrientationManager_new; + + /// Overrides [Preview.new]. + static Preview Function({ + ResolutionSelector? resolutionSelector, + int? targetRotation, + })? + preview_new; + + /// Overrides [VideoCapture.withOutput]. + static VideoCapture Function({required VideoOutput videoOutput})? + videoCapture_withOutput; + + /// Overrides [Recorder.new]. + static Recorder Function({ + int? aspectRatio, + int? targetVideoEncodingBitRate, + QualitySelector? qualitySelector, + })? + recorder_new; + + /// Overrides [VideoRecordEventListener.new]. + static VideoRecordEventListener Function({ + required void Function( + VideoRecordEventListener pigeon_instance, + VideoRecordEvent event, + ) + onEvent, + })? + videoRecordEventListener_new; + + /// Overrides [ImageCapture.new]. + static ImageCapture Function({ + ResolutionSelector? resolutionSelector, + int? targetRotation, + CameraXFlashMode? flashMode, + })? + imageCapture_new; + + /// Overrides [ResolutionStrategy.new]. + static ResolutionStrategy Function({ + required CameraSize boundSize, + required ResolutionStrategyFallbackRule fallbackRule, + })? + resolutionStrategy_new; + + /// Overrides [ResolutionSelector.new]. + static ResolutionSelector Function({ + ResolutionFilter? resolutionFilter, + ResolutionStrategy? resolutionStrategy, + AspectRatioStrategy? aspectRatioStrategy, + })? + resolutionSelector_new; + + /// Overrides [AspectRatioStrategy.new]. + static AspectRatioStrategy Function({ + required AspectRatio preferredAspectRatio, + required AspectRatioStrategyFallbackRule fallbackRule, + })? + aspectRatioStrategy_new; + + /// Overrides [ImageAnalysis.new]. + static ImageAnalysis Function({ + ResolutionSelector? resolutionSelector, + int? targetRotation, + int? outputImageFormat, + })? + imageAnalysis_new; + + /// Overrides [Analyzer.new]. + static Analyzer Function({ + required void Function(Analyzer pigeon_instance, ImageProxy image) analyze, + })? + analyzer_new; + + /// Overrides [QualitySelector.from]. + static QualitySelector Function({ + required VideoQuality quality, + FallbackStrategy? fallbackStrategy, + })? + qualitySelector_from; + + /// Overrides [QualitySelector.fromOrderedList]. + static QualitySelector Function({ + required List qualities, + FallbackStrategy? fallbackStrategy, + })? + qualitySelector_fromOrderedList; + + /// Overrides [FallbackStrategy.higherQualityOrLowerThan]. + static FallbackStrategy Function({required VideoQuality quality})? + fallbackStrategy_higherQualityOrLowerThan; + + /// Overrides [FallbackStrategy.higherQualityThan]. + static FallbackStrategy Function({required VideoQuality quality})? + fallbackStrategy_higherQualityThan; + + /// Overrides [FallbackStrategy.lowerQualityOrHigherThan]. + static FallbackStrategy Function({required VideoQuality quality})? + fallbackStrategy_lowerQualityOrHigherThan; + + /// Overrides [FallbackStrategy.lowerQualityThan]. + static FallbackStrategy Function({required VideoQuality quality})? + fallbackStrategy_lowerQualityThan; + + /// Overrides [FocusMeteringActionBuilder.new]. + static FocusMeteringActionBuilder Function({required MeteringPoint point})? + focusMeteringActionBuilder_new; + + /// Overrides [FocusMeteringActionBuilder.withMode]. + static FocusMeteringActionBuilder Function({ + required MeteringPoint point, + required MeteringMode mode, + })? + focusMeteringActionBuilder_withMode; + + /// Overrides [CaptureRequestOptions.new]. + static CaptureRequestOptions Function({ + required Map options, + })? + captureRequestOptions_new; + + /// Overrides [Camera2CameraControl.from]. + static Camera2CameraControl Function({required CameraControl cameraControl})? + camera2CameraControl_from; + + /// Overrides [ResolutionFilter.createWithOnePreferredSize]. + static ResolutionFilter Function({required CameraSize preferredSize})? + resolutionFilter_createWithOnePreferredSize; + + /// Overrides [Camera2CameraInfo.from]. + static Camera2CameraInfo Function({required CameraInfo cameraInfo})? + camera2CameraInfo_from; + + /// Overrides [DisplayOrientedMeteringPointFactory.new]. + static DisplayOrientedMeteringPointFactory Function({ + required CameraInfo cameraInfo, + required double width, + required double height, + })? + displayOrientedMeteringPointFactory_new; + + /// Overrides [CameraSelector.defaultBackCamera]. + static CameraSelector? cameraSelector_defaultBackCamera; + + /// Overrides [CameraSelector.defaultFrontCamera]. + static CameraSelector? cameraSelector_defaultFrontCamera; + + /// Overrides [ResolutionStrategy.highestAvailableStrategy]. + static ResolutionStrategy? resolutionStrategy_highestAvailableStrategy; + + /// Overrides [AspectRatioStrategy.ratio_16_9FallbackAutoStrategy]. + static AspectRatioStrategy? + aspectRatioStrategy_ratio_16_9FallbackAutoStrategy; + + /// Overrides [AspectRatioStrategy.ratio_4_3FallbackAutoStrategy]. + static AspectRatioStrategy? aspectRatioStrategy_ratio_4_3FallbackAutoStrategy; + + /// Overrides [CaptureRequest.controlAELock]. + static CaptureRequestKey? captureRequest_controlAELock; + + /// Overrides [CameraCharacteristics.infoSupportedHardwareLevel]. + static CameraCharacteristicsKey? + cameraCharacteristics_infoSupportedHardwareLevel; + + /// Overrides [CameraCharacteristics.sensorOrientation]. + static CameraCharacteristicsKey? cameraCharacteristics_sensorOrientation; + + /// Overrides [ProcessCameraProvider.getInstance]. + static Future Function()? + processCameraProvider_getInstance; + + /// Overrides [ImageProxyUtils.getNv21Buffer]. + static Future Function(int, int, List)? + imageProxyUtils_getNv21Buffer; + + /// Overrides [QualitySelector.getResolution]. + static Future Function(CameraInfo, VideoQuality)? + qualitySelector_getResolution; + + /// Sets all overridden ProxyApi class members to null. + static void pigeon_reset() { + cameraSize_new = null; + cameraIntegerRange_new = null; + observer_new = null; + cameraSelector_new = null; + cameraSelector_defaultBackCamera = null; + cameraSelector_defaultFrontCamera = null; + processCameraProvider_getInstance = null; + systemServicesManager_new = null; + deviceOrientationManager_new = null; + preview_new = null; + videoCapture_withOutput = null; + recorder_new = null; + videoRecordEventListener_new = null; + imageCapture_new = null; + resolutionStrategy_new = null; + resolutionStrategy_highestAvailableStrategy = null; + resolutionSelector_new = null; + aspectRatioStrategy_new = null; + aspectRatioStrategy_ratio_16_9FallbackAutoStrategy = null; + aspectRatioStrategy_ratio_4_3FallbackAutoStrategy = null; + imageAnalysis_new = null; + analyzer_new = null; + imageProxyUtils_getNv21Buffer = null; + qualitySelector_from = null; + qualitySelector_fromOrderedList = null; + qualitySelector_getResolution = null; + fallbackStrategy_higherQualityOrLowerThan = null; + fallbackStrategy_higherQualityThan = null; + fallbackStrategy_lowerQualityOrHigherThan = null; + fallbackStrategy_lowerQualityThan = null; + focusMeteringActionBuilder_new = null; + focusMeteringActionBuilder_withMode = null; + captureRequest_controlAELock = null; + captureRequestOptions_new = null; + camera2CameraControl_from = null; + resolutionFilter_createWithOnePreferredSize = null; + cameraCharacteristics_infoSupportedHardwareLevel = null; + cameraCharacteristics_sensorOrientation = null; + camera2CameraInfo_from = null; + displayOrientedMeteringPointFactory_new = null; + } +} + +/// An immutable object that serves as the base class for all Dart proxy classes +/// and can provide functional copies of itself. /// /// All implementers are expected to be [immutable] as defined by the annotation /// and override [pigeon_copy] returning an instance of itself. @@ -101,7 +374,7 @@ class PigeonInstanceManager { // 0 <= n < 2^16. static const int _maxDartCreatedIdentifier = 65536; - /// The default [PigeonInstanceManager] used by ProxyApis. + /// The default [PigeonInstanceManager] used by Dart proxy classes. /// /// On creation, this manager makes a call to clear the native /// InstanceManager. This is to prevent identifier conflicts after a host @@ -911,7 +1184,25 @@ class _PigeonCodec extends StandardMessageCodec { /// /// See https://developer.android.com/reference/android/util/Size.html. class CameraSize extends PigeonInternalProxyApiBaseClass { - CameraSize({ + factory CameraSize({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required int width, + required int height, + }) { + if (PigeonOverrides.cameraSize_new != null) { + return PigeonOverrides.cameraSize_new!(width: width, height: height); + } + return CameraSize.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + width: width, + height: height, + ); + } + + @protected + CameraSize.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required this.width, @@ -1145,7 +1436,28 @@ class ResolutionInfo extends PigeonInternalProxyApiBaseClass { /// /// See https://developer.android.com/reference/android/util/Range.html. class CameraIntegerRange extends PigeonInternalProxyApiBaseClass { - CameraIntegerRange({ + factory CameraIntegerRange({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required int lower, + required int upper, + }) { + if (PigeonOverrides.cameraIntegerRange_new != null) { + return PigeonOverrides.cameraIntegerRange_new!( + lower: lower, + upper: upper, + ); + } + return CameraIntegerRange.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + lower: lower, + upper: upper, + ); + } + + @protected + CameraIntegerRange.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required this.lower, @@ -1644,7 +1956,23 @@ class MeteringPoint extends PigeonInternalProxyApiBaseClass { /// /// See https://developer.android.com/reference/androidx/lifecycle/Observer. class Observer extends PigeonInternalProxyApiBaseClass { - Observer({ + factory Observer({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required void Function(Observer pigeon_instance, Object value) onChanged, + }) { + if (PigeonOverrides.observer_new != null) { + return PigeonOverrides.observer_new!(onChanged: onChanged); + } + return Observer.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + onChanged: onChanged, + ); + } + + @protected + Observer.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required this.onChanged, @@ -1967,7 +2295,28 @@ class CameraInfo extends PigeonInternalProxyApiBaseClass { /// /// See https://developer.android.com/reference/androidx/camera/core/CameraSelector. class CameraSelector extends PigeonInternalProxyApiBaseClass { - CameraSelector({ + factory CameraSelector({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + LensFacing? requireLensFacing, + CameraInfo? cameraInfoForFilter, + }) { + if (PigeonOverrides.cameraSelector_new != null) { + return PigeonOverrides.cameraSelector_new!( + requireLensFacing: requireLensFacing, + cameraInfoForFilter: cameraInfoForFilter, + ); + } + return CameraSelector.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + requireLensFacing: requireLensFacing, + cameraInfoForFilter: cameraInfoForFilter, + ); + } + + @protected + CameraSelector.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, LensFacing? requireLensFacing, @@ -2024,12 +2373,21 @@ class CameraSelector extends PigeonInternalProxyApiBaseClass { _PigeonInternalProxyApiBaseCodec(pigeon_instanceManager); /// A static `CameraSelector` that selects the default back facing camera. - static final CameraSelector defaultBackCamera = pigeonVar_defaultBackCamera(); + static final CameraSelector _defaultBackCamera = + pigeonVar_defaultBackCamera(); /// A static `CameraSelector` that selects the default front facing camera. - static final CameraSelector defaultFrontCamera = + static final CameraSelector _defaultFrontCamera = pigeonVar_defaultFrontCamera(); + /// A static `CameraSelector` that selects the default back facing camera. + static CameraSelector get defaultBackCamera => + PigeonOverrides.cameraSelector_defaultBackCamera ?? _defaultBackCamera; + + /// A static `CameraSelector` that selects the default front facing camera. + static CameraSelector get defaultFrontCamera => + PigeonOverrides.cameraSelector_defaultFrontCamera ?? _defaultFrontCamera; + static void pigeon_setUpMessageHandlers({ bool pigeon_clearHandlers = false, BinaryMessenger? pigeon_binaryMessenger, @@ -2285,6 +2643,9 @@ class ProcessCameraProvider extends PigeonInternalProxyApiBaseClass { BinaryMessenger? pigeon_binaryMessenger, PigeonInstanceManager? pigeon_instanceManager, }) async { + if (PigeonOverrides.processCameraProvider_getInstance != null) { + return PigeonOverrides.processCameraProvider_getInstance!(); + } final _PigeonInternalProxyApiBaseCodec pigeonChannelCodec = _PigeonInternalProxyApiBaseCodec( pigeon_instanceManager ?? PigeonInstanceManager.instance, @@ -2712,7 +3073,29 @@ class Camera extends PigeonInternalProxyApiBaseClass { /// Convenience class for accessing system resources. class SystemServicesManager extends PigeonInternalProxyApiBaseClass { - SystemServicesManager({ + factory SystemServicesManager({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required void Function( + SystemServicesManager pigeon_instance, + String errorDescription, + ) + onCameraError, + }) { + if (PigeonOverrides.systemServicesManager_new != null) { + return PigeonOverrides.systemServicesManager_new!( + onCameraError: onCameraError, + ); + } + return SystemServicesManager.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + onCameraError: onCameraError, + ); + } + + @protected + SystemServicesManager.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required this.onCameraError, @@ -3030,7 +3413,29 @@ class CameraPermissionsError extends PigeonInternalProxyApiBaseClass { /// Support class to help to determine the media orientation based on the /// orientation of the device. class DeviceOrientationManager extends PigeonInternalProxyApiBaseClass { - DeviceOrientationManager({ + factory DeviceOrientationManager({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required void Function( + DeviceOrientationManager pigeon_instance, + String orientation, + ) + onDeviceOrientationChanged, + }) { + if (PigeonOverrides.deviceOrientationManager_new != null) { + return PigeonOverrides.deviceOrientationManager_new!( + onDeviceOrientationChanged: onDeviceOrientationChanged, + ); + } + return DeviceOrientationManager.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + onDeviceOrientationChanged: onDeviceOrientationChanged, + ); + } + + @protected + DeviceOrientationManager.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required this.onDeviceOrientationChanged, @@ -3309,7 +3714,28 @@ class DeviceOrientationManager extends PigeonInternalProxyApiBaseClass { /// /// See https://developer.android.com/reference/kotlin/androidx/camera/core/Preview. class Preview extends UseCase { - Preview({ + factory Preview({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + ResolutionSelector? resolutionSelector, + int? targetRotation, + }) { + if (PigeonOverrides.preview_new != null) { + return PigeonOverrides.preview_new!( + resolutionSelector: resolutionSelector, + targetRotation: targetRotation, + ); + } + return Preview.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + resolutionSelector: resolutionSelector, + targetRotation: targetRotation, + ); + } + + @protected + Preview.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, this.resolutionSelector, @@ -3618,7 +4044,24 @@ class Preview extends UseCase { /// See https://developer.android.com/reference/kotlin/androidx/camera/video/VideoCapture. class VideoCapture extends UseCase { /// Create a `VideoCapture` associated with the given `VideoOutput`. - VideoCapture.withOutput({ + factory VideoCapture.withOutput({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required VideoOutput videoOutput, + }) { + if (PigeonOverrides.videoCapture_withOutput != null) { + return PigeonOverrides.videoCapture_withOutput!(videoOutput: videoOutput); + } + return VideoCapture.pigeon_withOutput( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + videoOutput: videoOutput, + ); + } + + /// Create a `VideoCapture` associated with the given `VideoOutput`. + @protected + VideoCapture.pigeon_withOutput({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required VideoOutput videoOutput, @@ -3883,7 +4326,31 @@ class VideoOutput extends PigeonInternalProxyApiBaseClass { /// /// See https://developer.android.com/reference/kotlin/androidx/camera/video/Recorder. class Recorder extends PigeonInternalProxyApiBaseClass implements VideoOutput { - Recorder({ + factory Recorder({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + int? aspectRatio, + int? targetVideoEncodingBitRate, + QualitySelector? qualitySelector, + }) { + if (PigeonOverrides.recorder_new != null) { + return PigeonOverrides.recorder_new!( + aspectRatio: aspectRatio, + targetVideoEncodingBitRate: targetVideoEncodingBitRate, + qualitySelector: qualitySelector, + ); + } + return Recorder.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + aspectRatio: aspectRatio, + targetVideoEncodingBitRate: targetVideoEncodingBitRate, + qualitySelector: qualitySelector, + ); + } + + @protected + Recorder.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, int? aspectRatio, @@ -4150,7 +4617,27 @@ class Recorder extends PigeonInternalProxyApiBaseClass implements VideoOutput { /// Listens for `VideoRecordEvent`s from a `PendingRecording`. class VideoRecordEventListener extends PigeonInternalProxyApiBaseClass { - VideoRecordEventListener({ + factory VideoRecordEventListener({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required void Function( + VideoRecordEventListener pigeon_instance, + VideoRecordEvent event, + ) + onEvent, + }) { + if (PigeonOverrides.videoRecordEventListener_new != null) { + return PigeonOverrides.videoRecordEventListener_new!(onEvent: onEvent); + } + return VideoRecordEventListener.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + onEvent: onEvent, + ); + } + + @protected + VideoRecordEventListener.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required this.onEvent, @@ -4707,7 +5194,31 @@ class Recording extends PigeonInternalProxyApiBaseClass { /// /// See https://developer.android.com/reference/kotlin/androidx/camera/core/ImageCapture. class ImageCapture extends UseCase { - ImageCapture({ + factory ImageCapture({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + ResolutionSelector? resolutionSelector, + int? targetRotation, + CameraXFlashMode? flashMode, + }) { + if (PigeonOverrides.imageCapture_new != null) { + return PigeonOverrides.imageCapture_new!( + resolutionSelector: resolutionSelector, + targetRotation: targetRotation, + flashMode: flashMode, + ); + } + return ImageCapture.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + resolutionSelector: resolutionSelector, + targetRotation: targetRotation, + flashMode: flashMode, + ); + } + + @protected + ImageCapture.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, this.resolutionSelector, @@ -4940,7 +5451,28 @@ class ImageCapture extends UseCase { /// /// See https://developer.android.com/reference/kotlin/androidx/camera/core/resolutionselector/ResolutionStrategy. class ResolutionStrategy extends PigeonInternalProxyApiBaseClass { - ResolutionStrategy({ + factory ResolutionStrategy({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required CameraSize boundSize, + required ResolutionStrategyFallbackRule fallbackRule, + }) { + if (PigeonOverrides.resolutionStrategy_new != null) { + return PigeonOverrides.resolutionStrategy_new!( + boundSize: boundSize, + fallbackRule: fallbackRule, + ); + } + return ResolutionStrategy.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + boundSize: boundSize, + fallbackRule: fallbackRule, + ); + } + + @protected + ResolutionStrategy.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required CameraSize boundSize, @@ -4995,9 +5527,14 @@ class ResolutionStrategy extends PigeonInternalProxyApiBaseClass { ); /// A resolution strategy chooses the highest available resolution. - static final ResolutionStrategy highestAvailableStrategy = + static final ResolutionStrategy _highestAvailableStrategy = pigeonVar_highestAvailableStrategy(); + /// A resolution strategy chooses the highest available resolution. + static ResolutionStrategy get highestAvailableStrategy => + PigeonOverrides.resolutionStrategy_highestAvailableStrategy ?? + _highestAvailableStrategy; + static void pigeon_setUpMessageHandlers({ bool pigeon_clearHandlers = false, BinaryMessenger? pigeon_binaryMessenger, @@ -5173,7 +5710,31 @@ class ResolutionStrategy extends PigeonInternalProxyApiBaseClass { /// /// See https://developer.android.com/reference/kotlin/androidx/camera/core/resolutionselector/ResolutionSelector. class ResolutionSelector extends PigeonInternalProxyApiBaseClass { - ResolutionSelector({ + factory ResolutionSelector({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + ResolutionFilter? resolutionFilter, + ResolutionStrategy? resolutionStrategy, + AspectRatioStrategy? aspectRatioStrategy, + }) { + if (PigeonOverrides.resolutionSelector_new != null) { + return PigeonOverrides.resolutionSelector_new!( + resolutionFilter: resolutionFilter, + resolutionStrategy: resolutionStrategy, + aspectRatioStrategy: aspectRatioStrategy, + ); + } + return ResolutionSelector.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + resolutionFilter: resolutionFilter, + resolutionStrategy: resolutionStrategy, + aspectRatioStrategy: aspectRatioStrategy, + ); + } + + @protected + ResolutionSelector.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, this.resolutionFilter, @@ -5364,7 +5925,30 @@ class ResolutionSelector extends PigeonInternalProxyApiBaseClass { class AspectRatioStrategy extends PigeonInternalProxyApiBaseClass { /// Creates a new AspectRatioStrategy instance, configured with the specified /// preferred aspect ratio and fallback rule. - AspectRatioStrategy({ + factory AspectRatioStrategy({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required AspectRatio preferredAspectRatio, + required AspectRatioStrategyFallbackRule fallbackRule, + }) { + if (PigeonOverrides.aspectRatioStrategy_new != null) { + return PigeonOverrides.aspectRatioStrategy_new!( + preferredAspectRatio: preferredAspectRatio, + fallbackRule: fallbackRule, + ); + } + return AspectRatioStrategy.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + preferredAspectRatio: preferredAspectRatio, + fallbackRule: fallbackRule, + ); + } + + /// Creates a new AspectRatioStrategy instance, configured with the specified + /// preferred aspect ratio and fallback rule. + @protected + AspectRatioStrategy.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required AspectRatio preferredAspectRatio, @@ -5424,14 +6008,26 @@ class AspectRatioStrategy extends PigeonInternalProxyApiBaseClass { /// The pre-defined aspect ratio strategy that selects sizes with RATIO_16_9 /// in priority. - static final AspectRatioStrategy ratio_16_9FallbackAutoStrategy = + static final AspectRatioStrategy _ratio_16_9FallbackAutoStrategy = pigeonVar_ratio_16_9FallbackAutoStrategy(); /// The pre-defined default aspect ratio strategy that selects sizes with /// RATIO_4_3 in priority. - static final AspectRatioStrategy ratio_4_3FallbackAutoStrategy = + static final AspectRatioStrategy _ratio_4_3FallbackAutoStrategy = pigeonVar_ratio_4_3FallbackAutoStrategy(); + /// The pre-defined aspect ratio strategy that selects sizes with RATIO_16_9 + /// in priority. + static AspectRatioStrategy get ratio_16_9FallbackAutoStrategy => + PigeonOverrides.aspectRatioStrategy_ratio_16_9FallbackAutoStrategy ?? + _ratio_16_9FallbackAutoStrategy; + + /// The pre-defined default aspect ratio strategy that selects sizes with + /// RATIO_4_3 in priority. + static AspectRatioStrategy get ratio_4_3FallbackAutoStrategy => + PigeonOverrides.aspectRatioStrategy_ratio_4_3FallbackAutoStrategy ?? + _ratio_4_3FallbackAutoStrategy; + static void pigeon_setUpMessageHandlers({ bool pigeon_clearHandlers = false, BinaryMessenger? pigeon_binaryMessenger, @@ -5962,7 +6558,31 @@ class ZoomState extends PigeonInternalProxyApiBaseClass { /// /// See https://developer.android.com/reference/kotlin/androidx/camera/core/ImageAnalysis. class ImageAnalysis extends UseCase { - ImageAnalysis({ + factory ImageAnalysis({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + ResolutionSelector? resolutionSelector, + int? targetRotation, + int? outputImageFormat, + }) { + if (PigeonOverrides.imageAnalysis_new != null) { + return PigeonOverrides.imageAnalysis_new!( + resolutionSelector: resolutionSelector, + targetRotation: targetRotation, + outputImageFormat: outputImageFormat, + ); + } + return ImageAnalysis.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + resolutionSelector: resolutionSelector, + targetRotation: targetRotation, + outputImageFormat: outputImageFormat, + ); + } + + @protected + ImageAnalysis.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, this.resolutionSelector, @@ -6188,7 +6808,23 @@ class ImageAnalysis extends UseCase { /// /// See https://developer.android.com/reference/kotlin/androidx/camera/core/ImageAnalysis.Analyzer. class Analyzer extends PigeonInternalProxyApiBaseClass { - Analyzer({ + factory Analyzer({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required void Function(Analyzer pigeon_instance, ImageProxy image) analyze, + }) { + if (PigeonOverrides.analyzer_new != null) { + return PigeonOverrides.analyzer_new!(analyze: analyze); + } + return Analyzer.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + analyze: analyze, + ); + } + + @protected + Analyzer.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required this.analyze, @@ -6793,7 +7429,7 @@ class ImageProxy extends PigeonInternalProxyApiBaseClass { } } -/// Utils for working with [ImageProxy]s. +/// Utilities for working with [ImageProxy]s. class ImageProxyUtils extends PigeonInternalProxyApiBaseClass { /// Constructs [ImageProxyUtils] without creating the associated native object. /// @@ -6863,8 +7499,7 @@ class ImageProxyUtils extends PigeonInternalProxyApiBaseClass { } } - /// Returns a single Byte Buffer that is representative of the [planes] - /// that are NV21 compatible. + /// Returns a single buffer that is representative of three NV21-compatible [planes]. static Future getNv21Buffer( int imageWidth, int imageHeight, @@ -6872,6 +7507,13 @@ class ImageProxyUtils extends PigeonInternalProxyApiBaseClass { BinaryMessenger? pigeon_binaryMessenger, PigeonInstanceManager? pigeon_instanceManager, }) async { + if (PigeonOverrides.imageProxyUtils_getNv21Buffer != null) { + return PigeonOverrides.imageProxyUtils_getNv21Buffer!( + imageWidth, + imageHeight, + planes, + ); + } final _PigeonInternalProxyApiBaseCodec pigeonChannelCodec = _PigeonInternalProxyApiBaseCodec( pigeon_instanceManager ?? PigeonInstanceManager.instance, @@ -7040,7 +7682,29 @@ class PlaneProxy extends PigeonInternalProxyApiBaseClass { /// See https://developer.android.com/reference/kotlin/androidx/camera/video/QualitySelector. class QualitySelector extends PigeonInternalProxyApiBaseClass { /// Gets an instance of QualitySelector with a desired quality. - QualitySelector.from({ + factory QualitySelector.from({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required VideoQuality quality, + FallbackStrategy? fallbackStrategy, + }) { + if (PigeonOverrides.qualitySelector_from != null) { + return PigeonOverrides.qualitySelector_from!( + quality: quality, + fallbackStrategy: fallbackStrategy, + ); + } + return QualitySelector.pigeon_from( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + quality: quality, + fallbackStrategy: fallbackStrategy, + ); + } + + /// Gets an instance of QualitySelector with a desired quality. + @protected + QualitySelector.pigeon_from({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required VideoQuality quality, @@ -7080,7 +7744,29 @@ class QualitySelector extends PigeonInternalProxyApiBaseClass { } /// Gets an instance of QualitySelector with ordered desired qualities. - QualitySelector.fromOrderedList({ + factory QualitySelector.fromOrderedList({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required List qualities, + FallbackStrategy? fallbackStrategy, + }) { + if (PigeonOverrides.qualitySelector_fromOrderedList != null) { + return PigeonOverrides.qualitySelector_fromOrderedList!( + qualities: qualities, + fallbackStrategy: fallbackStrategy, + ); + } + return QualitySelector.pigeon_fromOrderedList( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + qualities: qualities, + fallbackStrategy: fallbackStrategy, + ); + } + + /// Gets an instance of QualitySelector with ordered desired qualities. + @protected + QualitySelector.pigeon_fromOrderedList({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required List qualities, @@ -7194,6 +7880,12 @@ class QualitySelector extends PigeonInternalProxyApiBaseClass { BinaryMessenger? pigeon_binaryMessenger, PigeonInstanceManager? pigeon_instanceManager, }) async { + if (PigeonOverrides.qualitySelector_getResolution != null) { + return PigeonOverrides.qualitySelector_getResolution!( + cameraInfo, + quality, + ); + } final _PigeonInternalProxyApiBaseCodec pigeonChannelCodec = _PigeonInternalProxyApiBaseCodec( pigeon_instanceManager ?? PigeonInstanceManager.instance, @@ -7242,7 +7934,27 @@ class QualitySelector extends PigeonInternalProxyApiBaseClass { class FallbackStrategy extends PigeonInternalProxyApiBaseClass { /// Returns a fallback strategy that will choose the quality that is closest /// to and higher than the input quality. - FallbackStrategy.higherQualityOrLowerThan({ + factory FallbackStrategy.higherQualityOrLowerThan({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required VideoQuality quality, + }) { + if (PigeonOverrides.fallbackStrategy_higherQualityOrLowerThan != null) { + return PigeonOverrides.fallbackStrategy_higherQualityOrLowerThan!( + quality: quality, + ); + } + return FallbackStrategy.pigeon_higherQualityOrLowerThan( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + quality: quality, + ); + } + + /// Returns a fallback strategy that will choose the quality that is closest + /// to and higher than the input quality. + @protected + FallbackStrategy.pigeon_higherQualityOrLowerThan({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required VideoQuality quality, @@ -7282,7 +7994,27 @@ class FallbackStrategy extends PigeonInternalProxyApiBaseClass { /// Returns a fallback strategy that will choose the quality that is closest /// to and higher than the input quality. - FallbackStrategy.higherQualityThan({ + factory FallbackStrategy.higherQualityThan({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required VideoQuality quality, + }) { + if (PigeonOverrides.fallbackStrategy_higherQualityThan != null) { + return PigeonOverrides.fallbackStrategy_higherQualityThan!( + quality: quality, + ); + } + return FallbackStrategy.pigeon_higherQualityThan( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + quality: quality, + ); + } + + /// Returns a fallback strategy that will choose the quality that is closest + /// to and higher than the input quality. + @protected + FallbackStrategy.pigeon_higherQualityThan({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required VideoQuality quality, @@ -7322,7 +8054,27 @@ class FallbackStrategy extends PigeonInternalProxyApiBaseClass { /// Returns a fallback strategy that will choose the quality that is closest /// to and lower than the input quality. - FallbackStrategy.lowerQualityOrHigherThan({ + factory FallbackStrategy.lowerQualityOrHigherThan({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required VideoQuality quality, + }) { + if (PigeonOverrides.fallbackStrategy_lowerQualityOrHigherThan != null) { + return PigeonOverrides.fallbackStrategy_lowerQualityOrHigherThan!( + quality: quality, + ); + } + return FallbackStrategy.pigeon_lowerQualityOrHigherThan( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + quality: quality, + ); + } + + /// Returns a fallback strategy that will choose the quality that is closest + /// to and lower than the input quality. + @protected + FallbackStrategy.pigeon_lowerQualityOrHigherThan({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required VideoQuality quality, @@ -7362,7 +8114,27 @@ class FallbackStrategy extends PigeonInternalProxyApiBaseClass { /// Returns a fallback strategy that will choose the quality that is closest /// to and lower than the input quality. - FallbackStrategy.lowerQualityThan({ + factory FallbackStrategy.lowerQualityThan({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required VideoQuality quality, + }) { + if (PigeonOverrides.fallbackStrategy_lowerQualityThan != null) { + return PigeonOverrides.fallbackStrategy_lowerQualityThan!( + quality: quality, + ); + } + return FallbackStrategy.pigeon_lowerQualityThan( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + quality: quality, + ); + } + + /// Returns a fallback strategy that will choose the quality that is closest + /// to and lower than the input quality. + @protected + FallbackStrategy.pigeon_lowerQualityThan({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required VideoQuality quality, @@ -7724,7 +8496,25 @@ class CameraControl extends PigeonInternalProxyApiBaseClass { class FocusMeteringActionBuilder extends PigeonInternalProxyApiBaseClass { /// Creates a Builder from a `MeteringPoint` with default mode FLAG_AF | /// FLAG_AE | FLAG_AWB. - FocusMeteringActionBuilder({ + factory FocusMeteringActionBuilder({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required MeteringPoint point, + }) { + if (PigeonOverrides.focusMeteringActionBuilder_new != null) { + return PigeonOverrides.focusMeteringActionBuilder_new!(point: point); + } + return FocusMeteringActionBuilder.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + point: point, + ); + } + + /// Creates a Builder from a `MeteringPoint` with default mode FLAG_AF | + /// FLAG_AE | FLAG_AWB. + @protected + FocusMeteringActionBuilder.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required MeteringPoint point, @@ -7763,7 +8553,29 @@ class FocusMeteringActionBuilder extends PigeonInternalProxyApiBaseClass { } /// Creates a Builder from a `MeteringPoint` and `MeteringMode`. - FocusMeteringActionBuilder.withMode({ + factory FocusMeteringActionBuilder.withMode({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required MeteringPoint point, + required MeteringMode mode, + }) { + if (PigeonOverrides.focusMeteringActionBuilder_withMode != null) { + return PigeonOverrides.focusMeteringActionBuilder_withMode!( + point: point, + mode: mode, + ); + } + return FocusMeteringActionBuilder.pigeon_withMode( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + point: point, + mode: mode, + ); + } + + /// Creates a Builder from a `MeteringPoint` and `MeteringMode`. + @protected + FocusMeteringActionBuilder.pigeon_withMode({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required MeteringPoint point, @@ -8256,7 +9068,16 @@ class CaptureRequest extends PigeonInternalProxyApiBaseClass { /// Value is boolean. /// /// This key is available on all devices. - static final CaptureRequestKey controlAELock = pigeonVar_controlAELock(); + static final CaptureRequestKey _controlAELock = pigeonVar_controlAELock(); + + /// Whether auto-exposure (AE) is currently locked to its latest calculated + /// values. + /// + /// Value is boolean. + /// + /// This key is available on all devices. + static CaptureRequestKey get controlAELock => + PigeonOverrides.captureRequest_controlAELock ?? _controlAELock; static void pigeon_setUpMessageHandlers({ bool pigeon_clearHandlers = false, @@ -8443,7 +9264,23 @@ class CaptureRequestKey extends PigeonInternalProxyApiBaseClass { /// /// See https://developer.android.com/reference/kotlin/androidx/camera/camera2/interop/CaptureRequestOptions. class CaptureRequestOptions extends PigeonInternalProxyApiBaseClass { - CaptureRequestOptions({ + factory CaptureRequestOptions({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required Map options, + }) { + if (PigeonOverrides.captureRequestOptions_new != null) { + return PigeonOverrides.captureRequestOptions_new!(options: options); + } + return CaptureRequestOptions.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + options: options, + ); + } + + @protected + CaptureRequestOptions.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required Map options, @@ -8598,7 +9435,26 @@ class CaptureRequestOptions extends PigeonInternalProxyApiBaseClass { /// See https://developer.android.com/reference/kotlin/androidx/camera/camera2/interop/Camera2CameraControl. class Camera2CameraControl extends PigeonInternalProxyApiBaseClass { /// Gets the `Camera2CameraControl` from a `CameraControl`. - Camera2CameraControl.from({ + factory Camera2CameraControl.from({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required CameraControl cameraControl, + }) { + if (PigeonOverrides.camera2CameraControl_from != null) { + return PigeonOverrides.camera2CameraControl_from!( + cameraControl: cameraControl, + ); + } + return Camera2CameraControl.pigeon_from( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + cameraControl: cameraControl, + ); + } + + /// Gets the `Camera2CameraControl` from a `CameraControl`. + @protected + Camera2CameraControl.pigeon_from({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required CameraControl cameraControl, @@ -8752,7 +9608,25 @@ class Camera2CameraControl extends PigeonInternalProxyApiBaseClass { /// /// See https://developer.android.com/reference/kotlin/androidx/camera/core/resolutionselector/ResolutionFilter. class ResolutionFilter extends PigeonInternalProxyApiBaseClass { - ResolutionFilter.createWithOnePreferredSize({ + factory ResolutionFilter.createWithOnePreferredSize({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required CameraSize preferredSize, + }) { + if (PigeonOverrides.resolutionFilter_createWithOnePreferredSize != null) { + return PigeonOverrides.resolutionFilter_createWithOnePreferredSize!( + preferredSize: preferredSize, + ); + } + return ResolutionFilter.pigeon_createWithOnePreferredSize( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + preferredSize: preferredSize, + ); + } + + @protected + ResolutionFilter.pigeon_createWithOnePreferredSize({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required CameraSize preferredSize, @@ -8965,7 +9839,7 @@ class CameraCharacteristics extends PigeonInternalProxyApiBaseClass { /// Value is `InfoSupportedHardwareLevel`. /// /// This key is available on all devices. - static final CameraCharacteristicsKey infoSupportedHardwareLevel = + static final CameraCharacteristicsKey _infoSupportedHardwareLevel = pigeonVar_infoSupportedHardwareLevel(); /// Clockwise angle through which the output image needs to be rotated to be @@ -8974,9 +9848,28 @@ class CameraCharacteristics extends PigeonInternalProxyApiBaseClass { /// Value is int. /// /// This key is available on all devices. - static final CameraCharacteristicsKey sensorOrientation = + static final CameraCharacteristicsKey _sensorOrientation = pigeonVar_sensorOrientation(); + /// Generally classifies the overall set of the camera device functionality. + /// + /// Value is `InfoSupportedHardwareLevel`. + /// + /// This key is available on all devices. + static CameraCharacteristicsKey get infoSupportedHardwareLevel => + PigeonOverrides.cameraCharacteristics_infoSupportedHardwareLevel ?? + _infoSupportedHardwareLevel; + + /// Clockwise angle through which the output image needs to be rotated to be + /// upright on the device screen in its native orientation.. + /// + /// Value is int. + /// + /// This key is available on all devices. + static CameraCharacteristicsKey get sensorOrientation => + PigeonOverrides.cameraCharacteristics_sensorOrientation ?? + _sensorOrientation; + static void pigeon_setUpMessageHandlers({ bool pigeon_clearHandlers = false, BinaryMessenger? pigeon_binaryMessenger, @@ -9122,7 +10015,24 @@ class CameraCharacteristics extends PigeonInternalProxyApiBaseClass { /// See https://developer.android.com/reference/kotlin/androidx/camera/camera2/interop/Camera2CameraInfo. class Camera2CameraInfo extends PigeonInternalProxyApiBaseClass { /// Gets the `Camera2CameraInfo` from a `CameraInfo`. - Camera2CameraInfo.from({ + factory Camera2CameraInfo.from({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required CameraInfo cameraInfo, + }) { + if (PigeonOverrides.camera2CameraInfo_from != null) { + return PigeonOverrides.camera2CameraInfo_from!(cameraInfo: cameraInfo); + } + return Camera2CameraInfo.pigeon_from( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + cameraInfo: cameraInfo, + ); + } + + /// Gets the `Camera2CameraInfo` from a `CameraInfo`. + @protected + Camera2CameraInfo.pigeon_from({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required CameraInfo cameraInfo, @@ -9474,7 +10384,34 @@ class DisplayOrientedMeteringPointFactory extends MeteringPointFactory { /// Creates a DisplayOrientedMeteringPointFactory for converting View (x, y) /// into a MeteringPoint based on the current display's rotation and /// CameraInfo. - DisplayOrientedMeteringPointFactory({ + factory DisplayOrientedMeteringPointFactory({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required CameraInfo cameraInfo, + required double width, + required double height, + }) { + if (PigeonOverrides.displayOrientedMeteringPointFactory_new != null) { + return PigeonOverrides.displayOrientedMeteringPointFactory_new!( + cameraInfo: cameraInfo, + width: width, + height: height, + ); + } + return DisplayOrientedMeteringPointFactory.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + cameraInfo: cameraInfo, + width: width, + height: height, + ); + } + + /// Creates a DisplayOrientedMeteringPointFactory for converting View (x, y) + /// into a MeteringPoint based on the current display's rotation and + /// CameraInfo. + @protected + DisplayOrientedMeteringPointFactory.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required CameraInfo cameraInfo, diff --git a/packages/camera/camera_android_camerax/pubspec.yaml b/packages/camera/camera_android_camerax/pubspec.yaml index f5017b26693..da034ec0103 100644 --- a/packages/camera/camera_android_camerax/pubspec.yaml +++ b/packages/camera/camera_android_camerax/pubspec.yaml @@ -31,7 +31,7 @@ dev_dependencies: sdk: flutter leak_tracker_flutter_testing: any mockito: ^5.4.4 - pigeon: ^25.3.2 + pigeon: ^26.1.0 topics: - camera diff --git a/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation_objc/include/camera_avfoundation/messages.g.h b/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation_objc/include/camera_avfoundation/messages.g.h index 782d3df866f..7064a15caac 100644 --- a/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation_objc/include/camera_avfoundation/messages.g.h +++ b/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation_objc/include/camera_avfoundation/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 (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #import diff --git a/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation_objc/messages.g.m b/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation_objc/messages.g.m index 0a86f9e9f96..64524e708c7 100644 --- a/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation_objc/messages.g.m +++ b/packages/camera/camera_avfoundation/ios/camera_avfoundation/Sources/camera_avfoundation_objc/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 (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "./include/camera_avfoundation/messages.g.h" diff --git a/packages/camera/camera_avfoundation/lib/src/messages.g.dart b/packages/camera/camera_avfoundation/lib/src/messages.g.dart index 50fe099314e..fd25e3be8ba 100644 --- a/packages/camera/camera_avfoundation/lib/src/messages.g.dart +++ b/packages/camera/camera_avfoundation/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -32,6 +32,24 @@ List wrapResponse({ return [error.code, error.message, error.details]; } +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); + } + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); + } + return a == b; +} + enum PlatformCameraLensDirection { /// Front facing camera (a user looking at the screen is seen by the camera). front, @@ -93,10 +111,14 @@ class PlatformCameraDescription { /// The type of the camera lens. PlatformCameraLensType lensType; - Object encode() { + List _toList() { return [name, lensDirection, lensType]; } + Object encode() { + return _toList(); + } + static PlatformCameraDescription decode(Object result) { result as List; return PlatformCameraDescription( @@ -105,6 +127,23 @@ class PlatformCameraDescription { lensType: result[2]! as PlatformCameraLensType, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraDescription || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class PlatformCameraState { @@ -131,7 +170,7 @@ class PlatformCameraState { /// Whether setting focus points is supported. bool focusPointSupported; - Object encode() { + List _toList() { return [ previewSize, exposureMode, @@ -141,6 +180,10 @@ class PlatformCameraState { ]; } + Object encode() { + return _toList(); + } + static PlatformCameraState decode(Object result) { result as List; return PlatformCameraState( @@ -151,6 +194,22 @@ class PlatformCameraState { focusPointSupported: result[4]! as bool, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraState || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class PlatformMediaSettings { @@ -172,7 +231,7 @@ class PlatformMediaSettings { bool enableAudio; - Object encode() { + List _toList() { return [ resolutionPreset, framesPerSecond, @@ -182,6 +241,10 @@ class PlatformMediaSettings { ]; } + Object encode() { + return _toList(); + } + static PlatformMediaSettings decode(Object result) { result as List; return PlatformMediaSettings( @@ -192,6 +255,22 @@ class PlatformMediaSettings { enableAudio: result[4]! as bool, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMediaSettings || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class PlatformPoint { @@ -201,14 +280,34 @@ class PlatformPoint { double y; - Object encode() { + List _toList() { return [x, y]; } + Object encode() { + return _toList(); + } + static PlatformPoint decode(Object result) { result as List; return PlatformPoint(x: result[0]! as double, y: result[1]! as double); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPoint || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class PlatformSize { @@ -218,10 +317,14 @@ class PlatformSize { double height; - Object encode() { + List _toList() { return [width, height]; } + Object encode() { + return _toList(); + } + static PlatformSize decode(Object result) { result as List; return PlatformSize( @@ -229,6 +332,22 @@ class PlatformSize { height: result[1]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformSize || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -358,8 +477,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -389,9 +509,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraName, settings], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraName, settings]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -423,9 +545,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraId, imageFormat], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraId, imageFormat]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -449,8 +573,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -474,8 +599,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -502,8 +628,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -528,8 +655,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraId]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -555,8 +685,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [orientation], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([orientation]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -581,8 +714,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -607,8 +741,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -637,8 +772,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -663,8 +799,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [enableStream], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([enableStream]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -688,8 +827,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -718,8 +858,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -743,8 +884,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -768,8 +910,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [mode], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([mode]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -793,8 +938,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [mode], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([mode]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -820,8 +968,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [point], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([point]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -845,8 +996,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -875,8 +1027,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -905,8 +1058,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [offset], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([offset]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -930,8 +1086,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [mode], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([mode]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -957,8 +1116,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [point], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([point]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -982,8 +1144,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1012,8 +1175,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1042,8 +1206,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [zoom], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([zoom]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1067,8 +1234,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1092,8 +1260,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1119,8 +1288,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraName], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraName]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1144,8 +1316,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [format], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([format]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/camera/camera_avfoundation/pubspec.yaml b/packages/camera/camera_avfoundation/pubspec.yaml index b774fe37924..79c25b104c9 100644 --- a/packages/camera/camera_avfoundation/pubspec.yaml +++ b/packages/camera/camera_avfoundation/pubspec.yaml @@ -29,7 +29,7 @@ dev_dependencies: sdk: flutter leak_tracker_flutter_testing: any mockito: ^5.4.4 - pigeon: ^22.4.2 + pigeon: ^26.1.0 topics: - camera diff --git a/packages/camera/camera_windows/lib/src/messages.g.dart b/packages/camera/camera_windows/lib/src/messages.g.dart index c21a1386dd6..79407a5f97e 100644 --- a/packages/camera/camera_windows/lib/src/messages.g.dart +++ b/packages/camera/camera_windows/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.6.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -32,6 +32,24 @@ List wrapResponse({ return [error.code, error.message, error.details]; } +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); + } + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); + } + return a == b; +} + /// Pigeon version of platform interface's ResolutionPreset. enum PlatformResolutionPreset { low, medium, high, veryHigh, ultraHigh, max } @@ -55,7 +73,7 @@ class PlatformMediaSettings { bool enableAudio; - Object encode() { + List _toList() { return [ resolutionPreset, framesPerSecond, @@ -65,6 +83,10 @@ class PlatformMediaSettings { ]; } + Object encode() { + return _toList(); + } + static PlatformMediaSettings decode(Object result) { result as List; return PlatformMediaSettings( @@ -75,6 +97,22 @@ class PlatformMediaSettings { enableAudio: result[4]! as bool, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMediaSettings || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// A representation of a size from the native camera APIs. @@ -85,10 +123,14 @@ class PlatformSize { double height; - Object encode() { + List _toList() { return [width, height]; } + Object encode() { + return _toList(); + } + static PlatformSize decode(Object result) { result as List; return PlatformSize( @@ -96,6 +138,22 @@ class PlatformSize { height: result[1]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformSize || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -162,8 +220,9 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -192,9 +251,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraName, settings], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraName, settings]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -223,8 +284,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraId]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -253,8 +317,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraId]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -279,8 +346,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraId]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -309,8 +379,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraId]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -335,8 +408,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraId]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -365,8 +441,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraId]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -390,8 +469,11 @@ class CameraApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraId]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/camera/camera_windows/pubspec.yaml b/packages/camera/camera_windows/pubspec.yaml index 8698512c5e4..445db4fd3a1 100644 --- a/packages/camera/camera_windows/pubspec.yaml +++ b/packages/camera/camera_windows/pubspec.yaml @@ -30,7 +30,7 @@ dev_dependencies: sdk: flutter leak_tracker_flutter_testing: any mockito: ^5.4.4 - pigeon: ^22.6.0 + pigeon: ^26.1.0 topics: - camera diff --git a/packages/camera/camera_windows/windows/messages.g.cpp b/packages/camera/camera_windows/windows/messages.g.cpp index 42746e4e4f3..7133d7cd250 100644 --- a/packages/camera/camera_windows/windows/messages.g.cpp +++ b/packages/camera/camera_windows/windows/messages.g.cpp @@ -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 (v22.6.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #undef _HAS_EXCEPTIONS diff --git a/packages/camera/camera_windows/windows/messages.g.h b/packages/camera/camera_windows/windows/messages.g.h index 9bd303ca015..ebce11993b9 100644 --- a/packages/camera/camera_windows/windows/messages.g.h +++ b/packages/camera/camera_windows/windows/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 (v22.6.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #ifndef PIGEON_MESSAGES_G_H_ diff --git a/packages/file_selector/file_selector_android/android/src/main/java/dev/flutter/packages/file_selector_android/GeneratedFileSelectorApi.java b/packages/file_selector/file_selector_android/android/src/main/java/dev/flutter/packages/file_selector_android/GeneratedFileSelectorApi.java index 3fde65bea5a..9f85509fb45 100644 --- a/packages/file_selector/file_selector_android/android/src/main/java/dev/flutter/packages/file_selector_android/GeneratedFileSelectorApi.java +++ b/packages/file_selector/file_selector_android/android/src/main/java/dev/flutter/packages/file_selector_android/GeneratedFileSelectorApi.java @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.0.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon package dev.flutter.packages.file_selector_android; diff --git a/packages/file_selector/file_selector_android/lib/src/file_selector_api.g.dart b/packages/file_selector/file_selector_android/lib/src/file_selector_api.g.dart index 4c8640886c5..07663232cde 100644 --- a/packages/file_selector/file_selector_android/lib/src/file_selector_api.g.dart +++ b/packages/file_selector/file_selector_android/lib/src/file_selector_api.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.0.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers diff --git a/packages/file_selector/file_selector_android/pubspec.yaml b/packages/file_selector/file_selector_android/pubspec.yaml index 8a1a11f7980..2e947519292 100644 --- a/packages/file_selector/file_selector_android/pubspec.yaml +++ b/packages/file_selector/file_selector_android/pubspec.yaml @@ -28,7 +28,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^26.0.1 + pigeon: ^26.1.0 topics: - files diff --git a/packages/file_selector/file_selector_ios/ios/file_selector_ios/Sources/file_selector_ios/messages.g.swift b/packages/file_selector/file_selector_ios/ios/file_selector_ios/Sources/file_selector_ios/messages.g.swift index 36f897df2e8..bcb5609f502 100644 --- a/packages/file_selector/file_selector_ios/ios/file_selector_ios/Sources/file_selector_ios/messages.g.swift +++ b/packages/file_selector/file_selector_ios/ios/file_selector_ios/Sources/file_selector_ios/messages.g.swift @@ -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 (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation diff --git a/packages/file_selector/file_selector_ios/lib/src/messages.g.dart b/packages/file_selector/file_selector_ios/lib/src/messages.g.dart index 5ecb21446ba..6e3795225ca 100644 --- a/packages/file_selector/file_selector_ios/lib/src/messages.g.dart +++ b/packages/file_selector/file_selector_ios/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,20 +18,6 @@ PlatformException _createConnectionError(String channelName) { ); } -List wrapResponse({ - Object? result, - PlatformException? error, - bool empty = false, -}) { - if (empty) { - return []; - } - if (error == null) { - return [result]; - } - return [error.code, error.message, error.details]; -} - bool _deepEquals(Object? a, Object? b) { if (a is List && b is List) { return a.length == b.length && diff --git a/packages/file_selector/file_selector_ios/pubspec.yaml b/packages/file_selector/file_selector_ios/pubspec.yaml index 42a3c85ae78..f8ba07e7bc8 100644 --- a/packages/file_selector/file_selector_ios/pubspec.yaml +++ b/packages/file_selector/file_selector_ios/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pigeon: ^25.5.0 + pigeon: ^26.1.0 topics: - files diff --git a/packages/file_selector/file_selector_linux/lib/src/messages.g.dart b/packages/file_selector/file_selector_linux/lib/src/messages.g.dart index 552d0cdd023..0de39fbb36b 100644 --- a/packages/file_selector/file_selector_linux/lib/src/messages.g.dart +++ b/packages/file_selector/file_selector_linux/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.6.2), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,6 +18,24 @@ PlatformException _createConnectionError(String channelName) { ); } +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); + } + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); + } + return a == b; +} + /// A Pigeon representation of the GTK_FILE_CHOOSER_ACTION_* options. enum PlatformFileChooserActionType { open, chooseDirectory, save } @@ -35,10 +53,14 @@ class PlatformTypeGroup { List mimeTypes; - Object encode() { + List _toList() { return [label, extensions, mimeTypes]; } + Object encode() { + return _toList(); + } + static PlatformTypeGroup decode(Object result) { result as List; return PlatformTypeGroup( @@ -47,6 +69,22 @@ class PlatformTypeGroup { mimeTypes: (result[2] as List?)!.cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTypeGroup || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Options for GKT file chooser. @@ -74,7 +112,7 @@ class PlatformFileChooserOptions { /// Nullable because it does not apply to the "save" action. bool? selectMultiple; - Object encode() { + List _toList() { return [ allowedFileTypes, currentFolderPath, @@ -84,6 +122,10 @@ class PlatformFileChooserOptions { ]; } + Object encode() { + return _toList(); + } + static PlatformFileChooserOptions decode(Object result) { result as List; return PlatformFileChooserOptions( @@ -95,6 +137,23 @@ class PlatformFileChooserOptions { selectMultiple: result[4] as bool?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformFileChooserOptions || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -169,9 +228,11 @@ class FileSelectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [type, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([type, options]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/file_selector/file_selector_linux/linux/messages.g.cc b/packages/file_selector/file_selector_linux/linux/messages.g.cc index 596ca836482..158f23527aa 100644 --- a/packages/file_selector/file_selector_linux/linux/messages.g.cc +++ b/packages/file_selector/file_selector_linux/linux/messages.g.cc @@ -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 (v22.6.2), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #include "messages.g.h" @@ -238,10 +238,14 @@ struct _FfsMessageCodec { G_DEFINE_TYPE(FfsMessageCodec, ffs_message_codec, fl_standard_message_codec_get_type()) +const int ffs_platform_file_chooser_action_type_type_id = 129; +const int ffs_platform_type_group_type_id = 130; +const int ffs_platform_file_chooser_options_type_id = 131; + static gboolean ffs_message_codec_write_ffs_platform_file_chooser_action_type( FlStandardMessageCodec* codec, GByteArray* buffer, FlValue* value, GError** error) { - uint8_t type = 129; + uint8_t type = ffs_platform_file_chooser_action_type_type_id; g_byte_array_append(buffer, &type, sizeof(uint8_t)); return fl_standard_message_codec_write_value(codec, buffer, value, error); } @@ -249,7 +253,7 @@ static gboolean ffs_message_codec_write_ffs_platform_file_chooser_action_type( static gboolean ffs_message_codec_write_ffs_platform_type_group( FlStandardMessageCodec* codec, GByteArray* buffer, FfsPlatformTypeGroup* value, GError** error) { - uint8_t type = 130; + uint8_t type = ffs_platform_type_group_type_id; g_byte_array_append(buffer, &type, sizeof(uint8_t)); g_autoptr(FlValue) values = ffs_platform_type_group_to_list(value); return fl_standard_message_codec_write_value(codec, buffer, values, error); @@ -258,7 +262,7 @@ static gboolean ffs_message_codec_write_ffs_platform_type_group( static gboolean ffs_message_codec_write_ffs_platform_file_chooser_options( FlStandardMessageCodec* codec, GByteArray* buffer, FfsPlatformFileChooserOptions* value, GError** error) { - uint8_t type = 131; + uint8_t type = ffs_platform_file_chooser_options_type_id; g_byte_array_append(buffer, &type, sizeof(uint8_t)); g_autoptr(FlValue) values = ffs_platform_file_chooser_options_to_list(value); return fl_standard_message_codec_write_value(codec, buffer, values, error); @@ -269,18 +273,18 @@ static gboolean ffs_message_codec_write_value(FlStandardMessageCodec* codec, FlValue* value, GError** error) { if (fl_value_get_type(value) == FL_VALUE_TYPE_CUSTOM) { switch (fl_value_get_custom_type(value)) { - case 129: + case ffs_platform_file_chooser_action_type_type_id: return ffs_message_codec_write_ffs_platform_file_chooser_action_type( codec, buffer, reinterpret_cast( const_cast(fl_value_get_custom_value(value))), error); - case 130: + case ffs_platform_type_group_type_id: return ffs_message_codec_write_ffs_platform_type_group( codec, buffer, FFS_PLATFORM_TYPE_GROUP(fl_value_get_custom_value_object(value)), error); - case 131: + case ffs_platform_file_chooser_options_type_id: return ffs_message_codec_write_ffs_platform_file_chooser_options( codec, buffer, FFS_PLATFORM_FILE_CHOOSER_OPTIONS( @@ -297,7 +301,8 @@ static FlValue* ffs_message_codec_read_ffs_platform_file_chooser_action_type( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, GError** error) { return fl_value_new_custom( - 129, fl_standard_message_codec_read_value(codec, buffer, offset, error), + ffs_platform_file_chooser_action_type_type_id, + fl_standard_message_codec_read_value(codec, buffer, offset, error), (GDestroyNotify)fl_value_unref); } @@ -318,7 +323,8 @@ static FlValue* ffs_message_codec_read_ffs_platform_type_group( return nullptr; } - return fl_value_new_custom_object(130, G_OBJECT(value)); + return fl_value_new_custom_object(ffs_platform_type_group_type_id, + G_OBJECT(value)); } static FlValue* ffs_message_codec_read_ffs_platform_file_chooser_options( @@ -338,20 +344,21 @@ static FlValue* ffs_message_codec_read_ffs_platform_file_chooser_options( return nullptr; } - return fl_value_new_custom_object(131, G_OBJECT(value)); + return fl_value_new_custom_object(ffs_platform_file_chooser_options_type_id, + G_OBJECT(value)); } static FlValue* ffs_message_codec_read_value_of_type( FlStandardMessageCodec* codec, GBytes* buffer, size_t* offset, int type, GError** error) { switch (type) { - case 129: + case ffs_platform_file_chooser_action_type_type_id: return ffs_message_codec_read_ffs_platform_file_chooser_action_type( codec, buffer, offset, error); - case 130: + case ffs_platform_type_group_type_id: return ffs_message_codec_read_ffs_platform_type_group(codec, buffer, offset, error); - case 131: + case ffs_platform_file_chooser_options_type_id: return ffs_message_codec_read_ffs_platform_file_chooser_options( codec, buffer, offset, error); default: diff --git a/packages/file_selector/file_selector_linux/linux/messages.g.h b/packages/file_selector/file_selector_linux/linux/messages.g.h index d7cd4d8724f..8995bbc37f6 100644 --- a/packages/file_selector/file_selector_linux/linux/messages.g.h +++ b/packages/file_selector/file_selector_linux/linux/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 (v22.6.2), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #ifndef PIGEON_MESSAGES_G_H_ @@ -167,6 +167,17 @@ gboolean* ffs_platform_file_chooser_options_get_select_multiple( G_DECLARE_FINAL_TYPE(FfsMessageCodec, ffs_message_codec, FFS, MESSAGE_CODEC, FlStandardMessageCodec) +/** + * Custom type ID constants: + * + * Constants used to identify custom types in the codec. + * They are used in the codec to encode and decode custom types. + * They may be used in custom object creation functions to identify the type. + */ +extern const int ffs_platform_file_chooser_action_type_type_id; +extern const int ffs_platform_type_group_type_id; +extern const int ffs_platform_file_chooser_options_type_id; + G_DECLARE_FINAL_TYPE(FfsFileSelectorApi, ffs_file_selector_api, FFS, FILE_SELECTOR_API, GObject) diff --git a/packages/file_selector/file_selector_linux/pubspec.yaml b/packages/file_selector/file_selector_linux/pubspec.yaml index bd085f3a6a8..982ac4f1a4d 100644 --- a/packages/file_selector/file_selector_linux/pubspec.yaml +++ b/packages/file_selector/file_selector_linux/pubspec.yaml @@ -25,7 +25,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pigeon: ^22.6.2 + pigeon: ^26.1.0 topics: - files diff --git a/packages/file_selector/file_selector_macos/lib/src/messages.g.dart b/packages/file_selector/file_selector_macos/lib/src/messages.g.dart index d41b0cd24c0..4fac7a015ac 100644 --- a/packages/file_selector/file_selector_macos/lib/src/messages.g.dart +++ b/packages/file_selector/file_selector_macos/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,20 +18,6 @@ PlatformException _createConnectionError(String channelName) { ); } -List wrapResponse({ - Object? result, - PlatformException? error, - bool empty = false, -}) { - if (empty) { - return []; - } - if (error == null) { - return [result]; - } - return [error.code, error.message, error.details]; -} - bool _deepEquals(Object? a, Object? b) { if (a is List && b is List) { return a.length == b.length && diff --git a/packages/file_selector/file_selector_macos/macos/file_selector_macos/Sources/file_selector_macos/messages.g.swift b/packages/file_selector/file_selector_macos/macos/file_selector_macos/Sources/file_selector_macos/messages.g.swift index 068365ed0f9..aab841779fd 100644 --- a/packages/file_selector/file_selector_macos/macos/file_selector_macos/Sources/file_selector_macos/messages.g.swift +++ b/packages/file_selector/file_selector_macos/macos/file_selector_macos/Sources/file_selector_macos/messages.g.swift @@ -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 (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation diff --git a/packages/file_selector/file_selector_macos/pubspec.yaml b/packages/file_selector/file_selector_macos/pubspec.yaml index 02f0c7ed5e6..ab7e4aee06c 100644 --- a/packages/file_selector/file_selector_macos/pubspec.yaml +++ b/packages/file_selector/file_selector_macos/pubspec.yaml @@ -25,7 +25,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pigeon: ^25.5.0 + pigeon: ^26.1.0 topics: - files diff --git a/packages/file_selector/file_selector_windows/lib/src/messages.g.dart b/packages/file_selector/file_selector_windows/lib/src/messages.g.dart index 19b57b6b8a8..7e2ec3e4244 100644 --- a/packages/file_selector/file_selector_windows/lib/src/messages.g.dart +++ b/packages/file_selector/file_selector_windows/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.4.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,18 +18,22 @@ PlatformException _createConnectionError(String channelName) { ); } -List wrapResponse({ - Object? result, - PlatformException? error, - bool empty = false, -}) { - if (empty) { - return []; +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); } - if (error == null) { - return [result]; + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); } - return [error.code, error.message, error.details]; + return a == b; } class TypeGroup { @@ -39,10 +43,14 @@ class TypeGroup { List extensions; - Object encode() { + List _toList() { return [label, extensions]; } + Object encode() { + return _toList(); + } + static TypeGroup decode(Object result) { result as List; return TypeGroup( @@ -50,6 +58,22 @@ class TypeGroup { extensions: (result[1] as List?)!.cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! TypeGroup || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class SelectionOptions { @@ -65,10 +89,14 @@ class SelectionOptions { List allowedTypes; - Object encode() { + List _toList() { return [allowMultiple, selectFolders, allowedTypes]; } + Object encode() { + return _toList(); + } + static SelectionOptions decode(Object result) { result as List; return SelectionOptions( @@ -77,6 +105,22 @@ class SelectionOptions { allowedTypes: (result[2] as List?)!.cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SelectionOptions || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// The result from an open or save dialog. @@ -94,10 +138,14 @@ class FileDialogResult { /// Null if no type groups were provided, or the dialog was canceled. int? typeGroupIndex; - Object encode() { + List _toList() { return [paths, typeGroupIndex]; } + Object encode() { + return _toList(); + } + static FileDialogResult decode(Object result) { result as List; return FileDialogResult( @@ -105,6 +153,22 @@ class FileDialogResult { typeGroupIndex: result[1] as int?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! FileDialogResult || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -173,13 +237,11 @@ class FileSelectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [options, initialDirectory, confirmButtonText], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([ - options, - initialDirectory, - confirmButtonText, - ]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -212,14 +274,11 @@ class FileSelectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [options, initialDirectory, suggestedName, confirmButtonText], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([ - options, - initialDirectory, - suggestedName, - confirmButtonText, - ]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/file_selector/file_selector_windows/pubspec.yaml b/packages/file_selector/file_selector_windows/pubspec.yaml index 8891c3d1c8a..717376b04c7 100644 --- a/packages/file_selector/file_selector_windows/pubspec.yaml +++ b/packages/file_selector/file_selector_windows/pubspec.yaml @@ -25,7 +25,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pigeon: ^22.4.1 + pigeon: ^26.1.0 topics: - files diff --git a/packages/file_selector/file_selector_windows/windows/messages.g.cpp b/packages/file_selector/file_selector_windows/windows/messages.g.cpp index 5a5c9ba8cb1..69407fbf353 100644 --- a/packages/file_selector/file_selector_windows/windows/messages.g.cpp +++ b/packages/file_selector/file_selector_windows/windows/messages.g.cpp @@ -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 (v22.4.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #undef _HAS_EXCEPTIONS diff --git a/packages/file_selector/file_selector_windows/windows/messages.g.h b/packages/file_selector/file_selector_windows/windows/messages.g.h index 36c9b65dbc5..e023879c9be 100644 --- a/packages/file_selector/file_selector_windows/windows/messages.g.h +++ b/packages/file_selector/file_selector_windows/windows/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 (v22.4.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #ifndef PIGEON_MESSAGES_G_H_ diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java index a9d298b900b..8507c6de157 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/Messages.java @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon package io.flutter.plugins.googlemaps; diff --git a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart index 04d02cb3439..0b1342f448d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_android/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -32,6 +32,24 @@ List wrapResponse({ return [error.code, error.message, error.details]; } +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); + } + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); + } + return a == b; +} + /// Pigeon equivalent of MapType enum PlatformMapType { none, normal, satellite, terrain, hybrid } @@ -68,10 +86,14 @@ class PlatformCameraPosition { double zoom; - Object encode() { + List _toList() { return [bearing, target, tilt, zoom]; } + Object encode() { + return _toList(); + } + static PlatformCameraPosition decode(Object result) { result as List; return PlatformCameraPosition( @@ -81,6 +103,22 @@ class PlatformCameraPosition { zoom: result[3]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraPosition || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon representation of a CameraUpdate. @@ -95,14 +133,34 @@ class PlatformCameraUpdate { /// See https://github.com/flutter/flutter/issues/117819. Object cameraUpdate; - Object encode() { + List _toList() { return [cameraUpdate]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdate decode(Object result) { result as List; return PlatformCameraUpdate(cameraUpdate: result[0]!); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdate || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of NewCameraPosition @@ -111,16 +169,37 @@ class PlatformCameraUpdateNewCameraPosition { PlatformCameraPosition cameraPosition; - Object encode() { + List _toList() { return [cameraPosition]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdateNewCameraPosition decode(Object result) { result as List; return PlatformCameraUpdateNewCameraPosition( cameraPosition: result[0]! as PlatformCameraPosition, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewCameraPosition || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of NewLatLng @@ -129,14 +208,35 @@ class PlatformCameraUpdateNewLatLng { PlatformLatLng latLng; - Object encode() { + List _toList() { return [latLng]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdateNewLatLng decode(Object result) { result as List; return PlatformCameraUpdateNewLatLng(latLng: result[0]! as PlatformLatLng); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLng || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of NewLatLngBounds @@ -150,10 +250,14 @@ class PlatformCameraUpdateNewLatLngBounds { double padding; - Object encode() { + List _toList() { return [bounds, padding]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdateNewLatLngBounds decode(Object result) { result as List; return PlatformCameraUpdateNewLatLngBounds( @@ -161,6 +265,23 @@ class PlatformCameraUpdateNewLatLngBounds { padding: result[1]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLngBounds || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of NewLatLngZoom @@ -171,10 +292,14 @@ class PlatformCameraUpdateNewLatLngZoom { double zoom; - Object encode() { + List _toList() { return [latLng, zoom]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdateNewLatLngZoom decode(Object result) { result as List; return PlatformCameraUpdateNewLatLngZoom( @@ -182,6 +307,23 @@ class PlatformCameraUpdateNewLatLngZoom { zoom: result[1]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLngZoom || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of ScrollBy @@ -192,10 +334,14 @@ class PlatformCameraUpdateScrollBy { double dy; - Object encode() { + List _toList() { return [dx, dy]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdateScrollBy decode(Object result) { result as List; return PlatformCameraUpdateScrollBy( @@ -203,6 +349,23 @@ class PlatformCameraUpdateScrollBy { dy: result[1]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateScrollBy || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of ZoomBy @@ -213,10 +376,14 @@ class PlatformCameraUpdateZoomBy { PlatformDoublePair? focus; - Object encode() { + List _toList() { return [amount, focus]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdateZoomBy decode(Object result) { result as List; return PlatformCameraUpdateZoomBy( @@ -224,6 +391,23 @@ class PlatformCameraUpdateZoomBy { focus: result[1] as PlatformDoublePair?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoomBy || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of ZoomIn/ZoomOut @@ -232,14 +416,35 @@ class PlatformCameraUpdateZoom { bool out; - Object encode() { + List _toList() { return [out]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdateZoom decode(Object result) { result as List; return PlatformCameraUpdateZoom(out: result[0]! as bool); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoom || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of ZoomTo @@ -248,14 +453,35 @@ class PlatformCameraUpdateZoomTo { double zoom; - Object encode() { + List _toList() { return [zoom]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdateZoomTo decode(Object result) { result as List; return PlatformCameraUpdateZoomTo(zoom: result[0]! as double); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoomTo || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Circle class. @@ -290,7 +516,7 @@ class PlatformCircle { String circleId; - Object encode() { + List _toList() { return [ consumeTapEvents, fillColor, @@ -304,6 +530,10 @@ class PlatformCircle { ]; } + Object encode() { + return _toList(); + } + static PlatformCircle decode(Object result) { result as List; return PlatformCircle( @@ -318,6 +548,22 @@ class PlatformCircle { circleId: result[8]! as String, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCircle || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Heatmap class. @@ -329,16 +575,36 @@ class PlatformHeatmap { /// internal implementation details of that method. Map json; - Object encode() { + List _toList() { return [json]; } + Object encode() { + return _toList(); + } + static PlatformHeatmap decode(Object result) { result as List; return PlatformHeatmap( json: (result[0] as Map?)!.cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformHeatmap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the ClusterManager class. @@ -347,14 +613,34 @@ class PlatformClusterManager { String identifier; - Object encode() { + List _toList() { return [identifier]; } + Object encode() { + return _toList(); + } + static PlatformClusterManager decode(Object result) { result as List; return PlatformClusterManager(identifier: result[0]! as String); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformClusterManager || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pair of double values, such as for an offset or size. @@ -365,14 +651,34 @@ class PlatformDoublePair { double y; - Object encode() { + List _toList() { return [x, y]; } + Object encode() { + return _toList(); + } + static PlatformDoublePair decode(Object result) { result as List; return PlatformDoublePair(x: result[0]! as double, y: result[1]! as double); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformDoublePair || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the InfoWindow class. @@ -385,10 +691,14 @@ class PlatformInfoWindow { PlatformDoublePair anchor; - Object encode() { + List _toList() { return [title, snippet, anchor]; } + Object encode() { + return _toList(); + } + static PlatformInfoWindow decode(Object result) { result as List; return PlatformInfoWindow( @@ -397,6 +707,22 @@ class PlatformInfoWindow { anchor: result[2]! as PlatformDoublePair, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformInfoWindow || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Marker class. @@ -443,7 +769,7 @@ class PlatformMarker { String? clusterManagerId; - Object encode() { + List _toList() { return [ alpha, anchor, @@ -461,6 +787,10 @@ class PlatformMarker { ]; } + Object encode() { + return _toList(); + } + static PlatformMarker decode(Object result) { result as List; return PlatformMarker( @@ -479,6 +809,22 @@ class PlatformMarker { clusterManagerId: result[12] as String?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMarker || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Polygon class. @@ -516,7 +862,7 @@ class PlatformPolygon { int zIndex; - Object encode() { + List _toList() { return [ polygonId, consumesTapEvents, @@ -531,6 +877,10 @@ class PlatformPolygon { ]; } + Object encode() { + return _toList(); + } + static PlatformPolygon decode(Object result) { result as List; return PlatformPolygon( @@ -546,6 +896,22 @@ class PlatformPolygon { zIndex: result[9]! as int, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPolygon || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Polyline class. @@ -593,7 +959,7 @@ class PlatformPolyline { int zIndex; - Object encode() { + List _toList() { return [ polylineId, consumesTapEvents, @@ -610,6 +976,10 @@ class PlatformPolyline { ]; } + Object encode() { + return _toList(); + } + static PlatformPolyline decode(Object result) { result as List; return PlatformPolyline( @@ -627,6 +997,22 @@ class PlatformPolyline { zIndex: result[11]! as int, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPolyline || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of Cap from the platform interface. @@ -640,10 +1026,14 @@ class PlatformCap { double? refWidth; - Object encode() { + List _toList() { return [type, bitmapDescriptor, refWidth]; } + Object encode() { + return _toList(); + } + static PlatformCap decode(Object result) { result as List; return PlatformCap( @@ -652,6 +1042,22 @@ class PlatformCap { refWidth: result[2] as double?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the PatternItem class. @@ -662,10 +1068,14 @@ class PlatformPatternItem { double? length; - Object encode() { + List _toList() { return [type, length]; } + Object encode() { + return _toList(); + } + static PlatformPatternItem decode(Object result) { result as List; return PlatformPatternItem( @@ -673,6 +1083,22 @@ class PlatformPatternItem { length: result[1] as double?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPatternItem || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Tile class. @@ -685,10 +1111,14 @@ class PlatformTile { Uint8List? data; - Object encode() { + List _toList() { return [width, height, data]; } + Object encode() { + return _toList(); + } + static PlatformTile decode(Object result) { result as List; return PlatformTile( @@ -697,6 +1127,22 @@ class PlatformTile { data: result[2] as Uint8List?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTile || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the TileOverlay class. @@ -722,7 +1168,7 @@ class PlatformTileOverlay { int tileSize; - Object encode() { + List _toList() { return [ tileOverlayId, fadeIn, @@ -733,6 +1179,10 @@ class PlatformTileOverlay { ]; } + Object encode() { + return _toList(); + } + static PlatformTileOverlay decode(Object result) { result as List; return PlatformTileOverlay( @@ -744,6 +1194,22 @@ class PlatformTileOverlay { tileSize: result[5]! as int, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTileOverlay || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of Flutter's EdgeInsets. @@ -763,10 +1229,14 @@ class PlatformEdgeInsets { double right; - Object encode() { + List _toList() { return [top, bottom, left, right]; } + Object encode() { + return _toList(); + } + static PlatformEdgeInsets decode(Object result) { result as List; return PlatformEdgeInsets( @@ -776,6 +1246,22 @@ class PlatformEdgeInsets { right: result[3]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformEdgeInsets || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of LatLng. @@ -786,10 +1272,14 @@ class PlatformLatLng { double longitude; - Object encode() { + List _toList() { return [latitude, longitude]; } + Object encode() { + return _toList(); + } + static PlatformLatLng decode(Object result) { result as List; return PlatformLatLng( @@ -797,6 +1287,22 @@ class PlatformLatLng { longitude: result[1]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformLatLng || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of LatLngBounds. @@ -807,10 +1313,14 @@ class PlatformLatLngBounds { PlatformLatLng southwest; - Object encode() { + List _toList() { return [northeast, southwest]; } + Object encode() { + return _toList(); + } + static PlatformLatLngBounds decode(Object result) { result as List; return PlatformLatLngBounds( @@ -818,6 +1328,22 @@ class PlatformLatLngBounds { southwest: result[1]! as PlatformLatLng, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformLatLngBounds || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of Cluster. @@ -837,10 +1363,14 @@ class PlatformCluster { List markerIds; - Object encode() { + List _toList() { return [clusterManagerId, position, bounds, markerIds]; } + Object encode() { + return _toList(); + } + static PlatformCluster decode(Object result) { result as List; return PlatformCluster( @@ -850,6 +1380,22 @@ class PlatformCluster { markerIds: (result[3] as List?)!.cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCluster || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the GroundOverlay class. @@ -893,7 +1439,7 @@ class PlatformGroundOverlay { bool clickable; - Object encode() { + List _toList() { return [ groundOverlayId, image, @@ -910,6 +1456,10 @@ class PlatformGroundOverlay { ]; } + Object encode() { + return _toList(); + } + static PlatformGroundOverlay decode(Object result) { result as List; return PlatformGroundOverlay( @@ -927,6 +1477,22 @@ class PlatformGroundOverlay { clickable: result[11]! as bool, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformGroundOverlay || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of CameraTargetBounds. @@ -938,16 +1504,37 @@ class PlatformCameraTargetBounds { PlatformLatLngBounds? bounds; - Object encode() { + List _toList() { return [bounds]; } + Object encode() { + return _toList(); + } + static PlatformCameraTargetBounds decode(Object result) { result as List; return PlatformCameraTargetBounds( bounds: result[0] as PlatformLatLngBounds?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraTargetBounds || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Information passed to the platform view creation. @@ -985,7 +1572,7 @@ class PlatformMapViewCreationParams { List initialGroundOverlays; - Object encode() { + List _toList() { return [ initialCameraPosition, mapConfiguration, @@ -1000,6 +1587,10 @@ class PlatformMapViewCreationParams { ]; } + Object encode() { + return _toList(); + } + static PlatformMapViewCreationParams decode(Object result) { result as List; return PlatformMapViewCreationParams( @@ -1018,6 +1609,23 @@ class PlatformMapViewCreationParams { .cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMapViewCreationParams || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of MapConfiguration. @@ -1085,7 +1693,7 @@ class PlatformMapConfiguration { String? style; - Object encode() { + List _toList() { return [ compassEnabled, cameraTargetBounds, @@ -1110,6 +1718,10 @@ class PlatformMapConfiguration { ]; } + Object encode() { + return _toList(); + } + static PlatformMapConfiguration decode(Object result) { result as List; return PlatformMapConfiguration( @@ -1135,6 +1747,23 @@ class PlatformMapConfiguration { style: result[19] as String?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMapConfiguration || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon representation of an x,y coordinate. @@ -1145,14 +1774,34 @@ class PlatformPoint { int y; - Object encode() { + List _toList() { return [x, y]; } + Object encode() { + return _toList(); + } + static PlatformPoint decode(Object result) { result as List; return PlatformPoint(x: result[0]! as int, y: result[1]! as int); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPoint || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of native TileOverlay properties. @@ -1172,10 +1821,14 @@ class PlatformTileLayer { double zIndex; - Object encode() { + List _toList() { return [visible, fadeIn, transparency, zIndex]; } + Object encode() { + return _toList(); + } + static PlatformTileLayer decode(Object result) { result as List; return PlatformTileLayer( @@ -1185,6 +1838,22 @@ class PlatformTileLayer { zIndex: result[3]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTileLayer || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Possible outcomes of launching a URL. @@ -1195,10 +1864,14 @@ class PlatformZoomRange { double? max; - Object encode() { + List _toList() { return [min, max]; } + Object encode() { + return _toList(); + } + static PlatformZoomRange decode(Object result) { result as List; return PlatformZoomRange( @@ -1206,6 +1879,22 @@ class PlatformZoomRange { max: result[1] as double?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformZoomRange || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint @@ -1223,14 +1912,34 @@ class PlatformBitmap { /// https://github.com/flutter/flutter/issues/117819. Object bitmap; - Object encode() { + List _toList() { return [bitmap]; } + Object encode() { + return _toList(); + } + static PlatformBitmap decode(Object result) { result as List; return PlatformBitmap(bitmap: result[0]!); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [DefaultMarker]. See @@ -1240,14 +1949,35 @@ class PlatformBitmapDefaultMarker { double? hue; - Object encode() { + List _toList() { return [hue]; } + Object encode() { + return _toList(); + } + static PlatformBitmapDefaultMarker decode(Object result) { result as List; return PlatformBitmapDefaultMarker(hue: result[0] as double?); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapDefaultMarker || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [BytesBitmap]. See @@ -1259,10 +1989,14 @@ class PlatformBitmapBytes { PlatformDoublePair? size; - Object encode() { + List _toList() { return [byteData, size]; } + Object encode() { + return _toList(); + } + static PlatformBitmapBytes decode(Object result) { result as List; return PlatformBitmapBytes( @@ -1270,6 +2004,22 @@ class PlatformBitmapBytes { size: result[1] as PlatformDoublePair?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapBytes || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [AssetBitmap]. See @@ -1281,10 +2031,14 @@ class PlatformBitmapAsset { String? pkg; - Object encode() { + List _toList() { return [name, pkg]; } + Object encode() { + return _toList(); + } + static PlatformBitmapAsset decode(Object result) { result as List; return PlatformBitmapAsset( @@ -1292,6 +2046,22 @@ class PlatformBitmapAsset { pkg: result[1] as String?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAsset || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [AssetImageBitmap]. See @@ -1309,10 +2079,14 @@ class PlatformBitmapAssetImage { PlatformDoublePair? size; - Object encode() { + List _toList() { return [name, scale, size]; } + Object encode() { + return _toList(); + } + static PlatformBitmapAssetImage decode(Object result) { result as List; return PlatformBitmapAssetImage( @@ -1321,6 +2095,23 @@ class PlatformBitmapAssetImage { size: result[2] as PlatformDoublePair?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAssetImage || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [AssetMapBitmap]. See @@ -1344,10 +2135,14 @@ class PlatformBitmapAssetMap { double? height; - Object encode() { + List _toList() { return [assetName, bitmapScaling, imagePixelRatio, width, height]; } + Object encode() { + return _toList(); + } + static PlatformBitmapAssetMap decode(Object result) { result as List; return PlatformBitmapAssetMap( @@ -1358,6 +2153,22 @@ class PlatformBitmapAssetMap { height: result[4] as double?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAssetMap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [BytesMapBitmap]. See @@ -1381,10 +2192,14 @@ class PlatformBitmapBytesMap { double? height; - Object encode() { + List _toList() { return [byteData, bitmapScaling, imagePixelRatio, width, height]; } + Object encode() { + return _toList(); + } + static PlatformBitmapBytesMap decode(Object result) { result as List; return PlatformBitmapBytesMap( @@ -1395,6 +2210,22 @@ class PlatformBitmapBytesMap { height: result[4] as double?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapBytesMap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -1682,8 +2513,9 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1712,9 +2544,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [configuration], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([configuration]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1742,9 +2576,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1772,9 +2608,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1801,9 +2639,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, idsToRemove], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, idsToRemove]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1831,9 +2671,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1861,9 +2703,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1891,9 +2735,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1921,9 +2767,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1951,9 +2799,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1977,8 +2827,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [latLng], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([latLng]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2007,9 +2860,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [screenCoordinate], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([screenCoordinate]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2038,8 +2893,9 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2069,8 +2925,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraUpdate], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraUpdate]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2098,12 +2957,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraUpdate, durationMilliseconds], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([ - cameraUpdate, - durationMilliseconds, - ]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2127,8 +2985,9 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2157,8 +3016,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [markerId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([markerId]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2182,8 +3044,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [markerId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([markerId]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2208,8 +3073,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [markerId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([markerId]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2242,8 +3110,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [style], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([style]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2276,8 +3147,9 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2306,9 +3178,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [tileOverlayId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([tileOverlayId]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2332,8 +3206,9 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3008,8 +3883,11 @@ class MapsInitializerApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [type], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([type]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3039,8 +3917,9 @@ class MapsInitializerApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3084,8 +3963,11 @@ class MapsPlatformViewApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [type], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([type]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3127,8 +4009,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3156,8 +4039,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3185,8 +4069,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3214,8 +4099,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3243,8 +4129,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3272,8 +4159,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3301,8 +4189,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3330,8 +4219,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3354,8 +4244,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3383,8 +4274,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3412,8 +4304,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3441,9 +4334,11 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [tileOverlayId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([tileOverlayId]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3468,9 +4363,11 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [groundOverlayId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([groundOverlayId]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3493,8 +4390,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3522,9 +4420,11 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [clusterManagerId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([clusterManagerId]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3553,8 +4453,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml index 982c86fb901..d7c08639f2a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml @@ -30,7 +30,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^22.6.0 + pigeon: ^26.1.0 plugin_platform_interface: ^2.1.7 topics: diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h index 2142d0a916e..a814fb02f24 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.h @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.6.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #import diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m index 0ca966f2abf..dc44ed382b5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m +++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/Classes/messages.g.m @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.6.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "messages.g.h" 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 4e366683f86..09197a6bf21 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart +++ b/packages/google_maps_flutter/google_maps_flutter_ios/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.6.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -32,6 +32,24 @@ List wrapResponse({ return [error.code, error.message, error.details]; } +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); + } + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); + } + return a == b; +} + /// Pigeon equivalent of MapType enum PlatformMapType { none, normal, satellite, terrain, hybrid } @@ -61,10 +79,14 @@ class PlatformCameraPosition { double zoom; - Object encode() { + List _toList() { return [bearing, target, tilt, zoom]; } + Object encode() { + return _toList(); + } + static PlatformCameraPosition decode(Object result) { result as List; return PlatformCameraPosition( @@ -74,6 +96,22 @@ class PlatformCameraPosition { zoom: result[3]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraPosition || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon representation of a CameraUpdate. @@ -86,14 +124,34 @@ class PlatformCameraUpdate { /// use of a single unified class. Object cameraUpdate; - Object encode() { + List _toList() { return [cameraUpdate]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdate decode(Object result) { result as List; return PlatformCameraUpdate(cameraUpdate: result[0]!); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdate || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of NewCameraPosition @@ -102,16 +160,37 @@ class PlatformCameraUpdateNewCameraPosition { PlatformCameraPosition cameraPosition; - Object encode() { + List _toList() { return [cameraPosition]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdateNewCameraPosition decode(Object result) { result as List; return PlatformCameraUpdateNewCameraPosition( cameraPosition: result[0]! as PlatformCameraPosition, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewCameraPosition || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of NewLatLng @@ -120,14 +199,35 @@ class PlatformCameraUpdateNewLatLng { PlatformLatLng latLng; - Object encode() { + List _toList() { return [latLng]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdateNewLatLng decode(Object result) { result as List; return PlatformCameraUpdateNewLatLng(latLng: result[0]! as PlatformLatLng); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLng || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of NewLatLngBounds @@ -141,10 +241,14 @@ class PlatformCameraUpdateNewLatLngBounds { double padding; - Object encode() { + List _toList() { return [bounds, padding]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdateNewLatLngBounds decode(Object result) { result as List; return PlatformCameraUpdateNewLatLngBounds( @@ -152,6 +256,23 @@ class PlatformCameraUpdateNewLatLngBounds { padding: result[1]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLngBounds || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of NewLatLngZoom @@ -162,10 +283,14 @@ class PlatformCameraUpdateNewLatLngZoom { double zoom; - Object encode() { + List _toList() { return [latLng, zoom]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdateNewLatLngZoom decode(Object result) { result as List; return PlatformCameraUpdateNewLatLngZoom( @@ -173,6 +298,23 @@ class PlatformCameraUpdateNewLatLngZoom { zoom: result[1]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateNewLatLngZoom || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of ScrollBy @@ -183,10 +325,14 @@ class PlatformCameraUpdateScrollBy { double dy; - Object encode() { + List _toList() { return [dx, dy]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdateScrollBy decode(Object result) { result as List; return PlatformCameraUpdateScrollBy( @@ -194,6 +340,23 @@ class PlatformCameraUpdateScrollBy { dy: result[1]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateScrollBy || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of ZoomBy @@ -204,10 +367,14 @@ class PlatformCameraUpdateZoomBy { PlatformPoint? focus; - Object encode() { + List _toList() { return [amount, focus]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdateZoomBy decode(Object result) { result as List; return PlatformCameraUpdateZoomBy( @@ -215,6 +382,23 @@ class PlatformCameraUpdateZoomBy { focus: result[1] as PlatformPoint?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoomBy || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of ZoomIn/ZoomOut @@ -223,14 +407,35 @@ class PlatformCameraUpdateZoom { bool out; - Object encode() { + List _toList() { return [out]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdateZoom decode(Object result) { result as List; return PlatformCameraUpdateZoom(out: result[0]! as bool); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoom || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of ZoomTo @@ -239,14 +444,35 @@ class PlatformCameraUpdateZoomTo { double zoom; - Object encode() { + List _toList() { return [zoom]; } + Object encode() { + return _toList(); + } + static PlatformCameraUpdateZoomTo decode(Object result) { result as List; return PlatformCameraUpdateZoomTo(zoom: result[0]! as double); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraUpdateZoomTo || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Circle class. @@ -281,7 +507,7 @@ class PlatformCircle { String circleId; - Object encode() { + List _toList() { return [ consumeTapEvents, fillColor, @@ -295,6 +521,10 @@ class PlatformCircle { ]; } + Object encode() { + return _toList(); + } + static PlatformCircle decode(Object result) { result as List; return PlatformCircle( @@ -309,6 +539,22 @@ class PlatformCircle { circleId: result[8]! as String, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCircle || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Heatmap class. @@ -320,14 +566,34 @@ class PlatformHeatmap { /// internal implementation details of that method. Object json; - Object encode() { + List _toList() { return [json]; } + Object encode() { + return _toList(); + } + static PlatformHeatmap decode(Object result) { result as List; return PlatformHeatmap(json: result[0]!); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformHeatmap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the InfoWindow class. @@ -340,10 +606,14 @@ class PlatformInfoWindow { PlatformPoint anchor; - Object encode() { + List _toList() { return [title, snippet, anchor]; } + Object encode() { + return _toList(); + } + static PlatformInfoWindow decode(Object result) { result as List; return PlatformInfoWindow( @@ -352,6 +622,22 @@ class PlatformInfoWindow { anchor: result[2]! as PlatformPoint, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformInfoWindow || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of Cluster. @@ -371,10 +657,14 @@ class PlatformCluster { List markerIds; - Object encode() { + List _toList() { return [clusterManagerId, position, bounds, markerIds]; } + Object encode() { + return _toList(); + } + static PlatformCluster decode(Object result) { result as List; return PlatformCluster( @@ -384,6 +674,22 @@ class PlatformCluster { markerIds: (result[3] as List?)!.cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCluster || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the ClusterManager class. @@ -392,14 +698,34 @@ class PlatformClusterManager { String identifier; - Object encode() { + List _toList() { return [identifier]; } + Object encode() { + return _toList(); + } + static PlatformClusterManager decode(Object result) { result as List; return PlatformClusterManager(identifier: result[0]! as String); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformClusterManager || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Marker class. @@ -446,7 +772,7 @@ class PlatformMarker { String? clusterManagerId; - Object encode() { + List _toList() { return [ alpha, anchor, @@ -464,6 +790,10 @@ class PlatformMarker { ]; } + Object encode() { + return _toList(); + } + static PlatformMarker decode(Object result) { result as List; return PlatformMarker( @@ -482,6 +812,22 @@ class PlatformMarker { clusterManagerId: result[12] as String?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMarker || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Polygon class. @@ -519,7 +865,7 @@ class PlatformPolygon { int zIndex; - Object encode() { + List _toList() { return [ polygonId, consumesTapEvents, @@ -534,6 +880,10 @@ class PlatformPolygon { ]; } + Object encode() { + return _toList(); + } + static PlatformPolygon decode(Object result) { result as List; return PlatformPolygon( @@ -549,6 +899,22 @@ class PlatformPolygon { zIndex: result[9]! as int, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPolygon || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Polyline class. @@ -588,7 +954,7 @@ class PlatformPolyline { int zIndex; - Object encode() { + List _toList() { return [ polylineId, consumesTapEvents, @@ -603,6 +969,10 @@ class PlatformPolyline { ]; } + Object encode() { + return _toList(); + } + static PlatformPolyline decode(Object result) { result as List; return PlatformPolyline( @@ -618,6 +988,22 @@ class PlatformPolyline { zIndex: result[9]! as int, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPolyline || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the PatternItem class. @@ -628,10 +1014,14 @@ class PlatformPatternItem { double? length; - Object encode() { + List _toList() { return [type, length]; } + Object encode() { + return _toList(); + } + static PlatformPatternItem decode(Object result) { result as List; return PlatformPatternItem( @@ -639,6 +1029,22 @@ class PlatformPatternItem { length: result[1] as double?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPatternItem || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the Tile class. @@ -651,10 +1057,14 @@ class PlatformTile { Uint8List? data; - Object encode() { + List _toList() { return [width, height, data]; } + Object encode() { + return _toList(); + } + static PlatformTile decode(Object result) { result as List; return PlatformTile( @@ -663,6 +1073,22 @@ class PlatformTile { data: result[2] as Uint8List?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTile || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the TileOverlay class. @@ -688,7 +1114,7 @@ class PlatformTileOverlay { int tileSize; - Object encode() { + List _toList() { return [ tileOverlayId, fadeIn, @@ -699,6 +1125,10 @@ class PlatformTileOverlay { ]; } + Object encode() { + return _toList(); + } + static PlatformTileOverlay decode(Object result) { result as List; return PlatformTileOverlay( @@ -710,6 +1140,22 @@ class PlatformTileOverlay { tileSize: result[5]! as int, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTileOverlay || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of Flutter's EdgeInsets. @@ -729,10 +1175,14 @@ class PlatformEdgeInsets { double right; - Object encode() { + List _toList() { return [top, bottom, left, right]; } + Object encode() { + return _toList(); + } + static PlatformEdgeInsets decode(Object result) { result as List; return PlatformEdgeInsets( @@ -742,6 +1192,22 @@ class PlatformEdgeInsets { right: result[3]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformEdgeInsets || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of LatLng. @@ -752,10 +1218,14 @@ class PlatformLatLng { double longitude; - Object encode() { + List _toList() { return [latitude, longitude]; } + Object encode() { + return _toList(); + } + static PlatformLatLng decode(Object result) { result as List; return PlatformLatLng( @@ -763,6 +1233,22 @@ class PlatformLatLng { longitude: result[1]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformLatLng || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of LatLngBounds. @@ -773,10 +1259,14 @@ class PlatformLatLngBounds { PlatformLatLng southwest; - Object encode() { + List _toList() { return [northeast, southwest]; } + Object encode() { + return _toList(); + } + static PlatformLatLngBounds decode(Object result) { result as List; return PlatformLatLngBounds( @@ -784,6 +1274,22 @@ class PlatformLatLngBounds { southwest: result[1]! as PlatformLatLng, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformLatLngBounds || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of CameraTargetBounds. @@ -795,16 +1301,37 @@ class PlatformCameraTargetBounds { PlatformLatLngBounds? bounds; - Object encode() { + List _toList() { return [bounds]; } + Object encode() { + return _toList(); + } + static PlatformCameraTargetBounds decode(Object result) { result as List; return PlatformCameraTargetBounds( bounds: result[0] as PlatformLatLngBounds?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformCameraTargetBounds || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of the GroundOverlay class. @@ -845,7 +1372,7 @@ class PlatformGroundOverlay { double? zoomLevel; - Object encode() { + List _toList() { return [ groundOverlayId, image, @@ -861,6 +1388,10 @@ class PlatformGroundOverlay { ]; } + Object encode() { + return _toList(); + } + static PlatformGroundOverlay decode(Object result) { result as List; return PlatformGroundOverlay( @@ -877,6 +1408,22 @@ class PlatformGroundOverlay { zoomLevel: result[10] as double?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformGroundOverlay || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Information passed to the platform view creation. @@ -914,7 +1461,7 @@ class PlatformMapViewCreationParams { List initialGroundOverlays; - Object encode() { + List _toList() { return [ initialCameraPosition, mapConfiguration, @@ -929,6 +1476,10 @@ class PlatformMapViewCreationParams { ]; } + Object encode() { + return _toList(); + } + static PlatformMapViewCreationParams decode(Object result) { result as List; return PlatformMapViewCreationParams( @@ -947,6 +1498,23 @@ class PlatformMapViewCreationParams { .cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMapViewCreationParams || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of MapConfiguration. @@ -1005,7 +1573,7 @@ class PlatformMapConfiguration { String? style; - Object encode() { + List _toList() { return [ compassEnabled, cameraTargetBounds, @@ -1027,6 +1595,10 @@ class PlatformMapConfiguration { ]; } + Object encode() { + return _toList(); + } + static PlatformMapConfiguration decode(Object result) { result as List; return PlatformMapConfiguration( @@ -1049,6 +1621,23 @@ class PlatformMapConfiguration { style: result[16] as String?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformMapConfiguration || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon representation of an x,y coordinate. @@ -1059,14 +1648,34 @@ class PlatformPoint { double y; - Object encode() { + List _toList() { return [x, y]; } + Object encode() { + return _toList(); + } + static PlatformPoint decode(Object result) { result as List; return PlatformPoint(x: result[0]! as double, y: result[1]! as double); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPoint || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon representation of a size. @@ -1077,10 +1686,14 @@ class PlatformSize { double height; - Object encode() { + List _toList() { return [width, height]; } + Object encode() { + return _toList(); + } + static PlatformSize decode(Object result) { result as List; return PlatformSize( @@ -1088,6 +1701,22 @@ class PlatformSize { height: result[1]! as double, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformSize || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of GMSTileLayer properties. @@ -1107,10 +1736,14 @@ class PlatformTileLayer { int zIndex; - Object encode() { + List _toList() { return [visible, fadeIn, opacity, zIndex]; } + Object encode() { + return _toList(); + } + static PlatformTileLayer decode(Object result) { result as List; return PlatformTileLayer( @@ -1120,6 +1753,22 @@ class PlatformTileLayer { zIndex: result[3]! as int, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformTileLayer || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of MinMaxZoomPreference. @@ -1130,10 +1779,14 @@ class PlatformZoomRange { double? max; - Object encode() { + List _toList() { return [min, max]; } + Object encode() { + return _toList(); + } + static PlatformZoomRange decode(Object result) { result as List; return PlatformZoomRange( @@ -1141,6 +1794,22 @@ class PlatformZoomRange { max: result[1] as double?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformZoomRange || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint @@ -1158,14 +1827,34 @@ class PlatformBitmap { /// https://github.com/flutter/flutter/issues/117819. Object bitmap; - Object encode() { + List _toList() { return [bitmap]; } + Object encode() { + return _toList(); + } + static PlatformBitmap decode(Object result) { result as List; return PlatformBitmap(bitmap: result[0]!); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [DefaultMarker]. @@ -1174,14 +1863,35 @@ class PlatformBitmapDefaultMarker { double? hue; - Object encode() { + List _toList() { return [hue]; } + Object encode() { + return _toList(); + } + static PlatformBitmapDefaultMarker decode(Object result) { result as List; return PlatformBitmapDefaultMarker(hue: result[0] as double?); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapDefaultMarker || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [BytesBitmap]. @@ -1192,10 +1902,14 @@ class PlatformBitmapBytes { PlatformSize? size; - Object encode() { + List _toList() { return [byteData, size]; } + Object encode() { + return _toList(); + } + static PlatformBitmapBytes decode(Object result) { result as List; return PlatformBitmapBytes( @@ -1203,6 +1917,22 @@ class PlatformBitmapBytes { size: result[1] as PlatformSize?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapBytes || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [AssetBitmap]. @@ -1213,10 +1943,14 @@ class PlatformBitmapAsset { String? pkg; - Object encode() { + List _toList() { return [name, pkg]; } + Object encode() { + return _toList(); + } + static PlatformBitmapAsset decode(Object result) { result as List; return PlatformBitmapAsset( @@ -1224,6 +1958,22 @@ class PlatformBitmapAsset { pkg: result[1] as String?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAsset || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [AssetImageBitmap]. @@ -1240,10 +1990,14 @@ class PlatformBitmapAssetImage { PlatformSize? size; - Object encode() { + List _toList() { return [name, scale, size]; } + Object encode() { + return _toList(); + } + static PlatformBitmapAssetImage decode(Object result) { result as List; return PlatformBitmapAssetImage( @@ -1252,6 +2006,23 @@ class PlatformBitmapAssetImage { size: result[2] as PlatformSize?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAssetImage || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [AssetMapBitmap]. @@ -1274,10 +2045,14 @@ class PlatformBitmapAssetMap { double? height; - Object encode() { + List _toList() { return [assetName, bitmapScaling, imagePixelRatio, width, height]; } + Object encode() { + return _toList(); + } + static PlatformBitmapAssetMap decode(Object result) { result as List; return PlatformBitmapAssetMap( @@ -1288,6 +2063,22 @@ class PlatformBitmapAssetMap { height: result[4] as double?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapAssetMap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon equivalent of [BytesMapBitmap]. @@ -1310,10 +2101,14 @@ class PlatformBitmapBytesMap { double? height; - Object encode() { + List _toList() { return [byteData, bitmapScaling, imagePixelRatio, width, height]; } + Object encode() { + return _toList(); + } + static PlatformBitmapBytesMap decode(Object result) { result as List; return PlatformBitmapBytesMap( @@ -1324,6 +2119,22 @@ class PlatformBitmapBytesMap { height: result[4] as double?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBitmapBytesMap || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -1594,8 +2405,9 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1624,9 +2436,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [configuration], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([configuration]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1654,9 +2468,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1684,9 +2500,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1713,9 +2531,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, idsToRemove], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, idsToRemove]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1743,9 +2563,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1773,9 +2595,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1803,9 +2627,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1833,9 +2659,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1863,9 +2691,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [toAdd, toChange, idsToRemove], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([toAdd, toChange, idsToRemove]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1889,8 +2719,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [latLng], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([latLng]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1919,9 +2752,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [screenCoordinate], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([screenCoordinate]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1950,8 +2785,9 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1981,8 +2817,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraUpdate], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([cameraUpdate]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2010,12 +2849,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [cameraUpdate, durationMilliseconds], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([ - cameraUpdate, - durationMilliseconds, - ]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2039,8 +2877,9 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2069,8 +2908,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [markerId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([markerId]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2094,8 +2936,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [markerId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([markerId]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2120,8 +2965,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [markerId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([markerId]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2154,8 +3002,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [style], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([style]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2183,8 +3034,9 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2208,9 +3060,11 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [tileOverlayId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([tileOverlayId]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2234,8 +3088,9 @@ class MapsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2900,8 +3755,11 @@ class MapsPlatformViewApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [type], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([type]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2943,8 +3801,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -2972,8 +3831,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3001,8 +3861,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3030,8 +3891,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3059,8 +3921,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3088,8 +3951,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3117,8 +3981,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3146,8 +4011,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3175,9 +4041,11 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [tileOverlayId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([tileOverlayId]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3202,9 +4070,11 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [groundOverlayId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([groundOverlayId]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3227,8 +4097,11 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [heatmapId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([heatmapId]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3251,8 +4124,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3280,9 +4154,11 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [clusterManagerId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([clusterManagerId]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -3311,8 +4187,9 @@ class MapsInspectorApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { 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 deeca79193c..8ae8d591ad7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml @@ -28,7 +28,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^22.4.2 + pigeon: ^26.1.0 plugin_platform_interface: ^2.1.7 topics: diff --git a/packages/google_sign_in/google_sign_in_android/android/src/main/kotlin/io/flutter/plugins/googlesignin/Messages.kt b/packages/google_sign_in/google_sign_in_android/android/src/main/kotlin/io/flutter/plugins/googlesignin/Messages.kt index e7519428296..b3c7275ccfe 100644 --- a/packages/google_sign_in/google_sign_in_android/android/src/main/kotlin/io/flutter/plugins/googlesignin/Messages.kt +++ b/packages/google_sign_in/google_sign_in_android/android/src/main/kotlin/io/flutter/plugins/googlesignin/Messages.kt @@ -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.0.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @@ -53,7 +53,7 @@ private object MessagesPigeonUtils { } if (a is Map<*, *> && b is Map<*, *>) { return a.size == b.size && - a.all { (b as Map).containsKey(it.key) && deepEquals(it.value, b[it.key]) } + a.all { (b as Map).contains(it.key) && deepEquals(it.value, b[it.key]) } } return a == b } @@ -599,11 +599,11 @@ private open class MessagesPigeonCodec : StandardMessageCodec() { when (value) { is GetCredentialFailureType -> { stream.write(129) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is AuthorizeFailureType -> { stream.write(130) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is PlatformAuthorizationRequest -> { stream.write(131) diff --git a/packages/google_sign_in/google_sign_in_android/lib/src/messages.g.dart b/packages/google_sign_in/google_sign_in_android/lib/src/messages.g.dart index 7de737a2395..343a3c3ab1f 100644 --- a/packages/google_sign_in/google_sign_in_android/lib/src/messages.g.dart +++ b/packages/google_sign_in/google_sign_in_android/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.0.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers diff --git a/packages/google_sign_in/google_sign_in_android/pubspec.yaml b/packages/google_sign_in/google_sign_in_android/pubspec.yaml index 1d7084727ca..49929d6d86e 100644 --- a/packages/google_sign_in/google_sign_in_android/pubspec.yaml +++ b/packages/google_sign_in/google_sign_in_android/pubspec.yaml @@ -27,7 +27,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^26.0.0 + pigeon: ^26.1.0 topics: - authentication diff --git a/packages/google_sign_in/google_sign_in_ios/darwin/google_sign_in_ios/Sources/google_sign_in_ios/include/google_sign_in_ios/messages.g.h b/packages/google_sign_in/google_sign_in_ios/darwin/google_sign_in_ios/Sources/google_sign_in_ios/include/google_sign_in_ios/messages.g.h index 2b2695590be..cbcd982019c 100644 --- a/packages/google_sign_in/google_sign_in_ios/darwin/google_sign_in_ios/Sources/google_sign_in_ios/include/google_sign_in_ios/messages.g.h +++ b/packages/google_sign_in/google_sign_in_ios/darwin/google_sign_in_ios/Sources/google_sign_in_ios/include/google_sign_in_ios/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 (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #import diff --git a/packages/google_sign_in/google_sign_in_ios/darwin/google_sign_in_ios/Sources/google_sign_in_ios/messages.g.m b/packages/google_sign_in/google_sign_in_ios/darwin/google_sign_in_ios/Sources/google_sign_in_ios/messages.g.m index 516d5102828..59f0a857ea2 100644 --- a/packages/google_sign_in/google_sign_in_ios/darwin/google_sign_in_ios/Sources/google_sign_in_ios/messages.g.m +++ b/packages/google_sign_in/google_sign_in_ios/darwin/google_sign_in_ios/Sources/google_sign_in_ios/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 (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "./include/google_sign_in_ios/messages.g.h" diff --git a/packages/google_sign_in/google_sign_in_ios/lib/src/messages.g.dart b/packages/google_sign_in/google_sign_in_ios/lib/src/messages.g.dart index 19654c7a7f9..f5ca4310081 100644 --- a/packages/google_sign_in/google_sign_in_ios/lib/src/messages.g.dart +++ b/packages/google_sign_in/google_sign_in_ios/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,6 +18,24 @@ PlatformException _createConnectionError(String channelName) { ); } +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); + } + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); + } + return a == b; +} + /// Enum mapping of known codes from /// https://developers.google.com/identity/sign-in/ios/reference/Enums/GIDSignInErrorCode enum GoogleSignInErrorCode { @@ -62,10 +80,14 @@ class PlatformConfigurationParams { String? hostedDomain; - Object encode() { + List _toList() { return [clientId, serverClientId, hostedDomain]; } + Object encode() { + return _toList(); + } + static PlatformConfigurationParams decode(Object result) { result as List; return PlatformConfigurationParams( @@ -74,6 +96,23 @@ class PlatformConfigurationParams { hostedDomain: result[2] as String?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformConfigurationParams || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of GoogleSignInUserData + AuthenticationTokenData. @@ -98,10 +137,14 @@ class UserData { String? idToken; - Object encode() { + List _toList() { return [displayName, email, userId, photoUrl, idToken]; } + Object encode() { + return _toList(); + } + static UserData decode(Object result) { result as List; return UserData( @@ -112,6 +155,22 @@ class UserData { idToken: result[4] as String?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! UserData || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// The response from an auth call. @@ -128,10 +187,14 @@ class SignInResult { /// Exactly one of success and error will be non-nil. SignInFailure? error; - Object encode() { + List _toList() { return [success, error]; } + Object encode() { + return _toList(); + } + static SignInResult decode(Object result) { result as List; return SignInResult( @@ -139,6 +202,22 @@ class SignInResult { error: result[1] as SignInFailure?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SignInResult || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// An sign in failure. @@ -154,10 +233,14 @@ class SignInFailure { /// Extra details about the failure, if any. Object? details; - Object encode() { + List _toList() { return [type, message, details]; } + Object encode() { + return _toList(); + } + static SignInFailure decode(Object result) { result as List; return SignInFailure( @@ -166,6 +249,22 @@ class SignInFailure { details: result[2], ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SignInFailure || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// A successful auth result. @@ -190,10 +289,14 @@ class SignInSuccess { String? serverAuthCode; - Object encode() { + List _toList() { return [user, accessToken, grantedScopes, serverAuthCode]; } + Object encode() { + return _toList(); + } + static SignInSuccess decode(Object result) { result as List; return SignInSuccess( @@ -203,6 +306,22 @@ class SignInSuccess { serverAuthCode: result[3] as String?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SignInSuccess || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -284,8 +403,11 @@ class GoogleSignInApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [params], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([params]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -310,8 +432,9 @@ class GoogleSignInApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -340,9 +463,11 @@ class GoogleSignInApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [scopeHint, nonce], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([scopeHint, nonce]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -371,8 +496,11 @@ class GoogleSignInApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [userId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([userId]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -401,9 +529,11 @@ class GoogleSignInApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [scopes, userId], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([scopes, userId]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -432,8 +562,9 @@ class GoogleSignInApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -457,8 +588,9 @@ class GoogleSignInApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/google_sign_in/google_sign_in_ios/pubspec.yaml b/packages/google_sign_in/google_sign_in_ios/pubspec.yaml index e9bfa9bc0ab..660e29c24cb 100644 --- a/packages/google_sign_in/google_sign_in_ios/pubspec.yaml +++ b/packages/google_sign_in/google_sign_in_ios/pubspec.yaml @@ -31,7 +31,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^22.4.2 + pigeon: ^26.1.0 topics: - authentication diff --git a/packages/image_picker/image_picker_android/android/src/main/java/io/flutter/plugins/imagepicker/Messages.java b/packages/image_picker/image_picker_android/android/src/main/java/io/flutter/plugins/imagepicker/Messages.java index 67340c07b38..bf582fa4d35 100644 --- a/packages/image_picker/image_picker_android/android/src/main/java/io/flutter/plugins/imagepicker/Messages.java +++ b/packages/image_picker/image_picker_android/android/src/main/java/io/flutter/plugins/imagepicker/Messages.java @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v24.2.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon package io.flutter.plugins.imagepicker; diff --git a/packages/image_picker/image_picker_android/lib/src/messages.g.dart b/packages/image_picker/image_picker_android/lib/src/messages.g.dart index 494eb135d33..89aea6de03b 100644 --- a/packages/image_picker/image_picker_android/lib/src/messages.g.dart +++ b/packages/image_picker/image_picker_android/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v24.2.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,18 +18,22 @@ PlatformException _createConnectionError(String channelName) { ); } -List wrapResponse({ - Object? result, - PlatformException? error, - bool empty = false, -}) { - if (empty) { - return []; +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); } - if (error == null) { - return [result]; + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); } - return [error.code, error.message, error.details]; + return a == b; } enum SourceCamera { rear, front } @@ -51,10 +55,14 @@ class GeneralOptions { int? limit; - Object encode() { + List _toList() { return [allowMultiple, usePhotoPicker, limit]; } + Object encode() { + return _toList(); + } + static GeneralOptions decode(Object result) { result as List; return GeneralOptions( @@ -63,6 +71,22 @@ class GeneralOptions { limit: result[2] as int?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! GeneralOptions || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Options for image selection and output. @@ -80,10 +104,14 @@ class ImageSelectionOptions { /// 100 indicates original quality. int quality; - Object encode() { + List _toList() { return [maxWidth, maxHeight, quality]; } + Object encode() { + return _toList(); + } + static ImageSelectionOptions decode(Object result) { result as List; return ImageSelectionOptions( @@ -92,6 +120,22 @@ class ImageSelectionOptions { quality: result[2]! as int, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! ImageSelectionOptions || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class MediaSelectionOptions { @@ -99,16 +143,36 @@ class MediaSelectionOptions { ImageSelectionOptions imageSelectionOptions; - Object encode() { + List _toList() { return [imageSelectionOptions]; } + Object encode() { + return _toList(); + } + static MediaSelectionOptions decode(Object result) { result as List; return MediaSelectionOptions( imageSelectionOptions: result[0]! as ImageSelectionOptions, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! MediaSelectionOptions || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Options for image selection and output. @@ -118,14 +182,34 @@ class VideoSelectionOptions { /// The maximum desired length for the video, in seconds. int? maxDurationSeconds; - Object encode() { + List _toList() { return [maxDurationSeconds]; } + Object encode() { + return _toList(); + } + static VideoSelectionOptions decode(Object result) { result as List; return VideoSelectionOptions(maxDurationSeconds: result[0] as int?); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! VideoSelectionOptions || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Specification for the source of an image or video selection. @@ -136,10 +220,14 @@ class SourceSpecification { SourceCamera? camera; - Object encode() { + List _toList() { return [type, camera]; } + Object encode() { + return _toList(); + } + static SourceSpecification decode(Object result) { result as List; return SourceSpecification( @@ -147,6 +235,22 @@ class SourceSpecification { camera: result[1] as SourceCamera?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SourceSpecification || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// An error that occurred during lost result retrieval. @@ -159,10 +263,14 @@ class CacheRetrievalError { String? message; - Object encode() { + List _toList() { return [code, message]; } + Object encode() { + return _toList(); + } + static CacheRetrievalError decode(Object result) { result as List; return CacheRetrievalError( @@ -170,6 +278,22 @@ class CacheRetrievalError { message: result[1] as String?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! CacheRetrievalError || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// The result of retrieving cached results from a previous run. @@ -189,10 +313,14 @@ class CacheRetrievalResult { /// The results from the last selection, if any. List paths; - Object encode() { + List _toList() { return [type, error, paths]; } + Object encode() { + return _toList(); + } + static CacheRetrievalResult decode(Object result) { result as List; return CacheRetrievalResult( @@ -201,6 +329,22 @@ class CacheRetrievalResult { paths: (result[2] as List?)!.cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! CacheRetrievalResult || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -308,9 +452,11 @@ class ImagePickerApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [source, options, generalOptions], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([source, options, generalOptions]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -343,9 +489,11 @@ class ImagePickerApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [source, options, generalOptions], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([source, options, generalOptions]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -377,12 +525,11 @@ class ImagePickerApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [mediaSelectionOptions, generalOptions], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([ - mediaSelectionOptions, - generalOptions, - ]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -411,8 +558,9 @@ class ImagePickerApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/image_picker/image_picker_android/pubspec.yaml b/packages/image_picker/image_picker_android/pubspec.yaml index b86be28158a..b5ed5a98c26 100755 --- a/packages/image_picker/image_picker_android/pubspec.yaml +++ b/packages/image_picker/image_picker_android/pubspec.yaml @@ -27,7 +27,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^24.2.0 + pigeon: ^26.1.0 topics: - camera diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/messages.g.h b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/messages.g.h index ef98a01a97a..a880e336c02 100644 --- a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/messages.g.h +++ b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/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 (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #import diff --git a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/messages.g.m b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/messages.g.m index 9fbe0b537a8..727a649d203 100644 --- a/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/messages.g.m +++ b/packages/image_picker/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/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 (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "./include/image_picker_ios/messages.g.h" diff --git a/packages/image_picker/image_picker_ios/lib/src/messages.g.dart b/packages/image_picker/image_picker_ios/lib/src/messages.g.dart index b38ace4d8f2..81aedec71b5 100644 --- a/packages/image_picker/image_picker_ios/lib/src/messages.g.dart +++ b/packages/image_picker/image_picker_ios/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,18 +18,22 @@ PlatformException _createConnectionError(String channelName) { ); } -List wrapResponse({ - Object? result, - PlatformException? error, - bool empty = false, -}) { - if (empty) { - return []; +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); } - if (error == null) { - return [result]; + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); } - return [error.code, error.message, error.details]; + return a == b; } enum SourceCamera { rear, front } @@ -43,14 +47,34 @@ class MaxSize { double? height; - Object encode() { + List _toList() { return [width, height]; } + Object encode() { + return _toList(); + } + static MaxSize decode(Object result) { result as List; return MaxSize(width: result[0] as double?, height: result[1] as double?); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! MaxSize || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class MediaSelectionOptions { @@ -72,7 +96,7 @@ class MediaSelectionOptions { int? limit; - Object encode() { + List _toList() { return [ maxSize, imageQuality, @@ -82,6 +106,10 @@ class MediaSelectionOptions { ]; } + Object encode() { + return _toList(); + } + static MediaSelectionOptions decode(Object result) { result as List; return MediaSelectionOptions( @@ -92,6 +120,22 @@ class MediaSelectionOptions { limit: result[4] as int?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! MediaSelectionOptions || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class SourceSpecification { @@ -101,10 +145,14 @@ class SourceSpecification { SourceCamera camera; - Object encode() { + List _toList() { return [type, camera]; } + Object encode() { + return _toList(); + } + static SourceSpecification decode(Object result) { result as List; return SourceSpecification( @@ -112,6 +160,22 @@ class SourceSpecification { camera: result[1]! as SourceCamera, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SourceSpecification || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -193,14 +257,11 @@ class ImagePickerApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [source, maxSize, imageQuality, requestFullMetadata], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([ - source, - maxSize, - imageQuality, - requestFullMetadata, - ]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -228,14 +289,11 @@ class ImagePickerApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [maxSize, imageQuality, requestFullMetadata, limit], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([ - maxSize, - imageQuality, - requestFullMetadata, - limit, - ]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -266,9 +324,11 @@ class ImagePickerApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [source, maxDurationSeconds], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([source, maxDurationSeconds]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -294,9 +354,11 @@ class ImagePickerApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [maxDurationSeconds, limit], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([maxDurationSeconds, limit]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -327,9 +389,11 @@ class ImagePickerApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [mediaSelectionOptions], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([mediaSelectionOptions]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/image_picker/image_picker_ios/pubspec.yaml b/packages/image_picker/image_picker_ios/pubspec.yaml index 600481119d8..8d6842a9823 100755 --- a/packages/image_picker/image_picker_ios/pubspec.yaml +++ b/packages/image_picker/image_picker_ios/pubspec.yaml @@ -25,7 +25,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^22.4.1 + pigeon: ^26.1.0 topics: - camera diff --git a/packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md b/packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md index 6c3f2e7ed3a..32145f2e38c 100644 --- a/packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md +++ b/packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.0+7 + +* Updates Pigeon to ^26.1.0. + ## 0.4.0+6 * Updates Java compatibility version to 17 and minimum supported SDK version to Flutter 3.35/Dart 3.9. diff --git a/packages/in_app_purchase/in_app_purchase_android/android/src/main/java/io/flutter/plugins/inapppurchase/Messages.java b/packages/in_app_purchase/in_app_purchase_android/android/src/main/java/io/flutter/plugins/inapppurchase/Messages.java index a8ac10ddcaf..fa1135fed03 100644 --- a/packages/in_app_purchase/in_app_purchase_android/android/src/main/java/io/flutter/plugins/inapppurchase/Messages.java +++ b/packages/in_app_purchase/in_app_purchase_android/android/src/main/java/io/flutter/plugins/inapppurchase/Messages.java @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.6.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon package io.flutter.plugins.inapppurchase; @@ -142,6 +142,7 @@ public enum PlatformBillingChoiceMode { } } + /** Pigeon version of Java BillingClient.FeatureType. */ public enum PlatformBillingClientFeature { ALTERNATIVE_BILLING_ONLY(0), BILLING_CONFIG(1), diff --git a/packages/in_app_purchase/in_app_purchase_android/lib/src/messages.g.dart b/packages/in_app_purchase/in_app_purchase_android/lib/src/messages.g.dart index 053e1f3c8f0..cbcdb28231d 100644 --- a/packages/in_app_purchase/in_app_purchase_android/lib/src/messages.g.dart +++ b/packages/in_app_purchase/in_app_purchase_android/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.6.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -32,6 +32,24 @@ List wrapResponse({ return [error.code, error.message, error.details]; } +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); + } + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); + } + return a == b; +} + /// Pigeon version of Java BillingClient.BillingResponseCode. enum PlatformBillingResponse { serviceTimeout, @@ -75,6 +93,7 @@ enum PlatformBillingChoiceMode { userChoiceBilling, } +/// Pigeon version of Java BillingClient.FeatureType. enum PlatformBillingClientFeature { alternativeBillingOnly, billingConfig, @@ -100,10 +119,14 @@ class PlatformQueryProduct { PlatformProductType productType; - Object encode() { + List _toList() { return [productId, productType]; } + Object encode() { + return _toList(); + } + static PlatformQueryProduct decode(Object result) { result as List; return PlatformQueryProduct( @@ -111,6 +134,22 @@ class PlatformQueryProduct { productType: result[1]! as PlatformProductType, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformQueryProduct || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of Java AccountIdentifiers. @@ -124,10 +163,14 @@ class PlatformAccountIdentifiers { String? obfuscatedProfileId; - Object encode() { + List _toList() { return [obfuscatedAccountId, obfuscatedProfileId]; } + Object encode() { + return _toList(); + } + static PlatformAccountIdentifiers decode(Object result) { result as List; return PlatformAccountIdentifiers( @@ -135,6 +178,23 @@ class PlatformAccountIdentifiers { obfuscatedProfileId: result[1] as String?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformAccountIdentifiers || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of Java BillingResult. @@ -148,10 +208,14 @@ class PlatformBillingResult { String debugMessage; - Object encode() { + List _toList() { return [responseCode, debugMessage]; } + Object encode() { + return _toList(); + } + static PlatformBillingResult decode(Object result) { result as List; return PlatformBillingResult( @@ -159,6 +223,22 @@ class PlatformBillingResult { debugMessage: result[1]! as String, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBillingResult || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of Java ProductDetails.OneTimePurchaseOfferDetails. @@ -175,10 +255,14 @@ class PlatformOneTimePurchaseOfferDetails { String priceCurrencyCode; - Object encode() { + List _toList() { return [priceAmountMicros, formattedPrice, priceCurrencyCode]; } + Object encode() { + return _toList(); + } + static PlatformOneTimePurchaseOfferDetails decode(Object result) { result as List; return PlatformOneTimePurchaseOfferDetails( @@ -187,6 +271,23 @@ class PlatformOneTimePurchaseOfferDetails { priceCurrencyCode: result[2]! as String, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformOneTimePurchaseOfferDetails || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of Java ProductDetails. @@ -215,7 +316,7 @@ class PlatformProductDetails { List? subscriptionOfferDetails; - Object encode() { + List _toList() { return [ description, name, @@ -227,6 +328,10 @@ class PlatformProductDetails { ]; } + Object encode() { + return _toList(); + } + static PlatformProductDetails decode(Object result) { result as List; return PlatformProductDetails( @@ -241,6 +346,22 @@ class PlatformProductDetails { ?.cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformProductDetails || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of ProductDetailsResponseWrapper, which contains the @@ -255,10 +376,14 @@ class PlatformProductDetailsResponse { List productDetails; - Object encode() { + List _toList() { return [billingResult, productDetails]; } + Object encode() { + return _toList(); + } + static PlatformProductDetailsResponse decode(Object result) { result as List; return PlatformProductDetailsResponse( @@ -267,6 +392,23 @@ class PlatformProductDetailsResponse { .cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformProductDetailsResponse || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of AlternativeBillingOnlyReportingDetailsWrapper, which @@ -282,10 +424,14 @@ class PlatformAlternativeBillingOnlyReportingDetailsResponse { String externalTransactionToken; - Object encode() { + List _toList() { return [billingResult, externalTransactionToken]; } + Object encode() { + return _toList(); + } + static PlatformAlternativeBillingOnlyReportingDetailsResponse decode( Object result, ) { @@ -295,6 +441,23 @@ class PlatformAlternativeBillingOnlyReportingDetailsResponse { externalTransactionToken: result[1]! as String, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformAlternativeBillingOnlyReportingDetailsResponse || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of BillingConfigWrapper, which contains the components of the @@ -309,10 +472,14 @@ class PlatformBillingConfigResponse { String countryCode; - Object encode() { + List _toList() { return [billingResult, countryCode]; } + Object encode() { + return _toList(); + } + static PlatformBillingConfigResponse decode(Object result) { result as List; return PlatformBillingConfigResponse( @@ -320,6 +487,23 @@ class PlatformBillingConfigResponse { countryCode: result[1]! as String, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBillingConfigResponse || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of Java BillingFlowParams. @@ -348,7 +532,7 @@ class PlatformBillingFlowParams { String? purchaseToken; - Object encode() { + List _toList() { return [ product, replacementMode, @@ -360,6 +544,10 @@ class PlatformBillingFlowParams { ]; } + Object encode() { + return _toList(); + } + static PlatformBillingFlowParams decode(Object result) { result as List; return PlatformBillingFlowParams( @@ -372,6 +560,23 @@ class PlatformBillingFlowParams { purchaseToken: result[6] as String?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformBillingFlowParams || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of Java ProductDetails.PricingPhase. @@ -397,7 +602,7 @@ class PlatformPricingPhase { String priceCurrencyCode; - Object encode() { + List _toList() { return [ billingCycleCount, recurrenceMode, @@ -408,6 +613,10 @@ class PlatformPricingPhase { ]; } + Object encode() { + return _toList(); + } + static PlatformPricingPhase decode(Object result) { result as List; return PlatformPricingPhase( @@ -419,6 +628,22 @@ class PlatformPricingPhase { priceCurrencyCode: result[5]! as String, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPricingPhase || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of Java Purchase. @@ -470,7 +695,7 @@ class PlatformPurchase { PlatformPendingPurchaseUpdate? pendingPurchaseUpdate; - Object encode() { + List _toList() { return [ orderId, packageName, @@ -489,6 +714,10 @@ class PlatformPurchase { ]; } + Object encode() { + return _toList(); + } + static PlatformPurchase decode(Object result) { result as List; return PlatformPurchase( @@ -508,6 +737,22 @@ class PlatformPurchase { pendingPurchaseUpdate: result[13] as PlatformPendingPurchaseUpdate?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPurchase || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of Java Purchase. @@ -523,10 +768,14 @@ class PlatformPendingPurchaseUpdate { String purchaseToken; - Object encode() { + List _toList() { return [products, purchaseToken]; } + Object encode() { + return _toList(); + } + static PlatformPendingPurchaseUpdate decode(Object result) { result as List; return PlatformPendingPurchaseUpdate( @@ -534,6 +783,23 @@ class PlatformPendingPurchaseUpdate { purchaseToken: result[1]! as String, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPendingPurchaseUpdate || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of PurchaseHistoryRecord. @@ -564,7 +830,7 @@ class PlatformPurchaseHistoryRecord { List products; - Object encode() { + List _toList() { return [ quantity, purchaseTime, @@ -576,6 +842,10 @@ class PlatformPurchaseHistoryRecord { ]; } + Object encode() { + return _toList(); + } + static PlatformPurchaseHistoryRecord decode(Object result) { result as List; return PlatformPurchaseHistoryRecord( @@ -588,6 +858,23 @@ class PlatformPurchaseHistoryRecord { products: (result[6] as List?)!.cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPurchaseHistoryRecord || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of PurchasesHistoryResult, which contains the components of @@ -602,10 +889,14 @@ class PlatformPurchaseHistoryResponse { List purchases; - Object encode() { + List _toList() { return [billingResult, purchases]; } + Object encode() { + return _toList(); + } + static PlatformPurchaseHistoryResponse decode(Object result) { result as List; return PlatformPurchaseHistoryResponse( @@ -614,6 +905,23 @@ class PlatformPurchaseHistoryResponse { .cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPurchaseHistoryResponse || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of PurchasesResultWrapper, which contains the components of @@ -628,10 +936,14 @@ class PlatformPurchasesResponse { List purchases; - Object encode() { + List _toList() { return [billingResult, purchases]; } + Object encode() { + return _toList(); + } + static PlatformPurchasesResponse decode(Object result) { result as List; return PlatformPurchasesResponse( @@ -639,6 +951,23 @@ class PlatformPurchasesResponse { purchases: (result[1] as List?)!.cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPurchasesResponse || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of Java ProductDetails.SubscriptionOfferDetails. @@ -664,7 +993,7 @@ class PlatformSubscriptionOfferDetails { PlatformInstallmentPlanDetails? installmentPlanDetails; - Object encode() { + List _toList() { return [ basePlanId, offerId, @@ -675,6 +1004,10 @@ class PlatformSubscriptionOfferDetails { ]; } + Object encode() { + return _toList(); + } + static PlatformSubscriptionOfferDetails decode(Object result) { result as List; return PlatformSubscriptionOfferDetails( @@ -687,6 +1020,23 @@ class PlatformSubscriptionOfferDetails { installmentPlanDetails: result[5] as PlatformInstallmentPlanDetails?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformSubscriptionOfferDetails || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of UserChoiceDetailsWrapper and Java UserChoiceDetails. @@ -703,7 +1053,7 @@ class PlatformUserChoiceDetails { List products; - Object encode() { + List _toList() { return [ originalExternalTransactionId, externalTransactionToken, @@ -711,6 +1061,10 @@ class PlatformUserChoiceDetails { ]; } + Object encode() { + return _toList(); + } + static PlatformUserChoiceDetails decode(Object result) { result as List; return PlatformUserChoiceDetails( @@ -720,6 +1074,23 @@ class PlatformUserChoiceDetails { .cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformUserChoiceDetails || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of UserChoiseDetails.Product. @@ -736,10 +1107,14 @@ class PlatformUserChoiceProduct { PlatformProductType type; - Object encode() { + List _toList() { return [id, offerToken, type]; } + Object encode() { + return _toList(); + } + static PlatformUserChoiceProduct decode(Object result) { result as List; return PlatformUserChoiceProduct( @@ -748,6 +1123,23 @@ class PlatformUserChoiceProduct { type: result[2]! as PlatformProductType, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformUserChoiceProduct || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of ProductDetails.InstallmentPlanDetails. @@ -762,13 +1154,17 @@ class PlatformInstallmentPlanDetails { int subsequentCommitmentPaymentsCount; - Object encode() { + List _toList() { return [ commitmentPaymentsCount, subsequentCommitmentPaymentsCount, ]; } + Object encode() { + return _toList(); + } + static PlatformInstallmentPlanDetails decode(Object result) { result as List; return PlatformInstallmentPlanDetails( @@ -776,6 +1172,23 @@ class PlatformInstallmentPlanDetails { subsequentCommitmentPaymentsCount: result[1]! as int, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformInstallmentPlanDetails || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Pigeon version of Java PendingPurchasesParams. @@ -784,16 +1197,37 @@ class PlatformPendingPurchasesParams { bool enablePrepaidPlans; - Object encode() { + List _toList() { return [enablePrepaidPlans]; } + Object encode() { + return _toList(); + } + static PlatformPendingPurchasesParams decode(Object result) { result as List; return PlatformPendingPurchasesParams( enablePrepaidPlans: result[0]! as bool, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! PlatformPendingPurchasesParams || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -991,8 +1425,9 @@ class InAppPurchaseApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1025,13 +1460,11 @@ class InAppPurchaseApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [callbackHandle, billingMode, pendingPurchasesParams], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([ - callbackHandle, - billingMode, - pendingPurchasesParams, - ]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1060,8 +1493,9 @@ class InAppPurchaseApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1085,8 +1519,9 @@ class InAppPurchaseApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1117,8 +1552,11 @@ class InAppPurchaseApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [params], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([params]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1149,9 +1587,11 @@ class InAppPurchaseApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [purchaseToken], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([purchaseToken]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1180,9 +1620,11 @@ class InAppPurchaseApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [purchaseToken], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([purchaseToken]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1213,8 +1655,11 @@ class InAppPurchaseApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [productType], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([productType]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1245,8 +1690,11 @@ class InAppPurchaseApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [productType], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([productType]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1277,8 +1725,11 @@ class InAppPurchaseApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [products], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([products]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1307,8 +1758,11 @@ class InAppPurchaseApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [feature], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([feature]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1337,8 +1791,9 @@ class InAppPurchaseApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1368,8 +1823,9 @@ class InAppPurchaseApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -1399,8 +1855,9 @@ class InAppPurchaseApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/in_app_purchase/in_app_purchase_android/pubspec.yaml b/packages/in_app_purchase/in_app_purchase_android/pubspec.yaml index da0f1f2cd15..9e5f853812a 100644 --- a/packages/in_app_purchase/in_app_purchase_android/pubspec.yaml +++ b/packages/in_app_purchase/in_app_purchase_android/pubspec.yaml @@ -3,7 +3,7 @@ description: An implementation for the Android platform of the Flutter `in_app_p repository: https://github.com/flutter/packages/tree/main/packages/in_app_purchase/in_app_purchase_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22 -version: 0.4.0+6 +version: 0.4.0+7 environment: sdk: ^3.9.0 @@ -29,7 +29,7 @@ dev_dependencies: sdk: flutter leak_tracker_flutter_testing: any mockito: ^5.4.4 - pigeon: ^22.4.2 + pigeon: ^26.1.0 test: ^1.16.0 topics: diff --git a/packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md b/packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md index d30e38e9260..8e4b34eef1e 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md +++ b/packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.6+2 + +* Updates Pigeon to ^26.1.0. + ## 0.4.6+1 * Refactors internals for improved testability. diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit/StoreKit2/sk2_pigeon.g.swift b/packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit/StoreKit2/sk2_pigeon.g.swift index c18c819446b..6ba8bac86e0 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit/StoreKit2/sk2_pigeon.g.swift +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit/StoreKit2/sk2_pigeon.g.swift @@ -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 (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation @@ -73,7 +73,6 @@ private func nilOrValue(_ value: Any?) -> T? { return value as! T? } -// swift-format-ignore: AlwaysUseLowerCamelCase func deepEqualssk2_pigeon(_ lhs: Any?, _ rhs: Any?) -> Bool { let cleanLhs = nilOrValue(lhs) as Any? let cleanRhs = nilOrValue(rhs) as Any? @@ -115,7 +114,6 @@ func deepEqualssk2_pigeon(_ lhs: Any?, _ rhs: Any?) -> Bool { } } -// swift-format-ignore: AlwaysUseLowerCamelCase func deepHashsk2_pigeon(value: Any?, hasher: inout Hasher) { if let valueList = value as? [AnyHashable] { for item in valueList { deepHashsk2_pigeon(value: item, hasher: &hasher) } @@ -211,6 +209,9 @@ struct SK2SubscriptionOfferMessage: Hashable { paymentMode, ] } + static func == (lhs: SK2SubscriptionOfferMessage, rhs: SK2SubscriptionOfferMessage) -> Bool { + return deepEqualssk2_pigeon(lhs.toList(), rhs.toList()) + } func hash(into hasher: inout Hasher) { deepHashsk2_pigeon(value: toList(), hasher: &hasher) } @@ -239,6 +240,9 @@ struct SK2SubscriptionPeriodMessage: Hashable { unit, ] } + static func == (lhs: SK2SubscriptionPeriodMessage, rhs: SK2SubscriptionPeriodMessage) -> Bool { + return deepEqualssk2_pigeon(lhs.toList(), rhs.toList()) + } func hash(into hasher: inout Hasher) { deepHashsk2_pigeon(value: toList(), hasher: &hasher) } @@ -272,6 +276,9 @@ struct SK2SubscriptionInfoMessage: Hashable { subscriptionPeriod, ] } + static func == (lhs: SK2SubscriptionInfoMessage, rhs: SK2SubscriptionInfoMessage) -> Bool { + return deepEqualssk2_pigeon(lhs.toList(), rhs.toList()) + } func hash(into hasher: inout Hasher) { deepHashsk2_pigeon(value: toList(), hasher: &hasher) } @@ -333,6 +340,9 @@ struct SK2ProductMessage: Hashable { priceLocale, ] } + static func == (lhs: SK2ProductMessage, rhs: SK2ProductMessage) -> Bool { + return deepEqualssk2_pigeon(lhs.toList(), rhs.toList()) + } func hash(into hasher: inout Hasher) { deepHashsk2_pigeon(value: toList(), hasher: &hasher) } @@ -359,6 +369,9 @@ struct SK2PriceLocaleMessage: Hashable { currencySymbol, ] } + static func == (lhs: SK2PriceLocaleMessage, rhs: SK2PriceLocaleMessage) -> Bool { + return deepEqualssk2_pigeon(lhs.toList(), rhs.toList()) + } func hash(into hasher: inout Hasher) { deepHashsk2_pigeon(value: toList(), hasher: &hasher) } @@ -396,6 +409,11 @@ struct SK2SubscriptionOfferSignatureMessage: Hashable { signature, ] } + static func == ( + lhs: SK2SubscriptionOfferSignatureMessage, rhs: SK2SubscriptionOfferSignatureMessage + ) -> Bool { + return deepEqualssk2_pigeon(lhs.toList(), rhs.toList()) + } func hash(into hasher: inout Hasher) { deepHashsk2_pigeon(value: toList(), hasher: &hasher) } @@ -422,6 +440,11 @@ struct SK2SubscriptionOfferPurchaseMessage: Hashable { promotionalOfferSignature, ] } + static func == ( + lhs: SK2SubscriptionOfferPurchaseMessage, rhs: SK2SubscriptionOfferPurchaseMessage + ) -> Bool { + return deepEqualssk2_pigeon(lhs.toList(), rhs.toList()) + } func hash(into hasher: inout Hasher) { deepHashsk2_pigeon(value: toList(), hasher: &hasher) } @@ -456,6 +479,11 @@ struct SK2ProductPurchaseOptionsMessage: Hashable { winBackOfferId, ] } + static func == (lhs: SK2ProductPurchaseOptionsMessage, rhs: SK2ProductPurchaseOptionsMessage) + -> Bool + { + return deepEqualssk2_pigeon(lhs.toList(), rhs.toList()) + } func hash(into hasher: inout Hasher) { deepHashsk2_pigeon(value: toList(), hasher: &hasher) } @@ -518,6 +546,9 @@ struct SK2TransactionMessage: Hashable { jsonRepresentation, ] } + static func == (lhs: SK2TransactionMessage, rhs: SK2TransactionMessage) -> Bool { + return deepEqualssk2_pigeon(lhs.toList(), rhs.toList()) + } func hash(into hasher: inout Hasher) { deepHashsk2_pigeon(value: toList(), hasher: &hasher) } diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit_objc/include/in_app_purchase_storekit_objc/messages.g.h b/packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit_objc/include/in_app_purchase_storekit_objc/messages.g.h index dcf8c057cc8..f5a85604340 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit_objc/include/in_app_purchase_storekit_objc/messages.g.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit_objc/include/in_app_purchase_storekit_objc/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 (v22.7.3), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #import diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit_objc/messages.g.m b/packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit_objc/messages.g.m index 689eeab2c86..7be9e75eb51 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit_objc/messages.g.m +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit_objc/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 (v22.7.3), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "./include/in_app_purchase_storekit_objc/messages.g.h" diff --git a/packages/in_app_purchase/in_app_purchase_storekit/lib/src/messages.g.dart b/packages/in_app_purchase/in_app_purchase_storekit/lib/src/messages.g.dart index 90c2ea13cf2..47447273c96 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/lib/src/messages.g.dart +++ b/packages/in_app_purchase/in_app_purchase_storekit/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.7.3), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,18 +18,22 @@ PlatformException _createConnectionError(String channelName) { ); } -List wrapResponse({ - Object? result, - PlatformException? error, - bool empty = false, -}) { - if (empty) { - return []; +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); } - if (error == null) { - return [result]; + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); } - return [error.code, error.message, error.details]; + return a == b; } enum SKPaymentTransactionStateMessage { @@ -115,7 +119,7 @@ class SKPaymentTransactionMessage { SKErrorMessage? error; - Object encode() { + List _toList() { return [ payment, transactionState, @@ -126,6 +130,10 @@ class SKPaymentTransactionMessage { ]; } + Object encode() { + return _toList(); + } + static SKPaymentTransactionMessage decode(Object result) { result as List; return SKPaymentTransactionMessage( @@ -137,6 +145,23 @@ class SKPaymentTransactionMessage { error: result[5] as SKErrorMessage?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SKPaymentTransactionMessage || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class SKPaymentMessage { @@ -161,7 +186,7 @@ class SKPaymentMessage { SKPaymentDiscountMessage? paymentDiscount; - Object encode() { + List _toList() { return [ productIdentifier, applicationUsername, @@ -172,6 +197,10 @@ class SKPaymentMessage { ]; } + Object encode() { + return _toList(); + } + static SKPaymentMessage decode(Object result) { result as List; return SKPaymentMessage( @@ -183,6 +212,22 @@ class SKPaymentMessage { paymentDiscount: result[5] as SKPaymentDiscountMessage?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SKPaymentMessage || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class SKErrorMessage { @@ -194,10 +239,14 @@ class SKErrorMessage { Map? userInfo; - Object encode() { + List _toList() { return [code, domain, userInfo]; } + Object encode() { + return _toList(); + } + static SKErrorMessage decode(Object result) { result as List; return SKErrorMessage( @@ -206,6 +255,22 @@ class SKErrorMessage { userInfo: (result[2] as Map?)?.cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SKErrorMessage || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class SKPaymentDiscountMessage { @@ -227,10 +292,14 @@ class SKPaymentDiscountMessage { int timestamp; - Object encode() { + List _toList() { return [identifier, keyIdentifier, nonce, signature, timestamp]; } + Object encode() { + return _toList(); + } + static SKPaymentDiscountMessage decode(Object result) { result as List; return SKPaymentDiscountMessage( @@ -241,6 +310,23 @@ class SKPaymentDiscountMessage { timestamp: result[4]! as int, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SKPaymentDiscountMessage || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class SKStorefrontMessage { @@ -250,10 +336,14 @@ class SKStorefrontMessage { String identifier; - Object encode() { + List _toList() { return [countryCode, identifier]; } + Object encode() { + return _toList(); + } + static SKStorefrontMessage decode(Object result) { result as List; return SKStorefrontMessage( @@ -261,6 +351,22 @@ class SKStorefrontMessage { identifier: result[1]! as String, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SKStorefrontMessage || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class SKProductsResponseMessage { @@ -270,10 +376,14 @@ class SKProductsResponseMessage { List? invalidProductIdentifiers; - Object encode() { + List _toList() { return [products, invalidProductIdentifiers]; } + Object encode() { + return _toList(); + } + static SKProductsResponseMessage decode(Object result) { result as List; return SKProductsResponseMessage( @@ -281,6 +391,23 @@ class SKProductsResponseMessage { invalidProductIdentifiers: (result[1] as List?)?.cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SKProductsResponseMessage || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class SKProductMessage { @@ -314,7 +441,7 @@ class SKProductMessage { List? discounts; - Object encode() { + List _toList() { return [ productIdentifier, localizedTitle, @@ -328,6 +455,10 @@ class SKProductMessage { ]; } + Object encode() { + return _toList(); + } + static SKProductMessage decode(Object result) { result as List; return SKProductMessage( @@ -343,6 +474,22 @@ class SKProductMessage { ?.cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SKProductMessage || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class SKPriceLocaleMessage { @@ -361,10 +508,14 @@ class SKPriceLocaleMessage { ///The country code for the locale, e.g. US for US locale. String countryCode; - Object encode() { + List _toList() { return [currencySymbol, currencyCode, countryCode]; } + Object encode() { + return _toList(); + } + static SKPriceLocaleMessage decode(Object result) { result as List; return SKPriceLocaleMessage( @@ -373,6 +524,22 @@ class SKPriceLocaleMessage { countryCode: result[2]! as String, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SKPriceLocaleMessage || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class SKProductDiscountMessage { @@ -400,7 +567,7 @@ class SKProductDiscountMessage { SKProductDiscountTypeMessage type; - Object encode() { + List _toList() { return [ price, priceLocale, @@ -412,6 +579,10 @@ class SKProductDiscountMessage { ]; } + Object encode() { + return _toList(); + } + static SKProductDiscountMessage decode(Object result) { result as List; return SKProductDiscountMessage( @@ -424,6 +595,23 @@ class SKProductDiscountMessage { type: result[6]! as SKProductDiscountTypeMessage, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SKProductDiscountMessage || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class SKProductSubscriptionPeriodMessage { @@ -436,10 +624,14 @@ class SKProductSubscriptionPeriodMessage { SKSubscriptionPeriodUnitMessage unit; - Object encode() { + List _toList() { return [numberOfUnits, unit]; } + Object encode() { + return _toList(); + } + static SKProductSubscriptionPeriodMessage decode(Object result) { result as List; return SKProductSubscriptionPeriodMessage( @@ -447,6 +639,23 @@ class SKProductSubscriptionPeriodMessage { unit: result[1]! as SKSubscriptionPeriodUnitMessage, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SKProductSubscriptionPeriodMessage || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -579,8 +788,9 @@ class InAppPurchaseAPI { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -608,8 +818,9 @@ class InAppPurchaseAPI { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -638,8 +849,9 @@ class InAppPurchaseAPI { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -667,8 +879,11 @@ class InAppPurchaseAPI { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [paymentMap], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([paymentMap]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -693,9 +908,11 @@ class InAppPurchaseAPI { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [productIdentifiers], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([productIdentifiers]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -723,8 +940,11 @@ class InAppPurchaseAPI { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [finishMap], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([finishMap]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -747,9 +967,11 @@ class InAppPurchaseAPI { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [applicationUserName], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([applicationUserName]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -772,8 +994,9 @@ class InAppPurchaseAPI { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -796,8 +1019,9 @@ class InAppPurchaseAPI { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -820,9 +1044,11 @@ class InAppPurchaseAPI { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [receiptProperties], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([receiptProperties]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -845,8 +1071,9 @@ class InAppPurchaseAPI { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -869,8 +1096,9 @@ class InAppPurchaseAPI { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -893,8 +1121,9 @@ class InAppPurchaseAPI { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -917,8 +1146,9 @@ class InAppPurchaseAPI { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -941,8 +1171,9 @@ class InAppPurchaseAPI { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -965,8 +1196,9 @@ class InAppPurchaseAPI { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/in_app_purchase/in_app_purchase_storekit/lib/src/sk2_pigeon.g.dart b/packages/in_app_purchase/in_app_purchase_storekit/lib/src/sk2_pigeon.g.dart index 9becfeb8aba..0d40ad3578b 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/lib/src/sk2_pigeon.g.dart +++ b/packages/in_app_purchase/in_app_purchase_storekit/lib/src/sk2_pigeon.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers diff --git a/packages/in_app_purchase/in_app_purchase_storekit/pubspec.yaml b/packages/in_app_purchase/in_app_purchase_storekit/pubspec.yaml index 195e1614ddc..cb642ec20ae 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/pubspec.yaml +++ b/packages/in_app_purchase/in_app_purchase_storekit/pubspec.yaml @@ -2,7 +2,7 @@ name: in_app_purchase_storekit description: An implementation for the iOS and macOS platforms of the Flutter `in_app_purchase` plugin. This uses the StoreKit Framework. repository: https://github.com/flutter/packages/tree/main/packages/in_app_purchase/in_app_purchase_storekit issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22 -version: 0.4.6+1 +version: 0.4.6+2 environment: sdk: ^3.9.0 @@ -31,7 +31,7 @@ dev_dependencies: flutter_test: sdk: flutter json_serializable: ^6.0.0 - pigeon: ^25.1.0 + pigeon: ^26.1.0 test: ^1.16.0 topics: diff --git a/packages/interactive_media_ads/android/src/main/kotlin/dev/flutter/packages/interactive_media_ads/InteractiveMediaAdsLibrary.g.kt b/packages/interactive_media_ads/android/src/main/kotlin/dev/flutter/packages/interactive_media_ads/InteractiveMediaAdsLibrary.g.kt index 6de9e7d7b4e..e1e11bc83cf 100644 --- a/packages/interactive_media_ads/android/src/main/kotlin/dev/flutter/packages/interactive_media_ads/InteractiveMediaAdsLibrary.g.kt +++ b/packages/interactive_media_ads/android/src/main/kotlin/dev/flutter/packages/interactive_media_ads/InteractiveMediaAdsLibrary.g.kt @@ -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.0.2), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @@ -1201,23 +1201,23 @@ private open class InteractiveMediaAdsLibraryPigeonCodec : StandardMessageCodec( when (value) { is AdErrorCode -> { stream.write(129) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is AdErrorType -> { stream.write(130) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is AdEventType -> { stream.write(131) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is UiElement -> { stream.write(132) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is AudioManagerAudioFocus -> { stream.write(133) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } else -> super.writeValue(stream, value) } diff --git a/packages/interactive_media_ads/ios/interactive_media_ads/Sources/interactive_media_ads/InteractiveMediaAdsLibrary.g.swift b/packages/interactive_media_ads/ios/interactive_media_ads/Sources/interactive_media_ads/InteractiveMediaAdsLibrary.g.swift index ef2f9f27198..d0c794d5311 100644 --- a/packages/interactive_media_ads/ios/interactive_media_ads/Sources/interactive_media_ads/InteractiveMediaAdsLibrary.g.swift +++ b/packages/interactive_media_ads/ios/interactive_media_ads/Sources/interactive_media_ads/InteractiveMediaAdsLibrary.g.swift @@ -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.0.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation diff --git a/packages/interactive_media_ads/lib/src/android/interactive_media_ads.g.dart b/packages/interactive_media_ads/lib/src/android/interactive_media_ads.g.dart index bcd04c6e769..2cb799e2f37 100644 --- a/packages/interactive_media_ads/lib/src/android/interactive_media_ads.g.dart +++ b/packages/interactive_media_ads/lib/src/android/interactive_media_ads.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.0.2), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers diff --git a/packages/interactive_media_ads/lib/src/ios/interactive_media_ads.g.dart b/packages/interactive_media_ads/lib/src/ios/interactive_media_ads.g.dart index bb5c9dad327..b5cb8248e21 100644 --- a/packages/interactive_media_ads/lib/src/ios/interactive_media_ads.g.dart +++ b/packages/interactive_media_ads/lib/src/ios/interactive_media_ads.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.0.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers diff --git a/packages/interactive_media_ads/pubspec.yaml b/packages/interactive_media_ads/pubspec.yaml index 02ba4ce7d0e..b399152a82a 100644 --- a/packages/interactive_media_ads/pubspec.yaml +++ b/packages/interactive_media_ads/pubspec.yaml @@ -31,7 +31,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^26.0.2 + pigeon: ^26.1.0 topics: - ads diff --git a/packages/local_auth/local_auth_android/android/src/main/java/io/flutter/plugins/localauth/Messages.java b/packages/local_auth/local_auth_android/android/src/main/java/io/flutter/plugins/localauth/Messages.java index 667d6656992..fe20c622d4a 100644 --- a/packages/local_auth/local_auth_android/android/src/main/java/io/flutter/plugins/localauth/Messages.java +++ b/packages/local_auth/local_auth_android/android/src/main/java/io/flutter/plugins/localauth/Messages.java @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon package io.flutter.plugins.localauth; diff --git a/packages/local_auth/local_auth_android/lib/src/messages.g.dart b/packages/local_auth/local_auth_android/lib/src/messages.g.dart index e8b3b64699c..fae25d17019 100644 --- a/packages/local_auth/local_auth_android/lib/src/messages.g.dart +++ b/packages/local_auth/local_auth_android/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,6 +18,24 @@ PlatformException _createConnectionError(String channelName) { ); } +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); + } + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); + } + return a == b; +} + /// Possible outcomes of an authentication attempt. enum AuthResultCode { /// The user authenticated successfully. @@ -98,10 +116,14 @@ class AuthStrings { String signInTitle; - Object encode() { + List _toList() { return [reason, signInHint, cancelButton, signInTitle]; } + Object encode() { + return _toList(); + } + static AuthStrings decode(Object result) { result as List; return AuthStrings( @@ -111,6 +133,22 @@ class AuthStrings { signInTitle: result[3]! as String, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! AuthStrings || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// The results of an authentication request. @@ -123,10 +161,14 @@ class AuthResult { /// The error message associated with the result, if any. String? errorMessage; - Object encode() { + List _toList() { return [code, errorMessage]; } + Object encode() { + return _toList(); + } + static AuthResult decode(Object result) { result as List; return AuthResult( @@ -134,6 +176,22 @@ class AuthResult { errorMessage: result[1] as String?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! AuthResult || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class AuthOptions { @@ -149,10 +207,14 @@ class AuthOptions { bool sticky; - Object encode() { + List _toList() { return [biometricOnly, sensitiveTransaction, sticky]; } + Object encode() { + return _toList(); + } + static AuthOptions decode(Object result) { result as List; return AuthOptions( @@ -161,6 +223,22 @@ class AuthOptions { sticky: result[2]! as bool, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! AuthOptions || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -238,8 +316,9 @@ class LocalAuthApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -269,8 +348,9 @@ class LocalAuthApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -302,8 +382,9 @@ class LocalAuthApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -336,8 +417,9 @@ class LocalAuthApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -366,9 +448,11 @@ class LocalAuthApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [options, strings], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([options, strings]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/local_auth/local_auth_android/pubspec.yaml b/packages/local_auth/local_auth_android/pubspec.yaml index 5a458bdf973..67deb8fbb79 100644 --- a/packages/local_auth/local_auth_android/pubspec.yaml +++ b/packages/local_auth/local_auth_android/pubspec.yaml @@ -29,7 +29,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^22.4.0 + pigeon: ^26.1.0 topics: - authentication diff --git a/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin/Sources/local_auth_darwin/messages.g.swift b/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin/Sources/local_auth_darwin/messages.g.swift index c14a148a206..85805a80916 100644 --- a/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin/Sources/local_auth_darwin/messages.g.swift +++ b/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin/Sources/local_auth_darwin/messages.g.swift @@ -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.0.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation diff --git a/packages/local_auth/local_auth_darwin/lib/src/messages.g.dart b/packages/local_auth/local_auth_darwin/lib/src/messages.g.dart index d895007d346..1901be9ea66 100644 --- a/packages/local_auth/local_auth_darwin/lib/src/messages.g.dart +++ b/packages/local_auth/local_auth_darwin/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.0.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers diff --git a/packages/local_auth/local_auth_darwin/pubspec.yaml b/packages/local_auth/local_auth_darwin/pubspec.yaml index 1a8fad8a31b..518160d7dc7 100644 --- a/packages/local_auth/local_auth_darwin/pubspec.yaml +++ b/packages/local_auth/local_auth_darwin/pubspec.yaml @@ -32,7 +32,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^26.0.0 + pigeon: ^26.1.0 topics: - authentication diff --git a/packages/local_auth/local_auth_windows/lib/src/messages.g.dart b/packages/local_auth/local_auth_windows/lib/src/messages.g.dart index b5bd1105b07..a36d9602242 100644 --- a/packages/local_auth/local_auth_windows/lib/src/messages.g.dart +++ b/packages/local_auth/local_auth_windows/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.0.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers diff --git a/packages/local_auth/local_auth_windows/pubspec.yaml b/packages/local_auth/local_auth_windows/pubspec.yaml index 1a2c76e9969..f4edd9253d2 100644 --- a/packages/local_auth/local_auth_windows/pubspec.yaml +++ b/packages/local_auth/local_auth_windows/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pigeon: ^26.0.1 + pigeon: ^26.1.0 topics: - authentication diff --git a/packages/local_auth/local_auth_windows/windows/messages.g.cpp b/packages/local_auth/local_auth_windows/windows/messages.g.cpp index f8a367c6d54..e7616307616 100644 --- a/packages/local_auth/local_auth_windows/windows/messages.g.cpp +++ b/packages/local_auth/local_auth_windows/windows/messages.g.cpp @@ -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.0.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #undef _HAS_EXCEPTIONS diff --git a/packages/local_auth/local_auth_windows/windows/messages.g.h b/packages/local_auth/local_auth_windows/windows/messages.g.h index 304c2ea44f0..e4df7eeb160 100644 --- a/packages/local_auth/local_auth_windows/windows/messages.g.h +++ b/packages/local_auth/local_auth_windows/windows/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.0.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #ifndef PIGEON_MESSAGES_G_H_ diff --git a/packages/path_provider/path_provider_android/CHANGELOG.md b/packages/path_provider/path_provider_android/CHANGELOG.md index 5c4febf9e00..6eddee93057 100644 --- a/packages/path_provider/path_provider_android/CHANGELOG.md +++ b/packages/path_provider/path_provider_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.2.21 + +* Updates Pigeon to ^26.1.0. + ## 2.2.20 * Updates Java compatibility version to 17 and minimum supported SDK version to Flutter 3.35/Dart 3.9. diff --git a/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/Messages.java b/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/Messages.java index 96f2e1292bb..923a8a28e8d 100644 --- a/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/Messages.java +++ b/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/Messages.java @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.4.2), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon package io.flutter.plugins.pathprovider; @@ -144,8 +144,8 @@ static void setUp( @NonNull String messageChannelSuffix, @Nullable PathProviderApi api) { messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; + BinaryMessenger.TaskQueue taskQueue = binaryMessenger.makeBackgroundTaskQueue(); { - BinaryMessenger.TaskQueue taskQueue = binaryMessenger.makeBackgroundTaskQueue(); BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, @@ -170,7 +170,6 @@ static void setUp( } } { - BinaryMessenger.TaskQueue taskQueue = binaryMessenger.makeBackgroundTaskQueue(); BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, @@ -195,7 +194,6 @@ static void setUp( } } { - BinaryMessenger.TaskQueue taskQueue = binaryMessenger.makeBackgroundTaskQueue(); BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, @@ -220,7 +218,6 @@ static void setUp( } } { - BinaryMessenger.TaskQueue taskQueue = binaryMessenger.makeBackgroundTaskQueue(); BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, @@ -245,7 +242,6 @@ static void setUp( } } { - BinaryMessenger.TaskQueue taskQueue = binaryMessenger.makeBackgroundTaskQueue(); BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, @@ -270,7 +266,6 @@ static void setUp( } } { - BinaryMessenger.TaskQueue taskQueue = binaryMessenger.makeBackgroundTaskQueue(); BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, @@ -295,7 +290,6 @@ static void setUp( } } { - BinaryMessenger.TaskQueue taskQueue = binaryMessenger.makeBackgroundTaskQueue(); BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, diff --git a/packages/path_provider/path_provider_android/lib/messages.g.dart b/packages/path_provider/path_provider_android/lib/messages.g.dart index bd7104e83bb..29b133c5dab 100644 --- a/packages/path_provider/path_provider_android/lib/messages.g.dart +++ b/packages/path_provider/path_provider_android/lib/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.4.2), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,20 +18,6 @@ PlatformException _createConnectionError(String channelName) { ); } -List wrapResponse({ - Object? result, - PlatformException? error, - bool empty = false, -}) { - if (empty) { - return []; - } - if (error == null) { - return [result]; - } - return [error.code, error.message, error.details]; -} - enum StorageDirectory { root, music, @@ -99,8 +85,9 @@ class PathProviderApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -123,8 +110,9 @@ class PathProviderApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -147,8 +135,9 @@ class PathProviderApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -171,8 +160,9 @@ class PathProviderApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -195,8 +185,9 @@ class PathProviderApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -219,8 +210,9 @@ class PathProviderApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -250,8 +242,11 @@ class PathProviderApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [directory], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([directory]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/path_provider/path_provider_android/pubspec.yaml b/packages/path_provider/path_provider_android/pubspec.yaml index 2048cee2dbc..09d3a3f6406 100644 --- a/packages/path_provider/path_provider_android/pubspec.yaml +++ b/packages/path_provider/path_provider_android/pubspec.yaml @@ -2,7 +2,7 @@ name: path_provider_android description: Android implementation of the path_provider plugin. repository: https://github.com/flutter/packages/tree/main/packages/path_provider/path_provider_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_provider%22 -version: 2.2.20 +version: 2.2.21 environment: sdk: ^3.9.0 @@ -25,7 +25,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pigeon: ^22.4.2 + pigeon: ^26.1.0 test: ^1.16.0 topics: diff --git a/packages/path_provider/path_provider_foundation/darwin/path_provider_foundation/Sources/path_provider_foundation/messages.g.swift b/packages/path_provider/path_provider_foundation/darwin/path_provider_foundation/Sources/path_provider_foundation/messages.g.swift index 2230fe84aa0..3c045880dc6 100644 --- a/packages/path_provider/path_provider_foundation/darwin/path_provider_foundation/Sources/path_provider_foundation/messages.g.swift +++ b/packages/path_provider/path_provider_foundation/darwin/path_provider_foundation/Sources/path_provider_foundation/messages.g.swift @@ -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 (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation diff --git a/packages/path_provider/path_provider_foundation/lib/messages.g.dart b/packages/path_provider/path_provider_foundation/lib/messages.g.dart index 7771b6a44cc..fdda5545282 100644 --- a/packages/path_provider/path_provider_foundation/lib/messages.g.dart +++ b/packages/path_provider/path_provider_foundation/lib/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,20 +18,6 @@ PlatformException _createConnectionError(String channelName) { ); } -List wrapResponse({ - Object? result, - PlatformException? error, - bool empty = false, -}) { - if (empty) { - return []; - } - if (error == null) { - return [result]; - } - return [error.code, error.message, error.details]; -} - enum DirectoryType { applicationDocuments, applicationSupport, diff --git a/packages/path_provider/path_provider_foundation/pubspec.yaml b/packages/path_provider/path_provider_foundation/pubspec.yaml index 63238e589ed..5d1dd616d3b 100644 --- a/packages/path_provider/path_provider_foundation/pubspec.yaml +++ b/packages/path_provider/path_provider_foundation/pubspec.yaml @@ -30,7 +30,7 @@ dev_dependencies: flutter_test: sdk: flutter path: ^1.8.0 - pigeon: ^25.5.0 + pigeon: ^26.1.0 topics: - files diff --git a/packages/quick_actions/quick_actions_android/android/src/main/java/io/flutter/plugins/quickactions/Messages.java b/packages/quick_actions/quick_actions_android/android/src/main/java/io/flutter/plugins/quickactions/Messages.java index 74b5b763961..8b5af38eb85 100644 --- a/packages/quick_actions/quick_actions_android/android/src/main/java/io/flutter/plugins/quickactions/Messages.java +++ b/packages/quick_actions/quick_actions_android/android/src/main/java/io/flutter/plugins/quickactions/Messages.java @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v24.0.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon package io.flutter.plugins.quickactions; diff --git a/packages/quick_actions/quick_actions_android/lib/src/messages.g.dart b/packages/quick_actions/quick_actions_android/lib/src/messages.g.dart index 8f7a4d32b57..8e1d033ff27 100644 --- a/packages/quick_actions/quick_actions_android/lib/src/messages.g.dart +++ b/packages/quick_actions/quick_actions_android/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v24.0.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -32,6 +32,24 @@ List wrapResponse({ return [error.code, error.message, error.details]; } +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); + } + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); + } + return a == b; +} + /// Home screen quick-action shortcut item. class ShortcutItemMessage { ShortcutItemMessage({ @@ -49,10 +67,14 @@ class ShortcutItemMessage { /// Name of native resource to be displayed as the icon for this item. String? icon; - Object encode() { + List _toList() { return [type, localizedTitle, icon]; } + Object encode() { + return _toList(); + } + static ShortcutItemMessage decode(Object result) { result as List; return ShortcutItemMessage( @@ -61,6 +83,22 @@ class ShortcutItemMessage { icon: result[2] as String?, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! ShortcutItemMessage || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -116,8 +154,9 @@ class AndroidQuickActionsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -141,8 +180,11 @@ class AndroidQuickActionsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [itemsList], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([itemsList]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -166,8 +208,9 @@ class AndroidQuickActionsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/quick_actions/quick_actions_android/pubspec.yaml b/packages/quick_actions/quick_actions_android/pubspec.yaml index b648acf4a8d..bc3951d64de 100644 --- a/packages/quick_actions/quick_actions_android/pubspec.yaml +++ b/packages/quick_actions/quick_actions_android/pubspec.yaml @@ -25,7 +25,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pigeon: ^24.0.0 + pigeon: ^26.1.0 plugin_platform_interface: ^2.1.7 topics: diff --git a/packages/quick_actions/quick_actions_ios/ios/quick_actions_ios/Sources/quick_actions_ios/messages.g.swift b/packages/quick_actions/quick_actions_ios/ios/quick_actions_ios/Sources/quick_actions_ios/messages.g.swift index 39bb464424d..932da049f3f 100644 --- a/packages/quick_actions/quick_actions_ios/ios/quick_actions_ios/Sources/quick_actions_ios/messages.g.swift +++ b/packages/quick_actions/quick_actions_ios/ios/quick_actions_ios/Sources/quick_actions_ios/messages.g.swift @@ -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 (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation diff --git a/packages/quick_actions/quick_actions_ios/lib/messages.g.dart b/packages/quick_actions/quick_actions_ios/lib/messages.g.dart index 45fc4d63b96..f8767cfe6a8 100644 --- a/packages/quick_actions/quick_actions_ios/lib/messages.g.dart +++ b/packages/quick_actions/quick_actions_ios/lib/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers diff --git a/packages/quick_actions/quick_actions_ios/pubspec.yaml b/packages/quick_actions/quick_actions_ios/pubspec.yaml index afa5565df74..6fde2872ea9 100644 --- a/packages/quick_actions/quick_actions_ios/pubspec.yaml +++ b/packages/quick_actions/quick_actions_ios/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pigeon: ^25.5.0 + pigeon: ^26.1.0 plugin_platform_interface: ^2.1.7 topics: diff --git a/packages/shared_preferences/shared_preferences_android/android/src/main/java/io/flutter/plugins/sharedpreferences/Messages.java b/packages/shared_preferences/shared_preferences_android/android/src/main/java/io/flutter/plugins/sharedpreferences/Messages.java index e23bc9a1b55..446776d7167 100644 --- a/packages/shared_preferences/shared_preferences_android/android/src/main/java/io/flutter/plugins/sharedpreferences/Messages.java +++ b/packages/shared_preferences/shared_preferences_android/android/src/main/java/io/flutter/plugins/sharedpreferences/Messages.java @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v24.2.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon package io.flutter.plugins.sharedpreferences; diff --git a/packages/shared_preferences/shared_preferences_android/android/src/main/kotlin/io/flutter/plugins/sharedpreferences/MessagesAsync.g.kt b/packages/shared_preferences/shared_preferences_android/android/src/main/kotlin/io/flutter/plugins/sharedpreferences/MessagesAsync.g.kt index e609de97007..e16cebc8763 100644 --- a/packages/shared_preferences/shared_preferences_android/android/src/main/kotlin/io/flutter/plugins/sharedpreferences/MessagesAsync.g.kt +++ b/packages/shared_preferences/shared_preferences_android/android/src/main/kotlin/io/flutter/plugins/sharedpreferences/MessagesAsync.g.kt @@ -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 (v24.2.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @@ -15,18 +15,47 @@ import io.flutter.plugin.common.StandardMessageCodec import java.io.ByteArrayOutputStream import java.nio.ByteBuffer -private fun wrapResult(result: Any?): List { - return listOf(result) -} +private object MessagesAsyncPigeonUtils { + + fun wrapResult(result: Any?): List { + return listOf(result) + } -private fun wrapError(exception: Throwable): List { - return if (exception is SharedPreferencesError) { - listOf(exception.code, exception.message, exception.details) - } else { - listOf( - exception.javaClass.simpleName, - exception.toString(), - "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception)) + fun wrapError(exception: Throwable): List { + return if (exception is SharedPreferencesError) { + listOf(exception.code, exception.message, exception.details) + } else { + listOf( + exception.javaClass.simpleName, + exception.toString(), + "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception)) + } + } + + fun deepEquals(a: Any?, b: Any?): Boolean { + if (a is ByteArray && b is ByteArray) { + return a.contentEquals(b) + } + if (a is IntArray && b is IntArray) { + return a.contentEquals(b) + } + if (a is LongArray && b is LongArray) { + return a.contentEquals(b) + } + if (a is DoubleArray && b is DoubleArray) { + return a.contentEquals(b) + } + if (a is Array<*> && b is Array<*>) { + return a.size == b.size && a.indices.all { deepEquals(a[it], b[it]) } + } + if (a is List<*> && b is List<*>) { + return a.size == b.size && a.indices.all { deepEquals(a[it], b[it]) } + } + if (a is Map<*, *> && b is Map<*, *>) { + return a.size == b.size && + a.all { (b as Map).contains(it.key) && deepEquals(it.value, b[it.key]) } + } + return a == b } } @@ -75,6 +104,18 @@ data class SharedPreferencesPigeonOptions(val fileName: String? = null, val useD useDataStore, ) } + + override fun equals(other: Any?): Boolean { + if (other !is SharedPreferencesPigeonOptions) { + return false + } + if (this === other) { + return true + } + return MessagesAsyncPigeonUtils.deepEquals(toList(), other.toList()) + } + + override fun hashCode(): Int = toList().hashCode() } /** Generated class from Pigeon that represents data sent in messages. */ @@ -98,6 +139,18 @@ data class StringListResult( type, ) } + + override fun equals(other: Any?): Boolean { + if (other !is StringListResult) { + return false + } + if (this === other) { + return true + } + return MessagesAsyncPigeonUtils.deepEquals(toList(), other.toList()) + } + + override fun hashCode(): Int = toList().hashCode() } private open class MessagesAsyncPigeonCodec : StandardMessageCodec() { @@ -122,7 +175,7 @@ private open class MessagesAsyncPigeonCodec : StandardMessageCodec() { when (value) { is StringListLookupResultType -> { stream.write(129) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is SharedPreferencesPigeonOptions -> { stream.write(130) @@ -215,7 +268,7 @@ interface SharedPreferencesAsyncApi { api.setBool(keyArg, valueArg, optionsArg) listOf(null) } catch (exception: Throwable) { - wrapError(exception) + MessagesAsyncPigeonUtils.wrapError(exception) } reply.reply(wrapped) } @@ -241,7 +294,7 @@ interface SharedPreferencesAsyncApi { api.setString(keyArg, valueArg, optionsArg) listOf(null) } catch (exception: Throwable) { - wrapError(exception) + MessagesAsyncPigeonUtils.wrapError(exception) } reply.reply(wrapped) } @@ -267,7 +320,7 @@ interface SharedPreferencesAsyncApi { api.setInt(keyArg, valueArg, optionsArg) listOf(null) } catch (exception: Throwable) { - wrapError(exception) + MessagesAsyncPigeonUtils.wrapError(exception) } reply.reply(wrapped) } @@ -293,7 +346,7 @@ interface SharedPreferencesAsyncApi { api.setDouble(keyArg, valueArg, optionsArg) listOf(null) } catch (exception: Throwable) { - wrapError(exception) + MessagesAsyncPigeonUtils.wrapError(exception) } reply.reply(wrapped) } @@ -319,7 +372,7 @@ interface SharedPreferencesAsyncApi { api.setEncodedStringList(keyArg, valueArg, optionsArg) listOf(null) } catch (exception: Throwable) { - wrapError(exception) + MessagesAsyncPigeonUtils.wrapError(exception) } reply.reply(wrapped) } @@ -345,7 +398,7 @@ interface SharedPreferencesAsyncApi { api.setDeprecatedStringList(keyArg, valueArg, optionsArg) listOf(null) } catch (exception: Throwable) { - wrapError(exception) + MessagesAsyncPigeonUtils.wrapError(exception) } reply.reply(wrapped) } @@ -369,7 +422,7 @@ interface SharedPreferencesAsyncApi { try { listOf(api.getString(keyArg, optionsArg)) } catch (exception: Throwable) { - wrapError(exception) + MessagesAsyncPigeonUtils.wrapError(exception) } reply.reply(wrapped) } @@ -393,7 +446,7 @@ interface SharedPreferencesAsyncApi { try { listOf(api.getBool(keyArg, optionsArg)) } catch (exception: Throwable) { - wrapError(exception) + MessagesAsyncPigeonUtils.wrapError(exception) } reply.reply(wrapped) } @@ -417,7 +470,7 @@ interface SharedPreferencesAsyncApi { try { listOf(api.getDouble(keyArg, optionsArg)) } catch (exception: Throwable) { - wrapError(exception) + MessagesAsyncPigeonUtils.wrapError(exception) } reply.reply(wrapped) } @@ -441,7 +494,7 @@ interface SharedPreferencesAsyncApi { try { listOf(api.getInt(keyArg, optionsArg)) } catch (exception: Throwable) { - wrapError(exception) + MessagesAsyncPigeonUtils.wrapError(exception) } reply.reply(wrapped) } @@ -465,7 +518,7 @@ interface SharedPreferencesAsyncApi { try { listOf(api.getPlatformEncodedStringList(keyArg, optionsArg)) } catch (exception: Throwable) { - wrapError(exception) + MessagesAsyncPigeonUtils.wrapError(exception) } reply.reply(wrapped) } @@ -489,7 +542,7 @@ interface SharedPreferencesAsyncApi { try { listOf(api.getStringList(keyArg, optionsArg)) } catch (exception: Throwable) { - wrapError(exception) + MessagesAsyncPigeonUtils.wrapError(exception) } reply.reply(wrapped) } @@ -514,7 +567,7 @@ interface SharedPreferencesAsyncApi { api.clear(allowListArg, optionsArg) listOf(null) } catch (exception: Throwable) { - wrapError(exception) + MessagesAsyncPigeonUtils.wrapError(exception) } reply.reply(wrapped) } @@ -538,7 +591,7 @@ interface SharedPreferencesAsyncApi { try { listOf(api.getAll(allowListArg, optionsArg)) } catch (exception: Throwable) { - wrapError(exception) + MessagesAsyncPigeonUtils.wrapError(exception) } reply.reply(wrapped) } @@ -562,7 +615,7 @@ interface SharedPreferencesAsyncApi { try { listOf(api.getKeys(allowListArg, optionsArg)) } catch (exception: Throwable) { - wrapError(exception) + MessagesAsyncPigeonUtils.wrapError(exception) } reply.reply(wrapped) } diff --git a/packages/shared_preferences/shared_preferences_android/lib/src/messages.g.dart b/packages/shared_preferences/shared_preferences_android/lib/src/messages.g.dart index 124d8262749..49456e114ec 100644 --- a/packages/shared_preferences/shared_preferences_android/lib/src/messages.g.dart +++ b/packages/shared_preferences/shared_preferences_android/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v24.2.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -66,8 +66,11 @@ class SharedPreferencesApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -96,8 +99,11 @@ class SharedPreferencesApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, value], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, value]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -126,8 +132,11 @@ class SharedPreferencesApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, value], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, value]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -156,8 +165,11 @@ class SharedPreferencesApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, value], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, value]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -186,8 +198,11 @@ class SharedPreferencesApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, value], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, value]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -216,8 +231,11 @@ class SharedPreferencesApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, value], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, value]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -248,8 +266,11 @@ class SharedPreferencesApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, value], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, value]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -278,9 +299,11 @@ class SharedPreferencesApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [prefix, allowList], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([prefix, allowList]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -312,9 +335,11 @@ class SharedPreferencesApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [prefix, allowList], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([prefix, allowList]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/shared_preferences/shared_preferences_android/lib/src/messages_async.g.dart b/packages/shared_preferences/shared_preferences_android/lib/src/messages_async.g.dart index 21495f2643f..72cbe74b95d 100644 --- a/packages/shared_preferences/shared_preferences_android/lib/src/messages_async.g.dart +++ b/packages/shared_preferences/shared_preferences_android/lib/src/messages_async.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v24.2.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,6 +18,24 @@ PlatformException _createConnectionError(String channelName) { ); } +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); + } + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); + } + return a == b; +} + /// Possible types found during a getStringList call. enum StringListLookupResultType { /// A deprecated platform-side encoding string list. @@ -37,10 +55,14 @@ class SharedPreferencesPigeonOptions { bool useDataStore; - Object encode() { + List _toList() { return [fileName, useDataStore]; } + Object encode() { + return _toList(); + } + static SharedPreferencesPigeonOptions decode(Object result) { result as List; return SharedPreferencesPigeonOptions( @@ -48,6 +70,23 @@ class SharedPreferencesPigeonOptions { useDataStore: result[1]! as bool, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SharedPreferencesPigeonOptions || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class StringListResult { @@ -59,10 +98,14 @@ class StringListResult { /// The type of value found. StringListLookupResultType type; - Object encode() { + List _toList() { return [jsonEncodedValue, type]; } + Object encode() { + return _toList(); + } + static StringListResult decode(Object result) { result as List; return StringListResult( @@ -70,6 +113,22 @@ class StringListResult { type: result[1]! as StringListLookupResultType, ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! StringListResult || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -140,9 +199,11 @@ class SharedPreferencesAsyncApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, value, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, value, options]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -170,9 +231,11 @@ class SharedPreferencesAsyncApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, value, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, value, options]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -200,9 +263,11 @@ class SharedPreferencesAsyncApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, value, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, value, options]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -230,9 +295,11 @@ class SharedPreferencesAsyncApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, value, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, value, options]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -260,9 +327,11 @@ class SharedPreferencesAsyncApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, value, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, value, options]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -292,9 +361,11 @@ class SharedPreferencesAsyncApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, value, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, value, options]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -321,8 +392,11 @@ class SharedPreferencesAsyncApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, options]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -349,8 +423,11 @@ class SharedPreferencesAsyncApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, options]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -377,8 +454,11 @@ class SharedPreferencesAsyncApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, options]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -405,8 +485,11 @@ class SharedPreferencesAsyncApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, options]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -433,8 +516,11 @@ class SharedPreferencesAsyncApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, options]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -461,8 +547,11 @@ class SharedPreferencesAsyncApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, options]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -489,9 +578,11 @@ class SharedPreferencesAsyncApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [allowList, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([allowList, options]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -518,9 +609,11 @@ class SharedPreferencesAsyncApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [allowList, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([allowList, options]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -553,9 +646,11 @@ class SharedPreferencesAsyncApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [allowList, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([allowList, options]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/shared_preferences/shared_preferences_android/pubspec.yaml b/packages/shared_preferences/shared_preferences_android/pubspec.yaml index 1157c0dc647..2d7069e3c72 100644 --- a/packages/shared_preferences/shared_preferences_android/pubspec.yaml +++ b/packages/shared_preferences/shared_preferences_android/pubspec.yaml @@ -25,7 +25,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pigeon: ^24.2.0 + pigeon: ^26.1.0 topics: - persistence diff --git a/packages/shared_preferences/shared_preferences_foundation/darwin/shared_preferences_foundation/Sources/shared_preferences_foundation/messages.g.swift b/packages/shared_preferences/shared_preferences_foundation/darwin/shared_preferences_foundation/Sources/shared_preferences_foundation/messages.g.swift index fd651ca1157..33fc9fbeb30 100644 --- a/packages/shared_preferences/shared_preferences_foundation/darwin/shared_preferences_foundation/Sources/shared_preferences_foundation/messages.g.swift +++ b/packages/shared_preferences/shared_preferences_foundation/darwin/shared_preferences_foundation/Sources/shared_preferences_foundation/messages.g.swift @@ -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 (v22.4.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation @@ -18,9 +18,9 @@ import Foundation final class PigeonError: Error { let code: String let message: String? - let details: Any? + let details: Sendable? - init(code: String, message: String?, details: Any?) { + init(code: String, message: String?, details: Sendable?) { self.code = code self.message = message self.details = details @@ -67,8 +67,70 @@ private func nilOrValue(_ value: Any?) -> T? { return value as! T? } +func deepEqualsmessages(_ lhs: Any?, _ rhs: Any?) -> Bool { + let cleanLhs = nilOrValue(lhs) as Any? + let cleanRhs = nilOrValue(rhs) as Any? + switch (cleanLhs, cleanRhs) { + case (nil, nil): + return true + + case (nil, _), (_, nil): + return false + + case is (Void, Void): + return true + + case let (cleanLhsHashable, cleanRhsHashable) as (AnyHashable, AnyHashable): + return cleanLhsHashable == cleanRhsHashable + + case let (cleanLhsArray, cleanRhsArray) as ([Any?], [Any?]): + guard cleanLhsArray.count == cleanRhsArray.count else { return false } + for (index, element) in cleanLhsArray.enumerated() { + if !deepEqualsmessages(element, cleanRhsArray[index]) { + return false + } + } + return true + + case let (cleanLhsDictionary, cleanRhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]): + guard cleanLhsDictionary.count == cleanRhsDictionary.count else { return false } + for (key, cleanLhsValue) in cleanLhsDictionary { + guard cleanRhsDictionary.index(forKey: key) != nil else { return false } + if !deepEqualsmessages(cleanLhsValue, cleanRhsDictionary[key]!) { + return false + } + } + return true + + default: + // Any other type shouldn't be able to be used with pigeon. File an issue if you find this to be untrue. + return false + } +} + +func deepHashmessages(value: Any?, hasher: inout Hasher) { + if let valueList = value as? [AnyHashable] { + for item in valueList { deepHashmessages(value: item, hasher: &hasher) } + return + } + + if let valueDict = value as? [AnyHashable: AnyHashable] { + for key in valueDict.keys { + hasher.combine(key) + deepHashmessages(value: valueDict[key]!, hasher: &hasher) + } + return + } + + if let hashableValue = value as? AnyHashable { + hasher.combine(hashableValue.hashValue) + } + + return hasher.combine(String(describing: value)) +} + /// Generated class from Pigeon that represents data sent in messages. -struct SharedPreferencesPigeonOptions { +struct SharedPreferencesPigeonOptions: Hashable { var suiteName: String? = nil // swift-format-ignore: AlwaysUseLowerCamelCase @@ -84,6 +146,13 @@ struct SharedPreferencesPigeonOptions { suiteName ] } + static func == (lhs: SharedPreferencesPigeonOptions, rhs: SharedPreferencesPigeonOptions) -> Bool + { + return deepEqualsmessages(lhs.toList(), rhs.toList()) + } + func hash(into hasher: inout Hasher) { + deepHashmessages(value: toList(), hasher: &hasher) + } } private class MessagesPigeonCodecReader: FlutterStandardReader { diff --git a/packages/shared_preferences/shared_preferences_foundation/lib/src/messages.g.dart b/packages/shared_preferences/shared_preferences_foundation/lib/src/messages.g.dart index 418033f3172..2f2c9862060 100644 --- a/packages/shared_preferences/shared_preferences_foundation/lib/src/messages.g.dart +++ b/packages/shared_preferences/shared_preferences_foundation/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.4.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,18 +18,22 @@ PlatformException _createConnectionError(String channelName) { ); } -List wrapResponse({ - Object? result, - PlatformException? error, - bool empty = false, -}) { - if (empty) { - return []; +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); } - if (error == null) { - return [result]; + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); } - return [error.code, error.message, error.details]; + return a == b; } class SharedPreferencesPigeonOptions { @@ -37,14 +41,35 @@ class SharedPreferencesPigeonOptions { String? suiteName; - Object encode() { + List _toList() { return [suiteName]; } + Object encode() { + return _toList(); + } + static SharedPreferencesPigeonOptions decode(Object result) { result as List; return SharedPreferencesPigeonOptions(suiteName: result[0] as String?); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! SharedPreferencesPigeonOptions || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -99,8 +124,11 @@ class LegacyUserDefaultsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -123,8 +151,11 @@ class LegacyUserDefaultsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, value], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, value]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -147,8 +178,11 @@ class LegacyUserDefaultsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, value], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, value]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -171,8 +205,11 @@ class LegacyUserDefaultsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, value], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, value]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -198,9 +235,11 @@ class LegacyUserDefaultsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [prefix, allowList], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([prefix, allowList]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -229,9 +268,11 @@ class LegacyUserDefaultsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [prefix, allowList], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([prefix, allowList]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -282,9 +323,11 @@ class UserDefaultsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, value, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, value, options]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -311,9 +354,11 @@ class UserDefaultsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [allowList, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([allowList, options]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -340,9 +385,11 @@ class UserDefaultsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [allowList, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([allowList, options]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -375,8 +422,11 @@ class UserDefaultsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [key, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([key, options]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -403,9 +453,11 @@ class UserDefaultsApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [allowList, options], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([allowList, options]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/shared_preferences/shared_preferences_foundation/pubspec.yaml b/packages/shared_preferences/shared_preferences_foundation/pubspec.yaml index ac6998fffbe..5383935d3f4 100644 --- a/packages/shared_preferences/shared_preferences_foundation/pubspec.yaml +++ b/packages/shared_preferences/shared_preferences_foundation/pubspec.yaml @@ -29,7 +29,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pigeon: ^22.4.1 + pigeon: ^26.1.0 topics: - persistence diff --git a/packages/url_launcher/url_launcher_android/CHANGELOG.md b/packages/url_launcher/url_launcher_android/CHANGELOG.md index da6954227a1..66a4651835c 100644 --- a/packages/url_launcher/url_launcher_android/CHANGELOG.md +++ b/packages/url_launcher/url_launcher_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 6.3.25 + +* Updates Pigeon to ^26.1.0. + ## 6.3.24 * Resolves Gradle 9 deprecations. diff --git a/packages/url_launcher/url_launcher_android/android/src/main/java/io/flutter/plugins/urllauncher/Messages.java b/packages/url_launcher/url_launcher_android/android/src/main/java/io/flutter/plugins/urllauncher/Messages.java index bace8d2b107..be9d4c58a66 100644 --- a/packages/url_launcher/url_launcher_android/android/src/main/java/io/flutter/plugins/urllauncher/Messages.java +++ b/packages/url_launcher/url_launcher_android/android/src/main/java/io/flutter/plugins/urllauncher/Messages.java @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon package io.flutter.plugins.urllauncher; diff --git a/packages/url_launcher/url_launcher_android/lib/src/messages.g.dart b/packages/url_launcher/url_launcher_android/lib/src/messages.g.dart index 23453ffe15a..049813a9470 100644 --- a/packages/url_launcher/url_launcher_android/lib/src/messages.g.dart +++ b/packages/url_launcher/url_launcher_android/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.7.4), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -18,6 +18,24 @@ PlatformException _createConnectionError(String channelName) { ); } +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed.every( + ((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]), + ); + } + if (a is Map && b is Map) { + return a.length == b.length && + a.entries.every( + (MapEntry entry) => + (b as Map).containsKey(entry.key) && + _deepEquals(entry.value, b[entry.key]), + ); + } + return a == b; +} + /// Configuration options for an in-app WebView. class WebViewOptions { WebViewOptions({ @@ -32,10 +50,14 @@ class WebViewOptions { Map headers; - Object encode() { + List _toList() { return [enableJavaScript, enableDomStorage, headers]; } + Object encode() { + return _toList(); + } + static WebViewOptions decode(Object result) { result as List; return WebViewOptions( @@ -44,6 +66,22 @@ class WebViewOptions { headers: (result[2] as Map?)!.cast(), ); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! WebViewOptions || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } /// Configuration options for in-app browser views. @@ -53,14 +91,34 @@ class BrowserOptions { /// Whether or not to show the webpage title. bool showTitle; - Object encode() { + List _toList() { return [showTitle]; } + Object encode() { + return _toList(); + } + static BrowserOptions decode(Object result) { result as List; return BrowserOptions(showTitle: result[0]! as bool); } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! BrowserOptions || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(encode(), other.encode()); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); } class _PigeonCodec extends StandardMessageCodec { @@ -121,8 +179,11 @@ class UrlLauncherApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [url], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([url]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -155,9 +216,11 @@ class UrlLauncherApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [url, headers, requireNonBrowser], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([url, headers, requireNonBrowser]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -192,14 +255,11 @@ class UrlLauncherApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [url, allowCustomTab, webViewOptions, browserOptions], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([ - url, - allowCustomTab, - webViewOptions, - browserOptions, - ]) - as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -227,8 +287,9 @@ class UrlLauncherApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -257,8 +318,9 @@ class UrlLauncherApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = - await pigeonVar_channel.send(null) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/url_launcher/url_launcher_android/pubspec.yaml b/packages/url_launcher/url_launcher_android/pubspec.yaml index 27f96758f66..fe967a2190d 100644 --- a/packages/url_launcher/url_launcher_android/pubspec.yaml +++ b/packages/url_launcher/url_launcher_android/pubspec.yaml @@ -2,7 +2,7 @@ name: url_launcher_android description: Android implementation of the url_launcher plugin. repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22 -version: 6.3.24 +version: 6.3.25 environment: sdk: ^3.9.0 @@ -26,7 +26,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^22.4.1 + pigeon: ^26.1.0 plugin_platform_interface: ^2.1.7 test: ^1.16.3 diff --git a/packages/url_launcher/url_launcher_ios/CHANGELOG.md b/packages/url_launcher/url_launcher_ios/CHANGELOG.md index 04c809489d3..43f3ab5d948 100644 --- a/packages/url_launcher/url_launcher_ios/CHANGELOG.md +++ b/packages/url_launcher/url_launcher_ios/CHANGELOG.md @@ -1,3 +1,7 @@ +## 6.3.6 + +* Updates Pigeon to ^26.1.0. + ## 6.3.5 * Updates minimum supported version to iOS 13. diff --git a/packages/url_launcher/url_launcher_ios/ios/url_launcher_ios/Sources/url_launcher_ios/messages.g.swift b/packages/url_launcher/url_launcher_ios/ios/url_launcher_ios/Sources/url_launcher_ios/messages.g.swift index 4be6e91cede..eac7d5ed4dc 100644 --- a/packages/url_launcher/url_launcher_ios/ios/url_launcher_ios/Sources/url_launcher_ios/messages.g.swift +++ b/packages/url_launcher/url_launcher_ios/ios/url_launcher_ios/Sources/url_launcher_ios/messages.g.swift @@ -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 (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation diff --git a/packages/url_launcher/url_launcher_ios/lib/src/messages.g.dart b/packages/url_launcher/url_launcher_ios/lib/src/messages.g.dart index b2e596c0bcd..995de93e56e 100644 --- a/packages/url_launcher/url_launcher_ios/lib/src/messages.g.dart +++ b/packages/url_launcher/url_launcher_ios/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers diff --git a/packages/url_launcher/url_launcher_ios/pubspec.yaml b/packages/url_launcher/url_launcher_ios/pubspec.yaml index b1a4bf0592b..d2db4081994 100644 --- a/packages/url_launcher/url_launcher_ios/pubspec.yaml +++ b/packages/url_launcher/url_launcher_ios/pubspec.yaml @@ -2,7 +2,7 @@ name: url_launcher_ios description: iOS implementation of the url_launcher plugin. repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher_ios issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22 -version: 6.3.5 +version: 6.3.6 environment: sdk: ^3.9.0 @@ -26,7 +26,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^25.5.0 + pigeon: ^26.1.0 plugin_platform_interface: ^2.1.7 test: ^1.16.3 diff --git a/packages/url_launcher/url_launcher_linux/CHANGELOG.md b/packages/url_launcher/url_launcher_linux/CHANGELOG.md index 3c1e0e55e10..334612d5072 100644 --- a/packages/url_launcher/url_launcher_linux/CHANGELOG.md +++ b/packages/url_launcher/url_launcher_linux/CHANGELOG.md @@ -1,6 +1,7 @@ -## NEXT +## 3.2.2 * Updates minimum supported SDK version to Flutter 3.32/Dart 3.8. +* Updates Pigeon to ^26.1.0. ## 3.2.1 diff --git a/packages/url_launcher/url_launcher_linux/lib/src/messages.g.dart b/packages/url_launcher/url_launcher_linux/lib/src/messages.g.dart index 0a254a59feb..6187ef54deb 100644 --- a/packages/url_launcher/url_launcher_linux/lib/src/messages.g.dart +++ b/packages/url_launcher/url_launcher_linux/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v22.6.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -66,8 +66,11 @@ class UrlLauncherApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [url], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([url]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -96,8 +99,11 @@ class UrlLauncherApi { pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [url], + ); final List? pigeonVar_replyList = - await pigeonVar_channel.send([url]) as List?; + await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/packages/url_launcher/url_launcher_linux/linux/messages.g.cc b/packages/url_launcher/url_launcher_linux/linux/messages.g.cc index 9be6137cb4d..f91c6cf9fa2 100644 --- a/packages/url_launcher/url_launcher_linux/linux/messages.g.cc +++ b/packages/url_launcher/url_launcher_linux/linux/messages.g.cc @@ -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 (v22.6.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #include "messages.g.h" diff --git a/packages/url_launcher/url_launcher_linux/linux/messages.g.h b/packages/url_launcher/url_launcher_linux/linux/messages.g.h index b64521e6dfd..52a981c7e0d 100644 --- a/packages/url_launcher/url_launcher_linux/linux/messages.g.h +++ b/packages/url_launcher/url_launcher_linux/linux/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 (v22.6.1), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #ifndef PIGEON_MESSAGES_G_H_ diff --git a/packages/url_launcher/url_launcher_linux/pubspec.yaml b/packages/url_launcher/url_launcher_linux/pubspec.yaml index 4430f8c64d0..5f17be53464 100644 --- a/packages/url_launcher/url_launcher_linux/pubspec.yaml +++ b/packages/url_launcher/url_launcher_linux/pubspec.yaml @@ -2,7 +2,7 @@ name: url_launcher_linux description: Linux implementation of the url_launcher plugin. repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher_linux issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22 -version: 3.2.1 +version: 3.2.2 environment: sdk: ^3.8.0 @@ -24,7 +24,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pigeon: ^22.6.1 + pigeon: ^26.1.0 test: ^1.16.3 topics: diff --git a/packages/url_launcher/url_launcher_macos/CHANGELOG.md b/packages/url_launcher/url_launcher_macos/CHANGELOG.md index c3f95a427ed..4b76a488f41 100644 --- a/packages/url_launcher/url_launcher_macos/CHANGELOG.md +++ b/packages/url_launcher/url_launcher_macos/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.2.5 + +* Updates Pigeon to ^26.1.0. + ## 3.2.4 * Updates minimum supported version to macOS 10.15. diff --git a/packages/url_launcher/url_launcher_macos/lib/src/messages.g.dart b/packages/url_launcher/url_launcher_macos/lib/src/messages.g.dart index ad5944b2947..8c3a2fdbd42 100644 --- a/packages/url_launcher/url_launcher_macos/lib/src/messages.g.dart +++ b/packages/url_launcher/url_launcher_macos/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers diff --git a/packages/url_launcher/url_launcher_macos/macos/url_launcher_macos/Sources/url_launcher_macos/messages.g.swift b/packages/url_launcher/url_launcher_macos/macos/url_launcher_macos/Sources/url_launcher_macos/messages.g.swift index cb5f3abb0da..1dfdbab0dd4 100644 --- a/packages/url_launcher/url_launcher_macos/macos/url_launcher_macos/Sources/url_launcher_macos/messages.g.swift +++ b/packages/url_launcher/url_launcher_macos/macos/url_launcher_macos/Sources/url_launcher_macos/messages.g.swift @@ -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 (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation diff --git a/packages/url_launcher/url_launcher_macos/pubspec.yaml b/packages/url_launcher/url_launcher_macos/pubspec.yaml index 4297f2685b7..c6d66f97cf8 100644 --- a/packages/url_launcher/url_launcher_macos/pubspec.yaml +++ b/packages/url_launcher/url_launcher_macos/pubspec.yaml @@ -2,7 +2,7 @@ name: url_launcher_macos description: macOS implementation of the url_launcher plugin. repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher_macos issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22 -version: 3.2.4 +version: 3.2.5 environment: sdk: ^3.9.0 @@ -25,7 +25,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pigeon: ^25.5.0 + pigeon: ^26.1.0 test: ^1.16.3 topics: diff --git a/packages/url_launcher/url_launcher_windows/lib/src/messages.g.dart b/packages/url_launcher/url_launcher_windows/lib/src/messages.g.dart index 8f24cc48c7d..59366e2f068 100644 --- a/packages/url_launcher/url_launcher_windows/lib/src/messages.g.dart +++ b/packages/url_launcher/url_launcher_windows/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v21.0.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -20,6 +20,23 @@ PlatformException _createConnectionError(String channelName) { class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); + @override + void writeValue(WriteBuffer buffer, Object? value) { + if (value is int) { + buffer.putUint8(4); + buffer.putInt64(value); + } else { + super.writeValue(buffer, value); + } + } + + @override + Object? readValueOfType(int type, ReadBuffer buffer) { + switch (type) { + default: + return super.readValueOfType(type, buffer); + } + } } class UrlLauncherApi { @@ -29,71 +46,77 @@ class UrlLauncherApi { UrlLauncherApi({ BinaryMessenger? binaryMessenger, String messageChannelSuffix = '', - }) : __pigeon_binaryMessenger = binaryMessenger, - __pigeon_messageChannelSuffix = messageChannelSuffix.isNotEmpty + }) : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; - final BinaryMessenger? __pigeon_binaryMessenger; + final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - final String __pigeon_messageChannelSuffix; + final String pigeonVar_messageChannelSuffix; Future canLaunchUrl(String url) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.url_launcher_windows.UrlLauncherApi.canLaunchUrl$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = + final String pigeonVar_channelName = + 'dev.flutter.pigeon.url_launcher_windows.UrlLauncherApi.canLaunchUrl$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - __pigeon_channelName, + pigeonVar_channelName, pigeonChannelCodec, - binaryMessenger: __pigeon_binaryMessenger, + binaryMessenger: pigeonVar_binaryMessenger, ); - final List? __pigeon_replyList = - await __pigeon_channel.send([url]) as List?; - if (__pigeon_replyList == null) { - throw _createConnectionError(__pigeon_channelName); - } else if (__pigeon_replyList.length > 1) { + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [url], + ); + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { throw PlatformException( - code: __pigeon_replyList[0]! as String, - message: __pigeon_replyList[1] as String?, - details: __pigeon_replyList[2], + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], ); - } else if (__pigeon_replyList[0] == null) { + } else if (pigeonVar_replyList[0] == null) { throw PlatformException( code: 'null-error', message: 'Host platform returned null value for non-null return value.', ); } else { - return (__pigeon_replyList[0] as bool?)!; + return (pigeonVar_replyList[0] as bool?)!; } } Future launchUrl(String url) async { - final String __pigeon_channelName = - 'dev.flutter.pigeon.url_launcher_windows.UrlLauncherApi.launchUrl$__pigeon_messageChannelSuffix'; - final BasicMessageChannel __pigeon_channel = + final String pigeonVar_channelName = + 'dev.flutter.pigeon.url_launcher_windows.UrlLauncherApi.launchUrl$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( - __pigeon_channelName, + pigeonVar_channelName, pigeonChannelCodec, - binaryMessenger: __pigeon_binaryMessenger, + binaryMessenger: pigeonVar_binaryMessenger, ); - final List? __pigeon_replyList = - await __pigeon_channel.send([url]) as List?; - if (__pigeon_replyList == null) { - throw _createConnectionError(__pigeon_channelName); - } else if (__pigeon_replyList.length > 1) { + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [url], + ); + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { throw PlatformException( - code: __pigeon_replyList[0]! as String, - message: __pigeon_replyList[1] as String?, - details: __pigeon_replyList[2], + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], ); - } else if (__pigeon_replyList[0] == null) { + } else if (pigeonVar_replyList[0] == null) { throw PlatformException( code: 'null-error', message: 'Host platform returned null value for non-null return value.', ); } else { - return (__pigeon_replyList[0] as bool?)!; + return (pigeonVar_replyList[0] as bool?)!; } } } diff --git a/packages/url_launcher/url_launcher_windows/pubspec.yaml b/packages/url_launcher/url_launcher_windows/pubspec.yaml index c06c6a2f327..759b7931ccd 100644 --- a/packages/url_launcher/url_launcher_windows/pubspec.yaml +++ b/packages/url_launcher/url_launcher_windows/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pigeon: ^21.0.0 + pigeon: ^26.1.0 test: ^1.16.3 topics: diff --git a/packages/url_launcher/url_launcher_windows/test/url_launcher_windows_test.dart b/packages/url_launcher/url_launcher_windows/test/url_launcher_windows_test.dart index 18d3b7a8526..aeeb8aa5223 100644 --- a/packages/url_launcher/url_launcher_windows/test/url_launcher_windows_test.dart +++ b/packages/url_launcher/url_launcher_windows/test/url_launcher_windows_test.dart @@ -176,4 +176,12 @@ class _FakeUrlLauncherApi implements UrlLauncherApi { } return canLaunch; } + + @override + // ignore: non_constant_identifier_names + BinaryMessenger? get pigeonVar_binaryMessenger => throw UnimplementedError(); + + @override + // ignore: non_constant_identifier_names + String get pigeonVar_messageChannelSuffix => throw UnimplementedError(); } diff --git a/packages/url_launcher/url_launcher_windows/windows/messages.g.cpp b/packages/url_launcher/url_launcher_windows/windows/messages.g.cpp index 9a90eb01e71..16714f132a2 100644 --- a/packages/url_launcher/url_launcher_windows/windows/messages.g.cpp +++ b/packages/url_launcher/url_launcher_windows/windows/messages.g.cpp @@ -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 (v21.0.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #undef _HAS_EXCEPTIONS @@ -31,14 +31,14 @@ FlutterError CreateConnectionError(const std::string channel_name) { EncodableValue("")); } -PigeonCodecSerializer::PigeonCodecSerializer() {} +PigeonInternalCodecSerializer::PigeonInternalCodecSerializer() {} -EncodableValue PigeonCodecSerializer::ReadValueOfType( +EncodableValue PigeonInternalCodecSerializer::ReadValueOfType( uint8_t type, flutter::ByteStreamReader* stream) const { return flutter::StandardCodecSerializer::ReadValueOfType(type, stream); } -void PigeonCodecSerializer::WriteValue( +void PigeonInternalCodecSerializer::WriteValue( const EncodableValue& value, flutter::ByteStreamWriter* stream) const { flutter::StandardCodecSerializer::WriteValue(value, stream); } @@ -46,7 +46,7 @@ void PigeonCodecSerializer::WriteValue( /// The codec used by UrlLauncherApi. const flutter::StandardMessageCodec& UrlLauncherApi::GetCodec() { return flutter::StandardMessageCodec::GetInstance( - &PigeonCodecSerializer::GetInstance()); + &PigeonInternalCodecSerializer::GetInstance()); } // Sets up an instance of `UrlLauncherApi` to handle messages through the diff --git a/packages/url_launcher/url_launcher_windows/windows/messages.g.h b/packages/url_launcher/url_launcher_windows/windows/messages.g.h index afb37822cc5..37cb73c2c5e 100644 --- a/packages/url_launcher/url_launcher_windows/windows/messages.g.h +++ b/packages/url_launcher/url_launcher_windows/windows/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 (v21.0.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #ifndef PIGEON_MESSAGES_G_H_ @@ -58,11 +58,11 @@ class ErrorOr { std::variant v_; }; -class PigeonCodecSerializer : public flutter::StandardCodecSerializer { +class PigeonInternalCodecSerializer : public flutter::StandardCodecSerializer { public: - PigeonCodecSerializer(); - inline static PigeonCodecSerializer& GetInstance() { - static PigeonCodecSerializer sInstance; + PigeonInternalCodecSerializer(); + inline static PigeonInternalCodecSerializer& GetInstance() { + static PigeonInternalCodecSerializer sInstance; return sInstance; } diff --git a/packages/video_player/video_player_android/android/src/main/kotlin/io/flutter/plugins/videoplayer/Messages.kt b/packages/video_player/video_player_android/android/src/main/kotlin/io/flutter/plugins/videoplayer/Messages.kt index 800026ab4d8..052cbf5232e 100644 --- a/packages/video_player/video_player_android/android/src/main/kotlin/io/flutter/plugins/videoplayer/Messages.kt +++ b/packages/video_player/video_player_android/android/src/main/kotlin/io/flutter/plugins/videoplayer/Messages.kt @@ -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.0.2), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @@ -363,11 +363,11 @@ private open class MessagesPigeonCodec : StandardMessageCodec() { when (value) { is PlatformVideoFormat -> { stream.write(129) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is PlatformPlaybackState -> { stream.write(130) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is InitializationEvent -> { stream.write(131) diff --git a/packages/video_player/video_player_android/lib/src/messages.g.dart b/packages/video_player/video_player_android/lib/src/messages.g.dart index 5674729aeb1..3339059181f 100644 --- a/packages/video_player/video_player_android/lib/src/messages.g.dart +++ b/packages/video_player/video_player_android/lib/src/messages.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v26.0.2), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers diff --git a/packages/video_player/video_player_android/pubspec.yaml b/packages/video_player/video_player_android/pubspec.yaml index 3b07a78b898..00866413e21 100644 --- a/packages/video_player/video_player_android/pubspec.yaml +++ b/packages/video_player/video_player_android/pubspec.yaml @@ -27,7 +27,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^26.0.2 + pigeon: ^26.1.0 topics: - video diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/messages.g.h b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/messages.g.h index becb97700e9..d06c3fd0179 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/messages.g.h +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/include/video_player_avfoundation/messages.g.h @@ -1,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 (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #import diff --git a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/messages.g.m b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/messages.g.m index 5caf390b96a..155ac2bacad 100644 --- a/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/messages.g.m +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/messages.g.m @@ -1,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 (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "./include/video_player_avfoundation/messages.g.h" diff --git a/packages/video_player/video_player_avfoundation/lib/src/messages.g.dart b/packages/video_player/video_player_avfoundation/lib/src/messages.g.dart index 82958bf9ece..9072c153f95 100644 --- a/packages/video_player/video_player_avfoundation/lib/src/messages.g.dart +++ b/packages/video_player/video_player_avfoundation/lib/src/messages.g.dart @@ -1,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 (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers diff --git a/packages/video_player/video_player_avfoundation/pubspec.yaml b/packages/video_player/video_player_avfoundation/pubspec.yaml index 8bf5ab83e2a..85a988669a6 100644 --- a/packages/video_player/video_player_avfoundation/pubspec.yaml +++ b/packages/video_player/video_player_avfoundation/pubspec.yaml @@ -31,7 +31,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^25.5.0 + pigeon: ^26.1.0 topics: - video diff --git a/packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/AndroidWebkitLibrary.g.kt b/packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/AndroidWebkitLibrary.g.kt index be39e1a1e68..dcfc795319f 100644 --- a/packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/AndroidWebkitLibrary.g.kt +++ b/packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/AndroidWebkitLibrary.g.kt @@ -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 (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @@ -74,11 +74,39 @@ class AndroidWebkitLibraryPigeonInstanceManager( fun onFinalize(identifier: Long) } - private val identifiers = java.util.WeakHashMap() - private val weakInstances = HashMap>() + // Extends WeakReference and overrides the `equals` and `hashCode` methods using identity rather + // than equality. + // + // Two `IdentityWeakReference`s are equal if either + // 1: `get()` returns the identical nonnull value for both references. + // 2: `get()` returns null for both references and the references are identical. + class IdentityWeakReference : java.lang.ref.WeakReference { + private val savedHashCode: Int + + constructor(instance: T) : this(instance, null) + + constructor(instance: T, queue: java.lang.ref.ReferenceQueue?) : super(instance, queue) { + savedHashCode = System.identityHashCode(instance) + } + + override fun equals(other: Any?): Boolean { + val instance = get() + if (instance != null) { + return other is IdentityWeakReference<*> && other.get() === instance + } + return other === this + } + + override fun hashCode(): Int { + return savedHashCode + } + } + + private val identifiers = java.util.WeakHashMap, Long>() + private val weakInstances = HashMap>() private val strongInstances = HashMap() private val referenceQueue = java.lang.ref.ReferenceQueue() - private val weakReferencesToIdentifiers = HashMap, Long>() + private val weakReferencesToIdentifiers = HashMap, Long>() private val handler = android.os.Handler(android.os.Looper.getMainLooper()) private val releaseAllFinalizedInstancesRunnable = Runnable { this.releaseAllFinalizedInstances() @@ -127,10 +155,6 @@ class AndroidWebkitLibraryPigeonInstanceManager( */ fun remove(identifier: Long): T? { logWarningIfFinalizationListenerHasStopped() - val instance: Any? = getInstance(identifier) - if (instance is WebViewProxyApi.WebViewPlatformView) { - instance.destroy() - } return strongInstances.remove(identifier) as T? } @@ -147,9 +171,12 @@ class AndroidWebkitLibraryPigeonInstanceManager( */ fun getIdentifierForStrongReference(instance: Any?): Long? { logWarningIfFinalizationListenerHasStopped() - val identifier = identifiers[instance] + if (instance == null) { + return null + } + val identifier = identifiers[IdentityWeakReference(instance)] if (identifier != null) { - strongInstances[identifier] = instance!! + strongInstances[identifier] = instance } return identifier } @@ -188,14 +215,14 @@ class AndroidWebkitLibraryPigeonInstanceManager( /** Retrieves the instance associated with identifier, if present, otherwise `null`. */ fun getInstance(identifier: Long): T? { logWarningIfFinalizationListenerHasStopped() - val instance = weakInstances[identifier] as java.lang.ref.WeakReference? + val instance = weakInstances[identifier] as IdentityWeakReference? return instance?.get() } /** Returns whether this manager contains the given `instance`. */ fun containsInstance(instance: Any?): Boolean { logWarningIfFinalizationListenerHasStopped() - return identifiers.containsKey(instance) + return instance != null && identifiers.containsKey(IdentityWeakReference(instance)) } /** @@ -236,9 +263,8 @@ class AndroidWebkitLibraryPigeonInstanceManager( if (hasFinalizationListenerStopped()) { return } - var reference: java.lang.ref.WeakReference? - while ((referenceQueue.poll() as java.lang.ref.WeakReference?).also { reference = it } != - null) { + var reference: IdentityWeakReference? + while ((referenceQueue.poll() as IdentityWeakReference?).also { reference = it } != null) { val identifier = weakReferencesToIdentifiers.remove(reference) if (identifier != null) { weakInstances.remove(identifier) @@ -254,8 +280,8 @@ class AndroidWebkitLibraryPigeonInstanceManager( require(!weakInstances.containsKey(identifier)) { "Identifier has already been added: $identifier" } - val weakReference = java.lang.ref.WeakReference(instance, referenceQueue) - identifiers[instance] = identifier + val weakReference = IdentityWeakReference(instance, referenceQueue) + identifiers[weakReference] = identifier weakInstances[identifier] = weakReference weakReferencesToIdentifiers[weakReference] = identifier strongInstances[identifier] = instance @@ -683,71 +709,205 @@ private class AndroidWebkitLibraryPigeonProxyApiBaseCodec( return } + fun logNewInstanceFailure(apiName: String, value: Any, exception: Throwable?) { + Log.w( + "PigeonProxyApiBaseCodec", + "Failed to create new Dart proxy instance of $apiName: $value. $exception") + } + if (value is android.webkit.WebResourceRequest) { - registrar.getPigeonApiWebResourceRequest().pigeon_newInstance(value) {} + registrar.getPigeonApiWebResourceRequest().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("WebResourceRequest", value, it.exceptionOrNull()) + } + } } else if (value is android.webkit.WebResourceResponse) { - registrar.getPigeonApiWebResourceResponse().pigeon_newInstance(value) {} + registrar.getPigeonApiWebResourceResponse().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("WebResourceResponse", value, it.exceptionOrNull()) + } + } } else if (value is android.webkit.WebResourceError) { - registrar.getPigeonApiWebResourceError().pigeon_newInstance(value) {} + registrar.getPigeonApiWebResourceError().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("WebResourceError", value, it.exceptionOrNull()) + } + } } else if (value is androidx.webkit.WebResourceErrorCompat) { - registrar.getPigeonApiWebResourceErrorCompat().pigeon_newInstance(value) {} + registrar.getPigeonApiWebResourceErrorCompat().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("WebResourceErrorCompat", value, it.exceptionOrNull()) + } + } } else if (value is WebViewPoint) { - registrar.getPigeonApiWebViewPoint().pigeon_newInstance(value) {} + registrar.getPigeonApiWebViewPoint().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("WebViewPoint", value, it.exceptionOrNull()) + } + } } else if (value is android.webkit.ConsoleMessage) { - registrar.getPigeonApiConsoleMessage().pigeon_newInstance(value) {} + registrar.getPigeonApiConsoleMessage().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("ConsoleMessage", value, it.exceptionOrNull()) + } + } } else if (value is android.webkit.CookieManager) { - registrar.getPigeonApiCookieManager().pigeon_newInstance(value) {} + registrar.getPigeonApiCookieManager().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("CookieManager", value, it.exceptionOrNull()) + } + } } else if (value is android.webkit.WebView) { - registrar.getPigeonApiWebView().pigeon_newInstance(value) {} + registrar.getPigeonApiWebView().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("WebView", value, it.exceptionOrNull()) + } + } } else if (value is android.webkit.WebSettings) { - registrar.getPigeonApiWebSettings().pigeon_newInstance(value) {} + registrar.getPigeonApiWebSettings().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("WebSettings", value, it.exceptionOrNull()) + } + } } else if (value is JavaScriptChannel) { - registrar.getPigeonApiJavaScriptChannel().pigeon_newInstance(value) {} + registrar.getPigeonApiJavaScriptChannel().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("JavaScriptChannel", value, it.exceptionOrNull()) + } + } } else if (value is android.webkit.WebViewClient) { - registrar.getPigeonApiWebViewClient().pigeon_newInstance(value) {} + registrar.getPigeonApiWebViewClient().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("WebViewClient", value, it.exceptionOrNull()) + } + } } else if (value is android.webkit.DownloadListener) { - registrar.getPigeonApiDownloadListener().pigeon_newInstance(value) {} + registrar.getPigeonApiDownloadListener().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("DownloadListener", value, it.exceptionOrNull()) + } + } } else if (value is io.flutter.plugins.webviewflutter.WebChromeClientProxyApi.WebChromeClientImpl) { - registrar.getPigeonApiWebChromeClient().pigeon_newInstance(value) {} + registrar.getPigeonApiWebChromeClient().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("WebChromeClient", value, it.exceptionOrNull()) + } + } } else if (value is io.flutter.plugins.webviewflutter.FlutterAssetManager) { - registrar.getPigeonApiFlutterAssetManager().pigeon_newInstance(value) {} + registrar.getPigeonApiFlutterAssetManager().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("FlutterAssetManager", value, it.exceptionOrNull()) + } + } } else if (value is android.webkit.WebStorage) { - registrar.getPigeonApiWebStorage().pigeon_newInstance(value) {} + registrar.getPigeonApiWebStorage().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("WebStorage", value, it.exceptionOrNull()) + } + } } else if (value is android.webkit.WebChromeClient.FileChooserParams) { - registrar.getPigeonApiFileChooserParams().pigeon_newInstance(value) {} + registrar.getPigeonApiFileChooserParams().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("FileChooserParams", value, it.exceptionOrNull()) + } + } } else if (value is android.webkit.PermissionRequest) { - registrar.getPigeonApiPermissionRequest().pigeon_newInstance(value) {} + registrar.getPigeonApiPermissionRequest().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("PermissionRequest", value, it.exceptionOrNull()) + } + } } else if (value is android.webkit.WebChromeClient.CustomViewCallback) { - registrar.getPigeonApiCustomViewCallback().pigeon_newInstance(value) {} + registrar.getPigeonApiCustomViewCallback().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("CustomViewCallback", value, it.exceptionOrNull()) + } + } } else if (value is android.view.View) { - registrar.getPigeonApiView().pigeon_newInstance(value) {} + registrar.getPigeonApiView().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("View", value, it.exceptionOrNull()) + } + } } else if (value is android.webkit.GeolocationPermissions.Callback) { - registrar.getPigeonApiGeolocationPermissionsCallback().pigeon_newInstance(value) {} + registrar.getPigeonApiGeolocationPermissionsCallback().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("GeolocationPermissionsCallback", value, it.exceptionOrNull()) + } + } } else if (value is android.webkit.HttpAuthHandler) { - registrar.getPigeonApiHttpAuthHandler().pigeon_newInstance(value) {} + registrar.getPigeonApiHttpAuthHandler().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("HttpAuthHandler", value, it.exceptionOrNull()) + } + } } else if (value is android.os.Message) { - registrar.getPigeonApiAndroidMessage().pigeon_newInstance(value) {} + registrar.getPigeonApiAndroidMessage().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("AndroidMessage", value, it.exceptionOrNull()) + } + } } else if (value is android.webkit.ClientCertRequest) { - registrar.getPigeonApiClientCertRequest().pigeon_newInstance(value) {} + registrar.getPigeonApiClientCertRequest().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("ClientCertRequest", value, it.exceptionOrNull()) + } + } } else if (value is java.security.PrivateKey) { - registrar.getPigeonApiPrivateKey().pigeon_newInstance(value) {} + registrar.getPigeonApiPrivateKey().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("PrivateKey", value, it.exceptionOrNull()) + } + } } else if (value is java.security.cert.X509Certificate) { - registrar.getPigeonApiX509Certificate().pigeon_newInstance(value) {} + registrar.getPigeonApiX509Certificate().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("X509Certificate", value, it.exceptionOrNull()) + } + } } else if (value is android.webkit.SslErrorHandler) { - registrar.getPigeonApiSslErrorHandler().pigeon_newInstance(value) {} + registrar.getPigeonApiSslErrorHandler().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("SslErrorHandler", value, it.exceptionOrNull()) + } + } } else if (value is android.net.http.SslError) { - registrar.getPigeonApiSslError().pigeon_newInstance(value) {} + registrar.getPigeonApiSslError().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("SslError", value, it.exceptionOrNull()) + } + } } else if (value is android.net.http.SslCertificate.DName) { - registrar.getPigeonApiSslCertificateDName().pigeon_newInstance(value) {} + registrar.getPigeonApiSslCertificateDName().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("SslCertificateDName", value, it.exceptionOrNull()) + } + } } else if (value is android.net.http.SslCertificate) { - registrar.getPigeonApiSslCertificate().pigeon_newInstance(value) {} + registrar.getPigeonApiSslCertificate().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("SslCertificate", value, it.exceptionOrNull()) + } + } } else if (value is java.security.cert.Certificate) { - registrar.getPigeonApiCertificate().pigeon_newInstance(value) {} + registrar.getPigeonApiCertificate().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("Certificate", value, it.exceptionOrNull()) + } + } } else if (value is androidx.webkit.WebSettingsCompat) { - registrar.getPigeonApiWebSettingsCompat().pigeon_newInstance(value) {} + registrar.getPigeonApiWebSettingsCompat().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("WebSettingsCompat", value, it.exceptionOrNull()) + } + } } else if (value is androidx.webkit.WebViewFeature) { - registrar.getPigeonApiWebViewFeature().pigeon_newInstance(value) {} + registrar.getPigeonApiWebViewFeature().pigeon_newInstance(value) { + if (it.isFailure) { + logNewInstanceFailure("WebViewFeature", value, it.exceptionOrNull()) + } + } } when { @@ -960,23 +1120,23 @@ private open class AndroidWebkitLibraryPigeonCodec : StandardMessageCodec() { when (value) { is FileChooserMode -> { stream.write(129) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is ConsoleMessageLevel -> { stream.write(130) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is OverScrollMode -> { stream.write(131) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is SslErrorType -> { stream.write(132) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } is MixedContentMode -> { stream.write(133) - writeValue(stream, value.raw) + writeValue(stream, value.raw.toLong()) } else -> super.writeValue(stream, value) } diff --git a/packages/webview_flutter/webview_flutter_android/lib/src/android_webkit.g.dart b/packages/webview_flutter/webview_flutter_android/lib/src/android_webkit.g.dart index c4b2f6c90e6..c19506c236b 100644 --- a/packages/webview_flutter/webview_flutter_android/lib/src/android_webkit.g.dart +++ b/packages/webview_flutter/webview_flutter_android/lib/src/android_webkit.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -10,7 +10,7 @@ import 'dart:io' show Platform; import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; import 'package:flutter/foundation.dart' - show ReadBuffer, WriteBuffer, immutable, protected; + show ReadBuffer, WriteBuffer, immutable, protected, visibleForTesting; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart' show WidgetsFlutterBinding; @@ -35,8 +35,237 @@ List wrapResponse({ return [error.code, error.message, error.details]; } -/// An immutable object that serves as the base class for all ProxyApis and -/// can provide functional copies of itself. +/// Provides overrides for the constructors and static members of each +/// Dart proxy class. +/// +/// This is only intended to be used with unit tests to prevent errors from +/// making message calls in a unit test. +/// +/// See [PigeonOverrides.pigeon_reset] to set all overrides back to null. +@visibleForTesting +class PigeonOverrides { + /// Overrides [WebView.new]. + static WebView Function({ + void Function( + WebView pigeon_instance, + int left, + int top, + int oldLeft, + int oldTop, + )? + onScrollChanged, + })? + webView_new; + + /// Overrides [JavaScriptChannel.new]. + static JavaScriptChannel Function({ + required String channelName, + required void Function(JavaScriptChannel pigeon_instance, String message) + postMessage, + })? + javaScriptChannel_new; + + /// Overrides [WebViewClient.new]. + static WebViewClient Function({ + void Function(WebViewClient pigeon_instance, WebView webView, String url)? + onPageStarted, + void Function(WebViewClient pigeon_instance, WebView webView, String url)? + onPageFinished, + void Function( + WebViewClient pigeon_instance, + WebView webView, + WebResourceRequest request, + WebResourceResponse response, + )? + onReceivedHttpError, + void Function( + WebViewClient pigeon_instance, + WebView webView, + WebResourceRequest request, + WebResourceError error, + )? + onReceivedRequestError, + void Function( + WebViewClient pigeon_instance, + WebView webView, + WebResourceRequest request, + WebResourceErrorCompat error, + )? + onReceivedRequestErrorCompat, + void Function( + WebViewClient pigeon_instance, + WebView webView, + WebResourceRequest request, + )? + requestLoading, + void Function(WebViewClient pigeon_instance, WebView webView, String url)? + urlLoading, + void Function( + WebViewClient pigeon_instance, + WebView webView, + String url, + bool isReload, + )? + doUpdateVisitedHistory, + void Function( + WebViewClient pigeon_instance, + WebView webView, + HttpAuthHandler handler, + String host, + String realm, + )? + onReceivedHttpAuthRequest, + void Function( + WebViewClient pigeon_instance, + WebView view, + AndroidMessage dontResend, + AndroidMessage resend, + )? + onFormResubmission, + void Function(WebViewClient pigeon_instance, WebView view, String url)? + onLoadResource, + void Function(WebViewClient pigeon_instance, WebView view, String url)? + onPageCommitVisible, + void Function( + WebViewClient pigeon_instance, + WebView view, + ClientCertRequest request, + )? + onReceivedClientCertRequest, + void Function( + WebViewClient pigeon_instance, + WebView view, + String realm, + String? account, + String args, + )? + onReceivedLoginRequest, + void Function( + WebViewClient pigeon_instance, + WebView view, + SslErrorHandler handler, + SslError error, + )? + onReceivedSslError, + void Function( + WebViewClient pigeon_instance, + WebView view, + double oldScale, + double newScale, + )? + onScaleChanged, + })? + webViewClient_new; + + /// Overrides [DownloadListener.new]. + static DownloadListener Function({ + required void Function( + DownloadListener pigeon_instance, + String url, + String userAgent, + String contentDisposition, + String mimetype, + int contentLength, + ) + onDownloadStart, + })? + downloadListener_new; + + /// Overrides [WebChromeClient.new]. + static WebChromeClient Function({ + required Future> Function( + WebChromeClient pigeon_instance, + WebView webView, + FileChooserParams params, + ) + onShowFileChooser, + required Future Function( + WebChromeClient pigeon_instance, + WebView webView, + String url, + String message, + ) + onJsConfirm, + void Function( + WebChromeClient pigeon_instance, + WebView webView, + int progress, + )? + onProgressChanged, + void Function(WebChromeClient pigeon_instance, PermissionRequest request)? + onPermissionRequest, + void Function( + WebChromeClient pigeon_instance, + View view, + CustomViewCallback callback, + )? + onShowCustomView, + void Function(WebChromeClient pigeon_instance)? onHideCustomView, + void Function( + WebChromeClient pigeon_instance, + String origin, + GeolocationPermissionsCallback callback, + )? + onGeolocationPermissionsShowPrompt, + void Function(WebChromeClient pigeon_instance)? + onGeolocationPermissionsHidePrompt, + void Function(WebChromeClient pigeon_instance, ConsoleMessage message)? + onConsoleMessage, + Future Function( + WebChromeClient pigeon_instance, + WebView webView, + String url, + String message, + )? + onJsAlert, + Future Function( + WebChromeClient pigeon_instance, + WebView webView, + String url, + String message, + String defaultValue, + )? + onJsPrompt, + })? + webChromeClient_new; + + /// Overrides [CookieManager.instance]. + static CookieManager? cookieManager_instance; + + /// Overrides [FlutterAssetManager.instance]. + static FlutterAssetManager? flutterAssetManager_instance; + + /// Overrides [WebStorage.instance]. + static WebStorage? webStorage_instance; + + /// Overrides [WebView.setWebContentsDebuggingEnabled]. + static Future Function(bool)? webView_setWebContentsDebuggingEnabled; + + /// Overrides [WebSettingsCompat.setPaymentRequestEnabled]. + static Future Function(WebSettings, bool)? + webSettingsCompat_setPaymentRequestEnabled; + + /// Overrides [WebViewFeature.isFeatureSupported]. + static Future Function(String)? webViewFeature_isFeatureSupported; + + /// Sets all overridden ProxyApi class members to null. + static void pigeon_reset() { + cookieManager_instance = null; + webView_new = null; + webView_setWebContentsDebuggingEnabled = null; + javaScriptChannel_new = null; + webViewClient_new = null; + downloadListener_new = null; + webChromeClient_new = null; + flutterAssetManager_instance = null; + webStorage_instance = null; + webSettingsCompat_setPaymentRequestEnabled = null; + webViewFeature_isFeatureSupported = null; + } +} + +/// An immutable object that serves as the base class for all Dart proxy classes +/// and can provide functional copies of itself. /// /// All implementers are expected to be [immutable] as defined by the annotation /// and override [pigeon_copy] returning an instance of itself. @@ -101,7 +330,7 @@ class PigeonInstanceManager { // 0 <= n < 2^16. static const int _maxDartCreatedIdentifier = 65536; - /// The default [PigeonInstanceManager] used by ProxyApis. + /// The default [PigeonInstanceManager] used by Dart proxy classes. /// /// On creation, this manager makes a call to clear the native /// InstanceManager. This is to prevent identifier conflicts after a host @@ -1387,7 +1616,10 @@ class CookieManager extends PigeonInternalProxyApiBaseClass { late final _PigeonInternalProxyApiBaseCodec _pigeonVar_codecCookieManager = _PigeonInternalProxyApiBaseCodec(pigeon_instanceManager); - static final CookieManager instance = pigeonVar_instance(); + static final CookieManager _instance = pigeonVar_instance(); + + static CookieManager get instance => + PigeonOverrides.cookieManager_instance ?? _instance; static void pigeon_setUpMessageHandlers({ bool pigeon_clearHandlers = false, @@ -1592,7 +1824,30 @@ class CookieManager extends PigeonInternalProxyApiBaseClass { /// /// See https://developer.android.com/reference/android/webkit/WebView. class WebView extends View { - WebView({ + factory WebView({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + void Function( + WebView pigeon_instance, + int left, + int top, + int oldLeft, + int oldTop, + )? + onScrollChanged, + }) { + if (PigeonOverrides.webView_new != null) { + return PigeonOverrides.webView_new!(onScrollChanged: onScrollChanged); + } + return WebView.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + onScrollChanged: onScrollChanged, + ); + } + + @protected + WebView.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, this.onScrollChanged, @@ -2267,6 +2522,9 @@ class WebView extends View { BinaryMessenger? pigeon_binaryMessenger, PigeonInstanceManager? pigeon_instanceManager, }) async { + if (PigeonOverrides.webView_setWebContentsDebuggingEnabled != null) { + return PigeonOverrides.webView_setWebContentsDebuggingEnabled!(enabled); + } final _PigeonInternalProxyApiBaseCodec pigeonChannelCodec = _PigeonInternalProxyApiBaseCodec( pigeon_instanceManager ?? PigeonInstanceManager.instance, @@ -3150,7 +3408,29 @@ class WebSettings extends PigeonInternalProxyApiBaseClass { /// This is a custom class for the wrapper that is annotated with /// [JavascriptInterface](https://developer.android.com/reference/android/webkit/JavascriptInterface). class JavaScriptChannel extends PigeonInternalProxyApiBaseClass { - JavaScriptChannel({ + factory JavaScriptChannel({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required String channelName, + required void Function(JavaScriptChannel pigeon_instance, String message) + postMessage, + }) { + if (PigeonOverrides.javaScriptChannel_new != null) { + return PigeonOverrides.javaScriptChannel_new!( + channelName: channelName, + postMessage: postMessage, + ); + } + return JavaScriptChannel.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + channelName: channelName, + postMessage: postMessage, + ); + } + + @protected + JavaScriptChannel.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required this.channelName, @@ -3302,7 +3582,141 @@ class JavaScriptChannel extends PigeonInternalProxyApiBaseClass { /// /// See https://developer.android.com/reference/android/webkit/WebViewClient. class WebViewClient extends PigeonInternalProxyApiBaseClass { - WebViewClient({ + factory WebViewClient({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + void Function(WebViewClient pigeon_instance, WebView webView, String url)? + onPageStarted, + void Function(WebViewClient pigeon_instance, WebView webView, String url)? + onPageFinished, + void Function( + WebViewClient pigeon_instance, + WebView webView, + WebResourceRequest request, + WebResourceResponse response, + )? + onReceivedHttpError, + void Function( + WebViewClient pigeon_instance, + WebView webView, + WebResourceRequest request, + WebResourceError error, + )? + onReceivedRequestError, + void Function( + WebViewClient pigeon_instance, + WebView webView, + WebResourceRequest request, + WebResourceErrorCompat error, + )? + onReceivedRequestErrorCompat, + void Function( + WebViewClient pigeon_instance, + WebView webView, + WebResourceRequest request, + )? + requestLoading, + void Function(WebViewClient pigeon_instance, WebView webView, String url)? + urlLoading, + void Function( + WebViewClient pigeon_instance, + WebView webView, + String url, + bool isReload, + )? + doUpdateVisitedHistory, + void Function( + WebViewClient pigeon_instance, + WebView webView, + HttpAuthHandler handler, + String host, + String realm, + )? + onReceivedHttpAuthRequest, + void Function( + WebViewClient pigeon_instance, + WebView view, + AndroidMessage dontResend, + AndroidMessage resend, + )? + onFormResubmission, + void Function(WebViewClient pigeon_instance, WebView view, String url)? + onLoadResource, + void Function(WebViewClient pigeon_instance, WebView view, String url)? + onPageCommitVisible, + void Function( + WebViewClient pigeon_instance, + WebView view, + ClientCertRequest request, + )? + onReceivedClientCertRequest, + void Function( + WebViewClient pigeon_instance, + WebView view, + String realm, + String? account, + String args, + )? + onReceivedLoginRequest, + void Function( + WebViewClient pigeon_instance, + WebView view, + SslErrorHandler handler, + SslError error, + )? + onReceivedSslError, + void Function( + WebViewClient pigeon_instance, + WebView view, + double oldScale, + double newScale, + )? + onScaleChanged, + }) { + if (PigeonOverrides.webViewClient_new != null) { + return PigeonOverrides.webViewClient_new!( + onPageStarted: onPageStarted, + onPageFinished: onPageFinished, + onReceivedHttpError: onReceivedHttpError, + onReceivedRequestError: onReceivedRequestError, + onReceivedRequestErrorCompat: onReceivedRequestErrorCompat, + requestLoading: requestLoading, + urlLoading: urlLoading, + doUpdateVisitedHistory: doUpdateVisitedHistory, + onReceivedHttpAuthRequest: onReceivedHttpAuthRequest, + onFormResubmission: onFormResubmission, + onLoadResource: onLoadResource, + onPageCommitVisible: onPageCommitVisible, + onReceivedClientCertRequest: onReceivedClientCertRequest, + onReceivedLoginRequest: onReceivedLoginRequest, + onReceivedSslError: onReceivedSslError, + onScaleChanged: onScaleChanged, + ); + } + return WebViewClient.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + onPageStarted: onPageStarted, + onPageFinished: onPageFinished, + onReceivedHttpError: onReceivedHttpError, + onReceivedRequestError: onReceivedRequestError, + onReceivedRequestErrorCompat: onReceivedRequestErrorCompat, + requestLoading: requestLoading, + urlLoading: urlLoading, + doUpdateVisitedHistory: doUpdateVisitedHistory, + onReceivedHttpAuthRequest: onReceivedHttpAuthRequest, + onFormResubmission: onFormResubmission, + onLoadResource: onLoadResource, + onPageCommitVisible: onPageCommitVisible, + onReceivedClientCertRequest: onReceivedClientCertRequest, + onReceivedLoginRequest: onReceivedLoginRequest, + onReceivedSslError: onReceivedSslError, + onScaleChanged: onScaleChanged, + ); + } + + @protected + WebViewClient.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, this.onPageStarted, @@ -4905,7 +5319,33 @@ class WebViewClient extends PigeonInternalProxyApiBaseClass { /// /// See https://developer.android.com/reference/android/webkit/DownloadListener. class DownloadListener extends PigeonInternalProxyApiBaseClass { - DownloadListener({ + factory DownloadListener({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required void Function( + DownloadListener pigeon_instance, + String url, + String userAgent, + String contentDisposition, + String mimetype, + int contentLength, + ) + onDownloadStart, + }) { + if (PigeonOverrides.downloadListener_new != null) { + return PigeonOverrides.downloadListener_new!( + onDownloadStart: onDownloadStart, + ); + } + return DownloadListener.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + onDownloadStart: onDownloadStart, + ); + } + + @protected + DownloadListener.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required this.onDownloadStart, @@ -5089,7 +5529,97 @@ class DownloadListener extends PigeonInternalProxyApiBaseClass { /// /// See https://developer.android.com/reference/android/webkit/WebChromeClient. class WebChromeClient extends PigeonInternalProxyApiBaseClass { - WebChromeClient({ + factory WebChromeClient({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + void Function( + WebChromeClient pigeon_instance, + WebView webView, + int progress, + )? + onProgressChanged, + required Future> Function( + WebChromeClient pigeon_instance, + WebView webView, + FileChooserParams params, + ) + onShowFileChooser, + void Function(WebChromeClient pigeon_instance, PermissionRequest request)? + onPermissionRequest, + void Function( + WebChromeClient pigeon_instance, + View view, + CustomViewCallback callback, + )? + onShowCustomView, + void Function(WebChromeClient pigeon_instance)? onHideCustomView, + void Function( + WebChromeClient pigeon_instance, + String origin, + GeolocationPermissionsCallback callback, + )? + onGeolocationPermissionsShowPrompt, + void Function(WebChromeClient pigeon_instance)? + onGeolocationPermissionsHidePrompt, + void Function(WebChromeClient pigeon_instance, ConsoleMessage message)? + onConsoleMessage, + Future Function( + WebChromeClient pigeon_instance, + WebView webView, + String url, + String message, + )? + onJsAlert, + required Future Function( + WebChromeClient pigeon_instance, + WebView webView, + String url, + String message, + ) + onJsConfirm, + Future Function( + WebChromeClient pigeon_instance, + WebView webView, + String url, + String message, + String defaultValue, + )? + onJsPrompt, + }) { + if (PigeonOverrides.webChromeClient_new != null) { + return PigeonOverrides.webChromeClient_new!( + onProgressChanged: onProgressChanged, + onShowFileChooser: onShowFileChooser, + onPermissionRequest: onPermissionRequest, + onShowCustomView: onShowCustomView, + onHideCustomView: onHideCustomView, + onGeolocationPermissionsShowPrompt: onGeolocationPermissionsShowPrompt, + onGeolocationPermissionsHidePrompt: onGeolocationPermissionsHidePrompt, + onConsoleMessage: onConsoleMessage, + onJsAlert: onJsAlert, + onJsConfirm: onJsConfirm, + onJsPrompt: onJsPrompt, + ); + } + return WebChromeClient.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + onProgressChanged: onProgressChanged, + onShowFileChooser: onShowFileChooser, + onPermissionRequest: onPermissionRequest, + onShowCustomView: onShowCustomView, + onHideCustomView: onHideCustomView, + onGeolocationPermissionsShowPrompt: onGeolocationPermissionsShowPrompt, + onGeolocationPermissionsHidePrompt: onGeolocationPermissionsHidePrompt, + onConsoleMessage: onConsoleMessage, + onJsAlert: onJsAlert, + onJsConfirm: onJsConfirm, + onJsPrompt: onJsPrompt, + ); + } + + @protected + WebChromeClient.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, this.onProgressChanged, @@ -6306,7 +6836,11 @@ class FlutterAssetManager extends PigeonInternalProxyApiBaseClass { ); /// The global instance of the `FlutterAssetManager`. - static final FlutterAssetManager instance = pigeonVar_instance(); + static final FlutterAssetManager _instance = pigeonVar_instance(); + + /// The global instance of the `FlutterAssetManager`. + static FlutterAssetManager get instance => + PigeonOverrides.flutterAssetManager_instance ?? _instance; static void pigeon_setUpMessageHandlers({ bool pigeon_clearHandlers = false, @@ -6508,7 +7042,10 @@ class WebStorage extends PigeonInternalProxyApiBaseClass { late final _PigeonInternalProxyApiBaseCodec _pigeonVar_codecWebStorage = _PigeonInternalProxyApiBaseCodec(pigeon_instanceManager); - static final WebStorage instance = pigeonVar_instance(); + static final WebStorage _instance = pigeonVar_instance(); + + static WebStorage get instance => + PigeonOverrides.webStorage_instance ?? _instance; static void pigeon_setUpMessageHandlers({ bool pigeon_clearHandlers = false, @@ -9066,6 +9603,12 @@ class WebSettingsCompat extends PigeonInternalProxyApiBaseClass { BinaryMessenger? pigeon_binaryMessenger, PigeonInstanceManager? pigeon_instanceManager, }) async { + if (PigeonOverrides.webSettingsCompat_setPaymentRequestEnabled != null) { + return PigeonOverrides.webSettingsCompat_setPaymentRequestEnabled!( + webSettings, + enabled, + ); + } final _PigeonInternalProxyApiBaseCodec pigeonChannelCodec = _PigeonInternalProxyApiBaseCodec( pigeon_instanceManager ?? PigeonInstanceManager.instance, @@ -9183,6 +9726,9 @@ class WebViewFeature extends PigeonInternalProxyApiBaseClass { BinaryMessenger? pigeon_binaryMessenger, PigeonInstanceManager? pigeon_instanceManager, }) async { + if (PigeonOverrides.webViewFeature_isFeatureSupported != null) { + return PigeonOverrides.webViewFeature_isFeatureSupported!(feature); + } final _PigeonInternalProxyApiBaseCodec pigeonChannelCodec = _PigeonInternalProxyApiBaseCodec( pigeon_instanceManager ?? PigeonInstanceManager.instance, diff --git a/packages/webview_flutter/webview_flutter_android/lib/src/legacy/webview_android_widget.dart b/packages/webview_flutter/webview_flutter_android/lib/src/legacy/webview_android_widget.dart index ba7d73aa8fa..3eb236a36c8 100644 --- a/packages/webview_flutter/webview_flutter_android/lib/src/legacy/webview_android_widget.dart +++ b/packages/webview_flutter/webview_flutter_android/lib/src/legacy/webview_android_widget.dart @@ -572,7 +572,7 @@ class WebViewAndroidJavaScriptChannel WebViewAndroidJavaScriptChannel({ required super.channelName, required this.javascriptChannelRegistry, - }) : super( + }) : super.pigeon_new( postMessage: withWeakReferenceTo(javascriptChannelRegistry, ( WeakReference weakReference, ) { diff --git a/packages/webview_flutter/webview_flutter_android/pubspec.yaml b/packages/webview_flutter/webview_flutter_android/pubspec.yaml index 0b92434e147..1d778fba35d 100644 --- a/packages/webview_flutter/webview_flutter_android/pubspec.yaml +++ b/packages/webview_flutter/webview_flutter_android/pubspec.yaml @@ -28,7 +28,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^25.3.2 + pigeon: ^26.1.0 topics: - html diff --git a/packages/webview_flutter/webview_flutter_wkwebview/darwin/webview_flutter_wkwebview/Sources/webview_flutter_wkwebview/WebKitLibrary.g.swift b/packages/webview_flutter/webview_flutter_wkwebview/darwin/webview_flutter_wkwebview/Sources/webview_flutter_wkwebview/WebKitLibrary.g.swift index 36d0456f4b8..051988da766 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/darwin/webview_flutter_wkwebview/Sources/webview_flutter_wkwebview/WebKitLibrary.g.swift +++ b/packages/webview_flutter/webview_flutter_wkwebview/darwin/webview_flutter_wkwebview/Sources/webview_flutter_wkwebview/WebKitLibrary.g.swift @@ -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 (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation diff --git a/packages/webview_flutter/webview_flutter_wkwebview/lib/src/common/web_kit.g.dart b/packages/webview_flutter/webview_flutter_wkwebview/lib/src/common/web_kit.g.dart index 7b3a868fd54..659dd400476 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/lib/src/common/web_kit.g.dart +++ b/packages/webview_flutter/webview_flutter_wkwebview/lib/src/common/web_kit.g.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Autogenerated from Pigeon (v25.5.0), do not edit directly. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers @@ -10,7 +10,7 @@ import 'dart:io' show Platform; import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; import 'package:flutter/foundation.dart' - show ReadBuffer, WriteBuffer, immutable, protected; + show ReadBuffer, WriteBuffer, immutable, protected, visibleForTesting; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart' show WidgetsFlutterBinding; @@ -35,8 +35,342 @@ List wrapResponse({ return [error.code, error.message, error.details]; } -/// An immutable object that serves as the base class for all ProxyApis and -/// can provide functional copies of itself. +/// Provides overrides for the constructors and static members of each +/// Dart proxy class. +/// +/// This is only intended to be used with unit tests to prevent errors from +/// making message calls in a unit test. +/// +/// See [PigeonOverrides.pigeon_reset] to set all overrides back to null. +@visibleForTesting +class PigeonOverrides { + /// Overrides [URLRequest.new]. + static URLRequest Function({ + required String url, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + })? + uRLRequest_new; + + /// Overrides [WKUserScript.new]. + static WKUserScript Function({ + required String source, + required UserScriptInjectionTime injectionTime, + required bool isForMainFrameOnly, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + })? + wKUserScript_new; + + /// Overrides [HTTPCookie.new]. + static HTTPCookie Function({ + required Map properties, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + })? + hTTPCookie_new; + + /// Overrides [AuthenticationChallengeResponse.new]. + static AuthenticationChallengeResponse Function({ + required UrlSessionAuthChallengeDisposition disposition, + URLCredential? credential, + })? + authenticationChallengeResponse_new; + + /// Overrides [WKWebViewConfiguration.new]. + static WKWebViewConfiguration Function({ + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + })? + wKWebViewConfiguration_new; + + /// Overrides [WKScriptMessageHandler.new]. + static WKScriptMessageHandler Function({ + required void Function( + WKScriptMessageHandler pigeon_instance, + WKUserContentController controller, + WKScriptMessage message, + ) + didReceiveScriptMessage, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + })? + wKScriptMessageHandler_new; + + /// Overrides [WKNavigationDelegate.new]. + static WKNavigationDelegate Function({ + required Future Function( + WKNavigationDelegate pigeon_instance, + WKWebView webView, + WKNavigationAction navigationAction, + ) + decidePolicyForNavigationAction, + required Future Function( + WKNavigationDelegate pigeon_instance, + WKWebView webView, + WKNavigationResponse navigationResponse, + ) + decidePolicyForNavigationResponse, + required Future Function( + WKNavigationDelegate pigeon_instance, + WKWebView webView, + URLAuthenticationChallenge challenge, + ) + didReceiveAuthenticationChallenge, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + void Function( + WKNavigationDelegate pigeon_instance, + WKWebView webView, + String? url, + )? + didFinishNavigation, + void Function( + WKNavigationDelegate pigeon_instance, + WKWebView webView, + String? url, + )? + didStartProvisionalNavigation, + void Function( + WKNavigationDelegate pigeon_instance, + WKWebView webView, + NSError error, + )? + didFailNavigation, + void Function( + WKNavigationDelegate pigeon_instance, + WKWebView webView, + NSError error, + )? + didFailProvisionalNavigation, + void Function(WKNavigationDelegate pigeon_instance, WKWebView webView)? + webViewWebContentProcessDidTerminate, + })? + wKNavigationDelegate_new; + + /// Overrides [NSObject.new]. + static NSObject Function({ + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + })? + nSObject_new; + + /// Overrides [UIViewWKWebView.new]. + static UIViewWKWebView Function({ + required WKWebViewConfiguration initialConfiguration, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + })? + uIViewWKWebView_new; + + /// Overrides [NSViewWKWebView.new]. + static NSViewWKWebView Function({ + required WKWebViewConfiguration initialConfiguration, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + })? + nSViewWKWebView_new; + + /// Overrides [WKUIDelegate.new]. + static WKUIDelegate Function({ + required Future Function( + WKUIDelegate pigeon_instance, + WKWebView webView, + WKSecurityOrigin origin, + WKFrameInfo frame, + MediaCaptureType type, + ) + requestMediaCapturePermission, + required Future Function( + WKUIDelegate pigeon_instance, + WKWebView webView, + String message, + WKFrameInfo frame, + ) + runJavaScriptConfirmPanel, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + void Function( + WKUIDelegate pigeon_instance, + WKWebView webView, + WKWebViewConfiguration configuration, + WKNavigationAction navigationAction, + )? + onCreateWebView, + Future Function( + WKUIDelegate pigeon_instance, + WKWebView webView, + String message, + WKFrameInfo frame, + )? + runJavaScriptAlertPanel, + Future Function( + WKUIDelegate pigeon_instance, + WKWebView webView, + String prompt, + String? defaultText, + WKFrameInfo frame, + )? + runJavaScriptTextInputPanel, + })? + wKUIDelegate_new; + + /// Overrides [UIScrollViewDelegate.new]. + static UIScrollViewDelegate Function({ + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + void Function( + UIScrollViewDelegate pigeon_instance, + UIScrollView scrollView, + double x, + double y, + )? + scrollViewDidScroll, + })? + uIScrollViewDelegate_new; + + /// Overrides [URLCredential.withUser]. + static URLCredential Function({ + required String user, + required String password, + required UrlCredentialPersistence persistence, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + })? + uRLCredential_withUser; + + /// Overrides [WKWebsiteDataStore.defaultDataStore]. + static WKWebsiteDataStore? wKWebsiteDataStore_defaultDataStore; + + /// Overrides [AuthenticationChallengeResponse.createAsync]. + static Future Function( + UrlSessionAuthChallengeDisposition, + URLCredential?, + )? + authenticationChallengeResponse_createAsync; + + /// Overrides [URLCredential.withUserAsync]. + static Future Function( + String, + String, + UrlCredentialPersistence, + )? + uRLCredential_withUserAsync; + + /// Overrides [URLCredential.serverTrustAsync]. + static Future Function(SecTrust)? + uRLCredential_serverTrustAsync; + + /// Overrides [SecTrust.evaluateWithError]. + static Future Function(SecTrust)? secTrust_evaluateWithError; + + /// Overrides [SecTrust.copyExceptions]. + static Future Function(SecTrust)? secTrust_copyExceptions; + + /// Overrides [SecTrust.setExceptions]. + static Future Function(SecTrust, Uint8List?)? secTrust_setExceptions; + + /// Overrides [SecTrust.getTrustResult]. + static Future Function(SecTrust)? + secTrust_getTrustResult; + + /// Overrides [SecTrust.copyCertificateChain]. + static Future?> Function(SecTrust)? + secTrust_copyCertificateChain; + + /// Overrides [SecCertificate.copyData]. + static Future Function(SecCertificate)? secCertificate_copyData; + + /// Sets all overridden ProxyApi class members to null. + static void pigeon_reset() { + uRLRequest_new = null; + wKUserScript_new = null; + hTTPCookie_new = null; + authenticationChallengeResponse_new = null; + authenticationChallengeResponse_createAsync = null; + wKWebsiteDataStore_defaultDataStore = null; + wKWebViewConfiguration_new = null; + wKScriptMessageHandler_new = null; + wKNavigationDelegate_new = null; + nSObject_new = null; + uIViewWKWebView_new = null; + nSViewWKWebView_new = null; + wKUIDelegate_new = null; + uIScrollViewDelegate_new = null; + uRLCredential_withUser = null; + uRLCredential_withUserAsync = null; + uRLCredential_serverTrustAsync = null; + secTrust_evaluateWithError = null; + secTrust_copyExceptions = null; + secTrust_setExceptions = null; + secTrust_getTrustResult = null; + secTrust_copyCertificateChain = null; + secCertificate_copyData = null; + } +} + +/// An immutable object that serves as the base class for all Dart proxy classes +/// and can provide functional copies of itself. /// /// All implementers are expected to be [immutable] as defined by the annotation /// and override [pigeon_copy] returning an instance of itself. @@ -101,7 +435,7 @@ class PigeonInstanceManager { // 0 <= n < 2^16. static const int _maxDartCreatedIdentifier = 65536; - /// The default [PigeonInstanceManager] used by ProxyApis. + /// The default [PigeonInstanceManager] used by Dart proxy classes. /// /// On creation, this manager makes a call to clear the native /// InstanceManager. This is to prevent identifier conflicts after a host @@ -999,7 +1333,34 @@ class _PigeonCodec extends StandardMessageCodec { /// /// See https://developer.apple.com/documentation/foundation/urlrequest. class URLRequest extends NSObject { - URLRequest({ + factory URLRequest({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + required String url, + }) { + if (PigeonOverrides.uRLRequest_new != null) { + return PigeonOverrides.uRLRequest_new!( + observeValue: observeValue, + url: url, + ); + } + return URLRequest.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + observeValue: observeValue, + url: url, + ); + } + + @protected + URLRequest.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, super.observeValue, @@ -1514,7 +1875,42 @@ class URLResponse extends NSObject { class WKUserScript extends NSObject { /// Creates a user script object that contains the specified source code and /// attributes. - WKUserScript({ + factory WKUserScript({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required String source, + required UserScriptInjectionTime injectionTime, + required bool isForMainFrameOnly, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + }) { + if (PigeonOverrides.wKUserScript_new != null) { + return PigeonOverrides.wKUserScript_new!( + source: source, + injectionTime: injectionTime, + isForMainFrameOnly: isForMainFrameOnly, + observeValue: observeValue, + ); + } + return WKUserScript.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + source: source, + injectionTime: injectionTime, + isForMainFrameOnly: isForMainFrameOnly, + observeValue: observeValue, + ); + } + + /// Creates a user script object that contains the specified source code and + /// attributes. + @protected + WKUserScript.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required this.source, @@ -2354,7 +2750,34 @@ class WKSecurityOrigin extends NSObject { /// /// See https://developer.apple.com/documentation/foundation/httpcookie. class HTTPCookie extends NSObject { - HTTPCookie({ + factory HTTPCookie({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + required Map properties, + }) { + if (PigeonOverrides.hTTPCookie_new != null) { + return PigeonOverrides.hTTPCookie_new!( + observeValue: observeValue, + properties: properties, + ); + } + return HTTPCookie.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + observeValue: observeValue, + properties: properties, + ); + } + + @protected + HTTPCookie.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, super.observeValue, @@ -2515,7 +2938,32 @@ class AuthenticationChallengeResponse extends PigeonInternalProxyApiBaseClass { /// /// Due to https://github.com/flutter/flutter/issues/162437, this should only /// be used for testing. - AuthenticationChallengeResponse({ + factory AuthenticationChallengeResponse({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + required UrlSessionAuthChallengeDisposition disposition, + URLCredential? credential, + }) { + if (PigeonOverrides.authenticationChallengeResponse_new != null) { + return PigeonOverrides.authenticationChallengeResponse_new!( + disposition: disposition, + credential: credential, + ); + } + return AuthenticationChallengeResponse.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + disposition: disposition, + credential: credential, + ); + } + + /// Creates an [AuthenticationChallengeResponse]. + /// + /// Due to https://github.com/flutter/flutter/issues/162437, this should only + /// be used for testing. + @protected + AuthenticationChallengeResponse.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, required this.disposition, @@ -2656,6 +3104,12 @@ class AuthenticationChallengeResponse extends PigeonInternalProxyApiBaseClass { BinaryMessenger? pigeon_binaryMessenger, PigeonInstanceManager? pigeon_instanceManager, }) async { + if (PigeonOverrides.authenticationChallengeResponse_createAsync != null) { + return PigeonOverrides.authenticationChallengeResponse_createAsync!( + disposition, + credential, + ); + } final _PigeonInternalProxyApiBaseCodec pigeonChannelCodec = _PigeonInternalProxyApiBaseCodec( pigeon_instanceManager ?? PigeonInstanceManager.instance, @@ -2725,12 +3179,16 @@ class WKWebsiteDataStore extends NSObject { ); /// The default data store, which stores data persistently to disk. - static final WKWebsiteDataStore defaultDataStore = + static final WKWebsiteDataStore _defaultDataStore = pigeonVar_defaultDataStore(); /// The object that manages the HTTP cookies for your website. late final WKHTTPCookieStore httpCookieStore = pigeonVar_httpCookieStore(); + /// The default data store, which stores data persistently to disk. + static WKWebsiteDataStore get defaultDataStore => + PigeonOverrides.wKWebsiteDataStore_defaultDataStore ?? _defaultDataStore; + static void pigeon_setUpMessageHandlers({ bool pigeon_clearHandlers = false, BinaryMessenger? pigeon_binaryMessenger, @@ -3511,7 +3969,31 @@ class UIScrollView extends UIView { /// /// See https://developer.apple.com/documentation/webkit/wkwebviewconfiguration. class WKWebViewConfiguration extends NSObject { - WKWebViewConfiguration({ + factory WKWebViewConfiguration({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + }) { + if (PigeonOverrides.wKWebViewConfiguration_new != null) { + return PigeonOverrides.wKWebViewConfiguration_new!( + observeValue: observeValue, + ); + } + return WKWebViewConfiguration.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + observeValue: observeValue, + ); + } + + @protected + WKWebViewConfiguration.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, super.observeValue, @@ -4315,26 +4797,58 @@ class WKPreferences extends NSObject { message: pigeonVar_replyList[1] as String?, details: pigeonVar_replyList[2], ); - } else { - return; + } else { + return; + } + } + + @override + WKPreferences pigeon_copy() { + return WKPreferences.pigeon_detached( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + observeValue: observeValue, + ); + } +} + +/// An interface for receiving messages from JavaScript code running in a webpage. +/// +/// See https://developer.apple.com/documentation/webkit/wkscriptmessagehandler. +class WKScriptMessageHandler extends NSObject { + factory WKScriptMessageHandler({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + required void Function( + WKScriptMessageHandler pigeon_instance, + WKUserContentController controller, + WKScriptMessage message, + ) + didReceiveScriptMessage, + }) { + if (PigeonOverrides.wKScriptMessageHandler_new != null) { + return PigeonOverrides.wKScriptMessageHandler_new!( + observeValue: observeValue, + didReceiveScriptMessage: didReceiveScriptMessage, + ); } - } - - @override - WKPreferences pigeon_copy() { - return WKPreferences.pigeon_detached( + return WKScriptMessageHandler.pigeon_new( pigeon_binaryMessenger: pigeon_binaryMessenger, pigeon_instanceManager: pigeon_instanceManager, observeValue: observeValue, + didReceiveScriptMessage: didReceiveScriptMessage, ); } -} -/// An interface for receiving messages from JavaScript code running in a webpage. -/// -/// See https://developer.apple.com/documentation/webkit/wkscriptmessagehandler. -class WKScriptMessageHandler extends NSObject { - WKScriptMessageHandler({ + @protected + WKScriptMessageHandler.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, super.observeValue, @@ -4498,7 +5012,93 @@ class WKScriptMessageHandler extends NSObject { /// /// See https://developer.apple.com/documentation/webkit/wknavigationdelegate. class WKNavigationDelegate extends NSObject { - WKNavigationDelegate({ + factory WKNavigationDelegate({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + void Function( + WKNavigationDelegate pigeon_instance, + WKWebView webView, + String? url, + )? + didFinishNavigation, + void Function( + WKNavigationDelegate pigeon_instance, + WKWebView webView, + String? url, + )? + didStartProvisionalNavigation, + required Future Function( + WKNavigationDelegate pigeon_instance, + WKWebView webView, + WKNavigationAction navigationAction, + ) + decidePolicyForNavigationAction, + required Future Function( + WKNavigationDelegate pigeon_instance, + WKWebView webView, + WKNavigationResponse navigationResponse, + ) + decidePolicyForNavigationResponse, + void Function( + WKNavigationDelegate pigeon_instance, + WKWebView webView, + NSError error, + )? + didFailNavigation, + void Function( + WKNavigationDelegate pigeon_instance, + WKWebView webView, + NSError error, + )? + didFailProvisionalNavigation, + void Function(WKNavigationDelegate pigeon_instance, WKWebView webView)? + webViewWebContentProcessDidTerminate, + required Future Function( + WKNavigationDelegate pigeon_instance, + WKWebView webView, + URLAuthenticationChallenge challenge, + ) + didReceiveAuthenticationChallenge, + }) { + if (PigeonOverrides.wKNavigationDelegate_new != null) { + return PigeonOverrides.wKNavigationDelegate_new!( + observeValue: observeValue, + didFinishNavigation: didFinishNavigation, + didStartProvisionalNavigation: didStartProvisionalNavigation, + decidePolicyForNavigationAction: decidePolicyForNavigationAction, + decidePolicyForNavigationResponse: decidePolicyForNavigationResponse, + didFailNavigation: didFailNavigation, + didFailProvisionalNavigation: didFailProvisionalNavigation, + webViewWebContentProcessDidTerminate: + webViewWebContentProcessDidTerminate, + didReceiveAuthenticationChallenge: didReceiveAuthenticationChallenge, + ); + } + return WKNavigationDelegate.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + observeValue: observeValue, + didFinishNavigation: didFinishNavigation, + didStartProvisionalNavigation: didStartProvisionalNavigation, + decidePolicyForNavigationAction: decidePolicyForNavigationAction, + decidePolicyForNavigationResponse: decidePolicyForNavigationResponse, + didFailNavigation: didFailNavigation, + didFailProvisionalNavigation: didFailProvisionalNavigation, + webViewWebContentProcessDidTerminate: + webViewWebContentProcessDidTerminate, + didReceiveAuthenticationChallenge: didReceiveAuthenticationChallenge, + ); + } + + @protected + WKNavigationDelegate.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, super.observeValue, @@ -5241,7 +5841,29 @@ class WKNavigationDelegate extends NSObject { /// /// See https://developer.apple.com/documentation/objectivec/nsobject. class NSObject extends PigeonInternalProxyApiBaseClass { - NSObject({ + factory NSObject({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + }) { + if (PigeonOverrides.nSObject_new != null) { + return PigeonOverrides.nSObject_new!(observeValue: observeValue); + } + return NSObject.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + observeValue: observeValue, + ); + } + + @protected + NSObject.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, this.observeValue, @@ -5512,7 +6134,34 @@ class NSObject extends PigeonInternalProxyApiBaseClass { /// /// See https://developer.apple.com/documentation/webkit/wkwebview. class UIViewWKWebView extends UIView implements WKWebView { - UIViewWKWebView({ + factory UIViewWKWebView({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + required WKWebViewConfiguration initialConfiguration, + }) { + if (PigeonOverrides.uIViewWKWebView_new != null) { + return PigeonOverrides.uIViewWKWebView_new!( + observeValue: observeValue, + initialConfiguration: initialConfiguration, + ); + } + return UIViewWKWebView.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + observeValue: observeValue, + initialConfiguration: initialConfiguration, + ); + } + + @protected + UIViewWKWebView.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, super.observeValue, @@ -6364,7 +7013,34 @@ class UIViewWKWebView extends UIView implements WKWebView { /// /// See https://developer.apple.com/documentation/webkit/wkwebview. class NSViewWKWebView extends NSObject implements WKWebView { - NSViewWKWebView({ + factory NSViewWKWebView({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + required WKWebViewConfiguration initialConfiguration, + }) { + if (PigeonOverrides.nSViewWKWebView_new != null) { + return PigeonOverrides.nSViewWKWebView_new!( + observeValue: observeValue, + initialConfiguration: initialConfiguration, + ); + } + return NSViewWKWebView.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + observeValue: observeValue, + initialConfiguration: initialConfiguration, + ); + } + + @protected + NSViewWKWebView.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, super.observeValue, @@ -7255,7 +7931,78 @@ class WKWebView extends NSObject { /// /// See https://developer.apple.com/documentation/webkit/wkuidelegate. class WKUIDelegate extends NSObject { - WKUIDelegate({ + factory WKUIDelegate({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + void Function( + WKUIDelegate pigeon_instance, + WKWebView webView, + WKWebViewConfiguration configuration, + WKNavigationAction navigationAction, + )? + onCreateWebView, + required Future Function( + WKUIDelegate pigeon_instance, + WKWebView webView, + WKSecurityOrigin origin, + WKFrameInfo frame, + MediaCaptureType type, + ) + requestMediaCapturePermission, + Future Function( + WKUIDelegate pigeon_instance, + WKWebView webView, + String message, + WKFrameInfo frame, + )? + runJavaScriptAlertPanel, + required Future Function( + WKUIDelegate pigeon_instance, + WKWebView webView, + String message, + WKFrameInfo frame, + ) + runJavaScriptConfirmPanel, + Future Function( + WKUIDelegate pigeon_instance, + WKWebView webView, + String prompt, + String? defaultText, + WKFrameInfo frame, + )? + runJavaScriptTextInputPanel, + }) { + if (PigeonOverrides.wKUIDelegate_new != null) { + return PigeonOverrides.wKUIDelegate_new!( + observeValue: observeValue, + onCreateWebView: onCreateWebView, + requestMediaCapturePermission: requestMediaCapturePermission, + runJavaScriptAlertPanel: runJavaScriptAlertPanel, + runJavaScriptConfirmPanel: runJavaScriptConfirmPanel, + runJavaScriptTextInputPanel: runJavaScriptTextInputPanel, + ); + } + return WKUIDelegate.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + observeValue: observeValue, + onCreateWebView: onCreateWebView, + requestMediaCapturePermission: requestMediaCapturePermission, + runJavaScriptAlertPanel: runJavaScriptAlertPanel, + runJavaScriptConfirmPanel: runJavaScriptConfirmPanel, + runJavaScriptTextInputPanel: runJavaScriptTextInputPanel, + ); + } + + @protected + WKUIDelegate.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, super.observeValue, @@ -7936,7 +8683,40 @@ class WKHTTPCookieStore extends NSObject { /// /// See https://developer.apple.com/documentation/uikit/uiscrollviewdelegate. class UIScrollViewDelegate extends NSObject { - UIScrollViewDelegate({ + factory UIScrollViewDelegate({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + void Function( + UIScrollViewDelegate pigeon_instance, + UIScrollView scrollView, + double x, + double y, + )? + scrollViewDidScroll, + }) { + if (PigeonOverrides.uIScrollViewDelegate_new != null) { + return PigeonOverrides.uIScrollViewDelegate_new!( + observeValue: observeValue, + scrollViewDidScroll: scrollViewDidScroll, + ); + } + return UIScrollViewDelegate.pigeon_new( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + observeValue: observeValue, + scrollViewDidScroll: scrollViewDidScroll, + ); + } + + @protected + UIScrollViewDelegate.pigeon_new({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, super.observeValue, @@ -8155,7 +8935,42 @@ class UIScrollViewDelegate extends NSObject { class URLCredential extends NSObject { /// Creates a URL credential instance for internet password authentication /// with a given user name and password, using a given persistence setting. - URLCredential.withUser({ + factory URLCredential.withUser({ + BinaryMessenger? pigeon_binaryMessenger, + PigeonInstanceManager? pigeon_instanceManager, + void Function( + NSObject pigeon_instance, + String? keyPath, + NSObject? object, + Map? change, + )? + observeValue, + required String user, + required String password, + required UrlCredentialPersistence persistence, + }) { + if (PigeonOverrides.uRLCredential_withUser != null) { + return PigeonOverrides.uRLCredential_withUser!( + observeValue: observeValue, + user: user, + password: password, + persistence: persistence, + ); + } + return URLCredential.pigeon_withUser( + pigeon_binaryMessenger: pigeon_binaryMessenger, + pigeon_instanceManager: pigeon_instanceManager, + observeValue: observeValue, + user: user, + password: password, + persistence: persistence, + ); + } + + /// Creates a URL credential instance for internet password authentication + /// with a given user name and password, using a given persistence setting. + @protected + URLCredential.pigeon_withUser({ super.pigeon_binaryMessenger, super.pigeon_instanceManager, super.observeValue, @@ -8278,6 +9093,13 @@ class URLCredential extends NSObject { BinaryMessenger? pigeon_binaryMessenger, PigeonInstanceManager? pigeon_instanceManager, }) async { + if (PigeonOverrides.uRLCredential_withUserAsync != null) { + return PigeonOverrides.uRLCredential_withUserAsync!( + user, + password, + persistence, + ); + } final _PigeonInternalProxyApiBaseCodec pigeonChannelCodec = _PigeonInternalProxyApiBaseCodec( pigeon_instanceManager ?? PigeonInstanceManager.instance, @@ -8325,6 +9147,9 @@ class URLCredential extends NSObject { BinaryMessenger? pigeon_binaryMessenger, PigeonInstanceManager? pigeon_instanceManager, }) async { + if (PigeonOverrides.uRLCredential_serverTrustAsync != null) { + return PigeonOverrides.uRLCredential_serverTrustAsync!(trust); + } final _PigeonInternalProxyApiBaseCodec pigeonChannelCodec = _PigeonInternalProxyApiBaseCodec( pigeon_instanceManager ?? PigeonInstanceManager.instance, @@ -9083,6 +9908,9 @@ class SecTrust extends NSObject { BinaryMessenger? pigeon_binaryMessenger, PigeonInstanceManager? pigeon_instanceManager, }) async { + if (PigeonOverrides.secTrust_evaluateWithError != null) { + return PigeonOverrides.secTrust_evaluateWithError!(trust); + } final _PigeonInternalProxyApiBaseCodec pigeonChannelCodec = _PigeonInternalProxyApiBaseCodec( pigeon_instanceManager ?? PigeonInstanceManager.instance, @@ -9126,6 +9954,9 @@ class SecTrust extends NSObject { BinaryMessenger? pigeon_binaryMessenger, PigeonInstanceManager? pigeon_instanceManager, }) async { + if (PigeonOverrides.secTrust_copyExceptions != null) { + return PigeonOverrides.secTrust_copyExceptions!(trust); + } final _PigeonInternalProxyApiBaseCodec pigeonChannelCodec = _PigeonInternalProxyApiBaseCodec( pigeon_instanceManager ?? PigeonInstanceManager.instance, @@ -9165,6 +9996,9 @@ class SecTrust extends NSObject { BinaryMessenger? pigeon_binaryMessenger, PigeonInstanceManager? pigeon_instanceManager, }) async { + if (PigeonOverrides.secTrust_setExceptions != null) { + return PigeonOverrides.secTrust_setExceptions!(trust, exceptions); + } final _PigeonInternalProxyApiBaseCodec pigeonChannelCodec = _PigeonInternalProxyApiBaseCodec( pigeon_instanceManager ?? PigeonInstanceManager.instance, @@ -9207,6 +10041,9 @@ class SecTrust extends NSObject { BinaryMessenger? pigeon_binaryMessenger, PigeonInstanceManager? pigeon_instanceManager, }) async { + if (PigeonOverrides.secTrust_getTrustResult != null) { + return PigeonOverrides.secTrust_getTrustResult!(trust); + } final _PigeonInternalProxyApiBaseCodec pigeonChannelCodec = _PigeonInternalProxyApiBaseCodec( pigeon_instanceManager ?? PigeonInstanceManager.instance, @@ -9249,6 +10086,9 @@ class SecTrust extends NSObject { BinaryMessenger? pigeon_binaryMessenger, PigeonInstanceManager? pigeon_instanceManager, }) async { + if (PigeonOverrides.secTrust_copyCertificateChain != null) { + return PigeonOverrides.secTrust_copyCertificateChain!(trust); + } final _PigeonInternalProxyApiBaseCodec pigeonChannelCodec = _PigeonInternalProxyApiBaseCodec( pigeon_instanceManager ?? PigeonInstanceManager.instance, @@ -9369,6 +10209,9 @@ class SecCertificate extends NSObject { BinaryMessenger? pigeon_binaryMessenger, PigeonInstanceManager? pigeon_instanceManager, }) async { + if (PigeonOverrides.secCertificate_copyData != null) { + return PigeonOverrides.secCertificate_copyData!(certificate); + } final _PigeonInternalProxyApiBaseCodec pigeonChannelCodec = _PigeonInternalProxyApiBaseCodec( pigeon_instanceManager ?? PigeonInstanceManager.instance, diff --git a/packages/webview_flutter/webview_flutter_wkwebview/pubspec.yaml b/packages/webview_flutter/webview_flutter_wkwebview/pubspec.yaml index c60695d6042..dd0d62c11ff 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/pubspec.yaml +++ b/packages/webview_flutter/webview_flutter_wkwebview/pubspec.yaml @@ -33,7 +33,7 @@ dev_dependencies: flutter_test: sdk: flutter mockito: ^5.4.4 - pigeon: ^25.3.2 + pigeon: ^26.1.0 topics: - html